mirror of
https://github.com/cool-team-official/cool-admin-java.git
synced 2026-10-07 14:48:46 +08:00
1、mybatis-flex.ext 版本升级
2、系统日志参数写入大小控制 3、覆盖插件时,删除原因插件包
This commit is contained in:
@@ -19,6 +19,7 @@ import com.mybatisflex.core.query.QueryWrapper;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.util.Date;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -36,6 +37,9 @@ public class BaseSysLogServiceImpl extends BaseServiceImpl<BaseSysLogMapper, Bas
|
||||
|
||||
private final IPUtils ipUtils;
|
||||
|
||||
@Value("${cool.log.maxJsonLength:1024}")
|
||||
private int maxJsonLength;
|
||||
|
||||
@Override
|
||||
public Object page(
|
||||
JSONObject requestParams, Page<BaseSysLogEntity> page, QueryWrapper queryWrapper) {
|
||||
@@ -76,7 +80,10 @@ public class BaseSysLogServiceImpl extends BaseServiceImpl<BaseSysLogMapper, Bas
|
||||
newJSONObject.remove("tokenInfo");
|
||||
newJSONObject.remove("refreshToken");
|
||||
newJSONObject.remove("body");
|
||||
|
||||
if (newJSONObject.toString().getBytes().length > maxJsonLength) {
|
||||
// 超过指定
|
||||
newJSONObject.clear();
|
||||
}
|
||||
recordAsync(requestURI, ipAddr, userId, newJSONObject);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user