作者 李宇航

合并分支 'master-server' 到 'master'

续费单设置。



查看合并请求 !862
@@ -94,16 +94,16 @@ class RemainDay extends Command @@ -94,16 +94,16 @@ class RemainDay extends Command
94 } 94 }
95 } 95 }
96 $item->remain_day = ($remain_day > 0 ? $remain_day : 0); 96 $item->remain_day = ($remain_day > 0 ? $remain_day : 0);
97 - if($item->remain_day == 0){  
98 - $item->extend_type = Project::TYPE_FIVE;  
99 - $item->site_status = Project::TYPE_ONE;//关闭站点  
100 - //TODO::未续费网站禁止登录及通知C端禁止网站  
101 - $domainModel = new DomainInfoModel();  
102 - $domainInfos = $domainModel->read(['project_id'=>$item->id]);  
103 - if($domainInfos !== false){  
104 - curl_get('https://'.$domainInfos['domain'].'/api/stop_or_start_website/');  
105 - }  
106 - } 97 +// if($item->remain_day == 0){
  98 +// $item->extend_type = Project::TYPE_FIVE;
  99 +// $item->site_status = Project::TYPE_ONE;//关闭站点
  100 +// //TODO::未续费网站禁止登录及通知C端禁止网站
  101 +// $domainModel = new DomainInfoModel();
  102 +// $domainInfos = $domainModel->read(['project_id'=>$item->id]);
  103 +// if($domainInfos !== false){
  104 +// curl_get('https://'.$domainInfos['domain'].'/api/stop_or_start_website/');
  105 +// }
  106 +// }
107 $item->save(); 107 $item->save();
108 } 108 }
109 } 109 }
@@ -371,6 +371,9 @@ class ProjectController extends BaseController @@ -371,6 +371,9 @@ class ProjectController extends BaseController
371 } 371 }
372 } 372 }
373 } 373 }
  374 + if(!empty($item['extend_type'])){
  375 + $item['type'] = $item['extend_type'];
  376 + }
374 $manageModel = new ManageHr(); 377 $manageModel = new ManageHr();
375 $item['channel'] = Channel::getChannelText($item['channel']['user_id'] ?? 0); 378 $item['channel'] = Channel::getChannelText($item['channel']['user_id'] ?? 0);
376 $item['build_leader'] = $manageModel->getName($item['leader_mid']); 379 $item['build_leader'] = $manageModel->getName($item['leader_mid']);
@@ -68,6 +68,11 @@ class RenewLogic extends BaseLogic @@ -68,6 +68,11 @@ class RenewLogic extends BaseLogic
68 * @time :2023/9/19 10:21 68 * @time :2023/9/19 10:21
69 */ 69 */
70 public function editProjectRenew(){ 70 public function editProjectRenew(){
  71 + if($this->param['renew_id'] == 0){
  72 + $info = [
  73 + 'api_no'=>0,
  74 + ];
  75 + }else{
71 //获取续费单详情 76 //获取续费单详情
72 $info = $this->model->read(['id'=>$this->param['renew_id']]); 77 $info = $this->model->read(['id'=>$this->param['renew_id']]);
73 if($info === false){ 78 if($info === false){
@@ -76,6 +81,7 @@ class RenewLogic extends BaseLogic @@ -76,6 +81,7 @@ class RenewLogic extends BaseLogic
76 if($info['project_id'] != 0){ 81 if($info['project_id'] != 0){
77 $this->fail('当前续费单已关联项目,请重新选择'); 82 $this->fail('当前续费单已关联项目,请重新选择');
78 } 83 }
  84 + }
79 DB::beginTransaction(); 85 DB::beginTransaction();
80 try { 86 try {
81 $this->model->edit(['project_id'=>$this->param['id'],'operator_id'=>$this->manager['id']],['id'=>$this->param['renew_id']]); 87 $this->model->edit(['project_id'=>$this->param['id'],'operator_id'=>$this->manager['id']],['id'=>$this->param['renew_id']]);