categoryList) {
+ return categoryList.stream()
+ .filter(item -> item.getParentCid().equals(category.getCatId()))
+ .toList();
+ }
+
}
diff --git a/mall-product/src/main/java/com/mall/product/service/impl/CategoryServiceImpl.java b/mall-product/src/main/java/com/mall/product/service/impl/CategoryServiceImpl.java
index bbad4b2..ed8bfbf 100644
--- a/mall-product/src/main/java/com/mall/product/service/impl/CategoryServiceImpl.java
+++ b/mall-product/src/main/java/com/mall/product/service/impl/CategoryServiceImpl.java
@@ -13,10 +13,11 @@ import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
+import static com.mall.product.service.ext.CategoryServiceImplExt.getCategoryTreeChildrenList;
+
/**
*
* 商品三级分类 服务实现类
@@ -79,6 +80,7 @@ public class CategoryServiceImpl extends ServiceImpl i
*/
@Override
public void deleteCategory(List ids) {
+ // baseMapper.removeByIdsByIds(ids);
removeByIds(ids);
}
@@ -96,11 +98,4 @@ public class CategoryServiceImpl extends ServiceImpl i
.toList();
}
- private List getCategoryTreeChildrenList(Category category, List categoryList) {
- List voList = new ArrayList<>();
-
- categoryList.stream().filter(item -> item.getCatId().equals(category.getParentCid()))
- .forEach(voList::add);
- return voList;
- }
}
\ No newline at end of file
diff --git a/mall-product/src/main/resources/application-dev.yml b/mall-product/src/main/resources/application-dev.yml
index adb72ec..3191688 100644
--- a/mall-product/src/main/resources/application-dev.yml
+++ b/mall-product/src/main/resources/application-dev.yml
@@ -6,8 +6,20 @@ datasource:
username: gulimall
password: "0212Gulimall"
-nacos:
- server-addr: bunny-web.site:8848
+spring:
+ cloud:
+ nacos:
+ server-addr: bunny-web.site:8848
+ config:
+ import-check:
+ enabled: true
+ server-addr: bunny-web.site:8848
+ namespace: 510385f8-19a5-4eb4-8cfb-da1e13b9de09
+ group: DEFAULT_GROUP
+
+ config:
+ import:
+ - nacos:mall-product.yml
logging:
file:
diff --git a/mall-product/src/main/resources/application.yaml b/mall-product/src/main/resources/application.yaml
index 303063a..a5a84b0 100644
--- a/mall-product/src/main/resources/application.yaml
+++ b/mall-product/src/main/resources/application.yaml
@@ -17,13 +17,6 @@ spring:
maximum-pool-size: 20
connection-timeout: 30000
- cloud:
- nacos:
- server-addr: ${nacos.server-addr}
-
- jackson:
- date-format: yyyy-MM-dd HH:mm:ss
-
mybatis-plus:
mapper-locations: classpath:/mapper/*.xml
global-config:
@@ -31,3 +24,6 @@ mybatis-plus:
id-type: auto
logic-delete-value: 1
logic-not-delete-value: 0
+
+ jackson:
+ date-format: yyyy-MM-dd HH:mm:ss
\ No newline at end of file