From 40bfb646d1b962d33841c1ebbceb0dd7cb668bfb Mon Sep 17 00:00:00 2001 From: liujie <1793218484@qq.com> Date: 星期二, 29 四月 2025 14:54:04 +0800 Subject: [PATCH] 后台日志管理 --- springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/conveter/EConverter.java | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/conveter/EConverter.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/conveter/EConverter.java index ff932ba..ce85d0c 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/conveter/EConverter.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/conveter/EConverter.java @@ -6,6 +6,7 @@ import cn.idev.excel.metadata.data.WriteCellData; import cn.idev.excel.metadata.property.ExcelContentProperty; import com.panzhihua.sangeshenbian.annotation.FastExcel; +import com.panzhihua.sangeshenbian.annotation.TargetEnum; import java.lang.reflect.Field; import java.lang.reflect.Method; @@ -32,9 +33,9 @@ //获取字段属性中的注解 Field field = contentProperty.getField(); //获取该字段所属枚举 - FastExcel fastExcel = field.getAnnotation(FastExcel.class); + TargetEnum targetEnum = field.getAnnotation(TargetEnum.class); //获取注解中的枚举信息 - Class<? extends Enum> type = fastExcel.type(); + Class<? extends Enum> type = targetEnum.type(); //获取枚举类的方法名 “getEnumByCode”就是自己编写的函数,Integer.class 指定入参类型 Method codeOf = type.getMethod("getEnumByCode", Integer.class); //反射执行方法,此方法得到的是一个枚举实例(具体得到什么,结合自身项目) -- Gitblit v1.7.1