添加:惠民健康体检馆相关兼容
This commit is contained in:
parent
410ed5dc8c
commit
3e694829cc
|
|
@ -202,6 +202,9 @@ class User extends BaseModel
|
|||
->order('is_verify DESC,customer DESC');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 用户是否存在商户平台 有效店员信息
|
||||
public function getServiceAttr($value){
|
||||
$info = (new StoreService())
|
||||
|
|
@ -222,7 +225,6 @@ class User extends BaseModel
|
|||
|
||||
return !empty($info) ? $info->toArray() : null;
|
||||
}
|
||||
|
||||
// 用户是否存在酒道馆 有效店员信息
|
||||
public function getShopMerServiceAttr($value){
|
||||
$info = (new StoreService())
|
||||
|
|
@ -323,10 +325,50 @@ class User extends BaseModel
|
|||
|
||||
return !empty($info) ? $info->toArray() : null;
|
||||
}
|
||||
// 用户是否存在惠民健康体检馆 有效店员信息
|
||||
public function getHealthServiceAttr(){
|
||||
$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', 7)
|
||||
->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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 商户类型 是否有效
|
||||
public function getRuleServiceAttr(){
|
||||
$info = (new StoreService())
|
||||
->alias('ss')
|
||||
->join('merchant m','ss.mer_id = m.mer_id')
|
||||
->where('m.is_del', 0)
|
||||
->where('m.mer_state', 1)
|
||||
->where('m.status', 1)
|
||||
->where('ss.uid', $this->uid)
|
||||
->where('ss.mer_id','<>',0)
|
||||
->where('ss.is_del',0)
|
||||
->where('ss.is_open',1)
|
||||
// ->order('StoreService.is_verify DESC,StoreService.customer DESC')
|
||||
// ->fetchSql()
|
||||
->column('m.merchant_type');
|
||||
|
||||
return array_unique($info);
|
||||
}
|
||||
|
||||
|
||||
public function topService()
|
||||
{
|
||||
return $this->hasOne(StoreService::class, 'uid', 'uid')
|
||||
|
|
|
|||
|
|
@ -122,6 +122,12 @@ class AgentRepository extends BaseRepository{
|
|||
$path = 'pages/store/settled/index';
|
||||
return app()->make(QrcodeService::class)->createQrCode($valueData,$path);
|
||||
break;
|
||||
case 'health':
|
||||
// 参数长度超过 简写:aid=agent_id;mt=merchant_type
|
||||
$valueData = 'aid=' . $params['agent_id'].'&mt=7';
|
||||
$path = 'pages/store/settled/index';
|
||||
return app()->make(QrcodeService::class)->createQrCode($valueData,$path);
|
||||
break;
|
||||
}
|
||||
|
||||
throw new ValidateException('小程序码生成失败!');
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ class StoreServiceRepository extends BaseRepository
|
|||
]
|
||||
];
|
||||
}
|
||||
else if(in_array($merchantType,[1,3,4,6])){
|
||||
else if(in_array($merchantType,[1,3,4,6,7])){
|
||||
$adminRule = [
|
||||
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),
|
||||
|
|
|
|||
|
|
@ -167,11 +167,13 @@ class Auth extends BaseController
|
|||
$user->append([
|
||||
'service',
|
||||
'topService',
|
||||
// 'ruleService',
|
||||
'shopMerService',
|
||||
'supermarketService',
|
||||
'smokeMerService',
|
||||
'provinceService',
|
||||
'hallService',
|
||||
'HealthService',
|
||||
'total_collect_product',
|
||||
'total_collect_store',
|
||||
'total_coupon',
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ class MerchantIntention extends BaseController
|
|||
// $check = app()->make(SmsService::class)->checkSmsCode($data['phone'],$data['code'],'intention');
|
||||
$data['mer_type_id'] = (int)$data['mer_type_id'];
|
||||
// if(!$check) throw new ValidateException('验证码不正确');
|
||||
if(!in_array((int)$data['merchant_type'],[1,3,4,5,6])){
|
||||
if(!in_array((int)$data['merchant_type'],[1,3,4,5,6,7])){
|
||||
// 判断:商户分类是否存在
|
||||
$cateIsHas = app()->make(MerchantCategoryRepository::class)->get($data['merchant_category_id']);
|
||||
if(!$cateIsHas) throw new ValidateException('商户分类不存在');
|
||||
|
|
|
|||
Loading…
Reference in New Issue