没太听明白同学的意思,UserAwardMap是用来表示用户领取奖品记录的,所以里面得有PersonInfo\Shop\Award实体类分别代表哪个用户领取了哪个店铺里的奖品。最终会在视频里写成这样子
package com.imooc.o2o.entity;
import java.util.Date;
//顾客已领取的奖品映射
public class UserAwardMap {
// 主键Id
private Long userAwardId;
// 创建时间
private Date createTime;
// 使用状态0.未兑换 1.已兑换
private Integer usedStatus;
// 领取奖品所消耗的积分
private Integer point;
// 顾客信息实体类
private PersonInfo user;
// 奖品信息实体类
private Award award;
// 店铺信息实体类
private Shop shop;
// 操作员信息实体类
private PersonInfo operator;
public Long getUserAwardId() {
return userAwardId;
}
public void setUserAwardId(Long userAwardId) {
this.userAwardId = userAwardId;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Integer getUsedStatus() {
return usedStatus;
}
public void setUsedStatus(Integer usedStatus) {
this.usedStatus = usedStatus;
}
public Integer getPoint() {
return point;
}
public void setPoint(Integer point) {
this.point = point;
}
public PersonInfo getUser() {
return user;
}
public void setUser(PersonInfo user) {
this.user = user;
}
public Award getAward() {
return award;
}
public void setAward(Award award) {
this.award = award;
}
public Shop getShop() {
return shop;
}
public void setShop(Shop shop) {
this.shop = shop;
}
public PersonInfo getOperator() {
return operator;
}
public void setOperator(PersonInfo operator) {
this.operator = operator;
}
}
还是有属性的啊,功能也正常