/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the yifu4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.yifu.cloud.plus.v1.csp.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistrationLeaveInsurance;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 离职待办商险明细表
 *
 * @author hgw
 * @date 2025-11-23 10:19:13
 */
@Mapper
public interface EmployeeRegistrationLeaveInsuranceMapper extends BaseMapper<EmployeeRegistrationLeaveInsurance> {
	// 办理使用
	List<EmployeeRegistrationLeaveInsurance> getLeaveInsuranceList(@Param("leaveId") String leaveId
			, @Param("insuranceId") String insuranceId);

	void deleteLeaveInsurance(@Param("leaveId") String leaveId);

	/* 查询待派单（2待派单3发起失败9减员退回 的再去办）的数据，用来发起派单 */
	List<String> getLeaveInsuranceListByIdAndStatus(@Param("idList") List<String> idList);

	// 更新商险明细状态，成功或失败
	void updateLeaveInsuranceListByIdAndStatus(@Param("status") String status, @Param("idList") List<String> idList);
}
