diff --git a/src/main/java/com/guaiguailang/harmony/domain/entity/SystemRole.java b/src/main/java/com/guaiguailang/harmony/domain/entity/SystemRole.java index d5bb308..61962c3 100644 --- a/src/main/java/com/guaiguailang/harmony/domain/entity/SystemRole.java +++ b/src/main/java/com/guaiguailang/harmony/domain/entity/SystemRole.java @@ -9,4 +9,5 @@ public class SystemRole { private String roleId; private long status; private String description; + private int level; } diff --git a/src/main/java/com/guaiguailang/harmony/service/impl/UserServiceImpl.java b/src/main/java/com/guaiguailang/harmony/service/impl/UserServiceImpl.java index 55a8c42..d8ab549 100644 --- a/src/main/java/com/guaiguailang/harmony/service/impl/UserServiceImpl.java +++ b/src/main/java/com/guaiguailang/harmony/service/impl/UserServiceImpl.java @@ -96,9 +96,9 @@ public class UserServiceImpl implements UserService { queryConditions.put("excludeUid", uid); List userInfos; - + log.info("要查询的用户类型是:"+userListParam.getUserType()); if (Objects.equals(userListParam.getUserType(), "activate")) { - // 如果有额外的激活状态条件,也可以加入到queryConditions中,比如限制不能查询身份等级比自己高的 | todo 这个任务涉及到新增字段 + // 如果有额外的激活状态条件,也可以加入到queryConditions中,比如限制不能查询身份等级比自己高的 | todo 这个任务涉及到新增字段 | 已经新增字段level userInfos = userMapper.getUserListActivate(limit, end, merchantCode, queryConditions); } else if (Objects.equals(userListParam.getUserType(), "disabled")) { // 同上,可以加入禁用状态条件 diff --git a/src/main/resources/mapper/UserMapper.xml b/src/main/resources/mapper/UserMapper.xml index 68b0124..b01c45f 100644 --- a/src/main/resources/mapper/UserMapper.xml +++ b/src/main/resources/mapper/UserMapper.xml @@ -14,7 +14,7 @@ AND id != #{queryConditions.excludeUid} - LIMIT #{limit} + LIMIT #{limit},#{end} @@ -27,7 +27,7 @@ AND id != #{queryConditions.excludeUid} - LIMIT #{limit} + LIMIT #{limit},#{end} diff --git a/src/test/java/com/guaiguailang/harmony/HarmonyLifeServerApplicationTests.java b/src/test/java/com/guaiguailang/harmony/HarmonyLifeServerApplicationTests.java index ff5694f..4f9acfd 100644 --- a/src/test/java/com/guaiguailang/harmony/HarmonyLifeServerApplicationTests.java +++ b/src/test/java/com/guaiguailang/harmony/HarmonyLifeServerApplicationTests.java @@ -4,6 +4,7 @@ import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; import javax.xml.transform.Result; +import java.util.Scanner; @SpringBootTest class HarmonyLifeServerApplicationTests { @@ -12,8 +13,4 @@ class HarmonyLifeServerApplicationTests { void contextLoads() { } - public void add(int a){ - System.out.println(a); - } - }