cloudroam
3 天以前 3a819e4f668c15e8b77b188b322470da12bb7a43
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
package com.mzl.flower.service.district;
 
import com.mzl.flower.dto.request.district.CreateDistrictGaodeDTO;
import com.mzl.flower.dto.response.district.DistrictVO;
import com.mzl.flower.dto.response.system.AreaDTO;
import com.mzl.flower.entity.district.DistrictDO;
import com.baomidou.mybatisplus.extension.service.IService;
 
import java.util.List;
 
/**
 * <p>
 * 对接高德地图行政区划 服务类
 * </p>
 *
 * @author @TaoJie
 * @since 2024-12-19
 */
public interface DistrictService extends IService<DistrictDO> {
 
    void removeAllDistricts();
 
    void refreshDistrict();
 
    /**
     * 获取所有的行政区划列表
     * @return
     */
    List<DistrictDO> getAllDistrict();
 
    /**
     * 从数据库里面获取
     * @return
     */
    List<AreaDTO> getAreaDTOListByDB();
 
    /**
     * 从JSON文件里面获取
     * @return
     */
    List<AreaDTO> getAreaDTOListByJsonFile();
 
 
    /**
     * 保存高德数据库入数据库
     * @param districtDOList
     */
    void saveRemoteDistricts(List<DistrictDO> districtDOList);
 
    List<DistrictVO> getDistrictTreeList();
 
    /**
     * 创建行政区划
     * @param dto
     * @return
     */
    boolean createDistrict(CreateDistrictGaodeDTO dto);
 
    /**
     * 更新行政区划
     * @param dto
     * @return
     */
    boolean updateDistrict(CreateDistrictGaodeDTO dto);
 
    /**
     * 删除行政区划
     * @param id
     * @return
     */
    boolean deleteDistrict(String id);
 
    /**
     * 获取行政区划
     * @return
     */
    String getChineseArea();
 
    void clearChineseDataCache();
}