From 79b5eb0836b23baed345be9f9698a0f7a3ffeba1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E4=B9=85=E5=93=A5?= <787952492@qq.com> Date: Thu, 16 Jun 2022 14:58:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E5=8F=82=E4=B8=8E=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=20=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/farm/service/project/ProjectServiceImpl.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/project/ProjectServiceImpl.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/project/ProjectServiceImpl.java index 743a5d48..85099abc 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/project/ProjectServiceImpl.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/project/ProjectServiceImpl.java @@ -153,7 +153,6 @@ public class ProjectServiceImpl implements ProjectService { LocalDateTime startTime = pageDTO.getTimeLimit() == 2 ? nowTime.minusDays(3) : nowTime.minusDays(14); queryWrapperX.between(ProjectDO::getCreateTime, startTime, nowTime); } - queryWrapperX.eqIfPresent(ProjectDO::getDraft, pageDTO.getDraft()); if (pageDTO.getDraft()){ //查看自己的草稿 @@ -165,11 +164,10 @@ public class ProjectServiceImpl implements ProjectService { CpUserDO user = cpUserMapper.selectOne(Wrappers.lambdaQuery().eq(CpUserDO::getUserId, adminUser.getUsername())); if (ObjectUtil.isNotEmpty(user)){ //查看我参与或创建的项目 - queryWrapperX.last(" and (JSON_CONTAINS(members, '"+ user.getId()+"') or creator = " + getLoginUserId() +") ORDER BY id") ; + queryWrapperX.apply(" ((JSON_CONTAINS(members, '"+ user.getId()+"') or creator = " + getLoginUserId() +"))"); } - }else{ - queryWrapperX.orderByDesc(ProjectDO::getId); } + queryWrapperX.orderByDesc(ProjectDO::getId); List list = projectMapper.selectList(queryWrapperX); if (ObjectUtil.isEmpty(list)){