| | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "套餐来源,转让,购买") |
| | | private String source; |
| | | |
| | | @ApiModelProperty(value = "划扣金额") |
| | | private BigDecimal price; |
| | | |
| | | @ApiModelProperty(value = "时长") |
| | | private Integer timeLength; |
| | | |
| | |
| | | @ApiModelProperty(value = "快过期 1-是 2-否") |
| | | private String isInvalid; |
| | | |
| | | @ApiModelProperty(value = " 使用情况余额") |
| | | private Double balance; |
| | | |
| | | @ApiModelProperty(value = "项目状态 有效/无效") |
| | | private String status; |
| | | |
| | | public String getIsInvalid() { |
| | | Date date = DateUtil.nextNDate(new Date(), 7); |
| | | Date date = DateUtil.getDateAfterMonth(new Date(), 1); |
| | | if (invalidTime != null) { |
| | | if (new Date().after(invalidTime)) { |
| | | return "3"; |
| | | } |
| | | |
| | | if (date.after(invalidTime)) { |
| | | return "1"; |
| | | } |
| | |
| | | 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; |
| | | } |
| | | } |