| | |
| | | */ |
| | | package com.vci.ubcs.code.wrapper; |
| | | |
| | | import com.vci.ubcs.code.entity.CodeButtonEntity; |
| | | import com.vci.ubcs.code.vo.CodeButtonVO; |
| | | import com.vci.ubcs.omd.cache.DictCache; |
| | | import com.vci.ubcs.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.ubcs.system.cache.DictCache; |
| | | import com.vci.ubcs.code.entity.CodeButton; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeButtonVO; |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | |
| | | * @author yuxc |
| | | * @since 2023-03-29 |
| | | */ |
| | | public class CodeButtonWrapper extends BaseEntityWrapper<CodeButtonEntity, CodeButtonVO> { |
| | | public class CodeButtonWrapper extends BaseEntityWrapper<CodeButton, CodeButtonVO> { |
| | | |
| | | public static CodeButtonWrapper build() { |
| | | return new CodeButtonWrapper(); |
| | | } |
| | | |
| | | @Override |
| | | public CodeButtonVO entityVO(CodeButtonEntity codebutton) { |
| | | CodeButtonVO codebuttonVO = Objects.requireNonNull(BeanUtil.copy(codebutton, CodeButtonVO.class)); |
| | | codebuttonVO.setUsedpositiontypeName(DictCache.getValue("codeButtonPosition", codebutton.getUsedpositiontype())); |
| | | codebuttonVO.setLcstatusName(DictCache.getValue("codeLcstatus", codebutton.getLcstatus())); |
| | | public CodeButtonVO entityVO(CodeButton codebutton) { |
| | | CodeButtonVO codebuttonVO = new CodeButtonVO(); |
| | | BeanUtilForVCI.copyPropertiesIgnoreCase(codebutton,codebuttonVO); |
| | | Objects.requireNonNull(codebuttonVO); |
| | | codebuttonVO.setUsedpositiontypeText(DictCache.getValue("codeButtonPosition", codebutton.getUsedPositionType())); |
| | | codebuttonVO.setLcStatusText(DictCache.getValue("codeLcstatus", codebutton.getLcStatus())); |
| | | return codebuttonVO; |
| | | } |
| | | |