|
@@ -196,7 +196,7 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
*/
|
|
|
private Map<String, Object> getNameById(Map<String, Object> dataMap){
|
|
|
|
|
|
- /*//投手名
|
|
|
+ //投手名
|
|
|
if (dataMap.get("put_user_id") != null) {
|
|
|
dataMap.put("put_user_name",
|
|
|
sysUserRpc.getById(Long.valueOf((String) dataMap.get("put_user_id"))).getData().getNickname());
|
|
@@ -215,7 +215,7 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
if (dataMap.get("customer_service_id") != null) {
|
|
|
dataMap.put("customer_service_name",
|
|
|
sysUserRpc.getById((Long) dataMap.get("customer_service_id")).getData().getNickname());
|
|
|
- }*/
|
|
|
+ }
|
|
|
|
|
|
return dataMap;
|
|
|
}
|
|
@@ -240,6 +240,10 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
//原始区服列表
|
|
|
cri.where().andIn("server_id", dto.getServerIds().toArray(String[]::new));
|
|
|
}
|
|
|
+ if (StringUtils.isNotBlank(dto.getServerName())) {
|
|
|
+ //区服名称
|
|
|
+ cri.where().andLike("server_name", dto.getServerName());
|
|
|
+ }
|
|
|
if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
|
cri.where().andEquals("source_system", dto.getSourceSystem());
|
|
|
}
|
|
@@ -284,6 +288,10 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
//原始服区服列表
|
|
|
criRole.where().andIn("server_id", dto.getServerIds().toArray(String[]::new));
|
|
|
}
|
|
|
+ if (StringUtils.isNotBlank(dto.getServerName())) {
|
|
|
+ //区服名称
|
|
|
+ cri.where().andLike("server_name", dto.getServerName());
|
|
|
+ }
|
|
|
if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
|
criRole.where().andEquals("source_system", dto.getSourceSystem());
|
|
|
}
|
|
@@ -361,6 +369,14 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
|
cri.where().andEquals("source_system", dto.getSourceSystem());
|
|
|
}
|
|
|
+ if (StringUtils.isNotBlank(dto.getServerName())) {
|
|
|
+ //区服名称
|
|
|
+ cri.where().andLike("boss_server_name", dto.getServerName());
|
|
|
+ }
|
|
|
+ if (CollectionUtils.isEmpty(dto.getServerIds()) && StringUtils.isBlank(dto.getServerName())) {
|
|
|
+ //默认不传查询的区服,只看最新的合服数据
|
|
|
+ cri.where().andEquals("is_merge", 0);
|
|
|
+ }
|
|
|
//拼接分组条件
|
|
|
cri.getGroupBy().groupBy("source_system" , "boss_server_id" , "parent_game_id" , "super_game_id");
|
|
|
//分页
|
|
@@ -401,6 +417,10 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
//合服区服列表
|
|
|
criRole.where().andIn("boss_server_id", dto.getServerIds().toArray(String[]::new));
|
|
|
}
|
|
|
+ if (StringUtils.isNotBlank(dto.getServerName())) {
|
|
|
+ //区服名称
|
|
|
+ cri.where().andLike("boss_server_name", dto.getServerName());
|
|
|
+ }
|
|
|
if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
|
criRole.where().andEquals("source_system", dto.getSourceSystem());
|
|
|
}
|
|
@@ -478,6 +498,10 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
//原始区服列表
|
|
|
cri.where().andIn("server_id", dto.getServerIds().toArray(String[]::new));
|
|
|
}
|
|
|
+ if (StringUtils.isNotBlank(dto.getServerName())) {
|
|
|
+ //区服名称
|
|
|
+ cri.where().andLike("server_name", dto.getServerName());
|
|
|
+ }
|
|
|
if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
|
cri.where().andEquals("source_system", dto.getSourceSystem());
|
|
|
}
|
|
@@ -522,6 +546,10 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
//原始服区服列表
|
|
|
criRole.where().andIn("server_id", dto.getServerIds().toArray(String[]::new));
|
|
|
}
|
|
|
+ if (StringUtils.isNotBlank(dto.getServerName())) {
|
|
|
+ //区服名称
|
|
|
+ cri.where().andLike("server_name", dto.getServerName());
|
|
|
+ }
|
|
|
if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
|
criRole.where().andEquals("source_system", dto.getSourceSystem());
|
|
|
}
|
|
@@ -595,6 +623,14 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
|
cri.where().andEquals("source_system", dto.getSourceSystem());
|
|
|
}
|
|
|
+ if (StringUtils.isNotBlank(dto.getServerName())) {
|
|
|
+ //区服名称
|
|
|
+ cri.where().andLike("boss_server_name", dto.getServerName());
|
|
|
+ }
|
|
|
+ if (CollectionUtils.isEmpty(dto.getServerIds()) && StringUtils.isBlank(dto.getServerName())) {
|
|
|
+ //默认不传查询的区服,只看最新的合服数据
|
|
|
+ cri.where().andEquals("is_merge", 0);
|
|
|
+ }
|
|
|
//拼接分组条件
|
|
|
cri.getGroupBy().groupBy("source_system" , "boss_server_id" , "super_game_id");
|
|
|
//分页
|
|
@@ -635,6 +671,10 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
//合服区服列表
|
|
|
criRole.where().andIn("boss_server_id", dto.getServerIds().toArray(String[]::new));
|
|
|
}
|
|
|
+ if (StringUtils.isNotBlank(dto.getServerName())) {
|
|
|
+ //区服名称
|
|
|
+ cri.where().andLike("boss_server_name", dto.getServerName());
|
|
|
+ }
|
|
|
if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
|
criRole.where().andEquals("source_system", dto.getSourceSystem());
|
|
|
}
|
|
@@ -1038,10 +1078,9 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
-- 礼包名
|
|
|
source_system,
|
|
|
id,
|
|
|
- game_id,
|
|
|
gift_name
|
|
|
FROM dm_game_order.t_game_gift
|
|
|
- ) k on j.source_system = k.source_system AND j.send_gift_id = k.id AND j.game_id = k.game_id
|
|
|
+ ) k on j.source_system = k.source_system AND j.send_gift_id = k.id
|
|
|
LEFT JOIN (
|
|
|
SELECT
|
|
|
source_system ,
|
|
@@ -1399,10 +1438,9 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
-- 礼包名
|
|
|
source_system,
|
|
|
id,
|
|
|
- game_id,
|
|
|
gift_name
|
|
|
FROM dm_game_order.t_game_gift
|
|
|
- ) k on j.source_system = k.source_system AND j.send_gift_id = k.id AND j.game_id = k.game_id
|
|
|
+ ) k on j.source_system = k.source_system AND j.send_gift_id = k.id
|
|
|
LEFT JOIN (
|
|
|
SELECT
|
|
|
source_system ,
|
|
@@ -1514,6 +1552,7 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
server_id, -- 区服ID
|
|
|
MAX(server_name) as server_name, -- 区服名
|
|
|
MAX(dt) as dt, -- 开服时间
|
|
|
+ TIMESTAMPDIFF(DAY, MAX(dt), NOW()) start_day, -- 开服天数
|
|
|
boss_server_id, -- 合服ID
|
|
|
MAX(boss_server_name) as boss_server_name, -- 合服名
|
|
|
MAX(merge_time) as merge_time , -- 合服时间
|
|
@@ -1600,6 +1639,7 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
MAX(merge_time) as merge_time , -- 合服时间
|
|
|
TIMESTAMPDIFF(DAY, MAX(merge_time), NOW()) start_day, -- 开服天数
|
|
|
MAX(sum_server_count) as sum_server_count, -- 合服次数
|
|
|
+ MAX(c.is_merge) as is_merge, -- 是否参与过合服
|
|
|
MAX(b.main_server_id) as main_server_id, -- 主服ID
|
|
|
MAX(b.main_server_name) as main_server_name, -- 主服名
|
|
|
MAX(son_server_ids) as son_server_ids, -- 合服的子服ID列表
|
|
@@ -1686,6 +1726,14 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
) c on a.source_system = c.source_system AND a.game_id = c.game_id AND a.main_server_id = c.server_id
|
|
|
group by a.server_id , a.source_system , a.game_id
|
|
|
) b ON a.source_system = b.b_source_system AND a.super_game_id = b.b_game_id AND a.boss_server_id = b.b_server_id
|
|
|
+ LEFT JOIN (
|
|
|
+ SELECT
|
|
|
+ source_system as c_source_system,
|
|
|
+ game_id,
|
|
|
+ server_id,
|
|
|
+ is_merge
|
|
|
+ FROM dm_game_order.t_game_server_merge
|
|
|
+ ) c on a.source_system = c.c_source_system AND a.boss_server_id = c.server_id AND a.super_game_id = c.game_id
|
|
|
""";
|
|
|
}
|
|
|
|
|
@@ -1710,6 +1758,7 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
MAX(merge_time) as merge_time , -- 合服时间
|
|
|
TIMESTAMPDIFF(DAY, MAX(merge_time), NOW()) start_day, -- 开服天数
|
|
|
MAX(sum_server_count) as sum_server_count, -- 合服次数
|
|
|
+ MAX(c.is_merge) as is_merge, -- 是否参与过合服
|
|
|
MAX(b.main_server_id) as main_server_id, -- 主服ID
|
|
|
MAX(b.main_server_name) as main_server_name, -- 主服名
|
|
|
MAX(son_server_ids) as son_server_ids, -- 合服的子服ID列表
|
|
@@ -1796,6 +1845,14 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
) c on a.source_system = c.source_system AND a.game_id = c.game_id AND a.main_server_id = c.server_id
|
|
|
group by a.server_id , a.source_system , a.game_id
|
|
|
) b ON a.source_system = b.b_source_system AND a.super_game_id = b.b_game_id AND a.boss_server_id = b.b_server_id
|
|
|
+ LEFT JOIN (
|
|
|
+ SELECT
|
|
|
+ source_system as c_source_system,
|
|
|
+ game_id,
|
|
|
+ server_id,
|
|
|
+ is_merge
|
|
|
+ FROM dm_game_order.t_game_server_merge
|
|
|
+ ) c on a.source_system = c.c_source_system AND a.boss_server_id = c.server_id AND a.super_game_id = c.game_id
|
|
|
""" + cri +
|
|
|
"""
|
|
|
) a
|
|
@@ -1816,6 +1873,7 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
server_id, -- 区服ID
|
|
|
MAX(server_name) as server_name, -- 区服名
|
|
|
MAX(dt) as dt, -- 开服日期
|
|
|
+ TIMESTAMPDIFF(DAY, MAX(dt), NOW()) start_day, -- 开服天数
|
|
|
boss_server_id, -- 合服ID
|
|
|
MAX(boss_server_name) as boss_server_name, -- 合服名
|
|
|
MAX(merge_time) as merge_time , -- 合服时间
|
|
@@ -2050,6 +2108,7 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
MAX(merge_time) as merge_time , -- 合服时间
|
|
|
TIMESTAMPDIFF(DAY, MAX(merge_time), NOW()) start_day, -- 开服天数
|
|
|
MAX(sum_server_count) as sum_server_count, -- 合服次数
|
|
|
+ MAX(c.is_merge) as is_merge, -- 是否参与过合服
|
|
|
MAX(b.main_server_id) as main_server_id, -- 主服ID
|
|
|
MAX(b.main_server_name) as main_server_name, -- 主服名
|
|
|
MAX(son_server_ids) as son_server_ids, -- 合服的子服ID列表
|
|
@@ -2200,6 +2259,14 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
) c on a.source_system = c.source_system AND a.game_id = c.game_id AND a.main_server_id = c.server_id
|
|
|
group by a.server_id , a.source_system , a.game_id
|
|
|
) b ON a.source_system = b.b_source_system AND a.super_game_id = b.b_game_id AND a.boss_server_id = b.b_server_id
|
|
|
+ LEFT JOIN (
|
|
|
+ SELECT
|
|
|
+ source_system as c_source_system,
|
|
|
+ game_id,
|
|
|
+ server_id,
|
|
|
+ is_merge
|
|
|
+ FROM dm_game_order.t_game_server_merge
|
|
|
+ ) c on a.source_system = c.c_source_system AND a.boss_server_id = c.server_id AND a.super_game_id = c.game_id
|
|
|
""";
|
|
|
}
|
|
|
|
|
@@ -2222,6 +2289,7 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
MAX(merge_time) as merge_time , -- 合服时间
|
|
|
TIMESTAMPDIFF(DAY, MAX(merge_time), NOW()) start_day, -- 开服天数
|
|
|
MAX(sum_server_count) as sum_server_count, -- 合服次数
|
|
|
+ MAX(c.is_merge) as is_merge, -- 是否参与过合服
|
|
|
MAX(b.main_server_id) as main_server_id, -- 主服ID
|
|
|
MAX(b.main_server_name) as main_server_name, -- 主服名
|
|
|
MAX(son_server_ids) as son_server_ids, -- 合服的子服ID列表
|
|
@@ -2372,6 +2440,14 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
) c on a.source_system = c.source_system AND a.game_id = c.game_id AND a.main_server_id = c.server_id
|
|
|
group by a.server_id , a.source_system , a.game_id
|
|
|
) b ON a.source_system = b.b_source_system AND a.super_game_id = b.b_game_id AND a.boss_server_id = b.b_server_id
|
|
|
+ LEFT JOIN (
|
|
|
+ SELECT
|
|
|
+ source_system as c_source_system,
|
|
|
+ game_id,
|
|
|
+ server_id,
|
|
|
+ is_merge
|
|
|
+ FROM dm_game_order.t_game_server_merge
|
|
|
+ ) c on a.source_system = c.c_source_system AND a.boss_server_id = c.server_id AND a.super_game_id = c.game_id
|
|
|
""" + cri +
|
|
|
"""
|
|
|
) a
|