You've already forked FrameTour-BE
优惠券相关+后台
This commit is contained in:
@@ -40,8 +40,12 @@ public class VideoGoodsDetailVO {
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date shotTime;
|
||||
// 价格
|
||||
private Integer couponId;
|
||||
private Integer couponRecordId;
|
||||
private BigDecimal couponPrice;
|
||||
private BigDecimal origPrice;
|
||||
private String price;
|
||||
private String slashPrice;
|
||||
private BigDecimal slashPrice;
|
||||
// 是否已购买 0否 1是
|
||||
private Integer isBuy;
|
||||
// 镜头数
|
||||
@@ -51,4 +55,14 @@ public class VideoGoodsDetailVO {
|
||||
private Integer height;
|
||||
private Integer width;
|
||||
private BigDecimal duration;
|
||||
|
||||
public BigDecimal getDiscountPrice() {
|
||||
if (slashPrice == null) {
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
if (slashPrice.compareTo(BigDecimal.ZERO) <= 0) {
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
return slashPrice.subtract(origPrice);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user