提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.module.infra.convert.config; |
H |
2 |
|
|
3 |
import com.iailab.framework.common.pojo.PageResult; |
|
4 |
import com.iailab.module.infra.controller.admin.config.vo.ConfigRespVO; |
|
5 |
import com.iailab.module.infra.controller.admin.config.vo.ConfigSaveReqVO; |
|
6 |
import com.iailab.module.infra.dal.dataobject.config.ConfigDO; |
|
7 |
import org.mapstruct.Mapper; |
|
8 |
import org.mapstruct.Mapping; |
|
9 |
import org.mapstruct.factory.Mappers; |
|
10 |
|
|
11 |
import java.util.List; |
|
12 |
|
|
13 |
@Mapper |
|
14 |
public interface ConfigConvert { |
|
15 |
|
|
16 |
ConfigConvert INSTANCE = Mappers.getMapper(ConfigConvert.class); |
|
17 |
|
|
18 |
PageResult<ConfigRespVO> convertPage(PageResult<ConfigDO> page); |
|
19 |
|
|
20 |
List<ConfigRespVO> convertList(List<ConfigDO> list); |
|
21 |
|
|
22 |
@Mapping(source = "configKey", target = "key") |
|
23 |
ConfigRespVO convert(ConfigDO bean); |
|
24 |
|
|
25 |
@Mapping(source = "key", target = "configKey") |
|
26 |
ConfigDO convert(ConfigSaveReqVO bean); |
|
27 |
|
|
28 |
} |