Selaa lähdekoodia

- 添加后台获取章节、更新章节的接口,还未测试

tianyunperfect 3 vuotta sitten
vanhempi
commit
b19d321b9d

+ 1 - 0
book-dao/src/main/java/com/book/dao/VO/BookContentVO.java

@@ -8,4 +8,5 @@ public class BookContentVO {
     Long bookId;
     Long contentId;
     String contentName;
+    String content;
 }

+ 3 - 0
book-dao/src/main/java/com/book/dao/VO/QueryVO.java

@@ -14,4 +14,7 @@ public class QueryVO {
     String sex;
 
     String pageId;
+
+    Long id;
+
 }

+ 65 - 43
book-dao/src/main/java/com/book/dao/cps/entity/EditBook.java

@@ -3,7 +3,6 @@ package com.book.dao.cps.entity;
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Date;
 import lombok.Data;
 
 @Data
@@ -13,7 +12,7 @@ public class EditBook implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column edit_book.id
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     private Long id;
 
@@ -22,7 +21,7 @@ public class EditBook implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column edit_book.book_id
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     private Long bookId;
 
@@ -31,7 +30,7 @@ public class EditBook implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column edit_book.chapter_name
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     private String chapterName;
 
@@ -40,25 +39,34 @@ public class EditBook implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column edit_book.create_time
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
-    private Date createTime;
+    private Integer createTime;
 
     /**
      *
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column edit_book.update_time
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
-    private Date updateTime;
+    private Integer updateTime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column edit_book.chapter_id
+     *
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
+     */
+    private Long chapterId;
 
     /**
      *
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column edit_book.content
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     private String content;
 
@@ -66,7 +74,7 @@ public class EditBook implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     private static final long serialVersionUID = 1L;
 
@@ -74,7 +82,7 @@ public class EditBook implements Serializable {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public static EditBook.Builder builder() {
         return new EditBook.Builder();
@@ -84,14 +92,14 @@ public class EditBook implements Serializable {
      * This class was generated by MyBatis Generator.
      * This class corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public static class Builder {
         /**
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         private EditBook obj;
 
@@ -99,7 +107,7 @@ public class EditBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         public Builder() {
             this.obj = new EditBook();
@@ -111,7 +119,7 @@ public class EditBook implements Serializable {
          *
          * @param id the value for edit_book.id
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         public Builder id(Long id) {
             obj.setId(id);
@@ -124,7 +132,7 @@ public class EditBook implements Serializable {
          *
          * @param bookId the value for edit_book.book_id
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         public Builder bookId(Long bookId) {
             obj.setBookId(bookId);
@@ -137,7 +145,7 @@ public class EditBook implements Serializable {
          *
          * @param chapterName the value for edit_book.chapter_name
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         public Builder chapterName(String chapterName) {
             obj.setChapterName(chapterName);
@@ -150,9 +158,9 @@ public class EditBook implements Serializable {
          *
          * @param createTime the value for edit_book.create_time
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
-        public Builder createTime(Date createTime) {
+        public Builder createTime(Integer createTime) {
             obj.setCreateTime(createTime);
             return this;
         }
@@ -163,20 +171,33 @@ public class EditBook implements Serializable {
          *
          * @param updateTime the value for edit_book.update_time
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
-        public Builder updateTime(Date updateTime) {
+        public Builder updateTime(Integer updateTime) {
             obj.setUpdateTime(updateTime);
             return this;
         }
 
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column edit_book.chapter_id
+         *
+         * @param chapterId the value for edit_book.chapter_id
+         *
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
+         */
+        public Builder chapterId(Long chapterId) {
+            obj.setChapterId(chapterId);
+            return this;
+        }
+
         /**
          * This method was generated by MyBatis Generator.
          * This method sets the value of the database column edit_book.content
          *
          * @param content the value for edit_book.content
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         public Builder content(String content) {
             obj.setContent(content);
@@ -187,7 +208,7 @@ public class EditBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         public EditBook build() {
             return this.obj;
@@ -198,21 +219,22 @@ public class EditBook implements Serializable {
      * This enum was generated by MyBatis Generator.
      * This enum corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public enum Column {
         id("id", "id", "BIGINT", false),
         bookId("book_id", "bookId", "BIGINT", false),
         chapterName("chapter_name", "chapterName", "VARCHAR", false),
-        createTime("create_time", "createTime", "TIMESTAMP", false),
-        updateTime("update_time", "updateTime", "TIMESTAMP", false),
+        createTime("create_time", "createTime", "INTEGER", false),
+        updateTime("update_time", "updateTime", "INTEGER", false),
+        chapterId("chapter_id", "chapterId", "BIGINT", false),
         content("content", "content", "LONGVARCHAR", false);
 
         /**
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         private static final String BEGINNING_DELIMITER = "\"";
 
@@ -220,7 +242,7 @@ public class EditBook implements Serializable {
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         private static final String ENDING_DELIMITER = "\"";
 
@@ -228,7 +250,7 @@ public class EditBook implements Serializable {
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         private final String column;
 
@@ -236,7 +258,7 @@ public class EditBook implements Serializable {
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         private final boolean isColumnNameDelimited;
 
@@ -244,7 +266,7 @@ public class EditBook implements Serializable {
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         private final String javaProperty;
 
@@ -252,7 +274,7 @@ public class EditBook implements Serializable {
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         private final String jdbcType;
 
@@ -260,7 +282,7 @@ public class EditBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         public String value() {
             return this.column;
@@ -270,7 +292,7 @@ public class EditBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         public String getValue() {
             return this.column;
@@ -280,7 +302,7 @@ public class EditBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         public String getJavaProperty() {
             return this.javaProperty;
@@ -290,7 +312,7 @@ public class EditBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         public String getJdbcType() {
             return this.jdbcType;
@@ -300,7 +322,7 @@ public class EditBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
             this.column = column;
@@ -313,7 +335,7 @@ public class EditBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         public String desc() {
             return this.getEscapedColumnName() + " DESC";
@@ -323,7 +345,7 @@ public class EditBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         public String asc() {
             return this.getEscapedColumnName() + " ASC";
@@ -333,7 +355,7 @@ public class EditBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         public static Column[] excludes(Column ... excludes) {
             ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
@@ -347,7 +369,7 @@ public class EditBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         public static Column[] all() {
             return Column.values();
@@ -357,7 +379,7 @@ public class EditBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         public String getEscapedColumnName() {
             if (this.isColumnNameDelimited) {
@@ -371,7 +393,7 @@ public class EditBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         public String getAliasedEscapedColumnName() {
             return this.getEscapedColumnName();

+ 24 - 24
book-dao/src/main/java/com/book/dao/cps/mapper/EditBookMapper.java

@@ -14,7 +14,7 @@ public interface EditBookMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     long countByExample(EditBookExample example);
 
@@ -22,7 +22,7 @@ public interface EditBookMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     int deleteByExample(EditBookExample example);
 
@@ -30,7 +30,7 @@ public interface EditBookMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     int deleteByPrimaryKey(@Param("id") Long id, @Param("bookId") Long bookId);
 
@@ -38,7 +38,7 @@ public interface EditBookMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     int insert(EditBook record);
 
@@ -46,7 +46,7 @@ public interface EditBookMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     int insertSelective(@Param("record") EditBook record, @Param("selective") EditBook.Column ... selective);
 
@@ -54,7 +54,7 @@ public interface EditBookMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     EditBook selectOneByExample(EditBookExample example);
 
@@ -62,7 +62,7 @@ public interface EditBookMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     EditBook selectOneByExampleSelective(@Param("example") EditBookExample example, @Param("selective") EditBook.Column ... selective);
 
@@ -70,7 +70,7 @@ public interface EditBookMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     EditBook selectOneByExampleWithBLOBs(EditBookExample example);
 
@@ -78,7 +78,7 @@ public interface EditBookMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     List<EditBook> selectByExampleSelective(@Param("example") EditBookExample example, @Param("selective") EditBook.Column ... selective);
 
@@ -86,7 +86,7 @@ public interface EditBookMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     List<EditBook> selectByExampleWithBLOBs(EditBookExample example);
 
@@ -94,7 +94,7 @@ public interface EditBookMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     List<EditBook> selectByExample(EditBookExample example);
 
@@ -102,7 +102,7 @@ public interface EditBookMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     EditBook selectByPrimaryKeySelective(@Param("id") Long id, @Param("bookId") Long bookId, @Param("selective") EditBook.Column ... selective);
 
@@ -110,7 +110,7 @@ public interface EditBookMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     EditBook selectByPrimaryKey(@Param("id") Long id, @Param("bookId") Long bookId);
 
@@ -118,7 +118,7 @@ public interface EditBookMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     int updateByExampleSelective(@Param("record") EditBook record, @Param("example") EditBookExample example, @Param("selective") EditBook.Column ... selective);
 
@@ -126,7 +126,7 @@ public interface EditBookMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     int updateByExampleWithBLOBs(@Param("record") EditBook record, @Param("example") EditBookExample example);
 
@@ -134,7 +134,7 @@ public interface EditBookMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     int updateByExample(@Param("record") EditBook record, @Param("example") EditBookExample example);
 
@@ -142,7 +142,7 @@ public interface EditBookMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     int updateByPrimaryKeySelective(@Param("record") EditBook record, @Param("selective") EditBook.Column ... selective);
 
@@ -150,7 +150,7 @@ public interface EditBookMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     int updateByPrimaryKeyWithBLOBs(EditBook record);
 
@@ -158,7 +158,7 @@ public interface EditBookMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     int updateByPrimaryKey(EditBook record);
 
@@ -166,7 +166,7 @@ public interface EditBookMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     int batchInsert(@Param("list") List<EditBook> list);
 
@@ -174,7 +174,7 @@ public interface EditBookMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     int batchInsertSelective(@Param("list") List<EditBook> list, @Param("selective") EditBook.Column ... selective);
 
@@ -182,7 +182,7 @@ public interface EditBookMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     int upsert(EditBook record);
 
@@ -190,7 +190,7 @@ public interface EditBookMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     int upsertSelective(@Param("record") EditBook record, @Param("selective") EditBook.Column ... selective);
 
@@ -198,7 +198,7 @@ public interface EditBookMapper {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     int upsertWithBLOBs(EditBook record);
 }

+ 150 - 61
book-dao/src/main/java/com/book/dao/cps/pojo/example/EditBookExample.java

@@ -2,7 +2,6 @@ package com.book.dao.cps.pojo.example;
 
 import com.book.dao.cps.entity.EditBook;
 import java.util.ArrayList;
-import java.util.Date;
 import java.util.List;
 
 public class EditBookExample {
@@ -10,7 +9,7 @@ public class EditBookExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     protected String orderByClause;
 
@@ -18,7 +17,7 @@ public class EditBookExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     protected boolean distinct;
 
@@ -26,7 +25,7 @@ public class EditBookExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     protected List<Criteria> oredCriteria;
 
@@ -34,7 +33,7 @@ public class EditBookExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     protected Integer offset;
 
@@ -42,7 +41,7 @@ public class EditBookExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     protected Integer rows;
 
@@ -50,7 +49,7 @@ public class EditBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public EditBookExample() {
         oredCriteria = new ArrayList<Criteria>();
@@ -60,7 +59,7 @@ public class EditBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public void setOrderByClause(String orderByClause) {
         this.orderByClause = orderByClause;
@@ -70,7 +69,7 @@ public class EditBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public String getOrderByClause() {
         return orderByClause;
@@ -80,7 +79,7 @@ public class EditBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public void setDistinct(boolean distinct) {
         this.distinct = distinct;
@@ -90,7 +89,7 @@ public class EditBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public boolean isDistinct() {
         return distinct;
@@ -100,7 +99,7 @@ public class EditBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public List<Criteria> getOredCriteria() {
         return oredCriteria;
@@ -110,7 +109,7 @@ public class EditBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public void or(Criteria criteria) {
         oredCriteria.add(criteria);
@@ -120,7 +119,7 @@ public class EditBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public Criteria or() {
         Criteria criteria = createCriteriaInternal();
@@ -132,7 +131,7 @@ public class EditBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public EditBookExample orderBy(String orderByClause) {
         this.setOrderByClause(orderByClause);
@@ -143,7 +142,7 @@ public class EditBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public EditBookExample orderBy(String ... orderByClauses) {
         StringBuffer sb = new StringBuffer();
@@ -161,7 +160,7 @@ public class EditBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public Criteria createCriteria() {
         Criteria criteria = createCriteriaInternal();
@@ -175,7 +174,7 @@ public class EditBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     protected Criteria createCriteriaInternal() {
         Criteria criteria = new Criteria(this);
@@ -186,7 +185,7 @@ public class EditBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public void clear() {
         oredCriteria.clear();
@@ -200,7 +199,7 @@ public class EditBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public void setOffset(Integer offset) {
         this.offset = offset;
@@ -210,7 +209,7 @@ public class EditBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public Integer getOffset() {
         return this.offset;
@@ -220,7 +219,7 @@ public class EditBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public void setRows(Integer rows) {
         this.rows = rows;
@@ -230,7 +229,7 @@ public class EditBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public Integer getRows() {
         return this.rows;
@@ -240,7 +239,7 @@ public class EditBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public EditBookExample limit(Integer rows) {
         this.rows = rows;
@@ -251,7 +250,7 @@ public class EditBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public EditBookExample limit(Integer offset, Integer rows) {
         this.offset = offset;
@@ -263,7 +262,7 @@ public class EditBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public EditBookExample page(Integer page, Integer pageSize) {
         this.offset = page * pageSize;
@@ -275,7 +274,7 @@ public class EditBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public static Criteria newAndCreateCriteria() {
         EditBookExample example = new EditBookExample();
@@ -286,7 +285,7 @@ public class EditBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public EditBookExample when(boolean condition, IExampleWhen then) {
         if (condition) {
@@ -299,7 +298,7 @@ public class EditBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public EditBookExample when(boolean condition, IExampleWhen then, IExampleWhen otherwise) {
         if (condition) {
@@ -314,7 +313,7 @@ public class EditBookExample {
      * This class was generated by MyBatis Generator.
      * This class corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     protected abstract static class GeneratedCriteria {
         protected List<Criterion> criteria;
@@ -647,7 +646,7 @@ public class EditBookExample {
             return (Criteria) this;
         }
 
-        public Criteria andCreateTimeEqualTo(Date value) {
+        public Criteria andCreateTimeEqualTo(Integer value) {
             addCriterion("create_time =", value, "createTime");
             return (Criteria) this;
         }
@@ -657,7 +656,7 @@ public class EditBookExample {
             return (Criteria) this;
         }
 
-        public Criteria andCreateTimeNotEqualTo(Date value) {
+        public Criteria andCreateTimeNotEqualTo(Integer value) {
             addCriterion("create_time <>", value, "createTime");
             return (Criteria) this;
         }
@@ -667,7 +666,7 @@ public class EditBookExample {
             return (Criteria) this;
         }
 
-        public Criteria andCreateTimeGreaterThan(Date value) {
+        public Criteria andCreateTimeGreaterThan(Integer value) {
             addCriterion("create_time >", value, "createTime");
             return (Criteria) this;
         }
@@ -677,7 +676,7 @@ public class EditBookExample {
             return (Criteria) this;
         }
 
-        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Integer value) {
             addCriterion("create_time >=", value, "createTime");
             return (Criteria) this;
         }
@@ -687,7 +686,7 @@ public class EditBookExample {
             return (Criteria) this;
         }
 
-        public Criteria andCreateTimeLessThan(Date value) {
+        public Criteria andCreateTimeLessThan(Integer value) {
             addCriterion("create_time <", value, "createTime");
             return (Criteria) this;
         }
@@ -697,7 +696,7 @@ public class EditBookExample {
             return (Criteria) this;
         }
 
-        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+        public Criteria andCreateTimeLessThanOrEqualTo(Integer value) {
             addCriterion("create_time <=", value, "createTime");
             return (Criteria) this;
         }
@@ -707,22 +706,22 @@ public class EditBookExample {
             return (Criteria) this;
         }
 
-        public Criteria andCreateTimeIn(List<Date> values) {
+        public Criteria andCreateTimeIn(List<Integer> values) {
             addCriterion("create_time in", values, "createTime");
             return (Criteria) this;
         }
 
-        public Criteria andCreateTimeNotIn(List<Date> values) {
+        public Criteria andCreateTimeNotIn(List<Integer> values) {
             addCriterion("create_time not in", values, "createTime");
             return (Criteria) this;
         }
 
-        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+        public Criteria andCreateTimeBetween(Integer value1, Integer value2) {
             addCriterion("create_time between", value1, value2, "createTime");
             return (Criteria) this;
         }
 
-        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+        public Criteria andCreateTimeNotBetween(Integer value1, Integer value2) {
             addCriterion("create_time not between", value1, value2, "createTime");
             return (Criteria) this;
         }
@@ -737,7 +736,7 @@ public class EditBookExample {
             return (Criteria) this;
         }
 
-        public Criteria andUpdateTimeEqualTo(Date value) {
+        public Criteria andUpdateTimeEqualTo(Integer value) {
             addCriterion("update_time =", value, "updateTime");
             return (Criteria) this;
         }
@@ -747,7 +746,7 @@ public class EditBookExample {
             return (Criteria) this;
         }
 
-        public Criteria andUpdateTimeNotEqualTo(Date value) {
+        public Criteria andUpdateTimeNotEqualTo(Integer value) {
             addCriterion("update_time <>", value, "updateTime");
             return (Criteria) this;
         }
@@ -757,7 +756,7 @@ public class EditBookExample {
             return (Criteria) this;
         }
 
-        public Criteria andUpdateTimeGreaterThan(Date value) {
+        public Criteria andUpdateTimeGreaterThan(Integer value) {
             addCriterion("update_time >", value, "updateTime");
             return (Criteria) this;
         }
@@ -767,7 +766,7 @@ public class EditBookExample {
             return (Criteria) this;
         }
 
-        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
+        public Criteria andUpdateTimeGreaterThanOrEqualTo(Integer value) {
             addCriterion("update_time >=", value, "updateTime");
             return (Criteria) this;
         }
@@ -777,7 +776,7 @@ public class EditBookExample {
             return (Criteria) this;
         }
 
-        public Criteria andUpdateTimeLessThan(Date value) {
+        public Criteria andUpdateTimeLessThan(Integer value) {
             addCriterion("update_time <", value, "updateTime");
             return (Criteria) this;
         }
@@ -787,7 +786,7 @@ public class EditBookExample {
             return (Criteria) this;
         }
 
-        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
+        public Criteria andUpdateTimeLessThanOrEqualTo(Integer value) {
             addCriterion("update_time <=", value, "updateTime");
             return (Criteria) this;
         }
@@ -797,39 +796,129 @@ public class EditBookExample {
             return (Criteria) this;
         }
 
-        public Criteria andUpdateTimeIn(List<Date> values) {
+        public Criteria andUpdateTimeIn(List<Integer> values) {
             addCriterion("update_time in", values, "updateTime");
             return (Criteria) this;
         }
 
-        public Criteria andUpdateTimeNotIn(List<Date> values) {
+        public Criteria andUpdateTimeNotIn(List<Integer> values) {
             addCriterion("update_time not in", values, "updateTime");
             return (Criteria) this;
         }
 
-        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
+        public Criteria andUpdateTimeBetween(Integer value1, Integer value2) {
             addCriterion("update_time between", value1, value2, "updateTime");
             return (Criteria) this;
         }
 
-        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
+        public Criteria andUpdateTimeNotBetween(Integer value1, Integer value2) {
             addCriterion("update_time not between", value1, value2, "updateTime");
             return (Criteria) this;
         }
+
+        public Criteria andChapterIdIsNull() {
+            addCriterion("chapter_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterIdIsNotNull() {
+            addCriterion("chapter_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterIdEqualTo(Long value) {
+            addCriterion("chapter_id =", value, "chapterId");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterIdEqualToColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("chapter_id = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterIdNotEqualTo(Long value) {
+            addCriterion("chapter_id <>", value, "chapterId");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterIdNotEqualToColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("chapter_id <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterIdGreaterThan(Long value) {
+            addCriterion("chapter_id >", value, "chapterId");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterIdGreaterThanColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("chapter_id > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("chapter_id >=", value, "chapterId");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterIdGreaterThanOrEqualToColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("chapter_id >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterIdLessThan(Long value) {
+            addCriterion("chapter_id <", value, "chapterId");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterIdLessThanColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("chapter_id < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterIdLessThanOrEqualTo(Long value) {
+            addCriterion("chapter_id <=", value, "chapterId");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterIdLessThanOrEqualToColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("chapter_id <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterIdIn(List<Long> values) {
+            addCriterion("chapter_id in", values, "chapterId");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterIdNotIn(List<Long> values) {
+            addCriterion("chapter_id not in", values, "chapterId");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterIdBetween(Long value1, Long value2) {
+            addCriterion("chapter_id between", value1, value2, "chapterId");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterIdNotBetween(Long value1, Long value2) {
+            addCriterion("chapter_id not between", value1, value2, "chapterId");
+            return (Criteria) this;
+        }
     }
 
     /**
      * This class was generated by MyBatis Generator.
      * This class corresponds to the database table edit_book
      *
-     * @mbg.generated do_not_delete_during_merge Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated do_not_delete_during_merge Fri Aug 27 01:01:13 CST 2021
      */
     public static class Criteria extends GeneratedCriteria {
         /**
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         private EditBookExample example;
 
@@ -837,7 +926,7 @@ public class EditBookExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         protected Criteria(EditBookExample example) {
             super();
@@ -848,7 +937,7 @@ public class EditBookExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         public EditBookExample example() {
             return this.example;
@@ -858,7 +947,7 @@ public class EditBookExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         @Deprecated
         public Criteria andIf(boolean ifAdd, ICriteriaAdd add) {
@@ -872,7 +961,7 @@ public class EditBookExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         public Criteria when(boolean condition, ICriteriaWhen then) {
             if (condition) {
@@ -885,7 +974,7 @@ public class EditBookExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         public Criteria when(boolean condition, ICriteriaWhen then, ICriteriaWhen otherwise) {
             if (condition) {
@@ -902,7 +991,7 @@ public class EditBookExample {
              * This method was generated by MyBatis Generator.
              * This method corresponds to the database table edit_book
              *
-             * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+             * @mbg.generated Fri Aug 27 01:01:13 CST 2021
              */
             Criteria add(Criteria add);
         }
