文件模块初步完成
This commit is contained in:
@ -3,10 +3,12 @@ package com.greenorange.promotion.aop;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.greenorange.promotion.annotation.SysLog;
|
||||
import com.greenorange.promotion.model.dto.fileInfo.UploadFileRequest;
|
||||
import com.greenorange.promotion.model.entity.SysOperLog;
|
||||
import com.greenorange.promotion.service.log.SysOperLogService;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
import org.aspectj.lang.annotation.*;
|
||||
import org.aspectj.lang.reflect.MethodSignature;
|
||||
@ -30,6 +32,7 @@ import java.util.Map;
|
||||
*/
|
||||
@Aspect
|
||||
@Component
|
||||
@Slf4j
|
||||
public class OperateLogAspect {
|
||||
|
||||
@Resource
|
||||
@ -170,14 +173,11 @@ public class OperateLogAspect {
|
||||
for (Object o : paramsArray) {
|
||||
if (o != null) {
|
||||
try {
|
||||
// 排除掉 RequestFacade 类型的对象
|
||||
if (o instanceof org.apache.catalina.connector.RequestFacade) {
|
||||
continue; // 跳过该对象
|
||||
}
|
||||
Object jsonObj = JSON.toJSON(o);
|
||||
params += jsonObj.toString() + " ";
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
// e.printStackTrace();
|
||||
log.warn("JSON参数解析出现异常");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user