|
|
@ -97,9 +97,10 @@ class Apply extends ApplyModel |
|
|
|
$info = UserModel::detail(['user_id' => $this['user_id']]); |
|
|
|
$info = UserModel::detail(['user_id' => $this['user_id']]); |
|
|
|
if (!empty($info)) { |
|
|
|
if (!empty($info)) { |
|
|
|
$info = $info->toArray(); |
|
|
|
$info = $info->toArray(); |
|
|
|
if ($info['effective_time'] && strtotime($info['effective_time']) > time() && $info['user_type'] == UserTypeEnum::MEMBER) { |
|
|
|
if ($info['user_type'] == UserTypeEnum::NORMAL) { |
|
|
|
$up['user_type'] = UserTypeEnum::DEALER; |
|
|
|
$up['user_type'] = UserTypeEnum::DEALER; |
|
|
|
$up['fx_effective_time'] = $info['effective_time']; |
|
|
|
$current_date = date('Y-m-d'); // 获取当前日期 |
|
|
|
|
|
|
|
$up['fx_effective_time'] = date('Y-m-d', strtotime('+1 year', strtotime($current_date))); |
|
|
|
$userModel->where(['user_id' => $info['user_id']])->save($up); |
|
|
|
$userModel->where(['user_id' => $info['user_id']])->save($up); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|