package com.qianwen.smartman.modules.system.convert; import java.util.ArrayList; import java.util.List; import com.qianwen.smartman.modules.system.dto.ApplicationAddDTO; import com.qianwen.smartman.modules.system.dto.ApplicationDTO; import com.qianwen.smartman.modules.system.dto.ApplicationUpdateDTO; import com.qianwen.smartman.modules.system.entity.Application; /* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/system/convert/ApplicationConvertImpl.class */ public class ApplicationConvertImpl implements ApplicationConvert { @Override // org.springblade.modules.system.convert.ApplicationConvert public Application convertToEntity(ApplicationDTO sources) { if (sources == null) { return null; } Application application = new Application(); application.setDomainUrl(sources.getDomain()); application.setId(sources.getId()); application.setName(sources.getName()); application.setCode(sources.getCode()); application.setLogo(sources.getLogo()); application.setBackgroundUrl(sources.getBackgroundUrl()); application.setSort(sources.getSort()); application.setRemark(sources.getRemark()); application.setIsShow(sources.getIsShow()); return application; } @Override // org.springblade.modules.system.convert.ApplicationConvert public ApplicationDTO convertToDTO(Application sources) { if (sources == null) { return null; } String domain = sources.getDomainUrl(); Long id = sources.getId(); String name = sources.getName(); String code = sources.getCode(); String logo = sources.getLogo(); String backgroundUrl = sources.getBackgroundUrl(); Integer sort = sources.getSort(); String remark = sources.getRemark(); Integer isShow = sources.getIsShow(); ApplicationDTO applicationDTO = new ApplicationDTO(id, name, code, logo, backgroundUrl, domain, sort, remark, isShow); return applicationDTO; } @Override // org.springblade.modules.system.convert.ApplicationConvert public List convertToDTOList(List sources) { if (sources == null) { return null; } List list = new ArrayList<>(sources.size()); for (Application application : sources) { list.add(convertToDTO(application)); } return list; } @Override // org.springblade.modules.system.convert.ApplicationConvert public Application convertToEntity(ApplicationUpdateDTO sources) { if (sources == null) { return null; } Application application = new Application(); application.setDomainUrl(sources.getDomain()); application.setId(sources.getId()); application.setName(sources.getName()); application.setLogo(sources.getLogo()); application.setBackgroundUrl(sources.getBackgroundUrl()); application.setSort(sources.getSort()); application.setRemark(sources.getRemark()); application.setIsShow(sources.getIsShow()); return application; } @Override // org.springblade.modules.system.convert.ApplicationConvert public Application convertToEntity(ApplicationAddDTO applicationAddDTO) { if (applicationAddDTO == null) { return null; } Application application = new Application(); application.setDomainUrl(applicationAddDTO.getDomain()); application.setName(applicationAddDTO.getName()); application.setCode(applicationAddDTO.getCode()); application.setLogo(applicationAddDTO.getLogo()); application.setBackgroundUrl(applicationAddDTO.getBackgroundUrl()); application.setSort(applicationAddDTO.getSort()); application.setRemark(applicationAddDTO.getRemark()); application.setIsShow(applicationAddDTO.getIsShow()); return application; } }