|
@@ -3229,9 +3229,11 @@ class StoreOrderRepository extends BaseRepository
|
|
|
foreach ($order['orderProduct'] as $k => $v){
|
|
foreach ($order['orderProduct'] as $k => $v){
|
|
|
$num=0;
|
|
$num=0;
|
|
|
$cart_info = StoreCart::where(['cart_id' => $v['cart_id'], 'product_id' => $v['product_id']])->find();
|
|
$cart_info = StoreCart::where(['cart_id' => $v['cart_id'], 'product_id' => $v['product_id']])->find();
|
|
|
- foreach ($data as $vv){
|
|
|
|
|
|
|
+ foreach ($data as &$vv){
|
|
|
if ($vv['product_id'] == $v['product_id']){
|
|
if ($vv['product_id'] == $v['product_id']){
|
|
|
$num = $vv['num'];
|
|
$num = $vv['num'];
|
|
|
|
|
+ $vv['cart_id'] = $v['cart_id'];
|
|
|
|
|
+ $vv['verify_num'] = $cart_info['verify_num'];
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
$verify_num = bcadd($cart_info['verify_num'], $num, 0);
|
|
$verify_num = bcadd($cart_info['verify_num'], $num, 0);
|
|
@@ -3278,7 +3280,7 @@ class StoreOrderRepository extends BaseRepository
|
|
|
'change_type' => $storeOrderStatusRepository::ORDER_STATUS_TAKE,
|
|
'change_type' => $storeOrderStatusRepository::ORDER_STATUS_TAKE,
|
|
|
];
|
|
];
|
|
|
foreach ($data as $v) {
|
|
foreach ($data as $v) {
|
|
|
- StoreCart::where(['cart_id' => $v['id'], 'product_id' => $v['product_id']])->update(['verify_num' => bcadd($v['num'], $v['num'], 0)]);
|
|
|
|
|
|
|
+ StoreCart::where(['cart_id' => $v['cart_id'], 'product_id' => $v['product_id']])->update(['verify_num' => bcadd($v['verify_num'], $v['num'], 0)]);
|
|
|
}
|
|
}
|
|
|
// 根据服务人员ID是否存在,分别记录服务人员日志或管理员日志
|
|
// 根据服务人员ID是否存在,分别记录服务人员日志或管理员日志
|
|
|
if ($serviceId) {
|
|
if ($serviceId) {
|