LocationClient.java 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. package com.yihu.ehr.emergency.client;
  2. import com.yihu.ehr.constants.ApiVersion;
  3. import com.yihu.ehr.constants.MicroServices;
  4. import com.yihu.ehr.constants.ServiceApi;
  5. import com.yihu.ehr.util.rest.Envelop;
  6. import io.swagger.annotations.ApiOperation;
  7. import io.swagger.annotations.ApiParam;
  8. import org.springframework.cloud.netflix.feign.FeignClient;
  9. import org.springframework.http.MediaType;
  10. import org.springframework.web.bind.annotation.RequestBody;
  11. import org.springframework.web.bind.annotation.RequestMapping;
  12. import org.springframework.web.bind.annotation.RequestMethod;
  13. import org.springframework.web.bind.annotation.RequestParam;
  14. import springfox.documentation.annotations.ApiIgnore;
  15. /**
  16. * Client - 待命地点
  17. * Created by progr1mmer on 2017/11/22.
  18. */
  19. @ApiIgnore
  20. @FeignClient(name = MicroServices.Basic)
  21. @RequestMapping(ApiVersion.Version1_0)
  22. public interface LocationClient {
  23. @RequestMapping(value = ServiceApi.Emergency.LocationList, method = RequestMethod.GET)
  24. @ApiOperation("获取待命地点列表")
  25. Envelop list(
  26. @RequestParam(value = "fields", required = false) String fields,
  27. @RequestParam(value = "filters", required = false) String filters,
  28. @RequestParam(value = "sorts", required = false) String sorts,
  29. @RequestParam(value = "page") int page,
  30. @RequestParam(value = "size") int size);
  31. @RequestMapping(value = ServiceApi.Emergency.LocationSave, method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
  32. @ApiOperation("保存单条记录")
  33. Envelop save(
  34. @ApiParam(name = "location", value = "待命地点")
  35. @RequestBody String location);
  36. @RequestMapping(value = ServiceApi.Emergency.LocationUpdate, method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
  37. @ApiOperation("更新单条记录")
  38. Envelop update(
  39. @ApiParam(name = "location", value = "排班")
  40. @RequestBody String location);
  41. @RequestMapping(value = ServiceApi.Emergency.LocationDelete, method = RequestMethod.DELETE)
  42. @ApiOperation("删除待命地点")
  43. Envelop delete(
  44. @ApiParam(name = "ids", value = "id列表[1,2,3...] int")
  45. @RequestParam(value = "ids") String ids);
  46. }