package com.gic.haoban.manage.service.dao.mapper.content;

import com.gic.haoban.manage.service.entity.content.TabHaobanTriggerCustomerDetail;
import com.gic.haoban.manage.service.pojo.qo.content.TriggerCustomerDetailQO;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * (TabHaobanTriggerCustomerDetail)表数据库访问层
 *
 * @author makejava
 * @since 2023-03-19 21:35:22
 */
public interface TabHaobanTriggerCustomerDetailMapper {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    TabHaobanTriggerCustomerDetail queryById(Long id);

    /**
     *
     * @param triggerCustomerDetailQO
     * @return
     */
    List<TabHaobanTriggerCustomerDetail> queryWithCondition(TriggerCustomerDetailQO triggerCustomerDetailQO);

    /**
     * 统计总行数
     *
     * @param tabHaobanTriggerCustomerDetail 查询条件
     * @return 总行数
     */
    long count(TabHaobanTriggerCustomerDetail tabHaobanTriggerCustomerDetail);

    /**
     * 新增数据
     *
     * @param tabHaobanTriggerCustomerDetail 实例对象
     * @return 影响行数
     */
    int insert(TabHaobanTriggerCustomerDetail tabHaobanTriggerCustomerDetail);

    /**
     * 批量新增数据（MyBatis原生foreach方法）
     *
     * @param entities List<TabHaobanTriggerCustomerDetail> 实例对象列表
     * @return 影响行数
     */
    int insertBatch(@Param("entities") List<TabHaobanTriggerCustomerDetail> entities);

    /**
     * 批量新增或按主键更新数据（MyBatis原生foreach方法）
     *
     * @param entities List<TabHaobanTriggerCustomerDetail> 实例对象列表
     * @return 影响行数
     * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常，请自行校验入参
     */
    int insertOrUpdateBatch(@Param("entities") List<TabHaobanTriggerCustomerDetail> entities);

    /**
     * 修改数据
     *
     * @param tabHaobanTriggerCustomerDetail 实例对象
     * @return 影响行数
     */
    int update(TabHaobanTriggerCustomerDetail tabHaobanTriggerCustomerDetail);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 影响行数
     */
    int deleteById(Long id);

}

