Fancy
2025-01-07 28f6317f7189d5c4a7e64f57dd6c7fc2011f8632
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/aop/LogAspect.java
@@ -25,9 +25,6 @@
import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.util.UriComponentsBuilder;
import java.lang.reflect.Array;
import java.util.Arrays;
@Slf4j
@Aspect
@Component
@@ -66,9 +63,10 @@
                String ip = getRemoteHost();
                // 记录日志
                //msg  方法名 + 参数值 + 返回值
                String args = JSONObject.toJSONString(joinPoint.getArgs());
//                Stream.of(joinPoint.getArgs()).forEach(System.out::println);
//                String args = JSONObject.toJSONString(joinPoint.getArgs());
                //String args1 = Arrays.toString(joinPoint.getArgs());
                logSv.save(user.id,user.name, operationName,ip,result.getCode(),args+" "+ result.getMsg());
                logSv.save(user.id,user.name, operationName,ip,result.getCode(),result.getMsg());
            }
        }catch (Exception e){
            log.error("记录日志异常:"+e.getMessage());