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);