Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
platform
/
platform-charging-server
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 8a4d8cfc
authored
Nov 15, 2023
by
zhouhaibao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]代码修复
1 parent
9b87d80a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
10 deletions
platform-charging-api/pom.xml
platform-charging-api/src/main/java/cn/com/glsx/charging/api/PileControlFeignClient.java
platform-charging/pom.xml
platform-charging/src/main/java/cn/com/glsx/charging/modules/api/PileControlApiController.java
platform-charging-api/pom.xml
View file @
8a4d8cf
...
...
@@ -22,11 +22,6 @@
<groupId>
com.glsx
</groupId>
<artifactId>
rest-admin-feign
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-loadbalancer
</artifactId>
<version>
3.1.0
</version>
</dependency>
</dependencies>
<build>
...
...
platform-charging-api/src/main/java/cn/com/glsx/charging/api/PileControlFeignClient.java
View file @
8a4d8cf
...
...
@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RequestParam;
/**
* @author payu
*/
@FeignClient
(
name
=
"platform-charging
-server"
,
contextId
=
"pilecontrol"
,
path
=
"/api/user
/"
,
decode404
=
true
)
@FeignClient
(
name
=
"platform-charging
"
,
contextId
=
"pilecontrol"
,
path
=
"/api/pilecontrol
/"
,
decode404
=
true
)
public
interface
PileControlFeignClient
{
/**
...
...
platform-charging/pom.xml
View file @
8a4d8cf
...
...
@@ -117,6 +117,11 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
io.github.openfeign
</groupId>
<artifactId>
feign-httpclient
</artifactId>
</dependency>
</dependencies>
<build>
...
...
platform-charging/src/main/java/cn/com/glsx/charging/modules/api/PileControlApiController.java
View file @
8a4d8cf
...
...
@@ -28,6 +28,7 @@ import javax.annotation.Resource;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -40,7 +41,7 @@ import org.springframework.web.bind.annotation.RestController;
@Slf4j
@Tag
(
name
=
"充电桩开放接口"
)
@RestController
@RequestMapping
(
value
=
"/pilecontro"
)
@RequestMapping
(
value
=
"/
api/
pilecontro"
)
@ResponseResultBody
public
class
PileControlApiController
implements
PileControlFeignClient
{
...
...
@@ -48,7 +49,7 @@ public class PileControlApiController implements PileControlFeignClient {
private
UserDemoService
userDemoService
;
@Override
public
Result
<
Boolean
>
start
(
StartBo
startBo
)
{
public
Result
<
Boolean
>
start
(
@RequestBody
StartBo
startBo
)
{
log
.
info
(
"启动充电桩请求入参{}"
,
JSONObject
.
toJSONString
(
startBo
));
StartMachineReq
req
=
new
StartMachineReq
();
StartMachineReqData
data
=
new
StartMachineReqData
();
...
...
@@ -71,7 +72,7 @@ public class PileControlApiController implements PileControlFeignClient {
}
@Override
public
Result
<
Boolean
>
end
(
EndBo
endBo
)
{
public
Result
<
Boolean
>
end
(
@RequestBody
EndBo
endBo
)
{
log
.
info
(
"停止充电桩请求入参{}"
,
JSONObject
.
toJSONString
(
endBo
));
ShutdownMachineReq
req
=
new
ShutdownMachineReq
();
ShutdownMachineReqData
data
=
new
ShutdownMachineReqData
();
...
...
@@ -84,7 +85,7 @@ public class PileControlApiController implements PileControlFeignClient {
}
@Override
public
Result
<
Boolean
>
pileStart
(
StartBo
startBo
)
{
public
Result
<
Boolean
>
pileStart
(
@RequestBody
StartBo
startBo
)
{
AdminSwipeConfirmRsp
rsp
=
new
AdminSwipeConfirmRsp
();
AdminSwipeConfirmRspData
data
=
new
AdminSwipeConfirmRspData
();
data
.
setPileId
(
Ocpp16Helper
.
strToBcd
(
startBo
.
getPileId
(),
data
.
getPileId
()));
...
...
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