Commit 0f6ed450 by 黄小葱

增加consumes的类型

1 parent b1cd38ac
...@@ -16,7 +16,7 @@ import javax.validation.constraints.NotBlank; ...@@ -16,7 +16,7 @@ import javax.validation.constraints.NotBlank;
*/ */
@FeignClient( @FeignClient(
name = "${feign.devicemonitor.name}", name = "${feign.devicemonitor.name}",
path = "${feign.devicemonitor.path}/device", path = "${feign.devicemonitor.path}/api/device",
contextId = "feignApiDevice", contextId = "feignApiDevice",
fallbackFactory = DeviceServiceFallbackFactory.class, decode404 = true) fallbackFactory = DeviceServiceFallbackFactory.class, decode404 = true)
public interface DeviceFeignService { public interface DeviceFeignService {
...@@ -27,7 +27,7 @@ public interface DeviceFeignService { ...@@ -27,7 +27,7 @@ public interface DeviceFeignService {
* @param sn * @param sn
* @return * @return
*/ */
@GetMapping(value = "/getDeviceBySn", consumes = MediaType.APPLICATION_JSON_VALUE) @GetMapping(value = "/getDeviceBySn", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
R<DeviceDTO> getDeviceBySn(@NotBlank(message = "设备号不能为空") @RequestParam(value = "sn") String sn); R<DeviceDTO> getDeviceBySn(@NotBlank(message = "设备号不能为空") @RequestParam(value = "sn") String sn);
/** /**
...@@ -37,7 +37,7 @@ public interface DeviceFeignService { ...@@ -37,7 +37,7 @@ public interface DeviceFeignService {
* @param offlineTime * @param offlineTime
* @return * @return
*/ */
@GetMapping(value = "/getDeviceStatusBySn", consumes = MediaType.APPLICATION_JSON_VALUE) @GetMapping(value = "/getDeviceStatusBySn", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
R<DeviceStatusModel> getDeviceStatusBySn(@NotBlank(message = "设备号不能为空") @RequestParam(value = "sn") String sn, Long offlineTime); R<DeviceStatusModel> getDeviceStatusBySn(@NotBlank(message = "设备号不能为空") @RequestParam(value = "sn") String sn, Long offlineTime);
/** /**
...@@ -46,6 +46,6 @@ public interface DeviceFeignService { ...@@ -46,6 +46,6 @@ public interface DeviceFeignService {
* @param sn 设备号 * @param sn 设备号
* @return * @return
*/ */
@GetMapping(value = "/getDevicesTotalCount", consumes = MediaType.APPLICATION_JSON_VALUE) @GetMapping(value = "/getDevicesTotalCount")
R getDevicesTotalCount(@RequestParam(value = "sn") String sn); R getDevicesTotalCount(@RequestParam(value = "sn") String sn);
} }
...@@ -29,13 +29,13 @@ import java.util.List; ...@@ -29,13 +29,13 @@ import java.util.List;
*/ */
@FeignClient( @FeignClient(
name = "${feign.devicemonitor.name}", name = "${feign.devicemonitor.name}",
path = "${feign.devicemonitor.path}/location", path = "${feign.devicemonitor.path}/api/location",
contextId = "feignApiLocation", contextId = "feignApiLocation",
fallbackFactory = GpsBsServiceFallbackFactory.class, decode404 = true) fallbackFactory = GpsBsServiceFallbackFactory.class, decode404 = true)
public interface GpsBsService { public interface GpsBsService {
@GetMapping(value = "/devicemonitorinfo", consumes = MediaType.APPLICATION_JSON_VALUE) @GetMapping(value = "/devicemonitorinfo", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
R<List<DeviceLocationBo>> listDeviceMonitorInfo(@NotBlank(message = "设备号不能为空") @RequestParam(value = "sns") String sns, R<List<DeviceLocationBo>> listDeviceMonitorInfo(@NotBlank(message = "设备号不能为空") @RequestParam(value = "sns") String sns,
@NotBlank(message = "设备编码不能为空") @RequestParam(value = "deviceCode") String deviceCode); @NotBlank(message = "设备编码不能为空") @RequestParam(value = "deviceCode") String deviceCode);
...@@ -55,7 +55,7 @@ public interface GpsBsService { ...@@ -55,7 +55,7 @@ public interface GpsBsService {
* @param deviceCode * @param deviceCode
* @return * @return
*/ */
@GetMapping(value = "/single", consumes = MediaType.APPLICATION_JSON_VALUE) @GetMapping(value = "/single", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
R<GpsBsData> getLastGpsBsBySn(@RequestParam(value = "sn") String sn, @RequestParam(value = "deviceCode") String deviceCode); R<GpsBsData> getLastGpsBsBySn(@RequestParam(value = "sn") String sn, @RequestParam(value = "deviceCode") String deviceCode);
/** /**
...@@ -65,7 +65,7 @@ public interface GpsBsService { ...@@ -65,7 +65,7 @@ public interface GpsBsService {
* @param deviceCode * @param deviceCode
* @return * @return
*/ */
@GetMapping(value = "/single/history", consumes = MediaType.APPLICATION_JSON_VALUE) @GetMapping(value = "/single/history", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
R<List<GpsLocation>> getLastGpsBsHistoryBySn(@RequestParam(value = "sn") String sn, @RequestParam(value = "deviceCode") String deviceCode, R<List<GpsLocation>> getLastGpsBsHistoryBySn(@RequestParam(value = "sn") String sn, @RequestParam(value = "deviceCode") String deviceCode,
@RequestParam(value = "startTime") String startTime, @RequestParam(value = "endTime") String endTime); @RequestParam(value = "startTime") String startTime, @RequestParam(value = "endTime") String endTime);
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!