作者 刘锟

合并分支 'akun' 到 'master'

Akun



查看合并请求 !1359
@@ -65,12 +65,23 @@ class InquiryForwardLogic extends BaseLogic @@ -65,12 +65,23 @@ class InquiryForwardLogic extends BaseLogic
65 public function getInquiryLists($map, $page, $row, $order = 'id', $filed = ['*']) 65 public function getInquiryLists($map, $page, $row, $order = 'id', $filed = ['*'])
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 + if (isset($map['status'])) {
  70 + unset($map['status']);
  71 + }
  72 + $all_count = $this->model->counts($map);
  73 + $map['status'] = InquiryInfo::STATUS_INIT;
  74 + $un_count = $this->model->counts($map);
  75 + $map['status'] = InquiryInfo::STATUS_FINISH;
  76 + $suc_count = $this->model->counts($map);
  77 + $map['status'] = InquiryInfo::STATUS_INVALID;
  78 + $inv_count = $this->model->counts($map);
  79 +
69 $lists['count_stat'] = [ 80 $lists['count_stat'] = [
70 - 'all_count' => 0,  
71 - 'un_count' => 0,  
72 - 'suc_count' => 0,  
73 - 'inv_count' => 0, 81 + 'all_count' => $all_count,
  82 + 'un_count' => $un_count,
  83 + 'suc_count' => $suc_count,
  84 + 'inv_count' => $inv_count,
74 ]; 85 ];
75 86
76 return $this->success($lists); 87 return $this->success($lists);