|
@@ -163,7 +163,7 @@ class ProjectLogic extends BaseLogic |
|
@@ -163,7 +163,7 @@ class ProjectLogic extends BaseLogic |
|
163
|
$this->setTypeSevenEdit($this->param);
|
163
|
$this->setTypeSevenEdit($this->param);
|
|
164
|
}else{
|
164
|
}else{
|
|
165
|
//初始化项目
|
165
|
//初始化项目
|
|
166
|
- $this->createProjectData($this->param);
|
166
|
+ $this->param = $this->createProjectData($this->param);
|
|
167
|
//双向绑定服务器,需放到保存项目的上方
|
167
|
//双向绑定服务器,需放到保存项目的上方
|
|
168
|
$this->setServers($this->param['serve_id'],$this->param['id']);
|
168
|
$this->setServers($this->param['serve_id'],$this->param['id']);
|
|
169
|
//ai_blog
|
169
|
//ai_blog
|
|
@@ -196,32 +196,6 @@ class ProjectLogic extends BaseLogic |
|
@@ -196,32 +196,6 @@ class ProjectLogic extends BaseLogic |
|
196
|
}
|
196
|
}
|
|
197
|
|
197
|
|
|
198
|
/**
|
198
|
/**
|
|
199
|
- * @remark :开启推荐供应商设置
|
|
|
|
200
|
- * @name :isPurchaser
|
|
|
|
201
|
- * @author :lyh
|
|
|
|
202
|
- * @method :post
|
|
|
|
203
|
- * @time :2025/3/10 15:33
|
|
|
|
204
|
- */
|
|
|
|
205
|
- public function isPurchaser($project_id){
|
|
|
|
206
|
- if($this->param['type'] == Project::TYPE_TWO){
|
|
|
|
207
|
- if(empty($this->param['uptime'])){
|
|
|
|
208
|
- $this->param['deploy_build']['is_supplier'] = 1;
|
|
|
|
209
|
- }else{
|
|
|
|
210
|
- //获取项目的上线时间
|
|
|
|
211
|
- $projectInfo = $this->model->read(['id'=>$project_id],['uptime']);
|
|
|
|
212
|
- //查看上线时间是否大于3天
|
|
|
|
213
|
- $threeDaysAgo = date('Y-m-d H:i:s', strtotime('-3 days'));
|
|
|
|
214
|
- if($projectInfo['uptime'] > $threeDaysAgo){
|
|
|
|
215
|
- //上线时间大于当前时间的3天钱,默认不允许关闭推荐供应商
|
|
|
|
216
|
- $this->param['deploy_build']['is_supplier'] = 1;
|
|
|
|
217
|
- }
|
|
|
|
218
|
- }
|
|
|
|
219
|
- return true;
|
|
|
|
220
|
- }
|
|
|
|
221
|
-
|
|
|
|
222
|
- }
|
|
|
|
223
|
-
|
|
|
|
224
|
- /**
|
|
|
|
225
|
* @remark :开启AI博客后
|
199
|
* @remark :开启AI博客后
|
|
226
|
* @name :setAiBlog
|
200
|
* @name :setAiBlog
|
|
227
|
* @author :lyh
|
201
|
* @author :lyh
|
|
@@ -350,8 +324,19 @@ class ProjectLogic extends BaseLogic |
|
@@ -350,8 +324,19 @@ class ProjectLogic extends BaseLogic |
|
350
|
* @time :2023/8/30 12:14
|
324
|
* @time :2023/8/30 12:14
|
|
351
|
*/
|
325
|
*/
|
|
352
|
public function saveProject($param){
|
326
|
public function saveProject($param){
|
|
353
|
- if((($param['type'] == Project::TYPE_TWO) || ($param['type'] == Project::TYPE_THREE)) && empty($param['uptime'])){
|
327
|
+ if((($param['type'] == Project::TYPE_TWO) || ($param['type'] == Project::TYPE_THREE))){
|
|
|
|
328
|
+ //自动开启推荐供应商
|
|
|
|
329
|
+ if(empty($param['uptime'])){
|
|
|
|
330
|
+ $this->param['deploy_build']['is_supplier'] = 1;
|
|
354
|
$param['uptime'] = date('Y-m-d H:i:s');
|
331
|
$param['uptime'] = date('Y-m-d H:i:s');
|
|
|
|
332
|
+ }else{
|
|
|
|
333
|
+ //查看上线时间是否大于3天
|
|
|
|
334
|
+ $threeDaysAgo = date('Y-m-d H:i:s', strtotime('-3 days'));
|
|
|
|
335
|
+ if($param['uptime'] > $threeDaysAgo){
|
|
|
|
336
|
+ //上线时间大于当前时间的3天钱,默认不允许关闭推荐供应商
|
|
|
|
337
|
+ $this->param['deploy_build']['is_supplier'] = 1;
|
|
|
|
338
|
+ }
|
|
|
|
339
|
+ }
|
|
355
|
}
|
340
|
}
|
|
356
|
if($param['type'] == Project::TYPE_FIVE){
|
341
|
if($param['type'] == Project::TYPE_FIVE){
|
|
357
|
$param['extend_type'] = Project::TYPE_FIVE;
|
342
|
$param['extend_type'] = Project::TYPE_FIVE;
|
|
@@ -603,7 +588,7 @@ class ProjectLogic extends BaseLogic |
|
@@ -603,7 +588,7 @@ class ProjectLogic extends BaseLogic |
|
603
|
//改为异步
|
588
|
//改为异步
|
|
604
|
NoticeLog::createLog(NoticeLog::TYPE_INIT_PROJECT, ['project_id' => $param['id']]);
|
589
|
NoticeLog::createLog(NoticeLog::TYPE_INIT_PROJECT, ['project_id' => $param['id']]);
|
|
605
|
}
|
590
|
}
|
|
606
|
- return $this->success();
|
591
|
+ return $this->success($param);
|
|
607
|
}
|
592
|
}
|
|
608
|
|
593
|
|
|
609
|
/**
|
594
|
/**
|