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

Commit 8c581be1 authored by jiangxiulong's avatar jiangxiulong

去掉券的处理

parent 6590205e
......@@ -19,11 +19,11 @@ public class GoblinNftOrderPayParam {
@NotBlank(message = "skuId不能为空")
private String skuId;
@ApiModelProperty(position = 12, value = "平台券码")
/*@ApiModelProperty(position = 12, value = "平台券码")
private String platVoucherCode;
@ApiModelProperty(position = 13, value = "商品券码")
private String storeVoucherCode;
private String storeVoucherCode;*/
@ApiModelProperty(position = 14, required = true, value = "支付方式", allowableValues = "alipay,wepay,douyinpay,unionpay")
@Pattern(regexp = LnsRegex.Valid.TRIPLE_PF_FOR_PAY, message = "支付方式无效")
......
......@@ -78,11 +78,11 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
return ResponseDto.failure("该商品仅限特定用户购买~");
}
// 判断优惠券不能一起使用
String platVoucherCode = payParam.getPlatVoucherCode();
/*String platVoucherCode = payParam.getPlatVoucherCode();
String storeVoucherCode = payParam.getStoreVoucherCode();
if (!StringUtils.isEmpty(platVoucherCode) && !StringUtils.isEmpty(storeVoucherCode)) {
return ResponseDto.failure("平台券与店铺券不可一起使用哦~");
}
}*/
// 判断数量限购
int limitCount = skuVo.getBuyLimit();
......@@ -107,13 +107,14 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
* 无论平台券还是店铺券都只支持代金券1的类型
*/
BigDecimal voucherPrice = BigDecimal.ZERO;
BigDecimal storeVoucherPrice = BigDecimal.ZERO;
String orderId = IDGenerator.nextSnowId();
String orderCode = IDGenerator.storeCode(orderId);
BigDecimal totalPrice = skuVo.getPrice();
if (isVip) {// 会员价
totalPrice = skuVo.getPriceMember();
}
if (!StringUtils.isEmpty(platVoucherCode)) {// 平台券
/*if (!StringUtils.isEmpty(platVoucherCode)) {// 平台券
GoblinUseResultVo useResultVo = nftOrderUtils.useCoupon(platVoucherCode, "购买NFT商品[" + orderCode + "]", totalPrice, spuId, uid);
String typeVoucher = useResultVo.getCouType();
if (typeVoucher.equals("-1")) {
......@@ -123,7 +124,6 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
voucherPrice = useResultVo.getValue();
}
}
BigDecimal storeVoucherPrice = BigDecimal.ZERO;
if (!StringUtils.isEmpty(storeVoucherCode)) {// 店铺券
GoblinUseResultVo storeCouponVo = nftOrderUtils.useStoreCoupon(storeVoucherCode, "购买NFT商品[" + orderCode + "]", totalPrice, spuId, uid);
String typeVoucher = storeCouponVo.getCouType();
......@@ -133,7 +133,7 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
} else {
storeVoucherPrice = storeCouponVo.getValue();
}
}
}*/
// 下单数据
GoblinNftOrder nftOrder = order(payParam, skuVo.getStoreId(), uid, spuId, number, orderId, orderCode, totalPrice, voucherPrice, storeVoucherPrice, isVip);
......@@ -178,8 +178,10 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
nftOrder.setStorePriceCoupon(storeVoucherPrice);
nftOrder.setPriceVoucher(voucherPrice.add(storeVoucherPrice));
nftOrder.setStatus(GoblinStatusConst.NftStatus.ORDER_STATUS_1.getValue());
nftOrder.setUcouponId(payParam.getPlatVoucherCode());
nftOrder.setStoreCouponId(payParam.getStoreVoucherCode());
/*nftOrder.setUcouponId(payParam.getPlatVoucherCode());
nftOrder.setStoreCouponId(payParam.getStoreVoucherCode());*/
nftOrder.setUcouponId("");
nftOrder.setStoreCouponId("");
nftOrder.setPayType(payParam.getPayType());
nftOrder.setDeviceFrom(payParam.getDeviceFrom());
nftOrder.setSource(source);
......
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