Browse Source

优化管控记录错误

取消数据库定时备份
develop
zhaoxianglong 4 months ago
parent
commit
334be32dd5
  1. 6
      zc-business/src/main/java/com/zc/business/controller/DcMYSQLJob.java
  2. 9
      zc-business/src/main/java/com/zc/business/interfaces/OperationLogAspect.java

6
zc-business/src/main/java/com/zc/business/controller/DcMYSQLJob.java

@ -35,7 +35,7 @@ public class DcMYSQLJob {
// this.environment = environment;
//}
@Scheduled(cron = "0 0 22 * * ?")
//@Scheduled(cron = "0 0 22 * * ?")
//@Scheduled(cron = "0 10 * * * ?")
public void backupAthena() throws IOException {
//String url = "jdbc:mysql://10.0.111.11:3306/athena?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true";
@ -43,7 +43,7 @@ public class DcMYSQLJob {
extracted(UniversalEnum.ATHENA.getValue(), "athena");
}
@Scheduled(cron = "0 30 22 * * ?")
//@Scheduled(cron = "0 30 22 * * ?")
//@Scheduled(cron = "0 20 * * * ?")
public void backupJiHeDC() throws IOException {
// 数据库配置信息
@ -52,7 +52,7 @@ public class DcMYSQLJob {
extracted(UniversalEnum.JIHE_DC.getValue(), "jihe-dc");
}
@Scheduled(cron = "0 0 23 * * ?")
//@Scheduled(cron = "0 0 23 * * ?")
//@Scheduled(cron = "0 30 * * * ?")
public void backupJiHeDCPro() throws IOException {
// 数据库配置信息

9
zc-business/src/main/java/com/zc/business/interfaces/OperationLogAspect.java

@ -469,9 +469,10 @@ public class OperationLogAspect {
if (loginUser != null) {
SysDept sysDept = deptService.selectDeptById(loginUser.getDeptId());
operLog.setOperName(loginUser.getUsername());
if (sysDept != null) {
operLog.setDeptName(sysDept.getDeptName());
}
operLog.setOperName(loginUser.getUsername());
operLog.setOperLocation(loginUser.getLoginLocation());
operLog.setOperType(UniversalEnum.TWO.getValue());
} else {
@ -592,8 +593,10 @@ public class OperationLogAspect {
if (loginUser != null) {
SysDept sysDept = deptService.selectDeptById(loginUser.getDeptId());
operLog.setOperName(loginUser.getUsername());
if (sysDept != null) {
operLog.setDeptName(sysDept.getDeptName());
}
operLog.setOperName(loginUser.getUsername());
operLog.setOperLocation(loginUser.getLoginLocation());
operLog.setOperType(UniversalEnum.ZERO.getValue());
} else {

Loading…
Cancel
Save