package com.lightinit.hsdataportal.mapper;

import com.lightinit.hsdataportal.model.DataRequirementSearchModel;
import com.lightinit.hsdataportal.entity.Requirement;
import com.lightinit.hsdataportal.entity.RequirementExample;
import java.util.List;
import java.util.Map;

import com.lightinit.hsdataportal.model.DataRequirementListModel;
import com.lightinit.hsdataportal.model.MyRequirementListModel;
import com.lightinit.hsdataportal.model.MyRequirementSearchModel;
import com.lightinit.hsdataportal.model.DataRequirementDetailModel;

import org.apache.ibatis.annotations.Param;

public interface RequirementMapper {
    long countByExample(RequirementExample example);

    int deleteByExample(RequirementExample example);

    int deleteByPrimaryKey(Long id);

    int insert(Requirement record);

    int insertSelective(Requirement record);

    List<Requirement> selectByExample(RequirementExample example);

    Requirement selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") Requirement record, @Param("example") RequirementExample example);

    int updateByExample(@Param("record") Requirement record, @Param("example") RequirementExample example);

    int updateByPrimaryKeySelective(Requirement record);

    int updateByPrimaryKey(Requirement record);

    List<MyRequirementListModel> selectShareDataList(Long id);


    List<MyRequirementListModel> selectApiList(Long id);


    List<MyRequirementListModel> selectMicroappList(Long id);


    List<MyRequirementListModel> selectOpenDataList(Long id);

    DataRequirementDetailModel getDataRequirementDetail(DataRequirementSearchModel dataRequirementSearchModel);

    List<Map<Long,String>> getSectorParentNames();

    List<DataRequirementListModel> getDataRequirementList(DataRequirementSearchModel dataRequirementSearchModel);

    Long  getDataRequirementCount(DataRequirementSearchModel dataRequirementSearchModel);

    int updateViewTimes(Long id);
}