|
@@ -56,15 +56,17 @@ class QappUserService
|
|
|
} else {
|
|
|
try {
|
|
|
DB::beginTransaction();
|
|
|
+ if (!$qapp_user->phone) {
|
|
|
+ $reward = 100;
|
|
|
+ User::where('id', $uid)->update(
|
|
|
+ [
|
|
|
+ 'balance' => DB::raw('balance+' . $reward),
|
|
|
+ 'reward_balance' => DB::raw('reward_balance+' . $reward)
|
|
|
+ ]
|
|
|
+ );
|
|
|
+ }
|
|
|
$qapp_user->phone = $phone;
|
|
|
$qapp_user->save();
|
|
|
- $reward = 100;
|
|
|
- User::where('id', $uid)->update(
|
|
|
- [
|
|
|
- 'balance' => DB::raw('balance+' . $reward),
|
|
|
- 'reward_balance' => DB::raw('reward_balance+' . $reward)
|
|
|
- ]
|
|
|
- );
|
|
|
DB::commit();
|
|
|
} catch (Exception $e) {
|
|
|
myLog('bindPhone')->error($e->getMessage());
|