|
|
|
@@ -277,7 +277,7 @@ public class PosServiceImpl implements PosService { |
|
|
|
} |
|
|
|
if (actionType.equals(EnumVerifyActionType.PRE_VERIFY) || |
|
|
|
actionType.equals(EnumVerifyActionType.VERIFY_PAY)) { |
|
|
|
posAmount = Integer.valueOf(posAmount); |
|
|
|
posAmount = Integer.valueOf(posAmountStr); |
|
|
|
} |
|
|
|
} catch (NumberFormatException e) { |
|
|
|
logger.error(e.getMessage()); |
|
|
|
@@ -415,8 +415,11 @@ public class PosServiceImpl implements PosService { |
|
|
|
posOrderIdStr, posOrderId, posAmount, |
|
|
|
couponOrderIdStr); |
|
|
|
coRetArr.add(oneRetMap); |
|
|
|
posAmount = Integer.valueOf(oneRetMap.get(WxPayConstant.REMAIN_AMOUNT)); |
|
|
|
} catch (MallinkException e) { |
|
|
|
throw new MallinkException(e.getErrorCode(), e.getMessage()); |
|
|
|
} catch (Exception e) { |
|
|
|
throw new MallinkException(500, e.getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@@ -608,12 +611,6 @@ public class PosServiceImpl implements PosService { |
|
|
|
logger.error(ErrorCode.VERIFY_PRE_BUSER_NOT_EQUAL.getMessage() + ": " + buUserIdStr); |
|
|
|
throw new MallinkException(ErrorCode.VERIFY_PRE_BUSER_NOT_EQUAL); |
|
|
|
} |
|
|
|
if (actionType.equals(EnumVerifyActionType.VERIFY_PAY)) { |
|
|
|
if (couponOrderCVo.getPrice() > posAmount) { |
|
|
|
logger.error(ErrorCode.VERIFY_PRE_POS_ORDER_PRICE_ISSUE.getMessage()); |
|
|
|
throw new MallinkException(ErrorCode.VERIFY_PRE_POS_ORDER_PRICE_ISSUE); |
|
|
|
} |
|
|
|
} |
|
|
|
// check pos order是否一致 |
|
|
|
PosCouponOrderVerify posCouponOrderVerifyQ = new PosCouponOrderVerify(); |
|
|
|
posCouponOrderVerifyQ.setTenantId(tenantId); |
|
|
|
@@ -627,12 +624,6 @@ public class PosServiceImpl implements PosService { |
|
|
|
} |
|
|
|
blVerify = true; |
|
|
|
} else if (couponOrderCVo.getCouponOrderStatus().equals(EnumCouponOrderStatus.COUPON_ORDER_USE_WAIT.getCode())) { |
|
|
|
if (actionType.equals(EnumVerifyActionType.VERIFY_PAY)) { |
|
|
|
if (couponOrderCVo.getPrice() > posAmount) { |
|
|
|
logger.error(ErrorCode.VERIFY_PRE_POS_ORDER_PRICE_ISSUE.getMessage()); |
|
|
|
throw new MallinkException(ErrorCode.VERIFY_PRE_POS_ORDER_PRICE_ISSUE); |
|
|
|
} |
|
|
|
} |
|
|
|
logger.info("券可以被核销: " + couponOrderIdStr); |
|
|
|
blVerify = true; |
|
|
|
} |
|
|
|
|