mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-14 23:08:35 +08:00
优化登录认证逻辑
This commit is contained in:
@@ -138,14 +138,10 @@ public class LoginRequestHandler extends AbstractHandler{
|
|||||||
|
|
||||||
if (pileInfoVO != null) {
|
if (pileInfoVO != null) {
|
||||||
flag = Constants.zeroByteArray;
|
flag = Constants.zeroByteArray;
|
||||||
|
|
||||||
// 登录成功,保存桩号和channel的关系
|
// 登录成功,保存桩号和channel的关系
|
||||||
PileChannelEntity.put(pileSn, channel);
|
PileChannelEntity.put(pileSn, channel);
|
||||||
|
|
||||||
// 更改桩和该桩下的枪口状态分别为 在线、空闲 公共方法修改状态
|
// 更改桩和该桩下的枪口状态分别为 在线、空闲 公共方法修改状态
|
||||||
pileBasicInfoService.updateStatus(BytesUtil.bcd2Str(ykcDataProtocol.getFrameType()), pileSn, null, null, null);
|
pileBasicInfoService.updateStatus(BytesUtil.bcd2Str(ykcDataProtocol.getFrameType()), pileSn, null, null, null);
|
||||||
}
|
|
||||||
|
|
||||||
// 充电桩使用的sim卡,把信息存库
|
// 充电桩使用的sim卡,把信息存库
|
||||||
if (StringUtils.equals("00", internetConnection)) {
|
if (StringUtils.equals("00", internetConnection)) {
|
||||||
try {
|
try {
|
||||||
@@ -155,10 +151,6 @@ public class LoginRequestHandler extends AbstractHandler{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 保存报文
|
|
||||||
String jsonMsg = JSONObject.toJSONString(loginRequestData);
|
|
||||||
pileMsgRecordService.save(pileSn, pileSn, type, jsonMsg, ykcDataProtocol.getHEXString());
|
|
||||||
|
|
||||||
CompletableFuture.runAsync(() -> {
|
CompletableFuture.runAsync(() -> {
|
||||||
try {
|
try {
|
||||||
Thread.sleep(200);
|
Thread.sleep(200);
|
||||||
@@ -181,6 +173,11 @@ public class LoginRequestHandler extends AbstractHandler{
|
|||||||
IssueQRCodeCommand issueQRCodeCommand = IssueQRCodeCommand.builder().pileSn(pileSn).build();
|
IssueQRCodeCommand issueQRCodeCommand = IssueQRCodeCommand.builder().pileSn(pileSn).build();
|
||||||
ykcPushCommandService.pushIssueQRCodeCommand(issueQRCodeCommand);
|
ykcPushCommandService.pushIssueQRCodeCommand(issueQRCodeCommand);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 保存报文 TODO 没有登录认证通过还要不要保存报文?
|
||||||
|
String jsonMsg = JSONObject.toJSONString(loginRequestData);
|
||||||
|
pileMsgRecordService.save(pileSn, pileSn, type, jsonMsg, ykcDataProtocol.getHEXString());
|
||||||
|
|
||||||
// 消息体
|
// 消息体
|
||||||
byte[] messageBody = Bytes.concat(pileSnByte, flag);
|
byte[] messageBody = Bytes.concat(pileSnByte, flag);
|
||||||
|
|||||||
Reference in New Issue
Block a user