通用接口的字段映射关系 JSON 中增加 seq 属性,发出的接口报文会按照此属性生序

如果未配置此属性,则默认为 0,即无序
增加此段代码的单元测试用例
yun-zuoyi
rock.yu 5 years ago
parent abcfb3fdaf
commit c4f8497dda

@ -14,7 +14,7 @@ import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MappingItem {
public class MappingItem implements Comparable<MappingItem> {
/**
*
*/
@ -38,6 +38,11 @@ public class MappingItem {
*/
public Object defaultValue;
/**
*
*/
public int seq;
@Override
public String toString() {
return "srcName:"
@ -45,6 +50,12 @@ public class MappingItem {
+ this.destBeanName + ", destName"
+ this.destName + ", defaultValue:"
+ this.defaultValue + ", destPk:"
+ this.destPk;
+ this.destPk + ", seq:"
+ this.seq;
}
@Override
public int compareTo(MappingItem o) {
return this.seq - o.seq;
}
}

Loading…
Cancel
Save