From a4d0977f01a4b290f4982918382fffb4f5fbcb14 Mon Sep 17 00:00:00 2001
From: cy <1664593601@qq.com>
Date: 星期六, 09 十二月 2023 11:55:08 +0800
Subject: [PATCH] feat: 默认查询1级
---
consum-base/src/main/java/com/consum/base/service/impl/BaseCategoryServiceImpl.java | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/consum-base/src/main/java/com/consum/base/service/impl/BaseCategoryServiceImpl.java b/consum-base/src/main/java/com/consum/base/service/impl/BaseCategoryServiceImpl.java
index 7b10210..982610e 100644
--- a/consum-base/src/main/java/com/consum/base/service/impl/BaseCategoryServiceImpl.java
+++ b/consum-base/src/main/java/com/consum/base/service/impl/BaseCategoryServiceImpl.java
@@ -11,12 +11,13 @@
import com.walker.infrastructure.utils.DateUtils;
import com.walker.infrastructure.utils.StringUtils;
import com.walker.jdbc.service.BaseServiceImpl;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.stream.Collectors;
-import org.springframework.beans.BeanUtils;
-import org.springframework.stereotype.Service;
/**
* @Description 鐗╁搧鍒嗙被
@@ -93,6 +94,8 @@
if (param.getFatherCategoryId() != null) {
sql.append("and father_category_id =:fatherCategoryId ");
paramts.put("fatherCategoryId", param.getFatherCategoryId());
+ } else {
+ sql.append("and levels =1 ");
}
//鍒嗙被鍚嶇О
if (!StringUtils.isEmpty(param.getCategoryName())) {
--
Gitblit v1.9.1