mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
uploadFirmware 上传固件接口
This commit is contained in:
@@ -2,6 +2,7 @@ package com.jsowell.pile.service;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.jsowell.common.constant.CacheConstants;
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.core.redis.RedisCache;
|
||||
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
@@ -223,7 +224,8 @@ public class PileRemoteService {
|
||||
|
||||
String ip;
|
||||
try {
|
||||
ip = InetAddress.getByName(serverAddress).getHostAddress();
|
||||
String server = StringUtils.removeHttp(serverAddress);
|
||||
ip = InetAddress.getByName(server).getHostAddress();
|
||||
} catch (UnknownHostException e) {
|
||||
throw new BusinessException("", "无法解析出IP");
|
||||
}
|
||||
@@ -238,6 +240,32 @@ public class PileRemoteService {
|
||||
ykcPushCommandService.pushUpdateFileCommand(command);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
//获取百度IP地址
|
||||
try {
|
||||
System.out.println("www.baidu.com的地址: "+InetAddress.getByName("www.baidu.com").getHostAddress());
|
||||
} catch (UnknownHostException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
//获取百度IP地址
|
||||
try {
|
||||
System.out.println("jsowell的地址: "+InetAddress.getByName("apitest.jsowellcloud.com").getHostAddress());
|
||||
} catch (UnknownHostException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
String serverAddress = "http://apitest.jsowellcloud.com";
|
||||
String ip;
|
||||
try {
|
||||
String server = StringUtils.removeHttp(serverAddress);;
|
||||
ip = InetAddress.getByName(server).getHostAddress();
|
||||
} catch (UnknownHostException e) {
|
||||
throw new BusinessException("", "无法解析出IP");
|
||||
}
|
||||
System.out.println("=====" + ip);
|
||||
}
|
||||
|
||||
/**
|
||||
* 远程账户余额更新
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user