mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 11:35:12 +08:00
新增 区划代码信息实体类、Service
This commit is contained in:
@@ -0,0 +1,203 @@
|
||||
package com.jsowell.pile.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.jsowell.common.annotation.Excel;
|
||||
import com.jsowell.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 中国行政地区对象 area_code_info
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2024-12-20
|
||||
*/
|
||||
public class AreaCodeInfo extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 层级
|
||||
*/
|
||||
@Excel(name = "层级")
|
||||
private Integer level;
|
||||
|
||||
/**
|
||||
* 父级行政代码
|
||||
*/
|
||||
@Excel(name = "父级行政代码")
|
||||
private Long parentCode;
|
||||
|
||||
/**
|
||||
* 行政代码
|
||||
*/
|
||||
@Excel(name = "行政代码")
|
||||
private Long areaCode;
|
||||
|
||||
/**
|
||||
* 邮政编码
|
||||
*/
|
||||
@Excel(name = "邮政编码")
|
||||
private Integer zipCode;
|
||||
|
||||
/**
|
||||
* 区号
|
||||
*/
|
||||
@Excel(name = "区号")
|
||||
private String cityCode;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 简称
|
||||
*/
|
||||
@Excel(name = "简称")
|
||||
private String shortName;
|
||||
|
||||
/**
|
||||
* 组合名
|
||||
*/
|
||||
@Excel(name = "组合名")
|
||||
private String mergerName;
|
||||
|
||||
/**
|
||||
* 拼音
|
||||
*/
|
||||
@Excel(name = "拼音")
|
||||
private String pinyin;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@Excel(name = "经度")
|
||||
private BigDecimal lng;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@Excel(name = "纬度")
|
||||
private BigDecimal lat;
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setLevel(Integer level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public Integer getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setParentCode(Long parentCode) {
|
||||
this.parentCode = parentCode;
|
||||
}
|
||||
|
||||
public Long getParentCode() {
|
||||
return parentCode;
|
||||
}
|
||||
|
||||
public void setAreaCode(Long areaCode) {
|
||||
this.areaCode = areaCode;
|
||||
}
|
||||
|
||||
public Long getAreaCode() {
|
||||
return areaCode;
|
||||
}
|
||||
|
||||
public void setZipCode(Integer zipCode) {
|
||||
this.zipCode = zipCode;
|
||||
}
|
||||
|
||||
public Integer getZipCode() {
|
||||
return zipCode;
|
||||
}
|
||||
|
||||
public void setCityCode(String cityCode) {
|
||||
this.cityCode = cityCode;
|
||||
}
|
||||
|
||||
public String getCityCode() {
|
||||
return cityCode;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setShortName(String shortName) {
|
||||
this.shortName = shortName;
|
||||
}
|
||||
|
||||
public String getShortName() {
|
||||
return shortName;
|
||||
}
|
||||
|
||||
public void setMergerName(String mergerName) {
|
||||
this.mergerName = mergerName;
|
||||
}
|
||||
|
||||
public String getMergerName() {
|
||||
return mergerName;
|
||||
}
|
||||
|
||||
public void setPinyin(String pinyin) {
|
||||
this.pinyin = pinyin;
|
||||
}
|
||||
|
||||
public String getPinyin() {
|
||||
return pinyin;
|
||||
}
|
||||
|
||||
public void setLng(BigDecimal lng) {
|
||||
this.lng = lng;
|
||||
}
|
||||
|
||||
public BigDecimal getLng() {
|
||||
return lng;
|
||||
}
|
||||
|
||||
public void setLat(BigDecimal lat) {
|
||||
this.lat = lat;
|
||||
}
|
||||
|
||||
public BigDecimal getLat() {
|
||||
return lat;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.JSON_STYLE)
|
||||
.append("id", getId())
|
||||
.append("level", getLevel())
|
||||
.append("parentCode", getParentCode())
|
||||
.append("areaCode", getAreaCode())
|
||||
.append("zipCode", getZipCode())
|
||||
.append("cityCode", getCityCode())
|
||||
.append("name", getName())
|
||||
.append("shortName", getShortName())
|
||||
.append("mergerName", getMergerName())
|
||||
.append("pinyin", getPinyin())
|
||||
.append("lng", getLng())
|
||||
.append("lat", getLat())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.jsowell.pile.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jsowell.pile.domain.AreaCodeInfo;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 中国行政地区Mapper接口
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2024-12-20
|
||||
*/
|
||||
@Repository
|
||||
public interface AreaCodeInfoMapper {
|
||||
/**
|
||||
* 查询中国行政地区
|
||||
*
|
||||
* @param id 中国行政地区主键
|
||||
* @return 中国行政地区
|
||||
*/
|
||||
public AreaCodeInfo selectAreaCodeInfoById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询中国行政地区列表
|
||||
*
|
||||
* @param areaCodeInfo 中国行政地区
|
||||
* @return 中国行政地区集合
|
||||
*/
|
||||
public List<AreaCodeInfo> selectAreaCodeInfoList(AreaCodeInfo areaCodeInfo);
|
||||
|
||||
/**
|
||||
* 新增中国行政地区
|
||||
*
|
||||
* @param areaCodeInfo 中国行政地区
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAreaCodeInfo(AreaCodeInfo areaCodeInfo);
|
||||
|
||||
/**
|
||||
* 修改中国行政地区
|
||||
*
|
||||
* @param areaCodeInfo 中国行政地区
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAreaCodeInfo(AreaCodeInfo areaCodeInfo);
|
||||
|
||||
/**
|
||||
* 删除中国行政地区
|
||||
*
|
||||
* @param id 中国行政地区主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAreaCodeInfoById(Integer id);
|
||||
|
||||
/**
|
||||
* 批量删除中国行政地区
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAreaCodeInfoByIds(Integer[] ids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.jsowell.pile.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jsowell.pile.domain.AreaCodeInfo;
|
||||
|
||||
/**
|
||||
* 中国行政地区Service接口
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2024-12-20
|
||||
*/
|
||||
public interface IAreaCodeInfoService {
|
||||
/**
|
||||
* 查询中国行政地区
|
||||
*
|
||||
* @param id 中国行政地区主键
|
||||
* @return 中国行政地区
|
||||
*/
|
||||
public AreaCodeInfo selectAreaCodeInfoById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询中国行政地区列表
|
||||
*
|
||||
* @param areaCodeInfo 中国行政地区
|
||||
* @return 中国行政地区集合
|
||||
*/
|
||||
public List<AreaCodeInfo> selectAreaCodeInfoList(AreaCodeInfo areaCodeInfo);
|
||||
|
||||
/**
|
||||
* 新增中国行政地区
|
||||
*
|
||||
* @param areaCodeInfo 中国行政地区
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAreaCodeInfo(AreaCodeInfo areaCodeInfo);
|
||||
|
||||
/**
|
||||
* 修改中国行政地区
|
||||
*
|
||||
* @param areaCodeInfo 中国行政地区
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAreaCodeInfo(AreaCodeInfo areaCodeInfo);
|
||||
|
||||
/**
|
||||
* 批量删除中国行政地区
|
||||
*
|
||||
* @param ids 需要删除的中国行政地区主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAreaCodeInfoByIds(Integer[] ids);
|
||||
|
||||
/**
|
||||
* 删除中国行政地区信息
|
||||
*
|
||||
* @param id 中国行政地区主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAreaCodeInfoById(Integer id);
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.jsowell.pile.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.jsowell.pile.mapper.AreaCodeInfoMapper;
|
||||
import com.jsowell.pile.domain.AreaCodeInfo;
|
||||
import com.jsowell.pile.service.IAreaCodeInfoService;
|
||||
|
||||
/**
|
||||
* 中国行政地区Service业务层处理
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2024-12-20
|
||||
*/
|
||||
@Service
|
||||
public class AreaCodeInfoServiceImpl implements IAreaCodeInfoService {
|
||||
@Autowired
|
||||
private AreaCodeInfoMapper areaCodeInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询中国行政地区
|
||||
*
|
||||
* @param id 中国行政地区主键
|
||||
* @return 中国行政地区
|
||||
*/
|
||||
@Override
|
||||
public AreaCodeInfo selectAreaCodeInfoById(Integer id) {
|
||||
return areaCodeInfoMapper.selectAreaCodeInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询中国行政地区列表
|
||||
*
|
||||
* @param areaCodeInfo 中国行政地区
|
||||
* @return 中国行政地区
|
||||
*/
|
||||
@Override
|
||||
public List<AreaCodeInfo> selectAreaCodeInfoList(AreaCodeInfo areaCodeInfo) {
|
||||
return areaCodeInfoMapper.selectAreaCodeInfoList(areaCodeInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增中国行政地区
|
||||
*
|
||||
* @param areaCodeInfo 中国行政地区
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAreaCodeInfo(AreaCodeInfo areaCodeInfo) {
|
||||
return areaCodeInfoMapper.insertAreaCodeInfo(areaCodeInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改中国行政地区
|
||||
*
|
||||
* @param areaCodeInfo 中国行政地区
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAreaCodeInfo(AreaCodeInfo areaCodeInfo) {
|
||||
return areaCodeInfoMapper.updateAreaCodeInfo(areaCodeInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除中国行政地区
|
||||
*
|
||||
* @param ids 需要删除的中国行政地区主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAreaCodeInfoByIds(Integer[] ids) {
|
||||
return areaCodeInfoMapper.deleteAreaCodeInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除中国行政地区信息
|
||||
*
|
||||
* @param id 中国行政地区主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAreaCodeInfoById(Integer id) {
|
||||
return areaCodeInfoMapper.deleteAreaCodeInfoById(id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user