文件名从 Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/OmdAttributeWrapper.java 修改 |
| | |
| | | package com.vci.ubcs.omd.wrapper; |
| | | |
| | | import com.vci.ubcs.omd.entity.OmdAttribute; |
| | | import com.vci.ubcs.omd.entity.Attribute; |
| | | import com.vci.ubcs.omd.vo.*; |
| | | import com.vci.ubcs.system.cache.DictBizCache; |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | |
| | | * @author LiHang |
| | | * @date 2023/4/3 |
| | | */ |
| | | public class OmdAttributeWrapper extends BaseEntityWrapper<OmdAttribute, OmdAttributeVO> { |
| | | public class AttributeWrapper extends BaseEntityWrapper<Attribute, AttributeVO> { |
| | | |
| | | public static OmdAttributeWrapper build() { |
| | | return new OmdAttributeWrapper(); |
| | | public static AttributeWrapper build() { |
| | | return new AttributeWrapper(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 鏄剧ず瀵硅薄 |
| | | */ |
| | | @Override |
| | | public OmdAttributeVO entityVO(OmdAttribute entity) { |
| | | OmdAttributeVO vo = Objects.requireNonNull(BeanUtil.copy(entity, OmdAttributeVO.class)); |
| | | public AttributeVO entityVO(Attribute entity) { |
| | | AttributeVO vo = Objects.requireNonNull(BeanUtil.copy(entity, AttributeVO.class)); |
| | | vo.setTypeValue(DictBizCache.getValue(vo.getTypeCode(),vo.getTypeKey())); |
| | | if (StringUtil.isNotBlank(vo.getReferTypeCode())){ |
| | | vo.setReferTypeValue(DictBizCache.getValue(vo.getReferTypeCode(),vo.getReferTypeKey())); |
| | |
| | | * @param list pojo闆嗗悎 |
| | | * @return 鏄剧ず瀵硅薄 |
| | | */ |
| | | public List<OmdAttributeVO> listEntityVO(List<OmdAttribute> list) { |
| | | public List<AttributeVO> listEntityVO(List<Attribute> list) { |
| | | return list.stream().map(this::entityVO).collect(Collectors.toList()); |
| | | } |
| | | } |