作者 lyh

gx

... ... @@ -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); // 排名数据更新任务
... ...
... ... @@ -29,6 +29,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 +40,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
... ...