package com.goafanti.common.dao;

import com.goafanti.RD.bo.InputExcelRdDetails;
import com.goafanti.RD.bo.OutRdDetails;
import com.goafanti.common.model.RdDetails;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RdDetailsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(RdDetails record);

    int insertSelective(RdDetails record);

    RdDetails selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(RdDetails record);

    int updateByPrimaryKey(RdDetails record);

    OutRdDetails details(Long id);

    int checkRdNo(@Param("rdNo") String rdNo,@Param("id")  Long id);

    void insertBatch(List<InputExcelRdDetails> list);

    /**
     *
     * @param id
     * @param type  0为浏览 1为下载
     * @return
     */
    int updateBrowseOrDownload(@Param("id")Long id, @Param("type")Integer type);

    RdDetails selectByRDName(@Param("rdName") String rdName, @Param("userName") String userName);
}
