作者 李宇航

合并分支 'master-lyh-edit' 到 'master'

热门模块开发+视频任务搜索修改



查看合并请求 !605
... ... @@ -16,8 +16,8 @@ class Kernel extends ConsoleKernel
protected function schedule(Schedule $schedule)
{
// 每日更新最新模块
// $schedule->command('template_label')->dailyAt('01:00')->withoutOverlapping(1);//最新模块
// $schedule->command('popular_template_label')->dailyAt('01:30')->withoutOverlapping(1);//热门模块
$schedule->command('template_label')->dailyAt('01:00')->withoutOverlapping(1);//最新模块
$schedule->command('popular_template_label')->dailyAt('01:30')->withoutOverlapping(1);//热门模块
// $schedule->command('inspire')->hourly();
$schedule->command('remain_day')->dailyAt('09:00')->withoutOverlapping(1); // 项目剩余服务时长
$schedule->command('rank_data_task')->everyMinute()->withoutOverlapping(1); // 排名数据更新任务
... ...
... ... @@ -60,7 +60,7 @@ class KeywordVideoController extends BaseController
* @time :2023/8/18 10:58
*/
public function searchParam(&$query){
if(isset($this->map['title']) && is_array($this->map['title'])){
if(isset($this->map['title'])){
$query->where('gl_project.title','like','%'.$this->map['title'].'%');
}
if(isset($this->map['status'])){
... ...
... ... @@ -32,10 +32,8 @@ class BTemplateLabelController extends BaseController
*/
public function getUserLists(TemplateLabel $templateLabel){
$this->request->validate([
'template_id'=>'required',
'type'=>'required',
],[
'template_id.required' => '模版id不能为空',
'type.required' => '模版类型不能为空不能为空',
]);
$data = $templateLabel->list($this->map);
... ...
... ... @@ -8,6 +8,7 @@ use App\Http\Logic\Bside\BTemplate\BTemplateModuleLogic;
use App\Http\Logic\Bside\BTemplate\BTemplateModuleProjectLogic;
use App\Models\Template\BModuleProject;
use App\Models\Template\TemplateLabel;
use App\Models\Template\TemplateModule;
/**
* @remark :左侧模块管理
... ... @@ -29,6 +30,8 @@ class BTemplateModuleController extends BaseController
$this->map['test_model'] = ['in',[0,1]];
$this->map['project_id'] = 0;
}
$templateLabel = new TemplateLabel();
$this->searchLabelName($templateLabel);
$data = [];
$list = $bTemplateModuleLogic->ModuleList($this->map,$this->order);
$data['list'] = $list;
... ... @@ -38,6 +41,22 @@ class BTemplateModuleController extends BaseController
}
/**
* @remark :搜索label
* @name :searchLabelName
* @author :lyh
* @method :post
* @time :2024/6/3 11:11
*/
public function searchLabelName($templateLabel){
if(isset($this->map['label_name']) && !empty($this->map['label_name'])){
$id_arr = $templateLabel->formatQuery(['name'=>['like','%'.$this->map['label_name'].'%'],'type'=>2])->pluck('template_id')->toArray();
$this->map['id'] = ['in',$id_arr];
unset($this->map['label_name']);
}
return true;
}
/**
* @remark :获取详情
* @name :read
* @author :lyh
... ... @@ -77,7 +96,8 @@ class BTemplateModuleController extends BaseController
],[
'id.required' => 'id不能为空',
]);
$this->model->where('id', $this->param['id'])->increment('number');
$moduleModel = new TemplateModule();
$moduleModel->where('id', $this->param['id'])->increment('number');
$this->response('success');
}
}
... ...
... ... @@ -9,7 +9,7 @@
namespace App\Http\Logic\Bside\BTemplate;
use App\Http\Logic\Aside\BaseLogic;
use App\Http\Logic\Bside\BaseLogic;
use App\Models\Template\TemplateLabel;
/**
... ... @@ -49,7 +49,7 @@ class BTemplateLabelLogic extends BaseLogic
}else{
$info = $this->model->read(['name'=>$this->param['name'],'template_id'=>$this->param['template_id']],['id']);
if($info === false){
$this->param['manager_id'] = $this->manager['id'];
$this->param['manager_id'] = $this->user['manager_id'] ?? 0;
$id = $this->model->addReturnId($this->param);
}else{
$id = $info['id'];
... ...