作者 lyh

gx

@@ -67,7 +67,6 @@ class InitProject extends Command @@ -67,7 +67,6 @@ class InitProject extends Command
67 if(!empty($project['serve_id'])){ 67 if(!empty($project['serve_id'])){
68 $project_logic->updateServe($project['serve_id']); 68 $project_logic->updateServe($project['serve_id']);
69 } 69 }
70 -  
71 $item->status = NoticeLog::STATUS_SUCCESS; 70 $item->status = NoticeLog::STATUS_SUCCESS;
72 $item->save(); 71 $item->save();
73 echo 'success:' . $item['id'] . PHP_EOL; 72 echo 'success:' . $item['id'] . PHP_EOL;
@@ -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 }