| | |
| | | String name = request.getParameter("name"); |
| | | String phone = request.getParameter("phone"); |
| | | if (StringUtils.isEmptyString(order_no)) { |
| | | throw new YamiShopBindException("申诉订单号不正确"); |
| | | throw new YamiShopBindException("Invalid appeal order number"); |
| | | } |
| | | if (StringUtils.isEmptyString(reason)) { |
| | | throw new YamiShopBindException("请输入申诉原因"); |
| | | throw new YamiShopBindException("Please enter appeal reason"); |
| | | } |
| | | if (StringUtils.isEmptyString(img)) { |
| | | throw new YamiShopBindException("请上传申诉凭证"); |
| | | throw new YamiShopBindException("Please upload appeal evidence"); |
| | | } |
| | | String partyId = SecurityUtils.getUser().getUserId(); |
| | | C2cOrder order = this.c2cOrderService.get(order_no); |
| | | if (null == order || !partyId.equals(order.getPartyId())) { |
| | | throw new YamiShopBindException("订单不存在"); |
| | | throw new YamiShopBindException("Order does not exist"); |
| | | } |
| | | C2cAppeal appeal = this.c2cAppealService.findByOrderNo(order_no); |
| | | if (null != appeal) { |
| | | throw new YamiShopBindException("该订单已提交申诉"); |
| | | throw new YamiShopBindException("Appeal already submitted for this order"); |
| | | } |
| | | C2cAppeal entity = new C2cAppeal(); |
| | | entity.setOrderNo(order_no); |
| | |
| | | public Result get(HttpServletRequest request) throws IOException { |
| | | String order_no = request.getParameter("order_no"); |
| | | if (StringUtils.isEmptyString(order_no)) { |
| | | throw new YamiShopBindException("申诉订单号不正确"); |
| | | throw new YamiShopBindException("Invalid appeal order number"); |
| | | } |
| | | C2cAppeal c2cAppeal = this.c2cAppealService.findByOrderNo(order_no); |
| | | if (null == c2cAppeal) { |
| | | throw new YamiShopBindException("申诉不存在"); |
| | | throw new YamiShopBindException("Appeal does not exist"); |
| | | } |
| | | if (StringUtils.isNotEmpty(c2cAppeal.getImg())) { |
| | | String path = awsS3OSSFileService.getUrl(c2cAppeal.getImg()); |
| | | String path = Constants.IMAGES_HTTP+c2cAppeal.getImg(); |
| | | c2cAppeal.setImg(path); |
| | | } |
| | | return Result.succeed(); |