package com.yeshi.makemoney.app.vo.admin.goldcorn;
|
|
import com.yeshi.makemoney.app.entity.SystemEnum;
|
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornMoneyExchangeRateRecord;
|
import org.yeshi.utils.TimeUtil;
|
|
import java.math.BigDecimal;
|
import java.util.Date;
|
|
/**
|
* @author hxh
|
* @title: GoldCornMoneyExchangeRateAdminVO
|
* @description:
|
* @date 2022/4/2 16:42
|
*/
|
public class GoldCornMoneyExchangeRateAdminVO {
|
|
private String id;
|
private String day;
|
private BigDecimal rate;
|
private String validateTime;
|
|
public GoldCornMoneyExchangeRateRecord toEntity(SystemEnum system) {
|
GoldCornMoneyExchangeRateRecord record = new GoldCornMoneyExchangeRateRecord();
|
record.setId(id);
|
record.setValidateTime(new Date(TimeUtil.convertToTimeTemp(validateTime, "yyyy-MM-dd HH:mm:ss")));
|
record.setSystem(system);
|
record.setRate(rate);
|
record.setDay(day);
|
return record;
|
}
|
|
public static GoldCornMoneyExchangeRateAdminVO create(GoldCornMoneyExchangeRateRecord record) {
|
GoldCornMoneyExchangeRateAdminVO vo = new GoldCornMoneyExchangeRateAdminVO();
|
vo.setId(record.getId());
|
vo.setValidateTime(TimeUtil.getGernalTime(record.getValidateTime().getTime(), "yyyy-MM-dd HH:mm:ss"));
|
vo.setRate(record.getRate());
|
vo.setDay(record.getDay());
|
return vo;
|
}
|
|
public String getId() {
|
return id;
|
}
|
|
public void setId(String id) {
|
this.id = id;
|
}
|
|
public String getDay() {
|
return day;
|
}
|
|
public void setDay(String day) {
|
this.day = day;
|
}
|
|
public BigDecimal getRate() {
|
return rate;
|
}
|
|
public void setRate(BigDecimal rate) {
|
this.rate = rate;
|
}
|
|
public String getValidateTime() {
|
return validateTime;
|
}
|
|
public void setValidateTime(String validateTime) {
|
this.validateTime = validateTime;
|
}
|
}
|