add-api-licheb-biz_status
This commit is contained in:
@@ -52,6 +52,14 @@ class User extends Wxapp{
|
||||
if(!$user['status']){
|
||||
throw new Exception('该账号已停用', API_CODE_FAIL);
|
||||
}
|
||||
//判断门店是否存在
|
||||
if($user['group_id']<4){
|
||||
$biz_id = intval($user['biz_id']);
|
||||
$biz = $this->biz_model->get(['id'=>$biz_id,'status'=>1]);
|
||||
if(!$biz){
|
||||
throw new Exception('门店不存在', API_CODE_FAIL);
|
||||
}
|
||||
}
|
||||
$session = $this->wx_session($code);
|
||||
//print_r($session);
|
||||
if(!$session['session_key']){
|
||||
@@ -87,7 +95,12 @@ class User extends Wxapp{
|
||||
|
||||
$user = $this->app_user_model->get(array('id' => $uid));
|
||||
//获取所属店铺字段
|
||||
$biz = $this->biz_model->get(['id'=>$biz_id],'biz_name');
|
||||
$biz = $this->biz_model->get(['id'=>$biz_id,'status'=>1],'biz_name');
|
||||
//判断门店是否存在
|
||||
if(!$biz){
|
||||
$this->logout();
|
||||
throw new Exception('门店不存在', API_CODE_FAIL);
|
||||
}
|
||||
$group_arr = $this->app_user_model->get_group();
|
||||
|
||||
$group_name = $group_arr[$user['group_id']] ? $group_arr[$user['group_id']] : '';
|
||||
|
||||
Reference in New Issue
Block a user