| | |
| | | package com.dy.pipIrrBase.district; |
| | | |
| | | import com.dy.pipIrrGlobal.pojoBa.BaDistrict; |
| | | import com.dy.pipIrrGlobal.util.TypeConversionDistrict; |
| | | import com.dy.pipIrrGlobal.util.TypeConversionEnum; |
| | | import org.mapstruct.Mapper; |
| | | import org.mapstruct.Mapping; |
| | | import org.mapstruct.factory.Mappers; |
| | | |
| | | @Mapper(uses = {TypeConversionDistrict.class}) |
| | | @Mapper(uses = {TypeConversionEnum.class}) |
| | | public interface DistrictVoMapper { |
| | | DistrictVoMapper INSTANCT = Mappers.getMapper(DistrictVoMapper.class); |
| | | /** |
| | |
| | | * @param vo 值对象 |
| | | * @return po |
| | | */ |
| | | @Mapping(target = "id", ignore = true) |
| | | @Mapping(target = "id", source = "id") |
| | | @Mapping(target = "supperId", source = "supperId") |
| | | @Mapping(target = "name", source = "name") |
| | | @Mapping(target = "num", source = "num") |
| | | @Mapping(target = "level", source = "level", qualifiedByName = "districtLevelByteToObj") |
| | | @Mapping(target = "deleted", source = "deleted", qualifiedByName = "deletedByteToObj") |
| | | @Mapping(target = "subDistricts", ignore = true) |
| | | BaDistrict convert(DistrictVo vo); |
| | | } |