Jelajahi Sumber

作者:张哲
时间:2023/04/06
类型:优化
描述:里程碑(3) 地图详情补充字段处理

zizg 1 tahun lalu
induk
melakukan
4a693686a8

+ 9 - 1
src/main/java/com/redxun/knowledge/service/CommonServiceImpl.java

@@ -1,17 +1,18 @@
 
 package com.redxun.knowledge.service;
 
+import com.alibaba.fastjson.JSON;
 import com.redxun.common.base.db.BaseDao;
 import com.redxun.common.base.db.BaseService;
 import com.redxun.common.base.entity.IUser;
 import com.redxun.common.service.impl.SuperServiceImpl;
 import com.redxun.common.tool.IdGenerator;
 import com.redxun.common.utils.ContextUtil;
-import com.redxun.datasource.DataSourceContextHolder;
 import com.redxun.dto.user.OsUserDto;
 import com.redxun.feign.sys.SystemClient;
 import com.redxun.knowledge.analysis.entity.dao.PvLog;
 import com.redxun.knowledge.analysis.entity.dto.SystemLogDto;
+import com.redxun.knowledge.analysis.entity.vo.KnowledgeTypeParse;
 import com.redxun.knowledge.analysis.mapper.PvLogMapper;
 import com.redxun.knowledge.common.UserService;
 import com.redxun.knowledge.entity.dao.CommonEntity;
@@ -110,6 +111,13 @@ public class CommonServiceImpl extends SuperServiceImpl<CommonMapper, CommonEnti
     public void pageTrack(SystemLogDto systemLogDto) {
         IUser users = ContextUtil.getCurrentUser();
         PvLog pvLog = new PvLog();
+        //地图详情补充字段处理
+        if (("知识地图").equals(systemLogDto.getModule()) && ("详情").equals(systemLogDto.getSubModule())){
+            String ussd = systemLogDto.getUssd();
+            KnowledgeTypeParse knowledgeTypeParse = JSON.parseObject(ussd, KnowledgeTypeParse.class);
+            String id = knowledgeTypeParse.getId();
+            systemLogDto.setUssd(id);
+        }
         BeanUtils.copyProperties(systemLogDto,pvLog);
         pvLog.setPkId(IdGenerator.getIdStr());
         OsUserDto osUserDto = userService.queryOsUserDto(users.getUserId());