记得上下班打卡 | git大法好,push需谨慎

Commit 72238856 authored by 胡佳晨's avatar 胡佳晨

修改券列表2

parent 75177511
......@@ -12,11 +12,14 @@ import java.util.List;
@Api
@Data
public class CouponCanUseParam implements Serializable, Cloneable {
@ApiModelProperty(name = "param", value = "对象",required = true)
@NotNull @NotBlank
@ApiModelProperty(name = "param", value = "对象", required = true)
@NotNull
@NotBlank
private List<CouponCanUse2Param> param;
@ApiModelProperty(dataType = "String", name = "uid", value = "用户id",example = "10",required = false)
@ApiModelProperty(dataType = "String", name = "uid", value = "用户id", example = "10", required = false)
private String uid;
@ApiModelProperty(dataType = "String", name = "storeId", value = "店铺id", example = "10", required = false)
private String storeId;
private static final CouponCanUseParam obj = new CouponCanUseParam();
......
......@@ -278,6 +278,11 @@ public class GoblinCouponImpl implements GoblinCouponService {
for (GoblinUserCouponVo vo : voList) {
//判断券状态 和 触发金额
if (vo.getDuedAt().isAfter(now) && vo.getState().equals(1)) {//&& vo.getTriggers().compareTo(totalPrice) <= 0
if (param.getStoreId() != null && !param.getStoreId().equals("")) {
if (!vo.getStoreId().equals(param.getStoreId())) {
continue;
}
}
if (vo.getUseScope().equals("0") && vo.getTriggers().compareTo(totalPrice) <= 0) {
vo.setSpuIds(CollectionUtil.linkedListString());
returnList.add(vo);
......@@ -490,7 +495,7 @@ public class GoblinCouponImpl implements GoblinCouponService {
}
}
} else if (platformUcouponId != null && !platformUcouponId.equals("")) {
CandyCouponVo candyCouponVo = orderUtils.getCouponDetails(platformUcouponId,params.getUid());
CandyCouponVo candyCouponVo = orderUtils.getCouponDetails(platformUcouponId, params.getUid());
if (candyCouponVo == null) {
return null;
}
......@@ -558,7 +563,7 @@ public class GoblinCouponImpl implements GoblinCouponService {
//计算平台券金额
private BigDecimal mathPlatformPrice(CandyCouponVo candyCouponVo, List<CouponCanUse2Param> param, BigDecimal contentPrice) {
BigDecimal voucherPrice = BigDecimal.ZERO;
if(candyCouponVo.getUseRules().size()==0){
if (candyCouponVo.getUseRules().size() == 0) {
return contentPrice;
}
for (CandyCouponRulesVo couponRulesVo : candyCouponVo.getUseRules()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment