From 43af7e668f4a7617bf4337f279ce1366fc9860f3 Mon Sep 17 00:00:00 2001 From: smallbun <2689170096@qq.com> Date: Sun, 10 Sep 2023 22:28:33 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/entity/app/query/AppGroupQuery.java | 12 ++++++++++-- .../app/impl/AppGroupRepositoryCustomizedImpl.java | 6 ++++++ .../console/pojo/result/app/AppGroupListResult.java | 6 ++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/query/AppGroupQuery.java b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/query/AppGroupQuery.java index 74435300..4b8ecb6b 100644 --- a/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/query/AppGroupQuery.java +++ b/eiam-common/src/main/java/cn/topiam/employee/common/entity/app/query/AppGroupQuery.java @@ -21,6 +21,8 @@ import java.io.Serializable; import org.springdoc.core.annotations.ParameterObject; +import cn.topiam.employee.common.enums.app.AppGroupType; + import lombok.Data; import io.swagger.v3.oas.annotations.Parameter; @@ -41,12 +43,18 @@ public class AppGroupQuery implements Serializable { * 分组名称 */ @Parameter(description = "分组名称") - private String name; + private String name; /** * 分组编码 */ @Parameter(description = "分组编码") - private String code; + private String code; + + /** + * 分组类型 + */ + @Parameter(description = "分组类型") + private AppGroupType type; } diff --git a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/AppGroupRepositoryCustomizedImpl.java b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/AppGroupRepositoryCustomizedImpl.java index 8de124b1..15637d1a 100644 --- a/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/AppGroupRepositoryCustomizedImpl.java +++ b/eiam-common/src/main/java/cn/topiam/employee/common/repository/app/impl/AppGroupRepositoryCustomizedImpl.java @@ -19,6 +19,7 @@ package cn.topiam.employee.common.repository.app.impl; import java.util.List; +import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageImpl; @@ -77,6 +78,11 @@ public class AppGroupRepositoryCustomizedImpl implements AppGroupRepositoryCusto builder.append(" AND `group`.code_ like '%").append(query.getCode()).append("%'"); } + //分组类型 + if (ObjectUtils.isNotEmpty(query.getType())) { + builder.append(" AND `group`.type_ like '%").append(query.getType().getCode()).append("%'"); + } + builder.append(" ORDER BY `group`.create_time DESC"); //@formatter:on String sql = builder.toString(); diff --git a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppGroupListResult.java b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppGroupListResult.java index 3471caef..e60310c5 100644 --- a/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppGroupListResult.java +++ b/eiam-console/src/main/java/cn/topiam/employee/console/pojo/result/app/AppGroupListResult.java @@ -55,6 +55,12 @@ public class AppGroupListResult implements Serializable { @Parameter(description = "分组编码") private String code; + /** + * 应用数量 + */ + @Parameter(description = "应用数量") + private Integer appCount; + /** * 分组类型 */