Browse Source

会员升级

Kirin 10 months ago
parent
commit
bdb347cb86
2 changed files with 3 additions and 1 deletions
  1. 1 1
      app/dao/user/UserExchangeDao.php
  2. 2 0
      app/services/user/UserExchangeServices.php

+ 1 - 1
app/dao/user/UserExchangeDao.php

@@ -88,7 +88,7 @@ class UserExchangeDao extends BaseDao
     {
         return $this->search($where)->field($field)->with([
             'user' => function ($query) {
-                $query->field('uid,nickname');
+                $query->field('uid,nickname,real_name,card_id,phone');
             }])->page($page, $limit)->order('id desc')->select()->toArray();
     }
 

+ 2 - 0
app/services/user/UserExchangeServices.php

@@ -96,6 +96,8 @@ class UserExchangeServices extends BaseServices
         $list = $this->dao->getExtractList($where, $field, $page, $limit);
         foreach ($list as &$item) {
             $item['nickname'] = $item['user']['nickname'] ?? '';
+            $item['real_name'] = $item['user']['real_name'] ?? '';
+            $item['card_id'] = $item['user']['card_id'] ?? '';
         }
         $count = $this->dao->count($where);
         return compact('list', 'count');