修改

parent 062121e1
...@@ -18,6 +18,7 @@ public class ContactModel implements Serializable { ...@@ -18,6 +18,7 @@ public class ContactModel implements Serializable {
private String name; private String name;
private String phoneNo; private String phoneNo;
private String relationName;
private String relation; private String relation;
private ContactModel(){} private ContactModel(){}
...@@ -28,7 +29,8 @@ public class ContactModel implements Serializable { ...@@ -28,7 +29,8 @@ public class ContactModel implements Serializable {
ContactModel model = new ContactModel(); ContactModel model = new ContactModel();
model.setName(entity.getName()); model.setName(entity.getName());
model.setPhoneNo(entity.getPhoneNo()); model.setPhoneNo(entity.getPhoneNo());
model.setRelation(Optional.ofNullable(entity.getRelation()).orElse(Relation.OTHER).getDescription()); model.setRelationName(Optional.ofNullable(entity.getRelation()).orElse(Relation.OTHER).getDescription());
model.setRelation(entity.getRelation().name());
return model; return model;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment