修改传参方式

This commit is contained in:
yanglei 2026-01-08 10:32:51 +08:00
parent c57193d61e
commit 510403e30c
8 changed files with 33 additions and 61 deletions

View File

@ -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<FeignEbikeWxHandleNotifyVo> queryOrderStatusById(@PathVariable(name = "orderId") Long orderId);
@GetMapping("/wxPayment/api/queryOrderStatus")
JsonResult<FeignEbikeWxHandleNotifyVo> queryOrderStatusById(@RequestParam("orderId") Long orderId);
/**
* 拒绝退款

View File

@ -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<FeignEbikeRefundOrderDetailVo> refundOrderDetail(@PathVariable(name = "refundId") Long refundId);
@GetMapping("/ebikeRefund/api/refundOrderDetail")
JsonResult<FeignEbikeRefundOrderDetailVo> refundOrderDetail(@RequestParam("refundId") Long refundId);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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<FeignEbikeWxHandleNotifyVo> jsonResult = paymentFeignClient.queryOrderStatusById(orderId);
if (jsonResult.getCode() != Code.SUCCESS) {
throw new EbikeException(jsonResult.getMessage());

View File

@ -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);
}

View File

@ -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;
}