|
|
@@ -344,18 +344,17 @@ class MemberService extends BaseService
|
|
|
return $info;
|
|
|
}
|
|
|
|
|
|
- $defaultField = ['id', 'user_type', 'realname', 'mobile','is_auth','idcard', 'nickname','company','position','department','parent_id', 'balance', 'code', 'openid','create_time', 'status', 'avatar'];
|
|
|
+ $defaultField = ['id', 'user_type', 'realname', 'mobile','is_auth','idcard', 'nickname','parent_id', 'balance','bonus_total','withdraw_total', 'code', 'openid','create_time', 'status', 'avatar'];
|
|
|
$field = $field ? $field : $defaultField;
|
|
|
if (is_array($where)) {
|
|
|
- $info = $this->model->with(['account','parent'])->where(['mark' => 1])->where($where)->select($field)->first();
|
|
|
+ $info = $this->model->with(['parent'])->where(['mark' => 1])->where($where)->select($field)->first();
|
|
|
} else {
|
|
|
- $info = $this->model->with(['account','parent'])->where(['mark' => 1])->where(['id' => (int)$where])->select($field)->first();
|
|
|
+ $info = $this->model->with(['parent'])->where(['mark' => 1])->where(['id' => (int)$where])->select($field)->first();
|
|
|
}
|
|
|
|
|
|
$info = $info ? $info->toArray() : [];
|
|
|
if ($info) {
|
|
|
$info['create_time'] = $info['create_time']?datetime(strtotime($info['create_time']),'Y-m-d H:i') : '';
|
|
|
- $info['position_text'] = $info['department'] && $info['position']? $info['department'].'/'.$info['position'] : '';
|
|
|
|
|
|
if (isset($info['mobile'])) {
|
|
|
$info['mobile_text'] = $info['mobile'] ? format_mobile($info['mobile']) : '';
|
|
|
@@ -375,7 +374,6 @@ class MemberService extends BaseService
|
|
|
$query1 = clone $query;
|
|
|
$info['user_count'] = $query1->count('id');
|
|
|
$info['users'] = $query->limit(3)->get();
|
|
|
-
|
|
|
}
|
|
|
|
|
|
RedisService::set($cacheKey, $info, rand(10, 20));
|
|
|
@@ -398,7 +396,7 @@ class MemberService extends BaseService
|
|
|
}
|
|
|
|
|
|
$info = $this->model->where(['id' => $userId, 'mark' => 1])
|
|
|
- ->select(['id', 'realname','company','department','position','idcard','bank_name','bank_card','bank_branch','is_auth', 'status'])
|
|
|
+ ->select(['id', 'realname','idcard','bank_name','bank_card','bank_branch','is_auth', 'status'])
|
|
|
->first();
|
|
|
$info = $info?$info->toArray() : [];
|
|
|
if($info){
|