优化

pull/48/head
smallbun 2023-09-13 20:44:12 +08:00
parent cd9472e172
commit 4c473491f5
3 changed files with 4 additions and 6 deletions

View File

@ -46,11 +46,9 @@ public interface AppGroupConverter {
* *
* @return {@link Predicate} * @return {@link Predicate}
*/ */
default Predicate queryPredicate() { default Predicate getQueryPredicate() {
QAppGroupEntity appGroup = QAppGroupEntity.appGroupEntity; QAppGroupEntity appGroup = QAppGroupEntity.appGroupEntity;
Predicate predicate = ExpressionUtils.and(appGroup.isNotNull(), appGroup.deleted.eq(Boolean.FALSE)); return ExpressionUtils.and(appGroup.isNotNull(), appGroup.deleted.eq(Boolean.FALSE));
//@formatter:on
return predicate;
} }
/** /**

View File

@ -41,7 +41,7 @@ public class AppGroupListResult implements Serializable {
* ID * ID
*/ */
@Schema(description = "应用分组ID") @Schema(description = "应用分组ID")
private Long id; private String id;
/** /**
* *

View File

@ -71,7 +71,7 @@ public class AppServiceImpl implements AppService {
*/ */
@Override @Override
public List<AppGroupListResult> getAppGroupList() { public List<AppGroupListResult> getAppGroupList() {
Predicate predicate = appGroupConverter.queryPredicate(); Predicate predicate = appGroupConverter.getQueryPredicate();
Predicate appGroupAssociationPredicate = appGroupConverter Predicate appGroupAssociationPredicate = appGroupConverter
.queryAppGroupAssociationPredicate(); .queryAppGroupAssociationPredicate();
List<AppGroupAssociationEntity> appGroupAssociationList = (List<AppGroupAssociationEntity>) appGroupAssociationRepository List<AppGroupAssociationEntity> appGroupAssociationList = (List<AppGroupAssociationEntity>) appGroupAssociationRepository