|
|
@@ -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); |
|
|
|
// 将计算结果合并到模板中,此刻的模板是拥有值的 |
|
|
|