package com.qianwen.smartman.modules.notify.convert; import java.util.ArrayList; import java.util.List; import com.qianwen.smartman.modules.notify.entity.NotifySystem; import com.qianwen.smartman.modules.notify.vo.NotifySystemVO; /* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/notify/convert/NotifySystemConvertImpl.class */ public class NotifySystemConvertImpl implements NotifySystemConvert { @Override // org.springblade.modules.notify.convert.NotifySystemConvert public NotifySystemVO convert(NotifySystem notifySystem) { if (notifySystem == null) { return null; } NotifySystemVO notifySystemVO = new NotifySystemVO(); notifySystemVO.setSourceId(notifySystem.getSourceId()); notifySystemVO.setNotifyUser(notifySystem.getNotifyUser()); notifySystemVO.setNotifyType(notifySystem.getNotifyType()); notifySystemVO.setNotifyTime(notifySystem.getNotifyTime()); notifySystemVO.setBusinessName(notifySystem.getBusinessName()); notifySystemVO.setBusinessKey(notifySystem.getBusinessKey()); notifySystemVO.setMessage(notifySystem.getMessage()); notifySystemVO.setDescription(notifySystem.getDescription()); if (notifySystem.getId() != null) { notifySystemVO.setId(String.valueOf(notifySystem.getId())); } notifySystemVO.setStatus(notifySystem.getStatus()); notifySystemVO.setAttachments(notifySystem.getAttachments()); return notifySystemVO; } @Override // org.springblade.modules.notify.convert.NotifySystemConvert public NotifySystem convert(NotifySystemVO notifySystemVO) { if (notifySystemVO == null) { return null; } NotifySystem notifySystem = new NotifySystem(); if (notifySystemVO.getId() != null) { notifySystem.setId(Long.valueOf(Long.parseLong(notifySystemVO.getId()))); } notifySystem.setStatus(notifySystemVO.getStatus()); notifySystem.setSourceId(notifySystemVO.getSourceId()); notifySystem.setNotifyUser(notifySystemVO.getNotifyUser()); notifySystem.setNotifyType(notifySystemVO.getNotifyType()); notifySystem.setNotifyTime(notifySystemVO.getNotifyTime()); notifySystem.setBusinessName(notifySystemVO.getBusinessName()); notifySystem.setBusinessKey(notifySystemVO.getBusinessKey()); notifySystem.setAttachments(notifySystemVO.getAttachments()); notifySystem.setMessage(notifySystemVO.getMessage()); notifySystem.setDescription(notifySystemVO.getDescription()); return notifySystem; } @Override // org.springblade.modules.notify.convert.NotifySystemConvert public List convert(List list) { if (list == null) { return null; } List list1 = new ArrayList<>(list.size()); for (NotifySystem notifySystem : list) { list1.add(convert(notifySystem)); } return list1; } }