潘志宝
2024-11-11 31bd2c17088ec34072deabe106ff1d695c8b2b49
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
package com.iailab.module.bpm.convert.task;
 
import com.iailab.framework.common.util.date.DateUtils;
import com.iailab.module.bpm.controller.admin.task.vo.activity.BpmActivityRespVO;
import org.flowable.engine.history.HistoricActivityInstance;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;
 
import java.util.List;
 
/**
 * BPM 活动 Convert
 *
 * @author iailab
 */
@Mapper(uses = DateUtils.class)
public interface BpmActivityConvert {
 
    BpmActivityConvert INSTANCE = Mappers.getMapper(BpmActivityConvert.class);
 
    List<BpmActivityRespVO> convertList(List<HistoricActivityInstance> list);
 
    @Mappings({
            @Mapping(source = "activityId", target = "key"),
            @Mapping(source = "activityType", target = "type")
    })
    BpmActivityRespVO convert(HistoricActivityInstance bean);
}