package com.brilliance.isc.mda.dao;

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

    int insert(Tfd record);

    int insertSelective(Tfd record);

    int updateByPrimaryKeySelective(Tfd record);

    int updateByPrimaryKey(Tfd record);

    int deleteByPrimaryKey(Tfd record);

    int deleteByIds(Collection<Object> collection);

    Tfd selectByPrimaryKey(Tfd record);

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

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

    Tfd selectByObjInfo(Tfd newtbk);

    List<Tfd> 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<Tfd> entities);
}