|
@@ -89,8 +89,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</foreach>
|
|
</foreach>
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
- <select id="sumBetting" resultType="java.lang.Integer">
|
|
+ <select id="sumBetting" resultType="java.lang.Double">
|
|
- select sum(betting_amount) as amount
|
|
+ select IFNULL(sum(betting_amount),0) as amount
|
|
from app_user_agent as a left join app_game_betting as b on a.user_id = b.user_id
|
|
from app_user_agent as a left join app_game_betting as b on a.user_id = b.user_id
|
|
where b.create_time between #{beginTime} and #{endTime}
|
|
where b.create_time between #{beginTime} and #{endTime}
|
|
and a.pid = #{pid}
|
|
and a.pid = #{pid}
|
|
@@ -101,9 +101,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
a.user_id as userId,
|
|
a.user_id as userId,
|
|
c.nickname as nickName,
|
|
c.nickname as nickName,
|
|
a.pid as pid,
|
|
a.pid as pid,
|
|
- (select sum(betting_amount) from app_game_betting as b where b.user_id = a.user_id) as bettingAmount,
|
|
+ (select IFNULL(sum(betting_amount),0) from app_game_betting as b where b.user_id = a.user_id) as bettingAmount,
|
|
- (select sum(d.live_commission + d.game_commission) from app_user_count as d where d.user_id = a.user_id) as commission,
|
|
+ (select IFNULL(sum(d.live_commission + d.game_commission),0) from app_user_count as d where d.user_id = a.user_id) as commission,
|
|
- (select sum(e.game_win_amount - e.game_lose_amount) from app_user_count as e where e.user_id = a.user_id) as gameAmount,
|
|
+ (select IFNULL(sum(e.game_win_amount - e.game_lose_amount),0) from app_user_count as e where e.user_id = a.user_id) as gameAmount,
|
|
a.live_rate as liveRate,
|
|
a.live_rate as liveRate,
|
|
a.dividend_guarantee_rate as dividendGuaranteeRate
|
|
a.dividend_guarantee_rate as dividendGuaranteeRate
|
|
from app_user_agent as a left join mugozbg_live.app_user as c on a.user_id = c.userid where a.pid = #{teamDto.pid}
|
|
from app_user_agent as a left join mugozbg_live.app_user as c on a.user_id = c.userid where a.pid = #{teamDto.pid}
|