|
|
|
@@ -4,10 +4,12 @@ import static com.java2nb.novel.mapper.BookDynamicSqlSupport.*;
|
|
|
|
|
import static org.mybatis.dynamic.sql.SqlBuilder.*;
|
|
|
|
|
|
|
|
|
|
import com.java2nb.novel.entity.Book;
|
|
|
|
|
|
|
|
|
|
import java.util.Collection;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Optional;
|
|
|
|
|
import javax.annotation.Generated;
|
|
|
|
|
|
|
|
|
|
import org.apache.ibatis.annotations.DeleteProvider;
|
|
|
|
|
import org.apache.ibatis.annotations.InsertProvider;
|
|
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
|
@@ -35,62 +37,63 @@ import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils;
|
|
|
|
|
@Mapper
|
|
|
|
|
public interface BookMapper {
|
|
|
|
|
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
|
|
|
|
BasicColumn[] selectList = BasicColumn.columnList(id, workDirection, catId, catName, picUrl, bookName, authorId, authorName, bookDesc, score, bookStatus, visitCount, wordCount, commentCount, lastIndexId, lastIndexName, lastIndexUpdateTime, isVip, status, updateTime, createTime, crawlSourceId, crawlBookId, crawlLastTime, crawlIsStop);
|
|
|
|
|
BasicColumn[] selectList = BasicColumn.columnList(id, workDirection, catId, catName, picUrl, bookName, authorId, authorName, bookDesc, score, bookStatus, visitCount, wordCount, commentCount, yesterdayBuy, lastIndexId, lastIndexName, lastIndexUpdateTime, isVip, status, updateTime, createTime, crawlSourceId, crawlBookId, crawlLastTime, crawlIsStop);
|
|
|
|
|
|
|
|
|
|
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
|
|
|
|
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
|
|
|
|
@SelectProvider(type = SqlProviderAdapter.class, method = "select")
|
|
|
|
|
long count(SelectStatementProvider selectStatement);
|
|
|
|
|
|
|
|
|
|
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
|
|
|
|
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
|
|
|
|
|
@DeleteProvider(type = SqlProviderAdapter.class, method = "delete")
|
|
|
|
|
int delete(DeleteStatementProvider deleteStatement);
|
|
|
|
|
|
|
|
|
|
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
|
|
|
|
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
|
|
|
|
|
@InsertProvider(type = SqlProviderAdapter.class, method = "insert")
|
|
|
|
|
int insert(InsertStatementProvider<Book> insertStatement);
|
|
|
|
|
|
|
|
|
|
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
|
|
|
|
@InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple")
|
|
|
|
|
@InsertProvider(type = SqlProviderAdapter.class, method = "insertMultiple")
|
|
|
|
|
int insertMultiple(MultiRowInsertStatementProvider<Book> multipleInsertStatement);
|
|
|
|
|
|
|
|
|
|
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
|
|
|
|
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
|
|
|
|
@SelectProvider(type = SqlProviderAdapter.class, method = "select")
|
|
|
|
|
@ResultMap("BookResult")
|
|
|
|
|
Optional<Book> selectOne(SelectStatementProvider selectStatement);
|
|
|
|
|
|
|
|
|
|
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
|
|
|
|
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
|
|
|
|
@Results(id="BookResult", value = {
|
|
|
|
|
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
|
|
|
|
|
@Result(column="work_direction", property="workDirection", jdbcType=JdbcType.TINYINT),
|
|
|
|
|
@Result(column="cat_id", property="catId", jdbcType=JdbcType.INTEGER),
|
|
|
|
|
@Result(column="cat_name", property="catName", jdbcType=JdbcType.VARCHAR),
|
|
|
|
|
@Result(column="pic_url", property="picUrl", jdbcType=JdbcType.VARCHAR),
|
|
|
|
|
@Result(column="book_name", property="bookName", jdbcType=JdbcType.VARCHAR),
|
|
|
|
|
@Result(column="author_id", property="authorId", jdbcType=JdbcType.BIGINT),
|
|
|
|
|
@Result(column="author_name", property="authorName", jdbcType=JdbcType.VARCHAR),
|
|
|
|
|
@Result(column="book_desc", property="bookDesc", jdbcType=JdbcType.VARCHAR),
|
|
|
|
|
@Result(column="score", property="score", jdbcType=JdbcType.REAL),
|
|
|
|
|
@Result(column="book_status", property="bookStatus", jdbcType=JdbcType.TINYINT),
|
|
|
|
|
@Result(column="visit_count", property="visitCount", jdbcType=JdbcType.BIGINT),
|
|
|
|
|
@Result(column="word_count", property="wordCount", jdbcType=JdbcType.INTEGER),
|
|
|
|
|
@Result(column="comment_count", property="commentCount", jdbcType=JdbcType.INTEGER),
|
|
|
|
|
@Result(column="last_index_id", property="lastIndexId", jdbcType=JdbcType.BIGINT),
|
|
|
|
|
@Result(column="last_index_name", property="lastIndexName", jdbcType=JdbcType.VARCHAR),
|
|
|
|
|
@Result(column="last_index_update_time", property="lastIndexUpdateTime", jdbcType=JdbcType.TIMESTAMP),
|
|
|
|
|
@Result(column="is_vip", property="isVip", jdbcType=JdbcType.TINYINT),
|
|
|
|
|
@Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
|
|
|
|
|
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
|
|
|
|
|
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
|
|
|
|
|
@Result(column="crawl_source_id", property="crawlSourceId", jdbcType=JdbcType.INTEGER),
|
|
|
|
|
@Result(column="crawl_book_id", property="crawlBookId", jdbcType=JdbcType.VARCHAR),
|
|
|
|
|
@Result(column="crawl_last_time", property="crawlLastTime", jdbcType=JdbcType.TIMESTAMP),
|
|
|
|
|
@Result(column="crawl_is_stop", property="crawlIsStop", jdbcType=JdbcType.TINYINT)
|
|
|
|
|
@SelectProvider(type = SqlProviderAdapter.class, method = "select")
|
|
|
|
|
@Results(id = "BookResult", value = {
|
|
|
|
|
@Result(column = "id", property = "id", jdbcType = JdbcType.BIGINT, id = true),
|
|
|
|
|
@Result(column = "work_direction", property = "workDirection", jdbcType = JdbcType.TINYINT),
|
|
|
|
|
@Result(column = "cat_id", property = "catId", jdbcType = JdbcType.INTEGER),
|
|
|
|
|
@Result(column = "cat_name", property = "catName", jdbcType = JdbcType.VARCHAR),
|
|
|
|
|
@Result(column = "pic_url", property = "picUrl", jdbcType = JdbcType.VARCHAR),
|
|
|
|
|
@Result(column = "book_name", property = "bookName", jdbcType = JdbcType.VARCHAR),
|
|
|
|
|
@Result(column = "author_id", property = "authorId", jdbcType = JdbcType.BIGINT),
|
|
|
|
|
@Result(column = "author_name", property = "authorName", jdbcType = JdbcType.VARCHAR),
|
|
|
|
|
@Result(column = "book_desc", property = "bookDesc", jdbcType = JdbcType.VARCHAR),
|
|
|
|
|
@Result(column = "score", property = "score", jdbcType = JdbcType.REAL),
|
|
|
|
|
@Result(column = "book_status", property = "bookStatus", jdbcType = JdbcType.TINYINT),
|
|
|
|
|
@Result(column = "visit_count", property = "visitCount", jdbcType = JdbcType.BIGINT),
|
|
|
|
|
@Result(column = "word_count", property = "wordCount", jdbcType = JdbcType.INTEGER),
|
|
|
|
|
@Result(column = "comment_count", property = "commentCount", jdbcType = JdbcType.INTEGER),
|
|
|
|
|
@Result(column="yesterday_buy", property="yesterdayBuy", jdbcType=JdbcType.INTEGER),
|
|
|
|
|
@Result(column = "last_index_id", property = "lastIndexId", jdbcType = JdbcType.BIGINT),
|
|
|
|
|
@Result(column = "last_index_name", property = "lastIndexName", jdbcType = JdbcType.VARCHAR),
|
|
|
|
|
@Result(column = "last_index_update_time", property = "lastIndexUpdateTime", jdbcType = JdbcType.TIMESTAMP),
|
|
|
|
|
@Result(column = "is_vip", property = "isVip", jdbcType = JdbcType.TINYINT),
|
|
|
|
|
@Result(column = "status", property = "status", jdbcType = JdbcType.TINYINT),
|
|
|
|
|
@Result(column = "update_time", property = "updateTime", jdbcType = JdbcType.TIMESTAMP),
|
|
|
|
|
@Result(column = "create_time", property = "createTime", jdbcType = JdbcType.TIMESTAMP),
|
|
|
|
|
@Result(column = "crawl_source_id", property = "crawlSourceId", jdbcType = JdbcType.INTEGER),
|
|
|
|
|
@Result(column = "crawl_book_id", property = "crawlBookId", jdbcType = JdbcType.VARCHAR),
|
|
|
|
|
@Result(column = "crawl_last_time", property = "crawlLastTime", jdbcType = JdbcType.TIMESTAMP),
|
|
|
|
|
@Result(column = "crawl_is_stop", property = "crawlIsStop", jdbcType = JdbcType.TINYINT)
|
|
|
|
|
})
|
|
|
|
|
List<Book> selectMany(SelectStatementProvider selectStatement);
|
|
|
|
|
|
|
|
|
|
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
|
|
|
|
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
|
|
|
|
|
@UpdateProvider(type = SqlProviderAdapter.class, method = "update")
|
|
|
|
|
int update(UpdateStatementProvider updateStatement);
|
|
|
|
|
|
|
|
|
|
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
|
|
|
@@ -127,6 +130,7 @@ public interface BookMapper {
|
|
|
|
|
.map(visitCount).toProperty("visitCount")
|
|
|
|
|
.map(wordCount).toProperty("wordCount")
|
|
|
|
|
.map(commentCount).toProperty("commentCount")
|
|
|
|
|
.map(yesterdayBuy).toProperty("yesterdayBuy")
|
|
|
|
|
.map(lastIndexId).toProperty("lastIndexId")
|
|
|
|
|
.map(lastIndexName).toProperty("lastIndexName")
|
|
|
|
|
.map(lastIndexUpdateTime).toProperty("lastIndexUpdateTime")
|
|
|
|
@@ -158,6 +162,7 @@ public interface BookMapper {
|
|
|
|
|
.map(visitCount).toProperty("visitCount")
|
|
|
|
|
.map(wordCount).toProperty("wordCount")
|
|
|
|
|
.map(commentCount).toProperty("commentCount")
|
|
|
|
|
.map(yesterdayBuy).toProperty("yesterdayBuy")
|
|
|
|
|
.map(lastIndexId).toProperty("lastIndexId")
|
|
|
|
|
.map(lastIndexName).toProperty("lastIndexName")
|
|
|
|
|
.map(lastIndexUpdateTime).toProperty("lastIndexUpdateTime")
|
|
|
|
@@ -189,6 +194,7 @@ public interface BookMapper {
|
|
|
|
|
.map(visitCount).toPropertyWhenPresent("visitCount", record::getVisitCount)
|
|
|
|
|
.map(wordCount).toPropertyWhenPresent("wordCount", record::getWordCount)
|
|
|
|
|
.map(commentCount).toPropertyWhenPresent("commentCount", record::getCommentCount)
|
|
|
|
|
.map(yesterdayBuy).toPropertyWhenPresent("yesterdayBuy", record::getYesterdayBuy)
|
|
|
|
|
.map(lastIndexId).toPropertyWhenPresent("lastIndexId", record::getLastIndexId)
|
|
|
|
|
.map(lastIndexName).toPropertyWhenPresent("lastIndexName", record::getLastIndexName)
|
|
|
|
|
.map(lastIndexUpdateTime).toPropertyWhenPresent("lastIndexUpdateTime", record::getLastIndexUpdateTime)
|
|
|
|
@@ -246,6 +252,7 @@ public interface BookMapper {
|
|
|
|
|
.set(visitCount).equalTo(record::getVisitCount)
|
|
|
|
|
.set(wordCount).equalTo(record::getWordCount)
|
|
|
|
|
.set(commentCount).equalTo(record::getCommentCount)
|
|
|
|
|
.set(yesterdayBuy).equalTo(record::getYesterdayBuy)
|
|
|
|
|
.set(lastIndexId).equalTo(record::getLastIndexId)
|
|
|
|
|
.set(lastIndexName).equalTo(record::getLastIndexName)
|
|
|
|
|
.set(lastIndexUpdateTime).equalTo(record::getLastIndexUpdateTime)
|
|
|
|
@@ -275,6 +282,7 @@ public interface BookMapper {
|
|
|
|
|
.set(visitCount).equalToWhenPresent(record::getVisitCount)
|
|
|
|
|
.set(wordCount).equalToWhenPresent(record::getWordCount)
|
|
|
|
|
.set(commentCount).equalToWhenPresent(record::getCommentCount)
|
|
|
|
|
.set(yesterdayBuy).equalToWhenPresent(record::getYesterdayBuy)
|
|
|
|
|
.set(lastIndexId).equalToWhenPresent(record::getLastIndexId)
|
|
|
|
|
.set(lastIndexName).equalToWhenPresent(record::getLastIndexName)
|
|
|
|
|
.set(lastIndexUpdateTime).equalToWhenPresent(record::getLastIndexUpdateTime)
|
|
|
|
@@ -304,6 +312,7 @@ public interface BookMapper {
|
|
|
|
|
.set(visitCount).equalTo(record::getVisitCount)
|
|
|
|
|
.set(wordCount).equalTo(record::getWordCount)
|
|
|
|
|
.set(commentCount).equalTo(record::getCommentCount)
|
|
|
|
|
.set(yesterdayBuy).equalTo(record::getYesterdayBuy)
|
|
|
|
|
.set(lastIndexId).equalTo(record::getLastIndexId)
|
|
|
|
|
.set(lastIndexName).equalTo(record::getLastIndexName)
|
|
|
|
|
.set(lastIndexUpdateTime).equalTo(record::getLastIndexUpdateTime)
|
|
|
|
@@ -335,6 +344,7 @@ public interface BookMapper {
|
|
|
|
|
.set(visitCount).equalToWhenPresent(record::getVisitCount)
|
|
|
|
|
.set(wordCount).equalToWhenPresent(record::getWordCount)
|
|
|
|
|
.set(commentCount).equalToWhenPresent(record::getCommentCount)
|
|
|
|
|
.set(yesterdayBuy).equalToWhenPresent(record::getYesterdayBuy)
|
|
|
|
|
.set(lastIndexId).equalToWhenPresent(record::getLastIndexId)
|
|
|
|
|
.set(lastIndexName).equalToWhenPresent(record::getLastIndexName)
|
|
|
|
|
.set(lastIndexUpdateTime).equalToWhenPresent(record::getLastIndexUpdateTime)
|
|
|
|
|