All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.haoxuer.discover.area.rest.conver.AreaSimpleConver Maven / Gradle / Ivy

There is a newer version: 3.3.18-20230117
Show newest version
package com.haoxuer.discover.area.rest.conver;

import com.haoxuer.discover.area.data.entity.Area;
import com.haoxuer.discover.area.rest.domain.response.simple.AreaSimple;
import com.haoxuer.discover.data.rest.core.Conver;

public class AreaSimpleConver implements Conver {
  @Override
  public AreaSimple conver(Area source) {
    AreaSimple result = new AreaSimple();
    result.setId(source.getId());
    result.setPid(source.getParentId());
    result.setName(source.getName());
    if (source.getAreaType() != null) {
      result.setType(source.getAreaType().ordinal());
    }
    result.setCode(source.getCode());
    result.setLat(source.getLat());
    result.setLng(source.getLng());
    return result;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy