935090232@qq.com
2022-02-20 c253b555c7905c5136d47cd615ef545fa50cc6ad
zq-erp/src/main/java/com/matrix/system/app/vo/ServiceProjVo.java
New file
@@ -0,0 +1,164 @@
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.math.BigDecimal;
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 String source;
    @ApiModelProperty(value = "划扣金额")
    private BigDecimal price;
    @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;
    @ApiModelProperty(value = " 使用情况余额")
    private Double balance;
    @ApiModelProperty(value = "项目状态 有效/无效")
    private String status;
    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;
    }
    public String getStatus() {
        if ("有效".equals(status)) {
            return "1";
        } else {
            return "2";
        }
    }
    public void setStatus(String status) {
        this.status = status;
    }
    public String getSource() {
        return source;
    }
    public void setSource(String source) {
        this.source = source;
    }
    public Double getBalance() {
        return balance;
    }
    public void setBalance(Double balance) {
        this.balance = balance;
    }
    public BigDecimal getPrice() {
        return price;
    }
    public void setPrice(BigDecimal price) {
        this.price = price;
    }
}