package com.bonus.sgzb.app.mapper;

import com.bonus.sgzb.app.domain.BmAgreementInfo;
import org.apache.ibatis.annotations.Mapper;

/**
* Description:
* @Author 阮世耀
* @Create 2023/12/13 14:47
* @Version 1.0
*/

@Mapper
public interface BmAgreementInfoMapper {

    /**
     * delete by primary key
     * @param agreementId primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Integer agreementId);

    /**
     * insert record to table
     * @param record the record
     * @return insert count
     */
    int insert(BmAgreementInfo record);

    /**
     * insert record to table selective
     * @param record the record
     * @return insert count
     */
    int insertSelective(BmAgreementInfo record);

    /**
     * select by primary key
     * @param agreementId primary key
     * @return object by primary key
     */
    BmAgreementInfo selectByPrimaryKey(Integer agreementId);

    /**
     * 根据 [工程+往来单位] 判断是否有权限
     * @param record 查询条件
     * @return 数量
     */
    int isPrimaryByProAndUnit(BmAgreementInfo record);

    /**
     * update record selective
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(BmAgreementInfo record);

    /**
     * update record
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(BmAgreementInfo record);
}