package com.matrix.system.app.vo;
|
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.matrix.core.tools.DateUtil;
|
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModelProperty;
|
|
import java.util.Date;
|
|
/**
|
* @author wzy
|
* @date 2020-12-24
|
**/
|
@ApiModel(value = "ServiceProjVo", description = "用户项目返回参数类")
|
public class ServiceProjVo {
|
|
@ApiModelProperty(value = "id")
|
private Long id;
|
|
@ApiModelProperty(value = "订单ID")
|
private Long projId;
|
|
@ApiModelProperty(value = "商品名称")
|
private String name;
|
|
@ApiModelProperty(value = "时长")
|
private Integer timeLength;
|
|
@JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8")
|
@ApiModelProperty(value = "有效期")
|
private Date invalidTime;
|
|
@ApiModelProperty(value = "剩余数量")
|
private Integer count;
|
|
@ApiModelProperty(value = "图片")
|
private String img;
|
|
@ApiModelProperty(value = "快过期 1-是 2-否")
|
private String isInvalid;
|
|
public String getIsInvalid() {
|
Date date = DateUtil.getDateAfterMonth(new Date(), 1);
|
if (invalidTime != null) {
|
if (new Date().after(invalidTime)) {
|
return "3";
|
}
|
|
if (date.after(invalidTime)) {
|
return "1";
|
}
|
}
|
return "2";
|
}
|
|
public void setIsInvalid(String isInvalid) {
|
this.isInvalid = isInvalid;
|
}
|
|
public String getName() {
|
return name;
|
}
|
|
public void setName(String name) {
|
this.name = name;
|
}
|
|
public Integer getTimeLength() {
|
return timeLength;
|
}
|
|
public void setTimeLength(Integer timeLength) {
|
this.timeLength = timeLength;
|
}
|
|
public Long getProjId() {
|
return projId;
|
}
|
|
public void setProjId(Long projId) {
|
this.projId = projId;
|
}
|
|
public Date getInvalidTime() {
|
return invalidTime;
|
}
|
|
public void setInvalidTime(Date invalidTime) {
|
this.invalidTime = invalidTime;
|
}
|
|
public Integer getCount() {
|
return count;
|
}
|
|
public void setCount(Integer count) {
|
this.count = count;
|
}
|
|
public String getImg() {
|
return img;
|
}
|
|
public void setImg(String img) {
|
this.img = img;
|
}
|
|
public Long getId() {
|
return id;
|
}
|
|
public void setId(Long id) {
|
this.id = id;
|
}
|
}
|