正在显示
2 个修改的文件
包含
6 行增加
和
5 行删除
| @@ -120,7 +120,7 @@ class Demo extends Command | @@ -120,7 +120,7 @@ class Demo extends Command | ||
| 120 | DB::connection('custom_mysql')->statement(array_values((array)$sql[0])[0]); // 修正此处的sql语句获取方式 | 120 | DB::connection('custom_mysql')->statement(array_values((array)$sql[0])[0]); // 修正此处的sql语句获取方式 |
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | - if ($table == 'gl_web_template_c' || $table == 'gl_customer_visit' || $table == 'gl_customer_visit_item' || $table == 'gl_inquiry_other' || $table == 'gl_inquiry_form_data' || $table == 'gl_inquiry_form') { | 123 | + if ($table == 'gl_customer_visit' || $table == 'gl_customer_visit_item' || $table == 'gl_inquiry_other' || $table == 'gl_inquiry_form_data' || $table == 'gl_inquiry_form') { |
| 124 | continue; | 124 | continue; |
| 125 | } | 125 | } |
| 126 | DB::connection('custom_mysql')->table($table)->truncate(); // 清空目标表数据 | 126 | DB::connection('custom_mysql')->table($table)->truncate(); // 清空目标表数据 |
| @@ -69,10 +69,11 @@ class CopyProjectJob implements ShouldQueue | @@ -69,10 +69,11 @@ class CopyProjectJob implements ShouldQueue | ||
| 69 | $settingTemplateModel = new Setting(); | 69 | $settingTemplateModel = new Setting(); |
| 70 | $settingData = $settingTemplateModel::where('project_id', $this->param['project_id'])->first(); | 70 | $settingData = $settingTemplateModel::where('project_id', $this->param['project_id'])->first(); |
| 71 | if(!empty($settingData)){ | 71 | if(!empty($settingData)){ |
| 72 | - $settingData = $settingData->getAttributes(); | ||
| 73 | - unset($settingData['id']); | ||
| 74 | - $settingData['project_id'] = $project_id; | ||
| 75 | - $settingTemplateModel->insert($settingData); | 72 | + $data = [ |
| 73 | + 'template_id' =>$settingData['template_id'], | ||
| 74 | + 'project_id' => $project_id | ||
| 75 | + ]; | ||
| 76 | + $settingTemplateModel->add($data); | ||
| 76 | } | 77 | } |
| 77 | //复制部署表 | 78 | //复制部署表 |
| 78 | $buildModel = new DeployBuild(); | 79 | $buildModel = new DeployBuild(); |
-
请 注册 或 登录 后发表评论