作者 lyh

gx分享数据

@@ -54,38 +54,38 @@ class Demo extends Command @@ -54,38 +54,38 @@ class Demo extends Command
54 */ 54 */
55 protected $description = 'demo'; 55 protected $description = 'demo';
56 56
57 -// public function handle(){  
58 -// $projectModel = new Project();  
59 -// $list = $projectModel->list(['id'=>1462]);  
60 -// foreach ($list as $v){  
61 -// echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL;  
62 -// ProjectServer::useProject($v['id']);  
63 -// $blogModel = new Blog();  
64 -// $blogList = $blogModel->list(['status'=>1],'id',['*'],'asc');  
65 -// foreach ($blogList as $blogV){  
66 -// $customContentModel = new CustomModuleContent();  
67 -// $id = $customContentModel->addReturnId([  
68 -// 'name'=>$blogV['name'],  
69 -// 'status'=>0,  
70 -// 'sort'=>$blogV['sort'],  
71 -// 'remark'=>$blogV['remark'],  
72 -// 'route'=>$blogV['url'],  
73 -// 'image'=>$blogV['image'],  
74 -// 'seo_title'=>$blogV['seo_title'],  
75 -// 'seo_keywords'=>$blogV['seo_keywords'],  
76 -// 'seo_description'=>$blogV['seo_description'],  
77 -// 'project_id'=>$blogV['project_id'],  
78 -// 'created_at'=>$blogV['created_at'],  
79 -// 'updated_at'=>$blogV['updated_at'],  
80 -// 'module_id'=>8,  
81 -// 'video'=>null,  
82 -// 'release_at'=>$blogV['release_at'],  
83 -// 'operator_id'=>$blogV['operator_id']  
84 -// ]);  
85 -// RouteMap::setRoute($blogV['url'],RouteMap::SOURCE_MODULE,$id,1462);  
86 -// }  
87 -// DB::disconnect('custom_mysql');  
88 -// }  
89 -// } 57 + public function handle(){
  58 + $projectModel = new Project();
  59 + $list = $projectModel->list(['id'=>1462]);
  60 + foreach ($list as $v){
  61 + echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL;
  62 + ProjectServer::useProject($v['id']);
  63 + $blogModel = new Blog();
  64 + $blogList = $blogModel->list(['status'=>0],'id',['*'],'asc');
  65 + foreach ($blogList as $blogV){
  66 + $customContentModel = new CustomModuleContent();
  67 + $id = $customContentModel->addReturnId([
  68 + 'name'=>$blogV['name'],
  69 + 'status'=>0,
  70 + 'sort'=>$blogV['sort'],
  71 + 'remark'=>$blogV['remark'],
  72 + 'route'=>$blogV['url'],
  73 + 'image'=>$blogV['image'],
  74 + 'seo_title'=>$blogV['seo_title'],
  75 + 'seo_keywords'=>$blogV['seo_keywords'],
  76 + 'seo_description'=>$blogV['seo_description'],
  77 + 'project_id'=>$blogV['project_id'],
  78 + 'created_at'=>$blogV['created_at'],
  79 + 'updated_at'=>$blogV['updated_at'],
  80 + 'module_id'=>8,
  81 + 'video'=>null,
  82 + 'release_at'=>$blogV['release_at'],
  83 + 'operator_id'=>$blogV['operator_id']
  84 + ]);
  85 + RouteMap::setRoute($blogV['url'],RouteMap::SOURCE_MODULE,$id,1462);
  86 + }
  87 + DB::disconnect('custom_mysql');
  88 + }
  89 + }
90 90
91 } 91 }
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :InquiryField.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2024/8/13 9:57
  8 + */
  9 +
  10 +namespace App\Models\Inquiry;
  11 +
  12 +use App\Models\Base;
  13 +
  14 +class InquiryField extends Base
  15 +{
  16 + protected $connection = "custom_mysql";
  17 + protected $table = 'gl_inquiry_field';
  18 +}