You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
596 B
Java
23 lines
596 B
Java
2 years ago
|
package com.xydl.model;
|
||
|
|
||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||
|
import com.xydl.entity.SyncFieldsInfo;
|
||
|
import lombok.Data;
|
||
|
|
||
|
import java.util.Map;
|
||
|
|
||
|
@Data
|
||
|
public class AttributeItem {
|
||
|
@JsonProperty("AttributeCode")
|
||
|
String attributeCode;
|
||
|
@JsonProperty("DataValue")
|
||
|
Object dataValue;
|
||
|
|
||
|
public static AttributeItem fromData(Map<String, Object> map, SyncFieldsInfo field) {
|
||
|
AttributeItem root = new AttributeItem();
|
||
|
root.setAttributeCode(field.getDestFieldName());
|
||
|
root.setDataValue(map.get(field.getFieldName()));
|
||
|
return root;
|
||
|
}
|
||
|
}
|