Merge pull request #6731 from dataease/pr@dev-v2@feat_sync

feat: 同步管理
This commit is contained in:
fit2cloud-chenyw 2023-11-16 20:10:56 +08:00 committed by GitHub
commit d198844b7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 7 deletions

View File

@ -11,7 +11,6 @@ import io.dataease.menu.dao.auto.mapper.CoreMenuMapper;
import io.dataease.utils.BeanUtils;
import jakarta.annotation.Resource;
import org.apache.commons.lang3.StringUtils;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
@ -19,8 +18,6 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static io.dataease.constant.CacheConstant.OrgCacheConstant.CORE_MENU_CACHE;
@Component
public class MenuManage {
@ -39,7 +36,7 @@ public class MenuManage {
return convertTree(treeNodes);
}
// @Cacheable(cacheNames = CORE_MENU_CACHE, key = "'-dataease-'")
// @Cacheable(cacheNames = CORE_MENU_CACHE, key = "'-dataease-'")
public List<CoreMenu> coreMenus() {
QueryWrapper<CoreMenu> wrapper = new QueryWrapper<>();
wrapper.orderByAsc("menu_sort");
@ -67,7 +64,7 @@ public class MenuManage {
if (CollectionUtil.isNotEmpty(children = menuTreeNode.getChildren())) {
vo.setChildren(convertTree(children));
}
if (CollectionUtil.isNotEmpty(children) || menuTreeNode.getType() != 1) {
if (CollectionUtil.isNotEmpty(vo.getChildren()) || menuTreeNode.getType() != 1) {
result.add(vo);
}
}
@ -91,6 +88,12 @@ public class MenuManage {
}
private boolean isXpackMenu(CoreMenu coreMenu) {
return coreMenu.getId().equals(7L) || coreMenu.getPid().equals(7L) || coreMenu.getId().equals(14L) || coreMenu.getId().equals(17L) || coreMenu.getId().equals(18L);
return coreMenu.getId().equals(7L)
|| coreMenu.getPid().equals(7L)
|| coreMenu.getId().equals(14L)
|| coreMenu.getId().equals(17L)
|| coreMenu.getId().equals(18L)
|| coreMenu.getId().equals(21L)
|| coreMenu.getPid().equals(21L);
}
}

View File

@ -18,6 +18,10 @@ i18n_menu.datasource=\u6570\u636E\u6E90
i18n_menu.user=\u7528\u6237\u7BA1\u7406
i18n_menu.org=\u7EC4\u7EC7\u7BA1\u7406
i18n_menu.auth=\u6743\u9650\u914D\u7F6E
i18n_menu.sync=\u540C\u6B65\u7BA1\u7406
i18n_menu.summary=\u6982\u89C8
i18n_menu.ds=\u6570\u636E\u6E90\u7BA1\u7406
i18n_menu.task=\u4EFB\u52A1\u7BA1\u7406
i18n_field_name_repeat=\u6709\u91CD\u590D\u5B57\u6BB5\u540D\uFF1A
i18n_pid_not_eq_id=\u79FB\u52A8\u76EE\u6807\u4E0D\u80FD\u662F\u81EA\u5DF1\u6216\u5B50\u76EE\u5F55
i18n_ds_name_exists=\u8BE5\u5206\u7EC4\u4E0B\u540D\u79F0\u91CD\u590D

View File

@ -0,0 +1,3 @@
<svg width="20" height="16" viewBox="0 0 20 16" xmlns="http://www.w3.org/2000/svg">
<path d="M10.8333 14.25H7.08325C3.63147 14.25 0.833252 11.4518 0.833252 8.00003C0.833252 5.52942 2.26677 3.39363 4.34741 2.37905L5.18374 3.82761C3.60043 4.54958 2.49992 6.14629 2.49992 8.00003C2.49992 10.5313 4.55195 12.5834 7.08325 12.5834H10.8333V11.4642C10.8333 11.2226 11.0291 11.0267 11.2708 11.0267C11.3767 11.0267 11.4791 11.0651 11.5588 11.1349L13.7903 13.0874C13.9721 13.2466 13.9906 13.5229 13.8315 13.7048C13.8187 13.7194 13.8049 13.7332 13.7903 13.7459L11.5588 15.6985C11.377 15.8576 11.1006 15.8391 10.9415 15.6573C10.8717 15.5776 10.8333 15.4752 10.8333 15.3692V14.25ZM9.16659 3.41671V4.53589C9.16659 4.64187 9.12813 4.74424 9.05834 4.82399C8.89923 5.00583 8.62284 5.02426 8.44099 4.86515L6.20955 2.91263C6.19493 2.89984 6.18118 2.88609 6.16839 2.87147C6.00928 2.68963 6.0277 2.41324 6.20955 2.25413L8.44099 0.301607C8.52075 0.231824 8.62312 0.193359 8.72909 0.193359C8.97071 0.193359 9.16659 0.389235 9.16659 0.630859V1.75004H12.9166C16.3684 1.75004 19.1666 4.54826 19.1666 8.00004C19.1666 10.4527 17.7539 12.5753 15.6978 13.5987L14.862 12.1512C16.4207 11.4195 17.4999 9.8358 17.4999 8.00004C17.4999 5.46874 15.4479 3.41671 12.9166 3.41671H9.16659Z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -1 +1 @@
Subproject commit 9088bf9f2fcea60e26db765c1307b04e6567cf93
Subproject commit 5de0ff0ed89e42656795c09ddc236c77a321d43e