|
@@ -285,31 +285,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<select id="getRechargeByDateSum" resultType="java.util.Map" parameterType="com.game.business.dto.FinTranRecordDTO">
|
|
|
select
|
|
|
|
|
|
- type,
|
|
|
+ case b.type
|
|
|
+ when b.type is null then 4
|
|
|
+ when 1 then 8085
|
|
|
+ when 2 then 8086
|
|
|
+ when 3 then 8087
|
|
|
+ when 4 then 8084
|
|
|
+ when 5 then 8088
|
|
|
+ else -1
|
|
|
+ end as type,
|
|
|
|
|
|
- ifnull(sum(case when coin_type = 0 and rule_id > 0 then (coin) else 0.00 end) ,0.00) as coinUpSum,
|
|
|
- ifnull(sum(case when coin_type = 0 and rule_id > 0 then coin else 0.00 end) ,0.00) as actualCoinUpSum,
|
|
|
- ifnull(sum(case when coin_type = 0 and rule_id > 0 then platform_service else 0.00 end) ,0.00) as platformServiceCoinUpSum,
|
|
|
- ifnull(sum(case when coin_type = 1 and rule_id > 0 then (coin) else 0.00 end) ,0.00) as diamondCoinUpSum,
|
|
|
- ifnull(sum(case when coin_type = 1 and rule_id > 0 then coin else 0.00 end) ,0.00) as actualDiamondCoinUpSum,
|
|
|
- ifnull(sum(case when coin_type = 1 and rule_id > 0 then platform_service else 0.00 end) ,0.00) as platformServiceDiamondCoinUpSum,
|
|
|
+ ifnull(sum(case when a.coin_type = 0 and a.rule_id > 0 then (a.coin) else 0.00 end) ,0.00) as coinUpSum,
|
|
|
+ ifnull(sum(case when a.coin_type = 0 and a.rule_id > 0 then a.coin else 0.00 end) ,0.00) as actualCoinUpSum,
|
|
|
+ ifnull(sum(case when a.coin_type = 0 and a.rule_id > 0 then a.platform_service else 0.00 end) ,0.00) as platformServiceCoinUpSum,
|
|
|
+ ifnull(sum(case when a.coin_type = 1 and a.rule_id > 0 then (a.coin) else 0.00 end) ,0.00) as diamondCoinUpSum,
|
|
|
+ ifnull(sum(case when a.coin_type = 1 and a.rule_id > 0 then a.coin else 0.00 end) ,0.00) as actualDiamondCoinUpSum,
|
|
|
+ ifnull(sum(case when a.coin_type = 1 and a.rule_id > 0 then a.platform_service else 0.00 end) ,0.00) as platformServiceDiamondCoinUpSum,
|
|
|
|
|
|
- ifnull(sum(case when coin_type = 0 and rule_id = 0 then (coin) else 0.00 end) ,0.00) as coinDownSum,
|
|
|
- ifnull(sum(case when coin_type = 0 and rule_id = 0 then coin else 0.00 end) ,0.00) as actualCoinDownSum,
|
|
|
- ifnull(sum(case when coin_type = 0 and rule_id = 0 then platform_service else 0.00 end) ,0.00) as platformServiceCoinDownSum,
|
|
|
- ifnull(sum(case when coin_type = 1 and rule_id = 0 then (coin) else 0.00 end) ,0.00) as diamondCoinDownSum,
|
|
|
- ifnull(sum(case when coin_type = 1 and rule_id = 0 then coin else 0.00 end) ,0.00) as actualDiamondCoinDownSum,
|
|
|
- ifnull(sum(case when coin_type = 1 and rule_id = 0 then platform_service else 0.00 end) ,0.00) as platformServiceDiamondCoinDownSum
|
|
|
+ ifnull(sum(case when a.coin_type = 0 and a.rule_id = 0 then (a.coin) else 0.00 end) ,0.00) as coinDownSum,
|
|
|
+ ifnull(sum(case when a.coin_type = 0 and a.rule_id = 0 then a.coin else 0.00 end) ,0.00) as actualCoinDownSum,
|
|
|
+ ifnull(sum(case when a.coin_type = 0 and a.rule_id = 0 then a.platform_service else 0.00 end) ,0.00) as platformServiceCoinDownSum,
|
|
|
+ ifnull(sum(case when a.coin_type = 1 and a.rule_id = 0 then (a.coin) else 0.00 end) ,0.00) as diamondCoinDownSum,
|
|
|
+ ifnull(sum(case when a.coin_type = 1 and a.rule_id = 0 then a.coin else 0.00 end) ,0.00) as actualDiamondCoinDownSum,
|
|
|
+ ifnull(sum(case when a.coin_type = 1 and a.rule_id = 0 then a.platform_service else 0.00 end) ,0.00) as platformServiceDiamondCoinDownSum
|
|
|
|
|
|
- from app_users_charge where status = 1
|
|
|
+ from app_users_charge as a left join app_charge_channel as b on a.type = b.channel_no where a.status = 1
|
|
|
|
|
|
<if test="userId != null">
|
|
|
- and uid = #{userId}
|
|
|
+ and a.uid = #{userId}
|
|
|
</if>
|
|
|
<if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''">
|
|
|
- and (date_format(addtime, '%Y-%m-%d') >= #{beginTime} and date_format(addtime, '%Y-%m-%d') <= #{endTime})
|
|
|
+ and (date_format(a.addtime, '%Y-%m-%d') >= #{beginTime} and date_format(a.addtime, '%Y-%m-%d') <= #{endTime})
|
|
|
</if>
|
|
|
- group by type
|
|
|
+ group by a.type
|
|
|
</select>
|
|
|
|
|
|
<select id="selectTranList" parameterType="com.game.business.dto.FinTranDto" resultType="com.game.business.vo.FinTranVo">
|