diff --git a/novel-front/src/main/java/xyz/zinglizingli/books/web/BookController.java b/novel-front/src/main/java/xyz/zinglizingli/books/web/BookController.java index 7c0af91..0fa5bf7 100644 --- a/novel-front/src/main/java/xyz/zinglizingli/books/web/BookController.java +++ b/novel-front/src/main/java/xyz/zinglizingli/books/web/BookController.java @@ -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 bookSubmit(String bookUrl, String bookName, Float score){ + Map result = new HashMap<>(2); + bookService.addBookParseLog(bookUrl, bookName, score); + result.put("code", 1); + return result; + } + + /** * 精品小说搜索页 diff --git a/novel-front/src/main/resources/templates/books/book_submit.html b/novel-front/src/main/resources/templates/books/book_submit.html new file mode 100644 index 0000000..b420e63 --- /dev/null +++ b/novel-front/src/main/resources/templates/books/book_submit.html @@ -0,0 +1,88 @@ + + + + + + + + 小说提交 + +
+ + + + + + + + +
+ +
+ + +
+ 单本小说提交 +
+ + +
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + +
+
+
+
+ +
+
+ + + +
+ + + + + + \ No newline at end of file diff --git a/script/crawlbook/application.yml b/script/crawlbook/application.yml index c44c400..cd84373 100644 --- a/script/crawlbook/application.yml +++ b/script/crawlbook/application.yml @@ -1,7 +1,7 @@ server: {port: 8083} spring: - datasource: {url: 'jdbc:mysql://127.0.0.1:3306/books?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai', - username: root, password: test123456} + datasource: {url: 'jdbc:mysql://47.106.243.172:3306/books?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai', + username: books, password: books!8888} mybatis: mapper-locations: classpath:mybatis/mapping/*.xml type-aliases-package: xyz.zinglizingli.books.po @@ -10,6 +10,6 @@ mysql: {charset: utf8mb4} books: {lowestScore: 9.0} crawl: website: {type: '4'} - soft-novel: '0' - manhua: '0' + soft-novel: '1' + manhua: '1' logging: {config: 'classpath:logback-boot.xml'}