作者 lyh

ggx

... ... @@ -55,9 +55,8 @@ class ProjectController extends BaseController
->leftJoin('gl_project_deploy_optimize', 'gl_project.id', '=', 'gl_project_deploy_optimize.project_id')
->leftJoin('gl_project_online_check', 'gl_project.id', '=', 'gl_project_online_check.project_id');
$query = $this->searchParam($query);
$lists = $query->orderBy('gl_project.id', 'desc')->paginate($this->row, $this->selectParam(), 'page', $this->page);
$lists = $query->orderBy('gl_project.id', 'desc')->paginate($this->row, $this->selectParam(), 'page', $this->page)->toArray();
if(!empty($lists) && !empty($lists['list'])){
$lists = $lists->toArray();
foreach ($lists['list'] as $k => $v){
$v = $this->handleParam($v);
$lists['list'][$k] = $v;
... ...
<?php
/**
* @remark :
* @name :CNoticeController.php
* @author :lyh
* @method :post
* @time :2023/9/12 10:04
*/
namespace App\Http\Controllers\Bside\BCom;
use App\Enums\Common\Code;
use App\Http\Controllers\Bside\BaseController;
use App\Http\Logic\Bside\Setting\WebSettingLogic;
use App\Models\Com\UpdateNotify;
use Illuminate\Http\Request;
class CNoticeController extends BaseController
{
/**
* 更新通知C端
* @param Request $request
* @param WebSettingLogic $webSettingLogic
*/
public function sendNotify(WebSettingLogic $webSettingLogic){
$type = $this->request->input('type', UpdateNotify::TYPE_MASTER);
if (FALSE == in_array($type, [UpdateNotify::TYPE_MASTER, UpdateNotify::TYPE_MINOR])){
$this->response('非法参数!', Code::USER_ERROR);
}
$page = $this->request->input('page', UpdateNotify::PAGE_ALL);
if (FALSE == in_array($type, [UpdateNotify::PAGE_ALL, UpdateNotify::PAGE_SINGLE])){
$this->response('非法参数!', Code::USER_ERROR);
}
$list = $webSettingLogic->sendNotifyMessage($type,$page);
if(!empty($list)){
$this->response('当前页面正在生成了,请完成后再点击',Code::USER_ERROR,$list);
}
$this->response('success');
}
}
... ...
... ... @@ -35,24 +35,4 @@ class WebSettingController extends BaseController
$this->response('success');
}
/**
* 更新通知C端
* @param Request $request
* @param WebSettingLogic $webSettingLogic
*/
public function sendNotify(WebSettingLogic $webSettingLogic){
$type = $this->request->input('type', UpdateNotify::TYPE_MASTER);
if (FALSE == in_array($type, [UpdateNotify::TYPE_MASTER, UpdateNotify::TYPE_MINOR])){
$this->response('非法参数!', Code::USER_ERROR);
}
$page = $this->request->input('page', UpdateNotify::PAGE_ALL);
if (FALSE == in_array($type, [UpdateNotify::PAGE_ALL, UpdateNotify::PAGE_SINGLE])){
$this->response('非法参数!', Code::USER_ERROR);
}
$list = $webSettingLogic->sendNotifyMessage($type,$page);
if(!empty($list)){
$this->response('当前页面正在生成了,请完成后再点击',Code::USER_ERROR,$list);
}
$this->response('success');
}
}
... ...
... ... @@ -120,7 +120,8 @@ Route::middleware(['bloginauth'])->group(function () {
//首页设置
Route::any('/', [\App\Http\Controllers\Bside\Setting\WebSettingController::class, 'lists'])->name('web_setting_lists');
Route::any('/save', [\App\Http\Controllers\Bside\Setting\WebSettingController::class, 'save'])->name('web_setting_save');
Route::any('/sendNotify', [\App\Http\Controllers\Bside\Setting\WebSettingController::class, 'sendNotify'])->name('web_setting_sendNotify');
//通知
Route::any('/sendNotify', [\App\Http\Controllers\Bside\BCom\CNoticeController::class, 'sendNotify'])->name('web_setting_sendNotify');
//第三方代码获取与设置
Route::prefix('html')->group(function () {
... ...