作者 lyh

gx

@@ -26,6 +26,11 @@ class ATemplateController extends BaseController @@ -26,6 +26,11 @@ class ATemplateController extends BaseController
26 * @time :2023/6/28 16:34 26 * @time :2023/6/28 16:34
27 */ 27 */
28 public function lists(ATemplateLogic $aTemplateLogic,TemplateLabel $templateLabel){ 28 public function lists(ATemplateLogic $aTemplateLogic,TemplateLabel $templateLabel){
  29 + if(isset($this->map['label_name']) && !empty($this->map['label_name'])){
  30 + $id_arr = $templateLabel->formatQuery(['name'=>['like','%'.$this->map['label_name'].'%']])->pluck('template_id')->toArray();
  31 + $this->map['id'] = ['in',$id_arr];
  32 + unset($this->map['label_name']);
  33 + }
29 $filed = ['id','name','image','url','status','sort','deleted_status','test_model','created_at','project_id']; 34 $filed = ['id','name','image','url','status','sort','deleted_status','test_model','created_at','project_id'];
30 $lists = $aTemplateLogic->aTemplateList($this->map,$this->page,$this->row,$this->order,$filed); 35 $lists = $aTemplateLogic->aTemplateList($this->map,$this->page,$this->row,$this->order,$filed);
31 if(!empty($lists) && !empty($lists['list'])){ 36 if(!empty($lists) && !empty($lists['list'])){