上传代码

This commit is contained in:
xxy
2020-05-02 15:05:21 +08:00
parent c8c80fa719
commit ed34c67d08
733 changed files with 61899 additions and 0 deletions

View File

@ -0,0 +1,64 @@
package com.java2nb.novel.service;
import com.java2nb.novel.core.crawl.RuleBean;
import com.java2nb.novel.entity.CrawlSource;
import java.util.List;
/**
* @author Administrator
*/
public interface CrawlService {
/**
* 新增爬虫源
* @param source 爬虫源提交的数据对象
* */
void addCrawlSource(CrawlSource source);
/**
* 爬虫源分页列表
* @param page 当前页码
* @param pageSize 分页大小
*@return 爬虫源集合
* */
List<CrawlSource> listCrawlByPage(int page, int pageSize);
/**
* 开启或停止爬虫
* @param sourceId 爬虫源ID
* @param sourceStatus 状态0关闭1开启
* */
void openOrCloseCrawl(Integer sourceId, Byte sourceStatus);
/**
* 更新爬虫状态
* @param sourceId 爬虫源ID
* @param sourceStatus 状态0关闭1开启
* */
void updateCrawlSourceStatus(Integer sourceId, Byte sourceStatus);
/**
* 根据爬虫状态查询爬虫源集合
* @param sourceStatus 状态0关闭1开启
* @return 返回爬虫源集合
* */
List<CrawlSource> queryCrawlSourceByStatus(Byte sourceStatus);
/**
* 根据分类ID和规则解析分类列表
* @param catId 分类ID
* @param ruleBean 规则对象
* @param sourceId
*/
void parseBookList(int catId, RuleBean ruleBean, Integer sourceId);
/**
* 查询爬虫源
* @param sourceId 源ID
* @return 源信息
* */
CrawlSource queryCrawlSource(Integer sourceId);
}