JeecgBoot3.2.0 版本发布 [优化微服务模块]

This commit is contained in:
zhangdaiscott
2022-04-24 15:51:09 +08:00
parent 490f5696cf
commit 5dcb991dde
35 changed files with 103 additions and 41 deletions

View File

@ -35,7 +35,8 @@ public class JeecgShardingDemoController extends JeecgController<ShardingSysLog,
@PostMapping(value = "/test1")
@ApiOperation(value = "单库分表插入", notes = "单库分表")
public Result<?> add() {
for (int i = 0; i < 10; i++) {
int size=10;
for (int i = 0; i < size; i++) {
ShardingSysLog shardingSysLog = new ShardingSysLog();
shardingSysLog.setLogContent("jeecg");
shardingSysLog.setLogType(i);
@ -62,7 +63,9 @@ public class JeecgShardingDemoController extends JeecgController<ShardingSysLog,
@PostMapping(value = "/test2")
@ApiOperation(value = "双库分表插入", notes = "双库分表")
public Result<?> test2() {
for (int i = 20; i <= 30; i++) {
int start=20;
int size=30;
for (int i = start; i <= size; i++) {
ShardingSysLog shardingSysLog = new ShardingSysLog();
shardingSysLog.setLogContent("双库分表测试");
shardingSysLog.setLogType(i);

View File

@ -14,9 +14,9 @@ import java.io.Serializable;
import java.util.Date;
/**
* <p>
* 系统日志表
* </p>
* @author: zyf
* @date: 2022/04/21
*/
@Data
@TableName("sys_log")

View File

@ -1,5 +1,5 @@
<?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="org.jeecg.modules.demo.sharding.mapper.ShardingSysLogMapper">
<mapper namespace="org.jeecg.modules.test.sharding.mapper.ShardingSysLogMapper">
</mapper>

View File

@ -8,9 +8,9 @@ import org.jeecg.modules.test.sharding.service.IShardingSysLogService;
import org.springframework.stereotype.Service;
/**
* <p>
* 系统日志表 服务实现类
* </p>
* @author: zyf
* @date: 2022/04/21
*/
@Service
@DS("sharding")