package com.ruoyi.bst.agreement.mapper;

import java.util.List;
import com.ruoyi.bst.agreement.domain.Agreement;
import com.ruoyi.bst.agreement.domain.AgreementVO;
import com.ruoyi.bst.agreement.domain.AgreementQuery;
import org.apache.ibatis.annotations.Param;

/**
 * 协议Mapper接口
 *
 * @author ruoyi
 * @date 2025-04-07
 */
public interface AgreementMapper
{
    /**
     * 查询协议
     *
     * @param id 协议主键
     * @return 协议
     */
    AgreementVO selectAgreementById(Long id);

    /**
     * 查询协议列表
     *
     * @param query 协议
     * @return 协议集合
     */
    List<AgreementVO> selectAgreementList(@Param("query")AgreementQuery query);

    /**
     * 新增协议
     *
     * @param agreement 协议
     * @return 结果
     */
    int insertAgreement(Agreement agreement);

    /**
     * 修改协议
     *
     * @param agreement 协议
     * @return 结果
     */
    public int updateAgreement(@Param("data") Agreement agreement);

    /**
     * 删除协议
     *
     * @param id 协议主键
     * @return 结果
     */
    int deleteAgreementById(Long id);

    /**
     * 批量删除协议
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteAgreementByIds(@Param("array") List<Long> ids);

    public int selectDistinct(@Param("query") AgreementQuery agreement);

}
