From 44e03eae83b44b87c1f28fdfcfdac75155a46435 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 30 Mar 2024 20:24:00 +0800 Subject: [PATCH] =?UTF-8?q?bugfix=EF=BC=9A=E8=A1=A5=E9=BD=90=20RPC=20API?= =?UTF-8?q?=20=E7=BC=BA=E5=B0=91=E7=9A=84=20RequestBody=20=E5=92=8C=20Quer?= =?UTF-8?q?yMap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iocoder/yudao/module/promotion/api/coupon/CouponApi.java | 3 ++- .../yudao/module/system/api/logger/OperateLogApi.java | 2 +- .../cn/iocoder/yudao/module/system/api/mail/MailSendApi.java | 5 +++-- .../yudao/module/system/api/notify/NotifyMessageSendApi.java | 5 +++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/api/coupon/CouponApi.java b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/api/coupon/CouponApi.java index 54690eccf..284015e64 100644 --- a/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/api/coupon/CouponApi.java +++ b/yudao-module-mall/yudao-module-promotion-api/src/main/java/cn/iocoder/yudao/module/promotion/api/coupon/CouponApi.java @@ -9,6 +9,7 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.cloud.openfeign.SpringQueryMap; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -32,6 +33,6 @@ public interface CouponApi { @GetMapping(PREFIX + "/validate") @Operation(summary = "校验优惠劵") - CommonResult validateCoupon(@Valid CouponValidReqDTO validReqDTO); + CommonResult validateCoupon(@Valid @SpringQueryMap CouponValidReqDTO validReqDTO); } diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApi.java index 8d8b4e45c..47cc072c1 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/OperateLogApi.java @@ -29,7 +29,7 @@ public interface OperateLogApi { @PostMapping(PREFIX + "/create-v2") @Operation(summary = "创建操作日志") - CommonResult createOperateLogV2(@Valid OperateLogV2CreateReqDTO createReqDTO); + CommonResult createOperateLogV2(@Valid @RequestBody OperateLogV2CreateReqDTO createReqDTO); @PostMapping(PREFIX + "/page") @Operation(summary = "获取指定模块的指定数据的操作日志分页") diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/mail/MailSendApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/mail/MailSendApi.java index 064fa5309..27eabc09a 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/mail/MailSendApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/mail/MailSendApi.java @@ -9,6 +9,7 @@ import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import jakarta.validation.Valid; +import org.springframework.web.bind.annotation.RequestBody; @FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory = @Tag(name = "RPC 服务 - 邮件发送") @@ -18,10 +19,10 @@ public interface MailSendApi { @PostMapping(PREFIX + "/send-single-admin") @Operation(summary = "发送单条邮件给 Admin 用户", description = "在 mail 为空时,使用 userId 加载对应 Admin 的邮箱") - CommonResult sendSingleMailToAdmin(@Valid MailSendSingleToUserReqDTO reqDTO); + CommonResult sendSingleMailToAdmin(@Valid @RequestBody MailSendSingleToUserReqDTO reqDTO); @PostMapping(PREFIX + "/send-single-member") @Operation(summary = "发送单条邮件给 Member 用户", description = "在 mail 为空时,使用 userId 加载对应 Member 的邮箱") - CommonResult sendSingleMailToMember(@Valid MailSendSingleToUserReqDTO reqDTO); + CommonResult sendSingleMailToMember(@Valid @RequestBody MailSendSingleToUserReqDTO reqDTO); } diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/notify/NotifyMessageSendApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/notify/NotifyMessageSendApi.java index 28cda3901..c145d550d 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/notify/NotifyMessageSendApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/notify/NotifyMessageSendApi.java @@ -9,6 +9,7 @@ import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import jakarta.validation.Valid; +import org.springframework.web.bind.annotation.RequestBody; @FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory = @Tag(name = "RPC 服务 - 站内信发送") @@ -18,10 +19,10 @@ public interface NotifyMessageSendApi { @PostMapping(PREFIX + "/send-single-admin") @Operation(summary = "发送单条站内信给 Admin 用户") - CommonResult sendSingleMessageToAdmin(@Valid NotifySendSingleToUserReqDTO reqDTO); + CommonResult sendSingleMessageToAdmin(@Valid @RequestBody NotifySendSingleToUserReqDTO reqDTO); @PostMapping(PREFIX + "/send-single-member") @Operation(summary = "发送单条站内信给 Member 用户") - CommonResult sendSingleMessageToMember(@Valid NotifySendSingleToUserReqDTO reqDTO); + CommonResult sendSingleMessageToMember(@Valid @RequestBody NotifySendSingleToUserReqDTO reqDTO); }