pull/5/head
wanghousheng 4 months ago
parent 0e60d91ba8
commit 2d7ca2b154
  1. 5
      app/store/model/dealer/Apply.php

@ -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);
} }
} }

Loading…
Cancel
Save