package com.softwarebr.nunu.dao.go;

import com.softwarebr.nunu.entity.go.Policy;
import com.brframework.commondb.core.CommonRepository;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;

/**
 * @date 2020-02-19 15:35:44
 * @author lilin
 */

@Repository
public interface PolicyDao extends CommonRepository<Long, Policy> {

    /**
     * 检查会不会机器人发布重复政策
     * @param source
     * @param title
     * @return
     */
    Long countBySourceAndTitle(String source, String title);

    /**
     * 政策收集统计
     * @param marker 删除标记
     * @param startDate 开始时间
     * @param endDate 结束时间
     * @return
     */
    Long countByMarkerAndCreateDateBetween(Integer marker, LocalDateTime startDate, LocalDateTime endDate);
}