package com.zzsn.modules.kgj.mapper;

import java.util.List;

import com.baomidou.dynamic.datasource.annotation.DS;
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);
//      @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> 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);
      @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  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);
      /**
       * 功能描述: 批量查询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);
      @DS("master")
      List<CisAnsBasedata> selectByOlnyIds(@Param("list") List<Long> list,@Param("webList") List<Long> webTypeList,@Param("siteId") Long siteId);
}
