diff --git a/crmeb/app/model/user/UserRecharge.php b/crmeb/app/model/user/UserRecharge.php index af500cb9c..0c123307c 100644 --- a/crmeb/app/model/user/UserRecharge.php +++ b/crmeb/app/model/user/UserRecharge.php @@ -87,6 +87,16 @@ class UserRecharge extends BaseModel $query->where('recharge_type', $value); } + /** + * 不等于充值类型 + * @param Model $query + * @param $value + */ + public function searchNoRechargeTypeAttr($query, $value) + { + $query->where('recharge_type', '<>', $value); + } + /**退款金额 * @param $query * @param $value diff --git a/crmeb/app/services/statistic/TradeStatisticServices.php b/crmeb/app/services/statistic/TradeStatisticServices.php index 396b0bc79..d06692e8c 100644 --- a/crmeb/app/services/statistic/TradeStatisticServices.php +++ b/crmeb/app/services/statistic/TradeStatisticServices.php @@ -663,12 +663,12 @@ class TradeStatisticServices extends BaseServices */ public function getRechargeTotalMoney(array $where, string $selectType, string $group = "", bool $isNum = false) { - /** 用户充值金额 */ /** @var UserRechargeServices $userRechageService */ $userRechageService = app()->make(UserRechargeServices::class); $rechargeSumField = "price"; $whereInRecharge['paid'] = 1; $whereInRecharge['refund_price'] = '0.00'; + $whereInRecharge['no_recharge_type'] = 'system'; $whereInRecharge['timeKey'] = $this->TimeConvert($where['time'], $isNum); $whereInRecharge['store_id'] = 0; $totalMoney = $userRechageService->getRechargeMoneyByWhere($whereInRecharge, $rechargeSumField, $selectType, $group);