LibGeoLocationMapper.java 1.63 KB
package com.laowu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.laowu.model.LibGeoLocationDO;
import com.laowu.vo.geo.CountyCountsVO;
import com.laowu.vo.geo.GeoVO;
import com.laowu.vo.geo.TownCountsVO;
import com.laowu.vo.geo.VillageCountsVO;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 地理位置字典表 Mapper 接口
 * </p>
 *
 * @author Tuyp
 * @since 2023-03-21
 */
@Repository
public interface LibGeoLocationMapper extends BaseMapper<LibGeoLocationDO> {

    /**
     * 查所有的省
     */
    List<String> provinces();

    /**
     * 通过省去查市
     */
    List<String> cities(String province);

    /**
     * 通过省市去查县
     */
    List<String> county(String province,String city);

    /**
     * 通过省市县去查镇
     */
    List<String> towns(String province,String city,String county);

    /**
     * 通过省市县镇去查村
     */
    List<String> villages(String province,String city,String county,String town);

    /**
     *  省 市 县 镇  个数(村)
     */
    IPage<GeoVO> geo(IPage iPage, String province, String city, String county, String town);

    /**
     * 去重去查
     */
    List<String> localVillages(LibGeoLocationDO libGeoLocationDO);

    /**
     * 县+人数
     */
    CountyCountsVO countyCounts(Long workStationId);

    /**
     * 镇+人数
     */
    List<TownCountsVO> townCounts(Long workStationId, String town);

    /**
     * 村+人数
     */
    List<VillageCountsVO> villageCounts(Long workStationId,String town, String village);


}