修改订单金额匹配商品
This commit is contained in:
parent
eefde6451a
commit
b2ea8b4a5e
@ -2574,14 +2574,13 @@ class StoreOrderRepository extends BaseRepository
|
||||
|
||||
public function dealGoodsList($where,$money)
|
||||
{
|
||||
$data = ProductAttrValue::getDB()->alias('a')
|
||||
$data = ProductAttrValue::alias('a')
|
||||
->leftJoin('store_product p', 'a.product_id = p.product_id')
|
||||
->where($where)
|
||||
->where('a.stock', '>', 0)
|
||||
->field('a.value_id,a.product_id,a.mer_id,a.sku,a.stock,a.image,a.price,
|
||||
a.svip_price,
|
||||
a.unique,p.store_name,p.store_info');
|
||||
$list = $data->select();
|
||||
$list = $data->limit(100)->select();
|
||||
$count = $data->count();
|
||||
$minMoney = bcsub($money, 600, 2);
|
||||
|
||||
|
@ -314,12 +314,11 @@ class StoreOrder extends BaseController
|
||||
return app('json')->fail('参数缺失');
|
||||
}
|
||||
$where = [
|
||||
"a.mer_id" => $merId,
|
||||
"p.is_show" => 1,
|
||||
"p.status" => 1,
|
||||
"p.product_type" => 0,
|
||||
"p.is_gift_bag" => 0
|
||||
];
|
||||
$where['a.mer_id'] = $merId;
|
||||
|
||||
return app('json')->success($this->repository->dealGoodsList($where,$money));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user