fix: 修复首次关联手机号时的逻辑错误
This commit is contained in:
parent
3c0e58a90a
commit
3d7865aef6
|
@ -118,7 +118,8 @@ class TaskController
|
||||||
// 如果该用户没有关联手机号,首次关联赠送积分
|
// 如果该用户没有关联手机号,首次关联赠送积分
|
||||||
if (UserPhone::where('user_id', $user_id)->count() == 0) {
|
if (UserPhone::where('user_id', $user_id)->count() == 0) {
|
||||||
UserRewardDao::base($user_id, 4, 50, '首次关联手机号送50积分');
|
UserRewardDao::base($user_id, 4, 50, '首次关联手机号送50积分');
|
||||||
$UserPhone = new UserPhone();
|
}
|
||||||
|
$UserPhone = new UserPhone();
|
||||||
$UserPhone->phone = $phone;
|
$UserPhone->phone = $phone;
|
||||||
$UserPhone->user_id = $user_id;
|
$UserPhone->user_id = $user_id;
|
||||||
$UserPhone->score = 0;
|
$UserPhone->score = 0;
|
||||||
|
@ -126,7 +127,6 @@ class TaskController
|
||||||
$UserPhone->time = 0;
|
$UserPhone->time = 0;
|
||||||
$UserPhone->last_time = time();
|
$UserPhone->last_time = time();
|
||||||
$UserPhone->save();
|
$UserPhone->save();
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// 本地已存在手机号,更新用户信息
|
// 本地已存在手机号,更新用户信息
|
||||||
// $UserPhone->user_id = $user_id;
|
// $UserPhone->user_id = $user_id;
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue