合并分支 'master-lyh-edit' 到 'master'
热门模块开发+视频任务搜索修改 查看合并请求 !605
正在显示
5 个修改的文件
包含
26 行增加
和
8 行删除
| @@ -16,8 +16,8 @@ class Kernel extends ConsoleKernel | @@ -16,8 +16,8 @@ class Kernel extends ConsoleKernel | ||
| 16 | protected function schedule(Schedule $schedule) | 16 | protected function schedule(Schedule $schedule) |
| 17 | { | 17 | { |
| 18 | // 每日更新最新模块 | 18 | // 每日更新最新模块 |
| 19 | -// $schedule->command('template_label')->dailyAt('01:00')->withoutOverlapping(1);//最新模块 | ||
| 20 | -// $schedule->command('popular_template_label')->dailyAt('01:30')->withoutOverlapping(1);//热门模块 | 19 | + $schedule->command('template_label')->dailyAt('01:00')->withoutOverlapping(1);//最新模块 |
| 20 | + $schedule->command('popular_template_label')->dailyAt('01:30')->withoutOverlapping(1);//热门模块 | ||
| 21 | // $schedule->command('inspire')->hourly(); | 21 | // $schedule->command('inspire')->hourly(); |
| 22 | $schedule->command('remain_day')->dailyAt('09:00')->withoutOverlapping(1); // 项目剩余服务时长 | 22 | $schedule->command('remain_day')->dailyAt('09:00')->withoutOverlapping(1); // 项目剩余服务时长 |
| 23 | $schedule->command('rank_data_task')->everyMinute()->withoutOverlapping(1); // 排名数据更新任务 | 23 | $schedule->command('rank_data_task')->everyMinute()->withoutOverlapping(1); // 排名数据更新任务 |
| @@ -60,7 +60,7 @@ class KeywordVideoController extends BaseController | @@ -60,7 +60,7 @@ class KeywordVideoController extends BaseController | ||
| 60 | * @time :2023/8/18 10:58 | 60 | * @time :2023/8/18 10:58 |
| 61 | */ | 61 | */ |
| 62 | public function searchParam(&$query){ | 62 | public function searchParam(&$query){ |
| 63 | - if(isset($this->map['title']) && is_array($this->map['title'])){ | 63 | + if(isset($this->map['title'])){ |
| 64 | $query->where('gl_project.title','like','%'.$this->map['title'].'%'); | 64 | $query->where('gl_project.title','like','%'.$this->map['title'].'%'); |
| 65 | } | 65 | } |
| 66 | if(isset($this->map['status'])){ | 66 | if(isset($this->map['status'])){ |
| @@ -32,10 +32,8 @@ class BTemplateLabelController extends BaseController | @@ -32,10 +32,8 @@ class BTemplateLabelController extends BaseController | ||
| 32 | */ | 32 | */ |
| 33 | public function getUserLists(TemplateLabel $templateLabel){ | 33 | public function getUserLists(TemplateLabel $templateLabel){ |
| 34 | $this->request->validate([ | 34 | $this->request->validate([ |
| 35 | - 'template_id'=>'required', | ||
| 36 | 'type'=>'required', | 35 | 'type'=>'required', |
| 37 | ],[ | 36 | ],[ |
| 38 | - 'template_id.required' => '模版id不能为空', | ||
| 39 | 'type.required' => '模版类型不能为空不能为空', | 37 | 'type.required' => '模版类型不能为空不能为空', |
| 40 | ]); | 38 | ]); |
| 41 | $data = $templateLabel->list($this->map); | 39 | $data = $templateLabel->list($this->map); |
| @@ -8,6 +8,7 @@ use App\Http\Logic\Bside\BTemplate\BTemplateModuleLogic; | @@ -8,6 +8,7 @@ use App\Http\Logic\Bside\BTemplate\BTemplateModuleLogic; | ||
| 8 | use App\Http\Logic\Bside\BTemplate\BTemplateModuleProjectLogic; | 8 | use App\Http\Logic\Bside\BTemplate\BTemplateModuleProjectLogic; |
| 9 | use App\Models\Template\BModuleProject; | 9 | use App\Models\Template\BModuleProject; |
| 10 | use App\Models\Template\TemplateLabel; | 10 | use App\Models\Template\TemplateLabel; |
| 11 | +use App\Models\Template\TemplateModule; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * @remark :左侧模块管理 | 14 | * @remark :左侧模块管理 |
| @@ -29,6 +30,8 @@ class BTemplateModuleController extends BaseController | @@ -29,6 +30,8 @@ class BTemplateModuleController extends BaseController | ||
| 29 | $this->map['test_model'] = ['in',[0,1]]; | 30 | $this->map['test_model'] = ['in',[0,1]]; |
| 30 | $this->map['project_id'] = 0; | 31 | $this->map['project_id'] = 0; |
| 31 | } | 32 | } |
| 33 | + $templateLabel = new TemplateLabel(); | ||
| 34 | + $this->searchLabelName($templateLabel); | ||
| 32 | $data = []; | 35 | $data = []; |
| 33 | $list = $bTemplateModuleLogic->ModuleList($this->map,$this->order); | 36 | $list = $bTemplateModuleLogic->ModuleList($this->map,$this->order); |
| 34 | $data['list'] = $list; | 37 | $data['list'] = $list; |
| @@ -38,6 +41,22 @@ class BTemplateModuleController extends BaseController | @@ -38,6 +41,22 @@ class BTemplateModuleController extends BaseController | ||
| 38 | } | 41 | } |
| 39 | 42 | ||
| 40 | /** | 43 | /** |
| 44 | + * @remark :搜索label | ||
| 45 | + * @name :searchLabelName | ||
| 46 | + * @author :lyh | ||
| 47 | + * @method :post | ||
| 48 | + * @time :2024/6/3 11:11 | ||
| 49 | + */ | ||
| 50 | + public function searchLabelName($templateLabel){ | ||
| 51 | + if(isset($this->map['label_name']) && !empty($this->map['label_name'])){ | ||
| 52 | + $id_arr = $templateLabel->formatQuery(['name'=>['like','%'.$this->map['label_name'].'%'],'type'=>2])->pluck('template_id')->toArray(); | ||
| 53 | + $this->map['id'] = ['in',$id_arr]; | ||
| 54 | + unset($this->map['label_name']); | ||
| 55 | + } | ||
| 56 | + return true; | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + /** | ||
| 41 | * @remark :获取详情 | 60 | * @remark :获取详情 |
| 42 | * @name :read | 61 | * @name :read |
| 43 | * @author :lyh | 62 | * @author :lyh |
| @@ -77,7 +96,8 @@ class BTemplateModuleController extends BaseController | @@ -77,7 +96,8 @@ class BTemplateModuleController extends BaseController | ||
| 77 | ],[ | 96 | ],[ |
| 78 | 'id.required' => 'id不能为空', | 97 | 'id.required' => 'id不能为空', |
| 79 | ]); | 98 | ]); |
| 80 | - $this->model->where('id', $this->param['id'])->increment('number'); | 99 | + $moduleModel = new TemplateModule(); |
| 100 | + $moduleModel->where('id', $this->param['id'])->increment('number'); | ||
| 81 | $this->response('success'); | 101 | $this->response('success'); |
| 82 | } | 102 | } |
| 83 | } | 103 | } |
| @@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
| 9 | 9 | ||
| 10 | namespace App\Http\Logic\Bside\BTemplate; | 10 | namespace App\Http\Logic\Bside\BTemplate; |
| 11 | 11 | ||
| 12 | -use App\Http\Logic\Aside\BaseLogic; | 12 | +use App\Http\Logic\Bside\BaseLogic; |
| 13 | use App\Models\Template\TemplateLabel; | 13 | use App\Models\Template\TemplateLabel; |
| 14 | 14 | ||
| 15 | /** | 15 | /** |
| @@ -49,7 +49,7 @@ class BTemplateLabelLogic extends BaseLogic | @@ -49,7 +49,7 @@ class BTemplateLabelLogic extends BaseLogic | ||
| 49 | }else{ | 49 | }else{ |
| 50 | $info = $this->model->read(['name'=>$this->param['name'],'template_id'=>$this->param['template_id']],['id']); | 50 | $info = $this->model->read(['name'=>$this->param['name'],'template_id'=>$this->param['template_id']],['id']); |
| 51 | if($info === false){ | 51 | if($info === false){ |
| 52 | - $this->param['manager_id'] = $this->manager['id']; | 52 | + $this->param['manager_id'] = $this->user['manager_id'] ?? 0; |
| 53 | $id = $this->model->addReturnId($this->param); | 53 | $id = $this->model->addReturnId($this->param); |
| 54 | }else{ | 54 | }else{ |
| 55 | $id = $info['id']; | 55 | $id = $info['id']; |
-
请 注册 或 登录 后发表评论