publish 0.9.13

This commit is contained in:
曾文豪
2023-04-17 14:47:24 +08:00
parent 3f6989d039
commit 3ed9a47c66
12 changed files with 43 additions and 34 deletions

20
pom.xml
View File

@@ -6,7 +6,7 @@
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>0.9.12</version> <version>0.9.13</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>springboot-parent</name> <name>springboot-parent</name>
<description>杭州铁晟科技有限公司基础依赖</description> <description>杭州铁晟科技有限公司基础依赖</description>
@@ -57,55 +57,55 @@
<dependency> <dependency>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-database</artifactId> <artifactId>springboot-database</artifactId>
<version>0.9.12</version> <version>0.9.13</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-login</artifactId> <artifactId>springboot-login</artifactId>
<version>0.9.12</version> <version>0.9.13</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-web</artifactId> <artifactId>springboot-web</artifactId>
<version>0.9.12</version> <version>0.9.13</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-util</artifactId> <artifactId>springboot-util</artifactId>
<version>0.9.12</version> <version>0.9.13</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-platform</artifactId> <artifactId>springboot-platform</artifactId>
<version>0.9.12</version> <version>0.9.13</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-message</artifactId> <artifactId>springboot-message</artifactId>
<version>0.9.12</version> <version>0.9.13</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-encrypt</artifactId> <artifactId>springboot-encrypt</artifactId>
<version>0.9.12</version> <version>0.9.13</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-annotation</artifactId> <artifactId>springboot-annotation</artifactId>
<version>0.9.12</version> <version>0.9.13</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-poi</artifactId> <artifactId>springboot-poi</artifactId>
<version>0.9.12</version> <version>0.9.13</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>0.9.12</version> <version>0.9.13</version>
</parent> </parent>
<artifactId>springboot-ademo</artifactId> <artifactId>springboot-ademo</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>0.9.12</version> <version>0.9.13</version>
</parent> </parent>
<artifactId>springboot-annotation</artifactId> <artifactId>springboot-annotation</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>0.9.12</version> <version>0.9.13</version>
</parent> </parent>
<artifactId>springboot-database</artifactId> <artifactId>springboot-database</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>0.9.12</version> <version>0.9.13</version>
</parent> </parent>
<artifactId>springboot-encrypt</artifactId> <artifactId>springboot-encrypt</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>0.9.12</version> <version>0.9.13</version>
</parent> </parent>
<artifactId>springboot-login</artifactId> <artifactId>springboot-login</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>0.9.12</version> <version>0.9.13</version>
</parent> </parent>
<artifactId>springboot-message</artifactId> <artifactId>springboot-message</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>0.9.12</version> <version>0.9.13</version>
</parent> </parent>
<artifactId>springboot-platform</artifactId> <artifactId>springboot-platform</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>0.9.12</version> <version>0.9.13</version>
</parent> </parent>
<artifactId>springboot-poi</artifactId> <artifactId>springboot-poi</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>0.9.12</version> <version>0.9.13</version>
</parent> </parent>
<artifactId>springboot-util</artifactId> <artifactId>springboot-util</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>0.9.12</version> <version>0.9.13</version>
</parent> </parent>
<artifactId>springboot-web</artifactId> <artifactId>springboot-web</artifactId>

View File

@@ -6,6 +6,7 @@ import cn.hutool.core.thread.ThreadUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.extra.servlet.ServletUtil; import cn.hutool.extra.servlet.ServletUtil;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import cn.hutool.log.LogFactory;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tiesheng.core.mapper.CoreLogLoginMapper; import com.tiesheng.core.mapper.CoreLogLoginMapper;
import com.tiesheng.core.mapper.CoreLogMessageMapper; import com.tiesheng.core.mapper.CoreLogMessageMapper;
@@ -83,17 +84,20 @@ public class CoreLogService extends TsServiceBase<CoreLogOperationMapper, CoreLo
ThreadUtil.execute(() -> { ThreadUtil.execute(() -> {
CollUtil.split(list, 100).forEach((it) -> { CollUtil.split(list, 100).forEach((it) -> {
int accept = consumer.accept(it); try {
coreLogProcess.setSuccessNum(coreLogProcess.getSuccessNum() + accept); int accept = consumer.accept(it);
coreLogProcess.setFailNum(coreLogProcess.getFailNum() + it.size() - accept); coreLogProcess.setSuccessNum(coreLogProcess.getSuccessNum() + accept);
coreLogProcess.setFailNum(coreLogProcess.getFailNum() + it.size() - accept);
if (coreLogProcess.getFailNum() + coreLogProcess.getSuccessNum() >= list.size()) { coreLogProcessMapper.updateById(coreLogProcess);
coreLogProcess.setFailFile(consumer.getFailFile()); } catch (Exception e) {
coreLogProcess.setStatus(1); LogFactory.get().error(e);
} }
coreLogProcessMapper.updateById(coreLogProcess);
}); });
// 执行结束
coreLogProcess.setFailFile(consumer.getFailFile());
coreLogProcess.setStatus(1);
coreLogProcessMapper.updateById(coreLogProcess);
}); });
@@ -121,14 +125,19 @@ public class CoreLogService extends TsServiceBase<CoreLogOperationMapper, CoreLo
int pageSize = 1000; int pageSize = 1000;
int pageNum = 1, lastCount = pageSize; int pageNum = 1, lastCount = pageSize;
while (lastCount == pageSize) { while (lastCount == pageSize) {
lastCount = consumer.accept(pageNum, pageSize); try {
coreLogProcess.setSuccessNum(coreLogProcess.getSuccessNum() + lastCount); lastCount = consumer.accept(pageNum, pageSize);
if (lastCount != pageSize) { coreLogProcess.setSuccessNum(coreLogProcess.getSuccessNum() + lastCount);
coreLogProcess.setStatus(1); coreLogProcessMapper.updateById(coreLogProcess);
} catch (Exception e) {
LogFactory.get().error(e);
} }
coreLogProcessMapper.updateById(coreLogProcess);
pageNum++; pageNum++;
} }
// 执行结束
coreLogProcess.setStatus(1);
coreLogProcessMapper.updateById(coreLogProcess);
}); });
return coreLogProcess; return coreLogProcess;