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 org.yeshi.utils.TimeUtil;
|
|
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 Integer cornNum;
|
private String validateTime;
|
private String remarks;
|
|
public GoldCornGetPrice toEntity(SystemEnum system) {
|
GoldCornGetPrice entity = new GoldCornGetPrice();
|
entity.setCornNum(cornNum);
|
entity.setId(id);
|
entity.setRemarks(remarks);
|
entity.setSystem(system);
|
entity.setType(type);
|
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.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;
|
}
|
}
|