forked from github/dataease
feat: 日志模块
This commit is contained in:
parent
c19b17921e
commit
ee8db44375
@ -97,6 +97,7 @@ public class MenuManage {
|
||||
|| coreMenu.getPid().equals(21L)
|
||||
|| coreMenu.getId().equals(25L)
|
||||
|| coreMenu.getId().equals(26L)
|
||||
|| coreMenu.getId().equals(35L);
|
||||
|| coreMenu.getId().equals(35L)
|
||||
|| coreMenu.getId().equals(40L);
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ spring:
|
||||
username: root
|
||||
password: 123456
|
||||
messages:
|
||||
basename: i18n/lic,i18n/core,i18n/permissions
|
||||
basename: i18n/lic,i18n/core,i18n/permissions,i18n/xpack
|
||||
flyway:
|
||||
enabled: true
|
||||
table: de_standalone_version
|
||||
|
@ -61,3 +61,4 @@ i18n_table_name_repeat=\u540D\u79F0\u91CD\u590D:
|
||||
i18n_sql_not_empty=sql \u4E0D\u80FD\u4E3A\u7A7A
|
||||
i18n_menu.parameter=\u7CFB\u7EDF\u53C2\u6570
|
||||
i18n_user_old_pwd_error=\u539F\u59CB\u5BC6\u7801\u9519\u8BEF
|
||||
i18n_menu.toolbox-log=\u64CD\u4F5C\u65E5\u5FD7
|
||||
|
@ -0,0 +1,40 @@
|
||||
package io.dataease.api.log;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.dataease.api.log.dto.LogGridRequest;
|
||||
import io.dataease.api.log.vo.LogGridVO;
|
||||
import io.dataease.api.log.vo.LogOpVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Tag(name = "工具箱:日志管理")
|
||||
@ApiSupport(order = 2)
|
||||
public interface LogApi {
|
||||
|
||||
@Operation(summary = "查询日志列表")
|
||||
@Parameters({
|
||||
@Parameter(name = "goPage", description = "目标页码", required = true, in = ParameterIn.PATH),
|
||||
@Parameter(name = "pageSize", description = "每页容量", required = true, in = ParameterIn.PATH),
|
||||
@Parameter(name = "request", description = "过滤条件", required = true)
|
||||
})
|
||||
@PostMapping("/pager/{goPage}/{pageSize}")
|
||||
IPage<LogGridVO> pager(@PathVariable("goPage") int goPage, @PathVariable("pageSize") int pageSize, @RequestBody LogGridRequest request);
|
||||
|
||||
@Operation(summary = "导出日志列表")
|
||||
@PostMapping("/export")
|
||||
void export(@RequestBody LogGridRequest request);
|
||||
|
||||
@Operation(summary = "操作类型")
|
||||
@GetMapping("/options")
|
||||
List<LogOpVO> logOptions();
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package io.dataease.api.log.dto;
|
||||
|
||||
import io.dataease.model.KeywordRequest;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class LogGridRequest extends KeywordRequest implements Serializable {
|
||||
|
||||
private String op;
|
||||
|
||||
private Long uid;
|
||||
|
||||
private Long oid;
|
||||
|
||||
private List<Long> time;
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package io.dataease.api.log.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class LogGridVO implements Serializable {
|
||||
|
||||
private String opText;
|
||||
|
||||
private String opDetail;
|
||||
|
||||
private String name;
|
||||
|
||||
private String ip;
|
||||
|
||||
private Long time;
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package io.dataease.api.log.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class LogOpVO implements Serializable {
|
||||
|
||||
private String value;
|
||||
|
||||
private String label;
|
||||
|
||||
private List<LogOpVO> children;
|
||||
}
|
@ -5,6 +5,7 @@ import io.dataease.api.permissions.org.dto.OrgCreator;
|
||||
import io.dataease.api.permissions.org.dto.OrgEditor;
|
||||
import io.dataease.api.permissions.org.dto.OrgRequest;
|
||||
import io.dataease.api.permissions.org.vo.MountedVO;
|
||||
import io.dataease.api.permissions.org.vo.OrgDetailVO;
|
||||
import io.dataease.api.permissions.org.vo.OrgPageVO;
|
||||
import io.dataease.auth.DeApiPath;
|
||||
import io.dataease.auth.DePermit;
|
||||
@ -56,4 +57,8 @@ public interface OrgApi {
|
||||
@Operation(summary = "", hidden = true)
|
||||
@GetMapping("/resourceExist/{oid}")
|
||||
boolean resourceExist(@PathVariable("oid") Long oid);
|
||||
|
||||
@Operation(hidden = true)
|
||||
@GetMapping("/detail/{oid}")
|
||||
OrgDetailVO detail(@PathVariable("oid") Long oid);
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
package io.dataease.api.permissions.org.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class OrgDetailVO {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String name;
|
||||
|
||||
private Long pid;
|
||||
|
||||
private String rootPath;
|
||||
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package io.dataease.api.permissions.role.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@ -17,6 +18,9 @@ public class RoleCreator implements Serializable {
|
||||
private Integer typeCode;
|
||||
@Schema(description = "描述", hidden = true)
|
||||
private String desc;
|
||||
@JsonIgnore
|
||||
@Schema(hidden = true)
|
||||
private Long rid;
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.dataease.api.permissions.user.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@ -27,4 +28,7 @@ public class UserCreator implements Serializable {
|
||||
private List<Long> roleIds;
|
||||
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Boolean enable;
|
||||
@Schema(hidden = true)
|
||||
@JsonIgnore
|
||||
private Long uid;
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
package io.dataease.constant;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public enum LogOT {
|
||||
CREATE(1, "OPERATE_TYPE_CREATE"),
|
||||
MODIFY(2, "OPERATE_TYPE_MODIFY"),
|
||||
@ -23,6 +25,10 @@ public enum LogOT {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public static LogOT fromValue(Integer value) {
|
||||
return Arrays.stream(values()).filter(v -> v.value.equals(value)).findFirst().get();
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
package io.dataease.constant;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public enum LogST {
|
||||
PANEL(1, "SOURCE_TYPE_PANEL"),
|
||||
SCREEN(2, "SOURCE_TYPE_SCREEN"),
|
||||
@ -31,6 +33,10 @@ public enum LogST {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public static LogST fromValue(Integer value) {
|
||||
return Arrays.stream(values()).filter(v -> v.value.equals(value)).findFirst().get();
|
||||
}
|
||||
|
||||
LogST() {
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user