|
|
@@ -1,4 +1,4 @@
|
|
|
-package com.hdkj.lt.bf.log.service.impl;
|
|
|
+package com.hdkj.lt.core.log.service.impl;
|
|
|
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
@@ -7,12 +7,12 @@ import com.hdkj.lt.base.constants.DictConstants;
|
|
|
import com.hdkj.lt.base.constants.ErrorLogConstant;
|
|
|
import com.hdkj.lt.base.enums.ErrorLevelEnum;
|
|
|
import com.hdkj.lt.base.enums.EventTypeEnum;
|
|
|
-import com.hdkj.lt.bf.log.dao.FhzgLogInfoMapper;
|
|
|
-import com.hdkj.lt.bf.log.model.dto.LogInfoDTO;
|
|
|
-import com.hdkj.lt.bf.log.model.param.ErrorLogParam;
|
|
|
-import com.hdkj.lt.bf.log.model.param.LogInfoVO;
|
|
|
-import com.hdkj.lt.bf.log.model.po.FhzgLogInfoEntity;
|
|
|
-import com.hdkj.lt.bf.log.service.FhzgLogInfoService;
|
|
|
+import com.hdkj.lt.core.log.dao.FhzgLogInfoMapper;
|
|
|
+import com.hdkj.lt.core.log.model.dto.LogInfoDTO;
|
|
|
+import com.hdkj.lt.core.log.model.param.ErrorLogParam;
|
|
|
+import com.hdkj.lt.core.log.model.param.LogInfoVO;
|
|
|
+import com.hdkj.lt.core.log.model.po.FhzgLogInfoEntity;
|
|
|
+import com.hdkj.lt.core.log.service.FhzgLogInfoService;
|
|
|
import com.hdkj.lt.core.sys.service.ISysDictService;
|
|
|
import com.ruoyi.common.security.utils.SecurityUtils;
|
|
|
import com.ruoyi.system.api.model.LoginUser;
|
|
|
@@ -40,7 +40,7 @@ import java.util.Optional;
|
|
|
@RequiredArgsConstructor
|
|
|
public class FhzgLogInfoServiceImpl extends ServiceImpl<FhzgLogInfoMapper, FhzgLogInfoEntity> implements FhzgLogInfoService {
|
|
|
|
|
|
-// private final ISysDictService sysDictService;
|
|
|
+ private final ISysDictService sysDictService;
|
|
|
|
|
|
@Override
|
|
|
public void saveLog(ErrorLogParam logParam) {
|
|
|
@@ -74,13 +74,13 @@ public class FhzgLogInfoServiceImpl extends ServiceImpl<FhzgLogInfoMapper, FhzgL
|
|
|
public Page<LogInfoDTO> listPage(LogInfoVO logInfoVO) {
|
|
|
Page<LogInfoDTO> page = new Page<>(Optional.of(logInfoVO.getCurrent()).orElse(1L), Optional.of(logInfoVO.getSize()).orElse(10L));
|
|
|
Page<LogInfoDTO> logInfoDtoPage = this.getBaseMapper().selectLogInfoPage(page, logInfoVO);
|
|
|
-// Map<String, Map<String, String>> dictVosByTypeNames = sysDictService.getCacheByTypeNames(DictConstants.SOURCE_SYSTEM, DictConstants.LOG_STAGE);
|
|
|
-// Map<String, String> sourceSystemDict = dictVosByTypeNames.get(DictConstants.SOURCE_SYSTEM);
|
|
|
-// Map<String, String> stageDict = dictVosByTypeNames.get(DictConstants.LOG_STAGE);
|
|
|
-// logInfoDtoPage.getRecords().forEach(e -> {
|
|
|
-// e.setEventType(EventTypeEnum.getEventTypeName(e.getEventType())).setSourceSystem(sourceSystemDict.get(e.getSourceSystem()))
|
|
|
-// .setStage(stageDict.get(e.getStage())).setErrorLevel(ErrorLevelEnum.getErrorLevelName(e.getErrorLevel()));
|
|
|
-// });
|
|
|
+ Map<String, Map<String, String>> dictVosByTypeNames = sysDictService.getCacheByTypeNames(DictConstants.SOURCE_SYSTEM, DictConstants.LOG_STAGE);
|
|
|
+ Map<String, String> sourceSystemDict = dictVosByTypeNames.get(DictConstants.SOURCE_SYSTEM);
|
|
|
+ Map<String, String> stageDict = dictVosByTypeNames.get(DictConstants.LOG_STAGE);
|
|
|
+ logInfoDtoPage.getRecords().forEach(e -> {
|
|
|
+ e.setEventType(EventTypeEnum.getEventTypeName(e.getEventType())).setSourceSystem(sourceSystemDict.get(e.getSourceSystem()))
|
|
|
+ .setStage(stageDict.get(e.getStage())).setErrorLevel(ErrorLevelEnum.getErrorLevelName(e.getErrorLevel()));
|
|
|
+ });
|
|
|
return logInfoDtoPage;
|
|
|
}
|
|
|
}
|