"; } public function index() { //获取各会长的现金充值 $map = ["spend.pay_status"=>1]; $map['pay_way'] = array("GT",0); $field = "spend.promote_id,spend.promote_account,sum(pay_amount) pay_amount"; $spendRes = M() ->table("tab_spend spend") ->field($field) ->where($map) ->join("tab_promote promote ON spend.promote_id = promote.id","left") ->group('spend.promote_id') ->select(); dump($spendRes);die(); $this->display(); # code... } }