From 510403e30ceb0eacc9bcac554c72656dbf90455304925de89bc0e2f429fc06f5 Mon Sep 17 00:00:00 2001 From: yanglei Date: Thu, 8 Jan 2026 10:32:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BC=A0=E5=8F=82=E6=96=B9?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feign/clients/PaymentFeignClient.java | 9 ++++--- .../ebike/feign/clients/UserFeignClient.java | 6 ++--- .../EbikeRefundReviewController.java | 6 ++--- .../controller/EbikeWxPaymentController.java | 17 +++++++------ .../controller/EbikeStaffRoleController.java | 8 +++---- .../user/controller/EbikeOrderController.java | 13 +++++----- .../controller/EbikeRefundController.java | 11 ++++----- .../cdzy/user/enums/EbikeProcessStatus.java | 24 ------------------- 8 files changed, 33 insertions(+), 61 deletions(-) delete mode 100644 ebike-user/src/main/java/com/cdzy/user/enums/EbikeProcessStatus.java diff --git a/ebike-feign/src/main/java/com/ebike/feign/clients/PaymentFeignClient.java b/ebike-feign/src/main/java/com/ebike/feign/clients/PaymentFeignClient.java index 74d756d..ec7a753 100644 --- a/ebike-feign/src/main/java/com/ebike/feign/clients/PaymentFeignClient.java +++ b/ebike-feign/src/main/java/com/ebike/feign/clients/PaymentFeignClient.java @@ -8,7 +8,6 @@ import com.ebike.feign.model.vo.FeignEbikeWxHandleNotifyVo; import com.fasterxml.jackson.databind.JsonNode; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; @@ -41,16 +40,16 @@ public interface PaymentFeignClient { * * @param refundId 退款id */ - @GetMapping("/wxPayment/api/checkRefundStatus/{refundId}") - JsonResult checkRefundStatus(@PathVariable(name = "refundId") Long refundId); + @GetMapping("/wxPayment/api/checkRefundStatus") + JsonResult checkRefundStatus(@RequestParam("refundId") Long refundId); /** * 通过商户(骑行)订单订单号查询支付订单状态 * * @param orderId 订单id */ - @GetMapping("/wxPayment/api/queryOrderStatus/{orderId}") - JsonResult queryOrderStatusById(@PathVariable(name = "orderId") Long orderId); + @GetMapping("/wxPayment/api/queryOrderStatus") + JsonResult queryOrderStatusById(@RequestParam("orderId") Long orderId); /** * 拒绝退款 diff --git a/ebike-feign/src/main/java/com/ebike/feign/clients/UserFeignClient.java b/ebike-feign/src/main/java/com/ebike/feign/clients/UserFeignClient.java index eccf547..640cc69 100644 --- a/ebike-feign/src/main/java/com/ebike/feign/clients/UserFeignClient.java +++ b/ebike-feign/src/main/java/com/ebike/feign/clients/UserFeignClient.java @@ -6,7 +6,7 @@ import com.ebike.feign.config.ExampleFeignConfiguration; import com.ebike.feign.model.vo.FeignEbikeRefundOrderDetailVo; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestParam; /** * @author yanglei @@ -23,6 +23,6 @@ public interface UserFeignClient { * @param refundId 退款主键Id * @return 退款订单详情 */ - @GetMapping("ebikeRefund/refundOrderDetail/{refundId}") - JsonResult refundOrderDetail(@PathVariable(name = "refundId") Long refundId); + @GetMapping("/ebikeRefund/api/refundOrderDetail") + JsonResult refundOrderDetail(@RequestParam("refundId") Long refundId); } diff --git a/ebike-operations/src/main/java/com/cdzy/operations/controller/EbikeRefundReviewController.java b/ebike-operations/src/main/java/com/cdzy/operations/controller/EbikeRefundReviewController.java index 7c64394..4ebdc80 100644 --- a/ebike-operations/src/main/java/com/cdzy/operations/controller/EbikeRefundReviewController.java +++ b/ebike-operations/src/main/java/com/cdzy/operations/controller/EbikeRefundReviewController.java @@ -10,10 +10,10 @@ import com.ebike.feign.model.vo.FeignEbikeRefundOrderDetailVo; import com.mybatisflex.core.paginate.Page; import jakarta.annotation.Resource; import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; 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.RequestParam; import org.springframework.web.bind.annotation.RestController; /** @@ -61,8 +61,8 @@ public class EbikeRefundReviewController { * @param refundId 退款主键Id * @return 退款订单详情 */ - @GetMapping("/refundOrderDetail/{refundId}") - public JsonResult refundOrderDetail(@PathVariable(name = "refundId") Long refundId) { + @GetMapping("/refundOrderDetail") + public JsonResult refundOrderDetail(@RequestParam("refundId") Long refundId) { FeignEbikeRefundOrderDetailVo result = refundReviewService.refundOrderDetail(refundId); return JsonResult.success(result); } diff --git a/ebike-payment/src/main/java/com/cdzy/payment/controller/EbikeWxPaymentController.java b/ebike-payment/src/main/java/com/cdzy/payment/controller/EbikeWxPaymentController.java index 4e015d5..d111861 100644 --- a/ebike-payment/src/main/java/com/cdzy/payment/controller/EbikeWxPaymentController.java +++ b/ebike-payment/src/main/java/com/cdzy/payment/controller/EbikeWxPaymentController.java @@ -10,7 +10,6 @@ import com.wechat.pay.java.service.refund.model.Refund; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -50,8 +49,8 @@ public class EbikeWxPaymentController { * @param orderId 商户(骑行)订单号 * @return 支付订单信息 */ - @GetMapping("/queryOrder/{orderId}") - public JsonResult queryOrderByOrderId(@PathVariable(name = "orderId") Long orderId) { + @GetMapping("/queryOrder") + public JsonResult queryOrderByOrderId(@RequestParam("orderId") Long orderId) { Transaction transaction = wxPayService.queryOrderByOrderId(orderId); return JsonResult.success(transaction); } @@ -62,8 +61,8 @@ public class EbikeWxPaymentController { * @param orderId 微信支付订单号 * @return 订单信息支付状态 */ - @GetMapping("/api/queryOrderStatus/{orderId}") - public JsonResult queryOrderStatusById(@PathVariable(name = "orderId") Long orderId) { + @GetMapping("/api/queryOrderStatus") + public JsonResult queryOrderStatusById(@RequestParam("orderId") Long orderId) { EbikeWxHandleNotifyVo r = wxPayService.queryOrderStatusByOrderId(orderId); return JsonResult.success(r); } @@ -74,8 +73,8 @@ public class EbikeWxPaymentController { * @param refundId 退款主键id * @return 退款状态信息 */ - @GetMapping("/api/checkRefundStatus/{refundId}") - public JsonResult checkRefundStatus(@PathVariable(name = "refundId") Long refundId) { + @GetMapping("/api/checkRefundStatus") + public JsonResult checkRefundStatus(@RequestParam("refundId") Long refundId) { EbikeWxHandleNotifyVo notifyVo = wxPayService.checkRefundStatus(refundId); return JsonResult.success(notifyVo); } @@ -98,8 +97,8 @@ public class EbikeWxPaymentController { * @param refundId 商户(骑行)退款id * @return 退款信息 */ - @GetMapping("/queryRefund/{refundId}") - public JsonResult refundQuery(@PathVariable(name = "refundId") Long refundId) { + @GetMapping("/queryRefund") + public JsonResult refundQuery(@RequestParam("refundId") Long refundId) { Refund refund = wxPayService.queryRefundById(refundId); return JsonResult.success(refund); } diff --git a/ebike-staff/src/main/java/com/cdzy/staff/controller/EbikeStaffRoleController.java b/ebike-staff/src/main/java/com/cdzy/staff/controller/EbikeStaffRoleController.java index e7dbc85..705f656 100644 --- a/ebike-staff/src/main/java/com/cdzy/staff/controller/EbikeStaffRoleController.java +++ b/ebike-staff/src/main/java/com/cdzy/staff/controller/EbikeStaffRoleController.java @@ -41,8 +41,8 @@ public class EbikeStaffRoleController { * @param id 主键 * @return {@code true} 删除成功,{@code false} 删除失败 */ - @PostMapping("remove/{id}") - public JsonResult remove(@PathVariable Long id) { + @PostMapping("remove") + public JsonResult remove(@RequestParam("id") Long id) { ebikeStaffRoleService.removeById(id); return JsonResult.success(); } @@ -76,8 +76,8 @@ public class EbikeStaffRoleController { * @param id 员工-角色映射表主键 * @return 员工-角色映射表详情 */ - @GetMapping("getInfo/{id}") - public JsonResult getInfo(@PathVariable Long id) { + @GetMapping("getInfo") + public JsonResult getInfo(@RequestParam("id") Long id) { EbikeStaffRole staffRole = ebikeStaffRoleService.getById(id); return JsonResult.success(staffRole); } diff --git a/ebike-user/src/main/java/com/cdzy/user/controller/EbikeOrderController.java b/ebike-user/src/main/java/com/cdzy/user/controller/EbikeOrderController.java index e2eb9c5..c52e3c0 100644 --- a/ebike-user/src/main/java/com/cdzy/user/controller/EbikeOrderController.java +++ b/ebike-user/src/main/java/com/cdzy/user/controller/EbikeOrderController.java @@ -20,7 +20,6 @@ import jakarta.annotation.Resource; import jakarta.validation.constraints.NotNull; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -106,8 +105,8 @@ public class EbikeOrderController { * * @param orderId 用户订单表主键 */ - @GetMapping("getInfo/{orderId}") - public JsonResult getInfo(@PathVariable("orderId") Long orderId) { + @GetMapping("getInfo") + public JsonResult getInfo(@RequestParam("orderId") Long orderId) { EbikeOrder userOrder = ebikeOrderService.getById(orderId); return JsonResult.success(userOrder); } @@ -117,8 +116,8 @@ public class EbikeOrderController { * * @param orderId 用户订单表主键 */ - @GetMapping("getOrderStatus/{orderId}") - public JsonResult getOrderStatus(@PathVariable("orderId") Long orderId) { + @GetMapping("getOrderStatus") + public JsonResult getOrderStatus(@RequestParam("orderId") Long orderId) { Integer orderStatus = ebikeOrderService.getOrderStatus(orderId); return JsonResult.success(orderStatus); } @@ -149,8 +148,8 @@ public class EbikeOrderController { * * @param orderId 订单id */ - @GetMapping("/queryOrderStatus/{orderId}") - public JsonResult queryOrderStatusById(@PathVariable(name = "orderId") Long orderId) { + @GetMapping("queryOrderStatus") + public JsonResult queryOrderStatusById(@RequestParam("orderId") Long orderId) { JsonResult jsonResult = paymentFeignClient.queryOrderStatusById(orderId); if (jsonResult.getCode() != Code.SUCCESS) { throw new EbikeException(jsonResult.getMessage()); diff --git a/ebike-user/src/main/java/com/cdzy/user/controller/EbikeRefundController.java b/ebike-user/src/main/java/com/cdzy/user/controller/EbikeRefundController.java index 3dccf7b..c76eb2a 100644 --- a/ebike-user/src/main/java/com/cdzy/user/controller/EbikeRefundController.java +++ b/ebike-user/src/main/java/com/cdzy/user/controller/EbikeRefundController.java @@ -13,7 +13,6 @@ import com.ebike.feign.model.vo.FeignEbikeRefundOrderDetailVo; import com.mybatisflex.core.paginate.Page; import jakarta.annotation.Resource; import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -48,13 +47,13 @@ public class EbikeRefundController { } /** - * 退款订单详情 + * 退款订单详情 【运维模块调用】 * * @param refundId 退款id * @return 退款详情 */ - @GetMapping("/refundOrderDetail/{refundId}") - public JsonResult refundOrderDetail(@PathVariable(name = "refundId") Long refundId) { + @GetMapping("/api/refundOrderDetail") + public JsonResult refundOrderDetail(@RequestParam("refundId") Long refundId) { FeignEbikeRefundOrderDetailVo refundOrderDetailVo = ebikeRefundService.queryRefundOrderById(refundId); return JsonResult.success(refundOrderDetailVo); } @@ -65,8 +64,8 @@ public class EbikeRefundController { * @param orderId 订单id * @return 订单详情 */ - @GetMapping("/refundApplyOrderDetail/{orderId}") - public JsonResult refundApplyOrderDetail(@PathVariable(name = "orderId") Long orderId) { + @GetMapping("/refundApplyOrderDetail") + public JsonResult refundApplyOrderDetail(@RequestParam("orderId") Long orderId) { EbikeRefundApplyOrderInfoVo refundApplyOrderInfoVo = ebikeRefundService.queryRefundApplyOrderById(orderId); return JsonResult.success(refundApplyOrderInfoVo); } diff --git a/ebike-user/src/main/java/com/cdzy/user/enums/EbikeProcessStatus.java b/ebike-user/src/main/java/com/cdzy/user/enums/EbikeProcessStatus.java deleted file mode 100644 index b4f91dc..0000000 --- a/ebike-user/src/main/java/com/cdzy/user/enums/EbikeProcessStatus.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.cdzy.user.enums; - -/** - * @author yanglei - * @since 2025-11-14 13:31 - */ - -public interface EbikeProcessStatus { - - /** - * 申请中 - */ - int APPLYING = 2; - - /** - * 已同意 - */ - int PROCESSED = 1; - - /** - * 已驳回 - */ - int CLOSED = 3; -}