From 5b1489deefbbe839ab14646b1dab4a1286b9a41e Mon Sep 17 00:00:00 2001 From: yuxc <653031404@qq.com> Date: 星期二, 20 六月 2023 17:35:07 +0800 Subject: [PATCH] 1、将xml中的/符号改为#以防止后续问题。 2、对查询返回值缺少的问题进行了处理。 --- Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyServiceImpl.java | 27 +++++++++++++++++++++------ 1 files changed, 21 insertions(+), 6 deletions(-) diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyServiceImpl.java index 0b567fd..30e9cbd 100644 --- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyServiceImpl.java +++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyServiceImpl.java @@ -47,7 +47,7 @@ import org.slf4j.LoggerFactory; import org.springblade.core.cache.utils.CacheUtil; import org.springblade.core.launch.constant.AppConstant; -import org.springblade.core.log.exception.ServiceException; +import com.vci.ubcs.core.log.exception.ServiceException; import org.springblade.core.mp.support.Condition; import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; @@ -105,6 +105,20 @@ public List<CodeClassify> selectByWrapper(Wrapper wrapper) { return codeClassifyMapper.selectList(wrapper); } + + /** + * 鏌ヨ + * @param wrapper 鏌ヨ灏佽鍣� + * @return + */ + @Override + public List<String> select1(Wrapper wrapper) { + + return codeClassifyMapper.selectObjs(wrapper); + } + + + @Override public IPage<CodeClassifyVO> selectPlCodeClassifyPage(IPage<CodeClassifyVO> page, CodeClassifyVO plCodeClassify) { @@ -533,8 +547,9 @@ */ @Override public List<CodeClassifyVO> getIdPathToNamePathByParentId(String classifyId, boolean enable) { - return null; + return codeClassifyMapper.getIdPathToNamePathByParentId(classifyId); } + // /** // * 鏍规嵁鏍戝舰鏌ヨ瀵硅薄鏉ユ煡璇㈡暟鎹璞� @@ -647,7 +662,7 @@ @Override public List<CodeClassifyVO> listChildrenClassify(String codeClassifyOid, boolean allLevel, String fieldInPath, boolean enable) { if(allLevel){ - List<CodeClassify> classifyDOS = codeClassifyMapper.selectAllLevelChildHasPath(codeClassifyOid); + List<CodeClassify> classifyDOS = codeClassifyMapper.selectAllLevelChildHasPath(codeClassifyOid,fieldInPath); if(!CollectionUtils.isEmpty(classifyDOS)){ classifyDOS = classifyDOS.stream().filter(s->FRAMEWORK_DATA_ENABLED.equalsIgnoreCase(s.getLcStatus())).collect(Collectors.toList()); } @@ -767,7 +782,7 @@ Map<String/**璺緞**/,String/**涓婚敭**/> oidPathMap = new HashMap<>(); //鎴戜滑闇�瑕佹煡璇㈡墍鏈夊凡缁忓瓨鍦ㄧ殑鍒嗙被锛屼富瑕佹槸璺緞锛岀敤鏉ュ垽鏂垎绫荤殑鏁版嵁 - List<CodeClassify> existClassifyDOs = codeClassifyMapper.selectAllLevelChildHasPath(""); + List<CodeClassify> existClassifyDOs = codeClassifyMapper.selectAllLevelChildHasPath("",null); Map<String/**璺緞**/, CodeClassify/**宸茬粡瀛樺湪鐨勬暟鎹�**/> pathDOMap = Optional.ofNullable(existClassifyDOs).orElse(new ArrayList<>()).stream().collect(Collectors.toMap(s -> { String path = s.getPath(); if(StringUtils.isNotBlank(path) && path.startsWith("#")){ @@ -1069,10 +1084,10 @@ */ @Override public CodeClassifyVO getObjectByIdPath(String idPath) { - List<Map<String, Object>> idPathValues = codeClassifyMapper.selectByFieldPath("/" + idPath); + List<Map<String, Object>> idPathValues = codeClassifyMapper.selectByFieldPath("#" + idPath); CodeClassify classifyDO = null; if (idPathValues != null){ - classifyDO = codeClassifyMapper.selectById(idPathValues.get(0).get("oid").toString()); + classifyDO = codeClassifyMapper.selectByIdRel(idPathValues.get(0).get("OID").toString()); } return codeClassifyDO2VO(classifyDO); } -- Gitblit v1.9.3