From e61a898fe563214cb13e97c08804534a61aad46b Mon Sep 17 00:00:00 2001 From: ludc Date: 星期二, 07 十一月 2023 17:32:40 +0800 Subject: [PATCH] 主数据管理按钮返回缓存问题修改 --- Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/wrapper/DockingLogeWrapper.java | 72 ++++++++++++++++++++++++++++++++++++ 1 files changed, 72 insertions(+), 0 deletions(-) diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/wrapper/DockingLogeWrapper.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/wrapper/DockingLogeWrapper.java index e69de29..f4015eb 100644 --- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/wrapper/DockingLogeWrapper.java +++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/wrapper/DockingLogeWrapper.java @@ -0,0 +1,72 @@ +package com.vci.ubcs.code.wrapper; + +import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; +import com.vci.ubcs.code.entity.DockingLog; +import com.vci.ubcs.code.enumpack.SysIntegrationLogTypeEnum; +import com.vci.ubcs.code.vo.pagemodel.DockingLogeVO; +import org.springblade.core.mp.support.BaseEntityWrapper; +import org.springblade.core.tool.utils.BeanUtil; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Objects; + +public class DockingLogeWrapper extends BaseEntityWrapper<DockingLog, DockingLogeVO> { + public static DockingLogeWrapper build() { + return new DockingLogeWrapper(); + } + + @Override + public DockingLogeVO entityVO(DockingLog entity) { + entity.setTypeText(SysIntegrationLogTypeEnum.getTextByValue(entity.getType())); + DockingLogeVO dockingLogeVO = Objects.requireNonNull(BeanUtil.copy(entity, DockingLogeVO.class)); + return dockingLogeVO; + } + + + /*** + * 鏁扮粍瀵硅薄杞崲 + * @param entitys + * @return + */ + public List<DockingLogeVO> entityVOs(Collection<DockingLog> entitys) { + if(CollectionUtils.isEmpty(entitys)) {return new ArrayList<>();} + List<DockingLogeVO> vos=new ArrayList<>(); + if(!CollectionUtils.isEmpty(entitys)) { + entitys.stream().forEach(vo -> { + vo.setTypeText(SysIntegrationLogTypeEnum.getTextByValue(vo.getType())); + vos.add(entityVO(vo)); + }); + } + return vos; + } + + /*** + * 鏁扮粍瀵硅薄杞崲 + * @param vos + * @return + */ + public List<DockingLog> voentitys(Collection<DockingLogeVO> vos) { + if(CollectionUtils.isEmpty(vos)) {return new ArrayList<>();} + List<DockingLog>entitys =new ArrayList<>(); + if(!CollectionUtils.isEmpty(vos)) { + vos.stream().forEach(entity -> { + entity.setTypeText(SysIntegrationLogTypeEnum.getTextByValue(entity.getType())); + entitys.add(voentity(entity)); + }); + } + return entitys; + } + + /*** + * 鏁扮粍瀵硅薄杞崲 + * @param vo + * @return + */ + public DockingLog voentity( DockingLogeVO vo) { + vo.setTypeText(SysIntegrationLogTypeEnum.getTextByValue(vo.getType())); + DockingLog entity = Objects.requireNonNull(BeanUtil.copy(vo, DockingLog.class)); + return entity; + } +} -- Gitblit v1.9.3