mirror of
https://github.com/RemainderTime/spring-boot-base-demo.git
synced 2026-03-04 19:20:46 +08:00
1.集成支付宝沙箱支付功能
2.订单下单 3.回调通知(未成功) 4.回查订单支付状态
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
package cn.xf.basedemo.controller.business;
|
||||
|
||||
|
||||
import cn.xf.basedemo.common.model.RetObj;
|
||||
import cn.xf.basedemo.model.req.PayOrderFrom;
|
||||
import cn.xf.basedemo.service.OrderService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* PayOrderController
|
||||
*
|
||||
* @author 海言
|
||||
* @date 2025/10/22
|
||||
* @time 14:07
|
||||
* @Description 支付下单控制器
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pay")
|
||||
public class PayOrderController {
|
||||
|
||||
@Resource
|
||||
private OrderService orderService;
|
||||
|
||||
@Operation(summary = "支付宝支付下单", description = "支付宝支付下单")
|
||||
@PostMapping("/ali/createOrder")
|
||||
public RetObj aliCreateOrder(@RequestBody PayOrderFrom from) {
|
||||
|
||||
return orderService.aliCreateOrder(from);
|
||||
}
|
||||
|
||||
//掉单查询支付宝支付订单状态
|
||||
@Operation(summary = "掉单查询支付宝支付订单状态", description = "掉单查询支付宝支付订单状态")
|
||||
@GetMapping("/ali/queryOrderStatus")
|
||||
public String queryAlipayOrderStatus(String orderNo) {
|
||||
return orderService.queryAlipayOrderStatus(orderNo);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user