package com.yeshi.makemoney.app.vo.admin.goldcorn;
|
|
import com.yeshi.makemoney.app.entity.SystemEnum;
|
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetPrice;
|
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetType;
|
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornPriceCountType;
|
import org.yeshi.utils.TimeUtil;
|
|
import java.math.BigDecimal;
|
import java.util.Date;
|
|
/**
|
* @author hxh
|
* @title: GoldCornGetPriceAdminVO
|
* @description: TODO
|
* @date 2022/4/2 17:42
|
*/
|
public class GoldCornGetPriceAdminVO {
|
|
private String id;
|
private GoldCornGetType type;
|
private GoldCornPriceCountType countType;
|
private Integer cornNum;
|
private String validateTime;
|
private BigDecimal teamGainRate;
|
private String remarks;
|
private String teamDivide;
|
|
public GoldCornGetPrice toEntity(SystemEnum system) {
|
GoldCornGetPrice entity = new GoldCornGetPrice();
|
entity.setCornNum(cornNum);
|
entity.setId(id);
|
entity.setRemarks(remarks);
|
entity.setTeamGainRate(teamGainRate);
|
entity.setTeamDivide("on".equalsIgnoreCase(teamDivide) ? true : false);
|
entity.setSystem(system);
|
entity.setType(type);
|
entity.setCountType(countType);
|
entity.setValidateTime(new Date(TimeUtil.convertToTimeTemp(validateTime, "yyyy-MM-dd HH:mm:ss")));
|
return entity;
|
}
|
|
|
public static GoldCornGetPriceAdminVO create(GoldCornGetPrice entity) {
|
GoldCornGetPriceAdminVO vo = new GoldCornGetPriceAdminVO();
|
vo.setCornNum(entity.getCornNum());
|
vo.setId(entity.getId());
|
vo.setRemarks(entity.getRemarks());
|
vo.setType(entity.getType());
|
vo.setTeamDivide(entity.getTeamDivide() ? "on" : null);
|
vo.setTeamGainRate(entity.getTeamGainRate());
|
vo.setCountType(entity.getCountType());
|
vo.setValidateTime(TimeUtil.getGernalTime(entity.getValidateTime().getTime(), "yyyy-MM-dd HH:mm:ss"));
|
return vo;
|
}
|
|
public String getId() {
|
return id;
|
}
|
|
public void setId(String id) {
|
this.id = id;
|
}
|
|
public GoldCornGetType getType() {
|
return type;
|
}
|
|
public void setType(GoldCornGetType type) {
|
this.type = type;
|
}
|
|
public Integer getCornNum() {
|
return cornNum;
|
}
|
|
public void setCornNum(Integer cornNum) {
|
this.cornNum = cornNum;
|
}
|
|
public String getValidateTime() {
|
return validateTime;
|
}
|
|
public void setValidateTime(String validateTime) {
|
this.validateTime = validateTime;
|
}
|
|
public String getRemarks() {
|
return remarks;
|
}
|
|
public void setRemarks(String remarks) {
|
this.remarks = remarks;
|
}
|
|
public BigDecimal getTeamGainRate() {
|
return teamGainRate;
|
}
|
|
public void setTeamGainRate(BigDecimal teamGainRate) {
|
this.teamGainRate = teamGainRate;
|
}
|
|
public String getTeamDivide() {
|
return teamDivide;
|
}
|
|
public void setTeamDivide(String teamDivide) {
|
this.teamDivide = teamDivide;
|
}
|
|
public GoldCornPriceCountType getCountType() {
|
return countType;
|
}
|
|
public void setCountType(GoldCornPriceCountType countType) {
|
this.countType = countType;
|
}
|
}
|