修改用户合并
This commit is contained in:
parent
67e0e7b455
commit
f8530d9a28
@ -1729,8 +1729,8 @@ class Auth extends BaseController
|
|||||||
UserRecharge::where('uid', $user['uid'])->update(['uid' => $targetUser['uid']]);
|
UserRecharge::where('uid', $user['uid'])->update(['uid' => $targetUser['uid']]);
|
||||||
StoreOrderStatus::where('uid', $user['uid'])->update(['uid' => $targetUser['uid']]);
|
StoreOrderStatus::where('uid', $user['uid'])->update(['uid' => $targetUser['uid']]);
|
||||||
if ($user->now_money > 0) {
|
if ($user->now_money > 0) {
|
||||||
$user->now_money = 0;
|
|
||||||
$targetUser->now_money = bcadd($targetUser->now_money, $user->now_money, 2);
|
$targetUser->now_money = bcadd($targetUser->now_money, $user->now_money, 2);
|
||||||
|
$user->now_money = 0;
|
||||||
$targetUser->save();
|
$targetUser->save();
|
||||||
}
|
}
|
||||||
$merchant = Merchant::where('uid', $targetUser['uid'])->find();
|
$merchant = Merchant::where('uid', $targetUser['uid'])->find();
|
||||||
@ -1767,10 +1767,9 @@ class Auth extends BaseController
|
|||||||
$merchant->save();
|
$merchant->save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!empty($user)) {
|
$user->wechat_user_id = 0;
|
||||||
$user->wechat_user_id = 0;
|
$user->main_uid = $targetUser['uid'];
|
||||||
$user->save();
|
$user->save();
|
||||||
}
|
|
||||||
Db::commit();
|
Db::commit();
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
Db::rollback();
|
Db::rollback();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user