package com.brilliance.isc.mda.dao;

import com.brilliance.isc.common.rmbbop.entity.Tek;
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 TekMapper {

    int insert(Tek record);

    int insertSelective(Tek record);

    int updateByPrimaryKeySelective(Tek record);

    int updateByPrimaryKey(Tek record);

    int deleteByPrimaryKey(Tek record);

    int deleteByIds(Collection<Object> collection);

    Tek selectByPrimaryKey(Tek record);

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

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

    Tek selectByObjInfo(Tek newtek);

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

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

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