From 6fa748b83496d6bb6a8325b2358f2c23bf883931 Mon Sep 17 00:00:00 2001 From: dinggang <2498628697@qq.com> Date: Thu, 24 Nov 2022 17:59:14 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=88=A0=E9=99=A4=E7=9F=A5?= =?UTF-8?q?=E8=AF=86=E5=BA=93=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/renren/common/controller/CensusController.java | 4 +++- .../src/main/resources/db/V7.8__role_user_add_col.sql | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 renren-admin/src/main/resources/db/V7.8__role_user_add_col.sql diff --git a/renren-admin/src/main/java/io/renren/common/controller/CensusController.java b/renren-admin/src/main/java/io/renren/common/controller/CensusController.java index 46be3847..412b5d45 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/CensusController.java +++ b/renren-admin/src/main/java/io/renren/common/controller/CensusController.java @@ -122,7 +122,9 @@ public class CensusController { CompletableFuture resourceAmount = CompletableFuture.supplyAsync(() -> { // 获取资源汇聚总量 Map map = (Map) resourceService.selectTotal(); List> dbAmount = (List>) map.get("total"); - return dbAmount.stream().mapToLong(index -> Long.parseLong(index.get("count").toString())).sum(); + return dbAmount.stream() + .filter(index -> !"知识库".equals(index.get("type").toString())) //2022-11-24 资源总量去除知识库统计 + .mapToLong(index -> Long.parseLong(index.get("count").toString())).sum(); }, executor).thenAccept(sum -> result.add(new HashMap() { { put("amount", sum); diff --git a/renren-admin/src/main/resources/db/V7.8__role_user_add_col.sql b/renren-admin/src/main/resources/db/V7.8__role_user_add_col.sql new file mode 100644 index 00000000..628b0b3c --- /dev/null +++ b/renren-admin/src/main/resources/db/V7.8__role_user_add_col.sql @@ -0,0 +1,5 @@ +ALTER TABLE sys_role_user + ADD COLUMN `del_flag` INT NOT NULL DEFAULT 0 COMMENT '删除标志:0正常,1删除', + ADD COLUMN `updater` BIGINT NULL COMMENT '修改人', + ADD COLUMN `update_date` datetime(0) NULL COMMENT '修改时间'; +