#
vincentlu
2025-05-13 ebd2f4397a92c6a5096de1b86d59154363344720
zy-acs-framework/src/main/java/com/zy/acs/framework/common/Cools.java
@@ -5,10 +5,7 @@
import java.lang.reflect.*;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.*;
/**
 * Created by vincent on 2019-06-09
@@ -302,6 +299,8 @@
    }
    private final static char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
    public static String md5(String string){
        try{
            MessageDigest md5 = MessageDigest.getInstance("MD5");
@@ -318,8 +317,6 @@
            throw new RuntimeException("md5加密失败,str=".concat(string));
        }
    }
    private static char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
    public static Map<String, Object> translate(Object obj){
        Class<?> cls = obj.getClass();
@@ -365,4 +362,13 @@
        return false;
    }
    public static List<String> getIntersection(List<String> list1, List<String> list2) {
        if (isEmpty(list1) || isEmpty(list2)) {
            return new ArrayList<>();
        }
        List<String> intersection = new ArrayList<>(list1);
        intersection.retainAll(list2);
        return intersection;
    }
}