package com.yeshi.makemoney.app.vo.admin.goldcorn;
|
|
import com.yeshi.makemoney.app.entity.SystemEnum;
|
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetFrequencyConfig;
|
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetPrice;
|
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetType;
|
import org.springframework.data.annotation.Id;
|
import org.springframework.data.mongodb.core.index.Indexed;
|
import org.yeshi.utils.TimeUtil;
|
|
import java.util.Date;
|
|
/**
|
* @author hxh
|
* @title: GoldCornGetPriceAdminVO
|
* @description: TODO
|
* @date 2022/4/2 17:42
|
*/
|
public class GoldCornGetFrequencyAdminVO {
|
|
private String id;
|
private SystemEnum system;
|
private GoldCornGetType type;
|
private Long limitCount;
|
private GoldCornGetFrequencyConfig.GoldCornGetFrequencyTimeUnit timeUnit;
|
private String validateTime;
|
private String remarks;
|
private Long minSpaceTime;
|
|
public GoldCornGetFrequencyConfig toEntity(SystemEnum system) {
|
GoldCornGetFrequencyConfig entity = new GoldCornGetFrequencyConfig();
|
entity.setLimitCount(limitCount);
|
entity.setTimeUnit(timeUnit);
|
entity.setId(id);
|
entity.setRemarks(remarks);
|
entity.setSystem(system);
|
entity.setType(type);
|
entity.setMinSpaceTime(minSpaceTime);
|
entity.setValidateTime(new Date(TimeUtil.convertToTimeTemp(validateTime, "yyyy-MM-dd HH:mm:ss")));
|
return entity;
|
}
|
|
|
public static GoldCornGetFrequencyAdminVO create(GoldCornGetFrequencyConfig entity) {
|
GoldCornGetFrequencyAdminVO vo = new GoldCornGetFrequencyAdminVO();
|
vo.setLimitCount(entity.getLimitCount());
|
vo.setId(entity.getId());
|
vo.setRemarks(entity.getRemarks());
|
vo.setType(entity.getType());
|
vo.setTimeUnit(entity.getTimeUnit());
|
vo.setMinSpaceTime(entity.getMinSpaceTime());
|
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 SystemEnum getSystem() {
|
return system;
|
}
|
|
public void setSystem(SystemEnum system) {
|
this.system = system;
|
}
|
|
public GoldCornGetType getType() {
|
return type;
|
}
|
|
public void setType(GoldCornGetType type) {
|
this.type = type;
|
}
|
|
public Long getLimitCount() {
|
return limitCount;
|
}
|
|
public void setLimitCount(Long limitCount) {
|
this.limitCount = limitCount;
|
}
|
|
public GoldCornGetFrequencyConfig.GoldCornGetFrequencyTimeUnit getTimeUnit() {
|
return timeUnit;
|
}
|
|
public void setTimeUnit(GoldCornGetFrequencyConfig.GoldCornGetFrequencyTimeUnit timeUnit) {
|
this.timeUnit = timeUnit;
|
}
|
|
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 Long getMinSpaceTime() {
|
return minSpaceTime;
|
}
|
|
public void setMinSpaceTime(Long minSpaceTime) {
|
this.minSpaceTime = minSpaceTime;
|
}
|
}
|