Commit 75b39318 authored by duanruiming's avatar duanruiming

[update] 失衡入库数据优化

parent ba6a778c
......@@ -63,6 +63,8 @@ public class CrossStrategyOptConsumerHandler implements KafkaListenerErrorHandle
if (StringUtils.isNotBlank(message)) {
ObjectMapper mapper = JacksonUtils.getInstance();
ImbalanceAlgorithmDTO imbalanceAlgorithmDTO = mapper.readValue(message, ImbalanceAlgorithmDTO.class);
// 设置3,优化方案
imbalanceAlgorithmDTO.setRtnType(3);
crossStrategyOptService.save(imbalanceAlgorithmDTO);
}
acknowledgment.acknowledge();
......
......@@ -68,7 +68,7 @@ public class CrossStrategyOptServiceImpl implements CrossStrategyOptService {
public void save(ImbalanceAlgorithmDTO dto) {
try {
// 未操作的不存
if (!Objects.equals(0, dto.getRtnType())) {
if (0 != dto.getRtnType()) {
ObjectMapper mapper = JacksonUtils.getInstance();
CrossStrategyResultEntity crossStrategyResultEntity = new CrossStrategyResultEntity();
crossStrategyResultEntity.setCrossId(dto.getPlatformId());
......
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