xxxrrrdddd 2 年之前
父節點
當前提交
169de17579
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      application/admin/controller/DataView.php

+ 3 - 0
application/admin/controller/DataView.php

@@ -25,6 +25,9 @@ class DataView extends Backend
             list($stime,$etime)=explode(' - ',$timerange);
             $map['create_time']=['BETWEEN',[strtotime($stime),strtotime($etime)]];
         }
+        if($this->admin('is_sub')){
+            $map['s_id']=$this->admin('id');
+        }
         $order_count= MobileOrder::where($map)->count();
         $sale_amount=MobileOrder::filterSaled()->where($map)->sum('amount');
         $sale_profit=MobileOrder::filterSaled()->where($map)->sum('amount_profit');