|
@@ -120,15 +120,16 @@ class ProjectServer extends BaseService |
|
@@ -120,15 +120,16 @@ class ProjectServer extends BaseService |
|
120
|
* @time :2023/12/29 9:34
|
120
|
* @time :2023/12/29 9:34
|
|
121
|
*/
|
121
|
*/
|
|
122
|
public function initModule($project_id){
|
122
|
public function initModule($project_id){
|
|
123
|
- $moduleModel = new CustomModule();
|
|
|
|
124
|
- $info = $moduleModel->read(['route'=>'video']);
|
|
|
|
125
|
- if($info === false){
|
123
|
+ $info = DB::connection('custom_mysql')->table('gl_custom_module')->first();
|
|
|
|
124
|
+ if(empty($info)){
|
|
126
|
$data = [
|
125
|
$data = [
|
|
127
|
'name'=>'视频模块',
|
126
|
'name'=>'视频模块',
|
|
128
|
'project_id'=>$project_id,
|
127
|
'project_id'=>$project_id,
|
|
129
|
'route'=>'video',
|
128
|
'route'=>'video',
|
|
|
|
129
|
+ 'created_at' => date('Y-m-d H:i:s'),
|
|
|
|
130
|
+ 'updated_at' => date('Y-m-d H:i:s')
|
|
130
|
];
|
131
|
];
|
|
131
|
- $moduleModel->add($data);
|
132
|
+ DB::connection('custom_mysql')->table('gl_custom_module')->insert($data);
|
|
132
|
}
|
133
|
}
|
|
133
|
return true;
|
134
|
return true;
|
|
134
|
}
|
135
|
}
|