调整
This commit is contained in:
@@ -129,6 +129,8 @@ class StockOrdersService
|
||||
}
|
||||
}
|
||||
|
||||
// 检查绑定
|
||||
(new UserService())->checkBind($userId);
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
@@ -227,4 +227,26 @@ class UserService
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
|
||||
public function checkBind($userId)
|
||||
{
|
||||
$user = \app\common\model\User::find($userId);
|
||||
if (!$user->report_to) {
|
||||
throw new BusinessException('请先前往个人中心-绑定直属上级');
|
||||
}
|
||||
|
||||
if ($user->sign_img === null || $user->sign_img === '') {
|
||||
throw new BusinessException('请先前往个人中心-操作签名');
|
||||
}
|
||||
|
||||
$ug = \app\common\model\UserGroupMembers::with(['group' => function($query) {
|
||||
$query->where('scenario_code', 'stock_orders');
|
||||
}])->where('user_id', $userId)->first();
|
||||
if (!$ug) {
|
||||
throw new BusinessException('请先前往个人中心-绑定内勤');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user