From 2476c4f7acc1a3a9087227660e32ef42157a46b6 Mon Sep 17 00:00:00 2001 From: 许鹏程 <1821349743@qq.com> Date: 星期五, 26 五月 2023 10:44:26 +0800 Subject: [PATCH] xg --- product-server-org-admin/src/main/java/com/product/org/admin/service/OrganizationServiceV2.java | 26 ++++++++++++++++++++------ 1 files changed, 20 insertions(+), 6 deletions(-) diff --git a/product-server-org-admin/src/main/java/com/product/org/admin/service/OrganizationServiceV2.java b/product-server-org-admin/src/main/java/com/product/org/admin/service/OrganizationServiceV2.java index 9703ce2..6bbd504 100644 --- a/product-server-org-admin/src/main/java/com/product/org/admin/service/OrganizationServiceV2.java +++ b/product-server-org-admin/src/main/java/com/product/org/admin/service/OrganizationServiceV2.java @@ -52,13 +52,13 @@ * * @param values 澶氱绫诲瀷鐨勫�� 澶氫釜閫楀彿鍒嗛殧 鍒楋細 [xxx~uuid],(xxx~user_id),{xxx_post_uuid} * @return 杩斿洖浜岀淮鏁扮粍 - * 绗竴涓淮搴︼細鍥哄畾闀垮害 3 锛屼笅鏍�0 浠h〃鏈烘瀯锛堝叕鍙搞�侀儴闂級 涓嬫爣 1 浠h〃宀椾綅 涓嬫爣 2 浠h〃 鐢ㄦ埛 锛屽彲鑳戒负绌� + * 绗竴涓淮搴︼細鍥哄畾闀垮害 4 锛屼笅鏍�0 浠h〃鍏徃 涓嬫爣1 浠h〃閮ㄩ棬 涓嬫爣 2 浠h〃宀椾綅 涓嬫爣 3 浠h〃 鐢ㄦ埛 锛屽彲鑳戒负绌� * 绗簩涓淮搴︼細 闀垮害鏈煡锛岃繑鍥炰竴缁存暟缁勪腑瀵瑰簲鍚箟鐨� 鍊�,鍙兘涓虹┖ * @auth cheng * @date 2022骞�4鏈�20鏃�18:21:09 */ public String[][] decomposesMultipleTypeValues(String values) { - String[][] typeValues = new String[3][]; + String[][] typeValues = new String[4][]; if (StringUtils.isEmpty(values)) { return typeValues; } @@ -69,17 +69,26 @@ } String actualValue = val.substring(1, val.length() - 1); - int index; + int index = -1; if (val.startsWith("[") && val.endsWith("]")) { //鏈烘瀯 - index = 0; + Map<String, Object> orgCacheByUuid = this.getOrgCacheByUuid(actualValue); + if (orgCacheByUuid != null) { + Object org_level_type = orgCacheByUuid.get(CmnConst.ORG_LEVEL_TYPE); + if (org_level_type != null) { + index = NumberUtil.parseInt(org_level_type.toString()); + } + } } else if (val.startsWith("{") && val.endsWith("}")) { //宀椾綅 - index = 1; + index = 2; } else if (val.startsWith("(") && val.endsWith(")")) { //浜哄憳 - index = 2; + index = 3; } else { + continue; + } + if (index == -1) { continue; } if (typeValues[index] == null) { @@ -92,6 +101,11 @@ return typeValues; } + public static void main(String[] args) { + String[] a = new String[1]; + System.out.println(a.length); + } + /** * 鑾峰彇鎵�鏈夌殑浜哄憳 * -- Gitblit v1.9.2