fix:升级swagger注解
This commit is contained in:
@@ -14,8 +14,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.paypal.http.HttpResponse;
|
||||
import com.paypal.payments.Refund;
|
||||
import com.stripe.exception.StripeException;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -29,7 +29,7 @@ import java.io.IOException;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Api(tags = "Stripe模块")
|
||||
@Tag(name = "Stripe模块")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/stripe")
|
||||
@@ -41,7 +41,7 @@ public class StripeController {
|
||||
@Resource
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
@ApiOperation("创建支付链接")
|
||||
@Operation(summary = "创建支付链接")
|
||||
@PostMapping("/createOrder")
|
||||
public Response<String> pay(@Valid @RequestBody ProductPurchaseDTO productPurchaseDTO, HttpServletRequest request) {
|
||||
return Response.success(stripeService.pay(productPurchaseDTO, request));
|
||||
@@ -50,7 +50,7 @@ public class StripeController {
|
||||
@Value("${stripe.webhook.fail.reminder}")
|
||||
private String webhookReminderFlag;
|
||||
|
||||
@ApiOperation("支付通知")
|
||||
@Operation(summary = "支付通知")
|
||||
@PostMapping("/trade/notify")
|
||||
public void callback(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
try{
|
||||
@@ -76,7 +76,7 @@ public class StripeController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("申请退款")
|
||||
@Operation(summary = "申请退款")
|
||||
@GetMapping("/trade/refund/{orderNo}/{reason}")
|
||||
public Response<HttpResponse<Refund>> refund(@PathVariable String orderNo, @PathVariable String reason) throws IOException {
|
||||
String response = stripeService.refund(null,orderNo,reason);
|
||||
@@ -87,7 +87,7 @@ public class StripeController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("获取订阅")
|
||||
@Operation(summary = "获取订阅")
|
||||
@GetMapping("/getSubscription")
|
||||
public Response<List<String>> getSubscription(@RequestParam String name, @RequestParam String email) {
|
||||
try {
|
||||
@@ -97,44 +97,44 @@ public class StripeController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("取消订阅")
|
||||
@Operation(summary = "取消订阅")
|
||||
@GetMapping("/cancelSubscription")
|
||||
public Response<String> cancelSubscription(@RequestParam String subscriptionId, @RequestParam(required = false) String reason) {
|
||||
stripeService.cancelSubscription(subscriptionId, reason);
|
||||
return Response.success("success");
|
||||
}
|
||||
|
||||
@ApiOperation("创建推广码")
|
||||
@Operation(summary = "创建推广码")
|
||||
@PostMapping("/createCoupon")
|
||||
public Response<String> createCoupon(@Valid @RequestBody CreateCouponDTO createCouponDTO){
|
||||
return Response.success(stripeService.createCoupon(createCouponDTO));
|
||||
}
|
||||
|
||||
@ApiOperation("检查推广码")
|
||||
@Operation(summary = "检查推广码")
|
||||
@GetMapping("/checkCoupon")
|
||||
public Response<CheckCouponsVO> checkCoupon(@RequestParam String promotionCode, @RequestParam Long price){
|
||||
return Response.success(stripeService.checkProductCoupon(promotionCode, price));
|
||||
}
|
||||
|
||||
@ApiOperation("获取所有推广码")
|
||||
@Operation(summary = "获取所有推广码")
|
||||
@PostMapping("/getAllCoupons")
|
||||
public Response<IPage<ProductCoupons>> getAllCoupons(@RequestBody QueryCouponsPageDTO queryCouponsPageDTO){
|
||||
return Response.success(stripeService.getAllCoupons(queryCouponsPageDTO));
|
||||
}
|
||||
|
||||
@ApiOperation("检索优惠券")
|
||||
@Operation(summary = "检索优惠券")
|
||||
@GetMapping("/retrieveCoupon")
|
||||
public Response<String> retrieveCoupon(@RequestParam String couponId){
|
||||
return Response.success(stripeService.retrieveCoupon(couponId));
|
||||
}
|
||||
|
||||
@ApiOperation("检索推广码")
|
||||
@Operation(summary = "检索推广码")
|
||||
@GetMapping("/retrievePromotionCode")
|
||||
public Response<String> retrievePromotionCode(@RequestParam String retrievePromotionCode){
|
||||
return Response.success(stripeService.retrievePromotionCode(retrievePromotionCode));
|
||||
}
|
||||
|
||||
@ApiOperation("更新推广码信息")
|
||||
@Operation(summary = "更新推广码信息")
|
||||
@GetMapping("/updatePromCodeInfo")
|
||||
public Response<ProductCoupons> updateCouponsInfo(@RequestParam Long id, @RequestParam(required = false) String paidCommission,
|
||||
@RequestParam(required = false) String cooperator,
|
||||
@@ -143,7 +143,7 @@ public class StripeController {
|
||||
return Response.success(stripeService.updateCouponsInfo(id, paidCommission, cooperator, remark, startTime));
|
||||
}
|
||||
|
||||
@ApiOperation("删除推广码")
|
||||
@Operation(summary = "删除推广码")
|
||||
@GetMapping("/deletePromCode")
|
||||
public Response<String> deleteCoupon(@RequestParam Long id){
|
||||
stripeService.deleteCoupon(id);
|
||||
@@ -157,31 +157,31 @@ public class StripeController {
|
||||
return Response.success("success");
|
||||
}
|
||||
|
||||
@ApiOperation("创建订阅 临时")
|
||||
@Operation(summary = "创建订阅 临时")
|
||||
@GetMapping("/createSubscriptionTemp")
|
||||
public Response<String> createSubscriptionTemp(@RequestParam String name, @RequestParam String email) {
|
||||
return Response.success(stripeService.createSubscriptionTemp(name, email));
|
||||
}
|
||||
|
||||
@ApiOperation("修改用户默认支付方式 临时")
|
||||
@Operation(summary = "修改用户默认支付方式 临时")
|
||||
@GetMapping("/changeCustomerPayment")
|
||||
public Response<String> changeCustomerPayment(@RequestParam String name, @RequestParam String email) {
|
||||
return Response.success(stripeService.changeCustomerPayment(name, email));
|
||||
}
|
||||
|
||||
@ApiOperation("临时 发送续订失败邮件")
|
||||
@Operation(summary = "临时 发送续订失败邮件")
|
||||
@GetMapping("/sendRenewalFailEmail")
|
||||
public Response<Boolean> sendRenewalFailEmail(@RequestParam String invoiceId, @RequestParam String subscriptionId, @RequestParam String orderNo) {
|
||||
return Response.success(stripeService.sendRenewalFailEmail(invoiceId, subscriptionId,orderNo));
|
||||
}
|
||||
|
||||
@ApiOperation("临时 查询指定用户绑定的付款方式")
|
||||
@Operation(summary = "临时 查询指定用户绑定的付款方式")
|
||||
@GetMapping("/getCustomerPaymentMethod")
|
||||
public Response<List<Map<String,String>>> getCustomerPaymentMethod(@RequestParam String name, @RequestParam String email) {
|
||||
return Response.success(stripeService.getCustomerPaymentMethod(name, email));
|
||||
}
|
||||
|
||||
@ApiOperation("临时 解绑指定用户绑定的所有付款方式")
|
||||
@Operation(summary = "临时 解绑指定用户绑定的所有付款方式")
|
||||
@GetMapping("/detachCustomerAllPaymentMethod")
|
||||
public Response<String> detachCustomerAllPaymentMethod(@RequestParam String name, @RequestParam String email) {
|
||||
return Response.success(stripeService.detachCustomerAllPaymentMethod(name, email));
|
||||
|
||||
Reference in New Issue
Block a user