|
@@ -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')
|