Browse Source

拆分

master
yechuan 1 year ago
parent
commit
76faa8c936
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      sink/src/main/java/work/xuye/sink/handler/ItemHandler.java

+ 4
- 1
sink/src/main/java/work/xuye/sink/handler/ItemHandler.java View File

@@ -10,6 +10,7 @@ import org.springframework.util.DigestUtils;
import org.springframework.util.ObjectUtils;
import work.xuye.common.constant.MessageConstants;
import work.xuye.common.constant.StageConstants;
import work.xuye.common.db.entity.Mapping;
import work.xuye.common.db.entity.Task;
import work.xuye.common.db.entity.vo.SinkParams;
import work.xuye.common.db.entity.vo.TableTemplate;
@@ -83,7 +84,9 @@ public class ItemHandler {

SinkParams.CheckDelete checkDeleteConfig = taskVO.getTask().getSinkParams().getCheckDelete();
// 根据消息体,和映射关系,使用SpEL表达式,得到计算结果
HashMap<String, Object> expressionResultMap = evaluator.evaluate(taskVO.getTemplateMappingMap().get(templateName).getTableMapping(), message);
Map<String, Mapping> templateMappingMap = taskVO.getTemplateMappingMap();
Mapping mapping = templateMappingMap.get(templateName);
HashMap<String, Object> expressionResultMap = evaluator.evaluate(mapping.getTableMapping(), message);
// 如果不能通过校验,则抛出异常
this.validate(expressionResultMap, template);
// 将计算结果合并到模板中,此刻的模板是拥有值的


Loading…
Cancel
Save