From 12d0de05f9f570243382c32ba0ba6675e7d7931c Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期三, 07 九月 2022 15:43:01 +0800
Subject: [PATCH] Merge branch 'master' of http://42.193.1.25:9521/r/sccg_server

---
 ycl-common/src/main/java/com/ycl/service/user/impl/UmsAdminServiceImpl.java |    1 
 ycl-common/src/main/java/com/ycl/utils/common/RandomUtils.java              |    9 
 ycl-platform/src/main/java/com/ycl/component/DynamicSecurityFilter.java     |    2 
 ycl-common/src/main/java/com/ycl/utils/common/PojoUtils.java                |   35 +++
 ycl-common/src/main/java/com/ycl/utils/common/NetworkUtil.java              |  328 +++++++++++++++++++++++++++++
 ycl-common/src/main/java/com/ycl/dto/UmsAdminParam.java                     |   29 ++
 ycl-common/src/main/java/com/ycl/constant/SysConst.java                     |   17 +
 ycl-common/src/main/java/com/ycl/entity/user/UmsAdmin.java                  |   31 ++
 ycl-common/src/main/java/com/ycl/utils/common/MacUtils.java                 |  203 ++++++++++++++++++
 9 files changed, 648 insertions(+), 7 deletions(-)

diff --git a/ycl-common/src/main/java/com/ycl/constant/SysConst.java b/ycl-common/src/main/java/com/ycl/constant/SysConst.java
new file mode 100644
index 0000000..3bf4301
--- /dev/null
+++ b/ycl-common/src/main/java/com/ycl/constant/SysConst.java
@@ -0,0 +1,17 @@
+package com.ycl.constant;
+
+/**
+ * 鍏ㄥ眬甯搁噺
+ * @author Lyq
+ * @version 1.0
+ * @date 2022/9/7
+ */
+public class SysConst {
+    /**椤甸潰涓嬫媺妗嗕紶 0琛ㄧず 鏌ヨ鏉′欢涓哄叏閮�*/
+    public static final Integer COMBOBOX_ALL = 0;
+
+    /**
+     * 鎺ㄨ崘hashMap鐨勫垵濮嬮暱搴�
+     */
+    public static final Integer REF_MAP_LENGTH = 20;
+}
diff --git a/ycl-common/src/main/java/com/ycl/dto/UmsAdminParam.java b/ycl-common/src/main/java/com/ycl/dto/UmsAdminParam.java
index 7a2eb52..eee1adb 100644
--- a/ycl-common/src/main/java/com/ycl/dto/UmsAdminParam.java
+++ b/ycl-common/src/main/java/com/ycl/dto/UmsAdminParam.java
@@ -5,7 +5,9 @@
 import lombok.Setter;
 
 import javax.validation.constraints.Email;
