package cn.sikey.hmd.util;

import jakarta.servlet.http.HttpServletRequest;
import lombok.experimental.UtilityClass;

import java.util.Map;
import java.util.stream.Collectors;

/**
 * @Author: qin
 * @Date: 2025/3/31
 * @Description: 日期
 */
@UtilityClass
public class MapUtil {

    /**
     * 转换参数
     *
     * @param request 参数
     * @return
     */
    public Map<String, String> convertRequestToMap(HttpServletRequest request) {
        return request.getParameterMap().entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, entry -> String.join(",", entry.getValue())));
    }

}
