|
@@ -101,7 +101,7 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
//去掉字符串中的‘[]’
|
|
|
String str = (String) map.get("role_amount");
|
|
|
if(str!=null&&str.contains("[") && str.contains("]")){
|
|
|
- map.put("role_amount", str.replaceAll("\\[|\\]", ""));
|
|
|
+ map.put("role_amount", str.replaceAll("[\\[\\]]", ""));
|
|
|
}
|
|
|
//去除‘null’字符串
|
|
|
List<String> nullStringKeys = Arrays.asList("add_corp_user_id", "user_wechat", "remark", "user_phone", "country");
|
|
@@ -111,7 +111,7 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
}
|
|
|
//去重userIds
|
|
|
userIds = userIds.stream().distinct().collect(Collectors.toList());
|
|
|
- //发送RPC接口查询所有用户
|
|
|
+// //发送RPC接口查询所有用户
|
|
|
ResultVO<Map<Long, String>> userMap = sysUserRpc.getUserNameByIds(userIds);
|
|
|
|
|
|
for (Map map : list) {
|
|
@@ -162,10 +162,10 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
|
|
|
//拼接24内充值金额条件
|
|
|
if(dto.getRechargeAmountWithin24h()!=null){
|
|
|
- criA = spliceRechargeAmountWithin24h(dto, criA);
|
|
|
+ spliceRechargeAmountWithin24h(dto, criA);
|
|
|
}
|
|
|
if(dto.getRechargeTotalAmountWithin24h()!=null){
|
|
|
- criA = spliceRechargeTotalAmountWithin24h(dto, criA);
|
|
|
+ spliceRechargeTotalAmountWithin24h(dto, criA);
|
|
|
}
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(dto.getParentGameIds())) {
|
|
@@ -296,12 +296,16 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
criA.where().andEquals("is_add_corp_wechat", dto.getIsAddCorpWechat());
|
|
|
}
|
|
|
}
|
|
|
+ //角色最近活跃时间
|
|
|
+ if(dto.getLastActiveTimeMax()!=null && dto.getLastActiveTimeMin()!=null){
|
|
|
+ criA.where().andBetween("DATE(role_active_time)", dto.getLastActiveTimeMin(), dto.getLastActiveTimeMax());
|
|
|
+ }
|
|
|
+
|
|
|
return criA;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 根据时间条件生成查询sql
|
|
|
- * @return
|
|
|
*/
|
|
|
private Criteria getDateSqlByQuery(RoleRechargeRankingDTO dto){
|
|
|
Criteria criTodayAmount = Cnd.cri();
|
|
@@ -315,21 +319,18 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
}
|
|
|
|
|
|
|
|
|
- private Criteria spliceRechargeTotalAmountWithin24h(RoleRechargeRankingDTO dto, Criteria criA) {
|
|
|
+ private void spliceRechargeTotalAmountWithin24h(RoleRechargeRankingDTO dto, Criteria criA) {
|
|
|
switch (dto.getRechargeTotalAmountWithin24hUnit()) {
|
|
|
case ">" -> criA.where().andGT("role_total_amount", dto.getRechargeTotalAmountWithin24h());
|
|
|
case ">=" -> criA.where().andGTE("role_total_amount", dto.getRechargeTotalAmountWithin24h());
|
|
|
case "=" -> criA.where().andEquals("role_total_amount", dto.getRechargeTotalAmountWithin24h());
|
|
|
case "<" -> criA.where().andLT("role_total_amount", dto.getRechargeTotalAmountWithin24h());
|
|
|
case "<=" -> criA.where().andLTE("role_total_amount", dto.getRechargeTotalAmountWithin24h());
|
|
|
- default -> {
|
|
|
- criA.where().andGTE("role_total_amount", dto.getRechargeTotalAmountWithin24h());
|
|
|
- }
|
|
|
+ default -> criA.where().andGTE("role_total_amount", dto.getRechargeTotalAmountWithin24h());
|
|
|
}
|
|
|
- return criA;
|
|
|
}
|
|
|
|
|
|
- private Criteria spliceRechargeAmountWithin24h(RoleRechargeRankingDTO dto, Criteria criA) {
|
|
|
+ private void spliceRechargeAmountWithin24h(RoleRechargeRankingDTO dto, Criteria criA) {
|
|
|
switch (dto.getRechargeAmountWithin24hUnit()) {
|
|
|
case ">" -> criA.where().andGT("max_amount", dto.getRechargeAmountWithin24h());
|
|
|
// case ">=" -> criA.where().andGTE("max_amount", dto.getRechargeAmountWithin24h());
|
|
@@ -337,11 +338,8 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
case "=" -> criA.where().andEquals("array_contains(role_amount,"+dto.getRechargeAmountWithin24h()+")", 1);
|
|
|
case "<" -> criA.where().andLT("min_amount", dto.getRechargeAmountWithin24h());
|
|
|
// case "<=" -> criA.where().andLTE("max_amount", dto.getRechargeAmountWithin24h());
|
|
|
- default -> {
|
|
|
- criA.where().andGT("max_amount", dto.getRechargeAmountWithin24h());
|
|
|
- }
|
|
|
+ default -> criA.where().andGT("max_amount", dto.getRechargeAmountWithin24h());
|
|
|
}
|
|
|
- return criA;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -385,7 +383,6 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
|
|
|
/**
|
|
|
* 创建发送消息任务
|
|
|
- * @param dto
|
|
|
*/
|
|
|
@Override
|
|
|
public void createSendMsgTask(SendMsgTaskDTO dto) {
|
|
@@ -438,8 +435,6 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
|
|
|
/**
|
|
|
* 获取角色列表
|
|
|
- * @param dto
|
|
|
- * @return
|
|
|
*/
|
|
|
@Override
|
|
|
public List<Map> getRoleList(RoleRechargeRankingDTO dto) {
|
|
@@ -457,10 +452,10 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
|
|
|
//拼接24内充值金额条件
|
|
|
if(dto.getRechargeAmountWithin24h()!=null){
|
|
|
- criA = spliceRechargeAmountWithin24h(dto, criA);
|
|
|
+ spliceRechargeAmountWithin24h(dto, criA);
|
|
|
}
|
|
|
if(dto.getRechargeTotalAmountWithin24h()!=null){
|
|
|
- criA = spliceRechargeTotalAmountWithin24h(dto, criA);
|
|
|
+ spliceRechargeTotalAmountWithin24h(dto, criA);
|
|
|
}
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(dto.getParentGameIds())) {
|
|
@@ -659,8 +654,6 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
|
|
|
/**
|
|
|
* 获取创建人名称
|
|
|
- * @param sendMsgTaskList
|
|
|
- * @return
|
|
|
*/
|
|
|
private Map<Long, String> getCreateByNameMap(PageUtil<SendMsgVO> sendMsgTaskList) {
|
|
|
//取创建人id变成list
|
|
@@ -717,9 +710,7 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
List<TaskResultDTO> list = sql.getList(TaskResultDTO.class);
|
|
|
//拼成map key为角色id
|
|
|
HashMap<String, TaskResultDTO> taskResultMap = new HashMap<>();
|
|
|
- list.forEach(item -> {
|
|
|
- taskResultMap.put(item.getRoleId(), item);
|
|
|
- });
|
|
|
+ list.forEach(item -> taskResultMap.put(item.getRoleId(), item));
|
|
|
sendMsgTaskResultList.getRecords().forEach(item -> {
|
|
|
TaskResultDTO taskResultDto = taskResultMap.get(item.getRoleId());
|
|
|
if(taskResultDto!=null){
|
|
@@ -778,45 +769,6 @@ public class RoleManageServiceImpl implements IRoleManageService {
|
|
|
""";
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 通过id获取 GS、运营、客服人员、投手名字
|
|
|
- * @param dataMap dataMap
|
|
|
- * @return String
|
|
|
- */
|
|
|
- private Map<String, Object> getNameById(Map<String, Object> dataMap){
|
|
|
-
|
|
|
- //投手名
|
|
|
- if (dataMap.get("put_user_id") != null) {
|
|
|
- if (sysUserRpc.getById(Long.valueOf((String) dataMap.get("put_user_id"))).getData() != null) {
|
|
|
- dataMap.put("put_user_name",
|
|
|
- sysUserRpc.getById(Long.valueOf((String) dataMap.get("put_user_id"))).getData().getNickname());
|
|
|
- }
|
|
|
- }
|
|
|
- //运营人员名
|
|
|
- if (dataMap.get("oper_user_id") != null) {
|
|
|
- if (sysUserRpc.getById((Long) dataMap.get("oper_user_id")).getData() != null) {
|
|
|
- dataMap.put("oper_user_name",
|
|
|
- sysUserRpc.getById((Long) dataMap.get("oper_user_id")).getData().getNickname());
|
|
|
- }
|
|
|
- }
|
|
|
- //GS人员名
|
|
|
- if (dataMap.get("gs_id") != null) {
|
|
|
- if (sysUserRpc.getById((Long) dataMap.get("gs_id")).getData() != null) {
|
|
|
- dataMap.put("gs_name",
|
|
|
- sysUserRpc.getById((Long) dataMap.get("gs_id")).getData().getNickname());
|
|
|
- }
|
|
|
- }
|
|
|
- //客服人员名
|
|
|
- if (dataMap.get("customer_service_id") != null) {
|
|
|
- if (sysUserRpc.getById((Long) dataMap.get("customer_service_id")).getData() != null) {
|
|
|
- dataMap.put("customer_service_name",
|
|
|
- sysUserRpc.getById((Long) dataMap.get("customer_service_id")).getData().getNickname());
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return dataMap;
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 原始服-父游戏
|
|
|
* @param dto RoleCombatRankingDTO
|