新增指定单本小说爬取任务

This commit is contained in:
xiongxiaoyang
2020-04-21 13:00:32 +08:00
parent ccab7f01a2
commit c7caa3049c
3 changed files with 115 additions and 12 deletions

View File

@ -8,15 +8,9 @@ import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import xyz.zinglizingli.books.core.config.SeoConfig;
import xyz.zinglizingli.books.po.Book;
import xyz.zinglizingli.books.po.BookContent;
import xyz.zinglizingli.books.po.BookIndex;
import xyz.zinglizingli.books.po.ScreenBullet;
import xyz.zinglizingli.books.po.*;
import xyz.zinglizingli.books.service.BookService;
import xyz.zinglizingli.books.service.UserService;
import xyz.zinglizingli.books.vo.BookVO;
@ -50,6 +44,27 @@ public class BookController {
private final CommonCacheUtil commonCacheUtil;
/**
* 单本小说提交页
* */
@RequestMapping("submit.html")
public String bookSubmitPage(){
return "books/book_submit";
}
/**
* 单本小说提交
* */
@RequestMapping(method = RequestMethod.POST,value = "submit")
@ResponseBody
public Map<String, Object> bookSubmit(String bookUrl, String bookName, Float score){
Map<String, Object> result = new HashMap<>(2);
bookService.addBookParseLog(bookUrl, bookName, score);
result.put("code", 1);
return result;
}
/**
* 精品小说搜索页