package com.brilliance.isc.mda.dao;

import com.brilliance.isc.bo.Pts;
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 PtsMapper {

    int insert(Pts record);

    int insertSelective(Pts record);

    int updateByPrimaryKeySelective(Pts record);

    int updateByPrimaryKey(Pts record);

    int deleteByPrimaryKey(Pts record);

    int deleteByIds(Collection<Object> collection);

    Pts selectByPrimaryKey(Pts record);

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

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

    Pts getPtsByObjInrTypAndRole(@Param("objinr") String objinr, @Param("objtyp") String objtyp, @Param("rol") String rol, @Param("ptyinr") String ptyinr);

    List<Pts> getPtsByObjInrTyp(@Param("objinr") String objinr, @Param("objtyp") String objtyp);

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

    int selectCountByPtyinr(@Param("ptyinr") String ptyinr);

    int batchInsert(@Param("list") List<Pts> list);

    int batchUpdate(@Param("list") List<Pts> list);

    int batchDelete(@Param("list") List<Pts> list);

    List<Pts> selectByObjtypAndObjinrLikeExtkey(@Param("extkey") String extkey,@Param("objtyp") String objtyp,@Param("objinr") String objinr);

    String selectPteinrByinr(@Param("inr") String inr);
}