whyclxw
2024-09-09 833e107cff97b577fbcd7b95a3ec933b46e5ad09
修改日志操作
2个文件已修改
79 ■■■■ 已修改文件
src/main/java/com/whyc/aop/OperationLogAspect.java 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/constant/OperationLogEnum.java 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/aop/OperationLogAspect.java
@@ -106,18 +106,54 @@
                type2 = OperationLogEnum.TYPE_2_USER_UPDATE_PASSWORD.getType();
                operationTypeName = OperationLogEnum.TYPE_2_USER_UPDATE_PASSWORD.getName();
            }
        }else if(classNameTrue.contains("Alarm")
                ||classNameTrue.contains("Alm")){ //告警设置
            if(methodName.startsWith("update")){
                type1 = OperationLogEnum.TYPE_1_SERVICE.getType();
                type2 = OperationLogEnum.TYPE_2_ALARM.getType();
                operationTypeName = OperationLogEnum.TYPE_2_ALARM.getName();
        }else if(classNameTrue.contains("A200")){ //告警设置
            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();
                }
            }
        }else if(classNameTrue.contains("plan")){
            if(methodName.startsWith("static")){//统计计划
                type1 = OperationLogEnum.TYPE_1_SERVICE.getType();
                type2 = OperationLogEnum.TYPE_2_PLAN_MON.getType();
                operationTypeName = OperationLogEnum.TYPE_2_PLAN_MON.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("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();
                }
            }
        }else if(classNameTrue.contains("Actm")){
            type1 = OperationLogEnum.TYPE_1_SERVICE.getType();
            if(methodName.startsWith("set")){
                if(methodName.contains("Pl")){
                    type2 = OperationLogEnum.TYPE_3_ACTM_SETPARAMPL.getType();
                    operationTypeName = OperationLogEnum.TYPE_3_ACTM_SETPARAMPL.getName();
                }else{
                    type2 = OperationLogEnum.TYPE_3_ACTM_SETPARAM.getType();
                    operationTypeName = OperationLogEnum.TYPE_3_ACTM_SETPARAM.getName();
                }
            }
            if(methodName.startsWith("controll")){
                if(methodName.contains("Pl")){
                    type2 = OperationLogEnum.TYPE_3_ACTM_CONTROLLPL.getType();
                    operationTypeName = OperationLogEnum.TYPE_3_ACTM_CONTROLLPL.getName();
                }else{
                    type2 = OperationLogEnum.TYPE_3_ACTM_CONTROLL.getType();
                    operationTypeName = OperationLogEnum.TYPE_3_ACTM_CONTROLL.getName();
                }
            }
        }
src/main/java/com/whyc/constant/OperationLogEnum.java
@@ -20,17 +20,18 @@
    TYPE_2_EXCEPTION(110,"调用异常"),
    //子级别-业务级
    TYPE_2_POWER_UPDATE(201,"电源设备设置"),
    TYPE_2_BATTERY_UPDATE(202,"核容设备信息相关设置"),
    TYPE_2_BATTERY_TEST_PARAM_UPDATE(203,"核容设备遥调遥控"),
    TYPE_2_ALARM(204,"告警相关设置"),
    TYPE_2_BREAKER(205,"断路器信息相关操作"),
    TYPE_2_BREAKER_CONTROL(206,"断路器控制相关操作"),
    TYPE_2_GATEWAY(207,"网关相关操作"),
    TYPE_2_POWER_MODE_CONTROL(208,"电源设备模块控制操作"),
    TYPE_2_POWER_MODE_PARAM(209,"电源设备模块参数操作"),
    TYPE_2_A200_SETPARAM(201,"A200参数设置"),
    TYPE_2_A200_SETPARAMPL(202,"批量A200参数设置"),
    TYPE_2_A200_START(203,"启动A200"),
    TYPE_2_A200_STARTPL(204,"批量启动A200"),
    TYPE_2_A200_STOP(205,"停止A200"),
    TYPE_2_A200_STOPPL(206,"批量停止A200"),
    TYPE_2_PLAN_MON(210,"单体计划统计操作"),
    TYPE_3_ACTM_SETPARAM(201,"ACTM参数设置"),
    TYPE_3_ACTM_SETPARAMPL(202,"批量ACTM参数设置"),
    TYPE_3_ACTM_CONTROLL(203,"控制ACTM均衡仪"),
    TYPE_3_ACTM_CONTROLLPL(204,"批量控制ACTM"),
    ;