后台管理条件查询bug修复
This commit is contained in:
parent
c70fdd64d4
commit
d7b8723479
@ -80,8 +80,9 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserDao, AppUserEntity> i
|
|||||||
//模糊查询
|
//模糊查询
|
||||||
String key = (String) params.get("key");
|
String key = (String) params.get("key");
|
||||||
if (!ObjectUtil.isEmpty(key)) {
|
if (!ObjectUtil.isEmpty(key)) {
|
||||||
params.put("page", "1");//如果是查询分页重置为第一页
|
queryWrapper.like("username", key)
|
||||||
queryWrapper.like("username", key).or().like("mobile", key);
|
.or()
|
||||||
|
.like("mobile", key);
|
||||||
}
|
}
|
||||||
queryWrapper.lambda().orderByDesc(AppUserEntity::getUid);
|
queryWrapper.lambda().orderByDesc(AppUserEntity::getUid);
|
||||||
IPage<AppUserEntity> page = this.page(
|
IPage<AppUserEntity> page = this.page(
|
||||||
|
@ -63,14 +63,13 @@ public class PostServiceImpl extends ServiceImpl<PostDao, PostEntity> implements
|
|||||||
//条件查询
|
//条件查询
|
||||||
String key = (String)params.get("key");
|
String key = (String)params.get("key");
|
||||||
String status = (String)params.get("status");
|
String status = (String)params.get("status");
|
||||||
if(!ObjectUtil.isEmpty(key)){
|
// if(!ObjectUtil.isEmpty(key)){
|
||||||
params.put("page","1");//如果是查询分页重置为第一页
|
// queryWrapper.like("content", key).or().like("title",key);
|
||||||
queryWrapper.like("content", key).or().like("title",key);
|
// }
|
||||||
}
|
queryWrapper
|
||||||
if(!ObjectUtil.isEmpty(status)){
|
.like(!ObjectUtil.isEmpty(status),"content", key)
|
||||||
params.put("page","1");//如果是查询分页重置为第一页
|
.or()
|
||||||
queryWrapper.eq("status", Integer.parseInt(status));
|
.like(!ObjectUtil.isEmpty(status),"title",key);
|
||||||
}
|
|
||||||
queryWrapper.lambda().orderByDesc(PostEntity::getId);
|
queryWrapper.lambda().orderByDesc(PostEntity::getId);
|
||||||
IPage<PostEntity> page = this.page(
|
IPage<PostEntity> page = this.page(
|
||||||
new Query<PostEntity>().getPage(params),
|
new Query<PostEntity>().getPage(params),
|
||||||
|
Loading…
Reference in New Issue
Block a user