sum("consumer_money"); } //商家 提供的总收益数 public function businessProfitTotal($businessCode) { return CouponBill::where("business_code",$businessCode)->sum("admin_money"); } /** * 用户红包获取总额 * @param $userCode * @return float */ public function getUserRedPrice($userCode) { return CouponBill::where("user_code",$userCode) ->sum("consumer_money"); } }