xieruidong 2 年之前
父節點
當前提交
9c0fb1af50
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      application/admin/controller/seller/MyTeam.php

+ 3 - 1
application/admin/controller/seller/MyTeam.php

@@ -14,7 +14,7 @@ use app\common\controller\Backend;
 class MyTeam extends Backend
 {
     public function cate_check(){
-        list($date)=$this->rangeTime('date');
+        list($date,$dateArr)=$this->rangeTime('date');
         if($this->request->isAjax()){
             list($where, $sort, $order, $offset, $limit) = $this->buildparams();
             $type=input('type',1);
@@ -22,6 +22,7 @@ class MyTeam extends Backend
                 $list=OrderInfo::whereExists(
                     Orders::whereRaw("orders.id=order_info.order_id and admin_id={$this->admin('id')}")->buildSql()
                 )
+                    ->filterDate($dateArr)
                     ->group('category_id')
                     ->field('count(order_id) as num,group_concat(order_id) as order_ids,category_name,category_id')
                     ->select();
@@ -29,6 +30,7 @@ class MyTeam extends Backend
                 $list=OrderInfo::whereExists(
                     Orders::whereRaw("orders.id=order_info.order_id and admin_id={$this->admin('id')}")->buildSql()
                 )
+                    ->filterDate($dateArr)
                     ->group('category_id')
                     ->field('sum(amount_pay) as num,category_name,category_id')
                     ->order('num','desc')