bug修复
This commit is contained in:
parent
ca20c9020e
commit
b8cc587c63
@ -34,11 +34,8 @@ class GoodsCombinationController extends Controller
|
||||
$orderRestTime = DeveloperConfig::query()
|
||||
->where('key', DeveloperConfig::$ORDER_RESET_TIME)
|
||||
->value('value');
|
||||
$time = date('Y-m-d 07:00:00');
|
||||
if (is_null($orderRestTime)) {
|
||||
$orderRestTime = $time;
|
||||
} else {
|
||||
$orderRestTime = Carbon::parse($orderRestTime)->lt(Carbon::parse($time)) ? $time : $orderRestTime;
|
||||
$orderRestTime = date('Y-m-d 07:00:00');
|
||||
}
|
||||
|
||||
$businessOrderItems = BusinessOrderItem::query()
|
||||
|
||||
@ -59,11 +59,8 @@ class GoodsSkusController extends Controller
|
||||
$orderRestTime = DeveloperConfig::query()
|
||||
->where('key', DeveloperConfig::$ORDER_RESET_TIME)
|
||||
->value('value');
|
||||
$time = date('Y-m-d 07:00:00');
|
||||
if (is_null($orderRestTime)) {
|
||||
$orderRestTime = $time;
|
||||
} else {
|
||||
$orderRestTime = Carbon::parse($orderRestTime)->lt(Carbon::parse($time)) ? $time : $orderRestTime;
|
||||
$orderRestTime = date('Y-m-d 07:00:00');
|
||||
}
|
||||
$businessOrderItems = BusinessOrderItem::query()
|
||||
->select(DB::raw($fields))
|
||||
@ -304,9 +301,6 @@ class GoodsSkusController extends Controller
|
||||
$log = new LogModel();
|
||||
$log->batchInsert($logs);
|
||||
DB::commit();
|
||||
if (!empty($updateIds)) {
|
||||
event(new BatchStockUpdateEvent($updateIds));
|
||||
}
|
||||
} catch (\Exception $exception) {
|
||||
DB::rollBack();
|
||||
$this->res = [
|
||||
@ -315,7 +309,9 @@ class GoodsSkusController extends Controller
|
||||
'errorMessage' => $exception->getMessage(),
|
||||
];
|
||||
}
|
||||
|
||||
if (!empty($updateIds)) {
|
||||
event(new BatchStockUpdateEvent($updateIds));
|
||||
}
|
||||
return response($this->res, $this->res['httpCode']);
|
||||
}
|
||||
|
||||
|
||||
@ -71,13 +71,14 @@ class SaleStockImport implements ToArray, SkipsEmptyRows
|
||||
$log = new LogModel();
|
||||
$log->batchInsert($logs);
|
||||
DB::commit();
|
||||
if (!empty($updateIds)) {
|
||||
event(new BatchStockUpdateEvent($updateIds));
|
||||
}
|
||||
|
||||
} catch (\Exception $exception) {
|
||||
DB::rollBack();
|
||||
throw new Exception($exception->getMessage());
|
||||
}
|
||||
if (!empty($updateIds)) {
|
||||
event(new BatchStockUpdateEvent($updateIds));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ class BatchStockUpdateListener implements ShouldQueue
|
||||
->where('external_sku_id', $goodsSku->external_sku_id)
|
||||
->get();
|
||||
BusinessFactory::init()->make($shop['plat_id'])->setShopWithId($shop['id'])->batchIncrQuantity($businessGoodsSkus->toArray(), $num, false);
|
||||
usleep(140);
|
||||
usleep(50);
|
||||
}
|
||||
}
|
||||
} catch (\Exception $exception) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user