From c6a54f63df671de4592e336b9b8cd8406d4e3b51 Mon Sep 17 00:00:00 2001 From: fujunling <2984387807@qq.com> Date: 星期五, 02 六月 2023 16:25:27 +0800 Subject: [PATCH] 解决动态模块冲突 --- Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/feign/BtmTypeClient.java | 41 +++++++++++++++++++++++++++++++++++++---- 1 files changed, 37 insertions(+), 4 deletions(-) diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/feign/BtmTypeClient.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/feign/BtmTypeClient.java index 997bea0..84d76d9 100644 --- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/feign/BtmTypeClient.java +++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/feign/BtmTypeClient.java @@ -51,7 +51,7 @@ @Override @GetMapping(GET_DETAIL) public R<BtmTypeVO> getDetail(String oid) { - return R.data(btmTypeService.getBtmTypeByOid(oid)); + return R.data(btmTypeService.getAllAttributeByBtmOid(oid)); } /** @@ -62,7 +62,7 @@ */ @Override @PostMapping(GET_REF_PAGE) - public R<IPage<BtmTypeVO>> getRefPage(BaseQueryObject baseQueryObject) { + public R<Page<BtmTypeVO>> getRefPage(BaseQueryObject baseQueryObject) { Map<String, String> conditionMap = baseQueryObject.getConditionMap(); if (conditionMap == null){ conditionMap = new HashMap<>(16); @@ -83,10 +83,10 @@ query.setSize(pageHelper.getLimit()); query.setCurrent(pageHelper.getPage()); IPage<BtmType> page = btmTypeService.page(Condition.getPage(query), Condition.getQueryWrapper(queryObj).lambda().eq(BtmType::getDomain, domainValue).orderByAsc(BtmType::getId)); - IPage<BtmTypeVO> pageVO = new Page<>(); + Page<BtmTypeVO> pageVO = new Page<>(); BeanUtil.copy(page,pageVO); pageVO.setRecords(BtmTypeWrapper.build().listEntityVO(page.getRecords())); - R<IPage<BtmTypeVO>> r = R.data(pageVO); + R<Page<BtmTypeVO>> r = R.data(pageVO); r.setSuccess(true); return r; } @@ -152,4 +152,37 @@ ); return R.data(voList); } + + /** + * 鑾峰彇涓氬姟绫诲瀷锛屽彧鏈夐粯璁ゅ瓧娈� + * + * @param btmTypeId 涓氬姟绫诲瀷id + * @return 榛樿瀛楁灞炴�� + */ + @Override + public R<BtmTypeVO> getDefaultAttrByBtmId(String btmTypeId) { + return R.data(Optional.ofNullable(btmTypeService.getDefaultAttrByBtmId(btmTypeId)).orElseGet(BtmTypeVO::new)); + } + + /** + * 鑾峰彇涓氬姟绫诲瀷锛屾湁鎵�鏈夌殑瀛楁 + * + * @param btmTypeId 涓氬姟绫诲瀷id + * @return 鎵�鏈夊瓧娈� + */ + @Override + public R<BtmTypeVO> getAllAttributeByBtmId(String btmTypeId) { + return R.data(Optional.ofNullable(btmTypeService.getAllAttributeByBtmId(btmTypeId)).orElseGet(BtmTypeVO::new)); + } + + /** + * 鑾峰彇涓氬姟绫诲瀷锛屾湁鎵�鏈夌殑瀛楁 + * + * @param btmTypeOid 涓氬姟绫诲瀷涓婚敭 + * @return 鎵�鏈夊瓧娈� + */ + @Override + public R<BtmTypeVO> getAllAttributeByBtmOid(String btmTypeOid) { + return R.data(Optional.ofNullable(btmTypeService.getAllAttributeByBtmOid(btmTypeOid)).orElseGet(BtmTypeVO::new)); + } } -- Gitblit v1.9.3