From 425c38e40d28465c4e40f626c64877e3026460f0 Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Tue, 23 Jan 2024 15:49:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=EF=BC=9A=E5=95=86=E6=88=B7?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=90=8E=E5=8F=B0=20-=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E4=B9=B0=E5=8D=95=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/model/system/merchant/Merchant.php | 9 +++++++++ app/controller/merchant/system/Merchant.php | 6 ++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/app/common/model/system/merchant/Merchant.php b/app/common/model/system/merchant/Merchant.php index 5517214..2688e43 100644 --- a/app/common/model/system/merchant/Merchant.php +++ b/app/common/model/system/merchant/Merchant.php @@ -19,6 +19,7 @@ use app\common\model\system\financial\Financial; use app\common\model\system\serve\ServeOrder; use app\common\repositories\store\order\StoreOrderRepository; use app\common\repositories\store\StoreActivityRepository; +use app\common\repositories\system\merchant\MerchantRepository; class Merchant extends BaseModel { @@ -266,6 +267,14 @@ class Merchant extends BaseModel { $query->whereIn('mer_id',$value); } + // 在线买单二维码 + public function getOnlinePaymentQrCodeAttr(){ + + return app()->make(MerchantRepository::class)->createQrCode(['mer_id'=>$this->mer_id],'online_payment'); + } + + + /** * Common: 获取本月销售数量 * Author: wu-hui diff --git a/app/controller/merchant/system/Merchant.php b/app/controller/merchant/system/Merchant.php index 744ec17..2d8bc9a 100644 --- a/app/controller/merchant/system/Merchant.php +++ b/app/controller/merchant/system/Merchant.php @@ -133,10 +133,8 @@ class Merchant extends BaseController { $merchant = $this->request->merchant(); - $append = ['merchantCategory', 'merchantType', 'mer_certificate','margin_remind_status']; - if ($merchant->is_margin == -10) - $append[] = 'refundMarginOrder'; - + $append = ['merchantCategory', 'merchantType', 'mer_certificate','margin_remind_status','online_payment_qr_code']; + if ($merchant->is_margin == -10) $append[] = 'refundMarginOrder'; $data = $merchant->append($append)->hidden(['mark', 'reg_admin_id', 'sort'])->toArray(); $delivery = $repository->get($this->request->merId()) + systemConfig(['tx_map_key']); $data = array_merge($data,$delivery);