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; // this.environment = environment;
//} //}
@Scheduled(cron = "0 0 22 * * ?") //@Scheduled(cron = "0 0 22 * * ?")
//@Scheduled(cron = "0 10 * * * ?") //@Scheduled(cron = "0 10 * * * ?")
public void backupAthena() throws IOException { 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"; //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"); extracted(UniversalEnum.ATHENA.getValue(), "athena");
} }
@Scheduled(cron = "0 30 22 * * ?") //@Scheduled(cron = "0 30 22 * * ?")
//@Scheduled(cron = "0 20 * * * ?") //@Scheduled(cron = "0 20 * * * ?")
public void backupJiHeDC() throws IOException { public void backupJiHeDC() throws IOException {
// 数据库配置信息 // 数据库配置信息
@ -52,7 +52,7 @@ public class DcMYSQLJob {
extracted(UniversalEnum.JIHE_DC.getValue(), "jihe-dc"); extracted(UniversalEnum.JIHE_DC.getValue(), "jihe-dc");
} }
@Scheduled(cron = "0 0 23 * * ?") //@Scheduled(cron = "0 0 23 * * ?")
//@Scheduled(cron = "0 30 * * * ?") //@Scheduled(cron = "0 30 * * * ?")
public void backupJiHeDCPro() throws IOException { 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) { if (loginUser != null) {
SysDept sysDept = deptService.selectDeptById(loginUser.getDeptId()); SysDept sysDept = deptService.selectDeptById(loginUser.getDeptId());
if (sysDept != null) {
operLog.setOperName(loginUser.getUsername());
operLog.setDeptName(sysDept.getDeptName()); operLog.setDeptName(sysDept.getDeptName());
}
operLog.setOperName(loginUser.getUsername());
operLog.setOperLocation(loginUser.getLoginLocation()); operLog.setOperLocation(loginUser.getLoginLocation());
operLog.setOperType(UniversalEnum.TWO.getValue()); operLog.setOperType(UniversalEnum.TWO.getValue());
} else { } else {
@ -592,8 +593,10 @@ public class OperationLogAspect {
if (loginUser != null) { if (loginUser != null) {
SysDept sysDept = deptService.selectDeptById(loginUser.getDeptId()); SysDept sysDept = deptService.selectDeptById(loginUser.getDeptId());
operLog.setOperName(loginUser.getUsername()); if (sysDept != null) {
operLog.setDeptName(sysDept.getDeptName()); operLog.setDeptName(sysDept.getDeptName());
}
operLog.setOperName(loginUser.getUsername());
operLog.setOperLocation(loginUser.getLoginLocation()); operLog.setOperLocation(loginUser.getLoginLocation());
operLog.setOperType(UniversalEnum.ZERO.getValue()); operLog.setOperType(UniversalEnum.ZERO.getValue());
} else { } else {

Loading…
Cancel
Save