From 60748fea6ae6b317ad5dca8019bf8e17c106c4e9 Mon Sep 17 00:00:00 2001 From: whyclxw <810412026@qq.com> Date: 星期六, 11 一月 2025 08:50:43 +0800 Subject: [PATCH] 操作日志修改 --- src/main/java/com/whyc/aop/OperationLogAspect.java | 84 +++++++---------------------------------- 1 files changed, 15 insertions(+), 69 deletions(-) diff --git a/src/main/java/com/whyc/aop/OperationLogAspect.java b/src/main/java/com/whyc/aop/OperationLogAspect.java index 4fbc420..392ff24 100644 --- a/src/main/java/com/whyc/aop/OperationLogAspect.java +++ b/src/main/java/com/whyc/aop/OperationLogAspect.java @@ -110,55 +110,26 @@ type2 = OperationLogEnum.TYPE_2_USER_UPDATE_PASSWORD.getType(); operationTypeName = OperationLogEnum.TYPE_2_USER_UPDATE_PASSWORD.getName(); } - }else if(classNameTrue.contains("A200")){ //鍛婅璁剧疆 + }else if(classNameTrue.contains("lockRt")){ //鍛婅璁剧疆 type1 = OperationLogEnum.TYPE_1_SERVICE.getType(); - if(methodName.startsWith("set")){ - if(methodName.contains("Pl")){ - type2 = OperationLogEnum.TYPE_2_A200_SETPARAMPL.getType(); - operationTypeName = OperationLogEnum.TYPE_2_A200_SETPARAMPL.getName(); - }else{ - type2 = OperationLogEnum.TYPE_2_A200_SETPARAM.getType(); - operationTypeName = OperationLogEnum.TYPE_2_A200_SETPARAM.getName(); - } + if(methodName.startsWith("cancle")){ + type2 = OperationLogEnum.TYPE_2_Cancle_SETPARAM.getType(); + operationTypeName = OperationLogEnum.TYPE_2_Cancle_SETPARAM.getName(); + } - if(methodName.startsWith("start")){ - if(methodName.contains("Pl")){ - type2 = OperationLogEnum.TYPE_2_A200_STARTPL.getType(); - operationTypeName = OperationLogEnum.TYPE_2_A200_STARTPL.getName(); - }else{ - type2 = OperationLogEnum.TYPE_2_A200_START.getType(); - operationTypeName = OperationLogEnum.TYPE_2_A200_START.getName(); - } + if(methodName.startsWith("open")){ + type2 = OperationLogEnum.TYPE_2_Open_SETPARAMPL.getType(); + operationTypeName = OperationLogEnum.TYPE_2_Open_SETPARAMPL.getName(); } - if(methodName.startsWith("stop")){ - if(methodName.contains("Pl")){ - type2 = OperationLogEnum.TYPE_2_A200_STOPPL.getType(); - operationTypeName = OperationLogEnum.TYPE_2_A200_STOPPL.getName(); - }else{ - type2 = OperationLogEnum.TYPE_2_A200_STOP.getType(); - operationTypeName = OperationLogEnum.TYPE_2_A200_STOP.getName(); - } + if(methodName.startsWith("add")){ + type2 = OperationLogEnum.TYPE_2_Add_START.getType(); + operationTypeName = OperationLogEnum.TYPE_2_Add_START.getName(); } - }else if(classNameTrue.contains("Actm")){ - type1 = OperationLogEnum.TYPE_1_SERVICE.getType(); - if(methodName.startsWith("set")){ - if(methodName.contains("Pl")){ - type2 = OperationLogEnum.TYPE_2_ACTM_SETPARAMPL.getType(); - operationTypeName = OperationLogEnum.TYPE_2_ACTM_SETPARAMPL.getName(); - }else{ - type2 = OperationLogEnum.TYPE_2_ACTM_SETPARAM.getType(); - operationTypeName = OperationLogEnum.TYPE_2_ACTM_SETPARAM.getName(); - } + if(methodName.startsWith("del")){ + type2 = OperationLogEnum.TYPE_2_Del_STARTPL.getType(); + operationTypeName = OperationLogEnum.TYPE_2_Del_STARTPL.getName(); } - if(methodName.startsWith("controll")){ - if(methodName.contains("Pl")){ - type2 = OperationLogEnum.TYPE_2_ACTM_CONTROLLPL.getType(); - operationTypeName = OperationLogEnum.TYPE_2_ACTM_CONTROLLPL.getName(); - }else{ - type2 = OperationLogEnum.TYPE_2_ACTM_CONTROLL.getType(); - operationTypeName = OperationLogEnum.TYPE_2_ACTM_CONTROLL.getName(); - } - } + } // TODO else if() @@ -193,31 +164,6 @@ }catch (Exception e){ paramBuilder.append(args[i].toString()); } - - /*String[] paramSetArr = param.split(","); - int paramSetLength = paramSetArr.length; - for (int j = 0; j < paramSetLength; j++) { - String paramSet = paramSetArr[j]; - if(j == 0){ //棣栬,鐗规畩鎯呭喌,瀛樺湪null浣嗘槸瑕佷繚鐣� - if(paramSet.endsWith("=null")){ - if(paramSet.contains("(")){ - paramBuilder.append(paramSet.substring(0,paramSet.lastIndexOf("(")+1)); - continue; - } - } - }else if(j == paramSetLength -1){ //鏈,鐗规畩鎯呭喌,瀛樺湪null浣嗘槸瑕佷繚鐣� - if(paramSet.endsWith("=null)")){ - paramBuilder.append(")"); - continue; - } - } - //鍏朵粬闈瀗ull鎯呭喌 - if(!paramSet.endsWith("=null")){ - paramBuilder.append(paramSet); - } - - }*/ - //map.put(parameterNames[i], args[i].toString()); map.put(parameterNames[i], paramBuilder.toString()); } } -- Gitblit v1.9.1