package com.brilliance.isc.mda.dao;

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

    int insert(Tfg record);

    int insertSelective(Tfg record);

    int updateByPrimaryKeySelective(Tfg record);

    int updateByPrimaryKey(Tfg record);

    int deleteByPrimaryKey(Tfg record);

    int deleteByIds(Collection<Object> collection);

    Tfg selectByPrimaryKey(Tfg record);

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

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

    Tfg selectByObjInfo(Tfg newtbk);

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