liurunyu
2023-11-09 5a88c6ba9108aef9bf7fdfbea34d5b86bbeffba1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package com.dy.pipIrrBase.district;
 
import com.dy.pipIrrGlobal.pojoBa.BaDistrict;
import com.dy.pipIrrGlobal.util.TypeConversionDistrict;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
 
@Mapper(uses = {TypeConversionDistrict.class})
public interface DistrictVoMapper {
    DistrictVoMapper INSTANCT = Mappers.getMapper(DistrictVoMapper.class);
    /**
     * vo转po
     * @param vo 值对象
     * @return po
     */
    @Mapping(target = "id", ignore = true)
    @Mapping(target = "supperId", source = "supperId")
    @Mapping(target = "name", source = "name")
    @Mapping(target = "level", source = "level", qualifiedByName = "districtLevelByteToObj")
    BaDistrict convert(DistrictVo vo);
}