Procházet zdrojové kódy

添加热门搜索接口

tianyunperfect před 3 roky
rodič
revize
5ecb58973a

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

@@ -4,6 +4,7 @@ import com.book.server.common.entity.PageResult;
 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.dao.entity.SearchKeyword;
 import com.book.server.model.VO.BlockRes;
 import com.book.server.model.VO.BookRes;
 import com.book.server.model.VO.Chapter;
@@ -109,5 +110,14 @@ public class BookController extends BaseController {
       }
     }
 
+    /**
+     * 获取热门搜索
+     * @param sex
+     * @return
+     */
+    @GetMapping("/getSearchKeyword")
+    public Result<List<SearchKeyword>> getSearchKeywordBySex(String sex) {
+        return Result.byObject(bookService.getSearchKeywordBySex(sex));
+    }
 
 }

+ 402 - 0
book-server/src/main/java/com/book/server/dao/entity/SearchKeyword.java

@@ -0,0 +1,402 @@
+package com.book.server.dao.entity;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Arrays;
+import lombok.Data;
+
+@Data
+public class SearchKeyword implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column search_keyword.id
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    private Integer id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column search_keyword.keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    private String keyword;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column search_keyword.book_id
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    private Long bookId;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column search_keyword.sex
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    private String sex;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column search_keyword.weigh
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    private Integer weigh;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column search_keyword.createtime
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    private Integer createtime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column search_keyword.updatetime
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    private Integer updatetime;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    public static SearchKeyword.Builder builder() {
+        return new SearchKeyword.Builder();
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    public static class Builder {
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+         */
+        private SearchKeyword obj;
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+         */
+        public Builder() {
+            this.obj = new SearchKeyword();
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column search_keyword.id
+         *
+         * @param id the value for search_keyword.id
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 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 search_keyword.keyword
+         *
+         * @param keyword the value for search_keyword.keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+         */
+        public Builder keyword(String keyword) {
+            obj.setKeyword(keyword);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column search_keyword.book_id
+         *
+         * @param bookId the value for search_keyword.book_id
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+         */
+        public Builder bookId(Long bookId) {
+            obj.setBookId(bookId);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column search_keyword.sex
+         *
+         * @param sex the value for search_keyword.sex
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 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 search_keyword.weigh
+         *
+         * @param weigh the value for search_keyword.weigh
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 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 search_keyword.createtime
+         *
+         * @param createtime the value for search_keyword.createtime
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 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 search_keyword.updatetime
+         *
+         * @param updatetime the value for search_keyword.updatetime
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 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 search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+         */
+        public SearchKeyword build() {
+            return this.obj;
+        }
+    }
+
+    /**
+     * This enum was generated by MyBatis Generator.
+     * This enum corresponds to the database table search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    public enum Column {
+        id("id", "id", "INTEGER", false),
+        keyword("keyword", "keyword", "VARCHAR", false),
+        bookId("book_id", "bookId", "BIGINT", false),
+        sex("sex", "sex", "CHAR", false),
+        weigh("weigh", "weigh", "INTEGER", 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 search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+         */
+        private static final String BEGINNING_DELIMITER = "\"";
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+         */
+        private static final String ENDING_DELIMITER = "\"";
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+         */
+        private final String column;
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+         */
+        private final boolean isColumnNameDelimited;
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+         */
+        private final String javaProperty;
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+         */
+        private final String jdbcType;
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+         */
+        public String value() {
+            return this.column;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+         */
+        public String getValue() {
+            return this.column;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+         */
+        public String getJavaProperty() {
+            return this.javaProperty;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+         */
+        public String getJdbcType() {
+            return this.jdbcType;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 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 search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+         */
+        public String desc() {
+            return this.getEscapedColumnName() + " DESC";
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+         */
+        public String asc() {
+            return this.getEscapedColumnName() + " ASC";
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 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 search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+         */
+        public static Column[] all() {
+            return Column.values();
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 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 search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+         */
+        public String getAliasedEscapedColumnName() {
+            return this.getEscapedColumnName();
+        }
+    }
+}

+ 1211 - 0
book-server/src/main/java/com/book/server/dao/entity/example/SearchKeywordExample.java

@@ -0,0 +1,1211 @@
+package com.book.server.dao.entity.example;
+
+import com.book.server.dao.entity.SearchKeyword;
+import java.util.ArrayList;
+import java.util.List;
+
+public class SearchKeywordExample {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    protected String orderByClause;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    protected boolean distinct;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    protected Integer offset;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    protected Integer rows;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    public SearchKeywordExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 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 search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    public SearchKeywordExample orderBy(String orderByClause) {
+        this.setOrderByClause(orderByClause);
+        return this;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    public SearchKeywordExample 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 search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 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 search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 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 search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 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 search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    public void setOffset(Integer offset) {
+        this.offset = offset;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    public Integer getOffset() {
+        return this.offset;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    public void setRows(Integer rows) {
+        this.rows = rows;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    public Integer getRows() {
+        return this.rows;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    public SearchKeywordExample limit(Integer rows) {
+        this.rows = rows;
+        return this;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    public SearchKeywordExample 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 search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    public SearchKeywordExample 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 search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    public static Criteria newAndCreateCriteria() {
+        SearchKeywordExample example = new SearchKeywordExample();
+        return example.createCriteria();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    public SearchKeywordExample 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 search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+     */
+    public SearchKeywordExample 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 search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 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(SearchKeyword.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(SearchKeyword.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(SearchKeyword.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(SearchKeyword.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(SearchKeyword.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(SearchKeyword.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 andKeywordIsNull() {
+            addCriterion("keyword is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordIsNotNull() {
+            addCriterion("keyword is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordEqualTo(String value) {
+            addCriterion("keyword =", value, "keyword");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordEqualToColumn(SearchKeyword.Column column) {
+            addCriterion(new StringBuilder("keyword = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordNotEqualTo(String value) {
+            addCriterion("keyword <>", value, "keyword");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordNotEqualToColumn(SearchKeyword.Column column) {
+            addCriterion(new StringBuilder("keyword <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordGreaterThan(String value) {
+            addCriterion("keyword >", value, "keyword");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordGreaterThanColumn(SearchKeyword.Column column) {
+            addCriterion(new StringBuilder("keyword > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordGreaterThanOrEqualTo(String value) {
+            addCriterion("keyword >=", value, "keyword");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordGreaterThanOrEqualToColumn(SearchKeyword.Column column) {
+            addCriterion(new StringBuilder("keyword >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordLessThan(String value) {
+            addCriterion("keyword <", value, "keyword");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordLessThanColumn(SearchKeyword.Column column) {
+            addCriterion(new StringBuilder("keyword < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordLessThanOrEqualTo(String value) {
+            addCriterion("keyword <=", value, "keyword");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordLessThanOrEqualToColumn(SearchKeyword.Column column) {
+            addCriterion(new StringBuilder("keyword <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordLike(String value) {
+            addCriterion("keyword like", value, "keyword");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordNotLike(String value) {
+            addCriterion("keyword not like", value, "keyword");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordIn(List<String> values) {
+            addCriterion("keyword in", values, "keyword");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordNotIn(List<String> values) {
+            addCriterion("keyword not in", values, "keyword");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordBetween(String value1, String value2) {
+            addCriterion("keyword between", value1, value2, "keyword");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordNotBetween(String value1, String value2) {
+            addCriterion("keyword not between", value1, value2, "keyword");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdIsNull() {
+            addCriterion("book_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdIsNotNull() {
+            addCriterion("book_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdEqualTo(Long value) {
+            addCriterion("book_id =", value, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdEqualToColumn(SearchKeyword.Column column) {
+            addCriterion(new StringBuilder("book_id = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdNotEqualTo(Long value) {
+            addCriterion("book_id <>", value, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdNotEqualToColumn(SearchKeyword.Column column) {
+            addCriterion(new StringBuilder("book_id <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdGreaterThan(Long value) {
+            addCriterion("book_id >", value, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdGreaterThanColumn(SearchKeyword.Column column) {
+            addCriterion(new StringBuilder("book_id > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("book_id >=", value, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdGreaterThanOrEqualToColumn(SearchKeyword.Column column) {
+            addCriterion(new StringBuilder("book_id >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdLessThan(Long value) {
+            addCriterion("book_id <", value, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdLessThanColumn(SearchKeyword.Column column) {
+            addCriterion(new StringBuilder("book_id < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdLessThanOrEqualTo(Long value) {
+            addCriterion("book_id <=", value, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdLessThanOrEqualToColumn(SearchKeyword.Column column) {
+            addCriterion(new StringBuilder("book_id <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdIn(List<Long> values) {
+            addCriterion("book_id in", values, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdNotIn(List<Long> values) {
+            addCriterion("book_id not in", values, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdBetween(Long value1, Long value2) {
+            addCriterion("book_id between", value1, value2, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria andBookIdNotBetween(Long value1, Long value2) {
+            addCriterion("book_id not between", value1, value2, "bookId");
+            return (Criteria) this;
+        }
+
+        public Criteria 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(SearchKeyword.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(SearchKeyword.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(SearchKeyword.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(SearchKeyword.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(SearchKeyword.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(SearchKeyword.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(SearchKeyword.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(SearchKeyword.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(SearchKeyword.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(SearchKeyword.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(SearchKeyword.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(SearchKeyword.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 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(SearchKeyword.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(SearchKeyword.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(SearchKeyword.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(SearchKeyword.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(SearchKeyword.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(SearchKeyword.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(SearchKeyword.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(SearchKeyword.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(SearchKeyword.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(SearchKeyword.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(SearchKeyword.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(SearchKeyword.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 search_keyword
+     *
+     * @mbg.generated do_not_delete_during_merge Tue Aug 17 22:58:15 CST 2021
+     */
+    public static class Criteria extends GeneratedCriteria {
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+         */
+        private SearchKeywordExample example;
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+         */
+        protected Criteria(SearchKeywordExample example) {
+            super();
+            this.example = example;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+         */
+        public SearchKeywordExample example() {
+            return this.example;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 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 search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 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 search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 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 search_keyword
+             *
+             * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+             */
+            Criteria add(Criteria add);
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table search_keyword
+     *
+     * @mbg.generated Tue Aug 17 22:58:15 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 search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+         */
+        void criteria(Criteria criteria);
+    }
+
+    public interface IExampleWhen {
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table search_keyword
+         *
+         * @mbg.generated Tue Aug 17 22:58:15 CST 2021
+         */
+        void example(com.book.server.dao.entity.example.SearchKeywordExample example);
+    }
+}

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

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

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

@@ -2,6 +2,7 @@ package com.book.server.service;
 
 import com.book.server.common.entity.PageResult;
 import com.book.server.dao.entity.Book;
+import com.book.server.dao.entity.SearchKeyword;
 import com.book.server.model.VO.BlockRes;
 import com.book.server.model.VO.BookRes;
 import com.book.server.model.VO.Chapter;
@@ -19,4 +20,5 @@ public interface BookService {
 
     List<Chapter> getChaptersByBookId(String bookId);
 
+    List<SearchKeyword> getSearchKeywordBySex(String sex);
 }

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

@@ -2,14 +2,8 @@ package com.book.server.service.impl;
 
 
 import com.book.server.common.util.JsonUtils;
-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.entity.*;
+import com.book.server.dao.entity.example.*;
 import com.book.server.dao.mapper.*;
 import com.book.server.model.VO.*;
 import com.book.server.service.BookService;
@@ -43,6 +37,8 @@ public class BookServiceImpl implements BookService {
     private ManageBlockResourceMapper manageBlockResourceMapper;
     @Autowired
     private BookCategoryMapper bookCategoryMapper;
+    @Autowired
+    private SearchKeywordMapper searchKeywordMapper;
 
     public List<BookCategory> getAllCategory() {
         List<BookCategory> bookCategories = bookCategoryMapper.selectByExample(
@@ -269,5 +265,15 @@ public class BookServiceImpl implements BookService {
         return list;
     }
 
+    @Override
+    public List<SearchKeyword> getSearchKeywordBySex(String sex) {
+        SearchKeywordExample example = SearchKeywordExample.newAndCreateCriteria()
+                .andSexEqualTo(sex)
+                .example();
+        example.orderBy(SearchKeyword.Column.weigh.desc());
+        List<SearchKeyword> searchKeywords = searchKeywordMapper.selectByExample(example);
+        return searchKeywords;
+    }
+
 
 }

+ 648 - 0
book-server/src/main/resources/mapper/SearchKeywordMapper.xml

@@ -0,0 +1,648 @@
+<?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.SearchKeywordMapper">
+  <resultMap id="BaseResultMap" type="com.book.server.dao.entity.SearchKeyword">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Aug 17 22:58:15 CST 2021.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="keyword" jdbcType="VARCHAR" property="keyword" />
+    <result column="book_id" jdbcType="BIGINT" property="bookId" />
+    <result column="sex" jdbcType="CHAR" property="sex" />
+    <result column="weigh" jdbcType="INTEGER" property="weigh" />
+    <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 Tue Aug 17 22:58:15 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 Tue Aug 17 22:58:15 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 Tue Aug 17 22:58:15 CST 2021.
+    -->
+    id, keyword, book_id, sex, weigh, createtime, updatetime
+  </sql>
+  <select id="selectByExample" parameterType="com.book.server.dao.entity.example.SearchKeywordExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Aug 17 22:58:15 CST 2021.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from search_keyword
+    <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 Tue Aug 17 22:58:15 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 search_keyword
+    <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 Tue Aug 17 22:58:15 CST 2021.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from search_keyword
+    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 Tue Aug 17 22:58:15 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 search_keyword
+    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 Tue Aug 17 22:58:15 CST 2021.
+    -->
+    delete from search_keyword
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.book.server.dao.entity.example.SearchKeywordExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Aug 17 22:58:15 CST 2021.
+    -->
+    delete from search_keyword
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.book.server.dao.entity.SearchKeyword">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Aug 17 22:58:15 CST 2021.
+    -->
+    insert into search_keyword (id, keyword, book_id, 
+      sex, weigh, createtime, 
+      updatetime)
+    values (#{id,jdbcType=INTEGER}, #{keyword,jdbcType=VARCHAR}, #{bookId,jdbcType=BIGINT}, 
+      #{sex,jdbcType=CHAR}, #{weigh,jdbcType=INTEGER}, #{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 Tue Aug 17 22:58:15 CST 2021.
+    -->
+    insert into search_keyword
+    <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.keyword != null">
+            keyword,
+          </if>
+          <if test="record.bookId != null">
+            book_id,
+          </if>
+          <if test="record.sex != null">
+            sex,
+          </if>
+          <if test="record.weigh != null">
+            weigh,
+          </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.keyword != null">
+            #{record.keyword,jdbcType=VARCHAR},
+          </if>
+          <if test="record.bookId != null">
+            #{record.bookId,jdbcType=BIGINT},
+          </if>
+          <if test="record.sex != null">
+            #{record.sex,jdbcType=CHAR},
+          </if>
+          <if test="record.weigh != null">
+            #{record.weigh,jdbcType=INTEGER},
+          </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.SearchKeywordExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Aug 17 22:58:15 CST 2021.
+    -->
+    select count(*) from search_keyword
+    <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 Tue Aug 17 22:58:15 CST 2021.
+    -->
+    update search_keyword
+    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.keyword != null">
+            keyword = #{record.keyword,jdbcType=VARCHAR},
+          </if>
+          <if test="record.bookId != null">
+            book_id = #{record.bookId,jdbcType=BIGINT},
+          </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.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 Tue Aug 17 22:58:15 CST 2021.
+    -->
+    update search_keyword
+    set id = #{record.id,jdbcType=INTEGER},
+      keyword = #{record.keyword,jdbcType=VARCHAR},
+      book_id = #{record.bookId,jdbcType=BIGINT},
+      sex = #{record.sex,jdbcType=CHAR},
+      weigh = #{record.weigh,jdbcType=INTEGER},
+      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 Tue Aug 17 22:58:15 CST 2021.
+    -->
+    update search_keyword
+    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.keyword != null">
+            keyword = #{record.keyword,jdbcType=VARCHAR},
+          </if>
+          <if test="record.bookId != null">
+            book_id = #{record.bookId,jdbcType=BIGINT},
+          </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.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.SearchKeyword">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Aug 17 22:58:15 CST 2021.
+    -->
+    update search_keyword
+    set keyword = #{keyword,jdbcType=VARCHAR},
+      book_id = #{bookId,jdbcType=BIGINT},
+      sex = #{sex,jdbcType=CHAR},
+      weigh = #{weigh,jdbcType=INTEGER},
+      createtime = #{createtime,jdbcType=INTEGER},
+      updatetime = #{updatetime,jdbcType=INTEGER}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <select id="selectOneByExample" parameterType="com.book.server.dao.entity.example.SearchKeywordExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Aug 17 22:58:15 CST 2021.
+    -->
+    select
+    <include refid="Base_Column_List" />
+    from search_keyword
+    <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 Tue Aug 17 22:58:15 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 search_keyword
+    <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 Tue Aug 17 22:58:15 CST 2021.
+    -->
+    insert into search_keyword
+    (id, keyword, book_id, sex, weigh, createtime, updatetime)
+    values
+    <foreach collection="list" item="item" separator=",">
+      (#{item.id,jdbcType=INTEGER}, #{item.keyword,jdbcType=VARCHAR}, #{item.bookId,jdbcType=BIGINT}, 
+        #{item.sex,jdbcType=CHAR}, #{item.weigh,jdbcType=INTEGER}, #{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 Tue Aug 17 22:58:15 CST 2021.
+    -->
+    insert into search_keyword (
+    <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="'keyword'.toString() == column.value">
+          #{item.keyword,jdbcType=VARCHAR}
+        </if>
+        <if test="'book_id'.toString() == column.value">
+          #{item.bookId,jdbcType=BIGINT}
+        </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="'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 Tue Aug 17 22:58:15 CST 2021.
+    -->
+    insert into search_keyword
+    <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.keyword != null">
+            keyword,
+          </if>
+          <if test="record.bookId != null">
+            book_id,
+          </if>
+          <if test="record.sex != null">
+            sex,
+          </if>
+          <if test="record.weigh != null">
+            weigh,
+          </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.keyword != null">
+            #{record.keyword,jdbcType=VARCHAR},
+          </if>
+          <if test="record.bookId != null">
+            #{record.bookId,jdbcType=BIGINT},
+          </if>
+          <if test="record.sex != null">
+            #{record.sex,jdbcType=CHAR},
+          </if>
+          <if test="record.weigh != null">
+            #{record.weigh,jdbcType=INTEGER},
+          </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.keyword != null">
+            keyword = #{record.keyword,jdbcType=VARCHAR},
+          </if>
+          <if test="record.bookId != null">
+            book_id = #{record.bookId,jdbcType=BIGINT},
+          </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.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.SearchKeyword">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Tue Aug 17 22:58:15 CST 2021.
+    -->
+    insert into search_keyword
+    (id, keyword, book_id, sex, weigh, createtime, updatetime)
+    values
+    (#{id,jdbcType=INTEGER}, #{keyword,jdbcType=VARCHAR}, #{bookId,jdbcType=BIGINT}, 
+      #{sex,jdbcType=CHAR}, #{weigh,jdbcType=INTEGER}, #{createtime,jdbcType=INTEGER}, 
+      #{updatetime,jdbcType=INTEGER})
+    on duplicate key update 
+    id = #{id,jdbcType=INTEGER}, 
+    keyword = #{keyword,jdbcType=VARCHAR}, 
+    book_id = #{bookId,jdbcType=BIGINT}, 
+    sex = #{sex,jdbcType=CHAR}, 
+    weigh = #{weigh,jdbcType=INTEGER}, 
+    createtime = #{createtime,jdbcType=INTEGER}, 
+    updatetime = #{updatetime,jdbcType=INTEGER}
+  </insert>
+</mapper>

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

@@ -123,7 +123,8 @@
 <!--        <table tableName="manage_block"></table>-->
 <!--        <table tableName="manage_block_resource"></table>-->
 <!--        <table tableName="book_category"></table>-->
-        <table tableName="user"></table>
+<!--        <table tableName="user"></table>-->
+        <table tableName="search_keyword"></table>
 
     </context>