ebike-plus/ebike-operations/src/main/java/com/cdzy/operations/controller/EbikeRefundReviewController.java

44 lines
1.4 KiB
Java
Raw Normal View History

2025-11-14 17:49:46 +08:00
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;
/**
2025-11-17 16:00:56 +08:00
* 退款审核 控制层
2025-11-14 17:49:46 +08:00
* @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<Boolean> jsonResult = userFeignClient.reviewRefund(processDto);
if (jsonResult.getCode() != Code.SUCCESS) {
throw new EbikeException("调用审核退款申请失败");
}
Boolean result = jsonResult.getData();
return JsonResult.success(result);
}
}