增加:酒道馆和联盟商家审核通过后同步子类型信息
This commit is contained in:
parent
38b13fa15b
commit
51acc25e87
|
|
@ -139,6 +139,7 @@ class MerchantIntentionRepository extends BaseRepository
|
|||
'agent_id' => $intention['merchant_type'] == 1 ? 0 : $intention['agent_id'] ?? 0,// 酒道馆是合伙人邀请加入 不能直接绑定
|
||||
'merchant_type' => $intention['merchant_type'] ?? 0,
|
||||
'invite_agent_id' => $intention['agent_id'] ?? 0,
|
||||
'merchant_sub_type' => $intention['merchant_sub_type'] ?? 0,
|
||||
];
|
||||
$data['fail_msg'] = '';
|
||||
$smsData = [
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ class MerchantRepository extends BaseRepository
|
|||
$query->field('uid,nickname,avatar');
|
||||
},
|
||||
])
|
||||
->field('resource_shareholders_uid,merchant_type,sort,mer_id,mer_name,real_name,mer_phone,mer_address,mark,status,create_time,is_best,is_trader,type_id,category_id,copy_product_num,export_dump_num,is_margin,margin,ot_margin,mer_avatar,margin_remind_time,agent_id,shop_mer_id,brand_id')
|
||||
->field('merchant_sub_type,resource_shareholders_uid,merchant_type,sort,mer_id,mer_name,real_name,mer_phone,mer_address,mark,status,create_time,is_best,is_trader,type_id,category_id,copy_product_num,export_dump_num,is_margin,margin,ot_margin,mer_avatar,margin_remind_time,agent_id,shop_mer_id,brand_id')
|
||||
->select();
|
||||
return compact('count', 'list');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -232,6 +232,7 @@ class Merchant extends BaseController
|
|||
'brand_id',
|
||||
['resource_shareholders_uid',0],
|
||||
['resource_shareholders_rate',0],
|
||||
['merchant_sub_type',0],
|
||||
]);
|
||||
$data['mer_label'] = str_replace(',',',',$data['mer_label']);
|
||||
if (!$isUpdate) {
|
||||
|
|
|
|||
|
|
@ -786,18 +786,18 @@ class Auth extends BaseController
|
|||
* @return mixed
|
||||
*/
|
||||
public function searchUser(){
|
||||
$search = $this->request->params(['id_and_phone']);
|
||||
$idAndPhone = $this->request->param('id_and_phone', 0);
|
||||
$userInfo = app()->make(UserRepository::class)
|
||||
->getSearch([])
|
||||
->field(['uid','real_name','nickname','avatar','phone'])
|
||||
->whereNull('cancel_time')
|
||||
// 用户ID/联系电话
|
||||
->when(!empty($search['id_and_phone']),function($query) use ($search){
|
||||
$query->where(function($query) use ($search){
|
||||
$query->where('uid',$search['id_and_phone'])->whereOr('phone',$search['id_and_phone']);
|
||||
->where(function($query) use ($idAndPhone){
|
||||
$query->where('uid',$idAndPhone)->whereOr(function($sql) use ($idAndPhone){
|
||||
$sql->where('phone',$idAndPhone)->whereNull('phone');
|
||||
});
|
||||
})
|
||||
->findOrEmpty();
|
||||
->findOrEmpty()
|
||||
->toArray();
|
||||
|
||||
return app('json')->success($userInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ class MerchantIntention extends BaseController
|
|||
// 接收参数处理
|
||||
protected function checkParams($id = 0){
|
||||
// 参数获取
|
||||
$data = $this->request->params(['phone','mer_name','name','code','images','merchant_category_id','mer_type_id','manage_uid',['agent_id', 0],['merchant_type',0]]);
|
||||
$data = $this->request->params(['phone','mer_name','name','code','images','merchant_category_id','mer_type_id','manage_uid',['agent_id', 0],['merchant_type',0],['merchant_sub_type',0]]);
|
||||
app()->make(MerchantIntentionValidate::class)->check($data);
|
||||
// $check = app()->make(SmsService::class)->checkSmsCode($data['phone'],$data['code'],'intention');
|
||||
$data['mer_type_id'] = (int)$data['mer_type_id'];
|
||||
|
|
|
|||
Loading…
Reference in New Issue