|
@@ -1,5 +1,6 @@
|
|
package com.zanxiang.game.data.serve.service.impl;
|
|
package com.zanxiang.game.data.serve.service.impl;
|
|
|
|
|
|
|
|
+import com.github.sd4324530.jtuple.Tuple2;
|
|
import com.zanxiang.game.data.serve.component.DataPowerComponent;
|
|
import com.zanxiang.game.data.serve.component.DataPowerComponent;
|
|
import com.zanxiang.game.data.serve.pojo.dto.PlayerBannedListDTO;
|
|
import com.zanxiang.game.data.serve.pojo.dto.PlayerBannedListDTO;
|
|
import com.zanxiang.game.data.serve.pojo.dto.PlayerDataListDTO;
|
|
import com.zanxiang.game.data.serve.pojo.dto.PlayerDataListDTO;
|
|
@@ -53,8 +54,9 @@ public class PlayerDataServiceImpl implements IPlayerDataService {
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public Page<PlayerDataVO> getPlayerDataList(PlayerDataListDTO dto) {
|
|
public Page<PlayerDataVO> getPlayerDataList(PlayerDataListDTO dto) {
|
|
- List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
|
|
|
|
- List<Long> pitcherIds = StringUtils.isBlank(dto.getPitcherId()) ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(Long.valueOf(dto.getPitcherId()));
|
|
|
|
|
|
+ Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
|
|
|
|
+ List<Long> pitcherIds = StringUtils.isBlank(dto.getPitcherId()) ? poerInfo.first : Collections.singletonList(Long.valueOf(dto.getPitcherId()));
|
|
|
|
+ List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
|
|
|
|
|
|
//创建查询条件
|
|
//创建查询条件
|
|
Criteria cri = Cnd.cri();
|
|
Criteria cri = Cnd.cri();
|
|
@@ -208,6 +210,9 @@ public class PlayerDataServiceImpl implements IPlayerDataService {
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public Page<PlayerRoleDataVO> getPlayerRoleDataList(PlayerRoleDataListDTO dto) {
|
|
public Page<PlayerRoleDataVO> getPlayerRoleDataList(PlayerRoleDataListDTO dto) {
|
|
|
|
+ Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
|
|
|
|
+ List<Long> pitcherIds = StringUtils.isBlank(dto.getPitcherId()) ? poerInfo.first : Collections.singletonList(Long.valueOf(dto.getPitcherId()));
|
|
|
|
+ List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
|
|
//查询条件
|
|
//查询条件
|
|
Criteria cri = Cnd.cri();
|
|
Criteria cri = Cnd.cri();
|
|
if (dto.getUserId() != null) {
|
|
if (dto.getUserId() != null) {
|
|
@@ -238,9 +243,6 @@ public class PlayerDataServiceImpl implements IPlayerDataService {
|
|
if (dto.getCpId() != null) {
|
|
if (dto.getCpId() != null) {
|
|
cri.where().andEquals("cp_id", dto.getCpId());
|
|
cri.where().andEquals("cp_id", dto.getCpId());
|
|
}
|
|
}
|
|
- if (dto.getGameId() != null) {
|
|
|
|
- cri.where().andEquals("game_id", dto.getGameId());
|
|
|
|
- }
|
|
|
|
if (dto.getGameCategoryId() != null) {
|
|
if (dto.getGameCategoryId() != null) {
|
|
//游戏应用类型
|
|
//游戏应用类型
|
|
cri.where().andEquals("game_category_id", dto.getGameCategoryId());
|
|
cri.where().andEquals("game_category_id", dto.getGameCategoryId());
|
|
@@ -253,8 +255,11 @@ public class PlayerDataServiceImpl implements IPlayerDataService {
|
|
//渠道ID
|
|
//渠道ID
|
|
cri.where().andIn("agent_id", dto.getChannelId().toArray(String[]::new));
|
|
cri.where().andIn("agent_id", dto.getChannelId().toArray(String[]::new));
|
|
}
|
|
}
|
|
- if (StringUtils.isNotBlank(dto.getPitcherId())) {
|
|
|
|
- cri.where().andEquals("pitcher_id", dto.getPitcherId());
|
|
|
|
|
|
+ if (pitcherIds != null) {
|
|
|
|
+ cri.where().andInList("pitcher_id", pitcherIds);
|
|
|
|
+ }
|
|
|
|
+ if (gameIds != null) {
|
|
|
|
+ cri.where().andInList("game_id", gameIds);
|
|
}
|
|
}
|
|
if (StringUtils.isNotBlank(dto.getOs())) {
|
|
if (StringUtils.isNotBlank(dto.getOs())) {
|
|
cri.where().andEquals("os", dto.getOs());
|
|
cri.where().andEquals("os", dto.getOs());
|
|
@@ -338,8 +343,16 @@ public class PlayerDataServiceImpl implements IPlayerDataService {
|
|
return new Page<>(list, pager);
|
|
return new Page<>(list, pager);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 玩家角色列表总计一栏
|
|
|
|
+ * @param dto PlayerRoleDataListDTO
|
|
|
|
+ * @return PlayerRoleDataVO
|
|
|
|
+ */
|
|
@Override
|
|
@Override
|
|
public PlayerRoleDataVO getPlayerRoleTotalData(PlayerRoleDataListDTO dto) {
|
|
public PlayerRoleDataVO getPlayerRoleTotalData(PlayerRoleDataListDTO dto) {
|
|
|
|
+ Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
|
|
|
|
+ List<Long> pitcherIds = StringUtils.isBlank(dto.getPitcherId()) ? poerInfo.first : Collections.singletonList(Long.valueOf(dto.getPitcherId()));
|
|
|
|
+ List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
|
|
//查询条件
|
|
//查询条件
|
|
Criteria cri = Cnd.cri();
|
|
Criteria cri = Cnd.cri();
|
|
if (dto.getUserId() != null) {
|
|
if (dto.getUserId() != null) {
|
|
@@ -370,9 +383,6 @@ public class PlayerDataServiceImpl implements IPlayerDataService {
|
|
if (dto.getCpId() != null) {
|
|
if (dto.getCpId() != null) {
|
|
cri.where().andEquals("cp_id", dto.getCpId());
|
|
cri.where().andEquals("cp_id", dto.getCpId());
|
|
}
|
|
}
|
|
- if (dto.getGameId() != null) {
|
|
|
|
- cri.where().andEquals("game_id", dto.getGameId());
|
|
|
|
- }
|
|
|
|
if (dto.getGameCategoryId() != null) {
|
|
if (dto.getGameCategoryId() != null) {
|
|
//游戏应用类型
|
|
//游戏应用类型
|
|
cri.where().andEquals("game_category_id", dto.getGameCategoryId());
|
|
cri.where().andEquals("game_category_id", dto.getGameCategoryId());
|
|
@@ -385,8 +395,11 @@ public class PlayerDataServiceImpl implements IPlayerDataService {
|
|
//渠道ID
|
|
//渠道ID
|
|
cri.where().andIn("agent_id", dto.getChannelId().toArray(String[]::new));
|
|
cri.where().andIn("agent_id", dto.getChannelId().toArray(String[]::new));
|
|
}
|
|
}
|
|
- if (StringUtils.isNotBlank(dto.getPitcherId())) {
|
|
|
|
- cri.where().andEquals("pitcher_id", dto.getPitcherId());
|
|
|
|
|
|
+ if (pitcherIds != null) {
|
|
|
|
+ cri.where().andInList("pitcher_id", pitcherIds);
|
|
|
|
+ }
|
|
|
|
+ if (gameIds != null) {
|
|
|
|
+ cri.where().andInList("game_id", gameIds);
|
|
}
|
|
}
|
|
if (StringUtils.isNotBlank(dto.getOs())) {
|
|
if (StringUtils.isNotBlank(dto.getOs())) {
|
|
cri.where().andEquals("os", dto.getOs());
|
|
cri.where().andEquals("os", dto.getOs());
|
|
@@ -451,6 +464,8 @@ public class PlayerDataServiceImpl implements IPlayerDataService {
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public Page<Map> getPlayerLoginLogDataList(PlayerLoginLogDataListDTO dto) {
|
|
public Page<Map> getPlayerLoginLogDataList(PlayerLoginLogDataListDTO dto) {
|
|
|
|
+ Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
|
|
|
|
+ List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
|
|
//查询条件
|
|
//查询条件
|
|
Criteria cri = Cnd.cri();
|
|
Criteria cri = Cnd.cri();
|
|
if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
@@ -466,8 +481,8 @@ public class PlayerDataServiceImpl implements IPlayerDataService {
|
|
if (dto.getUserId() != null) {
|
|
if (dto.getUserId() != null) {
|
|
cri.where().andEquals("user_id", dto.getUserId());
|
|
cri.where().andEquals("user_id", dto.getUserId());
|
|
}
|
|
}
|
|
- if (dto.getGameId() != null) {
|
|
|
|
- cri.where().andEquals("game_id", dto.getGameId());
|
|
|
|
|
|
+ if (gameIds != null) {
|
|
|
|
+ cri.where().andInList("game_id", gameIds);
|
|
}
|
|
}
|
|
if (dto.getGameClassify() != null) {
|
|
if (dto.getGameClassify() != null) {
|
|
cri.where().andEquals("classify", dto.getGameClassify());
|
|
cri.where().andEquals("classify", dto.getGameClassify());
|