yangys
2024-09-04 04c57331cf84c8f606c2838dcb6fe5463fb9b68c
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
package com.qianwen.smartman.modules.mdc.convert;
 
import java.util.List;
import org.mapstruct.Builder;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;
import com.qianwen.smartman.modules.mdc.entity.SuperAggregateState;
import com.qianwen.smartman.modules.mdc.vo.StatusRecordVO;
import com.qianwen.smartman.modules.mdc.vo.SuperAggregateStateVO;
import com.qianwen.smartman.modules.system.constant.FieldConstant;
 
@Mapper(builder = @Builder(disableBuilder = true))
public interface StatusRecordConvert {
    public static final StatusRecordConvert INSTANCE = (StatusRecordConvert) Mappers.getMapper(StatusRecordConvert.class);
 
    @Mappings({})
    List<StatusRecordVO> convert(List<SuperAggregateState> superAggregateStateList);
 
    @Mappings({@Mapping(source = "valueCollect", target = FieldConstant.OPTION_KEY), @Mapping(source = "durationCollect", target = "duration")})
    List<SuperAggregateStateVO> convertState(List<SuperAggregateState> states);
 
    @Mappings({})
    SuperAggregateState convert(SuperAggregateState state);
 
    @Mappings({})
    StatusRecordVO convert(StatusRecordVO statusRecordVO);
}