-
Notifications
You must be signed in to change notification settings - Fork 43
entity
jwpttcg66 edited this page Apr 18, 2017
·
6 revisions
- EntitySave 对象需要存储
- FieldSave 字段映射到数据库
- DbMapper 对象存储到mybatis的映射
@EntitySave
@DbMapper(mapper = OrderMapper.class)
public class Order extends BaseLongIDEntity implements RedisInterface, AsyncSave {
@FieldSave
private String status;
/**
* @return status
*/
public String getStatus() {
return status;
}
/**
* @param status
*/
@MethodSaveProxy(proxy="status")
public void setStatus(String status) {
this.status = status;
}
@Override
public String toString() {
return "Order{" +
"orderId=" + getId() +
", userId=" + getUserId() +
", status='" + status + '\'' +
'}';
}
@Override
public String getUnionKey() {
return String.valueOf(getUserId()+ EntityUtils.ENTITY_SPLIT_STRING + getId());
}
@Override
public String getRedisKeyEnumString() {
return RedisKeyEnum.PLAYER.getKey();
}
}