|
@@ -2,8 +2,12 @@ package com.diagbot.facade;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.diagbot.client.UserServiceClient;
|
|
|
import com.diagbot.dto.GetQuestionInfoDTO;
|
|
|
import com.diagbot.dto.ModuleInfoDTO;
|
|
|
+import com.diagbot.dto.ModuleInfoListDTO;
|
|
|
+import com.diagbot.dto.RespDTO;
|
|
|
import com.diagbot.entity.ModuleDetail;
|
|
|
import com.diagbot.entity.ModuleInfo;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
@@ -41,6 +45,8 @@ public class ModuleInfoFacade extends ModuleInfoServiceImpl {
|
|
|
ModuleDetailFacade moduleDetailFacade;
|
|
|
@Autowired
|
|
|
QuestionInfoFacade questionInfoFacade;
|
|
|
+ @Autowired
|
|
|
+ UserServiceClient userServiceClient;
|
|
|
|
|
|
/**
|
|
|
* 根据id删除标签模板
|
|
@@ -173,4 +179,30 @@ public class ModuleInfoFacade extends ModuleInfoServiceImpl {
|
|
|
}
|
|
|
return moduleInfoDTOList;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 模板维护页面获取模板列表
|
|
|
+ *
|
|
|
+ * @param getModuleInfoVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public IPage<ModuleInfoListDTO> getModuleInfoList(GetModuleInfoVO getModuleInfoVO){
|
|
|
+ //获取模板信息
|
|
|
+ IPage<ModuleInfoListDTO> moduleInfoDTOIPage = this.getModuleInfoListByType(getModuleInfoVO);
|
|
|
+ List<String> ids = new ArrayList<>();
|
|
|
+ for (ModuleInfoListDTO moduleInfoListDTO : moduleInfoDTOIPage.getRecords()) {
|
|
|
+ ids.add(moduleInfoListDTO.getModifier());
|
|
|
+ }
|
|
|
+ //获取用户信息
|
|
|
+ RespDTO<Map<String, String>> respDTO = userServiceClient.getUserInfoByIds(ids);
|
|
|
+ if (respDTO == null || !CommonErrorCode.OK.getCode().equals(respDTO.code)) {
|
|
|
+ throw new CommonException(CommonErrorCode.RPC_ERROR,
|
|
|
+ "获取用户信息失败");
|
|
|
+ }
|
|
|
+ //将用户信息放入实体
|
|
|
+ for (ModuleInfoListDTO moduleInfoListDTO : moduleInfoDTOIPage.getRecords()) {
|
|
|
+ moduleInfoListDTO.setUserName(respDTO.data.get(moduleInfoListDTO.getModifier()));
|
|
|
+ }
|
|
|
+ return moduleInfoDTOIPage;
|
|
|
+ }
|
|
|
}
|