package com.clx.performance.controller.temp;

import com.clx.performance.service.thirdparty.nbbank.NbBankService;
import com.clx.performance.vo.pc.nbbank.NbBankOrderPayResultVO;
import com.clx.performance.vo.pc.nbbank.NbBankOrderPayStatusResultVO;
import com.msl.common.result.Result;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;


/**
 * @Author: aiqingguo
 * @Description: 临时接口
 * @Date: 2023-8-21 12:10:16
 * @Version: 1.0
 */
@Slf4j
@RestController
@RequestMapping(value="/temp/bank")
public class TempBankController {

    @Autowired
    private NbBankService bankService;

    @ApiOperation(value = "directBankTransferOrder", notes = "<br>By:艾庆国")
    @RequestMapping(value = "/directBankTransferOrder", method = RequestMethod.POST)
    public Result<NbBankOrderPayResultVO> directBankTransferOrder() throws Exception {

        return Result.ok(bankService.orderPay(1));
    }

    @ApiOperation(value = "unionPayDirectOrder", notes = "<br>By:艾庆国")
    @RequestMapping(value = "/unionPayDirectOrder", method = RequestMethod.POST)
    public Result<NbBankOrderPayResultVO> unionPayDirectOrder() throws Exception {

        return Result.ok(bankService.orderPay(2));
    }

    @ApiOperation(value = "queryOrder", notes = "<br>By:艾庆国")
    @RequestMapping(value = "/queryOrderTest", method = RequestMethod.POST)
    public Result<NbBankOrderPayStatusResultVO> queryOrderTest(String merSeqNo) throws Exception {

        return Result.ok(bankService.getOrderStatus(merSeqNo));
    }

}
