From 3784d8ab14497a4c71cd9d13df982e706a9401aa Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期三, 05 七月 2023 11:21:56 +0800
Subject: [PATCH] 代码提交

---
 Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/feign/BtmTypeClient.java |   24 +++++++++++++++++++-----
 1 files changed, 19 insertions(+), 5 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 84d76d9..64e1283 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
@@ -1,6 +1,7 @@
 package com.vci.ubcs.omd.feign;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.vci.ubcs.omd.entity.BtmType;
@@ -51,7 +52,7 @@
 	@Override
 	@GetMapping(GET_DETAIL)
 	public R<BtmTypeVO> getDetail(String oid) {
-		return R.data(btmTypeService.getAllAttributeByBtmOid(oid));
+		return R.data(btmTypeService.getBtmTypeByOid(oid));
 	}
 
 	/**
@@ -77,12 +78,16 @@
 		String domainValue = conditionMap.get(DOMAIN);
 		VciBaseUtil.alertNotNull(domainValue,"棰嗗煙鍊�");
 		conditionMap.remove(DOMAIN);
-		BtmType queryObj = new BtmType();
-		BeanMap.create(queryObj).putAll(conditionMap);
+//		BtmType queryObj = new BtmType();
+//		BeanMap.create(queryObj).putAll(conditionMap);
+		Map<String, Object> condition = new HashMap<>(conditionMap);
 		Query query = new Query();
 		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<BtmType> page = btmTypeService.page(Condition.getPage(query), Condition.getQueryWrapper(condition,BtmType.class).lambda().eq(BtmType::getBizDomain, domainValue).orderByAsc(BtmType::getId));
+		if (CollectionUtils.isEmpty(page.getRecords())){
+			return R.data(null);
+		}
 		Page<BtmTypeVO> pageVO = new Page<>();
 		BeanUtil.copy(page,pageVO);
 		pageVO.setRecords(BtmTypeWrapper.build().listEntityVO(page.getRecords()));
@@ -111,7 +116,10 @@
 		conditionMap.remove(DOMAIN);
 		BtmType queryObj = new BtmType();
 		BeanMap.create(queryObj).putAll(conditionMap);
-		List<BtmType> list = btmTypeService.list(Condition.getQueryWrapper(queryObj).lambda().eq(BtmType::getDomain, domainValue).orderByAsc(BtmType::getId));
+		List<BtmType> list = btmTypeService.list(Condition.getQueryWrapper(queryObj).lambda().eq(BtmType::getBizDomain, domainValue).orderByAsc(BtmType::getId));
+		if (CollectionUtils.isEmpty(list)){
+			return R.data(null);
+		}
 		return R.data(BtmTypeWrapper.build().listEntityVO(list));
 	}
 
@@ -131,6 +139,9 @@
 				)
 			).orElseGet(ArrayList::new)
 		);
+		if (CollectionUtils.isEmpty(voList)){
+			return R.data(new ArrayList<>(),"鏆傛棤鏁版嵁鎵胯浇锛�");
+		}
 		return R.data(voList);
 	}
 
@@ -150,6 +161,9 @@
 				)
 			).orElseGet(ArrayList::new)
 		);
+		if (CollectionUtils.isEmpty(voList)){
+			return R.data(null);
+		}
 		return R.data(voList);
 	}
 

--
Gitblit v1.9.3