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()); }