diff --git a/agent/admin/controllers/pingan/cmmssn/Cmmssn.php b/agent/admin/controllers/pingan/cmmssn/Cmmssn.php index 6805d8a7..6931d467 100644 --- a/agent/admin/controllers/pingan/cmmssn/Cmmssn.php +++ b/agent/admin/controllers/pingan/cmmssn/Cmmssn.php @@ -89,6 +89,9 @@ class Cmmssn extends BaseController $where["createTime>="] = date('Y-m-d 00:00:00', strtotime($params['dateRange'][0])); $where["createTime<="] = date('Y-m-d 23:59:59', strtotime($params['dateRange'][1])); } + if ($params['lg_money']) { + $where["pinganUserId in (select pinganUserId from lc_pingan_users_cmmssn where ifSend=0 GROUP BY pinganUserId HAVING SUM(money) > {$params['lg_money']})"] = null; + } $count = $this->cmmssn_model->count($where); if ($count) { $rows = $this->cmmssn_model->select($where, 'id desc', $page, $limit); @@ -150,4 +153,18 @@ class Cmmssn extends BaseController } return ['list' => $list, 'count' => $count, 'columns' => $columns]; } + + /** + * 导出佣金未发放大于100的用户数据 + * @return void + */ + public function exportLgMoney_get() + { + $this->inputs['page'] = 1; + $this->inputs['limit'] = 20000; + $this->inputs['lg_money'] = 100; + $data = $this->cmmssnList($this->inputs); + $this->return_response_list($data); + } + } \ No newline at end of file