1. 更新语法检查

This commit is contained in:
黄昕 2024-03-07 16:34:33 +08:00
parent 88f9efb212
commit 9f1d990647
1 changed files with 8 additions and 8 deletions

View File

@ -95,17 +95,17 @@ public class OperationLogDataBaseServiceImpl extends ServiceImpl<OperationLogMap
optLog.setHttpPath(url);
// 仅处理 RESTful 接口
String API_PREFIX = "/api";
if (url.startsWith(API_PREFIX)) {
String apiPrefix = "/api";
if (url.startsWith(apiPrefix)) {
// 登录接口不包含 Authorization 信息
String LOGIN_URL = "login";
if (url.lastIndexOf(LOGIN_URL) != -1) {
optLog.setCallFunction(LOGIN_URL);
String loginUrl = "login";
if (url.lastIndexOf(loginUrl) != -1) {
optLog.setCallFunction(loginUrl);
optLog.setUserId(ctx.getId() != null ? ctx.getId() : -1L);
} else {
String LOGOUT_URL = "logout";
if (url.lastIndexOf(LOGOUT_URL) != -1) {
optLog.setCallFunction(LOGOUT_URL);
String logoutUrl = "logout";
if (url.lastIndexOf(logoutUrl) != -1) {
optLog.setCallFunction(logoutUrl);
}
if (HelperUtils.stringNotEmptyOrNull(ctx.getJwt())) {