songxingwei 2 years ago
parent
commit
dc8949cc7e

+ 2 - 2
app/data/controller/api/auth/Center.php

@@ -54,8 +54,8 @@ class Center extends Auth
         $user = $this->getUser();
 //        $pooltalent = DataPoolTalent::mk()->where('uuid',$this->uuid)->find();
 //        $user['pooltalent'] = $pooltalent;
-        $maintenance = DataMaintenance::mk()->where('uuid',$this->uuid)->find();
-        $user['maintenance'] = $maintenance;
+//        $maintenance = DataMaintenance::mk()->where('uuid',$this->uuid)->find();
+//        $user['maintenance'] = $maintenance;
         $shipyard = DataShipyard::mk()->where('uuid',$this->uuid)->find();
         $user['shipyard'] = $shipyard;
         $merchants = DataMerchants::mk()->where('uuid',$this->uuid)->find();

+ 4 - 1
app/data/model/DataUser.php

@@ -34,5 +34,8 @@ class DataUser extends Model
     public function pooltalent(){
         return $this->hasOne(DataPoolTalent::class,'uuid');
     }
-    
+    public function maintenance(){
+        return $this->hasOne(DataMaintenance::class,'uuid');
+    }
+
 }

+ 1 - 1
app/data/service/UserAdminService.php

@@ -85,7 +85,7 @@ class UserAdminService extends Service
         $map = ['id' => $uuid, 'deleted' => 0];
         $user = DataUser::mk()
             ->where($map)
-            ->with(['pooltalent'])
+            ->with(['pooltalent','maintenance'])
             ->findOrEmpty();
         if ($user->isEmpty()) throw new Exception('用户还没有注册!');
         // 用户认证令牌处理