heheng
2025-03-27 5d2cfd4562f74496a5263db3451c1e78ff53aead
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,10 +54,13 @@
        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());
        Object params=null;
        if(!requestURL.equals("/api/app/system/user-face")){
            params=getParameter(method, joinPoint.getArgs());
        }
        webLog.put("parameter",params);
        webLog.put("uri",request.getRequestURI());
        webLog.put("url",requestURL.toString());
@@ -111,7 +114,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]);