|
@@ -421,8 +421,17 @@ class CmsContentTemplateSetRepository {
|
|
|
|
|
|
public function getTemplate($cityId)
|
|
|
{
|
|
|
- return $this->cmsContentTemplate->select('id','title','apply_type')->where(['city_id'=>$cityId,'deleted_at'=>null])->orderBy('apply_type','asc')->get();
|
|
|
+ $template = $this->cmsContentTemplate->select('id','status','title','apply_type')->where(['city_id'=>$cityId,'deleted_at'=>null])->orderBy('apply_type','asc')->get();
|
|
|
+ $templates = $template->toArray();
|
|
|
+ foreach($templates as $key => $val) {
|
|
|
+ if ($val['status'] == 1) {
|
|
|
+ unset($templates[$key]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ array_multisort(array_column($templates,'apply_type'),SORT_ASC,$templates);
|
|
|
|
|
|
+ return $templates;
|
|
|
}
|
|
|
|
|
|
public function templateSetDelete($request)
|