mirror of https://gitee.com/topiam/eiam
⚡ 优化代码
parent
be09062d44
commit
43af7e668f
|
@ -21,6 +21,8 @@ import java.io.Serializable;
|
||||||
|
|
||||||
import org.springdoc.core.annotations.ParameterObject;
|
import org.springdoc.core.annotations.ParameterObject;
|
||||||
|
|
||||||
|
import cn.topiam.employee.common.enums.app.AppGroupType;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
@ -49,4 +51,10 @@ public class AppGroupQuery implements Serializable {
|
||||||
@Parameter(description = "分组编码")
|
@Parameter(description = "分组编码")
|
||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分组类型
|
||||||
|
*/
|
||||||
|
@Parameter(description = "分组类型")
|
||||||
|
private AppGroupType type;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@ package cn.topiam.employee.common.repository.app.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
import org.springframework.data.domain.PageImpl;
|
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("%'");
|
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");
|
builder.append(" ORDER BY `group`.create_time DESC");
|
||||||
//@formatter:on
|
//@formatter:on
|
||||||
String sql = builder.toString();
|
String sql = builder.toString();
|
||||||
|
|
|
@ -55,6 +55,12 @@ public class AppGroupListResult implements Serializable {
|
||||||
@Parameter(description = "分组编码")
|
@Parameter(description = "分组编码")
|
||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用数量
|
||||||
|
*/
|
||||||
|
@Parameter(description = "应用数量")
|
||||||
|
private Integer appCount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分组类型
|
* 分组类型
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue