From 46795b4f08acd0d9a768d7b27614bb6bb8bedf99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AD=E6=A1=83?= <1098598843@qq.com> Date: Thu, 9 Mar 2023 14:37:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E6=88=B7=E5=85=A5=E9=A9=BB=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=B7=BB=E5=8A=A0=E5=AE=A2=E6=9C=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/merchant/MerchantIntentionRepository.php | 11 +++++++++++ app/controller/api/Auth.php | 2 ++ app/controller/api/store/order/StoreCartDg.php | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/common/repositories/system/merchant/MerchantIntentionRepository.php b/app/common/repositories/system/merchant/MerchantIntentionRepository.php index eb364b62..ffca221a 100644 --- a/app/common/repositories/system/merchant/MerchantIntentionRepository.php +++ b/app/common/repositories/system/merchant/MerchantIntentionRepository.php @@ -161,6 +161,17 @@ class MerchantIntentionRepository extends BaseRepository if ($create) { $merchant = app()->make(MerchantRepository::class)->createMerchant($merData); $data['mer_id'] = $merchant->mer_id; + // 写入商户客服表 + $store_service_data['mer_id'] = $merchant->mer_id; + $store_service_data['uid'] = $intention['uid']; + $store_service_data['avatar'] = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/def/1b716202302251108516996.png'; + $store_service_data['nickname'] = $intention['mer_name']; + $store_service_data['account'] = $intention['phone']; + $store_service_data['pwd'] = password_hash('123456', PASSWORD_BCRYPT);; + $store_service_data['status'] = 1; + $store_service_data['phone'] = $intention['phone']; + $store_service_data['create_time'] = date('Y-m-d H:i:s'); + Db::name('store_service')->insert($store_service_data); Queue::push(SendSmsJob::class, ['tempId' => 'APPLY_MER_SUCCESS', 'id' => $smsData]); } } else { diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index c4c6233a..718440f3 100644 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -168,6 +168,8 @@ class Auth extends BaseController }else{ $data['group_id']=1; } +// 新增返回商户后台登录地址 + $data['merchant_login'] = $this->request->domain().'/merchant'; return app('json')->success($data); } diff --git a/app/controller/api/store/order/StoreCartDg.php b/app/controller/api/store/order/StoreCartDg.php index c317dc92..4b924a3f 100644 --- a/app/controller/api/store/order/StoreCartDg.php +++ b/app/controller/api/store/order/StoreCartDg.php @@ -252,7 +252,7 @@ class StoreCartDg extends BaseController ->page($page,$limit) ->withAttr('goods',function ($value,$data){ $www[] = ['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("a.cart_num,b.product_id,b.store_name,b.price")->where($www)->select(); + $goods = Db::table('eb_store_cart')->alias('a')->join('eb_store_product b','a.product_id = b.product_id')->field("a.cart_num,b.product_id,b.store_name,b.price,b.image")->where($www)->select(); return $goods; }) ->withAttr('total',function ($value,$data){