kongzy
2023-12-08 ca5445257b1fdeceddf3fcc2dea18c442023aeb7
assess-framework/src/main/java/com/gkhy/assess/framework/aop/LogAspect.java
@@ -1,9 +1,9 @@
package com.gkhy.assess.framework.aop;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.URLUtil;
import cn.hutool.extra.servlet.ServletUtil;
import cn.hutool.json.JSONObject;
import com.gkhy.assess.common.utils.StringUtils;
import com.gkhy.assess.system.utils.ShiroUtils;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
@@ -54,7 +54,7 @@
        StringBuffer requestURL = request.getRequestURL();
        JSONObject webLog = new JSONObject();
        String urlStr = request.getRequestURL().toString();
        webLog.put("basePath",StrUtil.removeSuffix(urlStr, URLUtil.url(urlStr).getPath()));
        webLog.put("basePath", StringUtils.removeSuffix(urlStr, URLUtil.url(urlStr).getPath()));
        webLog.put("ip", ServletUtil.getClientIP(request,null));
        webLog.put("method",request.getMethod());
        Object params=getParameter(method, joinPoint.getArgs());
@@ -111,7 +111,7 @@
            if (requestParam != null) {
                Map<String, Object> map = new HashMap<>();
                String key = parameters[i].getName();
                if (StrUtil.isNotEmpty(requestParam.value())) {
                if (StringUtils.isNotEmpty(requestParam.value())) {
                    key = requestParam.value();
                }
                map.put(key, args[i]);