Parcourir la source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	book-server/src/main/java/com/book/server/controller/BookController.java
#	book-server/src/main/java/com/book/server/service/BookService.java
#	book-server/src/main/java/com/book/server/service/impl/BookServiceImpl.java
lijilei il y a 3 ans
Parent
commit
77d616fb3c

+ 1 - 1
bin/push_server.sh

@@ -1,4 +1,4 @@
-#mvn clean package -Dmaven.test.skip=true
+mvn clean package -Dmaven.test.skip=true
 
 remote=root@121.41.100.198
 remoteDir=/app/book-server

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

@@ -6,6 +6,7 @@ import com.book.server.common.entity.Result;
 import com.book.server.common.entity.ResultCode;
 import com.book.server.dao.entity.Book;
 import com.book.server.model.VO.BlockRes;
+import com.book.server.model.VO.BookRes;
 import com.book.server.model.VO.Chapter;
 import com.book.server.model.VO.QueryVO;
 import com.book.server.service.BookService;
@@ -37,8 +38,8 @@ public class BookController extends BaseController {
      * @return
      */
     @PostMapping("/query")
-    public PageResult<Book> query(@RequestBody QueryVO queryVO) {
-        return bookService.query(queryVO);
+    public Result<PageResult<BookRes>> query(@RequestBody QueryVO queryVO) {
+        return Result.success(bookService.query(queryVO));
     }
 
     /**
@@ -48,9 +49,8 @@ public class BookController extends BaseController {
      * @return
      */
     @PostMapping("/recommend")
-    public PageResult<Book> recommendByRead(@RequestBody QueryVO queryVO, String pageId) {
-        queryVO.setSex(pageId);
-        return bookService.recommendByRead(queryVO);
+    public Result<PageResult<Book>> recommendByRead(@RequestBody QueryVO queryVO) {
+        return Result.success(bookService.recommendByRead(queryVO));
     }
 
     /**
@@ -67,13 +67,13 @@ public class BookController extends BaseController {
     }
 
     /**
-     * 移除block缓存
+     * 更新block缓存
      *
      * @return
      */
-    @GetMapping("/removeBlockCache")
+    @GetMapping("/resetBlockCache")
     @CacheEvict(value = "block", allEntries = true)
-    public Result removeBlockCache() {
+    public Result resetBlockCache() {
         return Result.byObject("OK");
     }
 

+ 425 - 0
book-server/src/main/java/com/book/server/dao/entity/BookCategory.java

@@ -0,0 +1,425 @@
+package com.book.server.dao.entity;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Arrays;
+import lombok.Data;
+
+@Data
+public class BookCategory implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column book_category.id
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    private Integer id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column book_category.name
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    private String name;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column book_category.image
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    private String image;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column book_category.sex
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    private String sex;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column book_category.weigh
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    private Integer weigh;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column book_category.status
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    private String status;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column book_category.createtime
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    private Integer createtime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column book_category.updatetime
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    private Integer updatetime;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    public static BookCategory.Builder builder() {
+        return new BookCategory.Builder();
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    public static class Builder {
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        private BookCategory obj;
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        public Builder() {
+            this.obj = new BookCategory();
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column book_category.id
+         *
+         * @param id the value for book_category.id
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        public Builder id(Integer id) {
+            obj.setId(id);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column book_category.name
+         *
+         * @param name the value for book_category.name
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        public Builder name(String name) {
+            obj.setName(name);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column book_category.image
+         *
+         * @param image the value for book_category.image
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        public Builder image(String image) {
+            obj.setImage(image);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column book_category.sex
+         *
+         * @param sex the value for book_category.sex
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        public Builder sex(String sex) {
+            obj.setSex(sex);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column book_category.weigh
+         *
+         * @param weigh the value for book_category.weigh
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        public Builder weigh(Integer weigh) {
+            obj.setWeigh(weigh);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column book_category.status
+         *
+         * @param status the value for book_category.status
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        public Builder status(String status) {
+            obj.setStatus(status);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column book_category.createtime
+         *
+         * @param createtime the value for book_category.createtime
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        public Builder createtime(Integer createtime) {
+            obj.setCreatetime(createtime);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column book_category.updatetime
+         *
+         * @param updatetime the value for book_category.updatetime
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        public Builder updatetime(Integer updatetime) {
+            obj.setUpdatetime(updatetime);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        public BookCategory build() {
+            return this.obj;
+        }
+    }
+
+    /**
+     * This enum was generated by MyBatis Generator.
+     * This enum corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    public enum Column {
+        id("id", "id", "INTEGER", false),
+        name("name", "name", "VARCHAR", false),
+        image("image", "image", "VARCHAR", false),
+        sex("sex", "sex", "CHAR", false),
+        weigh("weigh", "weigh", "INTEGER", false),
+        status("status", "status", "CHAR", false),
+        createtime("createtime", "createtime", "INTEGER", false),
+        updatetime("updatetime", "updatetime", "INTEGER", false);
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        private static final String BEGINNING_DELIMITER = "\"";
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        private static final String ENDING_DELIMITER = "\"";
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        private final String column;
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        private final boolean isColumnNameDelimited;
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        private final String javaProperty;
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        private final String jdbcType;
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        public String value() {
+            return this.column;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        public String getValue() {
+            return this.column;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        public String getJavaProperty() {
+            return this.javaProperty;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        public String getJdbcType() {
+            return this.jdbcType;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 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 book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        public String desc() {
+            return this.getEscapedColumnName() + " DESC";
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        public String asc() {
+            return this.getEscapedColumnName() + " ASC";
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 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 book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        public static Column[] all() {
+            return Column.values();
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 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 book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        public String getAliasedEscapedColumnName() {
+            return this.getEscapedColumnName();
+        }
+    }
+}

+ 1321 - 0
book-server/src/main/java/com/book/server/dao/entity/example/BookCategoryExample.java

@@ -0,0 +1,1321 @@
+package com.book.server.dao.entity.example;
+
+import com.book.server.dao.entity.BookCategory;
+import java.util.ArrayList;
+import java.util.List;
+
+public class BookCategoryExample {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    protected String orderByClause;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    protected boolean distinct;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    protected Integer offset;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    protected Integer rows;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    public BookCategoryExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 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 book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    public BookCategoryExample orderBy(String orderByClause) {
+        this.setOrderByClause(orderByClause);
+        return this;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    public BookCategoryExample 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 book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 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 book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 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 book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 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 book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    public void setOffset(Integer offset) {
+        this.offset = offset;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    public Integer getOffset() {
+        return this.offset;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    public void setRows(Integer rows) {
+        this.rows = rows;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    public Integer getRows() {
+        return this.rows;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    public BookCategoryExample limit(Integer rows) {
+        this.rows = rows;
+        return this;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    public BookCategoryExample 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 book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    public BookCategoryExample 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 book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    public static Criteria newAndCreateCriteria() {
+        BookCategoryExample example = new BookCategoryExample();
+        return example.createCriteria();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    public BookCategoryExample 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 book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    public BookCategoryExample 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 book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 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(Integer value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("id = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Integer value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("id <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Integer value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("id > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("id >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Integer value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("id < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Integer value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("id <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Integer> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Integer> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Integer value1, Integer value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Integer value1, Integer value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIsNull() {
+            addCriterion("name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIsNotNull() {
+            addCriterion("name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameEqualTo(String value) {
+            addCriterion("name =", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("name = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotEqualTo(String value) {
+            addCriterion("name <>", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("name <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThan(String value) {
+            addCriterion("name >", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThanColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("name > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThanOrEqualTo(String value) {
+            addCriterion("name >=", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThanOrEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("name >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThan(String value) {
+            addCriterion("name <", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThanColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("name < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThanOrEqualTo(String value) {
+            addCriterion("name <=", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThanOrEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("name <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLike(String value) {
+            addCriterion("name like", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotLike(String value) {
+            addCriterion("name not like", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIn(List<String> values) {
+            addCriterion("name in", values, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotIn(List<String> values) {
+            addCriterion("name not in", values, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameBetween(String value1, String value2) {
+            addCriterion("name between", value1, value2, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotBetween(String value1, String value2) {
+            addCriterion("name not between", value1, value2, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageIsNull() {
+            addCriterion("image is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageIsNotNull() {
+            addCriterion("image is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageEqualTo(String value) {
+            addCriterion("image =", value, "image");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("image = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andImageNotEqualTo(String value) {
+            addCriterion("image <>", value, "image");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageNotEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("image <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andImageGreaterThan(String value) {
+            addCriterion("image >", value, "image");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageGreaterThanColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("image > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andImageGreaterThanOrEqualTo(String value) {
+            addCriterion("image >=", value, "image");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageGreaterThanOrEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("image >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andImageLessThan(String value) {
+            addCriterion("image <", value, "image");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageLessThanColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("image < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andImageLessThanOrEqualTo(String value) {
+            addCriterion("image <=", value, "image");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageLessThanOrEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("image <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andImageLike(String value) {
+            addCriterion("image like", value, "image");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageNotLike(String value) {
+            addCriterion("image not like", value, "image");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageIn(List<String> values) {
+            addCriterion("image in", values, "image");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageNotIn(List<String> values) {
+            addCriterion("image not in", values, "image");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageBetween(String value1, String value2) {
+            addCriterion("image between", value1, value2, "image");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageNotBetween(String value1, String value2) {
+            addCriterion("image not between", value1, value2, "image");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexIsNull() {
+            addCriterion("sex is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexIsNotNull() {
+            addCriterion("sex is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexEqualTo(String value) {
+            addCriterion("sex =", value, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("sex = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andSexNotEqualTo(String value) {
+            addCriterion("sex <>", value, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexNotEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("sex <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andSexGreaterThan(String value) {
+            addCriterion("sex >", value, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexGreaterThanColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("sex > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andSexGreaterThanOrEqualTo(String value) {
+            addCriterion("sex >=", value, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexGreaterThanOrEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("sex >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andSexLessThan(String value) {
+            addCriterion("sex <", value, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexLessThanColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("sex < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andSexLessThanOrEqualTo(String value) {
+            addCriterion("sex <=", value, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexLessThanOrEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("sex <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andSexLike(String value) {
+            addCriterion("sex like", value, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexNotLike(String value) {
+            addCriterion("sex not like", value, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexIn(List<String> values) {
+            addCriterion("sex in", values, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexNotIn(List<String> values) {
+            addCriterion("sex not in", values, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexBetween(String value1, String value2) {
+            addCriterion("sex between", value1, value2, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexNotBetween(String value1, String value2) {
+            addCriterion("sex not between", value1, value2, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeighIsNull() {
+            addCriterion("weigh is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeighIsNotNull() {
+            addCriterion("weigh is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeighEqualTo(Integer value) {
+            addCriterion("weigh =", value, "weigh");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeighEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("weigh = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andWeighNotEqualTo(Integer value) {
+            addCriterion("weigh <>", value, "weigh");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeighNotEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("weigh <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andWeighGreaterThan(Integer value) {
+            addCriterion("weigh >", value, "weigh");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeighGreaterThanColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("weigh > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andWeighGreaterThanOrEqualTo(Integer value) {
+            addCriterion("weigh >=", value, "weigh");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeighGreaterThanOrEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("weigh >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andWeighLessThan(Integer value) {
+            addCriterion("weigh <", value, "weigh");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeighLessThanColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("weigh < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andWeighLessThanOrEqualTo(Integer value) {
+            addCriterion("weigh <=", value, "weigh");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeighLessThanOrEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("weigh <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andWeighIn(List<Integer> values) {
+            addCriterion("weigh in", values, "weigh");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeighNotIn(List<Integer> values) {
+            addCriterion("weigh not in", values, "weigh");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeighBetween(Integer value1, Integer value2) {
+            addCriterion("weigh between", value1, value2, "weigh");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeighNotBetween(Integer value1, Integer value2) {
+            addCriterion("weigh not between", value1, value2, "weigh");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNull() {
+            addCriterion("status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNotNull() {
+            addCriterion("status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusEqualTo(String value) {
+            addCriterion("status =", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("status = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotEqualTo(String value) {
+            addCriterion("status <>", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("status <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThan(String value) {
+            addCriterion("status >", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThanColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("status > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThanOrEqualTo(String value) {
+            addCriterion("status >=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThanOrEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("status >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThan(String value) {
+            addCriterion("status <", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThanColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("status < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThanOrEqualTo(String value) {
+            addCriterion("status <=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThanOrEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("status <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLike(String value) {
+            addCriterion("status like", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotLike(String value) {
+            addCriterion("status not like", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIn(List<String> values) {
+            addCriterion("status in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotIn(List<String> values) {
+            addCriterion("status not in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusBetween(String value1, String value2) {
+            addCriterion("status between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotBetween(String value1, String value2) {
+            addCriterion("status not between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatetimeIsNull() {
+            addCriterion("createtime is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatetimeIsNotNull() {
+            addCriterion("createtime is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatetimeEqualTo(Integer value) {
+            addCriterion("createtime =", value, "createtime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatetimeEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("createtime = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatetimeNotEqualTo(Integer value) {
+            addCriterion("createtime <>", value, "createtime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatetimeNotEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("createtime <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatetimeGreaterThan(Integer value) {
+            addCriterion("createtime >", value, "createtime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatetimeGreaterThanColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("createtime > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatetimeGreaterThanOrEqualTo(Integer value) {
+            addCriterion("createtime >=", value, "createtime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatetimeGreaterThanOrEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("createtime >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatetimeLessThan(Integer value) {
+            addCriterion("createtime <", value, "createtime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatetimeLessThanColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("createtime < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatetimeLessThanOrEqualTo(Integer value) {
+            addCriterion("createtime <=", value, "createtime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatetimeLessThanOrEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("createtime <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatetimeIn(List<Integer> values) {
+            addCriterion("createtime in", values, "createtime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatetimeNotIn(List<Integer> values) {
+            addCriterion("createtime not in", values, "createtime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatetimeBetween(Integer value1, Integer value2) {
+            addCriterion("createtime between", value1, value2, "createtime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatetimeNotBetween(Integer value1, Integer value2) {
+            addCriterion("createtime not between", value1, value2, "createtime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatetimeIsNull() {
+            addCriterion("updatetime is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatetimeIsNotNull() {
+            addCriterion("updatetime is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatetimeEqualTo(Integer value) {
+            addCriterion("updatetime =", value, "updatetime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatetimeEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("updatetime = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatetimeNotEqualTo(Integer value) {
+            addCriterion("updatetime <>", value, "updatetime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatetimeNotEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("updatetime <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatetimeGreaterThan(Integer value) {
+            addCriterion("updatetime >", value, "updatetime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatetimeGreaterThanColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("updatetime > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatetimeGreaterThanOrEqualTo(Integer value) {
+            addCriterion("updatetime >=", value, "updatetime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatetimeGreaterThanOrEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("updatetime >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatetimeLessThan(Integer value) {
+            addCriterion("updatetime <", value, "updatetime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatetimeLessThanColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("updatetime < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatetimeLessThanOrEqualTo(Integer value) {
+            addCriterion("updatetime <=", value, "updatetime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatetimeLessThanOrEqualToColumn(BookCategory.Column column) {
+            addCriterion(new StringBuilder("updatetime <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatetimeIn(List<Integer> values) {
+            addCriterion("updatetime in", values, "updatetime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatetimeNotIn(List<Integer> values) {
+            addCriterion("updatetime not in", values, "updatetime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatetimeBetween(Integer value1, Integer value2) {
+            addCriterion("updatetime between", value1, value2, "updatetime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdatetimeNotBetween(Integer value1, Integer value2) {
+            addCriterion("updatetime not between", value1, value2, "updatetime");
+            return (Criteria) this;
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table book_category
+     *
+     * @mbg.generated do_not_delete_during_merge Mon Aug 16 23:54:49 CST 2021
+     */
+    public static class Criteria extends GeneratedCriteria {
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        private BookCategoryExample example;
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        protected Criteria(BookCategoryExample example) {
+            super();
+            this.example = example;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        public BookCategoryExample example() {
+            return this.example;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 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 book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 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 book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 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 book_category
+             *
+             * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+             */
+            Criteria add(Criteria add);
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 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 book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        void criteria(Criteria criteria);
+    }
+
+    public interface IExampleWhen {
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table book_category
+         *
+         * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+         */
+        void example(com.book.server.dao.entity.example.BookCategoryExample example);
+    }
+}

+ 164 - 0
book-server/src/main/java/com/book/server/dao/mapper/BookCategoryMapper.java

@@ -0,0 +1,164 @@
+package com.book.server.dao.mapper;
+
+import com.book.server.dao.entity.BookCategory;
+import com.book.server.dao.entity.example.BookCategoryExample;
+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 BookCategoryMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    long countByExample(BookCategoryExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    int deleteByExample(BookCategoryExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    int deleteByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    int insert(BookCategory record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    int insertSelective(@Param("record") BookCategory record, @Param("selective") BookCategory.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    BookCategory selectOneByExample(BookCategoryExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    BookCategory selectOneByExampleSelective(@Param("example") BookCategoryExample example, @Param("selective") BookCategory.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    List<BookCategory> selectByExampleSelective(@Param("example") BookCategoryExample example, @Param("selective") BookCategory.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    List<BookCategory> selectByExample(BookCategoryExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    BookCategory selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") BookCategory.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    BookCategory selectByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    int updateByExampleSelective(@Param("record") BookCategory record, @Param("example") BookCategoryExample example, @Param("selective") BookCategory.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    int updateByExample(@Param("record") BookCategory record, @Param("example") BookCategoryExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    int updateByPrimaryKeySelective(@Param("record") BookCategory record, @Param("selective") BookCategory.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    int updateByPrimaryKey(BookCategory record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    int batchInsert(@Param("list") List<BookCategory> list);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    int batchInsertSelective(@Param("list") List<BookCategory> list, @Param("selective") BookCategory.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    int upsert(BookCategory record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table book_category
+     *
+     * @mbg.generated Mon Aug 16 23:54:49 CST 2021
+     */
+    int upsertSelective(@Param("record") BookCategory record, @Param("selective") BookCategory.Column ... selective);
+}

+ 15 - 0
book-server/src/main/java/com/book/server/dao/mapper/BookMapper2.java

@@ -0,0 +1,15 @@
+package com.book.server.dao.mapper;
+
+import com.book.server.dao.entity.Book;
+import com.book.server.dao.entity.example.BookExample;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Mapper
+@Repository
+public interface BookMapper2 {
+
+}

+ 1 - 1
book-server/src/main/java/com/book/server/model/VO/BlockRes.java

@@ -10,5 +10,5 @@ public class BlockRes {
     String name;
     String secondName;
     String type;
-    List<ManageBlockResource> resources;
+    List<ManageBlockResourceRes> resources;
 }

+ 9 - 0
book-server/src/main/java/com/book/server/model/VO/BookRes.java

@@ -0,0 +1,9 @@
+package com.book.server.model.VO;
+
+import com.book.server.dao.entity.Book;
+import lombok.Data;
+
+@Data
+public class BookRes extends Book {
+    String categoryName;
+}

+ 10 - 0
book-server/src/main/java/com/book/server/model/VO/ManageBlockResourceRes.java

@@ -0,0 +1,10 @@
+package com.book.server.model.VO;
+
+import com.book.server.dao.entity.ManageBlockResource;
+import lombok.Data;
+
+@Data
+public class ManageBlockResourceRes extends ManageBlockResource {
+    private String bookName;
+    private String bookDescription;
+}

+ 2 - 0
book-server/src/main/java/com/book/server/model/VO/QueryVO.java

@@ -12,4 +12,6 @@ public class QueryVO {
     int size;
 
     String sex;
+
+    String pageId;
 }

+ 3 - 1
book-server/src/main/java/com/book/server/service/BookService.java

@@ -3,13 +3,14 @@ package com.book.server.service;
 import com.book.server.common.entity.PageResult;
 import com.book.server.dao.entity.Book;
 import com.book.server.model.VO.BlockRes;
+import com.book.server.model.VO.BookRes;
 import com.book.server.model.VO.Chapter;
 import com.book.server.model.VO.QueryVO;
 
 import java.util.List;
 
 public interface BookService {
-    PageResult<Book> query(QueryVO queryVO);
+    PageResult<BookRes> query(QueryVO queryVO);
     PageResult<Book> recommendByRead(QueryVO queryVO);
 
     List<BlockRes> getBlockByPageId(Integer pageId);
@@ -17,4 +18,5 @@ public interface BookService {
     void insertBooks();
 
     List<Chapter> getChaptersByBookId(String bookId);
+
 }

+ 70 - 5
book-server/src/main/java/com/book/server/service/impl/BookServiceImpl.java

@@ -4,26 +4,39 @@ import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.book.server.common.entity.PageResult;
+import com.book.server.common.entity.Result;
 import com.book.server.dao.entity.Book;
+import com.book.server.dao.entity.BookCategory;
 import com.book.server.dao.entity.ManageBlock;
 import com.book.server.dao.entity.ManageBlockResource;
+import com.book.server.dao.entity.example.BookCategoryExample;
 import com.book.server.dao.entity.example.BookExample;
 import com.book.server.dao.entity.example.ManageBlockExample;
 import com.book.server.dao.entity.example.ManageBlockResourceExample;
+import com.book.server.dao.mapper.BookCategoryMapper;
 import com.book.server.dao.mapper.BookMapper;
 import com.book.server.dao.mapper.ManageBlockMapper;
 import com.book.server.dao.mapper.ManageBlockResourceMapper;
 import com.book.server.model.VO.BlockRes;
 import com.book.server.model.VO.Chapter;
+import com.book.server.model.VO.BookRes;
+import com.book.server.model.VO.ManageBlockResourceRes;
 import com.book.server.model.VO.QueryVO;
 import com.book.server.service.BookService;
 import com.book.server.utils.HttpTool;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.stream.Collectors;
 import java.util.*;
 
 @Service
@@ -37,9 +50,19 @@ public class BookServiceImpl implements BookService {
 
     @Autowired
     private ManageBlockResourceMapper manageBlockResourceMapper;
+    @Autowired
+    private BookCategoryMapper bookCategoryMapper;
+
+    public List<BookCategory> getAllCategory() {
+        List<BookCategory> bookCategories = bookCategoryMapper.selectByExample(
+                BookCategoryExample.newAndCreateCriteria().example()
+        );
+        return bookCategories;
+    }
+
 
     @Override
-    public PageResult<Book> query(QueryVO queryVO) {
+    public PageResult<BookRes> query(QueryVO queryVO) {
         BookExample example = BookExample.newAndCreateCriteria().example();
         example.or().andNameLike("%" + queryVO.getQuery() + "%");
         example.or().andAuthorLike("%" + queryVO.getQuery() + "%");
@@ -49,13 +72,28 @@ public class BookServiceImpl implements BookService {
         }
         example.page(queryVO.getPage(), queryVO.getSize());
         List<Book> books = bookMapper.selectByExample(example);
-        return new PageResult<>(queryVO.getPage(), queryVO.getSize(), count, books);
+        //查询关联表
+        List<BookCategory> allCategory = getAllCategory();
+        HashMap<Integer, String> map = new HashMap<>();
+        for (BookCategory bookCategory : allCategory) {
+            map.put(bookCategory.getId(), bookCategory.getName());
+        }
+        //转存
+        ArrayList<BookRes> bookResList = new ArrayList<>();
+        for (Book book : books) {
+            BookRes bookRes = new BookRes();
+            BeanUtils.copyProperties(book,bookRes);
+            bookRes.setCategoryName(map.get(book.getBookCategoryId()));
+            bookResList.add(bookRes);
+        }
+
+        return new PageResult<>(queryVO.getPage(), queryVO.getSize(), count, bookResList);
     }
 
     @Override
     public PageResult<Book> recommendByRead(QueryVO queryVO) {
         BookExample example = BookExample.newAndCreateCriteria()
-                .andSexEqualTo(queryVO.getSex())
+                .andSexEqualTo(queryVO.getPageId())
                 .example();
         long count = bookMapper.countByExample(example);
         example.orderBy(Book.Column.readNum.desc());
@@ -80,12 +118,39 @@ public class BookServiceImpl implements BookService {
                     .andBlockIdEqualTo(manageBlock.getId())
                     .example();
             manageBlockResourceExample.orderBy(ManageBlockResource.Column.weigh.desc());
+            //获取内部书籍资源
             List<ManageBlockResource> manageBlockResources = manageBlockResourceMapper.selectByExample(manageBlockResourceExample);
+            ArrayList<ManageBlockResourceRes> manageBlockResourceResList = new ArrayList<>();
+            if (manageBlockResources.size() > 0) {
+                List<Long> collect = manageBlockResources.stream()
+                        .map(ManageBlockResource::getBookId).collect(Collectors.toList());
+                List<Book> books = bookMapper.selectByExample(
+                        BookExample.newAndCreateCriteria()
+                                .andIdIn(collect)
+                                .example()
+                );
+                HashMap<Long, Book> bookHashMap = new HashMap<>();
+                books.forEach(x->{
+                    bookHashMap.put(x.getId(), x);
+                });
+                manageBlockResources.forEach(x->{
+                    ManageBlockResourceRes manageBlockResourceRes = new ManageBlockResourceRes();
+                    BeanUtils.copyProperties(x,manageBlockResourceRes);
+                    manageBlockResourceResList.add(manageBlockResourceRes);
+
+                    Book book = bookHashMap.get(x.getBookId());
+                    if (book != null) {
+                        manageBlockResourceRes.setBookName(book.getName());
+                        manageBlockResourceRes.setBookDescription(book.getDescription());
+                    }
+
+                });
+            }
             BlockRes blockRes = new BlockRes();
             blockRes.setName(manageBlock.getName());
             blockRes.setSecondName(manageBlock.getSecondName());
             blockRes.setType(manageBlock.getType());
-            blockRes.setResources(manageBlockResources);
+            blockRes.setResources(manageBlockResourceResList);
 
             list.add(blockRes);
         }
@@ -227,6 +292,6 @@ public class BookServiceImpl implements BookService {
 
         return list;
     }
-}
 
 
+}

+ 676 - 0
book-server/src/main/resources/mapper/BookCategoryMapper.xml

@@ -0,0 +1,676 @@
+<?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.server.dao.mapper.BookCategoryMapper">
+  <resultMap id="BaseResultMap" type="com.book.server.dao.entity.BookCategory">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Aug 16 23:54:49 CST 2021.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="image" jdbcType="VARCHAR" property="image" />
+    <result column="sex" jdbcType="CHAR" property="sex" />
+    <result column="weigh" jdbcType="INTEGER" property="weigh" />
+    <result column="status" jdbcType="CHAR" property="status" />
+    <result column="createtime" jdbcType="INTEGER" property="createtime" />
+    <result column="updatetime" jdbcType="INTEGER" property="updatetime" />
+  </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 Mon Aug 16 23:54:49 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 Mon Aug 16 23:54:49 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 Mon Aug 16 23:54:49 CST 2021.
+    -->
+    id, name, image, sex, weigh, status, createtime, updatetime
+  </sql>
+  <select id="selectByExample" parameterType="com.book.server.dao.entity.example.BookCategoryExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Aug 16 23:54:49 CST 2021.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from book_category
+    <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="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Aug 16 23:54:49 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" />
+      </otherwise>
+    </choose>
+    from book_category
+    <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="java.lang.Integer" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Aug 16 23:54:49 CST 2021.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from book_category
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <select id="selectByPrimaryKeySelective" parameterType="map" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Aug 16 23:54:49 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" />
+      </otherwise>
+    </choose>
+    from book_category
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Aug 16 23:54:49 CST 2021.
+    -->
+    delete from book_category
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.book.server.dao.entity.example.BookCategoryExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Aug 16 23:54:49 CST 2021.
+    -->
+    delete from book_category
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.book.server.dao.entity.BookCategory">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Aug 16 23:54:49 CST 2021.
+    -->
+    insert into book_category (id, name, image, 
+      sex, weigh, status, createtime, 
+      updatetime)
+    values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{image,jdbcType=VARCHAR}, 
+      #{sex,jdbcType=CHAR}, #{weigh,jdbcType=INTEGER}, #{status,jdbcType=CHAR}, #{createtime,jdbcType=INTEGER}, 
+      #{updatetime,jdbcType=INTEGER})
+  </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 Mon Aug 16 23:54:49 CST 2021.
+    -->
+    insert into book_category
+    <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.name != null">
+            name,
+          </if>
+          <if test="record.image != null">
+            image,
+          </if>
+          <if test="record.sex != null">
+            sex,
+          </if>
+          <if test="record.weigh != null">
+            weigh,
+          </if>
+          <if test="record.status != null">
+            status,
+          </if>
+          <if test="record.createtime != null">
+            createtime,
+          </if>
+          <if test="record.updatetime != null">
+            updatetime,
+          </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=INTEGER},
+          </if>
+          <if test="record.name != null">
+            #{record.name,jdbcType=VARCHAR},
+          </if>
+          <if test="record.image != null">
+            #{record.image,jdbcType=VARCHAR},
+          </if>
+          <if test="record.sex != null">
+            #{record.sex,jdbcType=CHAR},
+          </if>
+          <if test="record.weigh != null">
+            #{record.weigh,jdbcType=INTEGER},
+          </if>
+          <if test="record.status != null">
+            #{record.status,jdbcType=CHAR},
+          </if>
+          <if test="record.createtime != null">
+            #{record.createtime,jdbcType=INTEGER},
+          </if>
+          <if test="record.updatetime != null">
+            #{record.updatetime,jdbcType=INTEGER},
+          </if>
+        </trim>
+      </otherwise>
+    </choose>
+  </insert>
+  <select id="countByExample" parameterType="com.book.server.dao.entity.example.BookCategoryExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Aug 16 23:54:49 CST 2021.
+    -->
+    select count(*) from book_category
+    <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 Mon Aug 16 23:54:49 CST 2021.
+    -->
+    update book_category
+    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=INTEGER},
+          </if>
+          <if test="record.name != null">
+            name = #{record.name,jdbcType=VARCHAR},
+          </if>
+          <if test="record.image != null">
+            image = #{record.image,jdbcType=VARCHAR},
+          </if>
+          <if test="record.sex != null">
+            sex = #{record.sex,jdbcType=CHAR},
+          </if>
+          <if test="record.weigh != null">
+            weigh = #{record.weigh,jdbcType=INTEGER},
+          </if>
+          <if test="record.status != null">
+            status = #{record.status,jdbcType=CHAR},
+          </if>
+          <if test="record.createtime != null">
+            createtime = #{record.createtime,jdbcType=INTEGER},
+          </if>
+          <if test="record.updatetime != null">
+            updatetime = #{record.updatetime,jdbcType=INTEGER},
+          </if>
+        </trim>
+      </otherwise>
+    </choose>
+    <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 Mon Aug 16 23:54:49 CST 2021.
+    -->
+    update book_category
+    set id = #{record.id,jdbcType=INTEGER},
+      name = #{record.name,jdbcType=VARCHAR},
+      image = #{record.image,jdbcType=VARCHAR},
+      sex = #{record.sex,jdbcType=CHAR},
+      weigh = #{record.weigh,jdbcType=INTEGER},
+      status = #{record.status,jdbcType=CHAR},
+      createtime = #{record.createtime,jdbcType=INTEGER},
+      updatetime = #{record.updatetime,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 Mon Aug 16 23:54:49 CST 2021.
+    -->
+    update book_category
+    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.name != null">
+            name = #{record.name,jdbcType=VARCHAR},
+          </if>
+          <if test="record.image != null">
+            image = #{record.image,jdbcType=VARCHAR},
+          </if>
+          <if test="record.sex != null">
+            sex = #{record.sex,jdbcType=CHAR},
+          </if>
+          <if test="record.weigh != null">
+            weigh = #{record.weigh,jdbcType=INTEGER},
+          </if>
+          <if test="record.status != null">
+            status = #{record.status,jdbcType=CHAR},
+          </if>
+          <if test="record.createtime != null">
+            createtime = #{record.createtime,jdbcType=INTEGER},
+          </if>
+          <if test="record.updatetime != null">
+            updatetime = #{record.updatetime,jdbcType=INTEGER},
+          </if>
+        </trim>
+      </otherwise>
+    </choose>
+    where id = #{record.id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.book.server.dao.entity.BookCategory">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Aug 16 23:54:49 CST 2021.
+    -->
+    update book_category
+    set name = #{name,jdbcType=VARCHAR},
+      image = #{image,jdbcType=VARCHAR},
+      sex = #{sex,jdbcType=CHAR},
+      weigh = #{weigh,jdbcType=INTEGER},
+      status = #{status,jdbcType=CHAR},
+      createtime = #{createtime,jdbcType=INTEGER},
+      updatetime = #{updatetime,jdbcType=INTEGER}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <select id="selectOneByExample" parameterType="com.book.server.dao.entity.example.BookCategoryExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Aug 16 23:54:49 CST 2021.
+    -->
+    select
+    <include refid="Base_Column_List" />
+    from book_category
+    <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="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Aug 16 23:54:49 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" />
+      </otherwise>
+    </choose>
+    from book_category
+    <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 Mon Aug 16 23:54:49 CST 2021.
+    -->
+    insert into book_category
+    (id, name, image, sex, weigh, status, createtime, updatetime)
+    values
+    <foreach collection="list" item="item" separator=",">
+      (#{item.id,jdbcType=INTEGER}, #{item.name,jdbcType=VARCHAR}, #{item.image,jdbcType=VARCHAR}, 
+        #{item.sex,jdbcType=CHAR}, #{item.weigh,jdbcType=INTEGER}, #{item.status,jdbcType=CHAR}, 
+        #{item.createtime,jdbcType=INTEGER}, #{item.updatetime,jdbcType=INTEGER})
+    </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 Mon Aug 16 23:54:49 CST 2021.
+    -->
+    insert into book_category (
+    <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=INTEGER}
+        </if>
+        <if test="'name'.toString() == column.value">
+          #{item.name,jdbcType=VARCHAR}
+        </if>
+        <if test="'image'.toString() == column.value">
+          #{item.image,jdbcType=VARCHAR}
+        </if>
+        <if test="'sex'.toString() == column.value">
+          #{item.sex,jdbcType=CHAR}
+        </if>
+        <if test="'weigh'.toString() == column.value">
+          #{item.weigh,jdbcType=INTEGER}
+        </if>
+        <if test="'status'.toString() == column.value">
+          #{item.status,jdbcType=CHAR}
+        </if>
+        <if test="'createtime'.toString() == column.value">
+          #{item.createtime,jdbcType=INTEGER}
+        </if>
+        <if test="'updatetime'.toString() == column.value">
+          #{item.updatetime,jdbcType=INTEGER}
+        </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 Mon Aug 16 23:54:49 CST 2021.
+    -->
+    insert into book_category
+    <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.name != null">
+            name,
+          </if>
+          <if test="record.image != null">
+            image,
+          </if>
+          <if test="record.sex != null">
+            sex,
+          </if>
+          <if test="record.weigh != null">
+            weigh,
+          </if>
+          <if test="record.status != null">
+            status,
+          </if>
+          <if test="record.createtime != null">
+            createtime,
+          </if>
+          <if test="record.updatetime != null">
+            updatetime,
+          </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=INTEGER},
+          </if>
+          <if test="record.name != null">
+            #{record.name,jdbcType=VARCHAR},
+          </if>
+          <if test="record.image != null">
+            #{record.image,jdbcType=VARCHAR},
+          </if>
+          <if test="record.sex != null">
+            #{record.sex,jdbcType=CHAR},
+          </if>
+          <if test="record.weigh != null">
+            #{record.weigh,jdbcType=INTEGER},
+          </if>
+          <if test="record.status != null">
+            #{record.status,jdbcType=CHAR},
+          </if>
+          <if test="record.createtime != null">
+            #{record.createtime,jdbcType=INTEGER},
+          </if>
+          <if test="record.updatetime != null">
+            #{record.updatetime,jdbcType=INTEGER},
+          </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=INTEGER},
+          </if>
+          <if test="record.name != null">
+            name = #{record.name,jdbcType=VARCHAR},
+          </if>
+          <if test="record.image != null">
+            image = #{record.image,jdbcType=VARCHAR},
+          </if>
+          <if test="record.sex != null">
+            sex = #{record.sex,jdbcType=CHAR},
+          </if>
+          <if test="record.weigh != null">
+            weigh = #{record.weigh,jdbcType=INTEGER},
+          </if>
+          <if test="record.status != null">
+            status = #{record.status,jdbcType=CHAR},
+          </if>
+          <if test="record.createtime != null">
+            createtime = #{record.createtime,jdbcType=INTEGER},
+          </if>
+          <if test="record.updatetime != null">
+            updatetime = #{record.updatetime,jdbcType=INTEGER},
+          </if>
+        </trim>
+      </otherwise>
+    </choose>
+  </insert>
+  <insert id="upsert" parameterType="com.book.server.dao.entity.BookCategory">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Aug 16 23:54:49 CST 2021.
+    -->
+    insert into book_category
+    (id, name, image, sex, weigh, status, createtime, updatetime)
+    values
+    (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{image,jdbcType=VARCHAR}, #{sex,jdbcType=CHAR}, 
+      #{weigh,jdbcType=INTEGER}, #{status,jdbcType=CHAR}, #{createtime,jdbcType=INTEGER}, 
+      #{updatetime,jdbcType=INTEGER})
+    on duplicate key update 
+    id = #{id,jdbcType=INTEGER}, 
+    name = #{name,jdbcType=VARCHAR}, 
+    image = #{image,jdbcType=VARCHAR}, 
+    sex = #{sex,jdbcType=CHAR}, 
+    weigh = #{weigh,jdbcType=INTEGER}, 
+    status = #{status,jdbcType=CHAR}, 
+    createtime = #{createtime,jdbcType=INTEGER}, 
+    updatetime = #{updatetime,jdbcType=INTEGER}
+  </insert>
+</mapper>

+ 63 - 0
book-server/src/main/resources/mapper/BookMapper2.xml

@@ -0,0 +1,63 @@
+<?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.server.dao.mapper.BookMapper2">
+  <resultMap id="BaseResultMap" type="com.book.server.dao.entity.Book">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 12 00:28:56 CST 2021.
+    -->
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="is_audio" jdbcType="TINYINT" property="isAudio" />
+    <result column="book_category_id" jdbcType="INTEGER" property="bookCategoryId" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="realname" jdbcType="VARCHAR" property="realname" />
+    <result column="title" jdbcType="VARCHAR" property="title" />
+    <result column="author" jdbcType="VARCHAR" property="author" />
+    <result column="image" jdbcType="VARCHAR" property="image" />
+    <result column="big_cover" jdbcType="VARCHAR" property="bigCover" />
+    <result column="small_cover" jdbcType="VARCHAR" property="smallCover" />
+    <result column="description" jdbcType="VARCHAR" property="description" />
+    <result column="idx" jdbcType="INTEGER" property="idx" />
+    <result column="referral_num" jdbcType="TINYINT" property="referralNum" />
+    <result column="idxx" jdbcType="INTEGER" property="idxx" />
+    <result column="state" jdbcType="CHAR" property="state" />
+    <result column="free_stime" jdbcType="INTEGER" property="freeStime" />
+    <result column="free_etime" jdbcType="INTEGER" property="freeEtime" />
+    <result column="sex" jdbcType="CHAR" property="sex" />
+    <result column="billing_type" jdbcType="CHAR" property="billingType" />
+    <result column="price" jdbcType="INTEGER" property="price" />
+    <result column="app_price" jdbcType="INTEGER" property="appPrice" />
+    <result column="is_finish" jdbcType="CHAR" property="isFinish" />
+    <result column="free_chapter_num" jdbcType="INTEGER" property="freeChapterNum" />
+    <result column="word_count" jdbcType="VARCHAR" property="wordCount" />
+    <result column="chapter_num" jdbcType="INTEGER" property="chapterNum" />
+    <result column="first_chapter_id" jdbcType="BIGINT" property="firstChapterId" />
+    <result column="first_chapter_name" jdbcType="VARCHAR" property="firstChapterName" />
+    <result column="last_chapter_id" jdbcType="BIGINT" property="lastChapterId" />
+    <result column="last_chapter_name" jdbcType="VARCHAR" property="lastChapterName" />
+    <result column="last_chapter_utime" jdbcType="INTEGER" property="lastChapterUtime" />
+    <result column="read_num" jdbcType="INTEGER" property="readNum" />
+    <result column="article_chapter_order" jdbcType="INTEGER" property="articleChapterOrder" />
+    <result column="attent_chapter_order" jdbcType="INTEGER" property="attentChapterOrder" />
+    <result column="corner_mark" jdbcType="CHAR" property="cornerMark" />
+    <result column="recommand_book_id" jdbcType="BIGINT" property="recommandBookId" />
+    <result column="createtime" jdbcType="INTEGER" property="createtime" />
+    <result column="updatetime" jdbcType="INTEGER" property="updatetime" />
+    <result column="keywords" jdbcType="VARCHAR" property="keywords" />
+    <result column="cansee" jdbcType="CHAR" property="cansee" />
+    <result column="rank" jdbcType="TINYINT" property="rank" />
+    <result column="check_rank" jdbcType="TINYINT" property="checkRank" />
+    <result column="check_remark" jdbcType="VARCHAR" property="checkRemark" />
+    <result column="editor_recommand" jdbcType="VARCHAR" property="editorRecommand" />
+    <result column="book_tags" jdbcType="VARCHAR" property="bookTags" />
+    <result column="a" jdbcType="TINYINT" property="a" />
+    <result column="expire_time" jdbcType="INTEGER" property="expireTime" />
+    <result column="cp_id" jdbcType="INTEGER" property="cpId" />
+    <result column="cp_name" jdbcType="VARCHAR" property="cpName" />
+    <result column="tags" jdbcType="VARCHAR" property="tags" />
+    <result column="classify_white_list" jdbcType="TINYINT" property="classifyWhiteList" />
+    <result column="put_ad_set" jdbcType="TINYINT" property="putAdSet" />
+  </resultMap>
+
+</mapper>

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

@@ -120,8 +120,9 @@
 
         <!--指定数据表名,可以使用_和%通配符,可以配置generatedKey,会返回insert之后的id-->
 <!--        <table tableName="book"></table>-->
-        <table tableName="manage_block"></table>
-        <table tableName="manage_block_resource"></table>
+<!--        <table tableName="manage_block"></table>-->
+<!--        <table tableName="manage_block_resource"></table>-->
+        <table tableName="book_category"></table>
 
     </context>