yangys
2024-04-04 ed4a5236bab800094be4a8378f5098eebe3de6ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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.NotifySubscriberDTO;
import com.qianwen.smartman.modules.notify.entity.NotifySubscriberEntity;
 
@Mapper(builder = @Builder(disableBuilder = true))
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/notify/convert/NotifySubscriberConvert.class */
public interface NotifySubscriberConvert {
    public static final NotifySubscriberConvert INSTANCE = (NotifySubscriberConvert) Mappers.getMapper(NotifySubscriberConvert.class);
 
    @Mappings({})
    NotifySubscriberEntity convertToEntity(NotifySubscriberDTO sources);
 
    @Mappings({})
    NotifySubscriberDTO convertToDto(NotifySubscriberEntity sources);
 
    @Mappings({})
    List<NotifySubscriberDTO> convertToDTOList(List<NotifySubscriberEntity> sources);
 
    @Mappings({})
    default IPage<NotifySubscriberDTO> convertToPage(IPage<NotifySubscriberEntity> doiPage) {
        List<NotifySubscriberEntity> records = doiPage.getRecords();
        List<NotifySubscriberDTO> boRecords = convertToDTOList(records);
        Page page = new Page(doiPage.getCurrent(), doiPage.getSize(), doiPage.getTotal());
        page.setRecords(boRecords);
        return page;
    }
}