|
@@ -187,14 +187,31 @@ public class LogAspect {
|
|
|
if (editKey != null) {
|
|
|
|
|
|
field.setAccessible(true);
|
|
|
- Object x = field.get(arg);
|
|
|
- if (Objects.nonNull(x)) {
|
|
|
+ Object obj = field.get(arg);
|
|
|
+ if (Objects.nonNull(obj)) {
|
|
|
return CustomizedOperationTypeEnum.UPDATE;
|
|
|
} else {
|
|
|
return CustomizedOperationTypeEnum.ADD;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ Class<?> supperClazz = clazz.getSuperclass();
|
|
|
+ if (Objects.nonNull(supperClazz)){
|
|
|
+ Field[] supperFields = supperClazz.getDeclaredFields();
|
|
|
+ for (Field field : supperFields) {
|
|
|
+ EditKey editKey = field.getAnnotation(EditKey.class);
|
|
|
+ if (editKey != null) {
|
|
|
+
|
|
|
+ field.setAccessible(true);
|
|
|
+ Object obj = field.get(arg);
|
|
|
+ if (Objects.nonNull(obj)) {
|
|
|
+ return CustomizedOperationTypeEnum.UPDATE;
|
|
|
+ } else {
|
|
|
+ return CustomizedOperationTypeEnum.ADD;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
return CustomizedOperationTypeEnum.EDIT;
|
|
|
}
|