package com.brilliance.isc.mda.dao;

import com.brilliance.isc.common.rmbbop.entity.Tbz;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;
import java.util.Map;

@Mapper
public interface TbzMapper {
    int insert(Tbz record);

    int insertSelective(Tbz record);

    int updateByPrimaryKeySelective(Tbz record);

    int updateByPrimaryKey(Tbz record);

    int deleteByPrimaryKey(Tbz record);

    int deleteByIds(Collection<Object> collection);

    Tbz selectByPrimaryKey(Tbz record);

    int dyncDelete(Map<String, Object> dyncMap);

    List<Tbz> dyncRead(Map<String, Object> dyncMap);

    Tbz selectByObjInfo(Tbz newtbz);

    List<Tbz> selectByObjtypAndObjinr(@Param("objtyp") String objtyp, @Param("objinr") String objinr);

    int deleteByobjtypAndobjinr (@Param("objtyp") String objtyp, @Param("objinr") String objinr);

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