RemoteHospitalService.java
2.5 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
77
78
79
80
package cn.brotop.api.hospital;
import cn.brotop.api.hospital.DTO.HospitalDTO;
import cn.brotop.api.hospital.DTO.HospitalRpcDTO;
import cn.brotop.api.hospital.VO.CityVO;
import cn.brotop.api.hospital.VO.CountyVO;
import cn.brotop.api.hospital.VO.ProvinceVO;
import cn.brotop.api.hospital.factory.RemoteHospitalFallbackFactory;
import cn.brotop.common.core.constant.ServiceNameConstants;
import cn.brotop.common.core.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/**
* 医院模块API服务
* @author 啊雷
* @version 1.0
* @date 2021/2/3 16:19
*/
@FeignClient(contextId = "remoteHospitalService", value = ServiceNameConstants.HOSPITAL_SERVICE, fallbackFactory = RemoteHospitalFallbackFactory.class)
public interface RemoteHospitalService {
/**
* 查询医院信息
* @param hospitalIds ids
* @return R<List<HospitalRpcDTO>>
*/
@PostMapping(value = "/remote_hospital/findByHospitalIds")
R<List<HospitalRpcDTO>> findByHospitalIds(@RequestBody List<Long> hospitalIds);
/**
* 查询医院信息
* @param hospitalId 医院id
* @return R<HospitalRpcDTO>
*/
@GetMapping(value = "/remote_hospital/findByHospitalId")
R<HospitalRpcDTO> findByHospitalId(@RequestParam("hospitalId") Long hospitalId);
/**
* 获取省
* @return 省列表
*/
@GetMapping(value = "/remote_hospital/getProvince")
R<List<ProvinceVO>> getProvince();
/**
* 获取市
* @param provinceId 省id
* @return 市列表
*/
@GetMapping(value = "/remote_hospital/getCity")
R<List<CityVO>> getCity(@RequestParam("provinceId") Long provinceId);
/**
* 获取区
* @param cityId 城市id
* @return 区列表
*/
@GetMapping(value = "/remote_hospital/getCounty")
R<List<CountyVO>> getCounty(@RequestParam("cityId") Long cityId);
/**
* 获取区下所有医院
* @param countyId 区id
* @return 区下医院列表
*/
@GetMapping(value = "/remote_hospital/getHospital")
R<List<HospitalDTO>> getHospital(@RequestParam("countyId") Long countyId);
// /**
// * 根据输入的名称查询医院
// * @param hospitalName 医院名称
// */
// R<HospitalRpcDTO> getOneHospital(String hospitalName);
}