Merge branch 'master-lyh-edit' of http://47.244.231.31:8099/zhl/globalso-v6
正在显示
3 个修改的文件
包含
7 行增加
和
2 行删除
| @@ -156,9 +156,11 @@ class ReplaceHtml extends Command | @@ -156,9 +156,11 @@ class ReplaceHtml extends Command | ||
| 156 | foreach ($bTemplateList as $v){ | 156 | foreach ($bTemplateList as $v){ |
| 157 | $source_id = $v['source'] == 1 ? 0 : $v['source_id']; | 157 | $source_id = $v['source'] == 1 ? 0 : $v['source_id']; |
| 158 | $name_route = $this->getSourceName($v['source'],$source_id,$v['is_list'],$v['is_custom']); | 158 | $name_route = $this->getSourceName($v['source'],$source_id,$v['is_list'],$v['is_custom']); |
| 159 | + if($name_route !== false){ | ||
| 159 | $saveData[] = $this->saveData($info,$v,$source_id,$name_route); | 160 | $saveData[] = $this->saveData($info,$v,$source_id,$name_route); |
| 160 | } | 161 | } |
| 161 | } | 162 | } |
| 163 | + } | ||
| 162 | if(!empty($saveData)){ | 164 | if(!empty($saveData)){ |
| 163 | $templateHtmlLogModel = new TemplateReplaceHtmlLog(); | 165 | $templateHtmlLogModel = new TemplateReplaceHtmlLog(); |
| 164 | $templateHtmlLogModel->insert($saveData); | 166 | $templateHtmlLogModel->insert($saveData); |
| @@ -205,7 +207,7 @@ class ReplaceHtml extends Command | @@ -205,7 +207,7 @@ class ReplaceHtml extends Command | ||
| 205 | return $this->getCustomName($source,$source_id,$is_list); | 207 | return $this->getCustomName($source,$source_id,$is_list); |
| 206 | } | 208 | } |
| 207 | if($source == BTemplate::SOURCE_HOME){ | 209 | if($source == BTemplate::SOURCE_HOME){ |
| 208 | - return ''; | 210 | + return ['name'=>'','route'=>''];; |
| 209 | }elseif ($source == BTemplate::SOURCE_PRODUCT){ | 211 | }elseif ($source == BTemplate::SOURCE_PRODUCT){ |
| 210 | return $this->getProductName($source_id,$is_list); | 212 | return $this->getProductName($source_id,$is_list); |
| 211 | }elseif ($source == BTemplate::SOURCE_BLOG){ | 213 | }elseif ($source == BTemplate::SOURCE_BLOG){ |
| @@ -688,7 +688,7 @@ class ProjectLogic extends BaseLogic | @@ -688,7 +688,7 @@ class ProjectLogic extends BaseLogic | ||
| 688 | */ | 688 | */ |
| 689 | public function copyProject(){ | 689 | public function copyProject(){ |
| 690 | CopyProjectJob::dispatch(['project_id'=>$this->param['project_id']]); | 690 | CopyProjectJob::dispatch(['project_id'=>$this->param['project_id']]); |
| 691 | - return $this->success(); | 691 | + return $this->success('项目复制中,请稍后前往初始化项目查看;'); |
| 692 | } | 692 | } |
| 693 | 693 | ||
| 694 | /** | 694 | /** |
| @@ -60,6 +60,7 @@ class CopyProjectJob implements ShouldQueue | @@ -60,6 +60,7 @@ class CopyProjectJob implements ShouldQueue | ||
| 60 | $data['status'] = 0; | 60 | $data['status'] = 0; |
| 61 | $data['finish_remain_day'] = 0; | 61 | $data['finish_remain_day'] = 0; |
| 62 | $data['title'] = $data['title'].'-copy'; | 62 | $data['title'] = $data['title'].'-copy'; |
| 63 | + $data['delete_status'] = 1; | ||
| 63 | unset($data['id']); | 64 | unset($data['id']); |
| 64 | $project_id = $projectModel->insertGetId($data); | 65 | $project_id = $projectModel->insertGetId($data); |
| 65 | $hashids = new Hashids($data['from_order_id'], 13, 'abcdefghjkmnpqrstuvwxyz1234567890'); | 66 | $hashids = new Hashids($data['from_order_id'], 13, 'abcdefghjkmnpqrstuvwxyz1234567890'); |
| @@ -131,6 +132,8 @@ class CopyProjectJob implements ShouldQueue | @@ -131,6 +132,8 @@ class CopyProjectJob implements ShouldQueue | ||
| 131 | if($type != 0){ | 132 | if($type != 0){ |
| 132 | $this->copyMysql($this->param['project_id'],$project_id); | 133 | $this->copyMysql($this->param['project_id'],$project_id); |
| 133 | } | 134 | } |
| 135 | + //修改项目状态 | ||
| 136 | + $projectModel->edit(['delete_status'=>0],['id'=>$project_id]); | ||
| 134 | return true; | 137 | return true; |
| 135 | } | 138 | } |
| 136 | 139 |
-
请 注册 或 登录 后发表评论