package com.ruoyi.web.controller.app;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.ss.payBill.service.PayBillService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author wjh
 * 2024/8/14
 */
@RestController
@RequestMapping("/app/payBill")
public class AppPayBillController extends BaseController {

    @Autowired
    private PayBillService payBillService;

    @ApiOperation("刷新支付结果")
    @PutMapping("/{payNo}/refreshPayResult")
    public AjaxResult refreshPayResult(@PathVariable String payNo ){
        return toAjax(payBillService.refreshPayResult(payNo));
    }

    @GetMapping("/payResult")
    public AjaxResult payResult(@RequestParam String payNo) {
        return success(payBillService.getPayResult(payNo));
    }

}
