mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-08-14 02:01:53 +08:00
code review:会员统计
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
<mapper namespace="cn.iocoder.yudao.module.statistics.dal.mysql.infra.ApiAccessLogStatisticsMapper">
|
||||
|
||||
<select id="selectCountByIp" resultType="java.lang.Integer">
|
||||
<!-- TODO @疯狂:distinct 会不会更合适哈 -->
|
||||
SELECT COUNT(1)
|
||||
FROM infra_api_access_log
|
||||
WHERE create_time BETWEEN #{beginTime} AND #{endTime}
|
||||
@@ -11,6 +12,7 @@
|
||||
</select>
|
||||
|
||||
<select id="selectCountByUserId" resultType="java.lang.Integer">
|
||||
<!-- TODO @疯狂:distinct 会不会更合适哈 -->
|
||||
SELECT COUNT(1)
|
||||
FROM infra_api_access_log
|
||||
WHERE user_id > 0
|
||||
|
@@ -31,6 +31,7 @@
|
||||
|
||||
<select id="selectRechargeSummaryGroupByWalletId"
|
||||
resultType="cn.iocoder.yudao.module.statistics.service.pay.bo.RechargeSummaryRespBO">
|
||||
<!-- TODO @疯狂:是不是不用 group by,而是通过 DISTINCT wallet_id 更合适哈? -->
|
||||
SELECT COUNT(1) AS rechargeUserCount,
|
||||
SUM(pay_price) AS rechargePrice
|
||||
FROM pay_wallet_recharge
|
||||
|
@@ -49,7 +49,7 @@
|
||||
<select id="selectExpensePriceByTimeBetween" resultType="java.lang.Integer">
|
||||
SELECT -- 支出金额 = 余额支付金额 + 支付佣金金额 + 商品退款金额
|
||||
SUM(order_wallet_pay_price + brokerage_settlement_price + after_sale_refund_price) AS expensePrice
|
||||
FROM trade_statistics
|
||||
FROM trade_statistics
|
||||
WHERE deleted = FALSE
|
||||
<if test="beginTime != null">
|
||||
AND time >= #{beginTime}
|
||||
|
Reference in New Issue
Block a user