修复 查询用户列表条件缺少的问题
This commit is contained in:
parent
75dcec77f1
commit
e3dde6274f
@ -9,4 +9,5 @@ public class SystemRole {
|
||||
private String roleId;
|
||||
private long status;
|
||||
private String description;
|
||||
private int level;
|
||||
}
|
||||
|
@ -96,9 +96,9 @@ public class UserServiceImpl implements UserService {
|
||||
queryConditions.put("excludeUid", uid);
|
||||
|
||||
List<UserInfo> 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")) {
|
||||
// 同上,可以加入禁用状态条件
|
||||
|
@ -14,7 +14,7 @@
|
||||
<if test="queryConditions.excludeUid != null">
|
||||
AND id != #{queryConditions.excludeUid}
|
||||
</if>
|
||||
LIMIT #{limit}
|
||||
LIMIT #{limit},#{end}
|
||||
</select>
|
||||
|
||||
<!-- getUserListDisabled 方法 -->
|
||||
@ -27,7 +27,7 @@
|
||||
<if test="queryConditions.excludeUid != null">
|
||||
AND id != #{queryConditions.excludeUid}
|
||||
</if>
|
||||
LIMIT #{limit}
|
||||
LIMIT #{limit},#{end}
|
||||
</select>
|
||||
|
||||
<!-- getUserListAll 方法 -->
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user