| | |
| | | |
| | | private String type; |
| | | |
| | | private Integer level; |
| | | |
| | | private List<BtmTreeVO> childList; |
| | | } |
| | |
| | | try { |
| | | Map<String, String> domain = Optional.ofNullable(DomainRepeater.getDomain()).orElseGet(ArrayList::new).stream().collect(Collectors.toMap(DomainVO::getValue, DomainVO::getLabel)); |
| | | List<BtmTypeVO> vos = BtmTypeWrapper.build().listEntityVO(baseMapper.selectAll()); |
| | | Map<String, List<BtmTypeVO>> domainMap = vos.stream().sorted(Comparator.comparing(BtmTypeVO::getId)).collect(Collectors.groupingBy(BtmTypeVO::getBizDomain)); |
| | | if (CollectionUtils.isEmpty(vos)){ |
| | | return new ArrayList<>(); |
| | | } |
| | | Map<String, List<BtmTypeVO>> domainMap = Optional.ofNullable(vos).orElseGet(ArrayList::new).stream().sorted(Comparator.comparing(BtmTypeVO::getId)).collect(Collectors.groupingBy(BtmTypeVO::getBizDomain)); |
| | | List<BtmTreeVO> treeList = new ArrayList<>(); |
| | | domainMap.forEach((k,v)-> { |
| | | if (domain.containsKey(k)){ |
| | |
| | | parent.setName(label); |
| | | parent.setLabel(label); |
| | | parent.setId(k); |
| | | parent.setLevel(1); |
| | | parent.setChildList(v.stream().map(s -> { |
| | | BtmTreeVO child = new BtmTreeVO(); |
| | | child.setOid(s.getOid()); |
| | | child.setName(s.getName()); |
| | | child.setId(s.getId()); |
| | | child.setLevel(2); |
| | | child.setLabel(s.getId() + (s.getName() == null ? "" : "(" + s.getName() + ")")); |
| | | return child; |
| | | }).collect(Collectors.toList())); |
| | |
| | | try { |
| | | Map<String, String> domain = Optional.ofNullable(DomainRepeater.getDomain()).orElseGet(ArrayList::new).stream().collect(Collectors.toMap(DomainVO::getValue, DomainVO::getLabel)); |
| | | List<LinkTypeVO> vos = LinkTypeWrapper.build().listEntityVO(baseMapper.selectAll(), null); |
| | | Map<String, List<LinkTypeVO>> domainMap = vos.stream().collect(Collectors.groupingBy(LinkTypeVO::getBizDomain)); |
| | | if (CollectionUtils.isEmpty(vos)){ |
| | | return new ArrayList<>(); |
| | | } |
| | | Map<String, List<LinkTypeVO>> domainMap = Optional.ofNullable(vos).orElseGet(ArrayList::new).stream().collect(Collectors.groupingBy(LinkTypeVO::getBizDomain)); |
| | | List<BtmTreeVO> treeList = new ArrayList<>(); |
| | | domainMap.forEach((k,v)-> { |
| | | if (domain.containsKey(k)){ |
| | |
| | | BtmTreeVO parent = new BtmTreeVO(); |
| | | parent.setName(label); |
| | | parent.setId(k); |
| | | parent.setLevel(1); |
| | | parent.setLabel(label); |
| | | parent.setChildList(v.stream().map(s -> { |
| | | BtmTreeVO child = new BtmTreeVO(); |
| | |
| | | child.setLabel(s.getId() + (s.getName() == null ? "" : "(" + s.getName() + ")")); |
| | | child.setId(s.getId()); |
| | | child.setName(s.getName()); |
| | | child.setLevel(2); |
| | | return child; |
| | | }).collect(Collectors.toList())); |
| | | treeList.add(parent); |
| | |
| | | }); |
| | | vo.setFromBtmTypes(fromBtm); |
| | | vo.setToBtmTypes(toBtm); |
| | | vo.setTableName(vo.getTableName().toUpperCase(Locale.ROOT)); |
| | | vo.setTableName(Optional.ofNullable(vo.getTableName()).orElseGet(String::new).toUpperCase(Locale.ROOT)); |
| | | // 枚举处理 |
| | | vo.setDomainText(NewAppConstantEnum.getTextByName(vo.getBizDomain())); |
| | | return vo; |
| | |
| | | <result column="last_modifier" jdbcType="VARCHAR" property="lastModifier" /> |
| | | <result column="last_modify_time" jdbcType="TIMESTAMP" property="lastModifyTime" /> |
| | | <result column="ts" jdbcType="TIMESTAMP" property="ts" /> |
| | | <result column="biz-domain" jdbcType="VARCHAR" property="bizDomain" /> |
| | | <result column="biz_domain" jdbcType="VARCHAR" property="bizDomain" /> |
| | | </resultMap> |
| | | |
| | | <sql id="base_query_column"> |
| | | oid, id, name, description, shape, impl_class, from_btm_type, from_btm_type_name, |
| | | to_btm_type, to_btm_type_name, btm_name, owner, creator, create_time, last_modifier, last_modify_time, |
| | | ts, biz-domain |
| | | ts, biz_domain |
| | | </sql> |
| | | |
| | | <sql id="tableName"> |