From 8247ccb1b4d8dfa5e1e8644cde340c43c2dffe00 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期三, 23 十月 2024 10:15:25 +0800
Subject: [PATCH] web分布式文件系统,增加一个分析文件hash值集合的方法

---
 pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/aop/LogAspect.java |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/aop/LogAspect.java b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/aop/LogAspect.java
index 1086ddc..636e66c 100644
--- a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/aop/LogAspect.java
+++ b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/aop/LogAspect.java
@@ -34,6 +34,8 @@
     public String SsoCurUserUrl ;
 
     private LogService logSv;
+    @Value("${pms.global.dev}")
+    public String isDevStage ;//鏄惁涓哄紑鍙戦樁娈�
     @Autowired
     public void setLogSv(LogService logSv){
         this.logSv = logSv;
@@ -46,11 +48,13 @@
 
     @AfterReturning(pointcut = "@annotation(com.dy.pmsGlobal.aop.Log)", returning = "result")
     public void logAfterReturning(JoinPoint joinPoint, BaseResponse result) {
+        if(isDevStage != null && !isDevStage.trim().equals("") && isDevStage.trim().equalsIgnoreCase("true")){
+            return;
+        }
         try{
             // 鑾峰彇鐢ㄦ埛淇℃伅
             BaUser user = (BaUser)getCurUser(result);
             if(user!=null && user.id !=null && !StringUtils.isNullOrEmpty(user.name)){
-                Long operator = user.id;
                 // 鑾峰彇鏂规硶鐨勪腑鏂囨弿杩�
                 MethodSignature sign = (MethodSignature) joinPoint.getSignature();
                 Log logDesc = sign.getMethod().getAnnotation(Log.class);
@@ -58,7 +62,7 @@
                 // 鑾峰彇IP鍦板潃
                 String ip = getRemoteHost();
                 // 璁板綍鏃ュ織
-                logSv.save(operator, operationName,ip,result.getCode(),result.getMsg());
+                logSv.save(user.id,user.name, operationName,ip,result.getCode(),result.getMsg());
             }
         }catch (Exception e){
             log.error("璁板綍鏃ュ織寮傚父:"+e.getMessage());

--
Gitblit v1.8.0