修复 查询用户列表条件缺少的问题
This commit is contained in:
parent
75dcec77f1
commit
e3dde6274f
@ -9,4 +9,5 @@ public class SystemRole {
|
|||||||
private String roleId;
|
private String roleId;
|
||||||
private long status;
|
private long status;
|
||||||
private String description;
|
private String description;
|
||||||
|
private int level;
|
||||||
}
|
}
|
||||||
|
@ -96,9 +96,9 @@ public class UserServiceImpl implements UserService {
|
|||||||
queryConditions.put("excludeUid", uid);
|
queryConditions.put("excludeUid", uid);
|
||||||
|
|
||||||
List<UserInfo> userInfos;
|
List<UserInfo> userInfos;
|
||||||
|
log.info("要查询的用户类型是:"+userListParam.getUserType());
|
||||||
if (Objects.equals(userListParam.getUserType(), "activate")) {
|
if (Objects.equals(userListParam.getUserType(), "activate")) {
|
||||||
// 如果有额外的激活状态条件,也可以加入到queryConditions中,比如限制不能查询身份等级比自己高的 | todo 这个任务涉及到新增字段
|
// 如果有额外的激活状态条件,也可以加入到queryConditions中,比如限制不能查询身份等级比自己高的 | todo 这个任务涉及到新增字段 | 已经新增字段level
|
||||||
userInfos = userMapper.getUserListActivate(limit, end, merchantCode, queryConditions);
|
userInfos = userMapper.getUserListActivate(limit, end, merchantCode, queryConditions);
|
||||||
} else if (Objects.equals(userListParam.getUserType(), "disabled")) {
|
} else if (Objects.equals(userListParam.getUserType(), "disabled")) {
|
||||||
// 同上,可以加入禁用状态条件
|
// 同上,可以加入禁用状态条件
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<if test="queryConditions.excludeUid != null">
|
<if test="queryConditions.excludeUid != null">
|
||||||
AND id != #{queryConditions.excludeUid}
|
AND id != #{queryConditions.excludeUid}
|
||||||
</if>
|
</if>
|
||||||
LIMIT #{limit}
|
LIMIT #{limit},#{end}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- getUserListDisabled 方法 -->
|
<!-- getUserListDisabled 方法 -->
|
||||||
@ -27,7 +27,7 @@
|
|||||||
<if test="queryConditions.excludeUid != null">
|
<if test="queryConditions.excludeUid != null">
|
||||||
AND id != #{queryConditions.excludeUid}
|
AND id != #{queryConditions.excludeUid}
|
||||||
</if>
|
</if>
|
||||||
LIMIT #{limit}
|
LIMIT #{limit},#{end}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- getUserListAll 方法 -->
|
<!-- getUserListAll 方法 -->
|
||||||
|
@ -4,6 +4,7 @@ import org.junit.jupiter.api.Test;
|
|||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
||||||
import javax.xml.transform.Result;
|
import javax.xml.transform.Result;
|
||||||
|
import java.util.Scanner;
|
||||||
|
|
||||||
@SpringBootTest
|
@SpringBootTest
|
||||||
class HarmonyLifeServerApplicationTests {
|
class HarmonyLifeServerApplicationTests {
|
||||||
@ -12,8 +13,4 @@ class HarmonyLifeServerApplicationTests {
|
|||||||
void contextLoads() {
|
void contextLoads() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void add(int a){
|
|
||||||
System.out.println(a);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user