package com.yifu.cloud.plus.v1.ekp.controller;

import com.icbc.api.IcbcApiException;
import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowQueryService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 聚富通到账通知交易流水查询
 *
 * @author huyc
 * @date 2024-05-23 10:24:12
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/icbcQuery" )
@Tag(name = "聚富通到账通知交易流水查询")
public class IcbcTransactionFlowQueryController {

	private final IcbcTransactionFlowQueryService icbcTransactionFlowQueryService;

	/**
	 * 交易流水查询
	 *
	 * @param
	 * @return
	 */
	@Operation(summary = "交易流水查询", description = "交易流水查询")
	@PostMapping("/page")
	public R getIcbcTransactionFlow() {
		return icbcTransactionFlowQueryService.getIcbcTransactionFlow();
	}

	/**
	 * 交易流水查询
	 *
	 * @param
	 * @return
	 */
	@Operation(summary = "交易流水查询", description = "交易流水查询")
	@PostMapping("/newPage")
	public R getIcbcTransactionFlowNew() throws IcbcApiException {
		return icbcTransactionFlowQueryService.getIcbcTransactionFlowNew();
	}

	/**
	 * 预订单接口
	 *
	 * @param
	 * @return
	 */
	@Operation(summary = "预订单接口", description = "预订单接口")
	@PostMapping("/save")
	public R saveIcbcManagerCard() {
		return icbcTransactionFlowQueryService.saveIcbcManagerCard();
	}


	/**
	 * 行名行号查询接口
	 *
	 * @param
	 * @param
	 * @return
	 */
	@Operation(summary = "行名行号查询接口", description = "行名行号查询接口")
	@PostMapping("/querybankinfo")
	public R querybankinfo() {
		return icbcTransactionFlowQueryService.querybankinfo();
	}
}
