Commit 4aa01793 authored by 赵建伟's avatar 赵建伟

update codes

parent b86ba305
...@@ -83,6 +83,7 @@ public class CheckServiceImpl implements CheckService { ...@@ -83,6 +83,7 @@ public class CheckServiceImpl implements CheckService {
logger.error("Find result is empty!"); logger.error("Find result is empty!");
continue; continue;
}else { }else {
uniqueCheckResult.setSqlId(id);
Double uniqueRate = uniqueCheckResult.getUniqueRate(); Double uniqueRate = uniqueCheckResult.getUniqueRate();
if(null != uniqueRate && uniqueRate < threshold) { if(null != uniqueRate && uniqueRate < threshold) {
mailService.sendSimpleMail(uniqueCheckResult.toString()); mailService.sendSimpleMail(uniqueCheckResult.toString());
...@@ -92,7 +93,6 @@ public class CheckServiceImpl implements CheckService { ...@@ -92,7 +93,6 @@ public class CheckServiceImpl implements CheckService {
thresholdExceedAllService.persistThresholdExceedAll(parseObject); thresholdExceedAllService.persistThresholdExceedAll(parseObject);
} }
} }
uniqueCheckResult.setSqlId(id);
rs = tblResultCheckUniqueMapper.insert(uniqueCheckResult); rs = tblResultCheckUniqueMapper.insert(uniqueCheckResult);
} else if (Constants.CHECK_UNBLANK.equals(tblCheckSql.getCheckType())){ } else if (Constants.CHECK_UNBLANK.equals(tblCheckSql.getCheckType())){
TblResultCheckUnblank tblResultCheckUnblank = getUnblankCheckResult(sql); TblResultCheckUnblank tblResultCheckUnblank = getUnblankCheckResult(sql);
...@@ -100,6 +100,7 @@ public class CheckServiceImpl implements CheckService { ...@@ -100,6 +100,7 @@ public class CheckServiceImpl implements CheckService {
logger.error("Find result is empty!"); logger.error("Find result is empty!");
continue; continue;
}else { }else {
tblResultCheckUnblank.setSqlId(id);
Double unblankRate = tblResultCheckUnblank.getUnblankRate(); Double unblankRate = tblResultCheckUnblank.getUnblankRate();
if(null != unblankRate && unblankRate < threshold) { if(null != unblankRate && unblankRate < threshold) {
mailService.sendSimpleMail(tblResultCheckUnblank.toString()); mailService.sendSimpleMail(tblResultCheckUnblank.toString());
...@@ -109,7 +110,6 @@ public class CheckServiceImpl implements CheckService { ...@@ -109,7 +110,6 @@ public class CheckServiceImpl implements CheckService {
thresholdExceedAllService.persistThresholdExceedAll(parseObject); thresholdExceedAllService.persistThresholdExceedAll(parseObject);
} }
} }
tblResultCheckUnblank.setSqlId(id);
rs = tblResultCheckUnblankMapper.insert(tblResultCheckUnblank); rs = tblResultCheckUnblankMapper.insert(tblResultCheckUnblank);
}else { }else {
logger.error("Check type is error: {}",checkType); logger.error("Check type is error: {}",checkType);
...@@ -150,6 +150,7 @@ public class CheckServiceImpl implements CheckService { ...@@ -150,6 +150,7 @@ public class CheckServiceImpl implements CheckService {
logger.error("Find result is empty!"); logger.error("Find result is empty!");
continue; continue;
}else { }else {
referCheckResult.setSqlId(id);
Double matchedRate = referCheckResult.getMatchedRate(); Double matchedRate = referCheckResult.getMatchedRate();
if(null != matchedRate && matchedRate < threshold) { if(null != matchedRate && matchedRate < threshold) {
mailService.sendSimpleMail(referCheckResult.toString()); mailService.sendSimpleMail(referCheckResult.toString());
...@@ -159,7 +160,6 @@ public class CheckServiceImpl implements CheckService { ...@@ -159,7 +160,6 @@ public class CheckServiceImpl implements CheckService {
thresholdExceedAllService.persistThresholdExceedAll(parseObject); thresholdExceedAllService.persistThresholdExceedAll(parseObject);
} }
} }
referCheckResult.setSqlId(id);
rs = tblResultCheckReferMapper.insert(referCheckResult); rs = tblResultCheckReferMapper.insert(referCheckResult);
} }
if (rs == 1) { if (rs == 1) {
......
...@@ -32,17 +32,17 @@ public class ThresholdExceedAllServiceImpl implements ThresholdExceedAllService ...@@ -32,17 +32,17 @@ public class ThresholdExceedAllServiceImpl implements ThresholdExceedAllService
String checkType = jsonObject.getString("checkType"); String checkType = jsonObject.getString("checkType");
if (null != checkType) { if (null != checkType) {
if (Constants.CHECK_UNIQUE.equals(checkType)) { if (Constants.CHECK_UNIQUE.equals(checkType)) {
tblThresholdExceedAll.setCheckNum(jsonObject.getLong("unique_num")); tblThresholdExceedAll.setCheckNum(jsonObject.getLong("uniqueNum"));
tblThresholdExceedAll.setCheckRate(jsonObject.getDouble("unique_rate")); tblThresholdExceedAll.setCheckRate(jsonObject.getDouble("uniqueRate"));
} else if (Constants.CHECK_UNBLANK.equals(checkType)) { } else if (Constants.CHECK_UNBLANK.equals(checkType)) {
tblThresholdExceedAll.setCheckNum(jsonObject.getLong("unblank_num")); tblThresholdExceedAll.setCheckNum(jsonObject.getLong("unblankNum"));
tblThresholdExceedAll.setCheckRate(jsonObject.getDouble("unblank_rate")); tblThresholdExceedAll.setCheckRate(jsonObject.getDouble("unblankRate"));
} else if (Constants.CHECK_REFER.equals(checkType)) { } else if (Constants.CHECK_REFER.equals(checkType)) {
tblThresholdExceedAll.setDbName(jsonObject.getString("check_db_name")); tblThresholdExceedAll.setDbName(jsonObject.getString("checkDbName"));
tblThresholdExceedAll.setTbName(jsonObject.getString("check_tb_name")); tblThresholdExceedAll.setTbName(jsonObject.getString("checkTbName"));
tblThresholdExceedAll.setColName(jsonObject.getString("check_col_name")); tblThresholdExceedAll.setColName(jsonObject.getString("checkColName"));
tblThresholdExceedAll.setCheckNum(jsonObject.getLong("matched_num")); tblThresholdExceedAll.setCheckNum(jsonObject.getLong("matchedNum"));
tblThresholdExceedAll.setCheckRate(jsonObject.getDouble("matched_rate")); tblThresholdExceedAll.setCheckRate(jsonObject.getDouble("matchedRate"));
} else { } else {
logger.error("checkType params is error: {}", checkType); logger.error("checkType params is error: {}", checkType);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment