system logs

This commit is contained in:
MaxKey
2022-05-25 12:14:54 +08:00
parent 3cabc8a790
commit 3a65a66620
26 changed files with 513 additions and 119 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
* Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,16 +19,24 @@ package org.maxkey.constants;
public class ConstsEntryType {
public static int USERINFO_TYPE = 1;
public static String USERINFO = "user";
public static int ORGANIZATION_TYPE = 2;
public static String ORGANIZATION = "organization";
public static int GROUP_TYPE = 3;
public static String APPLICATION = "application";
public static int PASSWORD_TYPE = 4;
public static String GROUP = "group";
public static String ACCOUNT = "account";
public static String ROLE = "role";
public static String PASSWORD = "password";
public static String RESOURCE = "resource";
public static String PERMISSION = "permission";
public static int RESOURCES_TYPE = 5;
public static int PERMISSIONS_TYPE = 6;
}

View File

@@ -17,20 +17,41 @@
package org.maxkey.constants;
import java.util.concurrent.ConcurrentHashMap;
public final class ConstsOperateAction {
public static final int CREATE_ACTION = 1;
public static final String CREATE = "create";
public static final int DELETE_ACTION = 2;
public static final String DELETE = "delete";
public static final int UPDATE_ACTION = 3;
public static final String UPDATE = "update";
public static final int CHANGE_PASSWORD_ACTION = 4;
public static final String CHANGE_PASSWORD = "change_password";
public static final int ADD_MEMBER_ACTION = 5;
public static final String ADD_MEMBER = "add_member";
public static final int DELETE_MEMBER_ACTION = 6;
public static final String DELETE_MEMBER = "delete_member";
public static final String ENABLE = "enable";
public static final String DISABLE = "disable";
public static final String LOCK = "lock";
public static final String UNLOCK = "unlock";
public static final int VIEW_ACTION = 7;
public static final String VIEW = "view";
public static ConcurrentHashMap<Integer,String> statusActon ;
static {
statusActon= new ConcurrentHashMap<Integer,String>();
statusActon.put(ConstsStatus.ACTIVE, ENABLE);
statusActon.put(ConstsStatus.DISABLED, DISABLE);
statusActon.put(ConstsStatus.LOCK, LOCK);
statusActon.put(ConstsStatus.UNLOCK, UNLOCK);
statusActon.put(ConstsStatus.DELETE, DELETE);
}
}

View File

@@ -17,15 +17,9 @@
package org.maxkey.constants;
public final class ConstsOperateMessage {
public static final String INSERT_SUCCESS = "message.action.insert.success";
public static final String INSERT_ERROR = "message.action.insert.error";
public static final String UPDATE_SUCCESS = "message.action.update.success";
public static final String UPDATE_ERROR = "message.action.update.error";
public static final String DELETE_SUCCESS = "message.action.delete.success";
public static final String DELETE_ERROR = "message.action.delete.error";
public final class ConstsOperateResult {
public static final String SUCCESS = "success";
public static final String ERROR = "error";
public static final String FAIL = "fail";
}

View File

@@ -44,7 +44,7 @@ public class HistorySystemLogs extends JpaBaseEntity implements Serializable {
@Column
String message;
@Column
String messageType;
String messageAction;
@Column
String messageResult;
@Column
@@ -58,6 +58,8 @@ public class HistorySystemLogs extends JpaBaseEntity implements Serializable {
@Column
private String instId;
String jsonCotent;
private String instName;
String startDate;
String endDate;
@@ -90,14 +92,12 @@ public class HistorySystemLogs extends JpaBaseEntity implements Serializable {
this.message = message;
}
public String getMessageType() {
return messageType;
public String getMessageAction() {
return messageAction;
}
public void setMessageType(String messageType) {
this.messageType = messageType;
public void setMessageAction(String messageAction) {
this.messageAction = messageAction;
}
public String getMessageResult() {
@@ -172,17 +172,25 @@ public class HistorySystemLogs extends JpaBaseEntity implements Serializable {
this.endDate = endDate;
}
public String getJsonCotent() {
return jsonCotent;
}
public void setJsonCotent(String jsonCotent) {
this.jsonCotent = jsonCotent;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("HistoryLogs [id=");
builder.append("HistorySystemLogs [id=");
builder.append(id);
builder.append(", topic=");
builder.append(topic);
builder.append(", message=");
builder.append(message);
builder.append(", messageType=");
builder.append(messageType);
builder.append(", messageAction=");
builder.append(messageAction);
builder.append(", messageResult=");
builder.append(messageResult);
builder.append(", userId=");
@@ -193,14 +201,8 @@ public class HistorySystemLogs extends JpaBaseEntity implements Serializable {
builder.append(displayName);
builder.append(", executeTime=");
builder.append(executeTime);
builder.append(", instId=");
builder.append(instId);
builder.append(", instName=");
builder.append(instName);
builder.append(", startDate=");
builder.append(startDate);
builder.append(", endDate=");
builder.append(endDate);
builder.append(", jsonCotent=");
builder.append(jsonCotent);
builder.append("]");
return builder.toString();
}