|
|
@@ -307,7 +307,7 @@ class MemberService extends BaseService
|
|
|
return $info;
|
|
|
}
|
|
|
|
|
|
- $defaultField = ['id', 'user_type', 'realname', 'mobile', 'nickname','balance', 'code', 'openid', 'status', 'avatar'];
|
|
|
+ $defaultField = ['id', 'user_type', 'realname', 'mobile', 'nickname','is_zg_vip','zg_vip_expired','is_zsb_vip','is_zsb_vip','zsb_vip_expired','is_video','video_vip_expired','balance', 'code', 'openid', 'status', 'avatar'];
|
|
|
$field = $field ? $field : $defaultField;
|
|
|
if (is_array($where)) {
|
|
|
$info = $this->model->where(['mark' => 1])->where($where)->select($field)->first();
|
|
|
@@ -329,6 +329,23 @@ class MemberService extends BaseService
|
|
|
$info['create_at'] = datetime(strtotime($info['create_time']));
|
|
|
}
|
|
|
|
|
|
+ $idVip = 0;
|
|
|
+ $vipExpired = '';
|
|
|
+ $isZgVip = isset($info['is_zg_vip'])? $info['is_zg_vip'] : 0;
|
|
|
+ $zgVipExpired = isset($info['zg_vip_expired']) && $info['zg_vip_expired']? $info['zg_vip_expired'] : '';
|
|
|
+ if($isZgVip && $zgVipExpired && $zgVipExpired>date('Y-m-d H:i:s')){
|
|
|
+ $idVip = 1;
|
|
|
+ $vipExpired = $zgVipExpired;
|
|
|
+ }
|
|
|
+
|
|
|
+ $isZsbVip = isset($info['is_zsb_vip'])? $info['is_zsb_vip'] : 0;
|
|
|
+ $zsbVipExpired = isset($info['zsb_vip_expired']) && $info['zsb_vip_expired']? $info['zsb_vip_expired'] : '';
|
|
|
+ if($isZsbVip && $zsbVipExpired && $zgVipExpired>date('Y-m-d H:i:s')){
|
|
|
+ $idVip = 1;
|
|
|
+ $vipExpired = $zsbVipExpired>$vipExpired? $zsbVipExpired : $vipExpired;
|
|
|
+ }
|
|
|
+ $info['is_vip'] = $idVip;
|
|
|
+ $info['vip_expired'] = $vipExpired;
|
|
|
RedisService::set($cacheKey, $info, rand(10, 20));
|
|
|
}
|
|
|
|