| | |
| | | throw new YamiShopBindException("广告不存在"); |
| | | } |
| | | |
| | | C2cPaymentMethod method =c2cPaymentMethodService.get(payment_method_id); |
| | | if (null == method) { |
| | | throw new YamiShopBindException("支付方式不存在"); |
| | | if (C2cAdvert.DIRECTION_SELL.equals(c2cAdvert.getDirection())) { |
| | | C2cPaymentMethod method =c2cPaymentMethodService.get(payment_method_id); |
| | | if (null == method) { |
| | | throw new YamiShopBindException("支付方式不存在"); |
| | | } |
| | | } |
| | | |
| | | |
| | | if (StringUtils.isEmptyString(order_type) || !Arrays.asList("by_amount", "by_num").contains(order_type)) { |
| | | throw new YamiShopBindException("订单类型不正确"); |
| | |
| | | public Object pay_finish(HttpServletRequest request) { |
| | | String order_no = request.getParameter("order_no"); |
| | | String safe_password = request.getParameter("safe_password"); |
| | | String img = request.getParameter("img"); |
| | | |
| | | Result resultObject = new Result(); |
| | | |
| | |
| | | throw new BusinessException("订单不存在"); |
| | | } |
| | | |
| | | if (img == null || img.isEmpty()) { |
| | | throw new BusinessException("请先上传支付凭证"); |
| | | } |
| | | |
| | | if (partyId.equals(order.getPartyId())) { |
| | | // 用户操作 |
| | | if (!"buy".equals(order.getDirection())) { |
| | |
| | | |
| | | order.setState("1"); |
| | | order.setPayTime(new Date()); |
| | | order.setImg(img); |
| | | this.c2cOrderService.updateById(order); |
| | | |
| | | if (Arrays.asList("0", "1").contains(order.getState())) { |
| | |
| | | throw new BusinessException("待付款的订单无法放行"); |
| | | } |
| | | if ("3".equals(order.getState())) { |
| | | throw new BusinessException("订单已完成,无法放行"); |
| | | resultObject.setCode(0); |
| | | return resultObject; |
| | | //throw new BusinessException("订单已完成,无法放行"); |
| | | } |
| | | if ("4".equals(order.getState())) { |
| | | throw new BusinessException("订单已取消,无法放行"); |