diff --git a/app/controller/api/store/order/StoreCartDg.php b/app/controller/api/store/order/StoreCartDg.php index 2d2b31df..8869b2de 100644 --- a/app/controller/api/store/order/StoreCartDg.php +++ b/app/controller/api/store/order/StoreCartDg.php @@ -262,7 +262,7 @@ class StoreCartDg extends BaseController }) ->withAttr('total_price',function ($value,$data){ $www3[] = ['a.cart_id','in',$data['cart_ids']]; - $goods = Db::table('eb_store_cart')->alias('a')->join('eb_store_product b','a.product_id = b.product_id')->field("sum(b.price) as total_price")->where($www3)->find(); + $goods = Db::table('eb_store_cart')->alias('a')->join('eb_store_product b','a.product_id = b.product_id')->field("sum(b.price*a.cart_num) as total_price")->where($www3)->find(); return $goods['total_price']; }) ->select();