Merge branch 'dev' of https://gitea.lihaink.cn/mkm/multi-store into dev
This commit is contained in:
commit
df8e852373
@ -63,7 +63,8 @@ class CartList extends BaseAdminDataLists implements ListsSearchInterface, Lists
|
|||||||
foreach ($list as $key => &$item) {
|
foreach ($list as $key => &$item) {
|
||||||
|
|
||||||
$find = StoreBranchProduct::where(['product_id' => $item['product_id'],'store_id' => $item['store_id']])
|
$find = StoreBranchProduct::where(['product_id' => $item['product_id'],'store_id' => $item['store_id']])
|
||||||
->field('product_id,image,price,cost,store_name,unit')
|
->field('product_id,image,price,cost,store_name,unit,delete_time')
|
||||||
|
->withTrashed()
|
||||||
->find();
|
->find();
|
||||||
// if (isset($check) && $check['status'] == 1) {
|
// if (isset($check) && $check['status'] == 1) {
|
||||||
// $find['price'] = $find['cost'];
|
// $find['price'] = $find['cost'];
|
||||||
|
@ -71,7 +71,7 @@ class OrderLogic extends BaseLogic
|
|||||||
/** 计算价格 */
|
/** 计算价格 */
|
||||||
|
|
||||||
foreach ($cart_select as $k => $v) {
|
foreach ($cart_select as $k => $v) {
|
||||||
$find = StoreBranchProduct::where(['product_id' => $v['product_id'], 'store_id' => $params['store_id']])->field('id branch_product_id,store_name,image,unit,price,vip_price,cost,product_id')->find();
|
$find = StoreBranchProduct::where(['product_id' => $v['product_id'], 'store_id' => $params['store_id']])->field('id branch_product_id,store_name,image,unit,price,vip_price,cost,product_id')->withTrashed()->find();
|
||||||
if (!$find) {
|
if (!$find) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -200,7 +200,7 @@ class OrderLogic extends BaseLogic
|
|||||||
$goods_list[$k]['uid'] = request()->userId;
|
$goods_list[$k]['uid'] = request()->userId;
|
||||||
$goods_list[$k]['cart_id'] = implode(',', $cartId);
|
$goods_list[$k]['cart_id'] = implode(',', $cartId);
|
||||||
$goods_list[$k]['delivery_id'] = $params['store_id']; //商家id
|
$goods_list[$k]['delivery_id'] = $params['store_id']; //商家id
|
||||||
$StoreBranchProduct = StoreBranchProduct::where('id',$v['branch_product_id'])->find();
|
$StoreBranchProduct = StoreBranchProduct::where('id',$v['branch_product_id'])->withTrashed()->find();
|
||||||
$updateData[] = [
|
$updateData[] = [
|
||||||
'id' => $v['branch_product_id'],
|
'id' => $v['branch_product_id'],
|
||||||
'stock' => $StoreBranchProduct['stock']-$v['cart_num'],
|
'stock' => $StoreBranchProduct['stock']-$v['cart_num'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user