ScopeService.java
1.88 KB
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
package com.sl.ms.scope.service;
import com.sl.ms.scope.entity.ServiceScopeEntity;
import com.sl.ms.scope.enums.ServiceTypeEnum;
import org.springframework.data.mongodb.core.geo.GeoJsonPoint;
import org.springframework.data.mongodb.core.geo.GeoJsonPolygon;
import java.util.List;
/**
* 服务范围Service
*/
public interface ScopeService {
/**
* 新增或更新服务范围
*
* @param bid 业务id
* @param type 类型
* @param polygon 多边形坐标点
* @return 是否成功
*/
Boolean saveOrUpdate(Long bid, ServiceTypeEnum type, GeoJsonPolygon polygon);
/**
* 根据主键id删除数据
*
* @param id 主键
* @return 是否成功
*/
Boolean delete(String id);
/**
* 根据业务id和类型删除数据
*
* @param bid 业务id
* @param type 类型
* @return 是否成功
*/
Boolean delete(Long bid, ServiceTypeEnum type);
/**
* 根据主键查询数据
*
* @param id 主键
* @return 服务范围数据
*/
ServiceScopeEntity queryById(String id);
/**
* 根据业务id和类型查询数据
*
* @param bid 业务id
* @param type 类型
* @return 服务范围数据
*/
ServiceScopeEntity queryByBidAndType(Long bid, ServiceTypeEnum type);
/**
* 根据坐标点查询所属的服务对象
*
* @param type 类型
* @param point 坐标点
* @return 服务范围数据
*/
List<ServiceScopeEntity> queryListByPoint(ServiceTypeEnum type, GeoJsonPoint point);
/**
* 根据详细地址查询所属的服务对象
*
* @param type 类型
* @param address 详细地址,如:北京市昌平区金燕龙办公楼传智教育总部
* @return 服务范围数据
*/
List<ServiceScopeEntity> queryListByPoint(ServiceTypeEnum type, String address);
}