作者 Your Name
... ... @@ -5,7 +5,6 @@ namespace App\Console\Commands\Update;
use App\Helper\Arr;
use App\Http\Logic\Bside\News\NewsLogic;
use App\Http\Logic\Bside\Product\CategoryLogic;
use App\Jobs\SyncImageFileJob;
use App\Models\Blog\Blog;
use App\Models\Collect\CollectSource;
use App\Models\Collect\CollectTask;
... ... @@ -16,6 +15,7 @@ use App\Models\CustomModule\CustomModuleCategory;
use App\Models\CustomModule\CustomModuleContent;
use App\Models\CustomModule\CustomModuleExtend;
use App\Models\CustomModule\CustomModuleExtentContent;
use App\Models\File\ErrorFile;
use App\Models\News\News;
use App\Models\News\NewsCategory;
use App\Models\Product\Category;
... ... @@ -1064,8 +1064,14 @@ class ProjectUpdate extends Command
]);
//同步到177
$new_url_name = basename($new_url);
SyncImageFileJob::dispatch(['path' => str_replace('/' . $new_url_name, '', $new_url), 'name' => $new_url_name, 'location' => 0]);
$error_file = ErrorFile::where('path',$new_url)->first();
if(!$error_file){
$error_file = new ErrorFile();
$error_file->path = $new_url;
$error_file->status = 0;
$error_file->save();
}
return getImageUrl($new_url);
} else {
return $url_complete;
... ...
<?php
/**
* @remark :
* @name :CommentController.php
* @author :lyh
* @method :post
* @time :2024/9/9 15:01
*/
namespace App\Http\Controllers\Bside\Comment;
use App\Enums\Common\Code;
use App\Http\Controllers\Bside\BaseController;
use App\Models\Comment\Comment;
class CommentController extends BaseController
{
/**
* @remark :評論列表
* @name :lists
* @author :lyh
* @method :post
* @time :2024/9/9 15:02
*/
public function lists(){
$commentModel = new Comment();
$lists = $commentModel->list();
$this->response('success',Code::SUCCESS,$lists);
}
/**
* @remark :获取详情
* @name :info
* @author :lyh
* @method :post
* @time :2024/9/9 17:13
*/
public function info(){
$this->request->validate([
'id' => 'required',
], [
'id.required' => '主鍵不能为空',
]);
$commentModel = new Comment();
$info = $commentModel->read(['id'=>$this->param['id']]);
$this->response('success',Code::SUCCESS,$info);
}
/**
* @remark :修改審核狀態
* @name :status
* @author :lyh
* @method :post
* @time :2024/9/9 15:02
*/
public function status(){
$this->request->validate([
'id' => 'required',
'status'=>'required',
], [
'id.required' => '主鍵不能为空',
'status.required' => '审核状态不能为空',
]);
$commentModel = new Comment();
$commentModel->edit(['status'=>$this->param['status']],['id'=>$this->param['id']]);
$this->response('success');
}
}
... ...
... ... @@ -211,6 +211,8 @@ class ExtensionModuleController extends BaseController
$number++;
}
if(($status_data[$info['value']] + 1) != $status_data[$v['value']]){
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($status_data[$info['value']], true) . PHP_EOL, FILE_APPEND);
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($status_data[$v['value']], true) . PHP_EOL, FILE_APPEND);
$this->fail('流程控制不能跳流程选择');
}
if($status_data[$info['value']] > $status_data[$v['value']]){
... ...
<?php
/**
* @remark :
* @name :Comment.php
* @author :lyh
* @method :post
* @time :2024/9/9 14:53
*/
namespace App\Models\Comment;
use App\Models\Base;
/**
* @remark :評論
* @name :Comment
* @author :lyh
* @method :post
* @time :2024/9/9 14:54
*/
class Comment extends Base
{
protected $table = 'gl_comment';
//连接数据库
protected $connection = 'custom_mysql';
}
... ...