|
|
@@ -24,7 +24,7 @@ class OrderItemClass extends BaseClass
|
|
|
public static $baseFile = '\bizGhs\order\models\OrderItem';
|
|
|
|
|
|
//预订单删除花材项 ssh 20240123
|
|
|
- public static function delBookItem($order, $smallId,$params=[])
|
|
|
+ public static function delBookItem($order, $smallId, $params = [])
|
|
|
{
|
|
|
$son = self::getById($smallId, true);
|
|
|
if (empty($son)) {
|
|
|
@@ -56,12 +56,12 @@ class OrderItemClass extends BaseClass
|
|
|
}
|
|
|
//删除预订
|
|
|
$num = $son->xhNum ?? 0;
|
|
|
- $delData = [['productId' => $productId, 'num' => $num,]];
|
|
|
- BookItemClass::delBathItem($delData, $order,$params);
|
|
|
+ $delData = [['productId' => $productId, 'num' => $num, 'last' => 0]];
|
|
|
+ BookItemClass::delBathItem($delData, $order, $params);
|
|
|
}
|
|
|
|
|
|
//预订单添加花材项 ssh 20240123
|
|
|
- public static function addBookItemFn($order, $itemList, $params=[])
|
|
|
+ public static function addBookItemFn($order, $itemList, $params = [])
|
|
|
{
|
|
|
$orderSn = $order->orderSn ?? '';
|
|
|
$addIds = array_column($itemList, 'productId');
|
|
|
@@ -135,9 +135,9 @@ class OrderItemClass extends BaseClass
|
|
|
'userPrice' => 0,
|
|
|
];
|
|
|
|
|
|
- $thisBookData[] = ['productId' => $productId, 'num' => $num,];
|
|
|
+ $thisBookData[] = ['productId' => $productId, 'num' => $num, 'lastNum' => $num];
|
|
|
}
|
|
|
- BookItemClass::addBatchItem($thisBookData, $order,$params);
|
|
|
+ BookItemClass::addBatchItem($thisBookData, $order, $params);
|
|
|
$cgId = $order->purchaseId ?? 0;
|
|
|
$cg = PurchaseClass::getById($cgId, true);
|
|
|
if (empty($cg)) {
|