作者 Your Name
@@ -5,7 +5,6 @@ namespace App\Console\Commands\Update; @@ -5,7 +5,6 @@ namespace App\Console\Commands\Update;
5 use App\Helper\Arr; 5 use App\Helper\Arr;
6 use App\Http\Logic\Bside\News\NewsLogic; 6 use App\Http\Logic\Bside\News\NewsLogic;
7 use App\Http\Logic\Bside\Product\CategoryLogic; 7 use App\Http\Logic\Bside\Product\CategoryLogic;
8 -use App\Jobs\SyncImageFileJob;  
9 use App\Models\Blog\Blog; 8 use App\Models\Blog\Blog;
10 use App\Models\Collect\CollectSource; 9 use App\Models\Collect\CollectSource;
11 use App\Models\Collect\CollectTask; 10 use App\Models\Collect\CollectTask;
@@ -16,6 +15,7 @@ use App\Models\CustomModule\CustomModuleCategory; @@ -16,6 +15,7 @@ use App\Models\CustomModule\CustomModuleCategory;
16 use App\Models\CustomModule\CustomModuleContent; 15 use App\Models\CustomModule\CustomModuleContent;
17 use App\Models\CustomModule\CustomModuleExtend; 16 use App\Models\CustomModule\CustomModuleExtend;
18 use App\Models\CustomModule\CustomModuleExtentContent; 17 use App\Models\CustomModule\CustomModuleExtentContent;
  18 +use App\Models\File\ErrorFile;
19 use App\Models\News\News; 19 use App\Models\News\News;
20 use App\Models\News\NewsCategory; 20 use App\Models\News\NewsCategory;
21 use App\Models\Product\Category; 21 use App\Models\Product\Category;
@@ -1064,8 +1064,14 @@ class ProjectUpdate extends Command @@ -1064,8 +1064,14 @@ class ProjectUpdate extends Command
1064 ]); 1064 ]);
1065 1065
1066 //同步到177 1066 //同步到177
1067 - $new_url_name = basename($new_url);  
1068 - SyncImageFileJob::dispatch(['path' => str_replace('/' . $new_url_name, '', $new_url), 'name' => $new_url_name, 'location' => 0]); 1067 + $error_file = ErrorFile::where('path',$new_url)->first();
  1068 + if(!$error_file){
  1069 + $error_file = new ErrorFile();
  1070 + $error_file->path = $new_url;
  1071 + $error_file->status = 0;
  1072 + $error_file->save();
  1073 + }
  1074 +
1069 return getImageUrl($new_url); 1075 return getImageUrl($new_url);
1070 } else { 1076 } else {
1071 return $url_complete; 1077 return $url_complete;
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :CommentController.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2024/9/9 15:01
  8 + */
  9 +
  10 +namespace App\Http\Controllers\Bside\Comment;
  11 +
  12 +use App\Enums\Common\Code;
  13 +use App\Http\Controllers\Bside\BaseController;
  14 +use App\Models\Comment\Comment;
  15 +
  16 +class CommentController extends BaseController
  17 +{
  18 + /**
  19 + * @remark :評論列表
  20 + * @name :lists
  21 + * @author :lyh
  22 + * @method :post
  23 + * @time :2024/9/9 15:02
  24 + */
  25 + public function lists(){
  26 + $commentModel = new Comment();
  27 + $lists = $commentModel->list();
  28 + $this->response('success',Code::SUCCESS,$lists);
  29 + }
  30 +
  31 + /**
  32 + * @remark :获取详情
  33 + * @name :info
  34 + * @author :lyh
  35 + * @method :post
  36 + * @time :2024/9/9 17:13
  37 + */
  38 + public function info(){
  39 + $this->request->validate([
  40 + 'id' => 'required',
  41 + ], [
  42 + 'id.required' => '主鍵不能为空',
  43 + ]);
  44 + $commentModel = new Comment();
  45 + $info = $commentModel->read(['id'=>$this->param['id']]);
  46 + $this->response('success',Code::SUCCESS,$info);
  47 + }
  48 +
  49 + /**
  50 + * @remark :修改審核狀態
  51 + * @name :status
  52 + * @author :lyh
  53 + * @method :post
  54 + * @time :2024/9/9 15:02
  55 + */
  56 + public function status(){
  57 + $this->request->validate([
  58 + 'id' => 'required',
  59 + 'status'=>'required',
  60 + ], [
  61 + 'id.required' => '主鍵不能为空',
  62 + 'status.required' => '审核状态不能为空',
  63 + ]);
  64 + $commentModel = new Comment();
  65 + $commentModel->edit(['status'=>$this->param['status']],['id'=>$this->param['id']]);
  66 + $this->response('success');
  67 + }
  68 +}
@@ -211,6 +211,8 @@ class ExtensionModuleController extends BaseController @@ -211,6 +211,8 @@ class ExtensionModuleController extends BaseController
211 $number++; 211 $number++;
212 } 212 }
213 if(($status_data[$info['value']] + 1) != $status_data[$v['value']]){ 213 if(($status_data[$info['value']] + 1) != $status_data[$v['value']]){
  214 + @file_put_contents(storage_path('logs/lyh_error.log'), var_export($status_data[$info['value']], true) . PHP_EOL, FILE_APPEND);
  215 + @file_put_contents(storage_path('logs/lyh_error.log'), var_export($status_data[$v['value']], true) . PHP_EOL, FILE_APPEND);
214 $this->fail('流程控制不能跳流程选择'); 216 $this->fail('流程控制不能跳流程选择');
215 } 217 }
216 if($status_data[$info['value']] > $status_data[$v['value']]){ 218 if($status_data[$info['value']] > $status_data[$v['value']]){
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :Comment.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2024/9/9 14:53
  8 + */
  9 +
  10 +namespace App\Models\Comment;
  11 +
  12 +use App\Models\Base;
  13 +
  14 +/**
  15 + * @remark :評論
  16 + * @name :Comment
  17 + * @author :lyh
  18 + * @method :post
  19 + * @time :2024/9/9 14:54
  20 + */
  21 +class Comment extends Base
  22 +{
  23 + protected $table = 'gl_comment';
  24 + //连接数据库
  25 + protected $connection = 'custom_mysql';
  26 +}