package com.xhpc.general.mapper;

import com.xhpc.general.domain.XhpcAgreement;
import org.apache.ibatis.annotations.Param;


import java.util.List;

/**
 * 协议管理Mapper接口
 * program: ruoyi
 * User: HongYun
 * Date:2021-08-03 09
 */
public interface XhpcAgreementMapper {

    int deleteAgreementItem(@Param("agreementId") Long agreementId,@Param("tenantId") String tenantId);

    /**
     * Getting the number of title which is fit with the type.
     * @param type
     * @param title
     * @return
     */
    int countSameTypeTitle(@Param("type") Integer type,@Param("title") String title,@Param("tenantId") String tenantId);

    int insertAgreementItem(@Param("title") String title,@Param("type") Integer type,@Param("content") String content,@Param("tenantId") String tenantId);

    int updateAgreementItem(@Param("agreementId") Long agreementId,@Param("title") String title,@Param("type")Integer type,@Param("content") String content,@Param("tenantId") String tenantId);


    List<XhpcAgreement> selectAgreementItems(@Param("title") String title, @Param("createBy") String createBy, @Param("type") Integer type,@Param("tenantId")String tenantId);

    XhpcAgreement selectAgreementItem(@Param("agreementId") Long agreementId);


    XhpcAgreement selectContentType(@Param("type") Integer type,@Param("tenantId")String tenantId);
}