@@ -912,7 +1001,7 @@ public class EditBookExample {
      * This class was generated by MyBatis Generator.
      * This class corresponds to the database table edit_book
      *
-     * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+     * @mbg.generated Fri Aug 27 01:01:13 CST 2021
      */
     public static class Criterion {
         private String condition;
@@ -1005,7 +1094,7 @@ public class EditBookExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         void criteria(Criteria criteria);
     }
@@ -1015,7 +1104,7 @@ public class EditBookExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table edit_book
          *
-         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         * @mbg.generated Fri Aug 27 01:01:13 CST 2021
          */
         void example(com.book.dao.cps.pojo.example.EditBookExample example);
     }

+ 111 - 79
book-dao/src/main/resources/mapper/cps/EditBookMapper.xml

@@ -5,19 +5,20 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     <id column="id" jdbcType="BIGINT" property="id" />
     <id column="book_id" jdbcType="BIGINT" property="bookId" />
     <result column="chapter_name" jdbcType="VARCHAR" property="chapterName" />
-    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
-    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="create_time" jdbcType="INTEGER" property="createTime" />
+    <result column="update_time" jdbcType="INTEGER" property="updateTime" />
+    <result column="chapter_id" jdbcType="BIGINT" property="chapterId" />
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.book.dao.cps.entity.EditBook">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     <result column="content" jdbcType="LONGVARCHAR" property="content" />
   </resultMap>
