Quellcode durchsuchen

feat:角色等级列表-增加玩家名称字段与玩家字段筛选条件

zhangxianyu vor 2 Monaten
Ursprung
Commit
0dbb383c73

+ 6 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/RoleLevelParamDTO.java

@@ -17,6 +17,12 @@ import java.util.List;
 @Data
 public class RoleLevelParamDTO extends BasePage {
 
+   @ApiModelProperty(value = "玩家id")
+   private List<Long> userId;
+
+   @ApiModelProperty(value = "玩家名称")
+   private String userName;
+
    @ApiModelProperty(value = "游戏角色id")
    private String roleId;
 

+ 9 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/RoleManageServiceImpl.java

@@ -932,6 +932,14 @@ public class RoleManageServiceImpl implements IRoleManageService {
 
     private Criteria getSqlByQuery(RoleLevelParamDTO dto) {
         Criteria criA = Cnd.cri();
+        if(CollectionUtils.isNotEmpty(dto.getUserId())){
+            //玩家id
+            criA.where().andInList("user_id", dto.getUserId());
+        }
+        if (StringUtils.isNotEmpty(dto.getUserName())) {
+            //玩家名称
+            criA.where().andLike("user_name", dto.getUserName());
+        }
         if (StringUtils.isNotEmpty(dto.getServerName())) {
             //区服名称
             criA.where().andLike("server_name", dto.getServerName());
@@ -981,6 +989,7 @@ public class RoleManageServiceImpl implements IRoleManageService {
                     role_id as roleId,
                     role_name as roleName,
                     user_id as userId,
+                    user_name as userName,
                     game_id as gameId,
                     game_name as gameName,
                     server_id as serverId,