From f0084754ca9a6261ec1cebaa8efffc752f7bdd23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E4=B9=85=E5=93=A5?= <787952492@qq.com> Date: Sat, 11 Jun 2022 16:43:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E6=88=91=E7=9A=84=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=EF=BC=8C=20=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/cn/iocoder/yudao/config/WxCpConfigure.java | 9 ++------- .../controller/admin/project/dto/ProjectPageDTO.java | 3 +++ .../module/farm/service/project/ProjectServiceImpl.java | 6 ++++++ 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-biz-weixin/src/main/java/cn/iocoder/yudao/config/WxCpConfigure.java b/yudao-framework/yudao-spring-boot-starter-biz-weixin/src/main/java/cn/iocoder/yudao/config/WxCpConfigure.java index 439bb9c7..58ed1317 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-weixin/src/main/java/cn/iocoder/yudao/config/WxCpConfigure.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-weixin/src/main/java/cn/iocoder/yudao/config/WxCpConfigure.java @@ -25,13 +25,8 @@ public class WxCpConfigure { public WxCpService wxCpService(){ WxCpDefaultConfigImpl config = new WxCpDefaultConfigImpl(); - -// config.setCorpId("wwb9f9734e8e124761"); -// config.setCorpSecret("B2bdszjVvby6jfbZf-TQOGeslpOEzLFUYWHldYxtkWA"); - - config.setCorpId("ww17f8d10783494584"); - config.setCorpSecret("i5t-rh8bXeNCgihcYPrG9ZPpWkivzPJ69sv570osk6I"); - + config.setCorpId("wwb9f9734e8e124761"); + config.setCorpSecret("B2bdszjVvby6jfbZf-TQOGeslpOEzLFUYWHldYxtkWA"); WxCpServiceImpl wxCpService = new WxCpServiceImpl(); wxCpService.setWxCpConfigStorage(config); diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/dto/ProjectPageDTO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/dto/ProjectPageDTO.java index 01ef23f7..ab6eb87a 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/dto/ProjectPageDTO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/dto/ProjectPageDTO.java @@ -22,4 +22,7 @@ public class ProjectPageDTO extends PageDTO { @ApiModelProperty("true 草稿 false已发布") private Boolean draft; + + @ApiModelProperty("true查看我参与的项目") + private Boolean myProject; } \ No newline at end of file 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 6ce5c8a7..a67c65d1 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 @@ -29,6 +29,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.github.pagehelper.PageInfo; import com.zsw.base.R; +import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import javax.annotation.Resource; import org.springframework.validation.annotation.Validated; @@ -55,6 +56,7 @@ import static cn.iocoder.yudao.module.farm.enums.ErrorCodeConstants.*; */ @Service @Validated +@Slf4j public class ProjectServiceImpl implements ProjectService { @Resource @@ -151,6 +153,10 @@ public class ProjectServiceImpl implements ProjectService { queryWrapperX.eqIfPresent(ProjectDO::getCreator, getLoginUserId()); } + if (ObjectUtil.isNotEmpty(pageDTO.getMyProject()) && pageDTO.getMyProject()){ + //查看我参与的项目 + queryWrapperX.last(" and JSON_CONTAINS(members, '"+ getLoginUserId()+"')"); + } List list = projectMapper.selectList(queryWrapperX); if (ObjectUtil.isEmpty(list)){