From f544f4f61871747dead87442dfff12106b5d1fde Mon Sep 17 00:00:00 2001 From: caiyuchao Date: Thu, 4 Sep 2025 18:22:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=A6=96=E9=A1=B5=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E5=92=8C=E8=BF=9B=E5=B1=95=E6=9D=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../license/service/customer/CustomerServiceImpl.java | 9 ++++++--- .../src/main/resources/mapper/comment/CommentMapper.xml | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/agt-module-license/agt-module-license-server/src/main/java/org/agt/module/license/service/customer/CustomerServiceImpl.java b/agt-module-license/agt-module-license-server/src/main/java/org/agt/module/license/service/customer/CustomerServiceImpl.java index 004a7c9..7474ff5 100644 --- a/agt-module-license/agt-module-license-server/src/main/java/org/agt/module/license/service/customer/CustomerServiceImpl.java +++ b/agt-module-license/agt-module-license-server/src/main/java/org/agt/module/license/service/customer/CustomerServiceImpl.java @@ -26,8 +26,10 @@ import org.springframework.validation.annotation.Validated; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.ArrayList; +import java.util.Arrays; import java.util.LinkedHashMap; import java.util.List; +import java.util.stream.Collectors; import static org.agt.framework.common.exception.util.ServiceExceptionUtil.exception; import static org.agt.module.license.enums.ErrorCodeConstants.CUSTOMER_CODE_DUPLICATE; @@ -56,9 +58,10 @@ public class CustomerServiceImpl implements CustomerService { @Override public DashboardRespVO dashboard() { - Long customerCount = customerMapper.selectCount(Wrappers.lambdaQuery().ne(CustomerDO::getName, "AGT")); - CustomerDO customerDO = customerMapper.selectOne(Wrappers.lambdaQuery().eq(CustomerDO::getName, "AGT"), false); - Long projectCount = projectMapper.selectCount(Wrappers.lambdaQuery().ne(customerDO != null, ProjectDO::getCustomerId, customerDO.getId())); + Long customerCount = customerMapper.selectCount(Wrappers.lambdaQuery().notIn(CustomerDO::getName, Arrays.asList("AGT", "BA", "Blue Arcus"))); + List customerDOS = customerMapper.selectList(Wrappers.lambdaQuery().in(CustomerDO::getName, Arrays.asList("AGT", "BA", "Blue Arcus"))); + List customerIds = customerDOS.stream().map(CustomerDO::getId).collect(Collectors.toList()); + Long projectCount = projectMapper.selectCount(Wrappers.lambdaQuery().notIn(CollUtil.isNotEmpty(customerIds), ProjectDO::getCustomerId, customerIds)); Long contractCount = projectMapper.selectCount(Wrappers.lambdaQuery().ne(ProjectDO::getContractCode, "0")); Long licenseCount = licenseMapper.selectCount(); DashboardRespVO dashboardRespVO = new DashboardRespVO(); diff --git a/agt-module-license/agt-module-license-server/src/main/resources/mapper/comment/CommentMapper.xml b/agt-module-license/agt-module-license-server/src/main/resources/mapper/comment/CommentMapper.xml index 06e14eb..2d33fce 100644 --- a/agt-module-license/agt-module-license-server/src/main/resources/mapper/comment/CommentMapper.xml +++ b/agt-module-license/agt-module-license-server/src/main/resources/mapper/comment/CommentMapper.xml @@ -65,9 +65,9 @@ LEFT JOIN system_users u3 ON p.technical_owner_a = u3.id AND u3.deleted = 0 where p.deleted = 0 + and c.update_time >= DATE_SUB(CURDATE(), INTERVAL 1 WEEK) ORDER BY c.update_time DESC - LIMIT 10 \ No newline at end of file