package com.qianwen.smartman.modules.notify.convert; import java.util.ArrayList; import java.util.List; import org.mapstruct.Mappings; import org.mapstruct.factory.Mappers; import com.qianwen.smartman.modules.cps.entity.CommonGroup; import com.qianwen.smartman.modules.cps.entity.Employee; import com.qianwen.smartman.modules.notify.dto.BusinessNotifyStateDTO; /* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/notify/convert/BusinessNotifyStateConvert.class */ public interface BusinessNotifyStateConvert { public static final BusinessNotifyStateConvert INSTANCE = (BusinessNotifyStateConvert) Mappers.getMapper(BusinessNotifyStateConvert.class); @Mappings({}) default BusinessNotifyStateDTO convert(Employee employee) { BusinessNotifyStateDTO stateDTO = new BusinessNotifyStateDTO(); stateDTO.setPersonId(employee.getId()); stateDTO.setName(employee.getName()); return stateDTO; } @Mappings({}) default List convertByEmpList(List employees) { List stateDTOS = new ArrayList<>(); for (Employee employee : employees) { BusinessNotifyStateDTO convert = convert(employee); stateDTOS.add(convert); } return stateDTOS; } @Mappings({}) default BusinessNotifyStateDTO convert(CommonGroup commonGroup) { BusinessNotifyStateDTO stateDTO = new BusinessNotifyStateDTO(); stateDTO.setPersonId(commonGroup.getId()); stateDTO.setName(commonGroup.getName()); return stateDTO; } @Mappings({}) default List convertByOrgList(List commonGroups) { ArrayList stateDTOS = new ArrayList<>(); for (CommonGroup commonGroup : commonGroups) { BusinessNotifyStateDTO convert = convert(commonGroup); stateDTOS.add(convert); } return stateDTOS; } }