package com.cdzy.operations.controller; import com.cdzy.common.enums.Code; import com.cdzy.common.ex.EbikeException; import com.cdzy.common.model.response.JsonResult; import com.ebike.feign.clients.UserFeignClient; import com.ebike.feign.model.dto.FeignEbikeRefundProcessDto; import jakarta.annotation.Resource; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * 退款审核 控制层。 * @author yanglei * @since 2025-11-14 16:58 */ @RestController @RequestMapping("/ebikeRefundReview") public class EbikeRefundReviewController { @Resource private UserFeignClient userFeignClient; /** * 审核退款申请 * * @param processDto 退款处理信息 * @return 审核成功返回true,否则返回false */ @PostMapping("/reviewRefund") public JsonResult reviewRefund(@RequestBody FeignEbikeRefundProcessDto processDto) { JsonResult jsonResult = userFeignClient.reviewRefund(processDto); if (jsonResult.getCode() != Code.SUCCESS) { throw new EbikeException("调用审核退款申请失败"); } Boolean result = jsonResult.getData(); return JsonResult.success(result); } }