修改
This commit is contained in:
@@ -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 "";
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user