package com.qianwen.smartman.modules.notify.convert;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import java.util.List;
|
import org.mapstruct.Builder;
|
import org.mapstruct.Mapper;
|
import org.mapstruct.Mappings;
|
import org.mapstruct.factory.Mappers;
|
import com.qianwen.smartman.modules.notify.dto.NotifyTemplateDTO;
|
import com.qianwen.smartman.modules.notify.entity.NotifyTemplateEntity;
|
|
@Mapper(builder = @Builder(disableBuilder = true))
|
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/notify/convert/NotifyTemplateConvert.class */
|
public interface NotifyTemplateConvert {
|
public static final NotifyTemplateConvert INSTANCE = (NotifyTemplateConvert) Mappers.getMapper(NotifyTemplateConvert.class);
|
|
@Mappings({})
|
NotifyTemplateEntity convertToEntity(NotifyTemplateDTO sources);
|
|
@Mappings({})
|
NotifyTemplateDTO convertToDto(NotifyTemplateEntity sources);
|
|
@Mappings({})
|
List<NotifyTemplateDTO> convertToDTOList(List<NotifyTemplateEntity> sources);
|
|
@Mappings({})
|
default IPage<NotifyTemplateDTO> convertToPage(IPage<NotifyTemplateEntity> doiPage) {
|
List<NotifyTemplateEntity> records = doiPage.getRecords();
|
List<NotifyTemplateDTO> boRecords = convertToDTOList(records);
|
Page page = new Page(doiPage.getCurrent(), doiPage.getSize(), doiPage.getTotal());
|
page.setRecords(boRecords);
|
return page;
|
}
|
}
|