|
@@ -0,0 +1,71 @@
|
|
|
+<?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.model.VO.BookRes">
|
|
|
+ <!--
|
|
|
+ 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"/>
|
|
|
+ <result column="categoryName" jdbcType="VARCHAR" property="categoryName"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <select id="queryBookRes" resultMap="BaseResultMap">
|
|
|
+ SELECT t.*,c.`name` as "categoryName"
|
|
|
+ from book t left join book_category c on t.`book_category_id`=c.`id`
|
|
|
+ where t.state = '1'
|
|
|
+ and (t.`name` like #{queryVO.query} or t.author like #{queryVO.query}) limit #{page}, #{size};
|
|
|
+ </select>
|
|
|
+
|
|
|
+</mapper>
|