From 6d9be423406fcfad6e17d9b692e9a53290fe09c5 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, 9 Jun 2022 10:34:34 +0800 Subject: [PATCH] =?UTF-8?q?pro=20=E6=95=B0=E6=8D=AE=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-prod.yaml | 18 +++++++++--------- .../service/project/ProjectServiceImpl.java | 5 +++-- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/yudao-server/src/main/resources/application-prod.yaml b/yudao-server/src/main/resources/application-prod.yaml index 56476843..f90fbcc5 100644 --- a/yudao-server/src/main/resources/application-prod.yaml +++ b/yudao-server/src/main/resources/application-prod.yaml @@ -45,23 +45,23 @@ spring: primary: master datasource: master: - name: ruoyi-vue-pro + name: ruoyi_pro url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true driver-class-name: com.mysql.cj.jdbc.Driver - username: root - password: 4730da9b + username: vue_pro + password: CrnPu&g8HqbBikrA&DH-llRgtvpIrG#- slave: # 模拟从库,可根据自己需要修改 - name: ruoyi-vue-pro + name: ruoyi_pro url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true driver-class-name: com.mysql.cj.jdbc.Driver - username: root - password: 4730da9b + username: vue_pro + password: CrnPu&g8HqbBikrA&DH-llRgtvpIrG#- bxg: # 农场数据源 - name: bxg + name: ruoyi_pro_bxg url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.bxg.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true driver-class-name: com.mysql.cj.jdbc.Driver - username: root - password: 4730da9b + username: vue_pro + password: CrnPu&g8HqbBikrA&DH-llRgtvpIrG#- # farm: # 农场数据源 # name: zsw-farm # url: jdbc:p6spy:mysql://192.168.10.129:3306/${spring.datasource.dynamic.datasource.farm.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true 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 ff561b0b..6ce5c8a7 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 @@ -144,9 +144,10 @@ public class ProjectServiceImpl implements ProjectService { queryWrapperX.between(ProjectDO::getCreateTime, startTime, nowTime); } - if (ObjectUtil.isNotEmpty(pageDTO.getDraft()) && pageDTO.getDraft()){ + queryWrapperX.eqIfPresent(ProjectDO::getDraft, pageDTO.getDraft()); + + if (pageDTO.getDraft()){ //查看自己的草稿 - queryWrapperX.eqIfPresent(ProjectDO::getDraft, pageDTO.getDraft()); queryWrapperX.eqIfPresent(ProjectDO::getCreator, getLoginUserId()); }