package cn.com.ctop.crawler.modules.core.util;

import org.jeecg.common.util.MD5Util;

import java.util.HashMap;
import java.util.Map;

/**
 * @author jeecg-boot
 * 2019年12月5日19:57:58
 */
public class SignUtil {
    public static String getMd5Sign(String source, String signKey) {
        return MD5Util.getMd5(source + signKey);
    }
    public static String getDataeyeSign(Map<String,Object> param){
        String queryString = "";
        if (param != null && param.size() > 0){
            param = SortUtil.sortMapByKey(param);
            queryString = HttpParamUtil.mapToUrlString(param,null);
        }
        queryString = queryString +"&key=OH_MY_LADY_GA_GA";
        return MD5Util.getMd5(queryString).toUpperCase();
    }
}
