Browse Source

截取单条

duqinya 6 years ago
parent
commit
badf2ba94a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/Repositories/CmsContentTemplateSetRepository.php

+ 1 - 1
app/Repositories/CmsContentTemplateSetRepository.php

@@ -256,7 +256,7 @@ class CmsContentTemplateSetRepository {
         }
 
         $group_array['content'][0]['area_type'] = 0;
-        $banner_rule = $this->cmsContentTemplateSet->select('id','rule')->where(['tpl_id'=>$request['tpl_id'],'area_type'=>0])->get();
+        $banner_rule = $this->cmsContentTemplateSet->select('id','rule')->where(['tpl_id'=>$request['tpl_id'],'area_type'=>0])->orderBy('updated_at', 'desc')->first();
         $new_rule = [];
         foreach ($banner_rule->toArray() as $k=>$v){
             $new_rule[$k]['id'] = $v['id'];