-
Notifications
You must be signed in to change notification settings - Fork 74
组件内置协议之DE
quhongwei edited this page Mar 28, 2018
·
1 revision
DE是余额宝与天弘交互格式,作为一种默认实现
1.跟sp相比de的头部相对复杂一点
2.头部第一行由 字段描述:字段值 在由分隔符连接而成
3.头部第二行由组件函数横向打印出body的字段描述
4.跟天弘文件一般没有文件尾, 协议定义了尾部也没关系,数据定义模板不定义文件尾就行
<protocol name="de">
<head>
<row>
<column>
<output>${column.desc()}</output>
<output>:</output>
<output>${column.value()}</output>
</column>
</row>
<row output="${bodycolumn.horizontal(desc)}" />
</head>
<body>
<row>
<column>
<output>${column.value()}</output>
</column>
</row>
</body>
<tail>
<row>
<column>
<output>${column.value()}</output>
</column>
</row>
</tail>
</protocol>
{
"head":[
"totalCount|总笔数|Required|Long",
"totalAmount|总金额|BigDecimal|Required"
],
"body":[
"seq|流水号",
"instSeq|基金公司订单号|Required",
"gmtApply|订单申请时间|Date:yyyy-MM-dd HH:mm:ss",
"date|普通日期|Date:yyyyMMdd",
"dateTime|普通日期时间|Date:yyyyMMdd HH:mm:ss",
"applyNumber|普通数字|BigDecimal",
"amount|金额|BigDecimal",
"age|年龄|Integer",
"longN|长整型|Long",
"bol|布尔值|Boolean",
"memo|备注"
],
"protocol":"DE"
}
总笔数:2|总金额:300.03
流水号|基金公司订单号|订单申请时间|普通日期|普通日期时间|普通数字|金额|年龄|长整型|布尔值|备注
seq_0|inst_seq_0|2013-11-09 12:34:56|20131109|20131112 12:23:34|23.33|10.22|22|123|true|备注1
seq_1|inst_seq_1|2013-11-10 15:56:12|20131110|20131113 12:33:34|23.34|11.88|33|56789|false|