+import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
 
 /**
  * 鐢ㄦ埛鐧诲綍鍙傛暟
@@ -13,19 +15,40 @@
 @Getter
 @Setter
 public class UmsAdminParam {
-    @NotEmpty
+    @NotBlank(message = "鐢ㄦ埛鍚嶄笉鑳戒负绌�")
     @ApiModelProperty(value = "鐢ㄦ埛鍚�", required = true)
     private String username;
+
+    @ApiModelProperty(value = "鎵嬫満鍙风爜")
+    private String mobile;
+
     @NotEmpty
     @ApiModelProperty(value = "瀵嗙爜", required = true)
     private String password;
+
     @ApiModelProperty(value = "鐢ㄦ埛澶村儚")
     private String icon;
+
     @Email
     @ApiModelProperty(value = "閭")
     private String email;
-    @ApiModelProperty(value = "鐢ㄦ埛鏄电О")
-    private String nickName;
+
+
     @ApiModelProperty(value = "澶囨敞")
     private String note;
+
+    @ApiModelProperty(value = "鏄惁鍏氬憳,0:鍚︼紝1锛氭槸")
+    private byte isDy;
+
+    @ApiModelProperty(value = "鑱屽姟")
+    private String jobTitle;
+
+    @ApiModelProperty(value = "閮ㄩ棬id")
+    private Long departmentId;
+
+    @ApiModelProperty(value = "鐢ㄦ埛绫诲瀷")
+    private byte userType;
+
+    @ApiModelProperty(value = "搴ф満/鍒嗘満")
+    private String zj;
 }
diff --git a/ycl-common/src/main/java/com/ycl/entity/user/UmsAdmin.java b/ycl-common/src/main/java/com/ycl/entity/user/UmsAdmin.java
index 1494867..67edecf 100644
--- a/ycl-common/src/main/java/com/ycl/entity/user/UmsAdmin.java
+++ b/ycl-common/src/main/java/com/ycl/entity/user/UmsAdmin.java
@@ -22,10 +22,10 @@
 @Data
 @EqualsAndHashCode(callSuper = false)
 @TableName("ums_admin")
-@ApiModel(value="UmsAdmin瀵硅薄", description="鍚庡彴鐢ㄦ埛琛�")
+@ApiModel(value = "UmsAdmin瀵硅薄", description = "鍚庡彴鐢ㄦ埛琛�")
 public class UmsAdmin implements Serializable {
 
-    private static final long serialVersionUID=1L;
+    private static final long serialVersionUID = 1L;
 
     @TableId(value = "id", type = IdType.AUTO)
     private Long id;
@@ -40,7 +40,7 @@
     @ApiModelProperty(value = "閭")
     private String email;
 
-    @ApiModelProperty(value = "鏄电О")
+    @ApiModelProperty(value = "鐢ㄦ埛鍚嶏紙绯荤粺榛樿鐢熸垚锛�")
     private String nickName;
 
     @ApiModelProperty(value = "澶囨敞淇℃伅")
@@ -55,5 +55,30 @@
     @ApiModelProperty(value = "甯愬彿鍚敤鐘舵�侊細0->绂佺敤锛�1->鍚敤")
     private Integer status;
 
+    @ApiModelProperty(value = "mac鍦板潃")
+    private String macAddress;
 
+    @ApiModelProperty(value = "ip鍦板潃")
+    private String ipAddress;
+
+    @ApiModelProperty(value = "鏄惁鍏氬憳")
+    private byte isDy;
+
+    @ApiModelProperty(value = "鑱屽姟")
+    private String jobTitle;
+
+    @ApiModelProperty(value = "閮ㄩ棬id")
+    private Long departmentId;
+
+    @ApiModelProperty(value = "鐢ㄦ埛绫诲瀷")
+    private byte userType;
+
+    @ApiModelProperty(value = "搴ф満/鍒嗘満")
+    private String zj;
+
+    @ApiModelProperty(value = "鐢ㄦ埛鍚�")
+    private String realName;
+
+    @ApiModelProperty(value = "鎵嬫満鍙风爜")
+    private String mobile;
 }
diff --git a/ycl-common/src/main/java/com/ycl/service/user/impl/UmsAdminServiceImpl.java b/ycl-common/src/main/java/com/ycl/service/user/impl/UmsAdminServiceImpl.java
index 60beaa5..59a0545 100644
--- a/ycl-common/src/main/java/com/ycl/service/user/impl/UmsAdminServiceImpl.java
+++ b/ycl-common/src/main/java/com/ycl/service/user/impl/UmsAdminServiceImpl.java
@@ -79,6 +79,7 @@
     @Override
     public UmsAdmin register(UmsAdminParam umsAdminParam) {
         UmsAdmin umsAdmin = new UmsAdmin();
+        //TODO mac,ip,鑱屽姟锛岀敤鎴风被鍨�
         BeanUtils.copyProperties(umsAdminParam, umsAdmin);
         umsAdmin.setCreateTime(new Date());
         umsAdmin.setStatus(1);
diff --git a/ycl-common/src/main/java/com/ycl/utils/common/MacUtils.java b/ycl-common/src/main/java/com/ycl/utils/common/MacUtils.java
new file mode 100644
index 0000000..44f8380
--- /dev/null
+++ b/ycl-common/src/main/java/com/ycl/utils/common/MacUtils.java
@@ -0,0 +1,203 @@
+package com.ycl.utils.common;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+/**
+ * @author Lyq
+ * @version 1.0
+ * @date 2022/9/7
+ * 鑾峰彇鎿嶄綔绯荤粺鐨刴ac鍦板潃
+ */
+public class MacUtils {
+    /**
+     * 鑾峰彇褰撳墠鎿嶄綔绯荤粺鍚嶇О. return 鎿嶄綔绯荤粺鍚嶇О 渚嬪:windows,Linux,Unix绛�.
+     */
+    public static String getOSName() {
+        return System.getProperty("os.name").toLowerCase();
+    }
+
+
+    /**
+     * 鑾峰彇Unix缃戝崱鐨刴ac鍦板潃.
+     *
+     * @return mac鍦板潃
+     */
+    public static String getUnixMACAddress() {
+        String mac = null;
+        BufferedReader bufferedReader = null;
+        Process process = null;
+        try {
+            /**
+             * Unix涓嬬殑鍛戒护锛屼竴鑸彇eth0浣滀负鏈湴涓荤綉鍗� 鏄剧ず淇℃伅涓寘鍚湁mac鍦板潃淇℃伅
+             */
+            process = Runtime.getRuntime().exec("ifconfig eth0");
+            bufferedReader = new BufferedReader(new InputStreamReader(
+                    process.getInputStream()));
+            String line = null;
+            int index = -1;
+            while ((line = bufferedReader.readLine()) != null) {
+                /**
+                 * 瀵绘壘鏍囩ず瀛楃涓瞇hwaddr]
+                 */
+                index = line.toLowerCase().indexOf("hwaddr");
+                /**
+                 * 鎵惧埌浜�
+                 */
+                if (index != -1) {
+                    /**
+                     * 鍙栧嚭mac鍦板潃骞跺幓闄�2杈圭┖鏍�
+                     */
+                    mac = line.substring(index + "hwaddr".length() + 1).trim();
+                    break;
+                }
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                if (bufferedReader != null) {
+                    bufferedReader.close();
+                }
+            } catch (IOException e1) {
+                e1.printStackTrace();
+            }
+            bufferedReader = null;
+            process = null;
+        }
+
+
+        return mac;
+    }
+
+
+    /**
+     * 鑾峰彇Linux缃戝崱鐨刴ac鍦板潃.
+     *
+     * @return mac鍦板潃
+     */
+    public static String getLinuxMACAddress() {
+        String mac = null;
+        BufferedReader bufferedReader = null;
+        Process process = null;
+        try {
+            /**
+             * linux涓嬬殑鍛戒护锛屼竴鑸彇eth0浣滀负鏈湴涓荤綉鍗� 鏄剧ず淇℃伅涓寘鍚湁mac鍦板潃淇℃伅
+             */
+            process = Runtime.getRuntime().exec("ifconfig eth0");
+            bufferedReader = new BufferedReader(new InputStreamReader(
+                    process.getInputStream()));
+            String line = null;
+            int index = -1;
+            while ((line = bufferedReader.readLine()) != null) {
+                index = line.toLowerCase().indexOf("纭欢鍦板潃");
+                /**
+                 * 鎵惧埌浜�
+                 */
+                if (index != -1) {
+                    /**
+                     * 鍙栧嚭mac鍦板潃骞跺幓闄�2杈圭┖鏍�
+                     */
+                    mac = line.substring(index + 4).trim();
+                    break;
+                }
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                if (bufferedReader != null) {
+                    bufferedReader.close();
+                }
+            } catch (IOException e1) {
+                e1.printStackTrace();
+            }
+            bufferedReader = null;
+            process = null;
+        }
+
+        // 鍙栦笉鍒帮紝璇曚笅Unix鍙栧彂
+        if (mac == null){
+            return getUnixMACAddress();
+        }
+
+
+        return mac;
+    }
+
+
+    /**
+     * 鑾峰彇widnows缃戝崱鐨刴ac鍦板潃.
+     *
+     * @return mac鍦板潃
+     */
+    public static String getWindowsMACAddress() {
+        String mac = null;
+        BufferedReader bufferedReader = null;
+        Process process = null;
+        try {
+            /**
+             * windows涓嬬殑鍛戒护锛屾樉绀轰俊鎭腑鍖呭惈鏈塵ac鍦板潃淇℃伅
+             */
+            process = Runtime.getRuntime().exec("ipconfig /all");
+            bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
+            String line = null;
+            int index = -1;
+            while ((line = bufferedReader.readLine()) != null) {
+                /**
+                 * 瀵绘壘鏍囩ず瀛楃涓瞇physical address 鎴�  鐗╃悊鍦板潃]
+                 */
+                if (line.split("-").length == 6){
+                    index = line.indexOf(":");
+                    if (index != -1) {
+                        /**
+                         * 鍙栧嚭mac鍦板潃骞跺幓闄�2杈圭┖鏍�
+                         */
+                        mac = line.substring(index + 1).trim();
+                    }
+                    break;
+                }
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                if (bufferedReader != null) {
+                    bufferedReader.close();
+                }
+            } catch (IOException e1) {
+                e1.printStackTrace();
+            }
+            bufferedReader = null;
+            process = null;
+        }
+
+
+        return mac;
+    }
+
+
+    public static String getMac(){
+        String os = getOSName();
+        String mac;
+        if (os.startsWith("windows")) {
+            mac = getWindowsMACAddress();
+        } else if (os.startsWith("linux")) {
+            mac = getLinuxMACAddress();
+        } else {
+            mac = getUnixMACAddress();
+        }
+        return mac == null ? "" : mac;
+    }
+
+    /**
+     * 娴嬭瘯鐢ㄧ殑main鏂规硶.
+     *
+     * @param argc 杩愯鍙傛暟.
+     */
+    public static void main(String[] argc) {
+        String mac = MacUtils.getMac();
+        System.out.println(mac);
+    }
+}
diff --git a/ycl-common/src/main/java/com/ycl/utils/common/NetworkUtil.java b/ycl-common/src/main/java/com/ycl/utils/common/NetworkUtil.java
new file mode 100644
index 0000000..4ae8138
--- /dev/null
+++ b/ycl-common/src/main/java/com/ycl/utils/common/NetworkUtil.java
@@ -0,0 +1,328 @@
+package com.ycl.utils.common;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.text.StrTokenizer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.servlet.http.HttpServletRequest;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.regex.Pattern;
+
+/**
+ * @author Lyq
+ * @version 1.0
+ * @date 2022/9/7
+ */
+public class NetworkUtil {
+    public static final String  REQ_TOKEY_KEY = "Authorization";
+    /**
+     * Logger for this class
+     */
+    private static final Logger LOGGER        = LoggerFactory.getLogger(NetworkUtil.class);
+
+    /**
+     * 鏂规硶鍚�: getIpAddress
+     * 鏂规硶鎻忚堪: 鑾峰彇璇锋眰涓绘満IP鍦板潃,濡傛灉閫氳繃浠g悊杩涙潵锛屽垯閫忚繃闃茬伀澧欒幏鍙栫湡瀹濱P鍦板潃;
+     * 鍙傛暟 @param request
+     * 鍙傛暟 @return
+     * 鍙傛暟 @throws IOException 鍙傛暟璇存槑
+     * 杩斿洖绫诲瀷 String 杩斿洖绫诲瀷
+     */
+    public final static String getIpAddress(HttpServletRequest request) {
+        // 鑾峰彇璇锋眰涓绘満IP鍦板潃,濡傛灉閫氳繃浠g悊杩涙潵锛屽垯閫忚繃闃茬伀澧欒幏鍙栫湡瀹濱P鍦板潃
+        if(null==request){
+            return "";
+        }
+
+        String ip = request.getHeader("x-original-forwarded-for");
+//        if (LOGGER.isInfoEnabled()) {
+//            LOGGER.info("getIpAddress(HttpServletRequest) - x-original-forwarded-for - String ip=" + ip);
+//        }
+
+        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+            ip = request.getHeader("X-Forwarded-For");
+//            if (LOGGER.isInfoEnabled()) {
+//                LOGGER.info("getIpAddress(HttpServletRequest) - X-Forwarded-For - String ip=" + ip);
+//            }
+        }
+
+        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+
+            ip = request.getHeader("Proxy-Client-IP");
+//            if (LOGGER.isInfoEnabled()) {
+//                LOGGER.info(
+//                        "getIpAddress(HttpServletRequest) - Proxy-Client-IP - String ip=" + ip);
+//            }
+        }
+        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+            ip = request.getHeader("WL-Proxy-Client-IP");
+//            if (LOGGER.isInfoEnabled()) {
+//                LOGGER.info(
+//                        "getIpAddress(HttpServletRequest) - WL-Proxy-Client-IP - String ip=" + ip);
+//            }
+        }
+        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+            ip = request.getHeader("HTTP_CLIENT_IP");
+//            if (LOGGER.isInfoEnabled()) {
+//                LOGGER.info(
+//                        "getIpAddress(HttpServletRequest) - HTTP_CLIENT_IP - String ip=" + ip);
+//            }
+        }
+        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+            ip = request.getHeader("HTTP_X_FORWARDED_FOR");
+//            if (LOGGER.isInfoEnabled()) {
+//                LOGGER
+//                        .info("getIpAddress(HttpServletRequest) - HTTP_X_FORWARDED_FOR - String ip="
+//                                + ip);
+//            }
+        }
+        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+            ip = request.getRemoteAddr();
+//            if (LOGGER.isInfoEnabled()) {
+//                LOGGER.info("getIpAddress(HttpServletRequest) - getRemoteAddr - String ip=" + ip);
+//            }
+        }
+
+        //闃茶寖ip娆洪獥锛屽鏋滄湁澶氫釜閫楀彿鍒嗛殧鐨刬p锛屽繀椤昏鏈�鍚庝竴涓�
+        if (ip.length() > 15) {
+            String[] ips = ip.split(",");
+            ip = ips[ips.length -1];
+        }
+
+        return ip;
+    }
+
+    public static final String _255 = "(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)";
+    public static final Pattern pattern = Pattern.compile("^(?:" + _255 + "\\.){3}" + _255 + "$");
+
+    public static String longToIpV4(long longIp) {
+        int octet3 = (int) ((longIp >> 24) % 256);
+        int octet2 = (int) ((longIp >> 16) % 256);
+        int octet1 = (int) ((longIp >> 8) % 256);
+        int octet0 = (int) ((longIp) % 256);
+        return octet3 + "." + octet2 + "." + octet1 + "." + octet0;
+    }
+
+    public static long ipV4ToLong(String ip) {
+        String[] octets = ip.split("\\.");
+        return (Long.parseLong(octets[0]) << 24) + (Integer.parseInt(octets[1]) << 16)
+                + (Integer.parseInt(octets[2]) << 8) + Integer.parseInt(octets[3]);
+    }
+
+    public static boolean isIPv4Private(String ip) {
+        long longIp = ipV4ToLong(ip);
+        return (longIp >= ipV4ToLong("10.0.0.0") && longIp <= ipV4ToLong("10.255.255.255"))
+                || (longIp >= ipV4ToLong("172.16.0.0") && longIp <= ipV4ToLong("172.31.255.255"))
+                || longIp >= ipV4ToLong("192.168.0.0") && longIp <= ipV4ToLong("192.168.255.255");
+    }
+
+    public static boolean isIPv4Valid(String ip) {
+        return pattern.matcher(ip).matches();
+    }
+
+    public static String getIpFromRequest(HttpServletRequest request) {
+        String ip;
+        boolean found = false;
+        if ((ip = request.getHeader("x-forwarded-for")) != null) {
+            StrTokenizer tokenizer = new StrTokenizer(ip, ",");
+            while (tokenizer.hasNext()) {
+                ip = tokenizer.nextToken().trim();
+                if (isIPv4Valid(ip) && !isIPv4Private(ip)) {
+                    found = true;
+                    break;
+                }
+            }
+        }
+        if (!found) {
+            ip = request.getRemoteAddr();
+        }
+        return ip;
+    }
+
+    /**
+     * 鏂规硶鍚�: getAccessToken
+     * 鏂规硶鎻忚堪: 鑾峰彇token
+     * 鍙傛暟 @param request
+     * 鍙傛暟 @return 鍙傛暟璇存槑
+     * 杩斿洖绫诲瀷 String 杩斿洖绫诲瀷
+     */
+    public static String getAccessToken(HttpServletRequest request) {
+        String tokenNumber = request.getHeader(REQ_TOKEY_KEY);
+
+        if (StringUtils.isBlank(tokenNumber)) {
+            tokenNumber = request.getParameter("Authorization");
+            LOGGER.debug("tokenNumber=" + tokenNumber);
+        }
+        return tokenNumber;
+    }
+
+    /**
+
+     /**
+     * 浠庤姹傚ご涓幏鍙栨寚瀹歬ey鐨勫��
+     *
+     * @param request
+     * @param key
+     * @return
+     */
+    public static String getHeaderByKey(HttpServletRequest request, String key) {
+        if (StringUtils.isBlank(key)) {
+            return null;
+        }
+        return request.getHeader(key);
+    }
+
+    /**
+     * 浠庤姹傚ご涓幏鍙栨槸鍚﹂渶瑕佹樉绀鸿嫳鏂�
+     *
+     * @param request
+     * @param
+     * @return true 鏄剧ず鑻辨枃銆乫alse 鏄剧ず涓枃
+     */
+    public static boolean isEnglish(HttpServletRequest request) {
+
+        if ("en".equalsIgnoreCase(getHeaderByKey(request,"language"))) {
+            return true;
+        }else{
+            return false;
+        }
+    }
+
+
+    public static String getHostNameForLiunx() {
+        try {
+            return (InetAddress.getLocalHost()).getHostName();
+        } catch (UnknownHostException uhe) {
+            String host = uhe.getMessage(); // host = "hostname: hostname"
+            if (host != null) {
+                int colon = host.indexOf(':');
+                if (colon > 0) {
+                    return host.substring(0, colon);
+                }
+            }
+            return "UnknownHost";
+        }
+    }
+
+
+    public static String getHostName() {
+        if (System.getenv("COMPUTERNAME") != null) {
+            return System.getenv("COMPUTERNAME");
+        } else {
+            return getHostNameForLiunx();
+        }
+    }
+
+    public static boolean internalIp(String ip) {
+        byte[] addr = textToNumericFormatV4(ip);
+        if (null != addr) {
+            return internalIp(addr) || "127.0.0.1".equals(ip);
+        }
+        return false;
+    }
+
+    private static boolean internalIp(byte[] addr) {
+        final byte b0 = addr[0];
+        final byte b1 = addr[1];
+        // 10.x.x.x/8
+        final byte SECTION_1 = 0x0A;
+        // 172.16.x.x/12
+        final byte SECTION_2 = (byte) 0xAC;
+        final byte SECTION_3 = (byte) 0x10;
+        final byte SECTION_4 = (byte) 0x1F;
+        // 192.168.x.x/16
+        final byte SECTION_5 = (byte) 0xC0;
+        final byte SECTION_6 = (byte) 0xA8;
+        switch (b0) {
+            case SECTION_1:
+                return true;
+            case SECTION_2:
+                if (b1 >= SECTION_3 && b1 <= SECTION_4) {
+                    return true;
+                }
+            case SECTION_5:
+                switch (b1) {
+                    case SECTION_6:
+                        return true;
+                }
+            default:
+                return false;
+        }
+    }
+
+    /**
+     * 灏咺Pv4鍦板潃杞崲鎴愬瓧鑺�
+     *
+     * @param text IPv4鍦板潃
+     * @return byte 瀛楄妭
+     */
+    public static byte[] textToNumericFormatV4(String text) {
+        if (text.length() == 0) {
+            return null;
+        }
+
+        byte[] bytes = new byte[4];
+        String[] elements = text.split("\\.", -1);
+        try {
+            long l;
+            int i;
+            switch (elements.length) {
+                case 1:
+                    l = Long.parseLong(elements[0]);
+                    if ((l < 0L) || (l > 4294967295L)) {
+                        return null;
+                    }
+                    bytes[0] = (byte) (int) (l >> 24 & 0xFF);
+                    bytes[1] = (byte) (int) ((l & 0xFFFFFF) >> 16 & 0xFF);
+                    bytes[2] = (byte) (int) ((l & 0xFFFF) >> 8 & 0xFF);
+                    bytes[3] = (byte) (int) (l & 0xFF);
+                    break;
+                case 2:
+                    l = Integer.parseInt(elements[0]);
+                    if ((l < 0L) || (l > 255L)) {
+                        return null;
+                    }
+                    bytes[0] = (byte) (int) (l & 0xFF);
+                    l = Integer.parseInt(elements[1]);
+                    if ((l < 0L) || (l > 16777215L)) {
+                        return null;
+                    }
+                    bytes[1] = (byte) (int) (l >> 16 & 0xFF);
+                    bytes[2] = (byte) (int) ((l & 0xFFFF) >> 8 & 0xFF);
+                    bytes[3] = (byte) (int) (l & 0xFF);
+                    break;
+                case 3:
+                    for (i = 0; i < 2; ++i) {
+                        l = Integer.parseInt(elements[i]);
+                        if ((l < 0L) || (l > 255L)) {
+                            return null;
+                        }
+                        bytes[i] = (byte) (int) (l & 0xFF);
+                    }
+                    l = Integer.parseInt(elements[2]);
+                    if ((l < 0L) || (l > 65535L)) {
+                        return null;
+                    }
+                    bytes[2] = (byte) (int) (l >> 8 & 0xFF);
+                    bytes[3] = (byte) (int) (l & 0xFF);
+                    break;
+                case 4:
+                    for (i = 0; i < 4; ++i) {
+                        l = Integer.parseInt(elements[i]);
+                        if ((l < 0L) || (l > 255L)) {
+                            return null;
+                        }
+                        bytes[i] = (byte) (int) (l & 0xFF);
+                    }
+                    break;
+                default:
+                    return null;
+            }
+        } catch (NumberFormatException e) {
+            return null;
+        }
+        return bytes;
+    }
+}
diff --git a/ycl-common/src/main/java/com/ycl/utils/common/PojoUtils.java b/ycl-common/src/main/java/com/ycl/utils/common/PojoUtils.java
new file mode 100644
index 0000000..2cd3a40
--- /dev/null
+++ b/ycl-common/src/main/java/com/ycl/utils/common/PojoUtils.java
@@ -0,0 +1,35 @@
+package com.ycl.utils.common;
+
+import com.ycl.constant.SysConst;
+
+/**
+ * <p>
+ * pojo宸ュ叿绫伙紝dto锛寁o锛屼娇鐢�
+ * </p>
+ *
+ * @author Lyq
+ * @version 1.0
+ * @date 2022/9/7
+ */
+public class PojoUtils {
+
+    private PojoUtils() {
+    }
+
+    static public class Vo{
+        private Vo(){
+
+        }
+        /**
+         * 鍓嶇combobox閫氳繃VO浼犻�掑埌鍚庡彴鐨勫�兼槸鍚︽槸鏈夋晥鐨勬煡璇㈡潯浠躲��
+         * 鍓嶇閫夛紙鍏ㄩ儴锛夋椂灏变笉鏄湁鏁堢殑鏌ヨ鍙傛暟锛屽湪鏌ヨ鏉′欢涓幓鎺�
+         * @param n 浼犲叆鐨勫彉閲�
+         * @return 鏄惁鏄湁鏁堟煡璇㈠弬鏁�
+         */
+        public static boolean isUsefulSearchParam(Number n){
+
+            return n != null && n.intValue() != SysConst.COMBOBOX_ALL;
+        }
+    }
+
+}
diff --git a/ycl-common/src/main/java/com/ycl/utils/common/RandomUtils.java b/ycl-common/src/main/java/com/ycl/utils/common/RandomUtils.java
new file mode 100644
index 0000000..34c3268
--- /dev/null
+++ b/ycl-common/src/main/java/com/ycl/utils/common/RandomUtils.java
@@ -0,0 +1,9 @@
+package com.ycl.utils.common;
+
+/**
+ * @author Lyq
+ * @version 1.0
+ * @date 2022/9/7
+ */
+public class RandomUtils {
+}
diff --git a/ycl-platform/src/main/java/com/ycl/component/DynamicSecurityFilter.java b/ycl-platform/src/main/java/com/ycl/component/DynamicSecurityFilter.java
index ce7a322..0d3671b 100644
--- a/ycl-platform/src/main/java/com/ycl/component/DynamicSecurityFilter.java
+++ b/ycl-platform/src/main/java/com/ycl/component/DynamicSecurityFilter.java
@@ -45,7 +45,7 @@
         //鐧藉悕鍗曡姹傜洿鎺ユ斁琛�
         PathMatcher pathMatcher = new AntPathMatcher();
         for (String path : ignoreUrlsConfig.getUrls()) {
-            if(pathMatcher.match(path,request.getRequestURI())){
+            if(pathMatcher.match(path,request.getServletPath())){
                 fi.getChain().doFilter(fi.getRequest(), fi.getResponse());
                 return;
             }

--
Gitblit v1.8.0