From 53da9d8ed249ed3d0d7cb938f2c8121da8109aff Mon Sep 17 00:00:00 2001 From: linfeng <2445465217@qq.com> Date: Wed, 4 Jan 2023 10:53:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/admin/service/impl/PostServiceImpl.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/io/linfeng/modules/admin/service/impl/PostServiceImpl.java b/src/main/java/io/linfeng/modules/admin/service/impl/PostServiceImpl.java index e445c29..6e9cf12 100644 --- a/src/main/java/io/linfeng/modules/admin/service/impl/PostServiceImpl.java +++ b/src/main/java/io/linfeng/modules/admin/service/impl/PostServiceImpl.java @@ -60,12 +60,8 @@ public class PostServiceImpl extends ServiceImpl implements @Override public PageUtils queryPage(Map params) { QueryWrapper queryWrapper=new QueryWrapper<>(); - //条件查询 String key = (String)params.get("key"); String status = (String)params.get("status"); -// if(!ObjectUtil.isEmpty(key)){ -// queryWrapper.like("content", key).or().like("title",key); -// } queryWrapper .like(!ObjectUtil.isEmpty(status),"content", key) .or() @@ -93,8 +89,6 @@ public class PostServiceImpl extends ServiceImpl implements } - - @Override @Transactional(rollbackFor = Exception.class) public void deleteByAdmin(List ids) { @@ -108,7 +102,8 @@ public class PostServiceImpl extends ServiceImpl implements @Override public Integer getPostNumByUid(Integer uid) { - return this.lambdaQuery().eq(PostEntity::getUid,uid) + return this.lambdaQuery() + .eq(PostEntity::getUid,uid) .count(); }