|
|
|
|
@ -1,75 +1,33 @@
|
|
|
|
|
package com.ssm.entity;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
|
|
|
|
|
public class Stock {
|
|
|
|
|
private Integer id;
|
|
|
|
|
private Integer userId; // 对应用户ID,和user表关联
|
|
|
|
|
private String stockName; // 股票名称
|
|
|
|
|
private String stockCode; // 股票代码
|
|
|
|
|
private Integer holdNum; // 持有数量
|
|
|
|
|
private Double buyPrice; // 买入成本
|
|
|
|
|
private String createTime; // 买入日期
|
|
|
|
|
private Integer userId;
|
|
|
|
|
private String stockName;
|
|
|
|
|
private String stockCode;
|
|
|
|
|
private Integer holdNum;
|
|
|
|
|
private Double buyPrice;
|
|
|
|
|
private Date createTime; // 新增的字段
|
|
|
|
|
|
|
|
|
|
// 无参构造(必须,MyBatis需要)
|
|
|
|
|
public Stock() {}
|
|
|
|
|
|
|
|
|
|
// Getter & Setter
|
|
|
|
|
public Integer getId() {
|
|
|
|
|
return id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setId(Integer id) {
|
|
|
|
|
this.id = id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Integer getUserId() {
|
|
|
|
|
return userId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setUserId(Integer userId) {
|
|
|
|
|
this.userId = userId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getStockName() {
|
|
|
|
|
return stockName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setStockName(String stockName) {
|
|
|
|
|
this.stockName = stockName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getStockCode() {
|
|
|
|
|
return stockCode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setStockCode(String stockCode) {
|
|
|
|
|
this.stockCode = stockCode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Integer getHoldNum() {
|
|
|
|
|
return holdNum;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setHoldNum(Integer holdNum) {
|
|
|
|
|
this.holdNum = holdNum;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Double getBuyPrice() {
|
|
|
|
|
return buyPrice;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setBuyPrice(Double buyPrice) {
|
|
|
|
|
this.buyPrice = buyPrice;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getCreateTime() {
|
|
|
|
|
return createTime;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setCreateTime(String createTime) {
|
|
|
|
|
this.createTime = createTime;
|
|
|
|
|
}
|
|
|
|
|
public Integer getId() { return id; }
|
|
|
|
|
public void setId(Integer id) { this.id = id; }
|
|
|
|
|
public Integer getUserId() { return userId; }
|
|
|
|
|
public void setUserId(Integer userId) { this.userId = userId; }
|
|
|
|
|
public String getStockName() { return stockName; }
|
|
|
|
|
public void setStockName(String stockName) { this.stockName = stockName; }
|
|
|
|
|
public String getStockCode() { return stockCode; }
|
|
|
|
|
public void setStockCode(String stockCode) { this.stockCode = stockCode; }
|
|
|
|
|
public Integer getHoldNum() { return holdNum; }
|
|
|
|
|
public void setHoldNum(Integer holdNum) { this.holdNum = holdNum; }
|
|
|
|
|
public Double getBuyPrice() { return buyPrice; }
|
|
|
|
|
public void setBuyPrice(Double buyPrice) { this.buyPrice = buyPrice; }
|
|
|
|
|
public Date getCreateTime() { return createTime; }
|
|
|
|
|
public void setCreateTime(Date createTime) { this.createTime = createTime; }
|
|
|
|
|
|
|
|
|
|
// toString方法,方便打印测试结果
|
|
|
|
|
@Override
|
|
|
|
|
public String toString() {
|
|
|
|
|
return "Stock{" +
|
|
|
|
|
@ -79,7 +37,7 @@ public class Stock {
|
|
|
|
|
", stockCode='" + stockCode + '\'' +
|
|
|
|
|
", holdNum=" + holdNum +
|
|
|
|
|
", buyPrice=" + buyPrice +
|
|
|
|
|
", createTime='" + createTime + '\'' +
|
|
|
|
|
", createTime=" + createTime +
|
|
|
|
|
'}';
|
|
|
|
|
}
|
|
|
|
|
}
|