Ver código fonte

修复代理首页

dos 3 meses atrás
pai
commit
2487d165b5

+ 5 - 5
game-business/src/main/resources/mapper/business/AppUserAgentMapper.xml

@@ -89,8 +89,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </delete>
 
-    <select id="sumBetting" resultType="java.lang.Integer">
-        select sum(betting_amount) as amount
+    <select id="sumBetting" resultType="java.lang.Double">
+        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
         where b.create_time between #{beginTime} and #{endTime}
         and a.pid = #{pid}
@@ -101,9 +101,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             a.user_id as userId,
             c.nickname as nickName,
             a.pid as pid,
-            (select sum(betting_amount) 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 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(betting_amount),0) from app_game_betting as b where b.user_id = a.user_id) as bettingAmount,
+            (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 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.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}