商户入驻自动添加客服

This commit is contained in:
彭桃 2023-03-09 14:37:47 +08:00
parent 6e75d0a03f
commit 46795b4f08
3 changed files with 14 additions and 1 deletions

View File

@ -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 {

View File

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

View File

@ -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){