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

import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowIssueService;
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;

import javax.servlet.http.HttpServletRequest;

/**
 * 聚富通代发工资相关
 *
 * @author huyc
 * @date 2024-05-23 10:24:12
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/icbcIssue" )
@Tag(name = "聚富通代发工资相关")
public class IcbcTransactionFlowIssueController {

	private final IcbcTransactionFlowIssueService icbcTransactionFlowIssueService;

	/**
	 * 聚富通代发工资确认提交
	 *
	 * @param
	 * @param
	 * @return
	 */
	@Operation(summary = "聚富通代发工资确认提交接口", description = "聚富通代发工资确认提交接口")
	@PostMapping("/submit")
	public R submitIcbcTransactionFlow() {
		return icbcTransactionFlowIssueService.submitIcbcTransactionFlow();
	}

	/**
	 * 代发工资明细查询
	 *
	 * @param
	 * @param
	 * @return
	 */
	@Operation(summary = "代发工资明细查询", description = "代发工资明细查询")
	@PostMapping("/page")
	public R selectIcbcTransactionFlowInfo() {
		return icbcTransactionFlowIssueService.selectIcbcTransactionFlowInfo();
	}

	/**
	 * 企业会员用户绑定管家卡
	 *
	 * @param
	 * @param
	 * @return
	 */
	@Operation(summary = "企业会员用户绑定管家卡", description = "企业会员用户绑定管家卡")
	@PostMapping("/business")
	public R businessOpen() {
		return icbcTransactionFlowIssueService.businessOpen();
	}

	/**
	 * 代发工资发放成功异步通知功能
	 *
	 * @param
	 * @param
	 * @return
	 */
	@Operation(summary = "代发工资发放成功异步通知功能", description = "代发工资发放成功异步通知功能")
	@PostMapping("/notifyUrl")
	public R asyncNotice(HttpServletRequest request) throws Exception {
		return icbcTransactionFlowIssueService.asyncNotice(request);
	}
}
