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

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

下列接口 新增 字段 perType 演出的 performanceVo 的 type 字段

/candy-coupon/preUse/performance “要使用券列表 - 演出”
/candy-coupon/preCanUse/performance “是否可用券 - 演出”
/candy-coupon/use “券使用”

提交 orderImpl DataUtils.getGoblinPlatformCoupon 方法获取 商城平台券的适用入场人信息

下单接口增加效验,使用券的入场人信息与购买时不一致 返回错误:实名券与入场人信息不一致
parent a5cb6e4a
...@@ -262,7 +262,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ ...@@ -262,7 +262,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
} else { } else {
if (DateUtil.compareStrDay(DateUtil.getNowTime(), memberTimeStart) == 1 && DateUtil.compareStrDay(DateUtil.getNowTime(), timeStart) == -1) { if (DateUtil.compareStrDay(DateUtil.getNowTime(), memberTimeStart) == 1 && DateUtil.compareStrDay(DateUtil.getNowTime(), timeStart) == -1) {
advanceMap = orderUtils.useCoupon(payOrderParam.getAdvanceCode(), "购买 " + performanceData.getTitle(), BigDecimal.ZERO, payOrderParam.getPerformanceId(), payOrderParam.getTimeId(), payOrderParam.getTicketId()); advanceMap = orderUtils.useCoupon(payOrderParam.getAdvanceCode(), "购买 " + performanceData.getTitle(), BigDecimal.ZERO, payOrderParam.getPerformanceId(), payOrderParam.getTimeId(), payOrderParam.getTicketId(),performanceData.getType());
if (advanceMap == null) { if (advanceMap == null) {
return ResponseDto.failure("优先券不可用"); return ResponseDto.failure("优先券不可用");
} }
...@@ -491,7 +491,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ ...@@ -491,7 +491,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
} }
if (payOrderParam.getVoucherCode() != null) { if (payOrderParam.getVoucherCode() != null) {
HashMap<String, Object> hashMap = orderUtils.useCoupon(payOrderParam.getVoucherCode(), content, orderTickets.getPriceTotal().subtract(priceExpress), payOrderParam.getPerformanceId(), payOrderParam.getTimeId(), payOrderParam.getTicketId()); HashMap<String, Object> hashMap = orderUtils.useCoupon(payOrderParam.getVoucherCode(), content, orderTickets.getPriceTotal().subtract(priceExpress), payOrderParam.getPerformanceId(), payOrderParam.getTimeId(), payOrderParam.getTicketId(),performanceData.getType());
if (null != hashMap) { if (null != hashMap) {
BigDecimal priceVoucher = (BigDecimal) hashMap.get("voucher"); BigDecimal priceVoucher = (BigDecimal) hashMap.get("voucher");
Integer typeVoucher = (Integer) hashMap.get("type"); Integer typeVoucher = (Integer) hashMap.get("type");
......
...@@ -222,7 +222,7 @@ public class OrderUtils { ...@@ -222,7 +222,7 @@ public class OrderUtils {
* @param totalPrice 订单总价 * @param totalPrice 订单总价
* @return * @return
*/ */
public HashMap<String, Object> useCoupon(String uCouponId, String content, BigDecimal totalPrice, String performanceId, String timesId, String ticketId) { public HashMap<String, Object> useCoupon(String uCouponId, String content, BigDecimal totalPrice, String performanceId, String timesId, String ticketId,int perType) {
HashMap<String, Object> hashMap = CollectionUtil.mapStringObject(); HashMap<String, Object> hashMap = CollectionUtil.mapStringObject();
try { try {
MultiValueMap<String, String> params = CollectionUtil.linkedMultiValueMapStringString(); MultiValueMap<String, String> params = CollectionUtil.linkedMultiValueMapStringString();
...@@ -233,6 +233,7 @@ public class OrderUtils { ...@@ -233,6 +233,7 @@ public class OrderUtils {
params.add("performanceId", performanceId); params.add("performanceId", performanceId);
params.add("timeId", timesId); params.add("timeId", timesId);
params.add("ticketId", ticketId); params.add("ticketId", ticketId);
params.add("perType", perType+"");
MultiValueMap<String, String> header = CollectionUtil.linkedMultiValueMapStringString(); MultiValueMap<String, String> header = CollectionUtil.linkedMultiValueMapStringString();
header.add("Authorization", "Bearer " + CurrentUtil.getToken()); header.add("Authorization", "Bearer " + CurrentUtil.getToken());
String returnData = HttpUtil.post(candyUrl + "/candy-coupon/use", params, header); String returnData = HttpUtil.post(candyUrl + "/candy-coupon/use", params, header);
......
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