Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
platform
/
platform-evbusiness-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 b08b7e21
authored
Nov 20, 2023
by
林永健
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复bug
1 parent
9ea9c216
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
2 deletions
platform-evbusiness/src/main/java/cn/com/glsx/evbusiness/modules/mq/consumer/HeartBeatQueen.java
platform-evbusiness/src/main/java/cn/com/glsx/evbusiness/modules/mq/consumer/LoginQueen.java
platform-evbusiness/src/main/java/cn/com/glsx/evbusiness/modules/service/ChargingGunService.java
platform-evbusiness/src/main/java/cn/com/glsx/evbusiness/modules/service/ChargingPileService.java
platform-evbusiness/src/main/java/cn/com/glsx/evbusiness/modules/mq/consumer/HeartBeatQueen.java
View file @
b08b7e2
...
...
@@ -35,9 +35,7 @@ public class HeartBeatQueen {
throw
new
RuntimeException
(
"data is empty or parse fail, raw data is: "
+
JSON
.
toJSONString
(
jsonDataStr
));
}
// Date receiveTime = message.getMessageProperties().getTimestamp();
gunService
.
handleHeartbeat
(
data
);
log
.
debug
(
"接收到心跳包, message: {}"
,
data
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
platform-evbusiness/src/main/java/cn/com/glsx/evbusiness/modules/mq/consumer/LoginQueen.java
View file @
b08b7e2
...
...
@@ -35,6 +35,7 @@ public class LoginQueen {
throw
new
RuntimeException
(
"data is empty or parse fail, raw data is: "
+
JSON
.
toJSONString
(
jsonDataStr
));
}
// Date receiveTime = message.getMessageProperties().getTimestamp();
pileService
.
handleLogin
(
data
);
log
.
debug
(
"登录认证处理成功, message: {}"
,
data
);
...
...
platform-evbusiness/src/main/java/cn/com/glsx/evbusiness/modules/service/ChargingGunService.java
View file @
b08b7e2
...
...
@@ -9,6 +9,7 @@ import cn.com.glsx.evbusiness.modules.model.request.ChargingGunSearch;
import
cn.com.glsx.evbusiness.modules.model.response.ChargingGunResponse
;
import
cn.com.glsx.evbusiness.modules.model.response.ChargingPileResponse
;
import
cn.com.glsx.evbusiness.utils.CopyUtils
;
import
com.alibaba.fastjson.JSON
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -105,6 +106,9 @@ public class ChargingGunService {
}
public
void
saveOrUpdate
(
ChargingGun
entity
)
{
if
(!
StringUtils
.
hasLength
(
entity
.
getGunNumber
())
||
!
StringUtils
.
hasLength
(
entity
.
getPileId
())){
throw
new
RuntimeException
(
"参数异常, data: "
+
JSON
.
toJSONString
(
entity
));
}
// 来自设备端同步的设备,并无业务属性name,需要构建
entity
.
setName
(
StringUtils
.
hasLength
(
entity
.
getName
())
?
entity
.
getName
()
:
entity
.
getPileId
()
+
entity
.
getGunNumber
());
if
(
Objects
.
isNull
(
entity
.
getId
()))
{
...
...
platform-evbusiness/src/main/java/cn/com/glsx/evbusiness/modules/service/ChargingPileService.java
View file @
b08b7e2
...
...
@@ -6,6 +6,7 @@ import cn.com.glsx.evbusiness.modules.mapper.ChargingPileMapper;
import
cn.com.glsx.evbusiness.modules.model.ocpp16.LoginUploadData
;
import
cn.com.glsx.evbusiness.modules.model.response.ChargingPileResponse
;
import
cn.com.glsx.evbusiness.utils.CopyUtils
;
import
com.alibaba.fastjson.JSON
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -45,6 +46,9 @@ public class ChargingPileService {
}
public
void
saveOrUpdate
(
ChargingPile
entity
)
{
if
(!
StringUtils
.
hasLength
(
entity
.
getPileId
())){
throw
new
RuntimeException
(
"参数异常, data: "
+
JSON
.
toJSONString
(
entity
));
}
// 来自设备端同步的设备,并无业务属性name,需要构建
entity
.
setName
(
StringUtils
.
hasLength
(
entity
.
getName
())
?
entity
.
getName
()
:
entity
.
getPileId
());
if
(
Objects
.
isNull
(
entity
.
getId
()))
{
...
...
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