Class CityBizImpl

java.lang.Object
com.baomidou.mybatisplus.extension.repository.AbstractRepository<M,T>
com.baomidou.mybatisplus.extension.repository.CrudRepository<M,T>
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl<M,T>
net.mingsoft.base.biz.impl.BaseBizImpl<ICityDao,CityEntity>
net.mingsoft.basic.biz.impl.CityBizImpl
All Implemented Interfaces:
com.baomidou.mybatisplus.extension.repository.IRepository<CityEntity>, com.baomidou.mybatisplus.extension.service.IService<CityEntity>, net.mingsoft.base.biz.IBaseBiz<CityEntity>, ICityBiz

@Service("cityBizImpl") @Transactional public class CityBizImpl extends net.mingsoft.base.biz.impl.BaseBizImpl<ICityDao,CityEntity> implements ICityBiz
省市县镇村数据管理持久化层
Version:
版本号:100
创建日期:2017-7-27 14:47:29
历史修订:
Author:
伍晶晶
  • Field Summary

    Fields inherited from class net.mingsoft.base.biz.impl.BaseBizImpl

    LOG

    Fields inherited from class com.baomidou.mybatisplus.extension.repository.CrudRepository

    baseMapper

    Fields inherited from class com.baomidou.mybatisplus.extension.repository.AbstractRepository

    log

    Fields inherited from interface com.baomidou.mybatisplus.extension.repository.IRepository

    DEFAULT_BATCH_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected net.mingsoft.base.dao.IBaseDao
     
     
    queryById(CityEntity cityEntity)
    根据当前实体的cityId,village_id等判断具体是查询省或市等层级
    queryByLevel(int level)
    通过层级过滤城市数据,提高性能
    queryCity(CityEntity cityEntity)
    查询市
    queryCounty(CityEntity cityEntity)
    查询区/县
    queryForTree(int level, String type)
    根据层级,和类型来确定返回多少级数
    查询省/直辖市/自治区
     
    queryTown(CityEntity cityEntity)
    查询街道/镇
    查询村委会

    Methods inherited from class net.mingsoft.base.biz.impl.BaseBizImpl

    alterTable, createTable, delete, delete, delete, deleteBySQL, deleteEntity, deleteEntity, dropTable, excuteSql, execute, getEntity, getEntity, getEntity, getOne, insert, insertBySQL, query, queryAll, queryCount, queryForList, queryForList, queryForListPage, saveBatch, saveEntity, update, update, updateBySQL, updateCache, updateEntity

    Methods inherited from class com.baomidou.mybatisplus.extension.repository.CrudRepository

    getBaseMapper, getSqlStatement, saveBatch, saveOrUpdateBatch, updateBatchById

    Methods inherited from class com.baomidou.mybatisplus.extension.repository.AbstractRepository

    executeBatch, executeBatch, getEntityClass, getMap, getMapperClass, getObj, getOneOpt, getSqlSessionFactory, removeById, saveOrUpdate

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.mingsoft.base.biz.IBaseBiz

    alterTable, createTable, delete, delete, delete, deleteBySQL, deleteEntity, deleteEntity, dropTable, excuteSql, execute, getEntity, getEntity, getEntity, insert, insertBySQL, query, queryAll, queryCount, queryForList, queryForList, queryForListPage, saveBatch, saveEntity, update, update, updateBySQL, updateCache, updateEntity

    Methods inherited from interface com.baomidou.mybatisplus.extension.repository.IRepository

    count, count, exists, getBaseMapper, getById, getEntityClass, getMap, getObj, getOne, getOne, getOneOpt, getOneOpt, getOptById, ktQuery, ktUpdate, lambdaQuery, lambdaQuery, lambdaUpdate, list, list, list, list, listByIds, listByMap, listMaps, listMaps, listMaps, listMaps, listObjs, listObjs, listObjs, listObjs, page, page, pageMaps, pageMaps, query, remove, removeById, removeById, removeById, removeByIds, removeByIds, removeByMap, save, saveBatch, saveOrUpdate, saveOrUpdateBatch, update, update, update, updateBatchById, updateById

    Methods inherited from interface com.baomidou.mybatisplus.extension.service.IService

    removeBatchByIds, saveBatch, saveOrUpdateBatch, updateBatchById
  • Constructor Details

    • CityBizImpl

      public CityBizImpl()
  • Method Details

    • getDao

      protected net.mingsoft.base.dao.IBaseDao getDao()
      Specified by:
      getDao in class net.mingsoft.base.biz.impl.BaseBizImpl<ICityDao,CityEntity>
    • queryProvince

      public List<CityEntity> queryProvince()
      Description copied from interface: ICityBiz
      查询省/直辖市/自治区
      Specified by:
      queryProvince in interface ICityBiz
      Returns:
      省/直辖市/自治区列表 province_id 省/直辖市/自治区编号 province_name 省/直辖市/自治区名称
    • queryCity

      public List<CityEntity> queryCity(CityEntity cityEntity)
      Description copied from interface: ICityBiz
      查询市
      Specified by:
      queryCity in interface ICityBiz
      Parameters:
      cityEntity - 城市实体
      Returns:
      市级列表 city_id 市编号 city_name 市名称
    • queryCounty

      public List<CityEntity> queryCounty(CityEntity cityEntity)
      Description copied from interface: ICityBiz
      查询区/县
      Specified by:
      queryCounty in interface ICityBiz
      Returns:
      区/县列表 county_id 区/县编号 county_name 区/县 名称
    • queryTown

      public List<CityEntity> queryTown(CityEntity cityEntity)
      Description copied from interface: ICityBiz
      查询街道/镇
      Specified by:
      queryTown in interface ICityBiz
      Returns:
      街道/镇列表 town_id 街道/镇编号 town_name 街道/镇名称
    • queryVillage

      public List<CityEntity> queryVillage(CityEntity cityEntity)
      Description copied from interface: ICityBiz
      查询村委会
      Specified by:
      queryVillage in interface ICityBiz
      Returns:
      村委会/社区列表 village_id 村委会/社区编号 village_name 村委会/社区名称
    • queryForTree

      public List<CityBean> queryForTree(int level, String type)
      Description copied from interface: ICityBiz
      根据层级,和类型来确定返回多少级数
      Specified by:
      queryForTree in interface ICityBiz
      Parameters:
      level - 层级数,整型。
      Returns:
      id 城市编号 name 城市名称 parentId 父级城市编号 childrensList 子城市数据,包括id,name,parentId,childrensList
    • queryByLevel

      public List<CityEntity> queryByLevel(int level)
      Description copied from interface: ICityBiz
      通过层级过滤城市数据,提高性能
      Specified by:
      queryByLevel in interface ICityBiz
      Parameters:
      level - 默认3级获取到区数据
      Returns:
      列表
    • queryById

      public List<CityEntity> queryById(CityEntity cityEntity)
      Description copied from interface: ICityBiz
      根据当前实体的cityId,village_id等判断具体是查询省或市等层级
      Specified by:
      queryById in interface ICityBiz
      Returns:
    • queryByEntity

      public CityEntity queryByEntity(CityEntity city)
      Specified by:
      queryByEntity in interface ICityBiz
    • queryProvinceAndName

      public List<CityEntity> queryProvinceAndName(CityEntity city)
      Specified by:
      queryProvinceAndName in interface ICityBiz