|
@@ -9,7 +9,6 @@ import api.common.pojo.po.log.LogOperationPO;
|
|
|
import api.common.pojo.po.log.LogSystemPO;
|
|
|
import api.common.pojo.po.model.VehicleTempPO;
|
|
|
import api.common.pojo.po.scene.SystemScenePackagePO;
|
|
|
-import api.common.pojo.po.scene.SystemUserScenePO;
|
|
|
import api.common.pojo.po.system.ClusterPO;
|
|
|
import api.common.pojo.po.system.ParameterPO;
|
|
|
import api.common.pojo.po.system.UserPO;
|
|
@@ -26,9 +25,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.scheduling.annotation.Async;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
@Service
|
|
@@ -64,7 +63,15 @@ public class LogService {
|
|
|
*/
|
|
|
public PageInfo<LogOperationPO> getOperationLogPageList(LogPageParam pageParam) {
|
|
|
PageUtil.setPageInfo(pageParam);
|
|
|
- List<LogOperationPO> list = logMapper.getOperationLogPageList(pageParam);
|
|
|
+ List<LogOperationPO> list = new ArrayList<>();
|
|
|
+ String roleCode = AuthUtil.getCurrentUserRoleCode();
|
|
|
+ if(DictConstants.ROLE_CODE_UESR.equals(roleCode)){//普通用户
|
|
|
+ String currentUserId = AuthUtil.getCurrentUserId();
|
|
|
+ pageParam.setContent(currentUserId);//借用该字段传递当前用户id
|
|
|
+ list = logMapper.getUserOperationLogPageList(pageParam);
|
|
|
+ }else{//管理员
|
|
|
+ list = logMapper.getOperationLogPageList(pageParam);
|
|
|
+ }
|
|
|
//字典翻译
|
|
|
Map<String, Map<String, String>> dictMaps = dictService.getDictMapsByTypes(LogConstants.MODULE_TYPE + "," + LogConstants.OPERATION_TYPE);
|
|
|
list.forEach(po ->{
|