package com.fs.hospital.mapper;

import java.util.List;
import com.fs.hospital.domain.HospitalPayment;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 支付明细Mapper接口
 *
 * @author fs
 * @date 2024-03-26
 */
public interface HospitalPaymentMapper
{
    /**
     * 查询支付明细
     *
     * @param paymentId 支付明细主键
     * @return 支付明细
     */
    public HospitalPayment selectHospitalPaymentByPaymentId(Long paymentId);

    /**
     * 查询支付明细列表
     *
     * @param hospitalPayment 支付明细
     * @return 支付明细集合
     */
    public List<HospitalPayment> selectHospitalPaymentList(HospitalPayment hospitalPayment);

    /**
     * 新增支付明细
     *
     * @param hospitalPayment 支付明细
     * @return 结果
     */
    public int insertHospitalPayment(HospitalPayment hospitalPayment);

    /**
     * 修改支付明细
     *
     * @param hospitalPayment 支付明细
     * @return 结果
     */
    public int updateHospitalPayment(HospitalPayment hospitalPayment);

    /**
     * 删除支付明细
     *
     * @param paymentId 支付明细主键
     * @return 结果
     */
    public int deleteHospitalPaymentByPaymentId(Long paymentId);

    /**
     * 批量删除支付明细
     *
     * @param paymentIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteHospitalPaymentByPaymentIds(Long[] paymentIds);

    @Select("select * from hospital_payment where business_id = #{businessId} and business_type = #{businessType}")
    HospitalPayment selectHospitalPayment(@Param("businessId") String businessId, @Param("businessType")Integer type);
}
