正在显示
1 个修改的文件
包含
3 行增加
和
2 行删除
| @@ -616,8 +616,9 @@ class ProjectLogic extends BaseLogic | @@ -616,8 +616,9 @@ class ProjectLogic extends BaseLogic | ||
| 616 | DB::connection('custom_mysql')->table($table)->truncate(); // 清空目标表数据 | 616 | DB::connection('custom_mysql')->table($table)->truncate(); // 清空目标表数据 |
| 617 | DB::connection('custom_mysql')->table($table)->insertUsing( | 617 | DB::connection('custom_mysql')->table($table)->insertUsing( |
| 618 | [], // 列名数组,留空表示插入所有列 | 618 | [], // 列名数组,留空表示插入所有列 |
| 619 | - function ($query) use ($table) { | ||
| 620 | - $query->select('*')->from("custom_tmp_mysql_copy.{$table}"); | 619 | + function ($query) use ($table,$project_id) { |
| 620 | + $name = 'gl_data_'.$project_id.'.'.$table; | ||
| 621 | + $query->select('*')->from("{$name}"); | ||
| 621 | } | 622 | } |
| 622 | ); | 623 | ); |
| 623 | if (Schema::connection('custom_mysql')->hasColumn($table, 'project_id')) { | 624 | if (Schema::connection('custom_mysql')->hasColumn($table, 'project_id')) { |
-
请 注册 或 登录 后发表评论