@@ -25,7 +26,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -59,7 +60,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -93,15 +94,15 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
-    id, book_id, chapter_name, create_time, update_time
+    id, book_id, chapter_name, create_time, update_time, chapter_id
   </sql>
   <sql id="Blob_Column_List">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     content
   </sql>
@@ -109,7 +110,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     select
     <if test="distinct">
@@ -138,7 +139,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     select
     <if test="distinct">
@@ -165,14 +166,14 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     select
     <if test="example != null and example.distinct">
       distinct
     </if>
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach collection="selective" item="column" separator=",">
           ${column.aliasedEscapedColumnName}
         </foreach>
@@ -203,7 +204,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -217,11 +218,11 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     select
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach collection="selective" item="column" separator=",">
           ${column.aliasedEscapedColumnName}
         </foreach>
@@ -240,7 +241,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     delete from edit_book
     where id = #{id,jdbcType=BIGINT}
@@ -250,7 +251,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     delete from edit_book
     <if test="_parameter != null">
@@ -261,24 +262,24 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     insert into edit_book (id, book_id, chapter_name, 
-      create_time, update_time, content
-      )
+      create_time, update_time, chapter_id, 
+      content)
     values (#{id,jdbcType=BIGINT}, #{bookId,jdbcType=BIGINT}, #{chapterName,jdbcType=VARCHAR}, 
-      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{content,jdbcType=LONGVARCHAR}
-      )
+      #{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, #{chapterId,jdbcType=BIGINT}, 
+      #{content,jdbcType=LONGVARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="map">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     insert into edit_book
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach close=")" collection="selective" item="column" open="(" separator=",">
           ${column.escapedColumnName}
         </foreach>
@@ -300,6 +301,9 @@
           <if test="record.updateTime != null">
             update_time,
           </if>
+          <if test="record.chapterId != null">
+            chapter_id,
+          </if>
           <if test="record.content != null">
             content,
           </if>
@@ -309,7 +313,7 @@
     </choose>
     values
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach close=")" collection="selective" item="column" open="(" separator=",">
           #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
         </foreach>
@@ -326,10 +330,13 @@
             #{record.chapterName,jdbcType=VARCHAR},
           </if>
           <if test="record.createTime != null">
-            #{record.createTime,jdbcType=TIMESTAMP},
+            #{record.createTime,jdbcType=INTEGER},
           </if>
           <if test="record.updateTime != null">
-            #{record.updateTime,jdbcType=TIMESTAMP},
+            #{record.updateTime,jdbcType=INTEGER},
+          </if>
+          <if test="record.chapterId != null">
+            #{record.chapterId,jdbcType=BIGINT},
           </if>
           <if test="record.content != null">
             #{record.content,jdbcType=LONGVARCHAR},
@@ -342,7 +349,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     select count(*) from edit_book
     <if test="_parameter != null">
@@ -353,12 +360,12 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     update edit_book
     SET
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach collection="selective" item="column" separator=",">
           ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
         </foreach>
@@ -375,10 +382,13 @@
             chapter_name = #{record.chapterName,jdbcType=VARCHAR},
           </if>
           <if test="record.createTime != null">
-            create_time = #{record.createTime,jdbcType=TIMESTAMP},
+            create_time = #{record.createTime,jdbcType=INTEGER},
           </if>
           <if test="record.updateTime != null">
-            update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+            update_time = #{record.updateTime,jdbcType=INTEGER},
+          </if>
+          <if test="record.chapterId != null">
+            chapter_id = #{record.chapterId,jdbcType=BIGINT},
           </if>
           <if test="record.content != null">
             content = #{record.content,jdbcType=LONGVARCHAR},
@@ -394,14 +404,15 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     update edit_book
     set id = #{record.id,jdbcType=BIGINT},
       book_id = #{record.bookId,jdbcType=BIGINT},
       chapter_name = #{record.chapterName,jdbcType=VARCHAR},
-      create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      create_time = #{record.createTime,jdbcType=INTEGER},
+      update_time = #{record.updateTime,jdbcType=INTEGER},
+      chapter_id = #{record.chapterId,jdbcType=BIGINT},
       content = #{record.content,jdbcType=LONGVARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -411,14 +422,15 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     update edit_book
     set id = #{record.id,jdbcType=BIGINT},
       book_id = #{record.bookId,jdbcType=BIGINT},
       chapter_name = #{record.chapterName,jdbcType=VARCHAR},
-      create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
+      create_time = #{record.createTime,jdbcType=INTEGER},
+      update_time = #{record.updateTime,jdbcType=INTEGER},
+      chapter_id = #{record.chapterId,jdbcType=BIGINT}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -427,12 +439,12 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     update edit_book
     SET
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach collection="selective" item="column" separator=",">
           ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
         </foreach>
@@ -443,10 +455,13 @@
             chapter_name = #{record.chapterName,jdbcType=VARCHAR},
           </if>
           <if test="record.createTime != null">
-            create_time = #{record.createTime,jdbcType=TIMESTAMP},
+            create_time = #{record.createTime,jdbcType=INTEGER},
           </if>
           <if test="record.updateTime != null">
-            update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+            update_time = #{record.updateTime,jdbcType=INTEGER},
+          </if>
+          <if test="record.chapterId != null">
+            chapter_id = #{record.chapterId,jdbcType=BIGINT},
           </if>
           <if test="record.content != null">
             content = #{record.content,jdbcType=LONGVARCHAR},
@@ -461,12 +476,13 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     update edit_book
     set chapter_name = #{chapterName,jdbcType=VARCHAR},
-      create_time = #{createTime,jdbcType=TIMESTAMP},
-      update_time = #{updateTime,jdbcType=TIMESTAMP},
+      create_time = #{createTime,jdbcType=INTEGER},
+      update_time = #{updateTime,jdbcType=INTEGER},
+      chapter_id = #{chapterId,jdbcType=BIGINT},
       content = #{content,jdbcType=LONGVARCHAR}
     where id = #{id,jdbcType=BIGINT}
       and book_id = #{bookId,jdbcType=BIGINT}
@@ -475,12 +491,13 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     update edit_book
     set chapter_name = #{chapterName,jdbcType=VARCHAR},
-      create_time = #{createTime,jdbcType=TIMESTAMP},
-      update_time = #{updateTime,jdbcType=TIMESTAMP}
+      create_time = #{createTime,jdbcType=INTEGER},
+      update_time = #{updateTime,jdbcType=INTEGER},
+      chapter_id = #{chapterId,jdbcType=BIGINT}
     where id = #{id,jdbcType=BIGINT}
       and book_id = #{bookId,jdbcType=BIGINT}
   </update>
@@ -488,7 +505,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     select
     <include refid="Base_Column_List" />
@@ -505,7 +522,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     select
     <include refid="Base_Column_List" />
@@ -524,11 +541,11 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     select
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach collection="selective" item="column" separator=",">
           ${column.aliasedEscapedColumnName}
         </foreach>
@@ -552,22 +569,22 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     insert into edit_book
-    (id, book_id, chapter_name, create_time, update_time, content)
+    (id, book_id, chapter_name, create_time, update_time, chapter_id, content)
     values
     <foreach collection="list" item="item" separator=",">
       (#{item.id,jdbcType=BIGINT}, #{item.bookId,jdbcType=BIGINT}, #{item.chapterName,jdbcType=VARCHAR}, 
-        #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.content,jdbcType=LONGVARCHAR}
-        )
+        #{item.createTime,jdbcType=INTEGER}, #{item.updateTime,jdbcType=INTEGER}, #{item.chapterId,jdbcType=BIGINT}, 
+        #{item.content,jdbcType=LONGVARCHAR})
     </foreach>
   </insert>
   <insert id="batchInsertSelective" parameterType="map">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     insert into edit_book (
     <foreach collection="selective" item="column" separator=",">
@@ -588,10 +605,13 @@
           #{item.chapterName,jdbcType=VARCHAR}
         </if>
         <if test="'create_time'.toString() == column.value">
-          #{item.createTime,jdbcType=TIMESTAMP}
+          #{item.createTime,jdbcType=INTEGER}
         </if>
         <if test="'update_time'.toString() == column.value">
-          #{item.updateTime,jdbcType=TIMESTAMP}
+          #{item.updateTime,jdbcType=INTEGER}
+        </if>
+        <if test="'chapter_id'.toString() == column.value">
+          #{item.chapterId,jdbcType=BIGINT}
         </if>
         <if test="'content'.toString() == column.value">
           #{item.content,jdbcType=LONGVARCHAR}
@@ -604,11 +624,11 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     insert into edit_book
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach close=")" collection="selective" item="column" open="(" separator=",">
           ${column.escapedColumnName}
         </foreach>
@@ -630,6 +650,9 @@
           <if test="record.updateTime != null">
             update_time,
           </if>
+          <if test="record.chapterId != null">
+            chapter_id,
+          </if>
           <if test="record.content != null">
             content,
           </if>
@@ -639,7 +662,7 @@
     </choose>
     values
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach close=")" collection="selective" item="column" open="(" separator=",">
           #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
         </foreach>
@@ -656,10 +679,13 @@
             #{record.chapterName,jdbcType=VARCHAR},
           </if>
           <if test="record.createTime != null">
-            #{record.createTime,jdbcType=TIMESTAMP},
+            #{record.createTime,jdbcType=INTEGER},
           </if>
           <if test="record.updateTime != null">
-            #{record.updateTime,jdbcType=TIMESTAMP},
+            #{record.updateTime,jdbcType=INTEGER},
+          </if>
+          <if test="record.chapterId != null">
+            #{record.chapterId,jdbcType=BIGINT},
           </if>
           <if test="record.content != null">
             #{record.content,jdbcType=LONGVARCHAR},
@@ -669,7 +695,7 @@
     </choose>
     on duplicate key update 
     <choose>
-      <when test="selective != null and selective.length > 0">
+      <when test="selective != null and selective.length &gt; 0">
         <foreach collection="selective" item="column" separator=",">
           ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
         </foreach>
@@ -686,10 +712,13 @@
             chapter_name = #{record.chapterName,jdbcType=VARCHAR},
           </if>
           <if test="record.createTime != null">
-            create_time = #{record.createTime,jdbcType=TIMESTAMP},
+            create_time = #{record.createTime,jdbcType=INTEGER},
           </if>
           <if test="record.updateTime != null">
-            update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+            update_time = #{record.updateTime,jdbcType=INTEGER},
+          </if>
+          <if test="record.chapterId != null">
+            chapter_id = #{record.chapterId,jdbcType=BIGINT},
           </if>
           <if test="record.content != null">
             content = #{record.content,jdbcType=LONGVARCHAR},
@@ -702,38 +731,41 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     insert into edit_book
-    (id, book_id, chapter_name, create_time, update_time)
+    (id, book_id, chapter_name, create_time, update_time, chapter_id)
     values
     (#{id,jdbcType=BIGINT}, #{bookId,jdbcType=BIGINT}, #{chapterName,jdbcType=VARCHAR}, 
-      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
+      #{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, #{chapterId,jdbcType=BIGINT}
+      )
     on duplicate key update 
     id = #{id,jdbcType=BIGINT}, 
     book_id = #{bookId,jdbcType=BIGINT}, 
     chapter_name = #{chapterName,jdbcType=VARCHAR}, 
-    create_time = #{createTime,jdbcType=TIMESTAMP}, 
-    update_time = #{updateTime,jdbcType=TIMESTAMP}
+    create_time = #{createTime,jdbcType=INTEGER}, 
+    update_time = #{updateTime,jdbcType=INTEGER}, 
+    chapter_id = #{chapterId,jdbcType=BIGINT}
   </insert>
   <insert id="upsertWithBLOBs" parameterType="com.book.dao.cps.entity.EditBook">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Aug 25 22:53:28 CST 2021.
+      This element was generated on Fri Aug 27 01:01:13 CST 2021.
     -->
     insert into edit_book
-    (id, book_id, chapter_name, create_time, update_time, content)
+    (id, book_id, chapter_name, create_time, update_time, chapter_id, content)
     values
     (#{id,jdbcType=BIGINT}, #{bookId,jdbcType=BIGINT}, #{chapterName,jdbcType=VARCHAR}, 
-      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{content,jdbcType=LONGVARCHAR}
-      )
+      #{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, #{chapterId,jdbcType=BIGINT}, 
+      #{content,jdbcType=LONGVARCHAR})
     on duplicate key update 
     id = #{id,jdbcType=BIGINT}, 
     book_id = #{bookId,jdbcType=BIGINT}, 
     chapter_name = #{chapterName,jdbcType=VARCHAR}, 
-    create_time = #{createTime,jdbcType=TIMESTAMP}, 
-    update_time = #{updateTime,jdbcType=TIMESTAMP}, 
+    create_time = #{createTime,jdbcType=INTEGER}, 
+    update_time = #{updateTime,jdbcType=INTEGER}, 
+    chapter_id = #{chapterId,jdbcType=BIGINT}, 
     content = #{content,jdbcType=LONGVARCHAR}
   </insert>
 </mapper>

+ 2 - 2
book-dao/src/main/resources/mybatis-generator.xml

@@ -128,8 +128,8 @@
 <!--        <table tableName="return_recommand"></table>-->
 <!--        <table tableName="bookshelf_recommand"></table>-->
 <!--        <table tableName="smart_recommand"></table>-->
-        <table tableName="upload_book"></table>
-        <!--<table tableName="edit_book"></table>-->
+<!--        <table tableName="upload_book"></table>-->
+        <table tableName="edit_book"></table>
 
     </context>
 

+ 20 - 0
book-server/src/main/java/com/book/server/controller/BookController.java

@@ -198,4 +198,24 @@ public class BookController extends BaseController {
         bookService.addFile(file,bookId);
         return Result.success("添加成功");
     }
+    /**
+     * 后台-获取章节书籍内容
+     *
+     * @param bookContentVO 书籍id,章节id
+     * @return
+     */
+    @PostMapping("/content-05863069-1AE0-435C-9283-2515A4A31BF7")
+    public Result<BookContent> getBookContentByChapter2(@RequestBody BookContentVO bookContentVO) {
+        return  bookService.getContentByContentId2(bookContentVO);
+    }
+
+    /**
+     * 后台-更新章节内容
+     * @param bookContentVO
+     * @return
+     */
+    @PostMapping("/updateContent-584CBBC1-DBD9-47A9-AAF1-EBA684B82B55")
+    public Result updateBookContent(@RequestBody BookContentVO bookContentVO) {
+        return Result.byObject(bookService.updateBookContent(bookContentVO));
+    }
 }

+ 5 - 0
book-server/src/main/java/com/book/server/service/BookService.java

@@ -1,6 +1,7 @@
 package com.book.server.service;
 
 import com.book.dao.VO.*;
+import com.book.dao.cps.pojo.Book;
 import com.book.dao.cps.pojo.SearchKeyword;
 import com.book.dao.cpsshard.entity.UserRecentlyRead;
 import com.book.server.common.entity.Result;
@@ -34,4 +35,8 @@ public interface BookService {
     List<Long> getUserConsumerChapter(BookContentVO bookContentVO);
 
     void addFile(MultipartFile file, Long id) throws IOException;
+
+    Result<BookContent> getContentByContentId2(BookContentVO bookContentVO);
+
+    Boolean updateBookContent(BookContentVO bookContentVO);
 }

+ 158 - 8
book-server/src/main/java/com/book/server/service/impl/BookServiceImpl.java

@@ -31,10 +31,12 @@ import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.annotation.PostConstruct;
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
@@ -240,7 +242,7 @@ public class BookServiceImpl implements BookService {
         }
         JsonParser parser = new JsonParser();
         JsonArray jsonArray = parser.parse(result).getAsJsonArray();
-        Book book = bookMapper.selectByPrimaryKey(bookId);
+        Book book = getBookById(bookId);
         if (book == null) {
             return list;
         }
