| | |
| | | return mallOrderInfoService.applyRefundOrder(applyRefundOrderDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "用户退款--取消退款申请", notes = "用户退款--取消退款申请") |
| | | @PostMapping(value = "/cancelRefundOrder/{id}") |
| | | public FebsResponse cancelRefundOrder(@PathVariable("id") Long id) { |
| | | return mallOrderInfoService.cancelRefundOrder(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "提交退款申请", notes = "提交退款申请") |
| | | @PostMapping(value = "/applyRefund") |
| | | public FebsResponse applyRefund(@RequestBody AddRefundDto addRefundDto) { |
| | |
| | | FebsResponse refundOrder(Long id); |
| | | |
| | | FebsResponse applyRefundOrder(ApplyRefundOrderDto applyRefundOrderDto); |
| | | |
| | | FebsResponse cancelRefundOrder(Long id); |
| | | } |
| | |
| | | throw new FebsException("还未送至自提点"); |
| | | } |
| | | |
| | | List<MallRefundEntity> mallRefundEntities = mallRefundMapper.selectByItemIdAndOrderIdAndState(null, orderInfo.getId(), 3); |
| | | if(CollUtil.isNotEmpty(mallRefundEntities)){ |
| | | throw new FebsException("请先处理退款商品"); |
| | | } |
| | | |
| | | orderInfo.setStatus(OrderStatusEnum.FINISH.getValue()); |
| | | orderInfo.setReceivingTime(new Date()); |
| | | this.baseMapper.updateById(orderInfo); |
| | |
| | | return new FebsResponse().success().message("已申请"); |
| | | } |
| | | |
| | | @Override |
| | | public FebsResponse cancelRefundOrder(Long id) { |
| | | MallRefundEntity mallRefundEntity = mallRefundMapper.selectById(id); |
| | | mallRefundEntity.setState(2); |
| | | mallRefundMapper.updateById(mallRefundEntity); |
| | | Long itemId = mallRefundEntity.getItemId(); |
| | | MallOrderItem mallOrderItem = mallOrderItemMapper.selectById(itemId); |
| | | mallOrderItem.setState(1); |
| | | mallOrderItemMapper.updateById(mallOrderItem); |
| | | return new FebsResponse().success().message("已取消"); |
| | | } |
| | | |
| | | } |
| | |
| | | if (type == null) { |
| | | // 该接口无数量限制,但是 scene 传参最大字符长度为32个字符 |
| | | url = StrFormatter.format("https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token={}",redisUtils.get(WechatConfigure.WX_ACCESS_TOKEN_REDIS_KEY).toString()); |
| | | obj.put("scene", scene); |
| | | obj.put("path", path); |
| | | obj.set("scene", scene); |
| | | obj.set("page", path); |
| | | } else { |
| | | // 该接口存在数量限制, 总共可生成10w个, 但参数是接在path后面 |
| | | url = StrFormatter.format("https://api.weixin.qq.com/wxa/getwxacode?access_token={}", redisUtils.get(WechatConfigure.WX_ACCESS_TOKEN_REDIS_KEY).toString()); |
| | | obj.put("path", path + "?" + scene ); |
| | | obj.set("page", path + "?" + scene ); |
| | | } |
| | | |
| | | //最小 280px,最大 1280px |
| | | obj.put("width", width); |
| | | obj.put("auto_color", false); |
| | | obj.set("width", width); |
| | | obj.set("auto_color", false); |
| | | cn.hutool.json.JSONObject obj2 = JSONUtil.createObj(); |
| | | obj2.put("r", 0); |
| | | obj2.put("g", 0); |
| | | obj2.put("b", 0); |
| | | obj.put("line_color", obj2); |
| | | obj2.set("r", 0); |
| | | obj2.set("g", 0); |
| | | obj2.set("b", 0); |
| | | obj.set("line_color", obj2); |
| | | //是否需要透明底色,为 true 时,生成透明底色的小程序码 |
| | | obj.put("is_hyaline", false); |
| | | obj.set("is_hyaline", false); |
| | | try { |
| | | HttpResponse execute = HttpRequest.post(url).body(obj.toString(), "application/json").execute(); |
| | | InputStream inputStream = execute.bodyStream(); |