一、透传交易做法
Process:前置–>Channel Integration–>ESB–>互联网金融平台–>DataBase库
遵循小驼峰命名法则,书写交易时注意赋值字段的输入与输出(接口透传)
Table:INITMSGMAP—INTERFACECOLMAP(codeTran–seqNo)
Document/SYS_HEAD/x----AppBody/ARRAY/x
二、字段不匹配
若实际测试中遇到问题:进入交易查询无数据,直接错误提示。
这类问题在写的时候不容易发现,需要针对数据的字段一一对照,并且确定数据列与条件列变量个数!(平台–DBx)
注:字段顺序保持一致
附
1.HTTP请求与响应报文:Request&Response
2.数据同步方式:增量与全量
增量的基础是全量,就是你要使用某种方式先把全量数据拷贝过来,然后再采用增量方式同步更新。(增量同步-httpurl)
3.Key-Value 复杂的集合对象转Map
多个对象集合转换为一个Map:将list
基于反射,将obj转为map
法一:
将集合对象List<Product>转换为Map
key = Product对象的sku
value =Product对象
1 List<Product> products = productService.queryProductList(productQuery, null);
2 Map<String, Product> productMap = products.stream()
3 .collect(Collectors.toMap(Product::getProductSku, Function.identity(), (key1, key2) -> key2));
法二:
Map<String,Integer> map1 = new HashMap<String,Integer>();
map1.put("a",2);
Map<String,Integer> map2 = new HashMap<String,Integer>();
Set<Map.Entry<String,Integer>> set = map1.entrySet();
for(Iterator<Map.Entry<String,Integer>> it = set.iterator(); it.hasNext();)
{
Map.Entry<String,Integer> entry = it.next();
map2.put(entry.getKey(), entry.getValue());
}
4.非空且字符串不为空
[“getresults”] != null && !“”.equals([“getresults”].toString())
5.时间秒的范围:2小时内
time to second(TIMEDIFF(EN_QUEUE_TIME,START_SERV_TIME)) <= 2*(60*60)