joygame_游戏后台fixed

This commit is contained in:
2025-05-08 15:11:19 +08:00
parent 2fc461d3f9
commit b917de8b63
2 changed files with 10 additions and 10 deletions

View File

@@ -9,8 +9,8 @@
gr.uid uid,
u.partition_id partitionId,
gr.game_id gameId,
sum(if(gr.`type` = 1, gr.`coin`, '0')) payGold,
sum(if(gr.`type` = 2, gr.`coin`, '0')) winGold
ifnull(sum(gr.`bet`), '0') payGold,
ifnull(sum(gr.`pay`), '0') winGold
from joy_game_record gr
left join users u on gr.uid = u.uid
where gr.create_time >= #{beginTime}
@@ -32,8 +32,8 @@
<select id="userTotalStat" resultType="com.accompany.sharding.vo.GameUserDataDetailVo">
select
sum(if(gr.`type` = 1, gr.`coin`, '0')) payGold,
sum(if(gr.`type` = 2, gr.`coin`, '0')) winGold
ifnull(sum(gr.`bet`), '0') payGold,
ifnull(sum(gr.`pay`), '0') winGold
from joy_game_record gr
left join users u on gr.uid = u.uid
where gr.create_time >= #{beginTime}
@@ -55,8 +55,8 @@
<select id="gameDetail" resultType="com.accompany.sharding.vo.GameDetailVo">
select date(gr.create_time) statDate,
gr.game_id gameId,
sum(if(gr.`type` = 1, gr.`coin`, '0')) payGold,
sum(if(gr.`type` = 2, gr.`coin`, '0')) winGold
ifnull(sum(gr.`bet`), '0') payGold,
ifnull(sum(gr.`pay`), '0') winGold
from joy_game_record gr
left join users u on gr.uid = u.uid
where gr.create_time >= #{beginTime}

View File

@@ -110,8 +110,8 @@ public class GameDayStatDataServiceImpl extends ServiceImpl<GameDayStatDataMappe
" `" + prefixTableName + "` g\n" +
" LEFT JOIN users u ON g.uid = u.uid\n");
} else if (GameConstant.GameChannel.JOYPLAY.name().equals(channel)) {
querySql.append(" IFNULL(sum(`bet`), 0) payGold,\n" +
" IFNULL(sum(`pay`), 0) winGold\n" +
querySql.append(" IFNULL(sum(g.`bet`), 0) payGold,\n" +
" IFNULL(sum(g.`pay`), 0) winGold\n" +
" FROM\n" +
" `" + prefixTableName + "` g\n" +
" LEFT JOIN users u ON g.uid = u.uid\n");
@@ -443,8 +443,8 @@ public class GameDayStatDataServiceImpl extends ServiceImpl<GameDayStatDataMappe
" FROM " + gameChannel.getPrefixTableName(splitMonth) + " g" +
" LEFT JOIN users u ON g.uid = u.uid");
} else if (GameConstant.GameChannel.JOYPLAY.name().equals(channel)) {
querySql.append(" IFNULL(sum(`bet`), 0) payGold,\n" +
" IFNULL(sum(`pay`), 0) winGold\n" +
querySql.append(" IFNULL(sum(g.`bet`), 0) payGold,\n" +
" IFNULL(sum(g.`pay`), 0) winGold\n" +
" FROM " + gameChannel.getPrefixTableName(splitMonth) + " g" +
" LEFT JOIN users u ON g.uid = u.uid");
}