Commit 1ae11a54 by ping.wu

虚拟商品券失效无法下单

parent f2d4ac07
......@@ -163,6 +163,7 @@ public enum ResponseResult {
COUPON_ORDER_WAY_ERROR("46011", "您选择得优惠券不适用该点餐方式"),
COUPON_VERIFICATION_FAIL("46012","优惠券核销失败"),
COUPON_CALLBACK_FAIL("46013","优惠券移除卡包失败"),
COUPON_INVAILD("46014", "优惠券失效"),
/**
* 加价购商品
*/
......
......@@ -148,9 +148,15 @@ public class SellCouponOrderServiceImpl {
}
List<ActiveDetailVO> activeDetailVOS = batchQueryActivityInfo(partnerId, activityCodes, trackingNo);
if(activeDetailVOS == null){
if(CollectionUtils.isEmpty(activeDetailVOS) || activityCodes.size() != activeDetailVOS.size()){
return ResponseUtil.error(ResponseResult.STORE_ITEM_CHECK_INVAILD);
}
Date now = new Date();
for (ActiveDetailVO activeDetailVO : activeDetailVOS){
if(activeDetailVO.getEffectiveEndTime() != null && activeDetailVO.getEffectiveEndTime().before(now)){
return ResponseUtil.error(ResponseResult.COUPON_INVAILD);
}
}
CreateOrderRequest createOrderRequest = convent2NEWCreateOrderRequest(requestVo,userLoginInfoDto,productInfosByIds.getData(),activeDetailVOS,storeResponse.getBizVO());
com.freemud.application.sdk.api.ordercenter.response.BaseResponse<OrderInfoReqs> orderInfoReqsBaseResponse = orderSdkService.createOrder(createOrderRequest, trackingNo);
......
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