| @@ -3,7 +3,9 @@ package com.simple.domain.vo; | |||||
| import com.simple.domain.po.WxCoupon; | import com.simple.domain.po.WxCoupon; | ||||
| import com.simple.domain.po.WxCouponChannel; | import com.simple.domain.po.WxCouponChannel; | ||||
| import javax.persistence.Transient; | |||||
| import java.io.Serializable; | import java.io.Serializable; | ||||
| import java.text.DecimalFormat; | |||||
| import java.util.Date; | import java.util.Date; | ||||
| /** | /** | ||||
| @@ -25,6 +27,13 @@ public class WxCouponChannelVo extends WxCouponChannel implements Serializable { | |||||
| /*使用条件金额(适用于类型1,2,3,4)**/ | /*使用条件金额(适用于类型1,2,3,4)**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="使用条件金额(适用于类型1,2,3,4)",name="usePrice") | @io.swagger.annotations.ApiModelProperty(value="使用条件金额(适用于类型1,2,3,4)",name="usePrice") | ||||
| private Integer usePrice; | private Integer usePrice; | ||||
| @Transient | |||||
| private String salePriceStr; | |||||
| @Transient | |||||
| private String usePriceStr; | |||||
| /*限领张数**/ | /*限领张数**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="限领张数",name="useLimitQuantity") | @io.swagger.annotations.ApiModelProperty(value="限领张数",name="useLimitQuantity") | ||||
| private Integer useLimitQuantity; | private Integer useLimitQuantity; | ||||
| @@ -110,6 +119,31 @@ public class WxCouponChannelVo extends WxCouponChannel implements Serializable { | |||||
| public void setSendEndDate(Date sendEndDate) { | public void setSendEndDate(Date sendEndDate) { | ||||
| this.sendEndDate = sendEndDate; | this.sendEndDate = sendEndDate; | ||||
| } | } | ||||
| public String getSalePriceStr() { | |||||
| if(salePrice!=null) { | |||||
| DecimalFormat df=new DecimalFormat("0.00"); | |||||
| salePriceStr = df.format((float)salePrice/100); | |||||
| } | |||||
| return salePriceStr; | |||||
| } | |||||
| public void setSalePriceStr(String salePriceStr) { | |||||
| this.salePriceStr = salePriceStr; | |||||
| } | |||||
| public String getUsePriceStr() { | |||||
| if(usePrice!=null) { | |||||
| DecimalFormat df=new DecimalFormat("0.00"); | |||||
| usePriceStr = df.format((float)usePrice/100); | |||||
| } | |||||
| return usePriceStr; | |||||
| } | |||||
| public void setUsePriceStr(String usePriceStr) { | |||||
| this.usePriceStr = usePriceStr; | |||||
| } | |||||
| public WxCouponChannelVo(){} | public WxCouponChannelVo(){} | ||||
| public WxCouponChannelVo setWxCoupon (WxCoupon wxCoupon){ | public WxCouponChannelVo setWxCoupon (WxCoupon wxCoupon){ | ||||
| this.coverImg=wxCoupon.getCoverImg(); | this.coverImg=wxCoupon.getCoverImg(); | ||||