parent
c288f99456
commit
d77dcd89eb
|
|
@ -303,6 +303,26 @@ class User extends BaseModel
|
||||||
|
|
||||||
return !empty($info) ? $info->toArray() : null;
|
return !empty($info) ? $info->toArray() : null;
|
||||||
}
|
}
|
||||||
|
// 用户是否存在城市会客厅 有效店员信息
|
||||||
|
public function getHallServiceAttr(){
|
||||||
|
$info = (new StoreService())
|
||||||
|
->field('service_id,uid,nickname,avatar,customer,StoreService.mer_id,is_verify,is_goods,is_open')
|
||||||
|
->hasWhere('merchant',function($query){
|
||||||
|
$query->where('is_del', 0)
|
||||||
|
->where('mer_state', 1)
|
||||||
|
->where('merchant_type', 6)
|
||||||
|
->where('status', 1);
|
||||||
|
})
|
||||||
|
->where('uid',$this->uid)
|
||||||
|
->where('StoreService.mer_id','<>',0)
|
||||||
|
->where('StoreService.is_del',0)
|
||||||
|
->where('is_open',1)
|
||||||
|
->order('StoreService.is_verify DESC,StoreService.customer DESC')
|
||||||
|
// ->fetchSql()
|
||||||
|
->find();
|
||||||
|
|
||||||
|
return !empty($info) ? $info->toArray() : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -116,6 +116,12 @@ class AgentRepository extends BaseRepository{
|
||||||
$path = 'pages/store/settled/index';
|
$path = 'pages/store/settled/index';
|
||||||
return app()->make(QrcodeService::class)->createQrCode($valueData,$path);
|
return app()->make(QrcodeService::class)->createQrCode($valueData,$path);
|
||||||
break;
|
break;
|
||||||
|
case 'hall':
|
||||||
|
// 参数长度超过 简写:aid=agent_id;mt=merchant_type
|
||||||
|
$valueData = 'aid=' . $params['agent_id'].'&mt=6';
|
||||||
|
$path = 'pages/store/settled/index';
|
||||||
|
return app()->make(QrcodeService::class)->createQrCode($valueData,$path);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new ValidateException('小程序码生成失败!');
|
throw new ValidateException('小程序码生成失败!');
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ class StoreServiceRepository extends BaseRepository
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
else if(in_array($merchantType,[1,3,4])){
|
else if(in_array($merchantType,[1,3,4,6])){
|
||||||
$adminRule = [
|
$adminRule = [
|
||||||
Elm::switches('is_verify', '核销权限', 1)->activeValue(1)->inactiveValue(0)->inactiveText('关')->activeText('开')->col(8),
|
Elm::switches('is_verify', '核销权限', 1)->activeValue(1)->inactiveValue(0)->inactiveText('关')->activeText('开')->col(8),
|
||||||
// Elm::switches('product_exchange', '商品兑换码', 1)->activeValue(1)->inactiveValue(0)->inactiveText('关')->activeText('开')->col(8),
|
// Elm::switches('product_exchange', '商品兑换码', 1)->activeValue(1)->inactiveValue(0)->inactiveText('关')->activeText('开')->col(8),
|
||||||
|
|
|
||||||
|
|
@ -171,6 +171,7 @@ class Auth extends BaseController
|
||||||
'supermarketService',
|
'supermarketService',
|
||||||
'smokeMerService',
|
'smokeMerService',
|
||||||
'provinceService',
|
'provinceService',
|
||||||
|
'hallService',
|
||||||
'total_collect_product',
|
'total_collect_product',
|
||||||
'total_collect_store',
|
'total_collect_store',
|
||||||
'total_coupon',
|
'total_coupon',
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ class MerchantIntention extends BaseController
|
||||||
// $check = app()->make(SmsService::class)->checkSmsCode($data['phone'],$data['code'],'intention');
|
// $check = app()->make(SmsService::class)->checkSmsCode($data['phone'],$data['code'],'intention');
|
||||||
$data['mer_type_id'] = (int)$data['mer_type_id'];
|
$data['mer_type_id'] = (int)$data['mer_type_id'];
|
||||||
// if(!$check) throw new ValidateException('验证码不正确');
|
// if(!$check) throw new ValidateException('验证码不正确');
|
||||||
if(!in_array((int)$data['merchant_type'],[1,3])){
|
if(!in_array((int)$data['merchant_type'],[1,3,4,5,6])){
|
||||||
// 判断:商户分类是否存在
|
// 判断:商户分类是否存在
|
||||||
$cateIsHas = app()->make(MerchantCategoryRepository::class)->get($data['merchant_category_id']);
|
$cateIsHas = app()->make(MerchantCategoryRepository::class)->get($data['merchant_category_id']);
|
||||||
if(!$cateIsHas) throw new ValidateException('商户分类不存在');
|
if(!$cateIsHas) throw new ValidateException('商户分类不存在');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue