Переглянути джерело

- 添加书籍上传接口、编辑章节类,还未完成
- 添加缓存工具类

tianyunperfect 3 роки тому
батько
коміт
40f4a9f6ff

+ 1 - 1
bin/boot.sh

@@ -80,7 +80,7 @@ start() {
     echo "${APP_NAME} is already running, PID=${PID}"
   else
 #    nohup java -jar $JAVA_OPTS ${APP_NAME} >>${STDOUT_FILE} 2>&1 &
-    nohup java -jar ${APP_NAME} >>${STDOUT_FILE} 2>&1 &
+    nohup java -jar ${APP_NAME} -Djava.io.tmpdir=./ >>${STDOUT_FILE} 2>&1 &
     PID=$(echo $!)
     echo "${APP_NAME} start success, PID=$!"
   fi

+ 380 - 0
book-dao/src/main/java/com/book/dao/cps/entity/EditBook.java

@@ -0,0 +1,380 @@
+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
+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
+     */
+    private Long id;
+
+    /**
+     *
+     * 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
+     */
+    private Long bookId;
+
+    /**
+     *
+     * 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
+     */
+    private String chapterName;
+
+    /**
+     *
+     * 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
+     */
+    private Date 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
+     */
+    private Date updateTime;
+
+    /**
+     *
+     * 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
+     */
+    private String content;
+
+    /**
+     * 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
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 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
+     */
+    public static EditBook.Builder builder() {
+        return new EditBook.Builder();
+    }
+
+    /**
+     * 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
+     */
+    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
+         */
+        private EditBook obj;
+
+        /**
+         * 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
+         */
+        public Builder() {
+            this.obj = new EditBook();
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column edit_book.id
+         *
+         * @param id the value for edit_book.id
+         *
+         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         */
+        public Builder id(Long id) {
+            obj.setId(id);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column edit_book.book_id
+         *
+         * @param bookId the value for edit_book.book_id
+         *
+         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         */
+        public Builder bookId(Long bookId) {
+            obj.setBookId(bookId);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column edit_book.chapter_name
+         *
+         * @param chapterName the value for edit_book.chapter_name
+         *
+         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         */
+        public Builder chapterName(String chapterName) {
+            obj.setChapterName(chapterName);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column edit_book.create_time
+         *
+         * @param createTime the value for edit_book.create_time
+         *
+         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         */
+        public Builder createTime(Date createTime) {
+            obj.setCreateTime(createTime);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column edit_book.update_time
+         *
+         * @param updateTime the value for edit_book.update_time
+         *
+         * @mbg.generated Wed Aug 25 22:53:28 CST 2021
+         */
+        public Builder updateTime(Date updateTime) {
+            obj.setUpdateTime(updateTime);
+            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
+         */
+        public Builder content(String content) {
+            obj.setContent(content);
+            return this;
+        }
+
+        /**
+         * 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
+         */
+        public EditBook build() {
+            return this.obj;
+        }
+    }
+
+    /**
+     * 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
+     */
+    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),
+        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
+         */
+        private static final String BEGINNING_DELIMITER = "\"";
+
+        /**
+         * 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
+         */
+        private static final String ENDING_DELIMITER = "\"";
+
+        /**
+         * 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
+         */
+        private final String column;
+
+        /**
+         * 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
+         */
+        private final boolean isColumnNameDelimited;
+
+        /**
+         * 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
+         */
+        private final String javaProperty;
+
+        /**
+         * 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
+         */
+        private final String jdbcType;
+
+        /**
+         * 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
+         */
+        public String value() {
+            return this.column;
+        }
+
+        /**
+         * 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
+         */
+        public String getValue() {
+            return this.column;
+        }
+
+        /**
+         * 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
+         */
+        public String getJavaProperty() {
+            return this.javaProperty;
+        }
+
+        /**
+         * 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
+         */
+        public String getJdbcType() {
+            return this.jdbcType;
+        }
+
+        /**
+         * 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
+         */
+        Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
+            this.column = column;
+            this.javaProperty = javaProperty;
+            this.jdbcType = jdbcType;
+            this.isColumnNameDelimited = isColumnNameDelimited;
+        }
+
+        /**
+         * 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
+         */
+        public String desc() {
+            return this.getEscapedColumnName() + " DESC";
+        }
+
+        /**
+         * 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
+         */
+        public String asc() {
+            return this.getEscapedColumnName() + " ASC";
+        }
+
+        /**
+         * 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
+         */
+        public static Column[] excludes(Column ... excludes) {
+            ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
+            if (excludes != null && excludes.length > 0) {
+                columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
+            }
+            return columns.toArray(new Column[]{});
+        }
+
+        /**
+         * 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
+         */
+        public static Column[] all() {
+            return Column.values();
+        }
+
+        /**
+         * 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
+         */
+        public String getEscapedColumnName() {
+            if (this.isColumnNameDelimited) {
+                return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
+            } else {
+                return this.column;
+            }
+        }
+
+        /**
+         * 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
+         */
+        public String getAliasedEscapedColumnName() {
+            return this.getEscapedColumnName();
+        }
+    }
+}

+ 426 - 0
book-dao/src/main/java/com/book/dao/cps/entity/UploadBook.java

@@ -0,0 +1,426 @@
+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
+public class UploadBook implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column upload_book.id
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    private Long id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column upload_book.book_id
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    private Long bookId;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column upload_book.chapter_name
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    private String chapterName;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column upload_book.create_time
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    private Date createTime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column upload_book.update_time
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    private Date updateTime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column upload_book.words
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    private Integer words;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column upload_book.is_pay
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    private Integer isPay;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column upload_book.content
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    private String content;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    public static UploadBook.Builder builder() {
+        return new UploadBook.Builder();
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    public static class Builder {
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        private UploadBook obj;
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        public Builder() {
+            this.obj = new UploadBook();
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column upload_book.id
+         *
+         * @param id the value for upload_book.id
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        public Builder id(Long id) {
+            obj.setId(id);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column upload_book.book_id
+         *
+         * @param bookId the value for upload_book.book_id
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        public Builder bookId(Long bookId) {
+            obj.setBookId(bookId);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column upload_book.chapter_name
+         *
+         * @param chapterName the value for upload_book.chapter_name
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        public Builder chapterName(String chapterName) {
+            obj.setChapterName(chapterName);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column upload_book.create_time
+         *
+         * @param createTime the value for upload_book.create_time
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        public Builder createTime(Date createTime) {
+            obj.setCreateTime(createTime);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column upload_book.update_time
+         *
+         * @param updateTime the value for upload_book.update_time
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        public Builder updateTime(Date updateTime) {
+            obj.setUpdateTime(updateTime);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column upload_book.words
+         *
+         * @param words the value for upload_book.words
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        public Builder words(Integer words) {
+            obj.setWords(words);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column upload_book.is_pay
+         *
+         * @param isPay the value for upload_book.is_pay
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        public Builder isPay(Integer isPay) {
+            obj.setIsPay(isPay);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column upload_book.content
+         *
+         * @param content the value for upload_book.content
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        public Builder content(String content) {
+            obj.setContent(content);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        public UploadBook build() {
+            return this.obj;
+        }
+    }
+
+    /**
+     * This enum was generated by MyBatis Generator.
+     * This enum corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 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),
+        words("words", "words", "INTEGER", false),
+        isPay("is_pay", "isPay", "INTEGER", false),
+        content("content", "content", "LONGVARCHAR", false);
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        private static final String BEGINNING_DELIMITER = "\"";
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        private static final String ENDING_DELIMITER = "\"";
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        private final String column;
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        private final boolean isColumnNameDelimited;
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        private final String javaProperty;
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        private final String jdbcType;
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        public String value() {
+            return this.column;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        public String getValue() {
+            return this.column;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        public String getJavaProperty() {
+            return this.javaProperty;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        public String getJdbcType() {
+            return this.jdbcType;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
+            this.column = column;
+            this.javaProperty = javaProperty;
+            this.jdbcType = jdbcType;
+            this.isColumnNameDelimited = isColumnNameDelimited;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        public String desc() {
+            return this.getEscapedColumnName() + " DESC";
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        public String asc() {
+            return this.getEscapedColumnName() + " ASC";
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        public static Column[] excludes(Column ... excludes) {
+            ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
+            if (excludes != null && excludes.length > 0) {
+                columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
+            }
+            return columns.toArray(new Column[]{});
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        public static Column[] all() {
+            return Column.values();
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        public String getEscapedColumnName() {
+            if (this.isColumnNameDelimited) {
+                return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
+            } else {
+                return this.column;
+            }
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        public String getAliasedEscapedColumnName() {
+            return this.getEscapedColumnName();
+        }
+    }
+}

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

@@ -0,0 +1,204 @@
+package com.book.dao.cps.mapper;
+
+import com.book.dao.cps.entity.EditBook;
+import com.book.dao.cps.pojo.example.EditBookExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+@Mapper
+@Repository
+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
+     */
+    long countByExample(EditBookExample example);
+
+    /**
+     * 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
+     */
+    int deleteByExample(EditBookExample example);
+
+    /**
+     * 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
+     */
+    int deleteByPrimaryKey(@Param("id") Long id, @Param("bookId") Long bookId);
+
+    /**
+     * 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
+     */
+    int insert(EditBook record);
+
+    /**
+     * 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
+     */
+    int insertSelective(@Param("record") EditBook record, @Param("selective") EditBook.Column ... selective);
+
+    /**
+     * 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
+     */
+    EditBook selectOneByExample(EditBookExample example);
+
+    /**
+     * 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
+     */
+    EditBook selectOneByExampleSelective(@Param("example") EditBookExample example, @Param("selective") EditBook.Column ... selective);
+
+    /**
+     * 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
+     */
+    EditBook selectOneByExampleWithBLOBs(EditBookExample example);
+
+    /**
+     * 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
+     */
+    List<EditBook> selectByExampleSelective(@Param("example") EditBookExample example, @Param("selective") EditBook.Column ... selective);
+
+    /**
+     * 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
+     */
+    List<EditBook> selectByExampleWithBLOBs(EditBookExample example);
+
+    /**
+     * 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
+     */
+    List<EditBook> selectByExample(EditBookExample example);
+
+    /**
+     * 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
+     */
+    EditBook selectByPrimaryKeySelective(@Param("id") Long id, @Param("bookId") Long bookId, @Param("selective") EditBook.Column ... selective);
+
+    /**
+     * 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
+     */
+    EditBook selectByPrimaryKey(@Param("id") Long id, @Param("bookId") Long bookId);
+
+    /**
+     * 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
+     */
+    int updateByExampleSelective(@Param("record") EditBook record, @Param("example") EditBookExample example, @Param("selective") EditBook.Column ... selective);
+
+    /**
+     * 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
+     */
+    int updateByExampleWithBLOBs(@Param("record") EditBook record, @Param("example") EditBookExample example);
+
+    /**
+     * 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
+     */
+    int updateByExample(@Param("record") EditBook record, @Param("example") EditBookExample example);
+
+    /**
+     * 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
+     */
+    int updateByPrimaryKeySelective(@Param("record") EditBook record, @Param("selective") EditBook.Column ... selective);
+
+    /**
+     * 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
+     */
+    int updateByPrimaryKeyWithBLOBs(EditBook record);
+
+    /**
+     * 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
+     */
+    int updateByPrimaryKey(EditBook record);
+
+    /**
+     * 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
+     */
+    int batchInsert(@Param("list") List<EditBook> list);
+
+    /**
+     * 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
+     */
+    int batchInsertSelective(@Param("list") List<EditBook> list, @Param("selective") EditBook.Column ... selective);
+
+    /**
+     * 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
+     */
+    int upsert(EditBook record);
+
+    /**
+     * 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
+     */
+    int upsertSelective(@Param("record") EditBook record, @Param("selective") EditBook.Column ... selective);
+
+    /**
+     * 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
+     */
+    int upsertWithBLOBs(EditBook record);
+}

+ 204 - 0
book-dao/src/main/java/com/book/dao/cps/mapper/UploadBookMapper.java

@@ -0,0 +1,204 @@
+package com.book.dao.cps.mapper;
+
+import com.book.dao.cps.entity.UploadBook;
+import com.book.dao.cps.pojo.example.UploadBookExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+@Mapper
+@Repository
+public interface UploadBookMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    long countByExample(UploadBookExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    int deleteByExample(UploadBookExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    int deleteByPrimaryKey(@Param("id") Long id, @Param("bookId") Long bookId);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    int insert(UploadBook record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    int insertSelective(@Param("record") UploadBook record, @Param("selective") UploadBook.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    UploadBook selectOneByExample(UploadBookExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    UploadBook selectOneByExampleSelective(@Param("example") UploadBookExample example, @Param("selective") UploadBook.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    UploadBook selectOneByExampleWithBLOBs(UploadBookExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    List<UploadBook> selectByExampleSelective(@Param("example") UploadBookExample example, @Param("selective") UploadBook.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    List<UploadBook> selectByExampleWithBLOBs(UploadBookExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    List<UploadBook> selectByExample(UploadBookExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    UploadBook selectByPrimaryKeySelective(@Param("id") Long id, @Param("bookId") Long bookId, @Param("selective") UploadBook.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    UploadBook selectByPrimaryKey(@Param("id") Long id, @Param("bookId") Long bookId);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    int updateByExampleSelective(@Param("record") UploadBook record, @Param("example") UploadBookExample example, @Param("selective") UploadBook.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    int updateByExampleWithBLOBs(@Param("record") UploadBook record, @Param("example") UploadBookExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    int updateByExample(@Param("record") UploadBook record, @Param("example") UploadBookExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    int updateByPrimaryKeySelective(@Param("record") UploadBook record, @Param("selective") UploadBook.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    int updateByPrimaryKeyWithBLOBs(UploadBook record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    int updateByPrimaryKey(UploadBook record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    int batchInsert(@Param("list") List<UploadBook> list);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    int batchInsertSelective(@Param("list") List<UploadBook> list, @Param("selective") UploadBook.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    int upsert(UploadBook record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    int upsertSelective(@Param("record") UploadBook record, @Param("selective") UploadBook.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    int upsertWithBLOBs(UploadBook record);
+}

+ 1022 - 0
book-dao/src/main/java/com/book/dao/cps/pojo/example/EditBookExample.java

@@ -0,0 +1,1022 @@
+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 {
+    /**
+     * 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
+     */
+    protected String orderByClause;
+
+    /**
+     * 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
+     */
+    protected boolean distinct;
+
+    /**
+     * 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
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * 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
+     */
+    protected Integer offset;
+
+    /**
+     * 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
+     */
+    protected Integer rows;
+
+    /**
+     * 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
+     */
+    public EditBookExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * 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
+     */
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    /**
+     * 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
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * 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
+     */
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    /**
+     * 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
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * 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
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * 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
+     */
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    /**
+     * 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
+     */
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    /**
+     * 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
+     */
+    public EditBookExample orderBy(String orderByClause) {
+        this.setOrderByClause(orderByClause);
+        return this;
+    }
+
+    /**
+     * 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
+     */
+    public EditBookExample orderBy(String ... orderByClauses) {
+        StringBuffer sb = new StringBuffer();
+        for (int i = 0; i < orderByClauses.length; i++) {
+            sb.append(orderByClauses[i]);
+            if (i < orderByClauses.length - 1) {
+                sb.append(" , ");
+            }
+        }
+        this.setOrderByClause(sb.toString());
+        return this;
+    }
+
+    /**
+     * 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
+     */
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    /**
+     * 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
+     */
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria(this);
+        return criteria;
+    }
+
+    /**
+     * 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
+     */
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+        rows = null;
+        offset = null;
+    }
+
+    /**
+     * 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
+     */
+    public void setOffset(Integer offset) {
+        this.offset = offset;
+    }
+
+    /**
+     * 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
+     */
+    public Integer getOffset() {
+        return this.offset;
+    }
+
+    /**
+     * 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
+     */
+    public void setRows(Integer rows) {
+        this.rows = rows;
+    }
+
+    /**
+     * 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
+     */
+    public Integer getRows() {
+        return this.rows;
+    }
+
+    /**
+     * 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
+     */
+    public EditBookExample limit(Integer rows) {
+        this.rows = rows;
+        return this;
+    }
+
+    /**
+     * 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
+     */
+    public EditBookExample limit(Integer offset, Integer rows) {
+        this.offset = offset;
+        this.rows = rows;
+        return this;
+    }
+
+    /**
+     * 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
+     */
+    public EditBookExample page(Integer page, Integer pageSize) {
+        this.offset = page * pageSize;
+        this.rows = pageSize;
+        return this;
+    }
+
+    /**
+     * 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
+     */
+    public static Criteria newAndCreateCriteria() {
+        EditBookExample example = new EditBookExample();
+        return example.createCriteria();
+    }
+
+    /**
+     * 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
+     */
+    public EditBookExample when(boolean condition, IExampleWhen then) {
+        if (condition) {
+            then.example(this);
+        }
+        return this;
+    }
+
+    /**
+     * 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
+     */
+    public EditBookExample when(boolean condition, IExampleWhen then, IExampleWhen otherwise) {
+        if (condition) {
+            then.example(this);
+        } else {
+            otherwise.example(this);
+        }
+        return this;
+    }
+
+    /**
+     * 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
+     */
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualToColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("id = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualToColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("id <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("id > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualToColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("id >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("id < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualToColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("id <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdIsNull() {
+            addCriterion("book_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdIsNotNull() {
+            addCriterion("book_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdEqualTo(Long value) {
+            addCriterion("book_id =", value, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdEqualToColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("book_id = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdNotEqualTo(Long value) {
+            addCriterion("book_id <>", value, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdNotEqualToColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("book_id <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdGreaterThan(Long value) {
+            addCriterion("book_id >", value, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdGreaterThanColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("book_id > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("book_id >=", value, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdGreaterThanOrEqualToColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("book_id >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdLessThan(Long value) {
+            addCriterion("book_id <", value, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdLessThanColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("book_id < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdLessThanOrEqualTo(Long value) {
+            addCriterion("book_id <=", value, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdLessThanOrEqualToColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("book_id <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdIn(List<Long> values) {
+            addCriterion("book_id in", values, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdNotIn(List<Long> values) {
+            addCriterion("book_id not in", values, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdBetween(Long value1, Long value2) {
+            addCriterion("book_id between", value1, value2, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdNotBetween(Long value1, Long value2) {
+            addCriterion("book_id not between", value1, value2, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameIsNull() {
+            addCriterion("chapter_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameIsNotNull() {
+            addCriterion("chapter_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameEqualTo(String value) {
+            addCriterion("chapter_name =", value, "chapterName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameEqualToColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("chapter_name = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameNotEqualTo(String value) {
+            addCriterion("chapter_name <>", value, "chapterName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameNotEqualToColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("chapter_name <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameGreaterThan(String value) {
+            addCriterion("chapter_name >", value, "chapterName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameGreaterThanColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("chapter_name > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameGreaterThanOrEqualTo(String value) {
+            addCriterion("chapter_name >=", value, "chapterName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameGreaterThanOrEqualToColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("chapter_name >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameLessThan(String value) {
+            addCriterion("chapter_name <", value, "chapterName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameLessThanColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("chapter_name < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameLessThanOrEqualTo(String value) {
+            addCriterion("chapter_name <=", value, "chapterName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameLessThanOrEqualToColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("chapter_name <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameLike(String value) {
+            addCriterion("chapter_name like", value, "chapterName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameNotLike(String value) {
+            addCriterion("chapter_name not like", value, "chapterName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameIn(List<String> values) {
+            addCriterion("chapter_name in", values, "chapterName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameNotIn(List<String> values) {
+            addCriterion("chapter_name not in", values, "chapterName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameBetween(String value1, String value2) {
+            addCriterion("chapter_name between", value1, value2, "chapterName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameNotBetween(String value1, String value2) {
+            addCriterion("chapter_name not between", value1, value2, "chapterName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNull() {
+            addCriterion("create_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("create_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("create_time =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualToColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("create_time = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("create_time <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualToColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("create_time <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("create_time >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("create_time > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_time >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualToColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("create_time >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("create_time <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("create_time < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("create_time <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualToColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("create_time <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("create_time in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("create_time not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("create_time between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("create_time not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNull() {
+            addCriterion("update_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNotNull() {
+            addCriterion("update_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeEqualTo(Date value) {
+            addCriterion("update_time =", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeEqualToColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("update_time = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotEqualTo(Date value) {
+            addCriterion("update_time <>", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotEqualToColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("update_time <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThan(Date value) {
+            addCriterion("update_time >", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThanColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("update_time > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("update_time >=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThanOrEqualToColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("update_time >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThan(Date value) {
+            addCriterion("update_time <", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThanColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("update_time < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("update_time <=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThanOrEqualToColumn(EditBook.Column column) {
+            addCriterion(new StringBuilder("update_time <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIn(List<Date> values) {
+            addCriterion("update_time in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotIn(List<Date> values) {
+            addCriterion("update_time not in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
+            addCriterion("update_time between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("update_time not between", value1, value2, "updateTime");
+            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
+     */
+    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
+         */
+        private EditBookExample example;
+
+        /**
+         * 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
+         */
+        protected Criteria(EditBookExample example) {
+            super();
+            this.example = example;
+        }
+
+        /**
+         * 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
+         */
+        public EditBookExample example() {
+            return this.example;
+        }
+
+        /**
+         * 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
+         */
+        @Deprecated
+        public Criteria andIf(boolean ifAdd, ICriteriaAdd add) {
+            if (ifAdd) {
+                add.add(this);
+            }
+            return this;
+        }
+
+        /**
+         * 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
+         */
+        public Criteria when(boolean condition, ICriteriaWhen then) {
+            if (condition) {
+                then.criteria(this);
+            }
+            return this;
+        }
+
+        /**
+         * 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
+         */
+        public Criteria when(boolean condition, ICriteriaWhen then, ICriteriaWhen otherwise) {
+            if (condition) {
+                then.criteria(this);
+            } else {
+                otherwise.criteria(this);
+            }
+            return this;
+        }
+
+        @Deprecated
+        public interface ICriteriaAdd {
+            /**
+             * 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
+             */
+            Criteria add(Criteria add);
+        }
+    }
+
+    /**
+     * 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
+     */
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+
+    public interface ICriteriaWhen {
+        /**
+         * 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
+         */
+        void criteria(Criteria criteria);
+    }
+
+    public interface IExampleWhen {
+        /**
+         * 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
+         */
+        void example(com.book.dao.cps.pojo.example.EditBookExample example);
+    }
+}

+ 1202 - 0
book-dao/src/main/java/com/book/dao/cps/pojo/example/UploadBookExample.java

@@ -0,0 +1,1202 @@
+package com.book.dao.cps.pojo.example;
+
+import com.book.dao.cps.entity.UploadBook;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class UploadBookExample {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    protected String orderByClause;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    protected boolean distinct;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    protected Integer offset;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    protected Integer rows;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    public UploadBookExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    public UploadBookExample orderBy(String orderByClause) {
+        this.setOrderByClause(orderByClause);
+        return this;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    public UploadBookExample orderBy(String ... orderByClauses) {
+        StringBuffer sb = new StringBuffer();
+        for (int i = 0; i < orderByClauses.length; i++) {
+            sb.append(orderByClauses[i]);
+            if (i < orderByClauses.length - 1) {
+                sb.append(" , ");
+            }
+        }
+        this.setOrderByClause(sb.toString());
+        return this;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria(this);
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+        rows = null;
+        offset = null;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    public void setOffset(Integer offset) {
+        this.offset = offset;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    public Integer getOffset() {
+        return this.offset;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    public void setRows(Integer rows) {
+        this.rows = rows;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    public Integer getRows() {
+        return this.rows;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    public UploadBookExample limit(Integer rows) {
+        this.rows = rows;
+        return this;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    public UploadBookExample limit(Integer offset, Integer rows) {
+        this.offset = offset;
+        this.rows = rows;
+        return this;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    public UploadBookExample page(Integer page, Integer pageSize) {
+        this.offset = page * pageSize;
+        this.rows = pageSize;
+        return this;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    public static Criteria newAndCreateCriteria() {
+        UploadBookExample example = new UploadBookExample();
+        return example.createCriteria();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    public UploadBookExample when(boolean condition, IExampleWhen then) {
+        if (condition) {
+            then.example(this);
+        }
+        return this;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    public UploadBookExample when(boolean condition, IExampleWhen then, IExampleWhen otherwise) {
+        if (condition) {
+            then.example(this);
+        } else {
+            otherwise.example(this);
+        }
+        return this;
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("id = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("id <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("id > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("id >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("id < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("id <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdIsNull() {
+            addCriterion("book_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdIsNotNull() {
+            addCriterion("book_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdEqualTo(Long value) {
+            addCriterion("book_id =", value, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("book_id = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdNotEqualTo(Long value) {
+            addCriterion("book_id <>", value, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdNotEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("book_id <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdGreaterThan(Long value) {
+            addCriterion("book_id >", value, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdGreaterThanColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("book_id > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("book_id >=", value, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdGreaterThanOrEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("book_id >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdLessThan(Long value) {
+            addCriterion("book_id <", value, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdLessThanColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("book_id < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdLessThanOrEqualTo(Long value) {
+            addCriterion("book_id <=", value, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdLessThanOrEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("book_id <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdIn(List<Long> values) {
+            addCriterion("book_id in", values, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdNotIn(List<Long> values) {
+            addCriterion("book_id not in", values, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdBetween(Long value1, Long value2) {
+            addCriterion("book_id between", value1, value2, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdNotBetween(Long value1, Long value2) {
+            addCriterion("book_id not between", value1, value2, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameIsNull() {
+            addCriterion("chapter_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameIsNotNull() {
+            addCriterion("chapter_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameEqualTo(String value) {
+            addCriterion("chapter_name =", value, "chapterName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("chapter_name = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameNotEqualTo(String value) {
+            addCriterion("chapter_name <>", value, "chapterName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameNotEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("chapter_name <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameGreaterThan(String value) {
+            addCriterion("chapter_name >", value, "chapterName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameGreaterThanColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("chapter_name > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameGreaterThanOrEqualTo(String value) {
+            addCriterion("chapter_name >=", value, "chapterName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameGreaterThanOrEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("chapter_name >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameLessThan(String value) {
+            addCriterion("chapter_name <", value, "chapterName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameLessThanColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("chapter_name < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameLessThanOrEqualTo(String value) {
+            addCriterion("chapter_name <=", value, "chapterName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameLessThanOrEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("chapter_name <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameLike(String value) {
+            addCriterion("chapter_name like", value, "chapterName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameNotLike(String value) {
+            addCriterion("chapter_name not like", value, "chapterName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameIn(List<String> values) {
+            addCriterion("chapter_name in", values, "chapterName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameNotIn(List<String> values) {
+            addCriterion("chapter_name not in", values, "chapterName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameBetween(String value1, String value2) {
+            addCriterion("chapter_name between", value1, value2, "chapterName");
+            return (Criteria) this;
+        }
+
+        public Criteria andChapterNameNotBetween(String value1, String value2) {
+            addCriterion("chapter_name not between", value1, value2, "chapterName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNull() {
+            addCriterion("create_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("create_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("create_time =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("create_time = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("create_time <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("create_time <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("create_time >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("create_time > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_time >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("create_time >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("create_time <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("create_time < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("create_time <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("create_time <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("create_time in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("create_time not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("create_time between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("create_time not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNull() {
+            addCriterion("update_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNotNull() {
+            addCriterion("update_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeEqualTo(Date value) {
+            addCriterion("update_time =", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("update_time = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotEqualTo(Date value) {
+            addCriterion("update_time <>", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("update_time <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThan(Date value) {
+            addCriterion("update_time >", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThanColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("update_time > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("update_time >=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThanOrEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("update_time >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThan(Date value) {
+            addCriterion("update_time <", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThanColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("update_time < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("update_time <=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThanOrEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("update_time <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIn(List<Date> values) {
+            addCriterion("update_time in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotIn(List<Date> values) {
+            addCriterion("update_time not in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
+            addCriterion("update_time between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("update_time not between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andWordsIsNull() {
+            addCriterion("words is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWordsIsNotNull() {
+            addCriterion("words is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWordsEqualTo(Integer value) {
+            addCriterion("words =", value, "words");
+            return (Criteria) this;
+        }
+
+        public Criteria andWordsEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("words = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andWordsNotEqualTo(Integer value) {
+            addCriterion("words <>", value, "words");
+            return (Criteria) this;
+        }
+
+        public Criteria andWordsNotEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("words <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andWordsGreaterThan(Integer value) {
+            addCriterion("words >", value, "words");
+            return (Criteria) this;
+        }
+
+        public Criteria andWordsGreaterThanColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("words > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andWordsGreaterThanOrEqualTo(Integer value) {
+            addCriterion("words >=", value, "words");
+            return (Criteria) this;
+        }
+
+        public Criteria andWordsGreaterThanOrEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("words >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andWordsLessThan(Integer value) {
+            addCriterion("words <", value, "words");
+            return (Criteria) this;
+        }
+
+        public Criteria andWordsLessThanColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("words < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andWordsLessThanOrEqualTo(Integer value) {
+            addCriterion("words <=", value, "words");
+            return (Criteria) this;
+        }
+
+        public Criteria andWordsLessThanOrEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("words <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andWordsIn(List<Integer> values) {
+            addCriterion("words in", values, "words");
+            return (Criteria) this;
+        }
+
+        public Criteria andWordsNotIn(List<Integer> values) {
+            addCriterion("words not in", values, "words");
+            return (Criteria) this;
+        }
+
+        public Criteria andWordsBetween(Integer value1, Integer value2) {
+            addCriterion("words between", value1, value2, "words");
+            return (Criteria) this;
+        }
+
+        public Criteria andWordsNotBetween(Integer value1, Integer value2) {
+            addCriterion("words not between", value1, value2, "words");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsPayIsNull() {
+            addCriterion("is_pay is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsPayIsNotNull() {
+            addCriterion("is_pay is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsPayEqualTo(Integer value) {
+            addCriterion("is_pay =", value, "isPay");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsPayEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("is_pay = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIsPayNotEqualTo(Integer value) {
+            addCriterion("is_pay <>", value, "isPay");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsPayNotEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("is_pay <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIsPayGreaterThan(Integer value) {
+            addCriterion("is_pay >", value, "isPay");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsPayGreaterThanColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("is_pay > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIsPayGreaterThanOrEqualTo(Integer value) {
+            addCriterion("is_pay >=", value, "isPay");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsPayGreaterThanOrEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("is_pay >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIsPayLessThan(Integer value) {
+            addCriterion("is_pay <", value, "isPay");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsPayLessThanColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("is_pay < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIsPayLessThanOrEqualTo(Integer value) {
+            addCriterion("is_pay <=", value, "isPay");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsPayLessThanOrEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("is_pay <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIsPayIn(List<Integer> values) {
+            addCriterion("is_pay in", values, "isPay");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsPayNotIn(List<Integer> values) {
+            addCriterion("is_pay not in", values, "isPay");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsPayBetween(Integer value1, Integer value2) {
+            addCriterion("is_pay between", value1, value2, "isPay");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsPayNotBetween(Integer value1, Integer value2) {
+            addCriterion("is_pay not between", value1, value2, "isPay");
+            return (Criteria) this;
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table upload_book
+     *
+     * @mbg.generated do_not_delete_during_merge Wed Aug 25 22:46:40 CST 2021
+     */
+    public static class Criteria extends GeneratedCriteria {
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        private UploadBookExample example;
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        protected Criteria(UploadBookExample example) {
+            super();
+            this.example = example;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        public UploadBookExample example() {
+            return this.example;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        @Deprecated
+        public Criteria andIf(boolean ifAdd, ICriteriaAdd add) {
+            if (ifAdd) {
+                add.add(this);
+            }
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        public Criteria when(boolean condition, ICriteriaWhen then) {
+            if (condition) {
+                then.criteria(this);
+            }
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        public Criteria when(boolean condition, ICriteriaWhen then, ICriteriaWhen otherwise) {
+            if (condition) {
+                then.criteria(this);
+            } else {
+                otherwise.criteria(this);
+            }
+            return this;
+        }
+
+        @Deprecated
+        public interface ICriteriaAdd {
+            /**
+             * This method was generated by MyBatis Generator.
+             * This method corresponds to the database table upload_book
+             *
+             * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+             */
+            Criteria add(Criteria add);
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table upload_book
+     *
+     * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+     */
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+
+    public interface ICriteriaWhen {
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        void criteria(Criteria criteria);
+    }
+
+    public interface IExampleWhen {
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table upload_book
+         *
+         * @mbg.generated Wed Aug 25 22:46:40 CST 2021
+         */
+        void example(com.book.dao.cps.pojo.example.UploadBookExample example);
+    }
+}

+ 739 - 0
book-dao/src/main/resources/mapper/cps/EditBookMapper.xml

@@ -0,0 +1,739 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.book.dao.cps.mapper.EditBookMapper">
+  <resultMap id="BaseResultMap" 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.
+    -->
+    <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" />
+  </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.
+    -->
+    <result column="content" jdbcType="LONGVARCHAR" property="content" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      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.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      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.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_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.
+    -->
+    id, book_id, chapter_name, create_time, update_time
+  </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.
+    -->
+    content
+  </sql>
+  <select id="selectByExampleWithBLOBs" parameterType="com.book.dao.cps.pojo.example.EditBookExample" resultMap="ResultMapWithBLOBs">
+    <!--
+      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.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from edit_book
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="rows != null">
+      <if test="offset != null">
+        limit ${offset}, ${rows}
+      </if>
+      <if test="offset == null">
+        limit ${rows}
+      </if>
+    </if>
+  </select>
+  <select id="selectByExample" parameterType="com.book.dao.cps.pojo.example.EditBookExample" resultMap="BaseResultMap">
+    <!--
+      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.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from edit_book
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="rows != null">
+      <if test="offset != null">
+        limit ${offset}, ${rows}
+      </if>
+      <if test="offset == null">
+        limit ${rows}
+      </if>
+    </if>
+  </select>
+  <select id="selectByExampleSelective" parameterType="map" resultMap="ResultMapWithBLOBs">
+    <!--
+      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.
+    -->
+    select
+    <if test="example != null and example.distinct">
+      distinct
+    </if>
+    <choose>
+      <when test="selective != null and selective.length > 0">
+        <foreach collection="selective" item="column" separator=",">
+          ${column.aliasedEscapedColumnName}
+        </foreach>
+      </when>
+      <otherwise>
+        <include refid="Base_Column_List" />
+        ,
+        <include refid="Blob_Column_List" />
+      </otherwise>
+    </choose>
+    from edit_book
+    <if test="example != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+    <if test="example != null and example.orderByClause != null">
+      order by ${example.orderByClause}
+    </if>
+    <if test="example != null and example.rows != null">
+      <if test="example.offset != null">
+        limit ${example.offset}, ${example.rows}
+      </if>
+      <if test="example.offset == null">
+        limit ${example.rows}
+      </if>
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="map" resultMap="ResultMapWithBLOBs">
+    <!--
+      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.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from edit_book
+    where id = #{id,jdbcType=BIGINT}
+      and book_id = #{bookId,jdbcType=BIGINT}
+  </select>
+  <select id="selectByPrimaryKeySelective" parameterType="map" resultMap="ResultMapWithBLOBs">
+    <!--
+      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.
+    -->
+    select
+    <choose>
+      <when test="selective != null and selective.length > 0">
+        <foreach collection="selective" item="column" separator=",">
+          ${column.aliasedEscapedColumnName}
+        </foreach>
+      </when>
+      <otherwise>
+        <include refid="Base_Column_List" />
+        ,
+        <include refid="Blob_Column_List" />
+      </otherwise>
+    </choose>
+    from edit_book
+    where id = #{id,jdbcType=BIGINT}
+      and book_id = #{bookId,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" 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.
+    -->
+    delete from edit_book
+    where id = #{id,jdbcType=BIGINT}
+      and book_id = #{bookId,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.book.dao.cps.pojo.example.EditBookExample">
+    <!--
+      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.
+    -->
+    delete from edit_book
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" 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.
+    -->
+    insert into edit_book (id, book_id, chapter_name, 
+      create_time, update_time, content
+      )
+    values (#{id,jdbcType=BIGINT}, #{bookId,jdbcType=BIGINT}, #{chapterName,jdbcType=VARCHAR}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{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.
+    -->
+    insert into edit_book
+    <choose>
+      <when test="selective != null and selective.length > 0">
+        <foreach close=")" collection="selective" item="column" open="(" separator=",">
+          ${column.escapedColumnName}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+          <if test="record.id != null">
+            id,
+          </if>
+          <if test="record.bookId != null">
+            book_id,
+          </if>
+          <if test="record.chapterName != null">
+            chapter_name,
+          </if>
+          <if test="record.createTime != null">
+            create_time,
+          </if>
+          <if test="record.updateTime != null">
+            update_time,
+          </if>
+          <if test="record.content != null">
+            content,
+          </if>
+        </trim>
+        <trim prefix="(" suffix=")" suffixOverrides="," />
+      </otherwise>
+    </choose>
+    values
+    <choose>
+      <when test="selective != null and selective.length > 0">
+        <foreach close=")" collection="selective" item="column" open="(" separator=",">
+          #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+          <if test="record.id != null">
+            #{record.id,jdbcType=BIGINT},
+          </if>
+          <if test="record.bookId != null">
+            #{record.bookId,jdbcType=BIGINT},
+          </if>
+          <if test="record.chapterName != null">
+            #{record.chapterName,jdbcType=VARCHAR},
+          </if>
+          <if test="record.createTime != null">
+            #{record.createTime,jdbcType=TIMESTAMP},
+          </if>
+          <if test="record.updateTime != null">
+            #{record.updateTime,jdbcType=TIMESTAMP},
+          </if>
+          <if test="record.content != null">
+            #{record.content,jdbcType=LONGVARCHAR},
+          </if>
+        </trim>
+      </otherwise>
+    </choose>
+  </insert>
+  <select id="countByExample" parameterType="com.book.dao.cps.pojo.example.EditBookExample" resultType="java.lang.Long">
+    <!--
+      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.
+    -->
+    select count(*) from edit_book
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" 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.
+    -->
+    update edit_book
+    SET
+    <choose>
+      <when test="selective != null and selective.length > 0">
+        <foreach collection="selective" item="column" separator=",">
+          ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim suffixOverrides=",">
+          <if test="record.id != null">
+            id = #{record.id,jdbcType=BIGINT},
+          </if>
+          <if test="record.bookId != null">
+            book_id = #{record.bookId,jdbcType=BIGINT},
+          </if>
+          <if test="record.chapterName != null">
+            chapter_name = #{record.chapterName,jdbcType=VARCHAR},
+          </if>
+          <if test="record.createTime != null">
+            create_time = #{record.createTime,jdbcType=TIMESTAMP},
+          </if>
+          <if test="record.updateTime != null">
+            update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+          </if>
+          <if test="record.content != null">
+            content = #{record.content,jdbcType=LONGVARCHAR},
+          </if>
+        </trim>
+      </otherwise>
+    </choose>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExampleWithBLOBs" 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.
+    -->
+    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},
+      content = #{record.content,jdbcType=LONGVARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" 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.
+    -->
+    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}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" 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.
+    -->
+    update edit_book
+    SET
+    <choose>
+      <when test="selective != null and selective.length > 0">
+        <foreach collection="selective" item="column" separator=",">
+          ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim suffixOverrides=",">
+          <if test="record.chapterName != null">
+            chapter_name = #{record.chapterName,jdbcType=VARCHAR},
+          </if>
+          <if test="record.createTime != null">
+            create_time = #{record.createTime,jdbcType=TIMESTAMP},
+          </if>
+          <if test="record.updateTime != null">
+            update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+          </if>
+          <if test="record.content != null">
+            content = #{record.content,jdbcType=LONGVARCHAR},
+          </if>
+        </trim>
+      </otherwise>
+    </choose>
+    where id = #{record.id,jdbcType=BIGINT}
+      and book_id = #{record.bookId,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" 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.
+    -->
+    update edit_book
+    set chapter_name = #{chapterName,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP},
+      content = #{content,jdbcType=LONGVARCHAR}
+    where id = #{id,jdbcType=BIGINT}
+      and book_id = #{bookId,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" 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.
+    -->
+    update edit_book
+    set chapter_name = #{chapterName,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+      and book_id = #{bookId,jdbcType=BIGINT}
+  </update>
+  <select id="selectOneByExample" parameterType="com.book.dao.cps.pojo.example.EditBookExample" resultMap="BaseResultMap">
+    <!--
+      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.
+    -->
+    select
+    <include refid="Base_Column_List" />
+    from edit_book
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    limit 1
+  </select>
+  <select id="selectOneByExampleWithBLOBs" parameterType="com.book.dao.cps.pojo.example.EditBookExample" resultMap="ResultMapWithBLOBs">
+    <!--
+      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.
+    -->
+    select
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from edit_book
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    limit 1
+  </select>
+  <select id="selectOneByExampleSelective" parameterType="map" resultMap="ResultMapWithBLOBs">
+    <!--
+      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.
+    -->
+    select
+    <choose>
+      <when test="selective != null and selective.length > 0">
+        <foreach collection="selective" item="column" separator=",">
+          ${column.aliasedEscapedColumnName}
+        </foreach>
+      </when>
+      <otherwise>
+        <include refid="Base_Column_List" />
+        ,
+        <include refid="Blob_Column_List" />
+      </otherwise>
+    </choose>
+    from edit_book
+    <if test="example != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+    <if test="example != null and example.orderByClause != null">
+      order by ${example.orderByClause}
+    </if>
+    limit 1
+  </select>
+  <insert id="batchInsert" 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.
+    -->
+    insert into edit_book
+    (id, book_id, chapter_name, create_time, update_time, 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}
+        )
+    </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.
+    -->
+    insert into edit_book (
+    <foreach collection="selective" item="column" separator=",">
+      ${column.escapedColumnName}
+    </foreach>
+    )
+    values
+    <foreach collection="list" item="item" separator=",">
+      (
+      <foreach collection="selective" item="column" separator=",">
+        <if test="'id'.toString() == column.value">
+          #{item.id,jdbcType=BIGINT}
+        </if>
+        <if test="'book_id'.toString() == column.value">
+          #{item.bookId,jdbcType=BIGINT}
+        </if>
+        <if test="'chapter_name'.toString() == column.value">
+          #{item.chapterName,jdbcType=VARCHAR}
+        </if>
+        <if test="'create_time'.toString() == column.value">
+          #{item.createTime,jdbcType=TIMESTAMP}
+        </if>
+        <if test="'update_time'.toString() == column.value">
+          #{item.updateTime,jdbcType=TIMESTAMP}
+        </if>
+        <if test="'content'.toString() == column.value">
+          #{item.content,jdbcType=LONGVARCHAR}
+        </if>
+      </foreach>
+      )
+    </foreach>
+  </insert>
+  <insert id="upsertSelective" 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.
+    -->
+    insert into edit_book
+    <choose>
+      <when test="selective != null and selective.length > 0">
+        <foreach close=")" collection="selective" item="column" open="(" separator=",">
+          ${column.escapedColumnName}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+          <if test="record.id != null">
+            id,
+          </if>
+          <if test="record.bookId != null">
+            book_id,
+          </if>
+          <if test="record.chapterName != null">
+            chapter_name,
+          </if>
+          <if test="record.createTime != null">
+            create_time,
+          </if>
+          <if test="record.updateTime != null">
+            update_time,
+          </if>
+          <if test="record.content != null">
+            content,
+          </if>
+        </trim>
+        <trim prefix="(" suffix=")" suffixOverrides="," />
+      </otherwise>
+    </choose>
+    values
+    <choose>
+      <when test="selective != null and selective.length > 0">
+        <foreach close=")" collection="selective" item="column" open="(" separator=",">
+          #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+          <if test="record.id != null">
+            #{record.id,jdbcType=BIGINT},
+          </if>
+          <if test="record.bookId != null">
+            #{record.bookId,jdbcType=BIGINT},
+          </if>
+          <if test="record.chapterName != null">
+            #{record.chapterName,jdbcType=VARCHAR},
+          </if>
+          <if test="record.createTime != null">
+            #{record.createTime,jdbcType=TIMESTAMP},
+          </if>
+          <if test="record.updateTime != null">
+            #{record.updateTime,jdbcType=TIMESTAMP},
+          </if>
+          <if test="record.content != null">
+            #{record.content,jdbcType=LONGVARCHAR},
+          </if>
+        </trim>
+      </otherwise>
+    </choose>
+    on duplicate key update 
+    <choose>
+      <when test="selective != null and selective.length > 0">
+        <foreach collection="selective" item="column" separator=",">
+          ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim suffixOverrides=",">
+          <if test="record.id != null">
+            id = #{record.id,jdbcType=BIGINT},
+          </if>
+          <if test="record.bookId != null">
+            book_id = #{record.bookId,jdbcType=BIGINT},
+          </if>
+          <if test="record.chapterName != null">
+            chapter_name = #{record.chapterName,jdbcType=VARCHAR},
+          </if>
+          <if test="record.createTime != null">
+            create_time = #{record.createTime,jdbcType=TIMESTAMP},
+          </if>
+          <if test="record.updateTime != null">
+            update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+          </if>
+          <if test="record.content != null">
+            content = #{record.content,jdbcType=LONGVARCHAR},
+          </if>
+        </trim>
+      </otherwise>
+    </choose>
+  </insert>
+  <insert id="upsert" 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.
+    -->
+    insert into edit_book
+    (id, book_id, chapter_name, create_time, update_time)
+    values
+    (#{id,jdbcType=BIGINT}, #{bookId,jdbcType=BIGINT}, #{chapterName,jdbcType=VARCHAR}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
+    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}
+  </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.
+    -->
+    insert into edit_book
+    (id, book_id, chapter_name, create_time, update_time, content)
+    values
+    (#{id,jdbcType=BIGINT}, #{bookId,jdbcType=BIGINT}, #{chapterName,jdbcType=VARCHAR}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{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}, 
+    content = #{content,jdbcType=LONGVARCHAR}
+  </insert>
+</mapper>

+ 802 - 0
book-dao/src/main/resources/mapper/cps/UploadBookMapper.xml

@@ -0,0 +1,802 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.book.dao.cps.mapper.UploadBookMapper">
+  <resultMap id="BaseResultMap" type="com.book.dao.cps.entity.UploadBook">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Aug 25 22:46:40 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="words" jdbcType="INTEGER" property="words" />
+    <result column="is_pay" jdbcType="INTEGER" property="isPay" />
+  </resultMap>
+  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.book.dao.cps.entity.UploadBook">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Aug 25 22:46:40 CST 2021.
+    -->
+    <result column="content" jdbcType="LONGVARCHAR" property="content" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Aug 25 22:46:40 CST 2021.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Aug 25 22:46:40 CST 2021.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_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:46:40 CST 2021.
+    -->
+    id, book_id, chapter_name, create_time, update_time, words, is_pay
+  </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:46:40 CST 2021.
+    -->
+    content
+  </sql>
+  <select id="selectByExampleWithBLOBs" parameterType="com.book.dao.cps.pojo.example.UploadBookExample" resultMap="ResultMapWithBLOBs">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Aug 25 22:46:40 CST 2021.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from upload_book
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="rows != null">
+      <if test="offset != null">
+        limit ${offset}, ${rows}
+      </if>
+      <if test="offset == null">
+        limit ${rows}
+      </if>
+    </if>
+  </select>
+  <select id="selectByExample" parameterType="com.book.dao.cps.pojo.example.UploadBookExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Aug 25 22:46:40 CST 2021.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from upload_book
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="rows != null">
+      <if test="offset != null">
+        limit ${offset}, ${rows}
+      </if>
+      <if test="offset == null">
+        limit ${rows}
+      </if>
+    </if>
+  </select>
+  <select id="selectByExampleSelective" parameterType="map" resultMap="ResultMapWithBLOBs">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Aug 25 22:46:40 CST 2021.
+    -->
+    select
+    <if test="example != null and example.distinct">
+      distinct
+    </if>
+    <choose>
+      <when test="selective != null and selective.length &gt; 0">
+        <foreach collection="selective" item="column" separator=",">
+          ${column.aliasedEscapedColumnName}
+        </foreach>
+      </when>
+      <otherwise>
+        <include refid="Base_Column_List" />
+        ,
+        <include refid="Blob_Column_List" />
+      </otherwise>
+    </choose>
+    from upload_book
+    <if test="example != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+    <if test="example != null and example.orderByClause != null">
+      order by ${example.orderByClause}
+    </if>
+    <if test="example != null and example.rows != null">
+      <if test="example.offset != null">
+        limit ${example.offset}, ${example.rows}
+      </if>
+      <if test="example.offset == null">
+        limit ${example.rows}
+      </if>
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="map" resultMap="ResultMapWithBLOBs">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Aug 25 22:46:40 CST 2021.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from upload_book
+    where id = #{id,jdbcType=BIGINT}
+      and book_id = #{bookId,jdbcType=BIGINT}
+  </select>
+  <select id="selectByPrimaryKeySelective" parameterType="map" resultMap="ResultMapWithBLOBs">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Aug 25 22:46:40 CST 2021.
+    -->
+    select
+    <choose>
+      <when test="selective != null and selective.length &gt; 0">
+        <foreach collection="selective" item="column" separator=",">
+          ${column.aliasedEscapedColumnName}
+        </foreach>
+      </when>
+      <otherwise>
+        <include refid="Base_Column_List" />
+        ,
+        <include refid="Blob_Column_List" />
+      </otherwise>
+    </choose>
+    from upload_book
+    where id = #{id,jdbcType=BIGINT}
+      and book_id = #{bookId,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" 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:46:40 CST 2021.
+    -->
+    delete from upload_book
+    where id = #{id,jdbcType=BIGINT}
+      and book_id = #{bookId,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.book.dao.cps.pojo.example.UploadBookExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Aug 25 22:46:40 CST 2021.
+    -->
+    delete from upload_book
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.book.dao.cps.entity.UploadBook">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Aug 25 22:46:40 CST 2021.
+    -->
+    insert into upload_book (id, book_id, chapter_name, 
+      create_time, update_time, words, 
+      is_pay, content)
+    values (#{id,jdbcType=BIGINT}, #{bookId,jdbcType=BIGINT}, #{chapterName,jdbcType=VARCHAR}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{words,jdbcType=INTEGER}, 
+      #{isPay,jdbcType=INTEGER}, #{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:46:40 CST 2021.
+    -->
+    insert into upload_book
+    <choose>
+      <when test="selective != null and selective.length &gt; 0">
+        <foreach close=")" collection="selective" item="column" open="(" separator=",">
+          ${column.escapedColumnName}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+          <if test="record.id != null">
+            id,
+          </if>
+          <if test="record.bookId != null">
+            book_id,
+          </if>
+          <if test="record.chapterName != null">
+            chapter_name,
+          </if>
+          <if test="record.createTime != null">
+            create_time,
+          </if>
+          <if test="record.updateTime != null">
+            update_time,
+          </if>
+          <if test="record.words != null">
+            words,
+          </if>
+          <if test="record.isPay != null">
+            is_pay,
+          </if>
+          <if test="record.content != null">
+            content,
+          </if>
+        </trim>
+        <trim prefix="(" suffix=")" suffixOverrides="," />
+      </otherwise>
+    </choose>
+    values
+    <choose>
+      <when test="selective != null and selective.length &gt; 0">
+        <foreach close=")" collection="selective" item="column" open="(" separator=",">
+          #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+          <if test="record.id != null">
+            #{record.id,jdbcType=BIGINT},
+          </if>
+          <if test="record.bookId != null">
+            #{record.bookId,jdbcType=BIGINT},
+          </if>
+          <if test="record.chapterName != null">
+            #{record.chapterName,jdbcType=VARCHAR},
+          </if>
+          <if test="record.createTime != null">
+            #{record.createTime,jdbcType=TIMESTAMP},
+          </if>
+          <if test="record.updateTime != null">
+            #{record.updateTime,jdbcType=TIMESTAMP},
+          </if>
+          <if test="record.words != null">
+            #{record.words,jdbcType=INTEGER},
+          </if>
+          <if test="record.isPay != null">
+            #{record.isPay,jdbcType=INTEGER},
+          </if>
+          <if test="record.content != null">
+            #{record.content,jdbcType=LONGVARCHAR},
+          </if>
+        </trim>
+      </otherwise>
+    </choose>
+  </insert>
+  <select id="countByExample" parameterType="com.book.dao.cps.pojo.example.UploadBookExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Aug 25 22:46:40 CST 2021.
+    -->
+    select count(*) from upload_book
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" 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:46:40 CST 2021.
+    -->
+    update upload_book
+    SET
+    <choose>
+      <when test="selective != null and selective.length &gt; 0">
+        <foreach collection="selective" item="column" separator=",">
+          ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim suffixOverrides=",">
+          <if test="record.id != null">
+            id = #{record.id,jdbcType=BIGINT},
+          </if>
+          <if test="record.bookId != null">
+            book_id = #{record.bookId,jdbcType=BIGINT},
+          </if>
+          <if test="record.chapterName != null">
+            chapter_name = #{record.chapterName,jdbcType=VARCHAR},
+          </if>
+          <if test="record.createTime != null">
+            create_time = #{record.createTime,jdbcType=TIMESTAMP},
+          </if>
+          <if test="record.updateTime != null">
+            update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+          </if>
+          <if test="record.words != null">
+            words = #{record.words,jdbcType=INTEGER},
+          </if>
+          <if test="record.isPay != null">
+            is_pay = #{record.isPay,jdbcType=INTEGER},
+          </if>
+          <if test="record.content != null">
+            content = #{record.content,jdbcType=LONGVARCHAR},
+          </if>
+        </trim>
+      </otherwise>
+    </choose>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExampleWithBLOBs" 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:46:40 CST 2021.
+    -->
+    update upload_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},
+      words = #{record.words,jdbcType=INTEGER},
+      is_pay = #{record.isPay,jdbcType=INTEGER},
+      content = #{record.content,jdbcType=LONGVARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" 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:46:40 CST 2021.
+    -->
+    update upload_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},
+      words = #{record.words,jdbcType=INTEGER},
+      is_pay = #{record.isPay,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" 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:46:40 CST 2021.
+    -->
+    update upload_book
+    SET
+    <choose>
+      <when test="selective != null and selective.length &gt; 0">
+        <foreach collection="selective" item="column" separator=",">
+          ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim suffixOverrides=",">
+          <if test="record.chapterName != null">
+            chapter_name = #{record.chapterName,jdbcType=VARCHAR},
+          </if>
+          <if test="record.createTime != null">
+            create_time = #{record.createTime,jdbcType=TIMESTAMP},
+          </if>
+          <if test="record.updateTime != null">
+            update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+          </if>
+          <if test="record.words != null">
+            words = #{record.words,jdbcType=INTEGER},
+          </if>
+          <if test="record.isPay != null">
+            is_pay = #{record.isPay,jdbcType=INTEGER},
+          </if>
+          <if test="record.content != null">
+            content = #{record.content,jdbcType=LONGVARCHAR},
+          </if>
+        </trim>
+      </otherwise>
+    </choose>
+    where id = #{record.id,jdbcType=BIGINT}
+      and book_id = #{record.bookId,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.book.dao.cps.entity.UploadBook">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Aug 25 22:46:40 CST 2021.
+    -->
+    update upload_book
+    set chapter_name = #{chapterName,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP},
+      words = #{words,jdbcType=INTEGER},
+      is_pay = #{isPay,jdbcType=INTEGER},
+      content = #{content,jdbcType=LONGVARCHAR}
+    where id = #{id,jdbcType=BIGINT}
+      and book_id = #{bookId,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.book.dao.cps.entity.UploadBook">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Aug 25 22:46:40 CST 2021.
+    -->
+    update upload_book
+    set chapter_name = #{chapterName,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP},
+      words = #{words,jdbcType=INTEGER},
+      is_pay = #{isPay,jdbcType=INTEGER}
+    where id = #{id,jdbcType=BIGINT}
+      and book_id = #{bookId,jdbcType=BIGINT}
+  </update>
+  <select id="selectOneByExample" parameterType="com.book.dao.cps.pojo.example.UploadBookExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Aug 25 22:46:40 CST 2021.
+    -->
+    select
+    <include refid="Base_Column_List" />
+    from upload_book
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    limit 1
+  </select>
+  <select id="selectOneByExampleWithBLOBs" parameterType="com.book.dao.cps.pojo.example.UploadBookExample" resultMap="ResultMapWithBLOBs">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Aug 25 22:46:40 CST 2021.
+    -->
+    select
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from upload_book
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    limit 1
+  </select>
+  <select id="selectOneByExampleSelective" parameterType="map" resultMap="ResultMapWithBLOBs">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Aug 25 22:46:40 CST 2021.
+    -->
+    select
+    <choose>
+      <when test="selective != null and selective.length &gt; 0">
+        <foreach collection="selective" item="column" separator=",">
+          ${column.aliasedEscapedColumnName}
+        </foreach>
+      </when>
+      <otherwise>
+        <include refid="Base_Column_List" />
+        ,
+        <include refid="Blob_Column_List" />
+      </otherwise>
+    </choose>
+    from upload_book
+    <if test="example != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+    <if test="example != null and example.orderByClause != null">
+      order by ${example.orderByClause}
+    </if>
+    limit 1
+  </select>
+  <insert id="batchInsert" 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:46:40 CST 2021.
+    -->
+    insert into upload_book
+    (id, book_id, chapter_name, create_time, update_time, words, is_pay, 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.words,jdbcType=INTEGER}, 
+        #{item.isPay,jdbcType=INTEGER}, #{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:46:40 CST 2021.
+    -->
+    insert into upload_book (
+    <foreach collection="selective" item="column" separator=",">
+      ${column.escapedColumnName}
+    </foreach>
+    )
+    values
+    <foreach collection="list" item="item" separator=",">
+      (
+      <foreach collection="selective" item="column" separator=",">
+        <if test="'id'.toString() == column.value">
+          #{item.id,jdbcType=BIGINT}
+        </if>
+        <if test="'book_id'.toString() == column.value">
+          #{item.bookId,jdbcType=BIGINT}
+        </if>
+        <if test="'chapter_name'.toString() == column.value">
+          #{item.chapterName,jdbcType=VARCHAR}
+        </if>
+        <if test="'create_time'.toString() == column.value">
+          #{item.createTime,jdbcType=TIMESTAMP}
+        </if>
+        <if test="'update_time'.toString() == column.value">
+          #{item.updateTime,jdbcType=TIMESTAMP}
+        </if>
+        <if test="'words'.toString() == column.value">
+          #{item.words,jdbcType=INTEGER}
+        </if>
+        <if test="'is_pay'.toString() == column.value">
+          #{item.isPay,jdbcType=INTEGER}
+        </if>
+        <if test="'content'.toString() == column.value">
+          #{item.content,jdbcType=LONGVARCHAR}
+        </if>
+      </foreach>
+      )
+    </foreach>
+  </insert>
+  <insert id="upsertSelective" 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:46:40 CST 2021.
+    -->
+    insert into upload_book
+    <choose>
+      <when test="selective != null and selective.length &gt; 0">
+        <foreach close=")" collection="selective" item="column" open="(" separator=",">
+          ${column.escapedColumnName}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+          <if test="record.id != null">
+            id,
+          </if>
+          <if test="record.bookId != null">
+            book_id,
+          </if>
+          <if test="record.chapterName != null">
+            chapter_name,
+          </if>
+          <if test="record.createTime != null">
+            create_time,
+          </if>
+          <if test="record.updateTime != null">
+            update_time,
+          </if>
+          <if test="record.words != null">
+            words,
+          </if>
+          <if test="record.isPay != null">
+            is_pay,
+          </if>
+          <if test="record.content != null">
+            content,
+          </if>
+        </trim>
+        <trim prefix="(" suffix=")" suffixOverrides="," />
+      </otherwise>
+    </choose>
+    values
+    <choose>
+      <when test="selective != null and selective.length &gt; 0">
+        <foreach close=")" collection="selective" item="column" open="(" separator=",">
+          #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+          <if test="record.id != null">
+            #{record.id,jdbcType=BIGINT},
+          </if>
+          <if test="record.bookId != null">
+            #{record.bookId,jdbcType=BIGINT},
+          </if>
+          <if test="record.chapterName != null">
+            #{record.chapterName,jdbcType=VARCHAR},
+          </if>
+          <if test="record.createTime != null">
+            #{record.createTime,jdbcType=TIMESTAMP},
+          </if>
+          <if test="record.updateTime != null">
+            #{record.updateTime,jdbcType=TIMESTAMP},
+          </if>
+          <if test="record.words != null">
+            #{record.words,jdbcType=INTEGER},
+          </if>
+          <if test="record.isPay != null">
+            #{record.isPay,jdbcType=INTEGER},
+          </if>
+          <if test="record.content != null">
+            #{record.content,jdbcType=LONGVARCHAR},
+          </if>
+        </trim>
+      </otherwise>
+    </choose>
+    on duplicate key update 
+    <choose>
+      <when test="selective != null and selective.length &gt; 0">
+        <foreach collection="selective" item="column" separator=",">
+          ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim suffixOverrides=",">
+          <if test="record.id != null">
+            id = #{record.id,jdbcType=BIGINT},
+          </if>
+          <if test="record.bookId != null">
+            book_id = #{record.bookId,jdbcType=BIGINT},
+          </if>
+          <if test="record.chapterName != null">
+            chapter_name = #{record.chapterName,jdbcType=VARCHAR},
+          </if>
+          <if test="record.createTime != null">
+            create_time = #{record.createTime,jdbcType=TIMESTAMP},
+          </if>
+          <if test="record.updateTime != null">
+            update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+          </if>
+          <if test="record.words != null">
+            words = #{record.words,jdbcType=INTEGER},
+          </if>
+          <if test="record.isPay != null">
+            is_pay = #{record.isPay,jdbcType=INTEGER},
+          </if>
+          <if test="record.content != null">
+            content = #{record.content,jdbcType=LONGVARCHAR},
+          </if>
+        </trim>
+      </otherwise>
+    </choose>
+  </insert>
+  <insert id="upsert" parameterType="com.book.dao.cps.entity.UploadBook">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Aug 25 22:46:40 CST 2021.
+    -->
+    insert into upload_book
+    (id, book_id, chapter_name, create_time, update_time, words, is_pay)
+    values
+    (#{id,jdbcType=BIGINT}, #{bookId,jdbcType=BIGINT}, #{chapterName,jdbcType=VARCHAR}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{words,jdbcType=INTEGER}, 
+      #{isPay,jdbcType=INTEGER})
+    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}, 
+    words = #{words,jdbcType=INTEGER}, 
+    is_pay = #{isPay,jdbcType=INTEGER}
+  </insert>
+  <insert id="upsertWithBLOBs" parameterType="com.book.dao.cps.entity.UploadBook">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Aug 25 22:46:40 CST 2021.
+    -->
+    insert into upload_book
+    (id, book_id, chapter_name, create_time, update_time, words, is_pay, content)
+    values
+    (#{id,jdbcType=BIGINT}, #{bookId,jdbcType=BIGINT}, #{chapterName,jdbcType=VARCHAR}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{words,jdbcType=INTEGER}, 
+      #{isPay,jdbcType=INTEGER}, #{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}, 
+    words = #{words,jdbcType=INTEGER}, 
+    is_pay = #{isPay,jdbcType=INTEGER}, 
+    content = #{content,jdbcType=LONGVARCHAR}
+  </insert>
+</mapper>

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

@@ -27,7 +27,7 @@
         <!-- Example 目标包修改插件 need to change-->
         <plugin type="com.itfsw.mybatis.generator.plugins.ExampleTargetPlugin">
             <!-- 修改Example类生成到目标包下 -->
-            <property name="targetPackage" value="com.book.dao.cpsshard.pojo.example"/>
+            <property name="targetPackage" value="com.book.dao.cps.pojo.example"/>
         </plugin>
 
         <!-- 数据Model属性对应Column获取插件 -->
@@ -103,26 +103,34 @@
         <!--数据库连接配置 need to change-->
         <jdbcConnection
                 driverClass="com.mysql.cj.jdbc.Driver"
-                connectionURL="jdbc:mysql://121.41.100.198:3306/test_cps_shard_192?nullCatalogMeansCurrent=true&amp;serverTimezone=UTC"
+                connectionURL="jdbc:mysql://121.41.100.198:3306/test_cps?nullCatalogMeansCurrent=true&amp;serverTimezone=UTC"
                 userId="root"
                 password="root"/>
 
         <!--指定自动生成的 POJO置于哪个包下 need to change -->
-        <javaModelGenerator targetPackage="com.book.dao.cpsshard.entity"
+        <javaModelGenerator targetPackage="com.book.dao.cps.entity"
                             targetProject="src/main/java"/>
 
         <!--指定自动生成的 mapper.xml置于哪个包下 -->
-        <sqlMapGenerator targetPackage="mapper/cpsshard" targetProject="src/main/resources"/>
+        <sqlMapGenerator targetPackage="mapper/cps" targetProject="src/main/resources"/>
 
         <!--指定自动生成的 DAO接口置于哪个包下 need to change-->
-        <javaClientGenerator targetPackage="com.book.dao.cpsshard.mapper"
+        <javaClientGenerator targetPackage="com.book.dao.cps.mapper"
                              targetProject="src/main/java" type="XMLMAPPER"/>
 
         <!--指定数据表名,可以使用_和%通配符,可以配置generatedKey,会返回insert之后的id-->
-        <table tableName="user_recently_read"/>
-        <table tableName="sign"/>
-        <table tableName="recharge"/>
-        <table tableName="consume"/>
+<!--        <table tableName="book"></table>-->
+<!--        <table tableName="manage_block"></table>-->
+<!--        <table tableName="manage_block_resource"></table>-->
+<!--        <table tableName="book_category"></table>-->
+<!--        <table tableName="user"></table>-->
+<!--        <table tableName="search_keyword"></table>-->
+<!--        <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>
+
     </context>
 
 </generatorConfiguration>

+ 9 - 16
book-dao/src/main/resources/cps-mybatis-generator.xml → book-dao/src/main/resources/shard-mybatis-generator.xml

@@ -27,7 +27,7 @@
         <!-- Example 目标包修改插件 need to change-->
         <plugin type="com.itfsw.mybatis.generator.plugins.ExampleTargetPlugin">
             <!-- 修改Example类生成到目标包下 -->
-            <property name="targetPackage" value="com.book.dao.cps.pojo.example"/>
+            <property name="targetPackage" value="com.book.dao.cpsshard.pojo.example"/>
         </plugin>
 
         <!-- 数据Model属性对应Column获取插件 -->
@@ -103,33 +103,26 @@
         <!--数据库连接配置 need to change-->
         <jdbcConnection
                 driverClass="com.mysql.cj.jdbc.Driver"
-                connectionURL="jdbc:mysql://121.41.100.198:3306/test_cps?nullCatalogMeansCurrent=true&amp;serverTimezone=UTC"
+                connectionURL="jdbc:mysql://121.41.100.198:3306/test_cps_shard_192?nullCatalogMeansCurrent=true&amp;serverTimezone=UTC"
                 userId="root"
                 password="root"/>
 
         <!--指定自动生成的 POJO置于哪个包下 need to change -->
-        <javaModelGenerator targetPackage="com.book.dao.cps.entity"
+        <javaModelGenerator targetPackage="com.book.dao.cpsshard.entity"
                             targetProject="src/main/java"/>
 
         <!--指定自动生成的 mapper.xml置于哪个包下 -->
-        <sqlMapGenerator targetPackage="mapper/cps" targetProject="src/main/resources"/>
+        <sqlMapGenerator targetPackage="mapper/cpsshard" targetProject="src/main/resources"/>
 
         <!--指定自动生成的 DAO接口置于哪个包下 need to change-->
-        <javaClientGenerator targetPackage="com.book.dao.cps.mapper"
+        <javaClientGenerator targetPackage="com.book.dao.cpsshard.mapper"
                              targetProject="src/main/java" type="XMLMAPPER"/>
 
         <!--指定数据表名,可以使用_和%通配符,可以配置generatedKey,会返回insert之后的id-->
-<!--        <table tableName="book"></table>-->
-<!--        <table tableName="manage_block"></table>-->
-<!--        <table tableName="manage_block_resource"></table>-->
-<!--        <table tableName="book_category"></table>-->
-<!--        <table tableName="user"></table>-->
-<!--        <table tableName="search_keyword"></table>-->
-<!--        <table tableName="return_recommand"></table>-->
-<!--        <table tableName="bookshelf_recommand"></table>-->
-<!--        <table tableName="smart_recommand"></table>-->
-        <table tableName="config"></table>
-
+        <table tableName="user_recently_read"/>
+        <table tableName="sign"/>
+        <table tableName="recharge"/>
+        <table tableName="consume"/>
     </context>
 
 </generatorConfiguration>

+ 10 - 0
book-server/pom.xml

@@ -112,5 +112,15 @@
             <version>1.0</version>
             <scope>compile</scope>
         </dependency>
+
+        <!--redis-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-redis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-pool2</artifactId>
+        </dependency>
     </dependencies>
 </project>

+ 0 - 3
book-server/src/main/java/com/book/server/controller/BaseController.java

@@ -1,12 +1,9 @@
 package com.book.server.controller;
 
-import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.CrossOrigin;
-import org.springframework.web.bind.annotation.RestController;
 
-import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 

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

@@ -11,7 +11,9 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.util.CollectionUtils;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
+import java.io.IOException;
 import java.util.List;
 
 /**
@@ -180,4 +182,20 @@ public class BookController extends BaseController {
     public Result<List<Long>> getUserConsumerChapter(@RequestBody BookContentVO bookContentVO) {
         return Result.byObject(bookService.getUserConsumerChapter(bookContentVO));
     }
+
+    /**
+     * 自定义书籍上传
+     * @param file
+     * @param id
+     * @return
+     * @throws IOException
+     */
+    @PostMapping("/upload")
+    public Result uploadFile(@RequestParam("file") MultipartFile file,Long id) throws IOException {
+        if (file.isEmpty()) {
+            return Result.failure();
+        }
+        bookService.addFile(file,id);
+        return Result.success("添加成功");
+    }
 }

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

@@ -4,7 +4,9 @@ import com.book.dao.VO.*;
 import com.book.dao.cps.pojo.SearchKeyword;
 import com.book.dao.cpsshard.entity.UserRecentlyRead;
 import com.book.server.common.entity.Result;
+import org.springframework.web.multipart.MultipartFile;
 
+import java.io.IOException;
 import java.util.List;
 
 public interface BookService {
@@ -30,4 +32,6 @@ public interface BookService {
     List<UserRecentlyRead> getRecentReadByUserId(UserRecentReadVO userRecentlyRead);
 
     List<Long> getUserConsumerChapter(BookContentVO bookContentVO);
+
+    void addFile(MultipartFile file, Long id) throws IOException;
 }

+ 16 - 0
book-server/src/main/java/com/book/server/service/impl/BookServiceImpl.java

@@ -30,7 +30,11 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
 
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -548,6 +552,18 @@ public class BookServiceImpl implements BookService {
         return collect;
     }
 
+    @Override
+    public void addFile(MultipartFile file, Long id) throws IOException {
+        BufferedReader bf = new BufferedReader(new InputStreamReader(file.getInputStream()));
+        String strTmp;
+        ArrayList<String> list = new ArrayList<>();
+        while ((strTmp = bf.readLine()) != null) {
+            if (StringUtils.isNotBlank(strTmp)) {
+                list.add(strTmp);
+            }
+        }
+    }
+
     private List<BookRes> getRandom(List<BookRes> bookRes) {
         if (bookRes.size() <= 4) {
             return bookRes;

+ 192 - 0
book-server/src/main/java/com/book/server/utils/RedisUtil.java

@@ -0,0 +1,192 @@
+package com.book.server.utils;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.*;
+import org.springframework.stereotype.Service;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+
+@Service
+@Slf4j
+public class RedisUtil {
+    @Autowired
+    private RedisTemplate redisTemplate;
+
+    /**
+     * set value
+     * @param key
+     * @param value
+     * @return
+     */
+    public boolean set(final String key, Object value) {
+        boolean result = false;
+        try {
+            ValueOperations<Serializable, Object> operations = redisTemplate.opsForValue();
+            operations.set(key, value);
+            result = true;
+        } catch (Exception e) {
+            log.error("set error: key {}, value {}",key,value,e);
+        }
+        return result;
+    }
+
+    /**
+     * set value with expireTime
+     * @param key
+     * @param value
+     * @param expireTime
+     * @return
+     */
+    public boolean set(final String key, Object value, Long expireTime) {
+        boolean result = false;
+        try {
+            ValueOperations<Serializable, Object> operations = redisTemplate.opsForValue();
+            operations.set(key, value);
+            redisTemplate.expire(key, expireTime, TimeUnit.SECONDS);
+            result = true;
+        } catch (Exception e) {
+            log.error("set error: key {}, value {},expireTime {}",key,value,expireTime,e);
+        }
+        return result;
+    }
+
+    /**
+     * @param key
+     * @return
+     */
+    public boolean exists(final String key) {
+        return redisTemplate.hasKey(key);
+    }
+
+    /**
+     * @param key
+     * @return
+     */
+    public Object get(final String key) {
+        Object result = null;
+        ValueOperations<Serializable, Object> operations = redisTemplate.opsForValue();
+        result = operations.get(key);
+        return result;
+    }
+
+    /**
+     * remove single key
+     * @param key
+     */
+    public void remove(final String key) {
+        if (exists(key)) {
+            redisTemplate.delete(key);
+        }
+    }
+
+    /**
+     * batch delete
+     * @param keys
+     */
+    public void remove(final String... keys) {
+        for (String key : keys) {
+            remove(key);
+        }
+    }
+
+    /**
+     * batch delete with pattern
+     * @param pattern
+     */
+    public void removePattern(final String pattern) {
+        Set<Serializable> keys = redisTemplate.keys(pattern);
+        if (keys.size() > 0)
+            redisTemplate.delete(keys);
+    }
+
+    /**
+     * hash set
+     * @param key
+     * @param hashKey
+     * @param value
+     */
+    public void hashSet(String key, Object hashKey, Object value){
+        HashOperations<String, Object, Object> hash = redisTemplate.opsForHash();
+        hash.put(key,hashKey,value);
+    }
+
+    /**
+     * hash get
+     * @param key
+     * @param hashKey
+     * @return
+     */
+    public Object hashGet(String key, Object hashKey){
+        HashOperations<String, Object, Object>  hash = redisTemplate.opsForHash();
+        return hash.get(key,hashKey);
+    }
+
+    /**
+     *  list push
+     * @param k
+     * @param v
+     */
+    public void push(String k,Object v){
+        ListOperations<String, Object> list = redisTemplate.opsForList();
+        list.rightPush(k,v);
+    }
+
+    /**
+     *  list range
+     * @param k
+     * @param l
+     * @param l1
+     * @return
+     */
+    public List<Object> range(String k, long l, long l1){
+        ListOperations<String, Object> list = redisTemplate.opsForList();
+        return list.range(k,l,l1);
+    }
+
+    /**
+     *  set add
+     * @param key
+     * @param value
+     */
+    public void setAdd(String key,Object value){
+        SetOperations<String, Object> set = redisTemplate.opsForSet();
+        set.add(key,value);
+    }
+
+    /**
+     * set get
+     * @param key
+     * @return
+     */
+    public Set<Object> setMembers(String key){
+        SetOperations<String, Object> set = redisTemplate.opsForSet();
+        return set.members(key);
+    }
+
+    /**
+     * ordered set add
+     * @param key
+     * @param value
+     * @param scoure
+     */
+    public void zAdd(String key,Object value,double scoure){
+        ZSetOperations<String, Object> zset = redisTemplate.opsForZSet();
+        zset.add(key,value,scoure);
+    }
+
+    /**
+     * rangeByScore
+     * @param key
+     * @param scoure
+     * @param scoure1
+     * @return
+     */
+    public Set<Object> rangeByScore(String key, double scoure, double scoure1){
+        ZSetOperations<String, Object> zset = redisTemplate.opsForZSet();
+        return zset.rangeByScore(key, scoure, scoure1);
+    }
+}

+ 15 - 0
book-server/src/main/resources/application-dev.yml

@@ -1,6 +1,10 @@
 server:
   port: 9999
 spring:
+  servlet:
+    multipart:
+      max-file-size: 100MB
+      max-request-size: 100MB
   datasource:
     cps:
       type: com.alibaba.druid.pool.DruidDataSource
@@ -104,3 +108,14 @@ spring:
           allow: # 默认运行所有
           deny: # 默认即可
           reset-enable: true
+  redis:
+    database: 0
+    host: 127.0.0.1
+    port: 6379
+    password:
+    jedis:
+      pool:
+        max-active: 8
+        max-wait: -1
+        max-idle: 8
+        min-idle: 0