登陆默认绑定俊良诊所,因为后续的在线复诊如果没有绑定会出问题
This commit is contained in:
@@ -193,6 +193,19 @@ class LoginForm extends BaseModel
|
||||
'is_delete' => 0
|
||||
]);
|
||||
}
|
||||
$storeUserJl = StoreUser::find()->where([
|
||||
'user_id' => $user->id,
|
||||
'store_id' => 11001,
|
||||
])->one();
|
||||
if (!$storeUserJl) {
|
||||
//用户关联门店
|
||||
$StoreUser = new StoreUser();
|
||||
$StoreUser->store_id = 11001;
|
||||
$StoreUser->user_id = $user->id;
|
||||
$StoreUser->is_online = 0;
|
||||
$StoreUser->last_login_time = time();
|
||||
$StoreUser->saveOrFail();
|
||||
}
|
||||
|
||||
$transaction->commit();
|
||||
} catch (Exception $exception) {
|
||||
|
||||
Reference in New Issue
Block a user