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

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

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