作者 刘锟

update

... ... @@ -65,13 +65,13 @@ class InquiryForwardLogic extends BaseLogic
public function getInquiryLists($map, $page, $row, $order = 'id', $filed = ['*'])
{
$lists = $this->model->lists($map, $page, $row, $order, $filed);
//获取各个状态询盘总数
//统计各个状态询盘总数
unset($map['status']);
$lists['count_stat'] = [
'all_count' => $this->formatQuery($map,new InquiryInfo())->count('id'),
'un_count' => $this->formatQuery($map,new InquiryInfo())->where('status', InquiryInfo::STATUS_INIT)->count('id'),
'suc_count' => $this->formatQuery($map,new InquiryInfo())->where('status', InquiryInfo::STATUS_FINISH)->count('id'),
'inv_count' => $this->formatQuery($map,new InquiryInfo())->where('status', InquiryInfo::STATUS_INVALID)->count('id'),
'all_count' => $this->formatQuery($map,new InquiryInfo())->count(),
'un_count' => $this->formatQuery($map,new InquiryInfo())->where('status', InquiryInfo::STATUS_INIT)->count(),
'suc_count' => $this->formatQuery($map,new InquiryInfo())->where('status', InquiryInfo::STATUS_FINISH)->count(),
'inv_count' => $this->formatQuery($map,new InquiryInfo())->where('status', InquiryInfo::STATUS_INVALID)->count(),
];
return $this->success($lists);
... ...