|
|
@@ -62,7 +62,6 @@ class MarketLogic
|
|
|
//是否全部取消
|
|
|
$rows = ProductTransfer::where('order_id', $orderId)->find();
|
|
|
$count = ProductTransfer::where('product_id', $orderInfo['product_id'])->where('status', ProductTransfer::Normal)->count();
|
|
|
-
|
|
|
if($count == 1){
|
|
|
$isUpdate = true;
|
|
|
$market->status = ProductMarket::Hidden;
|
|
|
@@ -73,7 +72,6 @@ class MarketLogic
|
|
|
$market->price = ProductTransfer::getTransferMinPriceByProduct($orderInfo['product_id'], $rows->price);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
//市场状态
|
|
|
if($isUpdate) $market->save();
|
|
|
|
|
|
@@ -87,18 +85,17 @@ class MarketLogic
|
|
|
|
|
|
|
|
|
//判断是否锁定
|
|
|
- public static function setTransferLock(object $productTransfer, int $endTime, array $params)
|
|
|
+ public static function setTransferLock(object $productTransfer, int $endTime, string $transferId)
|
|
|
{
|
|
|
$time = time();
|
|
|
$lockCount = $productTransfer
|
|
|
- ->whereIn('id', $params['transfer_id'])
|
|
|
+ ->whereIn('id', $transferId)
|
|
|
->where('is_lock', $productTransfer::Lock)
|
|
|
->whereTime('lock_time','>', - $endTime)
|
|
|
->count();
|
|
|
-
|
|
|
if(!empty($lockCount)) throw new Exception(__("茶权已被他人锁定,无法操作"));
|
|
|
|
|
|
- return $productTransfer->whereIn('id', $params['transfer_id'])
|
|
|
+ return $productTransfer->whereIn('id', $transferId)
|
|
|
->update(['lock_time'=> $time, 'is_lock' => $productTransfer::Lock]);
|
|
|
|
|
|
|