parent
3504afe58c
commit
dbbdbe4665
@ -1,10 +1,13 @@
|
||||
package com.luoo.user.dao;
|
||||
|
||||
import com.luoo.user.pojo.Region;
|
||||
import java.util.List;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||
|
||||
public interface RegionDao extends JpaRepository<Region, String>,
|
||||
JpaSpecificationExecutor<Region> {
|
||||
|
||||
List<Region> getRegionsByLevel(Integer level);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,69 @@
|
||||
package com.luoo.user.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.Size;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* DTO for {@link com.luoo.user.pojo.Region}
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode
|
||||
@Builder
|
||||
public class RegionVo implements Serializable {
|
||||
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "父id")
|
||||
private Integer pid;
|
||||
|
||||
@Size(max = 100)
|
||||
@ApiModelProperty(value = "简称")
|
||||
private String shortname;
|
||||
|
||||
@Size(max = 100)
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String name;
|
||||
|
||||
@Size(max = 255)
|
||||
@ApiModelProperty(value = "全称")
|
||||
private String mergerName;
|
||||
|
||||
@ApiModelProperty(value = "层级 1 2 3 省市区县")
|
||||
private Integer level;
|
||||
|
||||
@Size(max = 100)
|
||||
@ApiModelProperty(value = "拼音")
|
||||
private String pinyin;
|
||||
|
||||
@Size(max = 100)
|
||||
@ApiModelProperty(value = "长途区号")
|
||||
private String code;
|
||||
|
||||
@Size(max = 100)
|
||||
@ApiModelProperty(value = "邮编")
|
||||
private String zipCode;
|
||||
|
||||
@Size(max = 50)
|
||||
@ApiModelProperty(value = "首字母")
|
||||
private String first;
|
||||
|
||||
@Size(max = 100)
|
||||
@ApiModelProperty(value = "经度")
|
||||
private String lng;
|
||||
|
||||
@Size(max = 100)
|
||||
@ApiModelProperty(value = "纬度")
|
||||
private String lat;
|
||||
|
||||
@ApiModelProperty(value = "子节点")
|
||||
private List<RegionVo> children;
|
||||
}
|
Loading…
Reference in new issue