Переглянути джерело

流量卡管理修改时发货模板

Cherry 2 роки тому
батько
коміт
50a1de6b49
1 змінених файлів з 6 додано та 4 видалено
  1. 6 4
      application/admin/controller/MobileFlow.php

+ 6 - 4
application/admin/controller/MobileFlow.php

@@ -254,10 +254,12 @@ class MobileFlow extends Backend
             }
 
             $proxy_id = $this->auth->id;
-            if($this->super){
-                $proxy_id = 0;
-            }
-            $templates = MobileFlowAreaTemplate::where('status', 0)->where('proxy_id', $proxy_id)->order('create_time asc')->select();
+
+            $templates = MobileFlowAreaTemplate::where('status', 0)->where(function ($query) use($proxy_id){
+                if(!$this->super){
+                    return $query->where('proxy_id', $proxy_id);
+                }
+            })->order('create_time asc')->select();
 
             $this->assign('templates', $templates);
             $this->assign('row',$mobile);