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.NotifyHistoryDTO;
|
import com.qianwen.smartman.modules.notify.dto.NotifyHistoryQueryDTO;
|
import com.qianwen.smartman.modules.notify.entity.NotifyHistoryEntity;
|
|
@Mapper(builder = @Builder(disableBuilder = true))
|
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/notify/convert/NotifyHistoryConvert.class */
|
public interface NotifyHistoryConvert {
|
public static final NotifyHistoryConvert INSTANCE = (NotifyHistoryConvert) Mappers.getMapper(NotifyHistoryConvert.class);
|
|
@Mappings({})
|
NotifyHistoryEntity convertToEntity(NotifyHistoryQueryDTO sources);
|
|
@Mappings({})
|
NotifyHistoryEntity convertToEntity(NotifyHistoryDTO sources);
|
|
@Mappings({})
|
NotifyHistoryDTO convertToDto(NotifyHistoryEntity sources);
|
|
@Mappings({})
|
List<NotifyHistoryDTO> convertToDTOList(List<NotifyHistoryEntity> sources);
|
|
@Mappings({})
|
default IPage<NotifyHistoryDTO> convertToPage(IPage<NotifyHistoryEntity> doiPage) {
|
List<NotifyHistoryEntity> records = doiPage.getRecords();
|
List<NotifyHistoryDTO> boRecords = convertToDTOList(records);
|
Page page = new Page(doiPage.getCurrent(), doiPage.getSize(), doiPage.getTotal());
|
page.setRecords(boRecords);
|
return page;
|
}
|
}
|