Commit 624ea801 by 刘鹏飞

coco验证券

parent 0e241039
...@@ -9,6 +9,8 @@ public class ResponseCodeConstant { ...@@ -9,6 +9,8 @@ public class ResponseCodeConstant {
public final static String RESPONSE_SUCCESS_STR = "100"; 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 String RESPONSE_SUCCESS_OK = "ok";
public final static Integer RESPONSE_SUCCESS_1 = 1; public final static Integer RESPONSE_SUCCESS_1 = 1;
public final static String RESPONSE_SUCCESS_0_STR = "0"; public final static String RESPONSE_SUCCESS_0_STR = "0";
......
...@@ -184,6 +184,7 @@ public enum ResponseResult { ...@@ -184,6 +184,7 @@ public enum ResponseResult {
COUPON_VERIFICATION_FAIL("46012","优惠券核销失败"), COUPON_VERIFICATION_FAIL("46012","优惠券核销失败"),
COUPON_CALLBACK_FAIL("46013","优惠券移除卡包失败"), COUPON_CALLBACK_FAIL("46013","优惠券移除卡包失败"),
COUPON_INVAILD("46014", "优惠券失效"), COUPON_INVAILD("46014", "优惠券失效"),
COCO_COUPON_VALIDATOR_FAIL("46015", "优惠券验证错误"),
/** /**
* 加价购商品 * 加价购商品
*/ */
......
...@@ -556,6 +556,12 @@ public class CheckOrder { ...@@ -556,6 +556,12 @@ public class CheckOrder {
//加价购商品 校验放购物车校验 //加价购商品 校验放购物车校验
requestDto.setPremiumExchangeActivity(createOrderVo.getPremiumExchangeActivity()); requestDto.setPremiumExchangeActivity(createOrderVo.getPremiumExchangeActivity());
cn.freemud.base.entity.BaseResponse<ShoppingCartGoodsDto> apportionResponse = shoppingCartClient.getShoppingCartGoodsApportionNew(requestDto); cn.freemud.base.entity.BaseResponse<ShoppingCartGoodsDto> 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())) { if (!ObjectUtils.equals(ResponseCodeConstant.RESPONSE_SUCCESS_STR, apportionResponse.getCode())) {
ResponseResult responseResult = ResponseResult.getResponseResult(apportionResponse.getCode()); ResponseResult responseResult = ResponseResult.getResponseResult(apportionResponse.getCode());
throw new ServiceException(responseResult != null ? responseResult : ResponseResult.SHOPPING_CART_GETINFO_ERROR); throw new ServiceException(responseResult != null ? responseResult : ResponseResult.SHOPPING_CART_GETINFO_ERROR);
......
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