作者 刘锟

update

@@ -66,11 +66,12 @@ class InquiryForwardLogic extends BaseLogic @@ -66,11 +66,12 @@ class InquiryForwardLogic extends BaseLogic
66 { 66 {
67 $lists = $this->model->lists($map, $page, $row, $order, $filed); 67 $lists = $this->model->lists($map, $page, $row, $order, $filed);
68 //获取各个状态询盘总数 68 //获取各个状态询盘总数
  69 + unset($map['status']);
69 $lists['count_stat'] = [ 70 $lists['count_stat'] = [
70 - 'all_count' => 0,  
71 - 'un_count' => 0,  
72 - 'suc_count' => 0,  
73 - 'inv_count' => 0, 71 + 'all_count' => $this->formatQuery($map,new InquiryInfo())->count('id'),
  72 + 'un_count' => $this->formatQuery($map,new InquiryInfo())->where('status', InquiryInfo::STATUS_INIT)->count('id'),
  73 + 'suc_count' => $this->formatQuery($map,new InquiryInfo())->where('status', InquiryInfo::STATUS_FINISH)->count('id'),
  74 + 'inv_count' => $this->formatQuery($map,new InquiryInfo())->where('status', InquiryInfo::STATUS_INVALID)->count('id'),
74 ]; 75 ];
75 76
76 return $this->success($lists); 77 return $this->success($lists);