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

update codes

parent b86ba305
......@@ -83,6 +83,7 @@ public class CheckServiceImpl implements CheckService {
logger.error("Find result is empty!");
continue;
}else {
uniqueCheckResult.setSqlId(id);
Double uniqueRate = uniqueCheckResult.getUniqueRate();
if(null != uniqueRate && uniqueRate < threshold) {
mailService.sendSimpleMail(uniqueCheckResult.toString());
......@@ -92,7 +93,6 @@ public class CheckServiceImpl implements CheckService {
thresholdExceedAllService.persistThresholdExceedAll(parseObject);
}
}
uniqueCheckResult.setSqlId(id);
rs = tblResultCheckUniqueMapper.insert(uniqueCheckResult);
} else if (Constants.CHECK_UNBLANK.equals(tblCheckSql.getCheckType())){
TblResultCheckUnblank tblResultCheckUnblank = getUnblankCheckResult(sql);
......@@ -100,6 +100,7 @@ public class CheckServiceImpl implements CheckService {
logger.error("Find result is empty!");
continue;
}else {
tblResultCheckUnblank.setSqlId(id);
Double unblankRate = tblResultCheckUnblank.getUnblankRate();
if(null != unblankRate && unblankRate < threshold) {
mailService.sendSimpleMail(tblResultCheckUnblank.toString());
......@@ -109,7 +110,6 @@ public class CheckServiceImpl implements CheckService {
thresholdExceedAllService.persistThresholdExceedAll(parseObject);
}
}
tblResultCheckUnblank.setSqlId(id);
rs = tblResultCheckUnblankMapper.insert(tblResultCheckUnblank);
}else {
logger.error("Check type is error: {}",checkType);
......@@ -150,6 +150,7 @@ public class CheckServiceImpl implements CheckService {
logger.error("Find result is empty!");
continue;
}else {
referCheckResult.setSqlId(id);
Double matchedRate = referCheckResult.getMatchedRate();
if(null != matchedRate && matchedRate < threshold) {
mailService.sendSimpleMail(referCheckResult.toString());
......@@ -159,7 +160,6 @@ public class CheckServiceImpl implements CheckService {
thresholdExceedAllService.persistThresholdExceedAll(parseObject);
}
}
referCheckResult.setSqlId(id);
rs = tblResultCheckReferMapper.insert(referCheckResult);
}
if (rs == 1) {
......
......@@ -32,17 +32,17 @@ public class ThresholdExceedAllServiceImpl implements ThresholdExceedAllService
String checkType = jsonObject.getString("checkType");
if (null != checkType) {
if (Constants.CHECK_UNIQUE.equals(checkType)) {
tblThresholdExceedAll.setCheckNum(jsonObject.getLong("unique_num"));
tblThresholdExceedAll.setCheckRate(jsonObject.getDouble("unique_rate"));
tblThresholdExceedAll.setCheckNum(jsonObject.getLong("uniqueNum"));
tblThresholdExceedAll.setCheckRate(jsonObject.getDouble("uniqueRate"));
} else if (Constants.CHECK_UNBLANK.equals(checkType)) {
tblThresholdExceedAll.setCheckNum(jsonObject.getLong("unblank_num"));
tblThresholdExceedAll.setCheckRate(jsonObject.getDouble("unblank_rate"));
tblThresholdExceedAll.setCheckNum(jsonObject.getLong("unblankNum"));
tblThresholdExceedAll.setCheckRate(jsonObject.getDouble("unblankRate"));
} else if (Constants.CHECK_REFER.equals(checkType)) {
tblThresholdExceedAll.setDbName(jsonObject.getString("check_db_name"));
tblThresholdExceedAll.setTbName(jsonObject.getString("check_tb_name"));
tblThresholdExceedAll.setColName(jsonObject.getString("check_col_name"));
tblThresholdExceedAll.setCheckNum(jsonObject.getLong("matched_num"));
tblThresholdExceedAll.setCheckRate(jsonObject.getDouble("matched_rate"));
tblThresholdExceedAll.setDbName(jsonObject.getString("checkDbName"));
tblThresholdExceedAll.setTbName(jsonObject.getString("checkTbName"));
tblThresholdExceedAll.setColName(jsonObject.getString("checkColName"));
tblThresholdExceedAll.setCheckNum(jsonObject.getLong("matchedNum"));
tblThresholdExceedAll.setCheckRate(jsonObject.getDouble("matchedRate"));
} else {
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