mirror of
https://github.com/201206030/novel-cloud.git
synced 2025-06-24 14:06:39 +00:00
集成分表框架sharding-jdbc,内容表拆分
This commit is contained in:
@ -46,6 +46,21 @@
|
||||
<version>${redisson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 分库分表-->
|
||||
<!-- sharding jdbc依赖 -->
|
||||
|
||||
<dependency>
|
||||
<groupId>io.shardingsphere</groupId>
|
||||
<artifactId>sharding-jdbc-spring-boot-starter</artifactId>
|
||||
<version>${sharding.jdbc.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.shardingsphere</groupId>
|
||||
<artifactId>sharding-jdbc-spring-namespace</artifactId>
|
||||
<version>${sharding.jdbc.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
@ -25,7 +25,7 @@ public final class BookContentDynamicSqlSupport {
|
||||
|
||||
public final SqlColumn<Long> indexId = column("index_id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<String> content = column("content", JDBCType.LONGVARCHAR);
|
||||
public final SqlColumn<String> content = column("content", JDBCType.VARCHAR);
|
||||
|
||||
public BookContent() {
|
||||
super("book_content");
|
||||
|
@ -48,7 +48,7 @@ public interface BookContentMapper {
|
||||
@Results(id="BookContentResult", value = {
|
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Result(column="index_id", property="indexId", jdbcType=JdbcType.BIGINT),
|
||||
@Result(column="content", property="content", jdbcType=JdbcType.LONGVARCHAR)
|
||||
@Result(column="content", property="content", jdbcType=JdbcType.VARCHAR)
|
||||
})
|
||||
List<BookContent> selectMany(SelectStatementProvider selectStatement);
|
||||
|
||||
|
Reference in New Issue
Block a user