|
@@ -297,12 +297,12 @@ class MemberService extends BaseService
|
|
|
return $info;
|
|
return $info;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $defaultField = ['id', 'user_type', 'realname', 'mobile','idcard_check', 'nickname', 'balance', 'code', 'openid','create_time', 'status', 'avatar'];
|
|
|
|
|
|
|
+ $defaultField = ['id', 'user_type', 'realname', 'mobile','idcard_check', 'nickname','company','position','department', 'balance', 'code', 'openid','create_time', 'status', 'avatar'];
|
|
|
$field = $field ? $field : $defaultField;
|
|
$field = $field ? $field : $defaultField;
|
|
|
if (is_array($where)) {
|
|
if (is_array($where)) {
|
|
|
- $info = $this->model->where(['mark' => 1])->where($where)->select($field)->first();
|
|
|
|
|
|
|
+ $info = $this->model->with(['account'])->where(['mark' => 1])->where($where)->select($field)->first();
|
|
|
} else {
|
|
} else {
|
|
|
- $info = $this->model->where(['mark' => 1])->where(['id' => (int)$where])->select($field)->first();
|
|
|
|
|
|
|
+ $info = $this->model->with(['account'])->where(['mark' => 1])->where(['id' => (int)$where])->select($field)->first();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$info = $info ? $info->toArray() : [];
|
|
$info = $info ? $info->toArray() : [];
|
|
@@ -502,7 +502,7 @@ class MemberService extends BaseService
|
|
|
// 用户验证
|
|
// 用户验证
|
|
|
RedisService::set($cacheLockKey, ['user_id' => $userId, 'params' => $params], rand(2, 3));
|
|
RedisService::set($cacheLockKey, ['user_id' => $userId, 'params' => $params], rand(2, 3));
|
|
|
$info = $this->model->where(['id' => $userId, 'mark' => 1])
|
|
$info = $this->model->where(['id' => $userId, 'mark' => 1])
|
|
|
- ->select(['id', 'nickname','avatar', 'status'])
|
|
|
|
|
|
|
+ ->select(['id', 'nickname','avatar','company','position','department', 'status'])
|
|
|
->first();
|
|
->first();
|
|
|
if (!$info || $info['status'] != 1) {
|
|
if (!$info || $info['status'] != 1) {
|
|
|
$this->error = 2016;
|
|
$this->error = 2016;
|