From 3cb0cef6f7189dcbb537df52cef5921d1d2c3cd9 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期三, 26 四月 2023 00:12:23 +0800
Subject: [PATCH] 代码整合

---
 Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java |   33 ++++++++++++++++-----------------
 1 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/OmdBtmAttributeServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java
similarity index 60%
rename from Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/OmdBtmAttributeServiceImpl.java
rename to Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java
index e46d9e3..94cbe3d 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/OmdBtmAttributeServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java
@@ -2,14 +2,13 @@
 
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.vci.ubcs.omd.dto.OmdBtmTypeLinkAttributesDTO;
-import com.vci.ubcs.omd.entity.OmdBtmTypeAttribute;
-import com.vci.ubcs.omd.mapper.OmdBtmTypeAttributeMapper;
-import com.vci.ubcs.omd.service.IOmdAttributeService;
-import com.vci.ubcs.omd.service.IOmdBtmTypeAttributeService;
-import com.vci.ubcs.omd.vo.OmdAttributeVO;
-import com.vci.ubcs.omd.vo.OmdBtmTypeAttributeVO;
-import com.vci.ubcs.omd.wrapper.OmdBtmTypeAttributeWrapper;
+import com.vci.ubcs.omd.dto.BtmTypeLinkAttributesDTO;
+import com.vci.ubcs.omd.entity.BtmTypeAttribute;
+import com.vci.ubcs.omd.mapper.BtmTypeAttributeMapper;
+import com.vci.ubcs.omd.service.IAttributeService;
+import com.vci.ubcs.omd.service.IBtmTypeAttributeService;
+import com.vci.ubcs.omd.vo.BtmTypeAttributeVO;
+import com.vci.ubcs.omd.wrapper.BtmTypeAttributeWrapper;
 import org.springblade.core.tool.utils.Func;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -28,10 +27,10 @@
  * @date 2023/4/23
  */
 @Service
-public class OmdBtmAttributeServiceImpl extends ServiceImpl<OmdBtmTypeAttributeMapper, OmdBtmTypeAttribute> implements IOmdBtmTypeAttributeService {
+public class BtmAttributeServiceImpl extends ServiceImpl<BtmTypeAttributeMapper, BtmTypeAttribute> implements IBtmTypeAttributeService {
 
 	@Autowired
-	private IOmdAttributeService attributeService;
+	private IAttributeService attributeService;
 
 	@Override
 	public boolean deleteLogic(@NotEmpty List<Long> ids) {
@@ -50,13 +49,13 @@
 	 * @return 鍙楀奖鍝嶇殑琛屾暟
 	 */
 	@Override
-	public int checkAndInsert(String btmTypeOid,List<OmdBtmTypeLinkAttributesDTO> attributesDTOList, String creator, Date now) {
+	public int checkAndInsert(String btmTypeOid, List<BtmTypeLinkAttributesDTO> attributesDTOList, String creator, Date now) {
 		List<String> attributeIdList = new ArrayList<>();
-		List<OmdBtmTypeAttribute> btmTypeAttributeDOList = new ArrayList<>();
+		List<BtmTypeAttribute> btmTypeAttributeDOList = new ArrayList<>();
 		if (!CollectionUtils.isEmpty(attributesDTOList)) {
 			attributesDTOList.stream().forEachOrdered(s -> {
 				attributeService.checkAttribute(s);
-				btmTypeAttributeDOList.add(OmdBtmTypeAttributeWrapper.build().copyBtmTypeAttributeDTO2Entity(s,btmTypeOid, creator, now));
+				btmTypeAttributeDOList.add(BtmTypeAttributeWrapper.build().copyBtmTypeAttributeDTO2Entity(s,btmTypeOid, creator, now));
 				attributeIdList.add(s.getId().toLowerCase().trim());
 			});
 			//妫�鏌ュ睘鎬ф槸鍚﹂兘瀛樺湪
@@ -78,7 +77,7 @@
 	 * @param records 鏁版嵁瀵硅薄闆嗗悎
 	 */
 	@Override
-	public int batchInsert(List<OmdBtmTypeAttribute> records) {
+	public int batchInsert(List<BtmTypeAttribute> records) {
 		return baseMapper.insertBatchSomeColumn(records);
 	}
 
@@ -88,11 +87,11 @@
 	 * @return 鏌ヨ缁撴灉
 	 */
 	@Override
-	public List<OmdBtmTypeAttributeVO> getAttributeByBtmTypeOid(String btmTypeOid){
+	public List<BtmTypeAttributeVO> getAttributeByBtmTypeOid(String btmTypeOid){
 		Func.requireNotNull(btmTypeOid,"涓氬姟绫诲瀷涓婚敭");
-		return OmdBtmTypeAttributeWrapper.build().listEntityVO(
+		return BtmTypeAttributeWrapper.build().listEntityVO(
 			Optional.ofNullable(
-				baseMapper.selectList(Wrappers.<OmdBtmTypeAttribute>query().lambda().eq(OmdBtmTypeAttribute::getPkBtmType, btmTypeOid))
+				baseMapper.selectList(Wrappers.<BtmTypeAttribute>query().lambda().eq(BtmTypeAttribute::getPkBtmType, btmTypeOid))
 			).orElseGet(ArrayList::new)
 		);
 	}

--
Gitblit v1.9.3