mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-08 20:10:16 +08:00
uploadFirmware 上传固件接口
This commit is contained in:
@@ -190,4 +190,6 @@ aMap:
|
|||||||
# 远程升级服务器信息
|
# 远程升级服务器信息
|
||||||
remoteUpdate:
|
remoteUpdate:
|
||||||
server: http://apitest.jsowellcloud.com
|
server: http://apitest.jsowellcloud.com
|
||||||
port: 21
|
port: 21
|
||||||
|
username: jsowellftp
|
||||||
|
password: ZzJeZRB6fDRcnfkz
|
||||||
@@ -186,4 +186,6 @@ aMap:
|
|||||||
# 远程升级服务器信息
|
# 远程升级服务器信息
|
||||||
remoteUpdate:
|
remoteUpdate:
|
||||||
server: http://apitest.jsowellcloud.com
|
server: http://apitest.jsowellcloud.com
|
||||||
port: 21
|
port: 21
|
||||||
|
username: jsowellftpprd
|
||||||
|
password: ADHJAYinpXEctwDA
|
||||||
@@ -186,4 +186,6 @@ aMap:
|
|||||||
# 远程升级服务器信息
|
# 远程升级服务器信息
|
||||||
remoteUpdate:
|
remoteUpdate:
|
||||||
server: http://apitest.jsowellcloud.com
|
server: http://apitest.jsowellcloud.com
|
||||||
port: 21
|
port: 21
|
||||||
|
username: jsowellftpprd
|
||||||
|
password: ADHJAYinpXEctwDA
|
||||||
@@ -191,4 +191,6 @@ aMap:
|
|||||||
# 远程升级服务器信息
|
# 远程升级服务器信息
|
||||||
remoteUpdate:
|
remoteUpdate:
|
||||||
server: http://apitest.jsowellcloud.com
|
server: http://apitest.jsowellcloud.com
|
||||||
port: 21
|
port: 21
|
||||||
|
username: jsowellftp
|
||||||
|
password: ZzJeZRB6fDRcnfkz
|
||||||
@@ -20,6 +20,12 @@ public class UpdateFirmwareCommand {
|
|||||||
// 远程更新服务器端口
|
// 远程更新服务器端口
|
||||||
private int port;
|
private int port;
|
||||||
|
|
||||||
|
// 远程更新 ftp用户名
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
// 远程更新 ftp密码
|
||||||
|
private String password;
|
||||||
|
|
||||||
// 文件路径
|
// 文件路径
|
||||||
private String filePath;
|
private String filePath;
|
||||||
|
|
||||||
|
|||||||
@@ -49,6 +49,13 @@ public class PileRemoteService {
|
|||||||
|
|
||||||
@Value("${remoteUpdate.port}")
|
@Value("${remoteUpdate.port}")
|
||||||
private int port;
|
private int port;
|
||||||
|
|
||||||
|
@Value("${remoteUpdate.username}")
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
@Value("${remoteUpdate.password}")
|
||||||
|
private String password;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取充电桩实时数据信息
|
* 获取充电桩实时数据信息
|
||||||
*
|
*
|
||||||
@@ -215,6 +222,8 @@ public class PileRemoteService {
|
|||||||
.pileSnList(dto.getPileSns())
|
.pileSnList(dto.getPileSns())
|
||||||
.serverAddress(serverAddress)
|
.serverAddress(serverAddress)
|
||||||
.port(port)
|
.port(port)
|
||||||
|
.username(username)
|
||||||
|
.password(password)
|
||||||
.filePath(pileFirmwareInfo.getFilePath())
|
.filePath(pileFirmwareInfo.getFilePath())
|
||||||
.build();
|
.build();
|
||||||
ykcPushCommandService.pushUpdateFileCommand(command);
|
ykcPushCommandService.pushUpdateFileCommand(command);
|
||||||
|
|||||||
@@ -341,10 +341,10 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService {
|
|||||||
byte[] updateServerPortByteArr = BytesUtil.checkLengthAndBehindAppendZero(BytesUtil.hexString2Bytes(Integer.toHexString(command.getPort())), 4);
|
byte[] updateServerPortByteArr = BytesUtil.checkLengthAndBehindAppendZero(BytesUtil.hexString2Bytes(Integer.toHexString(command.getPort())), 4);
|
||||||
|
|
||||||
// 用户名
|
// 用户名
|
||||||
byte[] userNameByteArr = BytesUtil.checkLengthAndBehindAppendZero(BytesUtil.str2Asc(Constants.updateServerUserName2), 32);
|
byte[] userNameByteArr = BytesUtil.checkLengthAndBehindAppendZero(BytesUtil.str2Asc(command.getUsername()), 32);
|
||||||
|
|
||||||
// 密码
|
// 密码
|
||||||
byte[] passwordByteArr = BytesUtil.checkLengthAndBehindAppendZero(BytesUtil.str2Asc(Constants.updateServerPassword2), 32);
|
byte[] passwordByteArr = BytesUtil.checkLengthAndBehindAppendZero(BytesUtil.str2Asc(command.getPassword()), 32);
|
||||||
|
|
||||||
// 文件路径
|
// 文件路径
|
||||||
byte[] filePathByteArr = BytesUtil.checkLengthAndBehindAppendZero(BytesUtil.str2Asc(command.getFilePath()), 64);
|
byte[] filePathByteArr = BytesUtil.checkLengthAndBehindAppendZero(BytesUtil.str2Asc(command.getFilePath()), 64);
|
||||||
|
|||||||
Reference in New Issue
Block a user