修改流重复读取的问题
This commit is contained in:
parent
d903650986
commit
abf9ce3117
|
|
@ -55,6 +55,8 @@ public class SysLog {
|
||||||
@ApiModelProperty(value = "执行结果(1.成功/2.失败)")
|
@ApiModelProperty(value = "执行结果(1.成功/2.失败)")
|
||||||
private Integer result;
|
private Integer result;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private String fruit;
|
private String fruit;
|
||||||
|
|
||||||
@ApiModelProperty(value = "执行时间(秒/ms)")
|
@ApiModelProperty(value = "执行时间(秒/ms)")
|
||||||
|
|
|
||||||
|
|
@ -69,8 +69,10 @@ public class SystemGlobal {
|
||||||
* 成功数据数量
|
* 成功数据数量
|
||||||
*/
|
*/
|
||||||
public final static int MIN_NUM=0;
|
public final static int MIN_NUM=0;
|
||||||
|
/**
|
||||||
public final static int LOG_DEFEAT=1024;
|
* 日志容量
|
||||||
|
*/
|
||||||
|
public final static int LOG_DEFEAT=1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 地市
|
* 地市
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,9 @@ public enum OperationType {
|
||||||
* 业务数据
|
* 业务数据
|
||||||
*/
|
*/
|
||||||
QUERY_BUSINESS("查询"),
|
QUERY_BUSINESS("查询"),
|
||||||
|
|
||||||
|
QUERY_SHORT("排序"),
|
||||||
|
|
||||||
ADD_BUSINESS("新增"),
|
ADD_BUSINESS("新增"),
|
||||||
DELETE_BUSINESS("删除"),
|
DELETE_BUSINESS("删除"),
|
||||||
UPDATE_BUSINESS("修改"),
|
UPDATE_BUSINESS("修改"),
|
||||||
|
|
|
||||||
|
|
@ -102,9 +102,8 @@ public class ParamSecureHandler implements AsyncHandlerInterceptor {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
||||||
XssRequestWrapper requestWrapper = new XssRequestWrapper(request);
|
|
||||||
try{
|
try{
|
||||||
if (!checkIsYq(request, requestWrapper)) {
|
if (!checkIsYq(request)) {
|
||||||
returnJson(response, "越权访问,接口未授权", 401);
|
returnJson(response, "越权访问,接口未授权", 401);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -115,6 +114,7 @@ public class ParamSecureHandler implements AsyncHandlerInterceptor {
|
||||||
if(isFileUpload(request)){
|
if(isFileUpload(request)){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
XssRequestWrapper requestWrapper = new XssRequestWrapper(request);
|
||||||
System.out.println("进入了拦截器");
|
System.out.println("进入了拦截器");
|
||||||
System.err.println(request.getRequestURI());
|
System.err.println(request.getRequestURI());
|
||||||
String requestUrl = requestWrapper.getRequestURI();
|
String requestUrl = requestWrapper.getRequestURI();
|
||||||
|
|
@ -197,7 +197,7 @@ public class ParamSecureHandler implements AsyncHandlerInterceptor {
|
||||||
/**
|
/**
|
||||||
* 判断是否越权
|
* 判断是否越权
|
||||||
*/
|
*/
|
||||||
private boolean checkIsYq(HttpServletRequest request, XssRequestWrapper requestWrapper) throws Exception {
|
private boolean checkIsYq(HttpServletRequest request) throws Exception {
|
||||||
String requestUri = request.getRequestURI();
|
String requestUri = request.getRequestURI();
|
||||||
if(Arrays.asList(WHITE_URLS).contains(requestUri)){
|
if(Arrays.asList(WHITE_URLS).contains(requestUri)){
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,20 @@ public class SysLogController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询系统日志")
|
||||||
|
@GetMapping("getSystemLogs2")
|
||||||
|
@Log(title = "审计日志", menu = "审计日志->系统日志", grade = OperationType.QUERY_SHORT, details = "系统日志排序", type = "系统日志")
|
||||||
|
public TableDataInfo getSystemLogs2(SysLog dto) {
|
||||||
|
try{
|
||||||
|
dto.setLogType(0);
|
||||||
|
startPage();
|
||||||
|
List<SysLog> list = service.getSystemLogs(dto);
|
||||||
|
return getDataTable(list);
|
||||||
|
}catch (Exception e){
|
||||||
|
log.error(e.toString(),e);
|
||||||
|
return getDataTableBad(new ArrayList<>(),"请求出错了");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "查询业务日志")
|
@ApiOperation(value = "查询业务日志")
|
||||||
@GetMapping("getYwLogs")
|
@GetMapping("getYwLogs")
|
||||||
|
|
@ -92,7 +106,20 @@ public class SysLogController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询业务日志")
|
||||||
|
@GetMapping("getYwLogs2")
|
||||||
|
@Log(title = "审计日志", menu = "审计日志->业务日志", grade = OperationType.QUERY_SHORT, details = "业务日志排序", type = "系统日志")
|
||||||
|
public TableDataInfo getYwLogs2(SysLog dto) {
|
||||||
|
try{
|
||||||
|
dto.setLogType(1);
|
||||||
|
startPage();
|
||||||
|
List<SysLog> list = service.getSystemLogs(dto);
|
||||||
|
return getDataTable(list);
|
||||||
|
}catch (Exception e){
|
||||||
|
log.error(e.toString(),e);
|
||||||
|
return getDataTableBad(new ArrayList<>(),"请求出错了");
|
||||||
|
}
|
||||||
|
}
|
||||||
@ApiOperation(value = "查询异常日志")
|
@ApiOperation(value = "查询异常日志")
|
||||||
@GetMapping("getErrLogs")
|
@GetMapping("getErrLogs")
|
||||||
@Log(title = "审计日志", menu = "审计日志->异常日志", grade = OperationType.QUERY_BUSINESS, details = "查询系统异常日志", type = "系统日志")
|
@Log(title = "审计日志", menu = "审计日志->异常日志", grade = OperationType.QUERY_BUSINESS, details = "查询系统异常日志", type = "系统日志")
|
||||||
|
|
@ -107,6 +134,21 @@ public class SysLogController extends BaseController {
|
||||||
return getDataTableBad(new ArrayList<>(),"请求出错了");
|
return getDataTableBad(new ArrayList<>(),"请求出错了");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ApiOperation(value = "查询异常日志")
|
||||||
|
@GetMapping("getErrLogs2")
|
||||||
|
@Log(title = "审计日志", menu = "审计日志->异常日志", grade = OperationType.QUERY_SHORT, details = "异常日志排序", type = "系统日志")
|
||||||
|
public TableDataInfo getErrLogs2(SysLog dto) {
|
||||||
|
try{
|
||||||
|
dto.setLogType(2);
|
||||||
|
startPage();
|
||||||
|
List<SysLog> list = service.getSystemLogs(dto);
|
||||||
|
return getDataTable(list);
|
||||||
|
}catch (Exception e){
|
||||||
|
log.error(e.toString(),e);
|
||||||
|
return getDataTableBad(new ArrayList<>(),"请求出错了");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "日志备份")
|
@ApiOperation(value = "日志备份")
|
||||||
@GetMapping("downloadErrLogs")
|
@GetMapping("downloadErrLogs")
|
||||||
@Log(title = "审计日志", menu = "审计日志->异常日志", grade = OperationType.COPY_LOG, details = "异常日志备份", type = "系统日志")
|
@Log(title = "审计日志", menu = "审计日志->异常日志", grade = OperationType.COPY_LOG, details = "异常日志备份", type = "系统日志")
|
||||||
|
|
@ -169,6 +211,14 @@ public class SysLogController extends BaseController {
|
||||||
public Result<Map<String,Object>> getLogStatistics(@RequestBody SysLog dto) {
|
public Result<Map<String,Object>> getLogStatistics(@RequestBody SysLog dto) {
|
||||||
return service.getLogStatistics(dto);
|
return service.getLogStatistics(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询日志统计分析")
|
||||||
|
@PostMapping("getLogStatistics2")
|
||||||
|
@Log(title = "审计日志", menu = "审计日志->日志分析", grade = OperationType.QUERY_SHORT, details = "日志分析排序", type = "系统日志")
|
||||||
|
public Result<Map<String,Object>> getLogStatistics2(@RequestBody SysLog dto) {
|
||||||
|
return service.getLogStatistics(dto);
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "查询日志告警")
|
@ApiOperation(value = "查询日志告警")
|
||||||
@PostMapping("logWarn")
|
@PostMapping("logWarn")
|
||||||
public Result<Map<String,Object>> logWarn() {
|
public Result<Map<String,Object>> logWarn() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue