提交 17202b7c 编写于 作者: xuhui961310148's avatar xuhui961310148

rollback:回滚,报表、规则构建结果为空不发送消息代码

导致已删除的业务数据的历史构建结果无法从构建结果库删除(高检信访发现)
上级 f52fe928
...@@ -247,8 +247,6 @@ public class AnalyseAllServiceImpl extends BaseEntityServiceImpl { ...@@ -247,8 +247,6 @@ public class AnalyseAllServiceImpl extends BaseEntityServiceImpl {
resultsMQMsg.setMsgId(msg.getId()); resultsMQMsg.setMsgId(msg.getId());
resultsMQMsg.setKeyValueField(modelObj.getRowKey()); resultsMQMsg.setKeyValueField(modelObj.getRowKey());
resultsMQMsg.setRules(msg.getRuleIds()); resultsMQMsg.setRules(msg.getRuleIds());
resultsMQMsg.setDeleteIds(new ArrayList<>());
resultsMQMsg.setSaveDatas(new ArrayList<>());
Object saveResults = modelObj.get(Tag_SaveResults); Object saveResults = modelObj.get(Tag_SaveResults);
if(saveResults != null && saveResults instanceof List){ if(saveResults != null && saveResults instanceof List){
resultsMQMsg.setSaveDatas((List<ExecResult>)saveResults); resultsMQMsg.setSaveDatas((List<ExecResult>)saveResults);
...@@ -262,9 +260,6 @@ public class AnalyseAllServiceImpl extends BaseEntityServiceImpl { ...@@ -262,9 +260,6 @@ public class AnalyseAllServiceImpl extends BaseEntityServiceImpl {
resultsMQMsg.setDeleteIds((List<String>)deleteResults); resultsMQMsg.setDeleteIds((List<String>)deleteResults);
} }
} }
if (resultsMQMsg.getDeleteIds().size() == 0 && resultsMQMsg.getSaveDatas().size() == 0){
continue;
}
if (resultsBatchSend){ if (resultsBatchSend){
sqlResultsMQMsgList.add(resultsMQMsg); sqlResultsMQMsgList.add(resultsMQMsg);
}else { }else {
......
...@@ -207,10 +207,8 @@ public class AnalyseEntityServiceImpl extends BaseEntityServiceImpl { ...@@ -207,10 +207,8 @@ public class AnalyseEntityServiceImpl extends BaseEntityServiceImpl {
if(saveResults instanceof List){ if(saveResults instanceof List){
resultsMQMsg.setDatas((List<ExecResult>)saveResults); resultsMQMsg.setDatas((List<ExecResult>)saveResults);
} }
if (resultsMQMsg.getDatas() != null && resultsMQMsg.getDatas().size() > 0){
defaultMQProducerService.sendResultsMsg(resultsMQMsg); defaultMQProducerService.sendResultsMsg(resultsMQMsg);
} }
}
catch (Exception e) catch (Exception e)
{ {
errorcount++; errorcount++;
......
...@@ -553,8 +553,6 @@ public class BaseEntityServiceImpl implements BaseEntityService ...@@ -553,8 +553,6 @@ public class BaseEntityServiceImpl implements BaseEntityService
}else { }else {
SqlResultsMQMsg sqlResultsMQMsg = new SqlResultsMQMsg(); SqlResultsMQMsg sqlResultsMQMsg = new SqlResultsMQMsg();
sqlResultsMQMsg.setMsgId(msg.getId()); sqlResultsMQMsg.setMsgId(msg.getId());
sqlResultsMQMsg.setSaveDatas(new ArrayList<>());
sqlResultsMQMsg.setDeleteDatas(new ArrayList<>());
if (saveExecResultList != null && saveExecResultList.size()>0){ if (saveExecResultList != null && saveExecResultList.size()>0){
sqlResultsMQMsg.setSaveDatas(saveExecResultList); sqlResultsMQMsg.setSaveDatas(saveExecResultList);
} }
...@@ -567,11 +565,9 @@ public class BaseEntityServiceImpl implements BaseEntityService ...@@ -567,11 +565,9 @@ public class BaseEntityServiceImpl implements BaseEntityService
if(!StringUtils.isEmpty(msg.getResultTableName())){ if(!StringUtils.isEmpty(msg.getResultTableName())){
sqlResultsMQMsg.setResultTableName(msg.getResultTableName()); sqlResultsMQMsg.setResultTableName(msg.getResultTableName());
} }
if (sqlResultsMQMsg.getSaveDatas().size() > 0 || sqlResultsMQMsg.getDeleteDatas().size() > 0){
localMsgResultProducerService.sendEngineResultsMsg(sqlResultsMQMsg); localMsgResultProducerService.sendEngineResultsMsg(sqlResultsMQMsg);
} }
} }
}
catch (Exception e) catch (Exception e)
{ {
errorcount++; errorcount++;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册