From 36b77fb346b9a8e620d454e6957af19049e1db32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Fri, 19 Mar 2021 18:23:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=A2=E5=8D=95=E9=94=80?= =?UTF-8?q?=E9=87=8F=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/data/service/GoodsService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/data/service/GoodsService.php b/app/data/service/GoodsService.php index 95dc66a42..6bccaec8c 100644 --- a/app/data/service/GoodsService.php +++ b/app/data/service/GoodsService.php @@ -89,7 +89,7 @@ class GoodsService extends Service $stockList = $query->where(['goods_code' => $code])->group('goods_code,goods_spec')->select()->toArray(); // 商品销量统计 $query = $this->app->db->table('shop_order a')->field('b.goods_code,b.goods_spec,ifnull(sum(b.stock_sales),0) stock_sales'); - $query->leftJoin('shop_order_item b', 'a.order_no=b.order_no')->where("b.goods_code='{$code}' and a.status>0 and a.deleted_status<0"); + $query->leftJoin('shop_order_item b', 'a.order_no=b.order_no')->where("b.goods_code='{$code}' and a.status>0 and a.deleted_status<1"); $salesList = $query->group('b.goods_code,b.goods_spec')->select()->toArray(); // 组装更新数据 $dataList = [];