@@ -308,7 +310,7 @@ public class BookServiceImpl implements BookService {
     @Override
     public Result<BookContent> getContentByContentId(BookContentVO bookContentVO) {
         BookContent content = null;
-        Book book = bookMapper.selectByPrimaryKey(bookContentVO.getBookId());
+        Book book = getBookById(bookContentVO.getBookId());
         //是否是付费章节
         Integer freeChapterNum = book.getFreeChapterNum();
         if (freeChapterNum == null) { //查看默认配置
@@ -323,7 +325,7 @@ public class BookServiceImpl implements BookService {
                     .example()
             );
             if (consume == null) { // 没有购买记录
-                User user = userMapper.selectByPrimaryKey(bookContentVO.getUserId());
+                User user = getUserById(bookContentVO.getUserId());
                 //查询免费看点
                 RechargeExample example = RechargeExample.newAndCreateCriteria()
                         .andUserIdEqualTo(bookContentVO.getUserId())
@@ -354,6 +356,7 @@ public class BookServiceImpl implements BookService {
                     // 更新免费看点到 user
                     int i = userMapper.updateUserKandian(user, user.getKandian(), freeCount - book.getPrice(), DateUtils.getNow());
                     checkUpdate(i);
+                    updateUserById(user.getId());
 
                 } else if (user.getKandian() + freeCount > book.getPrice()) { //免费+充值足够
                     Integer left = user.getKandian() + freeCount;
@@ -372,6 +375,7 @@ public class BookServiceImpl implements BookService {
                     // 更新到 user
                     int i = userMapper.updateUserKandian(user, kandian, 0, DateUtils.getNow());
                     checkUpdate(i);
+                    updateUserById(user.getId());
 
                 } else {
                     return Result.failure(ResultCode.NOMONEY);
@@ -380,11 +384,7 @@ public class BookServiceImpl implements BookService {
 
         }
         //获取章节内容
-        if (bookContentVO.getBookId() > 110_0000 && bookContentVO.getBookId() < 110_9999) {
-            // 自定义的书籍 TODO
-        } else {
-            content = getBookContentFromRemote(bookContentVO);
-        }
+        content = getBookContent(bookContentVO);
         // 添加到阅读记录
         if (content != null) {
             //之前是否读过
@@ -420,6 +420,22 @@ public class BookServiceImpl implements BookService {
         return Result.byObject(content);
     }
 
+    private BookContent getBookContent(BookContentVO bookContentVO) {
+        BookContent bookContent;
+        String content = getEditBookContentById(bookContentVO.getBookId(), bookContentVO.getContentId());
+        if (content != null) {
+            return getBookContentFromVO(bookContentVO, content);
+        }
+
+        if (bookContentVO.getBookId() > 110_0000 && bookContentVO.getBookId() < 110_9999) {
+            // 自定义的书籍
+            bookContent = getBookContentFromDB(bookContentVO);
+        } else {
+            bookContent = getBookContentFromRemote(bookContentVO);
+        }
+        return bookContent;
+    }
+
     private void checkUpdate(int i) {
         if (i <= 0) {
             throw new RuntimeException("请稍后重试");
@@ -665,9 +681,73 @@ public class BookServiceImpl implements BookService {
 
     }
 
+    @Override
+    public Result<BookContent> getContentByContentId2(BookContentVO bookContentVO) {
+        BookContent content = getBookContent(bookContentVO);
+        return Result.byObject(content);
+    }
+
+    @Autowired
+    private EditBookMapper editBookMapper;
+
+    @Override
+    public Boolean updateBookContent(BookContentVO bookContentVO) {
+        int i = editBookMapper.updateByExampleSelective(
+                EditBook.builder()
+                        .content(bookContentVO.getContent())
+                        .updateTime(DateUtils.getNow())
+                        .build()
+                , EditBookExample.newAndCreateCriteria()
+                        .andBookIdEqualTo(bookContentVO.getBookId())
+                        .andChapterIdEqualTo(bookContentVO.getContentId())
+                        .example()
+                , EditBook.Column.content, EditBook.Column.updateTime
+        );
+        if (i < 0) {
+            int insert = editBookMapper.insert(EditBook.builder()
+                    .bookId(bookContentVO.getBookId())
+                    .chapterId(bookContentVO.getContentId())
+                    .chapterName(bookContentVO.getContentName())
+                    .content(bookContentVO.getContent())
+                    .createTime(DateUtils.getNow())
+                    .updateTime(DateUtils.getNow())
+                    .build());
+            return insert > 0;
+        }
+        updateEditBookById(bookContentVO.getBookId(), bookContentVO.getContentId());
+        return true;
+    }
+
+    private BookContent getBookContentFromDB(BookContentVO bookContentVO) {
+        UploadBook uploadBook = uploadBookMapper.selectOneByExampleSelective(UploadBookExample.newAndCreateCriteria()
+                .andBookIdEqualTo(bookContentVO.getBookId())
+                .andChapterIdEqualTo(bookContentVO.getContentId())
+                .example(), UploadBook.Column.content);
+        if (uploadBook == null) {
+            return null;
+        } else {
+            return getBookContentFromVO(bookContentVO, uploadBook.getContent());
+        }
+    }
+
+    private BookContent getBookContentFromVO(BookContentVO bookContentVO, String content) {
+        BookContent bookContent = new BookContent();
+        bookContent.setBookId(bookContentVO.getBookId() + "");
+        bookContent.setChapterId(bookContentVO.getContentId() + "");
+        bookContent.setName(bookContentVO.getContentName());
+        bookContent.setContent(content);
+        return bookContent;
+    }
+
+
     @Autowired
     private RedisUtil redisUtil;
 
+    /**
+     * 获取默认免费章节数
+     *
+     * @return
+     */
     public int getDefaultFreeChapterNum() {
         String key = "defaultFreeChapterNum";
         Object o = redisUtil.get(key);
@@ -680,6 +760,76 @@ public class BookServiceImpl implements BookService {
         }
     }
 
+    public Book getBookById(Long id) {
+        String key = "book" + id;
+        Object o = redisUtil.get(key);
+        if (o == null) {
+            return updateBookByIdToRedis(id);
+        } else {
+            return (Book) o;
+        }
+    }
+
+    public Book updateBookByIdToRedis(Long id) {
+        String key = "book" + id;
+        Book obj = bookMapper.selectByPrimaryKey(id);
+        redisUtil.set(key, obj, 15, TimeUnit.MINUTES);
+        return obj;
+    }
+
+    public User getUserById(Long id) {
+        String key = "user" + id;
+        Object o = redisUtil.get(key);
+        if (o == null) {
+            return updateUserById(id);
+        } else {
+            return (User) o;
+        }
+    }
+
+    public User updateUserById(Long id) {
+        String key = "user" + id;
+        User obj = userMapper.selectByPrimaryKey(id);
+        redisUtil.set(key, obj, 30, TimeUnit.MINUTES);
+        return obj;
+    }
+
+    @Autowired
+    private RedisTemplate redisTemplate;
+
+    public String getEditBookContentById(Long bookId, Long chapterId) {
+        String key = "edit_book" + bookId + chapterId;
+        Object o = redisUtil.get(key);
+        if (o == null) {
+            return null;
+        } else {
+            return (String) o;
+        }
+    }
+
+    public EditBook updateEditBookById(Long bookId, Long chapterId) {
+        String key = "edit_book" + bookId + chapterId;
+        EditBook obj = editBookMapper.selectOneByExampleSelective(
+                EditBookExample.newAndCreateCriteria()
+                        .andBookIdEqualTo(bookId)
+                        .andChapterIdEqualTo(chapterId)
+                        .example(),
+                EditBook.Column.content
+        );
+        redisUtil.set(key, obj);
+        return obj;
+    }
+
+    @PostConstruct
+    public void initUpdateEditBookIds() {
+        List<EditBook> editBooks = editBookMapper.selectByExampleSelective(EditBookExample.newAndCreateCriteria().example(),
+                EditBook.Column.bookId, EditBook.Column.chapterId, EditBook.Column.content);
+        editBooks.forEach(x -> {
+            String key = "edit_book" + x.getBookId() + x.getChapterId();
+            redisUtil.set(key, x.getContent());
+        });
+    }
+
     private List<BookRes> getRandom(List<BookRes> bookRes) {
         if (bookRes.size() <= 4) {
             return bookRes;