Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-standard-interfaces-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit aa2cd838
authored
Mar 30, 2022
by
levphon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加consumes = MediaType.APPLICATION_JSON_VALUE,防止feign content-type传递
1 parent
39bfacf3
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
46 additions
and
36 deletions
src/main/java/cn/com/glsx/stdinterface/api/ChannelRiskClient.java
src/main/java/cn/com/glsx/stdinterface/api/DeviceLocationClient.java
src/main/java/cn/com/glsx/stdinterface/api/ElectricFenceClient.java
src/main/java/cn/com/glsx/stdinterface/api/ElectricInStoreClient.java
src/main/java/cn/com/glsx/stdinterface/api/FreqRecordClient.java
src/main/java/cn/com/glsx/stdinterface/api/RouteOilMileageClient.java
src/main/java/cn/com/glsx/stdinterface/api/StatisticsDriveClient.java
src/main/java/cn/com/glsx/stdinterface/api/StatisticsInStoreClient.java
src/main/java/cn/com/glsx/stdinterface/api/WorkOrderClient.java
src/main/java/cn/com/glsx/stdinterface/api/ChannelRiskClient.java
View file @
aa2cd83
...
...
@@ -4,6 +4,7 @@ import cn.com.glsx.stdinterface.dto.ChannelRiskDto;
import
cn.com.glsx.stdinterface.factory.ChannelRiskFallbackFactory
;
import
com.glsx.plat.core.web.R
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -16,12 +17,13 @@ import org.springframework.web.bind.annotation.RequestParam;
@FeignClient
(
name
=
"ne-shield-standard-interfaces"
,
path
=
"/nesi/channelrisk"
,
fallbackFactory
=
ChannelRiskFallbackFactory
.
class
,
decode404
=
true
)
public
interface
ChannelRiskClient
{
@GetMapping
(
value
=
"/selectbyworkstandsn"
)
@GetMapping
(
value
=
"/selectbyworkstandsn"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
R
selectByWorkStandSn
(
@RequestParam
(
value
=
"workorderNo"
)
String
workorderNo
,
@RequestParam
(
value
=
"vin"
)
String
vin
,
@RequestParam
(
value
=
"sn"
)
String
sn
);
@PostMapping
(
value
=
"/insertchannelriskdata"
)
@PostMapping
(
value
=
"/insertchannelriskdata"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
R
insertChannelRiskData
(
@RequestBody
ChannelRiskDto
newData
);
@PostMapping
(
value
=
"/updatechannelriskdata"
)
@PostMapping
(
value
=
"/updatechannelriskdata"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
R
updateChannelRiskData
(
@RequestBody
ChannelRiskDto
newData
);
}
src/main/java/cn/com/glsx/stdinterface/api/DeviceLocationClient.java
View file @
aa2cd83
...
...
@@ -5,10 +5,10 @@ import cn.com.glsx.stdinterface.dto.DeviceLocationDto;
import
cn.com.glsx.stdinterface.factory.DeviceLocationFallbackFactory
;
import
com.glsx.plat.core.web.R
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.http.MediaType
;
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.ResponseBody
;
import
java.util.Collection
;
import
java.util.List
;
...
...
@@ -27,21 +27,19 @@ public interface DeviceLocationClient {
* @param deviceLocationDtos 设备上点集合
* @return
*/
@PostMapping
(
value
=
"/dropLibrary"
)
@ResponseBody
@PostMapping
(
value
=
"/dropLibrary"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
R
dropLibrary
(
@RequestBody
Collection
<
DeviceLocationDto
>
deviceLocationDtos
);
/**
* 获取E盾中的所有设备号集合
*/
@GetMapping
(
value
=
"getAllSn"
)
@ResponseBody
@GetMapping
(
value
=
"getAllSn"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
R
<
List
<
String
>>
getAllSn
();
/**
* 获取E盾中的所有上点数据集合
*/
@GetMapping
(
value
=
"getAllDeviceLocationData"
)
@ResponseBody
@GetMapping
(
value
=
"getAllDeviceLocationData"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
R
<
List
<
DeviceLocationDto
>>
getAllDeviceLocationData
();
}
src/main/java/cn/com/glsx/stdinterface/api/ElectricFenceClient.java
View file @
aa2cd83
...
...
@@ -4,6 +4,7 @@ import cn.com.glsx.stdinterface.dto.ElectricFenceDto;
import
cn.com.glsx.stdinterface.factory.ElectricFenceFallbackFactory
;
import
com.glsx.plat.core.web.R
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -16,9 +17,9 @@ import org.springframework.web.bind.annotation.RequestParam;
@FeignClient
(
name
=
"ne-shield-standard-interfaces"
,
path
=
"/nesi/fencedriver"
,
fallbackFactory
=
ElectricFenceFallbackFactory
.
class
,
decode404
=
true
)
public
interface
ElectricFenceClient
{
@GetMapping
(
value
=
"/getfencedrive"
)
@GetMapping
(
value
=
"/getfencedrive"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
R
getFenceDrive
(
@RequestParam
Integer
fenceId
,
@RequestParam
String
sn
,
@RequestParam
String
journeyTime
);
@PostMapping
(
value
=
"/insertfencedrive"
)
@PostMapping
(
value
=
"/insertfencedrive"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
R
insertFenceDrive
(
@RequestBody
ElectricFenceDto
fenceDrive
);
}
src/main/java/cn/com/glsx/stdinterface/api/ElectricInStoreClient.java
View file @
aa2cd83
...
...
@@ -4,6 +4,7 @@ import cn.com.glsx.stdinterface.dto.ElectricInStoreDto;
import
cn.com.glsx.stdinterface.factory.ElectricInStoreFallbackFactory
;
import
com.glsx.plat.core.web.R
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -15,12 +16,12 @@ import org.springframework.web.bind.annotation.RequestParam;
@FeignClient
(
name
=
"ne-shield-standard-interfaces"
,
path
=
"/nesi/electricinstore"
,
fallbackFactory
=
ElectricInStoreFallbackFactory
.
class
,
decode404
=
true
)
public
interface
ElectricInStoreClient
{
@GetMapping
(
value
=
"/getelectricinstore"
)
@GetMapping
(
value
=
"/getelectricinstore"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
R
getElectricInStore
(
@RequestParam
Integer
fenceId
,
@RequestParam
String
sn
,
@RequestParam
String
gpsTime
);
@PostMapping
(
value
=
"/insertelectricinstore"
)
@PostMapping
(
value
=
"/insertelectricinstore"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
R
insertElectricInStore
(
@RequestBody
ElectricInStoreDto
electricInStoreDrive
);
@GetMapping
(
value
=
"/calculateInStoreDateEveryDay"
)
@GetMapping
(
value
=
"/calculateInStoreDateEveryDay"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
R
calculateInStoreDateEveryDay
();
}
src/main/java/cn/com/glsx/stdinterface/api/FreqRecordClient.java
View file @
aa2cd83
...
...
@@ -4,6 +4,7 @@ import cn.com.glsx.stdinterface.dto.FreqRecordDto;
import
cn.com.glsx.stdinterface.factory.FreqRecordFallbackFactory
;
import
com.glsx.plat.core.web.R
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -20,7 +21,7 @@ public interface FreqRecordClient {
*
* @return R
*/
@GetMapping
(
value
=
"/gethisbysnandseq"
)
@GetMapping
(
value
=
"/gethisbysnandseq"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
R
getHisBySnAndSeq
(
@RequestParam
String
sn
,
@RequestParam
int
seq
);
/**
...
...
@@ -29,7 +30,7 @@ public interface FreqRecordClient {
* @param freqRecordDto
* @return
*/
@PostMapping
(
value
=
"/insertfreqrecord"
)
@PostMapping
(
value
=
"/insertfreqrecord"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
R
insertFreqRecord
(
@RequestBody
FreqRecordDto
freqRecordDto
);
/**
...
...
@@ -38,6 +39,6 @@ public interface FreqRecordClient {
* @param freqRecordDto
* @return
*/
@PostMapping
(
value
=
"/updatefreqrecord"
)
@PostMapping
(
value
=
"/updatefreqrecord"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
R
updateFreqRecord
(
@RequestBody
FreqRecordDto
freqRecordDto
);
}
src/main/java/cn/com/glsx/stdinterface/api/RouteOilMileageClient.java
View file @
aa2cd83
...
...
@@ -4,6 +4,7 @@ import cn.com.glsx.stdinterface.dto.RouteOilMileageDto;
import
cn.com.glsx.stdinterface.factory.StatisticsDriveFallbackFactory
;
import
com.glsx.plat.core.web.R
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -23,9 +24,10 @@ public interface RouteOilMileageClient {
* @param endTime
* @return
*/
@GetMapping
(
value
=
"/getListBySn"
)
@GetMapping
(
value
=
"/getListBySn"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
R
<
List
<
RouteOilMileageDto
>>
getListBySn
(
@RequestParam
String
sn
,
@RequestParam
(
required
=
false
)
String
beginTime
,
@RequestParam
(
required
=
false
)
String
endTime
);
@RequestParam
(
required
=
false
)
String
beginTime
,
@RequestParam
(
required
=
false
)
String
endTime
);
/**
* 插入行程
...
...
@@ -33,7 +35,7 @@ public interface RouteOilMileageClient {
* @param routeOilMileageDto
* @return
*/
@PostMapping
(
value
=
"/insert"
)
@PostMapping
(
value
=
"/insert"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
R
<
Integer
>
insert
(
@RequestBody
RouteOilMileageDto
routeOilMileageDto
);
/**
...
...
@@ -42,7 +44,7 @@ public interface RouteOilMileageClient {
* @param collection
* @return
*/
@PostMapping
(
value
=
"/storeIgnoreExists"
)
@PostMapping
(
value
=
"/storeIgnoreExists"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
R
<
Integer
>
storeIgnoreExists
(
@RequestBody
Collection
<
RouteOilMileageDto
>
collection
);
}
src/main/java/cn/com/glsx/stdinterface/api/StatisticsDriveClient.java
View file @
aa2cd83
...
...
@@ -4,6 +4,7 @@ import cn.com.glsx.stdinterface.dto.StatisticsDriveDto;
import
cn.com.glsx.stdinterface.factory.StatisticsDriveFallbackFactory
;
import
com.glsx.plat.core.web.R
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -21,7 +22,7 @@ public interface StatisticsDriveClient {
*
* @return R
*/
@GetMapping
(
value
=
"/drivedatalist"
)
@GetMapping
(
value
=
"/drivedatalist"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
R
statisticsDriveDataEveryDay
();
/**
...
...
@@ -30,9 +31,9 @@ public interface StatisticsDriveClient {
* @param statisticsDriveDtoList
* @return R
*/
@PostMapping
(
value
=
"/insertstatisticsdrivelist"
)
@PostMapping
(
value
=
"/insertstatisticsdrivelist"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
R
insertStatisticsDriveList
(
@RequestBody
List
<
StatisticsDriveDto
>
statisticsDriveDtoList
);
@GetMapping
(
value
=
"/statisticsandinsertdrivedatalist"
)
@GetMapping
(
value
=
"/statisticsandinsertdrivedatalist"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
R
statisticsAndInsertDriveDataEveryDay
();
}
src/main/java/cn/com/glsx/stdinterface/api/StatisticsInStoreClient.java
View file @
aa2cd83
...
...
@@ -3,6 +3,7 @@ package cn.com.glsx.stdinterface.api;
import
cn.com.glsx.stdinterface.factory.StatisticsInStoreFallbackFactory
;
import
com.glsx.plat.core.web.R
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.GetMapping
;
/**
...
...
@@ -17,6 +18,7 @@ public interface StatisticsInStoreClient {
*
* @return R
*/
@GetMapping
(
value
=
"/statisticsandinsertinstoredatalist"
)
@GetMapping
(
value
=
"/statisticsandinsertinstoredatalist"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
R
<
Integer
>
statisticsAndInsertInStoreDataEveryDay
();
}
src/main/java/cn/com/glsx/stdinterface/api/WorkOrderClient.java
View file @
aa2cd83
...
...
@@ -4,6 +4,7 @@ import cn.com.glsx.stdinterface.dto.*;
import
cn.com.glsx.stdinterface.factory.StatisticsInStoreFallbackFactory
;
import
com.glsx.plat.core.web.R
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -18,7 +19,7 @@ public interface WorkOrderClient {
* @param workOrderBO
* @return
*/
@PostMapping
(
value
=
"/create"
)
@PostMapping
(
value
=
"/create"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
public
R
<
List
<
String
>>
create
(
@RequestBody
InstallWorkOrderBO
workOrderBO
);
/**
...
...
@@ -27,7 +28,7 @@ public interface WorkOrderClient {
* @param workOrderBO
* @return
*/
@PostMapping
(
value
=
"/update"
)
@PostMapping
(
value
=
"/update"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
public
R
update
(
@RequestBody
InstallWorkOrderBO
workOrderBO
);
/**
...
...
@@ -36,7 +37,7 @@ public interface WorkOrderClient {
* @param request
* @return
*/
@PostMapping
(
value
=
"/cancel"
)
@PostMapping
(
value
=
"/cancel"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
public
R
cancel
(
@RequestBody
CancelWorkOrderBO
request
);
/**
...
...
@@ -45,7 +46,7 @@ public interface WorkOrderClient {
* @param request
* @return
*/
@PostMapping
(
value
=
"/repair"
)
@PostMapping
(
value
=
"/repair"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
public
R
repair
(
@RequestBody
RepairWorkOrderBO
request
);
/**
...
...
@@ -54,7 +55,7 @@ public interface WorkOrderClient {
* @param workOrderBO
* @return
*/
@PostMapping
(
value
=
"/remove"
)
@PostMapping
(
value
=
"/remove"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
public
R
remove
(
@RequestBody
RemoveWorkOrderBO
workOrderBO
);
/**
...
...
@@ -63,7 +64,7 @@ public interface WorkOrderClient {
* @param verifyBO
* @return
*/
@PostMapping
(
value
=
"/verify"
)
@PostMapping
(
value
=
"/verify"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
public
R
verify
(
@RequestBody
WorkOrderVerifyBO
verifyBO
);
/**
...
...
@@ -72,7 +73,7 @@ public interface WorkOrderClient {
* @param activateBO
* @return
*/
@PostMapping
(
value
=
"/activate"
)
@PostMapping
(
value
=
"/activate"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
public
R
<
WorkOrderActivatedVehicleInfoDTO
>
activate
(
@RequestBody
WorkOrderActivateBO
activateBO
);
/**
...
...
@@ -81,7 +82,7 @@ public interface WorkOrderClient {
* @param auditBO
* @return
*/
@PostMapping
(
value
=
"/audit"
)
@PostMapping
(
value
=
"/audit"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
public
R
audit
(
@RequestBody
WorkOrderActivateBO
auditBO
);
/**
...
...
@@ -90,7 +91,7 @@ public interface WorkOrderClient {
* @param verifyBO
* @return
*/
@PostMapping
(
value
=
"/addrVerify"
)
@PostMapping
(
value
=
"/addrVerify"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
public
R
<
WorkOrderAddrVerifyDTO
>
addrVerify
(
@RequestBody
WorkOrderAddrVerifyBO
verifyBO
);
/**
...
...
@@ -99,6 +100,7 @@ public interface WorkOrderClient {
* @param updateImageBO 更新图片数据
* @return
*/
@PostMapping
(
value
=
"/updateImage"
)
@PostMapping
(
value
=
"/updateImage"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
public
R
updateImage
(
@RequestBody
UpdateImageBO
updateImageBO
);
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment