|
@@ -8,6 +8,7 @@ import com.zanxiang.game.data.serve.pojo.entity.*;
|
|
|
import com.zanxiang.game.data.serve.pojo.enums.OrderByEnum;
|
|
|
import com.zanxiang.game.data.serve.pojo.vo.*;
|
|
|
import com.zanxiang.game.data.serve.service.IGameDataService;
|
|
|
+import com.zanxiang.game.data.serve.service.IRoleManageService;
|
|
|
import com.zanxiang.game.data.serve.utils.Page;
|
|
|
import com.zanxiang.module.util.DateUtil;
|
|
|
import com.zanxiang.module.util.exception.BaseException;
|
|
@@ -61,6 +62,8 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
@Resource
|
|
|
private IGameDataService basicService;
|
|
|
|
|
|
+
|
|
|
+
|
|
|
//用来存储映射
|
|
|
private static final List<Tuple2<Field, Field>> dayNFieldMapList;
|
|
|
private static final List<Tuple2<Field, Field>> dayNTotalFieldMapList;
|
|
@@ -5837,7 +5840,7 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
""" + cri + """
|
|
|
and hour(order_create_time) < 10
|
|
|
group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
|
|
|
- account_type) b
|
|
|
+ account_type,game_id) b
|
|
|
on a.source_system = b.source_system and a.day = b.day and a.agent_id = b.order_agent_id
|
|
|
and a.game_id=b.parent_game_id
|
|
|
left join (select source_system,
|
|
@@ -5852,7 +5855,7 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
""" + cri + """
|
|
|
and hour(order_create_time) < 14
|
|
|
group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
|
|
|
- account_type) c
|
|
|
+ account_type,game_id) c
|
|
|
on a.source_system = c.source_system and a.day = c.day and a.agent_id = c.order_agent_id
|
|
|
and a.game_id=c.parent_game_id
|
|
|
left join (select source_system,
|
|
@@ -5867,7 +5870,7 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
""" + cri + """
|
|
|
and hour(order_create_time) < 17
|
|
|
group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
|
|
|
- account_type) d
|
|
|
+ account_type,game_id) d
|
|
|
on a.source_system = d.source_system and a.day = d.day and a.agent_id = d.order_agent_id
|
|
|
and a.game_id=d.parent_game_id
|
|
|
"""
|
|
@@ -5897,7 +5900,7 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
""" + cri + """
|
|
|
and order_agent_id = 0
|
|
|
group by source_system, day, pitcher_id, zx_pitcher_name, order_agent_id, agent_name,
|
|
|
- account_id, parent_game_id, account_type
|
|
|
+ account_id, parent_game_id, account_type,game_id
|
|
|
)a
|
|
|
left join (
|
|
|
select
|
|
@@ -5913,7 +5916,7 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
""" + cri + """
|
|
|
and hour(order_create_time) < 10 and order_agent_id=0
|
|
|
group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
|
|
|
- account_type) b
|
|
|
+ account_type,game_id) b
|
|
|
on a.source_system = b.source_system and a.day = b.day and a.order_agent_id = b.order_agent_id
|
|
|
and a.parent_game_id=b.parent_game_id
|
|
|
left join (select source_system,
|
|
@@ -5928,7 +5931,7 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
""" + cri + """
|
|
|
and hour(order_create_time) < 14 and order_agent_id = 0
|
|
|
group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
|
|
|
- account_type) c
|
|
|
+ account_type,game_id) c
|
|
|
on a.source_system = c.source_system and a.day = c.day and a.order_agent_id = c.order_agent_id
|
|
|
and a.parent_game_id=c.parent_game_id
|
|
|
left join (select source_system,
|
|
@@ -5943,7 +5946,7 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
""" + cri + """
|
|
|
and hour(order_create_time) < 17 and order_agent_id = 0
|
|
|
group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
|
|
|
- account_type) d
|
|
|
+ account_type,game_id) d
|
|
|
on a.source_system = d.source_system and a.day = d.day and a.order_agent_id = d.order_agent_id
|
|
|
and a.parent_game_id=d.parent_game_id
|
|
|
) f
|
|
@@ -6040,7 +6043,7 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
""" + cri + """
|
|
|
and hour(order_create_time) < 10
|
|
|
group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
|
|
|
- account_type) b
|
|
|
+ account_type,game_id) b
|
|
|
on a.source_system = b.source_system and a.day = b.day and a.agent_id = b.order_agent_id
|
|
|
and a.game_id=b.parent_game_id
|
|
|
left join (select source_system,
|
|
@@ -6055,7 +6058,7 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
""" + cri + """
|
|
|
and hour(order_create_time) < 14
|
|
|
group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
|
|
|
- account_type) c
|
|
|
+ account_type,game_id) c
|
|
|
on a.source_system = c.source_system and a.day = c.day and a.agent_id = c.order_agent_id
|
|
|
and a.game_id=c.parent_game_id
|
|
|
left join (select source_system,
|
|
@@ -6070,7 +6073,7 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
""" + cri + """
|
|
|
and hour(order_create_time) < 17
|
|
|
group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
|
|
|
- account_type) d
|
|
|
+ account_type,game_id) d
|
|
|
on a.source_system = d.source_system and a.day = d.day and a.agent_id = d.order_agent_id
|
|
|
and a.game_id=d.parent_game_id
|
|
|
"""
|
|
@@ -6102,7 +6105,7 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
""" + cri + """
|
|
|
and order_agent_id = 0
|
|
|
group by source_system, day, pitcher_id, zx_pitcher_name, order_agent_id, agent_name,
|
|
|
- account_id, parent_game_id, account_type
|
|
|
+ account_id, parent_game_id, account_type,game_id
|
|
|
)a
|
|
|
left join (
|
|
|
select
|
|
@@ -6118,7 +6121,7 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
""" + cri + """
|
|
|
and hour(order_create_time) < 10 and order_agent_id=0
|
|
|
group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
|
|
|
- account_type) b
|
|
|
+ account_type,game_id) b
|
|
|
on a.source_system = b.source_system and a.day = b.day and a.order_agent_id = b.order_agent_id
|
|
|
and a.parent_game_id=b.parent_game_id
|
|
|
left join (select source_system,
|
|
@@ -6133,7 +6136,7 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
""" + cri + """
|
|
|
and hour(order_create_time) < 14 and order_agent_id = 0
|
|
|
group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
|
|
|
- account_type) c
|
|
|
+ account_type,game_id) c
|
|
|
on a.source_system = c.source_system and a.day = c.day and a.order_agent_id = c.order_agent_id
|
|
|
and a.parent_game_id=c.parent_game_id
|
|
|
left join (select source_system,
|
|
@@ -6148,7 +6151,7 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
""" + cri + """
|
|
|
and hour(order_create_time) < 17 and order_agent_id = 0
|
|
|
group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
|
|
|
- account_type) d
|
|
|
+ account_type,game_id) d
|
|
|
on a.source_system = d.source_system and a.day = d.day and a.order_agent_id = d.order_agent_id
|
|
|
and a.parent_game_id=d.parent_game_id
|
|
|
) f
|
|
@@ -6815,6 +6818,18 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
return cri;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取子游戏id
|
|
|
+ */
|
|
|
+ public List<Long> getSubGameId(){
|
|
|
+ //默认子游戏
|
|
|
+ Sql sql = Sqls.create("select id from dm_game_order.t_game where source_system= 'ZX_ONE'");
|
|
|
+ sql.setCallback(Sqls.callback.longs());
|
|
|
+ dao.execute(sql);
|
|
|
+ return sql.getList(Long.class);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 拼接查询条件
|
|
|
*
|
|
@@ -6824,6 +6839,13 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
public Criteria getOrderQueryStr(FlowMonitorDTO dto) {
|
|
|
Criteria cri = Cnd.cri();
|
|
|
|
|
|
+ //如果选择子游戏维度,并且没有选择游戏那么就查询所有游戏拼上条件
|
|
|
+ if(dto.getGameDimension()==1&&CollectionUtils.isEmpty(dto.getGameId())){
|
|
|
+ //查询游戏列表
|
|
|
+ List<Long> subGameId = getSubGameId();
|
|
|
+ dto.setGameId(subGameId);
|
|
|
+ }
|
|
|
+
|
|
|
//SDK类型
|
|
|
if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
|
cri.where().andEquals("source_system", dto.getSourceSystem());
|