zhangmei
2025-02-08 2573f2327a2046ec8545e80e4e56d1ee6c55bfae
ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/PayController.java
@@ -1,7 +1,15 @@
package com.ruoyi.web.controller.api;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.dto.MakeOrderDto;
import com.ruoyi.system.dto.MakeOrderResp;
import com.ruoyi.system.service.TPayOrderService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
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.RestController;
@@ -11,12 +19,14 @@
    @Autowired
    TPayOrderService tPayOrderService;
    @ApiOperation(value = "创建支付订单")
    @PostMapping("makeOrder")
    public AjaxResult makeOrder(){
        return null;
    public R<MakeOrderResp> makeOrder(@Validated @RequestBody MakeOrderDto dto){
        MakeOrderResp resp = tPayOrderService.makeOrder(dto);
        return R.ok(resp);
    }