This commit is contained in:
2022-09-21 10:48:36 +08:00
parent d02f83da25
commit 3cd336d1cc
12 changed files with 29 additions and 48 deletions

View File

@@ -28,6 +28,7 @@ import org.aspectj.lang.reflect.MethodSignature;
import org.nl.domain.Log;
import org.nl.service.LogService;
import org.nl.utils.RequestHolder;
import org.nl.utils.SecurityUtils;
import org.nl.utils.StringUtils;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
@@ -139,8 +140,7 @@ public class LogAspect {
public String getUsername() {
try {
// return SecurityUtils.getCurrentUsername();
return "";
return SecurityUtils.getCurrentUsername();
}catch (Exception e){
return "";
}

View File

@@ -21,6 +21,7 @@ import lombok.RequiredArgsConstructor;
import org.nl.annotation.Log;
import org.nl.service.LogService;
import org.nl.service.dto.LogQueryCriteria;
import org.nl.utils.SecurityUtils;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
@@ -49,8 +50,7 @@ public class LogController {
// @ApiOperation("用户日志查询")
public ResponseEntity<Object> queryUserLog(LogQueryCriteria criteria, Pageable pageable){
criteria.setLogType("INFO");
// criteria.setBlurry(SecurityUtils.getCurrentUsername());
criteria.setBlurry("");
criteria.setBlurry(SecurityUtils.getCurrentUsername());
return new ResponseEntity<>(logService.queryAllByUser(criteria,pageable), HttpStatus.OK);
}