From 296466fa134e689368c5e34265a2030a1deb37b1 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期五, 24 一月 2025 13:08:28 +0800
Subject: [PATCH] !640 发布 5.3.0 新春版 祝大家新年快乐 Merge pull request !640 from 疯狂的狮子Li/dev

---
 ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/FlwCategoryServiceImpl.java |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/FlwCategoryServiceImpl.java b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/FlwCategoryServiceImpl.java
index 1e9507b..db1b7b7 100644
--- a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/FlwCategoryServiceImpl.java
+++ b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/FlwCategoryServiceImpl.java
@@ -66,8 +66,8 @@
      */
     @Cacheable(cacheNames = FlowConstant.FLOW_CATEGORY_NAME, key = "#categoryId")
     @Override
-    public String selectCategoryNameById(String categoryId) {
-        if (StringUtils.isBlank(categoryId)) {
+    public String selectCategoryNameById(Long categoryId) {
+        if (ObjectUtil.isNull(categoryId)) {
             return null;
         }
         FlowCategory category = baseMapper.selectOne(new LambdaQueryWrapper<FlowCategory>()
@@ -94,24 +94,24 @@
      * @return 娴佺▼鍒嗙被鏍戜俊鎭泦鍚�
      */
     @Override
-    public List<Tree<Long>> selectCategoryTreeList(FlowCategoryBo category) {
+    public List<Tree<String>> selectCategoryTreeList(FlowCategoryBo category) {
         LambdaQueryWrapper<FlowCategory> lqw = buildQueryWrapper(category);
         List<FlowCategoryVo> categorys = baseMapper.selectVoList(lqw);
         if (CollUtil.isEmpty(categorys)) {
             return CollUtil.newArrayList();
         }
         // 鑾峰彇褰撳墠鍒楄〃涓瘡涓�涓妭鐐圭殑parentId锛岀劧鍚庡湪鍒楄〃涓煡鎵炬槸鍚︽湁id涓庡叾parentId瀵瑰簲锛岃嫢鏃犲搴旓紝鍒欒〃鏄庢鏃惰妭鐐瑰垪琛ㄤ腑锛岃鑺傜偣鍦ㄥ綋鍓嶅垪琛ㄤ腑灞炰簬椤剁骇鑺傜偣
-        List<Tree<Long>> treeList = CollUtil.newArrayList();
+        List<Tree<String>> treeList = CollUtil.newArrayList();
         for (FlowCategoryVo d : categorys) {
-            Long parentId = d.getParentId();
-            FlowCategoryVo categoryVo = StreamUtils.findFirst(categorys, it -> it.getCategoryId().longValue() == parentId);
+            String parentId = d.getParentId().toString();
+            FlowCategoryVo categoryVo = StreamUtils.findFirst(categorys, it -> it.getCategoryId().toString().equals(parentId));
             if (ObjectUtil.isNull(categoryVo)) {
-                List<Tree<Long>> trees = TreeBuildUtils.build(categorys, parentId, (dept, tree) ->
-                    tree.setId(dept.getCategoryId())
-                        .setParentId(dept.getParentId())
+                List<Tree<String>> trees = TreeBuildUtils.build(categorys, parentId, (dept, tree) ->
+                    tree.setId(dept.getCategoryId().toString())
+                        .setParentId(dept.getParentId().toString())
                         .setName(dept.getCategoryName())
                         .setWeight(dept.getOrderNum()));
-                Tree<Long> tree = StreamUtils.findFirst(trees, it -> it.getId().longValue() == d.getCategoryId());
+                Tree<String> tree = StreamUtils.findFirst(trees, it -> it.getId().equals(d.getCategoryId().toString()));
                 treeList.add(tree);
             }
         }

--
Gitblit v1.9.3