Commit 0f6ed450 by 黄小葱

增加consumes的类型

1 parent b1cd38ac
......@@ -16,7 +16,7 @@ import javax.validation.constraints.NotBlank;
*/
@FeignClient(
name = "${feign.devicemonitor.name}",
path = "${feign.devicemonitor.path}/device",
path = "${feign.devicemonitor.path}/api/device",
contextId = "feignApiDevice",
fallbackFactory = DeviceServiceFallbackFactory.class, decode404 = true)
public interface DeviceFeignService {
......@@ -27,7 +27,7 @@ public interface DeviceFeignService {
* @param sn
* @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);
/**
......@@ -37,7 +37,7 @@ public interface DeviceFeignService {
* @param offlineTime
* @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);
/**
......@@ -46,6 +46,6 @@ public interface DeviceFeignService {
* @param sn 设备号
* @return
*/
@GetMapping(value = "/getDevicesTotalCount", consumes = MediaType.APPLICATION_JSON_VALUE)
@GetMapping(value = "/getDevicesTotalCount")
R getDevicesTotalCount(@RequestParam(value = "sn") String sn);
}
......@@ -29,13 +29,13 @@ import java.util.List;
*/
@FeignClient(
name = "${feign.devicemonitor.name}",
path = "${feign.devicemonitor.path}/location",
path = "${feign.devicemonitor.path}/api/location",
contextId = "feignApiLocation",
fallbackFactory = GpsBsServiceFallbackFactory.class, decode404 = true)
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,
@NotBlank(message = "设备编码不能为空") @RequestParam(value = "deviceCode") String deviceCode);
......@@ -55,7 +55,7 @@ public interface GpsBsService {
* @param deviceCode
* @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);
/**
......@@ -65,7 +65,7 @@ public interface GpsBsService {
* @param deviceCode
* @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,
@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!