Commit 47e04a7b by 刘鹏飞

Merge remote-tracking branch 'remotes/origin/feature/coco-payGift-刘鹏飞' into qa

# Conflicts:
#	order-application-service/src/main/java/cn/freemud/enums/ResponseResult.java
#	order-application-service/src/main/java/cn/freemud/service/impl/CheckOrder.java
parents 3c611c5d 9a517e24
......@@ -9,6 +9,8 @@ public class ResponseCodeConstant {
public final static String RESPONSE_SUCCESS_STR = "100";
public final static String COCO_RESPONSE_COUPON_ERR_STR = "46013";
public final static String RESPONSE_SUCCESS_OK = "ok";
public final static Integer RESPONSE_SUCCESS_1 = 1;
public final static String RESPONSE_SUCCESS_0_STR = "0";
......
......@@ -194,6 +194,7 @@ public enum ResponseResult {
COUPON_TYPE_ERROR("46015","优惠类型错误"),
PAY_ERROR("46016","支付类型错误"),
COUPON_DATETIME_INVAILD("46017", "优惠券在当前时间不可用"),
COCO_COUPON_VALIDATOR_FAIL("46015", "优惠券验证错误"),
/**
* 加价购商品
*/
......
......@@ -571,6 +571,12 @@ public class CheckOrder {
} else {
apportionResponse = shoppingCartClient.getShoppingCartGoodsApportionNew(requestDto);
}
// 这个是专门的给coco使用的验证券的逻辑
if (!ObjectUtils.equals(ResponseCodeConstant.COCO_RESPONSE_COUPON_ERR_STR, apportionResponse.getCode())) {
throw new ServiceException(ResponseResult.COCO_COUPON_VALIDATOR_FAIL,apportionResponse.getMessage());
}
if (!ObjectUtils.equals(ResponseCodeConstant.RESPONSE_SUCCESS_STR, apportionResponse.getCode())) {
ResponseResult responseResult = ResponseResult.getResponseResult(apportionResponse.getCode());
throw new ServiceException(responseResult != null ? responseResult : ResponseResult.SHOPPING_CART_GETINFO_ERROR);
......
......@@ -9,6 +9,9 @@ public class ResponseCodeConstant {
public final static String RESPONSE_SUCCESS_STR = "100";
// coco券校验异常的错误
public final static String COCO_RESPONSE_COUPON_ERR_STR = "700";
public final static String RESPONSE_SUCCESS_OK = "ok";
public final static Integer RESPONSE_SUCCESS_1 = 1;
public final static String RESPONSE_SUCCESS_0_STR = "0";
......
......@@ -143,6 +143,7 @@ public enum ResponseResult {
COUPON_SHOP_NOTSUPPORT("46010", "优惠券在当前门店不可用"),
COUPON_ORDER_WAY_ERROR("46011", "您选择得优惠券不适用该点餐方式"),
COUPON_VERIFICATION_FAIL("46012", "优惠券核销失败"),
COCO_COUPON_VALIDATOR_FAIL("46013", "优惠券验证错误"),
/**
* 加价购商品
*/
......
......@@ -198,6 +198,11 @@ public class CalculationSharingDiscountService {
return result;
}
// 这个是专门给coco使用的券验证错误的异常,message要抛出去
if(sharingDiscountResponseDto != null && StringUtils.equals(sharingDiscountResponseDto.getStatusCode(), ResponseCodeConstant.COCO_RESPONSE_COUPON_ERR_STR)){
throw new ServiceException(ResponseResult.COCO_COUPON_VALIDATOR_FAIL,sharingDiscountResponseDto.getMsg());
}
// 支付宝华莱士紧急修改代码,当促销返回103错误码时,需要报券不适用于该门店,且清空购物车
//throw new ServiceException(ResponseResult.OPERATE_TOO_OFTEN);
return null;
......
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