user_socialte
parent
b1d15f9324
commit
0cf776decd
|
|
@ -52,9 +52,9 @@ class AuthController extends AdminAuthController
|
|||
UserSocialite::updateOrCreate([
|
||||
'type' => SocialiteType::from($open_type),
|
||||
'user_type' => $user->getMorphClass(),
|
||||
'user_id' => $user->id,
|
||||
], [
|
||||
'openid' => $openid,
|
||||
], [
|
||||
'user_id' => $user->id,
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class Kernel extends ConsoleKernel
|
|||
{
|
||||
// $schedule->command('inspire')->hourly();
|
||||
// $schedule->call(fn () => logger('schedule running'))->everyMinute();
|
||||
$schedule->command('patient-record:notify')->daily();
|
||||
$schedule->command('patient-record:notify')->dailyAt('7:00');
|
||||
$schedule->command('user:birthday-notify')->dailyAt('8:00');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,12 +64,17 @@ class AuthController extends Controller
|
|||
|
||||
protected function updateUserSocialite($user, $openid, $type)
|
||||
{
|
||||
// 清空以前绑定的
|
||||
UserSocialite::where([
|
||||
'type' => $type,
|
||||
'user_type' => $user->getMorphClass(),
|
||||
])->update(['user_id' => null]);
|
||||
UserSocialite::updateOrCreate([
|
||||
'type' => $type,
|
||||
'user_type' => $user->getMorphClass(),
|
||||
'user_id' => $user->id,
|
||||
], [
|
||||
'openid' => $openid,
|
||||
], [
|
||||
'user_id' => $user->id,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue