Jelajahi Sumber

会员升级

Kirin 5 hari lalu
induk
melakukan
8ad5cb95f1

+ 1 - 1
app/controller/admin/v1/user/User.php

@@ -477,7 +477,7 @@ class User extends AuthController
     {
         $data = $this->request->postMore([
             ['money_status', 0],
-            ['is_promoter', 0],
+            ['is_promoter', -1],
             ['real_name', ''],
             ['card_id', ''],
             ['birthday', ''],

+ 1 - 1
app/services/user/UserServices.php

@@ -890,7 +890,7 @@ class UserServices extends BaseServices
             $edit['card_id'] = $data['card_id'];
             $edit['birthday'] = strtotime($data['birthday']);
             $edit['mark'] = $data['mark'];
-            $edit['is_promoter'] = $data['is_promoter'];
+            $edit['is_promoter'] =  (isset($data['is_promoter']) && $data['is_promoter'] >= 0) ? $data['is_promoter'] : $user['is_promoter'];
             $edit['level'] = $data['level'];
             $edit['phone'] = $data['phone'];
             $edit['addres'] = $data['addres'];