| @@ -414,6 +414,7 @@ public class WxOrderController extends BaseController { | |||||
| ocvo.setValidStatus(EnumCouponChannelActivityStatus.STARTED.getCode()); | ocvo.setValidStatus(EnumCouponChannelActivityStatus.STARTED.getCode()); | ||||
| } | } | ||||
| } | } | ||||
| WxCoupon attrsById = wxCouponService.getAttrsById(ocvo.getProductId(), ocvo.getTenantId()); | WxCoupon attrsById = wxCouponService.getAttrsById(ocvo.getProductId(), ocvo.getTenantId()); | ||||
| ocvo.setProductAttrs(attrsById.getProductAttrs()); | ocvo.setProductAttrs(attrsById.getProductAttrs()); | ||||
| ocvo.setSkuAttrs(attrsById.getSkuAttrs()); | ocvo.setSkuAttrs(attrsById.getSkuAttrs()); | ||||
| @@ -689,6 +690,31 @@ public class WxOrderController extends BaseController { | |||||
| return new ResultData(refundOrder); | return new ResultData(refundOrder); | ||||
| } | } | ||||
| @ApiOperation("查询退款状态") | |||||
| @GetMapping("getRefundStatus") | |||||
| public ResultData getRefundStatus(Long orderId) { | |||||
| // c端用户应该只能看到自己的订单 | |||||
| if (orderId == null){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| WxOrder wxOrder = wxOrderService.getById(orderId,getTenantInfo().getTenantId()); | |||||
| if (wxOrder == null) { | |||||
| logger.error("交易订单不存在:" + orderId); | |||||
| return new ResultData(ErrorCode.ORDER_IS_NOT_FIND); | |||||
| } | |||||
| Map<String,Object> map = new HashMap<>(); | |||||
| map.put("outOrderId",wxOrder.getComposeOrderId()); | |||||
| map.put("orderStatus",wxOrder.getOrderStatus()); | |||||
| if(EnumOrderStatus.ORDER_STATUS_PENDING_REFUND.getCode().equals(wxOrder.getOrderStatus()) | |||||
| || EnumOrderStatus.ORDER_STATUS_REFUND_SUCCESS.getCode().equals(wxOrder.getOrderStatus()) | |||||
| || EnumOrderStatus.ORDER_STATUS_REFUND_FAILD.getCode().equals(wxOrder.getOrderStatus())){ | |||||
| WxRefundOrder refundOrder = wxRefundOrderService.findRefundOrder(getTenantInfo(), orderId); | |||||
| map.put("outRefundOrderId",refundOrder.getId()); | |||||
| map.put("refundOrderStatus",refundOrder.getRefundOrderStatus()); | |||||
| } | |||||
| return new ResultData(map); | |||||
| } | |||||
| // @AuthIgnore | // @AuthIgnore | ||||
| // @TenantIgnore | // @TenantIgnore | ||||
| // @ApiOperation("") | // @ApiOperation("") | ||||