From 55968578cfa69336c0a1c8ce747dac22f7470479 Mon Sep 17 00:00:00 2001 From: luofei <604446095@qq.com> Date: Wed, 20 Mar 2024 15:33:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=AB=E7=A0=81=E5=95=86?= =?UTF-8?q?=E5=93=81=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/store/order/ScanPay.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/app/controller/api/store/order/ScanPay.php b/app/controller/api/store/order/ScanPay.php index 3950e85b..e7743a6a 100644 --- a/app/controller/api/store/order/ScanPay.php +++ b/app/controller/api/store/order/ScanPay.php @@ -3,6 +3,7 @@ namespace app\controller\api\store\order; use app\common\model\store\product\Product; +use app\common\model\store\product\ProductAttrValue; use app\common\repositories\store\product\ProductRepository; use app\controller\api\Common; use crmeb\basic\BaseController; @@ -41,7 +42,19 @@ class ScanPay extends BaseController $siteUrl = systemConfig('site_url'); $user = $this->request->userInfo(); $data = $common->Qrcode(['code' => $siteUrl . 'pages/payment/get_payment?mer_id=' . $merId, 'id' => $user['uid']]); - return app('json')->success(['url' => $data]); + $where = [ + "a.mer_id" => $merId, + "p.is_show" => 1, + "p.status" => 1, + "p.is_gift_bag" => 0 + ]; + $count = ProductAttrValue::alias('a') + ->leftJoin('store_product p', 'a.product_id = p.product_id') + ->where($where) + ->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')->count(); + return app('json')->success(['url' => $data, 'count' => $count]); } }