Explorar el Código

feat:帮派角色列表增加等级类型

zhangxianyu hace 1 mes
padre
commit
866f6eccb8

+ 5 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/RoleGameCountryParamDTO.java

@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
 import javax.validation.constraints.Size;
 import java.util.List;
 
@@ -24,6 +25,10 @@ public class RoleGameCountryParamDTO extends BasePage {
    @NotEmpty(message = "区服不能为空")
    private String serverId;
 
+   @ApiModelProperty(value = "等级类型 0小于13,1大于13")
+   @NotNull(message = "等级类型不能为空")
+   private Long countryLevel;
+
    private String sortFiled;
 
    private String sortType;

+ 7 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/RoleManageServiceImpl.java

@@ -1341,6 +1341,12 @@ public class RoleManageServiceImpl implements IRoleManageService {
             cri.where().andEquals("server_id", dto.getServerId());
         }
         cri.where().andInList("game_id", Arrays.asList(35L, 36L, 10035L));
+        if(dto.getCountryLevel()!=null&&dto.getCountryLevel()==0){
+            cri.where().andLTE("role_level",13);
+        }
+        if(dto.getCountryLevel()!=null&&dto.getCountryLevel()==1){
+            cri.where().andGT("role_level",13);
+        }
         return cri;
     }
 
@@ -1383,7 +1389,7 @@ public class RoleManageServiceImpl implements IRoleManageService {
                                       a.game_id,
                                       a.server_name,
                                       IFNULL(c.role_total_amount, 0) as role_total_amount,
-                                      if(b.role_level <= 13, 1, 0)      as country_level,
+                                      if(b.role_level <= 13, 0, 1)      as country_level,
                                       if(d.role_id is not null, 1, 0) as active,
                                       a.server_id,
                                       concat(a.country,',',a.server_id) as cs