package com.zzsn.modules.kgj.mapper;

import java.util.List;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.annotation.SqlParser;
import com.zzsn.modules.kgj.entity.CamInfo;
import org.apache.ibatis.annotations.Param;
import com.zzsn.modules.kgj.entity.CisAnsBasedata;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: CIS_ANS_BASEDATA
 * @Author: zzsn-boot
 * @Date:   2020-08-26
 * @Version: V1.0
 */
@DS("master")
public interface CisAnsBasedataMapper extends BaseMapper<CisAnsBasedata> {
//      @DS("multi-datasource1")
      List<CisAnsBasedata> getCisAnsBasedataList(@Param("publishDate_begin") String publishDate_begin
              , @Param("publishDate_end") String publishDate_end, Integer offset, Integer offset1);

      /**
       * 聚合专题查询
       * @param publishDate_begin
       * @param publishDate_end
       * @param offset
       * @param offset1
       * @return
       */
      List<CamInfo> getHotCisAnsBasedataList(@Param("publishDate_begin") String publishDate_begin
              , @Param("publishDate_end") String publishDate_end, Integer offset, Integer offset1);
      int  getHotCisAnsBasedataCount(@Param("publishDate_begin") String publishDate_begin
              , @Param("publishDate_end") String publishDate_end, Integer offset, Integer offset1);
      //根据id获取聚合专题信息
      CamInfo getCAmByid(@Param("id") Long id);
//      @DS("multi-datasource1")
      int  getCisAnsBasedataCount(@Param("publishDate_begin") String publishDate_begin
              , @Param("publishDate_end") String publishDate_end, Integer offset, Integer offset1);

      @DS("master")
      CisAnsBasedata queryById(@Param("id") Long id);

      /**
       * 查询审核状态
       * @param id
       * @return
       */
      String queryLocaleById(@Param("id") Long id);
      @DS("master")
      List<CisAnsBasedata> getCisAnsBasedataList2Old(@Param("publishDate_begin") String publishDate_begin
              , @Param("publishDate_end") String publishDate_end, Integer offset, Integer offset1, @Param("delflag") Long delFlag);
      List<CisAnsBasedata> getCisAnsBasedataList3(@Param("publishDate_begin") String publishDate_begin
              , @Param("publishDate_end") String publishDate_end, Integer offset, Integer offset1, @Param("delflag") Long delFlag,@Param("list") List<Long> webTypeList
              ,@Param("siteId") Long siteId,@Param("title") String title);
      List<CisAnsBasedata> getCisAnsBasedataList2(@Param("publishDate_begin") String publishDate_begin
              , @Param("publishDate_end") String publishDate_end, Integer offset, Integer offset1, @Param("delflag") Long delFlag,@Param("list") List<Long> webTypeList
              ,@Param("siteId") Long siteId);
      //add lihuawei  新曾按打分查询
      List<CisAnsBasedata> getCisAnsBasedataListByscore(@Param("publishDate_begin") String publishDate_begin
              , @Param("publishDate_end") String publishDate_end, Integer offset, Integer offset1, @Param("min") Long min,@Param("max") Long max,@Param("list") List<Long> webTypeList
              ,@Param("siteId") Long siteId,@Param("title") String title, @Param("delflag")Long flag
              ,@Param("orientation") String orientation,@Param("origin") String origin);
      List<CisAnsBasedata> getCisAnsBasedataListByserect(@Param("publishDate_begin") String publishDate_begin
              , @Param("publishDate_end") String publishDate_end, Integer offset, Integer offset1,@Param("list") List<Long> webTypeList
              ,@Param("siteId") Long siteId,@Param("title") String title, @Param("delflag")Long delflag);

      @DS("master")
      int  getCisAnsBasedataCount2Old(@Param("publishDate_begin") String publishDate_begin
              , @Param("publishDate_end") String publishDate_end,Integer offset, Integer offset1, @Param("delflag")Long delFlag);
      @DS("master")
      int  getCisAnsBasedataCount2(@Param("publishDate_begin") String publishDate_begin
              , @Param("publishDate_end") String publishDate_end,Integer offset, Integer offset1, @Param("delflag")Long delFlag,@Param("list") List<Long> webTypeList
              ,@Param("siteId") Long siteId);
      @DS("master")

      int  getCisAnsBasedataCount3(@Param("publishDate_begin") String publishDate_begin
              , @Param("publishDate_end") String publishDate_end,Integer offset, Integer offset1, @Param("delflag")Long delFlag,@Param("list") List<Long> webTypeList
              ,@Param("siteId") Long siteId,@Param("title") String title);

      @DS("master")
      int  getCisAnsBasedataCountByserect(@Param("publishDate_begin") String publishDate_begin
              , @Param("publishDate_end") String publishDate_end,Integer offset, Integer offset1,@Param("list") List<Long> webTypeList
              ,@Param("siteId") Long siteId,@Param("title") String title,@Param("delflag")Long delFlag);

      @DS("master")
      int  getCisAnsBasedataCountByscore(@Param("publishDate_begin") String publishDate_begin
              , @Param("publishDate_end") String publishDate_end, Integer offset, Integer offset1, @Param("min") Long min,@Param("max") Long max,@Param("list") List<Long> webTypeList
              ,@Param("siteId") Long siteId,@Param("title") String title, @Param("delflag")Long flag
              ,@Param("orientation")  String orientation,@Param("origin") String origin);

      /**
       * 功能描述: 批量查询ID
       * @author chen
       * @date 2020/11/3
       * @param  list
       * @return java.util.List<com.zzsn.modules.kgj.entity.CisAnsBasedata>
       */
      @DS("master")
      List<CisAnsBasedata> selectByIdsOld(List<Long> list);
      /**
       * 功能描述: 批量查询ID
       * @author chen
       * @date 2020/11/3
       * @param  list
       * @return java.util.List<com.zzsn.modules.kgj.entity.CisAnsBasedata>
       */
      @DS("master")
      List<CisAnsBasedata> selectByIds(@Param("list") List<Long> list,@Param("webList") List<Long> webTypeList);
      //事件查询
      List<CisAnsBasedata> selectByIdsAndTypId(@Param("list") List<Long> list,@Param("webList") List<Long> webTypeList,
              Integer offset, Integer offset1);
      Integer selectByIdsAndTypIdCount(@Param("list") List<Long> list,@Param("webList") List<Long> webTypeList
              ,Integer offse , Integer offset1);

      //密点词搜索
      List<CisAnsBasedata> selectByKeyWords(String searchKey, String beginTime,String endTime,@Param("webList") List<Long> webList, Integer offset , Integer offset1);

      Integer selectByKeyWordsCount(String searchKey,String beginTime,String endTime,@Param("webList") List<Long> webList, Integer offset , Integer offset1);


      @DS("master")
      List<CisAnsBasedata> selectByOlnyIds(@Param("list") List<Long> list,@Param("webList") List<Long> webTypeList,@Param("siteId") Long siteId);

      @DS("master")
      List<CisAnsBasedata> selectBaseData(@Param("") List<Long> list,@Param("webList") List<Long> webTypeList,@Param("siteId") Long siteId);
}
