| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Map<String, Object> payOrder(PayOrderDto payOrderDto) { |
| | | MallMember member = LoginUserUtil.getLoginUser(); |
| | | MallOrderInfo orderInfo = this.baseMapper.selectOrderByMemberIdAndId(member.getId(), payOrderDto.getId()); |
| | | MallOrderInfo orderInfo = this.baseMapper.selectOrderDetailsById(payOrderDto.getId()); |
| | | if (orderInfo == null || AppContants.DEL_FLAG_Y == orderInfo.getDelFlag()) { |
| | | throw new FebsException("订单不存在"); |
| | | } |
| | |
| | | }else{ |
| | | JSONObject jsonObject = JSONUtil.parseObj(agreementSignStr); |
| | | payResultStr = (String) jsonObject.get("biz_code"); |
| | | String signBizMsg = (String) jsonObject.get("biz_msg"); |
| | | if("JS000000" != payResultStr){ |
| | | throw new FebsException("支付失败"); |
| | | throw new FebsException(signBizMsg); |
| | | } |
| | | } |
| | | |
| | |
| | | }else{ |
| | | JSONObject jsonObject = JSONUtil.parseObj(agreementPayStr); |
| | | payResultStr = (String) jsonObject.get("biz_code"); |
| | | String payBizMsg = (String) jsonObject.get("biz_msg"); |
| | | if(!"JS000000".equals(payResultStr)){ |
| | | throw new FebsException("支付失败"); |
| | | throw new FebsException(payBizMsg); |
| | | } |
| | | } |
| | | orderInfo.setPayMethod("快捷协议支付"); |