Browse Source

添加上海直辖市

lfy 2 weeks ago
parent
commit
be58c62c0c

+ 2 - 1
delivery-framework/delivery-common/src/main/java/com/unis/framework/common/util/business/PermissionUtils.java

@@ -12,6 +12,7 @@ public class PermissionUtils {
12
     private static final String BJ_CODE = "110000"; // 北京
12
     private static final String BJ_CODE = "110000"; // 北京
13
     private static final String TJ_CODE = "120000"; // 天津
13
     private static final String TJ_CODE = "120000"; // 天津
14
     private static final String CQ_CODE = "500000"; // 重庆市
14
     private static final String CQ_CODE = "500000"; // 重庆市
15
+    private static final String SH_CODE = "310000"; // 上海市
15
     private static final String XJJSBT_CODE = "650091"; // 新疆建设兵团
16
     private static final String XJJSBT_CODE = "650091"; // 新疆建设兵团
16
 
17
 
17
     /**
18
     /**
@@ -28,7 +29,7 @@ public class PermissionUtils {
28
             areaCode = String.format("%s%s", areaCode.substring(0, 2), "%");
29
             areaCode = String.format("%s%s", areaCode.substring(0, 2), "%");
29
         } else if (CommonNumberEnum.TWO.ordinal() == areaLevel) { // 市
30
         } else if (CommonNumberEnum.TWO.ordinal() == areaLevel) { // 市
30
             // 北京市 110000,天津市 120000 ,重庆市 500000, 新疆建设兵团 650091
31
             // 北京市 110000,天津市 120000 ,重庆市 500000, 新疆建设兵团 650091
31
-            if (BJ_CODE.equals(parentCode) || TJ_CODE.equals(parentCode) || CQ_CODE.equals(parentCode) || XJJSBT_CODE.equals(parentCode)) {
32
+            if (BJ_CODE.equals(parentCode) || TJ_CODE.equals(parentCode) || CQ_CODE.equals(parentCode) || XJJSBT_CODE.equals(parentCode) ||SH_CODE.equals(parentCode)) {
32
                 return areaCode;
33
                 return areaCode;
33
             } else {
34
             } else {
34
                 areaCode = String.format("%s%s", areaCode.substring(0, 4), "%");
35
                 areaCode = String.format("%s%s", areaCode.substring(0, 4), "%");