package com.ruoyi.system.mapper; import java.util.List; import org.apache.ibatis.annotations.Param; import com.ruoyi.system.domain.SysAgreement; /** * 协议版本表 数据层 * * 追加式表:只有查与增,没有 update/delete。 * * @author ruoyi */ public interface SysAgreementMapper { /** * 查询协议版本信息 * * @param agreementId 协议编号 * @return 协议版本信息 */ public SysAgreement selectAgreementById(Long agreementId); /** * 查询协议版本列表(含实时算出的「是否当前版本」标志) * * @param agreement 协议版本信息(含查询条件) * @return 协议版本集合 */ public List selectAgreementList(SysAgreement agreement); /** * 发布一个新版本(纯插入,不动任何既有行) * * @param agreement 协议版本信息 * @return 结果 */ public int insertAgreement(SysAgreement agreement); /** * 统计同类型下该版本号是否已存在(发布前查重) * * @param agreementType 协议类型 * @param version 版本号 * @return 条数 */ public int countByTypeAndVersion(@Param("agreementType") String agreementType, @Param("version") String version); }