Browse Source

修复上传书籍的问题

tianyunperfect 3 years ago
parent
commit
c1122bd5b2

+ 65 - 42
book-dao/src/main/java/com/book/dao/cps/entity/UploadBook.java

@@ -12,7 +12,7 @@ public class UploadBook implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column upload_book.id
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     private Long id;
 
@@ -21,7 +21,7 @@ public class UploadBook implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column upload_book.book_id
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     private Long bookId;
 
@@ -30,7 +30,7 @@ public class UploadBook implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column upload_book.chapter_name
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     private String chapterName;
 
@@ -39,7 +39,7 @@ public class UploadBook implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column upload_book.create_time
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     private Integer createTime;
 
@@ -48,7 +48,7 @@ public class UploadBook implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column upload_book.update_time
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     private Integer updateTime;
 
@@ -57,7 +57,7 @@ public class UploadBook implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column upload_book.words
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     private Integer words;
 
@@ -66,7 +66,7 @@ public class UploadBook implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column upload_book.read_able
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     private Integer readAble;
 
@@ -75,16 +75,25 @@ public class UploadBook implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column upload_book.chapter_id
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     private Long chapterId;
 
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column upload_book.num
+     *
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
+     */
+    private Integer num;
+
     /**
      *
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database column upload_book.content
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     private String content;
 
@@ -92,7 +101,7 @@ public class UploadBook implements Serializable {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     private static final long serialVersionUID = 1L;
 
@@ -100,7 +109,7 @@ public class UploadBook implements Serializable {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public static UploadBook.Builder builder() {
         return new UploadBook.Builder();
@@ -110,14 +119,14 @@ public class UploadBook implements Serializable {
      * This class was generated by MyBatis Generator.
      * This class corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public static class Builder {
         /**
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         private UploadBook obj;
 
@@ -125,7 +134,7 @@ public class UploadBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         public Builder() {
             this.obj = new UploadBook();
@@ -137,7 +146,7 @@ public class UploadBook implements Serializable {
          *
          * @param id the value for upload_book.id
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         public Builder id(Long id) {
             obj.setId(id);
@@ -150,7 +159,7 @@ public class UploadBook implements Serializable {
          *
          * @param bookId the value for upload_book.book_id
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         public Builder bookId(Long bookId) {
             obj.setBookId(bookId);
@@ -163,7 +172,7 @@ public class UploadBook implements Serializable {
          *
          * @param chapterName the value for upload_book.chapter_name
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         public Builder chapterName(String chapterName) {
             obj.setChapterName(chapterName);
@@ -176,7 +185,7 @@ public class UploadBook implements Serializable {
          *
          * @param createTime the value for upload_book.create_time
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         public Builder createTime(Integer createTime) {
             obj.setCreateTime(createTime);
@@ -189,7 +198,7 @@ public class UploadBook implements Serializable {
          *
          * @param updateTime the value for upload_book.update_time
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         public Builder updateTime(Integer updateTime) {
             obj.setUpdateTime(updateTime);
@@ -202,7 +211,7 @@ public class UploadBook implements Serializable {
          *
          * @param words the value for upload_book.words
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         public Builder words(Integer words) {
             obj.setWords(words);
@@ -215,7 +224,7 @@ public class UploadBook implements Serializable {
          *
          * @param readAble the value for upload_book.read_able
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         public Builder readAble(Integer readAble) {
             obj.setReadAble(readAble);
@@ -228,20 +237,33 @@ public class UploadBook implements Serializable {
          *
          * @param chapterId the value for upload_book.chapter_id
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         public Builder chapterId(Long chapterId) {
             obj.setChapterId(chapterId);
             return this;
         }
 
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column upload_book.num
+         *
+         * @param num the value for upload_book.num
+         *
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
+         */
+        public Builder num(Integer num) {
+            obj.setNum(num);
+            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 Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         public Builder content(String content) {
             obj.setContent(content);
@@ -252,7 +274,7 @@ public class UploadBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         public UploadBook build() {
             return this.obj;
@@ -263,7 +285,7 @@ public class UploadBook implements Serializable {
      * This enum was generated by MyBatis Generator.
      * This enum corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public enum Column {
         id("id", "id", "BIGINT", false),
@@ -274,13 +296,14 @@ public class UploadBook implements Serializable {
         words("words", "words", "INTEGER", false),
         readAble("read_able", "readAble", "INTEGER", false),
         chapterId("chapter_id", "chapterId", "BIGINT", false),
+        num("num", "num", "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 Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         private static final String BEGINNING_DELIMITER = "\"";
 
@@ -288,7 +311,7 @@ public class UploadBook implements Serializable {
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         private static final String ENDING_DELIMITER = "\"";
 
@@ -296,7 +319,7 @@ public class UploadBook implements Serializable {
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         private final String column;
 
@@ -304,7 +327,7 @@ public class UploadBook implements Serializable {
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         private final boolean isColumnNameDelimited;
 
@@ -312,7 +335,7 @@ public class UploadBook implements Serializable {
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         private final String javaProperty;
 
@@ -320,7 +343,7 @@ public class UploadBook implements Serializable {
          * This field was generated by MyBatis Generator.
          * This field corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         private final String jdbcType;
 
@@ -328,7 +351,7 @@ public class UploadBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         public String value() {
             return this.column;
@@ -338,7 +361,7 @@ public class UploadBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         public String getValue() {
             return this.column;
@@ -348,7 +371,7 @@ public class UploadBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         public String getJavaProperty() {
             return this.javaProperty;
@@ -358,7 +381,7 @@ public class UploadBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         public String getJdbcType() {
             return this.jdbcType;
@@ -368,7 +391,7 @@ public class UploadBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
             this.column = column;
@@ -381,7 +404,7 @@ public class UploadBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         public String desc() {
             return this.getEscapedColumnName() + " DESC";
@@ -391,7 +414,7 @@ public class UploadBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         public String asc() {
             return this.getEscapedColumnName() + " ASC";
@@ -401,7 +424,7 @@ public class UploadBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         public static Column[] excludes(Column ... excludes) {
             ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
@@ -415,7 +438,7 @@ public class UploadBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         public static Column[] all() {
             return Column.values();
@@ -425,7 +448,7 @@ public class UploadBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         public String getEscapedColumnName() {
             if (this.isColumnNameDelimited) {
@@ -439,7 +462,7 @@ public class UploadBook implements Serializable {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         public String getAliasedEscapedColumnName() {
             return this.getEscapedColumnName();

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

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

+ 130 - 40
book-dao/src/main/java/com/book/dao/cps/pojo/example/UploadBookExample.java

@@ -9,7 +9,7 @@ public class UploadBookExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     protected String orderByClause;
 
@@ -17,7 +17,7 @@ public class UploadBookExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     protected boolean distinct;
 
@@ -25,7 +25,7 @@ public class UploadBookExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     protected List<Criteria> oredCriteria;
 
@@ -33,7 +33,7 @@ public class UploadBookExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     protected Integer offset;
 
@@ -41,7 +41,7 @@ public class UploadBookExample {
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     protected Integer rows;
 
@@ -49,7 +49,7 @@ public class UploadBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public UploadBookExample() {
         oredCriteria = new ArrayList<Criteria>();
@@ -59,7 +59,7 @@ public class UploadBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public void setOrderByClause(String orderByClause) {
         this.orderByClause = orderByClause;
@@ -69,7 +69,7 @@ public class UploadBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public String getOrderByClause() {
         return orderByClause;
@@ -79,7 +79,7 @@ public class UploadBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public void setDistinct(boolean distinct) {
         this.distinct = distinct;
@@ -89,7 +89,7 @@ public class UploadBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public boolean isDistinct() {
         return distinct;
@@ -99,7 +99,7 @@ public class UploadBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public List<Criteria> getOredCriteria() {
         return oredCriteria;
@@ -109,7 +109,7 @@ public class UploadBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public void or(Criteria criteria) {
         oredCriteria.add(criteria);
@@ -119,7 +119,7 @@ public class UploadBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public Criteria or() {
         Criteria criteria = createCriteriaInternal();
@@ -131,7 +131,7 @@ public class UploadBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public UploadBookExample orderBy(String orderByClause) {
         this.setOrderByClause(orderByClause);
@@ -142,7 +142,7 @@ public class UploadBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public UploadBookExample orderBy(String ... orderByClauses) {
         StringBuffer sb = new StringBuffer();
@@ -160,7 +160,7 @@ public class UploadBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public Criteria createCriteria() {
         Criteria criteria = createCriteriaInternal();
@@ -174,7 +174,7 @@ public class UploadBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     protected Criteria createCriteriaInternal() {
         Criteria criteria = new Criteria(this);
@@ -185,7 +185,7 @@ public class UploadBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public void clear() {
         oredCriteria.clear();
@@ -199,7 +199,7 @@ public class UploadBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public void setOffset(Integer offset) {
         this.offset = offset;
@@ -209,7 +209,7 @@ public class UploadBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public Integer getOffset() {
         return this.offset;
@@ -219,7 +219,7 @@ public class UploadBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public void setRows(Integer rows) {
         this.rows = rows;
@@ -229,7 +229,7 @@ public class UploadBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public Integer getRows() {
         return this.rows;
@@ -239,7 +239,7 @@ public class UploadBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public UploadBookExample limit(Integer rows) {
         this.rows = rows;
@@ -250,7 +250,7 @@ public class UploadBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public UploadBookExample limit(Integer offset, Integer rows) {
         this.offset = offset;
@@ -262,7 +262,7 @@ public class UploadBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public UploadBookExample page(Integer page, Integer pageSize) {
         this.offset = page * pageSize;
@@ -274,7 +274,7 @@ public class UploadBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public static Criteria newAndCreateCriteria() {
         UploadBookExample example = new UploadBookExample();
@@ -285,7 +285,7 @@ public class UploadBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public UploadBookExample when(boolean condition, IExampleWhen then) {
         if (condition) {
@@ -298,7 +298,7 @@ public class UploadBookExample {
      * This method was generated by MyBatis Generator.
      * This method corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public UploadBookExample when(boolean condition, IExampleWhen then, IExampleWhen otherwise) {
         if (condition) {
@@ -313,7 +313,7 @@ public class UploadBookExample {
      * This class was generated by MyBatis Generator.
      * This class corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     protected abstract static class GeneratedCriteria {
         protected List<Criterion> criteria;
@@ -1085,20 +1085,110 @@ public class UploadBookExample {
             addCriterion("chapter_id not between", value1, value2, "chapterId");
             return (Criteria) this;
         }
+
+        public Criteria andNumIsNull() {
+            addCriterion("num is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNumIsNotNull() {
+            addCriterion("num is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNumEqualTo(Integer value) {
+            addCriterion("num =", value, "num");
+            return (Criteria) this;
+        }
+
+        public Criteria andNumEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("num = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andNumNotEqualTo(Integer value) {
+            addCriterion("num <>", value, "num");
+            return (Criteria) this;
+        }
+
+        public Criteria andNumNotEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("num <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andNumGreaterThan(Integer value) {
+            addCriterion("num >", value, "num");
+            return (Criteria) this;
+        }
+
+        public Criteria andNumGreaterThanColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("num > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andNumGreaterThanOrEqualTo(Integer value) {
+            addCriterion("num >=", value, "num");
+            return (Criteria) this;
+        }
+
+        public Criteria andNumGreaterThanOrEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("num >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andNumLessThan(Integer value) {
+            addCriterion("num <", value, "num");
+            return (Criteria) this;
+        }
+
+        public Criteria andNumLessThanColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("num < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andNumLessThanOrEqualTo(Integer value) {
+            addCriterion("num <=", value, "num");
+            return (Criteria) this;
+        }
+
+        public Criteria andNumLessThanOrEqualToColumn(UploadBook.Column column) {
+            addCriterion(new StringBuilder("num <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andNumIn(List<Integer> values) {
+            addCriterion("num in", values, "num");
+            return (Criteria) this;
+        }
+
+        public Criteria andNumNotIn(List<Integer> values) {
+            addCriterion("num not in", values, "num");
+            return (Criteria) this;
+        }
+
+        public Criteria andNumBetween(Integer value1, Integer value2) {
+            addCriterion("num between", value1, value2, "num");
+            return (Criteria) this;
+        }
+
+        public Criteria andNumNotBetween(Integer value1, Integer value2) {
+            addCriterion("num not between", value1, value2, "num");
+            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 Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated do_not_delete_during_merge Sat Sep 04 21:49:54 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 Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         private UploadBookExample example;
 
@@ -1106,7 +1196,7 @@ public class UploadBookExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         protected Criteria(UploadBookExample example) {
             super();
@@ -1117,7 +1207,7 @@ public class UploadBookExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         public UploadBookExample example() {
             return this.example;
@@ -1127,7 +1217,7 @@ public class UploadBookExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         @Deprecated
         public Criteria andIf(boolean ifAdd, ICriteriaAdd add) {
@@ -1141,7 +1231,7 @@ public class UploadBookExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         public Criteria when(boolean condition, ICriteriaWhen then) {
             if (condition) {
@@ -1154,7 +1244,7 @@ public class UploadBookExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         public Criteria when(boolean condition, ICriteriaWhen then, ICriteriaWhen otherwise) {
             if (condition) {
@@ -1171,7 +1261,7 @@ public class UploadBookExample {
              * This method was generated by MyBatis Generator.
              * This method corresponds to the database table upload_book
              *
-             * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+             * @mbg.generated Sat Sep 04 21:49:54 CST 2021
              */
             Criteria add(Criteria add);
         }
@@ -1181,7 +1271,7 @@ public class UploadBookExample {
      * This class was generated by MyBatis Generator.
      * This class corresponds to the database table upload_book
      *
-     * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+     * @mbg.generated Sat Sep 04 21:49:54 CST 2021
      */
     public static class Criterion {
         private String condition;
@@ -1274,7 +1364,7 @@ public class UploadBookExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         void criteria(Criteria criteria);
     }
@@ -1284,7 +1374,7 @@ public class UploadBookExample {
          * This method was generated by MyBatis Generator.
          * This method corresponds to the database table upload_book
          *
-         * @mbg.generated Thu Aug 26 23:53:37 CST 2021
+         * @mbg.generated Sat Sep 04 21:49:54 CST 2021
          */
         void example(com.book.dao.cps.pojo.example.UploadBookExample example);
     }

+ 80 - 47
book-dao/src/main/resources/mapper/cps/UploadBookMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     <id column="id" jdbcType="BIGINT" property="id" />
     <id column="book_id" jdbcType="BIGINT" property="bookId" />
@@ -15,12 +15,13 @@
     <result column="words" jdbcType="INTEGER" property="words" />
     <result column="read_able" jdbcType="INTEGER" property="readAble" />
     <result column="chapter_id" jdbcType="BIGINT" property="chapterId" />
+    <result column="num" jdbcType="INTEGER" property="num" />
   </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 Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     <result column="content" jdbcType="LONGVARCHAR" property="content" />
   </resultMap>
@@ -28,7 +29,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -62,7 +63,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -96,15 +97,16 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
-    id, book_id, chapter_name, create_time, update_time, words, read_able, chapter_id
+    id, book_id, chapter_name, create_time, update_time, words, read_able, chapter_id, 
+    num
   </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 Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     content
   </sql>
@@ -112,7 +114,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     select
     <if test="distinct">
@@ -141,7 +143,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     select
     <if test="distinct">
@@ -168,7 +170,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     select
     <if test="example != null and example.distinct">
@@ -206,7 +208,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -220,7 +222,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     select
     <choose>
@@ -243,7 +245,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     delete from upload_book
     where id = #{id,jdbcType=BIGINT}
@@ -253,7 +255,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     delete from upload_book
     <if test="_parameter != null">
@@ -264,22 +266,22 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     insert into upload_book (id, book_id, chapter_name, 
       create_time, update_time, words, 
-      read_able, chapter_id, content
-      )
+      read_able, chapter_id, num, 
+      content)
     values (#{id,jdbcType=BIGINT}, #{bookId,jdbcType=BIGINT}, #{chapterName,jdbcType=VARCHAR}, 
       #{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, #{words,jdbcType=INTEGER}, 
-      #{readAble,jdbcType=INTEGER}, #{chapterId,jdbcType=BIGINT}, #{content,jdbcType=LONGVARCHAR}
-      )
+      #{readAble,jdbcType=INTEGER}, #{chapterId,jdbcType=BIGINT}, #{num,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 Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     insert into upload_book
     <choose>
@@ -314,6 +316,9 @@
           <if test="record.chapterId != null">
             chapter_id,
           </if>
+          <if test="record.num != null">
+            num,
+          </if>
           <if test="record.content != null">
             content,
           </if>
@@ -354,6 +359,9 @@
           <if test="record.chapterId != null">
             #{record.chapterId,jdbcType=BIGINT},
           </if>
+          <if test="record.num != null">
+            #{record.num,jdbcType=INTEGER},
+          </if>
           <if test="record.content != null">
             #{record.content,jdbcType=LONGVARCHAR},
           </if>
@@ -365,7 +373,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     select count(*) from upload_book
     <if test="_parameter != null">
@@ -376,7 +384,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     update upload_book
     SET
@@ -412,6 +420,9 @@
           <if test="record.chapterId != null">
             chapter_id = #{record.chapterId,jdbcType=BIGINT},
           </if>
+          <if test="record.num != null">
+            num = #{record.num,jdbcType=INTEGER},
+          </if>
           <if test="record.content != null">
             content = #{record.content,jdbcType=LONGVARCHAR},
           </if>
@@ -426,7 +437,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     update upload_book
     set id = #{record.id,jdbcType=BIGINT},
@@ -437,6 +448,7 @@
       words = #{record.words,jdbcType=INTEGER},
       read_able = #{record.readAble,jdbcType=INTEGER},
       chapter_id = #{record.chapterId,jdbcType=BIGINT},
+      num = #{record.num,jdbcType=INTEGER},
       content = #{record.content,jdbcType=LONGVARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -446,7 +458,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     update upload_book
     set id = #{record.id,jdbcType=BIGINT},
@@ -456,7 +468,8 @@
       update_time = #{record.updateTime,jdbcType=INTEGER},
       words = #{record.words,jdbcType=INTEGER},
       read_able = #{record.readAble,jdbcType=INTEGER},
-      chapter_id = #{record.chapterId,jdbcType=BIGINT}
+      chapter_id = #{record.chapterId,jdbcType=BIGINT},
+      num = #{record.num,jdbcType=INTEGER}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -465,7 +478,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     update upload_book
     SET
@@ -495,6 +508,9 @@
           <if test="record.chapterId != null">
             chapter_id = #{record.chapterId,jdbcType=BIGINT},
           </if>
+          <if test="record.num != null">
+            num = #{record.num,jdbcType=INTEGER},
+          </if>
           <if test="record.content != null">
             content = #{record.content,jdbcType=LONGVARCHAR},
           </if>
@@ -508,7 +524,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     update upload_book
     set chapter_name = #{chapterName,jdbcType=VARCHAR},
@@ -517,6 +533,7 @@
       words = #{words,jdbcType=INTEGER},
       read_able = #{readAble,jdbcType=INTEGER},
       chapter_id = #{chapterId,jdbcType=BIGINT},
+      num = #{num,jdbcType=INTEGER},
       content = #{content,jdbcType=LONGVARCHAR}
     where id = #{id,jdbcType=BIGINT}
       and book_id = #{bookId,jdbcType=BIGINT}
@@ -525,7 +542,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     update upload_book
     set chapter_name = #{chapterName,jdbcType=VARCHAR},
@@ -533,7 +550,8 @@
       update_time = #{updateTime,jdbcType=INTEGER},
       words = #{words,jdbcType=INTEGER},
       read_able = #{readAble,jdbcType=INTEGER},
-      chapter_id = #{chapterId,jdbcType=BIGINT}
+      chapter_id = #{chapterId,jdbcType=BIGINT},
+      num = #{num,jdbcType=INTEGER}
     where id = #{id,jdbcType=BIGINT}
       and book_id = #{bookId,jdbcType=BIGINT}
   </update>
@@ -541,7 +559,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     select
     <include refid="Base_Column_List" />
@@ -558,7 +576,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     select
     <include refid="Base_Column_List" />
@@ -577,7 +595,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     select
     <choose>
@@ -605,24 +623,24 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     insert into upload_book
     (id, book_id, chapter_name, create_time, update_time, words, read_able, chapter_id, 
-      content)
+      num, content)
     values
     <foreach collection="list" item="item" separator=",">
       (#{item.id,jdbcType=BIGINT}, #{item.bookId,jdbcType=BIGINT}, #{item.chapterName,jdbcType=VARCHAR}, 
         #{item.createTime,jdbcType=INTEGER}, #{item.updateTime,jdbcType=INTEGER}, #{item.words,jdbcType=INTEGER}, 
-        #{item.readAble,jdbcType=INTEGER}, #{item.chapterId,jdbcType=BIGINT}, #{item.content,jdbcType=LONGVARCHAR}
-        )
+        #{item.readAble,jdbcType=INTEGER}, #{item.chapterId,jdbcType=BIGINT}, #{item.num,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 Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     insert into upload_book (
     <foreach collection="selective" item="column" separator=",">
@@ -657,6 +675,9 @@
         <if test="'chapter_id'.toString() == column.value">
           #{item.chapterId,jdbcType=BIGINT}
         </if>
+        <if test="'num'.toString() == column.value">
+          #{item.num,jdbcType=INTEGER}
+        </if>
         <if test="'content'.toString() == column.value">
           #{item.content,jdbcType=LONGVARCHAR}
         </if>
@@ -668,7 +689,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     insert into upload_book
     <choose>
@@ -703,6 +724,9 @@
           <if test="record.chapterId != null">
             chapter_id,
           </if>
+          <if test="record.num != null">
+            num,
+          </if>
           <if test="record.content != null">
             content,
           </if>
@@ -743,6 +767,9 @@
           <if test="record.chapterId != null">
             #{record.chapterId,jdbcType=BIGINT},
           </if>
+          <if test="record.num != null">
+            #{record.num,jdbcType=INTEGER},
+          </if>
           <if test="record.content != null">
             #{record.content,jdbcType=LONGVARCHAR},
           </if>
@@ -782,6 +809,9 @@
           <if test="record.chapterId != null">
             chapter_id = #{record.chapterId,jdbcType=BIGINT},
           </if>
+          <if test="record.num != null">
+            num = #{record.num,jdbcType=INTEGER},
+          </if>
           <if test="record.content != null">
             content = #{record.content,jdbcType=LONGVARCHAR},
           </if>
@@ -793,15 +823,16 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     insert into upload_book
-    (id, book_id, chapter_name, create_time, update_time, words, read_able, chapter_id
-      )
+    (id, book_id, chapter_name, create_time, update_time, words, read_able, chapter_id, 
+      num)
     values
     (#{id,jdbcType=BIGINT}, #{bookId,jdbcType=BIGINT}, #{chapterName,jdbcType=VARCHAR}, 
       #{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, #{words,jdbcType=INTEGER}, 
-      #{readAble,jdbcType=INTEGER}, #{chapterId,jdbcType=BIGINT})
+      #{readAble,jdbcType=INTEGER}, #{chapterId,jdbcType=BIGINT}, #{num,jdbcType=INTEGER}
+      )
     on duplicate key update 
     id = #{id,jdbcType=BIGINT}, 
     book_id = #{bookId,jdbcType=BIGINT}, 
@@ -810,22 +841,23 @@
     update_time = #{updateTime,jdbcType=INTEGER}, 
     words = #{words,jdbcType=INTEGER}, 
     read_able = #{readAble,jdbcType=INTEGER}, 
-    chapter_id = #{chapterId,jdbcType=BIGINT}
+    chapter_id = #{chapterId,jdbcType=BIGINT}, 
+    num = #{num,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 Thu Aug 26 23:53:37 CST 2021.
+      This element was generated on Sat Sep 04 21:49:54 CST 2021.
     -->
     insert into upload_book
     (id, book_id, chapter_name, create_time, update_time, words, read_able, chapter_id, 
-      content)
+      num, content)
     values
     (#{id,jdbcType=BIGINT}, #{bookId,jdbcType=BIGINT}, #{chapterName,jdbcType=VARCHAR}, 
       #{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, #{words,jdbcType=INTEGER}, 
-      #{readAble,jdbcType=INTEGER}, #{chapterId,jdbcType=BIGINT}, #{content,jdbcType=LONGVARCHAR}
-      )
+      #{readAble,jdbcType=INTEGER}, #{chapterId,jdbcType=BIGINT}, #{num,jdbcType=INTEGER}, 
+      #{content,jdbcType=LONGVARCHAR})
     on duplicate key update 
     id = #{id,jdbcType=BIGINT}, 
     book_id = #{bookId,jdbcType=BIGINT}, 
@@ -835,6 +867,7 @@
     words = #{words,jdbcType=INTEGER}, 
     read_able = #{readAble,jdbcType=INTEGER}, 
     chapter_id = #{chapterId,jdbcType=BIGINT}, 
+    num = #{num,jdbcType=INTEGER}, 
     content = #{content,jdbcType=LONGVARCHAR}
   </insert>
 </mapper>

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

@@ -128,9 +128,9 @@
 <!--        <table tableName="return_recommand"></table>-->
 <!--        <table tableName="bookshelf_recommand"></table>-->
 <!--        <table tableName="smart_recommand"></table>-->
-<!--        <table tableName="upload_book"></table>-->
+        <table tableName="upload_book"></table>
 <!--        <table tableName="edit_book"></table>-->
-        <table tableName="login"></table>
+<!--        <table tableName="login"></table>-->
 <!--        <table tableName="goods"></table>-->
 <!--        <table tableName="user_read_config"></table>-->
 

+ 1 - 0
book-server/src/main/java/com/book/server/service/CacheService.java

@@ -133,6 +133,7 @@ public class CacheService {
                 chapter.setName(x.getChapterName());
                 chapter.setReadAble(x.getReadAble().toString());
                 chapter.setWords(x.getWords().toString());
+                chapter.setNum(x.getNum().toString());
                 list.add(chapter);
             });
             return list;

+ 6 - 3
book-server/src/main/java/com/book/server/service/impl/BookServiceImpl.java

@@ -45,6 +45,7 @@ import javax.annotation.PostConstruct;
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
+import java.nio.charset.StandardCharsets;
 import java.util.*;
 import java.util.concurrent.ExecutionException;
 import java.util.stream.Collectors;
@@ -268,7 +269,7 @@ public class BookServiceImpl implements BookService {
         if (freeChapterNum == null) { //查看默认配置
             freeChapterNum = getDefaultFreeChapterNum();
         }
-        if (bookContentVO.getNum() > freeChapterNum) {
+        if (bookContentVO.getNum()  >= freeChapterNum) {
             //收费
             //是否已购买
             Consume consume = consumeMapper.selectOneByExample(ConsumeExample.newAndCreateCriteria()
@@ -531,7 +532,7 @@ public class BookServiceImpl implements BookService {
         // 测试先清理数据
         uploadBookMapper.deleteByExample(UploadBookExample.newAndCreateCriteria().andBookIdEqualTo(bookId).example());
         // 读取所有行
-        BufferedReader bf = new BufferedReader(new InputStreamReader(file.getInputStream(), "GB2312"));
+        BufferedReader bf = new BufferedReader(new InputStreamReader(file.getInputStream(), "gbk"));
         String strTmp;
         LinkedList<String> list = new LinkedList<>();
         while ((strTmp = bf.readLine()) != null) {
@@ -578,6 +579,8 @@ public class BookServiceImpl implements BookService {
             uploadBook.setBookId(bookId);
             uploadBook.setChapterId(bookId + i);
             uploadBook.setChapterName(contentName);
+            uploadBook.setNum(chapterNum);
+
             uploadBook.setContent(sb.toString());
             uploadBook.setCreateTime(DateUtils.getNow());
             uploadBook.setUpdateTime(DateUtils.getNow());
@@ -624,7 +627,7 @@ public class BookServiceImpl implements BookService {
                         .image("封面")
                         .description(content.toString())
                         .referralNum((byte) 5)
-                        .appPrice(100)
+                        .price(100)
                         .chapterNum(chapterNum)
                         .wordCount(wordCount + "")
                         .firstChapterId(firstChapterId)