Browse Source

pro 数据库

zyh
小久哥 3 years ago
parent
commit
6d9be42340
  1. 18
      yudao-server/src/main/resources/application-prod.yaml
  2. 5
      zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/project/ProjectServiceImpl.java

18
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

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

Loading…
Cancel
Save