提交 a5978f29 编写于 作者: hebao@lab.ibiz5.com's avatar hebao@lab.ibiz5.com

result数据保存bug修复

上级 3a7fa6df
...@@ -50,8 +50,13 @@ public class AnalyseEntityServiceImpl extends BaseEntityServiceImpl { ...@@ -50,8 +50,13 @@ public class AnalyseEntityServiceImpl extends BaseEntityServiceImpl {
{ {
if(0==RETVALUE) if(0==RETVALUE)
return; return;
List<ExecResult> saveResults;
List<ExecResult> saveResults = new ArrayList<>(); if(param.containsKey(Tag_SaveResults)){
saveResults = (List<ExecResult>) param.get(Tag_SaveResults);
}else{
saveResults = new ArrayList<>();
param.set(Tag_SaveResults, saveResults);
}
ExecResult result=new ExecResult(); ExecResult result=new ExecResult();
result.setRuleid(RULEID); result.setRuleid(RULEID);
result.setRulename(RULENAME); result.setRulename(RULENAME);
...@@ -147,9 +152,6 @@ public class AnalyseEntityServiceImpl extends BaseEntityServiceImpl { ...@@ -147,9 +152,6 @@ public class AnalyseEntityServiceImpl extends BaseEntityServiceImpl {
} }
} }
if(saveResults.size() > 0){
param.set(Tag_SaveResults, saveResults);
}
} }
} }
......
package cn.ibizlab.core.extensions.service; package cn.ibizlab.core.extensions.service;
import cn.ibizlab.core.analysis.domain.DABuild; import cn.ibizlab.core.analysis.domain.DABuild;
import cn.ibizlab.core.analysis.domain.DADimension;
import cn.ibizlab.core.analysis.domain.DAMetric; import cn.ibizlab.core.analysis.domain.DAMetric;
import cn.ibizlab.core.analysis.filter.DABuildSearchContext;
import cn.ibizlab.core.analysis.filter.DADimensionSearchContext;
import cn.ibizlab.core.analysis.filter.DAMetricSearchContext; import cn.ibizlab.core.analysis.filter.DAMetricSearchContext;
import cn.ibizlab.core.analysis.service.IDABuildService; import cn.ibizlab.core.analysis.service.IDABuildService;
import cn.ibizlab.core.analysis.service.IDADimensionService; import cn.ibizlab.core.analysis.service.IDADimensionService;
...@@ -18,7 +15,6 @@ import cn.ibizlab.core.lite.extensions.model.DataModel; ...@@ -18,7 +15,6 @@ import cn.ibizlab.core.lite.extensions.model.DataModel;
import cn.ibizlab.core.lite.extensions.model.Property; import cn.ibizlab.core.lite.extensions.model.Property;
import cn.ibizlab.core.lite.extensions.service.LiteModelService; import cn.ibizlab.core.lite.extensions.service.LiteModelService;
import cn.ibizlab.core.lite.filter.DstDataSourceSearchContext; import cn.ibizlab.core.lite.filter.DstDataSourceSearchContext;
import cn.ibizlab.core.lite.filter.MetaFieldSearchContext;
import cn.ibizlab.core.lite.service.*; import cn.ibizlab.core.lite.service.*;
import cn.ibizlab.core.lite.service.impl.MetaModelServiceImpl; import cn.ibizlab.core.lite.service.impl.MetaModelServiceImpl;
import cn.ibizlab.core.rule.domain.RuleItem; import cn.ibizlab.core.rule.domain.RuleItem;
...@@ -29,7 +25,6 @@ import com.alibaba.fastjson.JSON; ...@@ -29,7 +25,6 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.google.common.base.Joiner; import com.google.common.base.Joiner;
import liquibase.pro.packaged.D;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
......
...@@ -43,6 +43,7 @@ public class DefaultMQProducerService { ...@@ -43,6 +43,7 @@ public class DefaultMQProducerService {
public void sendToMQ(ResultsMQMsg resultMQMsg, String tags) throws InterruptedException, RemotingException, MQClientException, MQBrokerException { public void sendToMQ(ResultsMQMsg resultMQMsg, String tags) throws InterruptedException, RemotingException, MQClientException, MQBrokerException {
String msg = JSON.toJSONString(resultMQMsg); String msg = JSON.toJSONString(resultMQMsg);
Message sendMsg = new Message(resultsTopic, tags, msg.getBytes()); Message sendMsg = new Message(resultsTopic, tags, msg.getBytes());
sendMsg.setKeys(resultMQMsg.getKeyValueField());
SendResult sendResult = defaultMQProducer.send(sendMsg); SendResult sendResult = defaultMQProducer.send(sendMsg);
log.info("构建消息发送响应:" + sendResult.toString()); log.info("构建消息发送响应:" + sendResult.toString());
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册