no message
parent
3411639263
commit
7ef3763a14
|
|
@ -21,8 +21,6 @@ public abstract class AGxServerInfos {
|
|||
|
||||
LicenseCheck result = new LicenseCheck();
|
||||
try {
|
||||
result.setIpAddress(this.getIpAddress());
|
||||
result.setMacAddress(this.getMacAddress());
|
||||
result.setCpuSerial(this.getCPUSerial());
|
||||
result.setMainBoardSerial(this.getMainBoardSerial());
|
||||
}catch (Exception e){
|
||||
|
|
|
|||
|
|
@ -40,21 +40,9 @@ public class LicenseValidate {
|
|||
LicenseCheck key_price = JSONUtil.toBean(rsaResult, LicenseCheck.class);
|
||||
LicenseCheck system_price = getDeviceInfo();
|
||||
|
||||
boolean isEQ_ipAddress=Arrays.equals(key_price.getIpAddress().toArray(),system_price.getIpAddress().toArray());
|
||||
if(isEQ_ipAddress){
|
||||
log.error("IP匹配成功");
|
||||
}else{
|
||||
log.error("IP匹配失败");
|
||||
throw new BadRequestException("IP匹配失败");
|
||||
}
|
||||
|
||||
boolean isEQ_macAddress=Arrays.equals(key_price.getMacAddress().toArray(),system_price.getMacAddress().toArray());
|
||||
if(isEQ_macAddress){
|
||||
log.error("MAC匹配成功");
|
||||
}else{
|
||||
log.error("MAC匹配失败");
|
||||
throw new BadRequestException("MAC匹配失败");
|
||||
}
|
||||
|
||||
|
||||
if(key_price.getMainBoardSerial().equals(system_price.getMainBoardSerial())){
|
||||
log.error("主板匹配成功");
|
||||
}else{
|
||||
|
|
@ -103,21 +91,8 @@ public class LicenseValidate {
|
|||
LicenseCheck key_price = JSONUtil.toBean(rsaResult, LicenseCheck.class);
|
||||
LicenseCheck system_price = getDeviceInfo();
|
||||
|
||||
boolean isEQ_ipAddress=Arrays.equals(key_price.getIpAddress().toArray(),system_price.getIpAddress().toArray());
|
||||
if(isEQ_ipAddress){
|
||||
log.error("IP匹配成功");
|
||||
}else{
|
||||
log.error("IP匹配失败");
|
||||
throw new BadRequestException("IP匹配失败");
|
||||
}
|
||||
|
||||
boolean isEQ_macAddress=Arrays.equals(key_price.getMacAddress().toArray(),system_price.getMacAddress().toArray());
|
||||
if(isEQ_macAddress){
|
||||
log.error("MAC匹配成功");
|
||||
}else{
|
||||
log.error("MAC匹配失败");
|
||||
throw new BadRequestException("MAC匹配失败");
|
||||
}
|
||||
|
||||
if(key_price.getMainBoardSerial().equals(system_price.getMainBoardSerial())){
|
||||
log.error("主板匹配成功");
|
||||
}else{
|
||||
|
|
@ -162,21 +137,9 @@ public class LicenseValidate {
|
|||
LicenseCheck key_price = JSONUtil.toBean(rsaResult, LicenseCheck.class);
|
||||
LicenseCheck system_price = getDeviceInfo();
|
||||
|
||||
boolean isEQ_ipAddress=Arrays.equals(key_price.getIpAddress().toArray(),system_price.getIpAddress().toArray());
|
||||
if(isEQ_ipAddress){
|
||||
log.error("IP匹配成功");
|
||||
}else{
|
||||
log.error("IP匹配失败");
|
||||
throw new BadRequestException("IP匹配失败");
|
||||
}
|
||||
|
||||
boolean isEQ_macAddress=Arrays.equals(key_price.getMacAddress().toArray(),system_price.getMacAddress().toArray());
|
||||
if(isEQ_macAddress){
|
||||
log.error("MAC匹配成功");
|
||||
}else{
|
||||
log.error("MAC匹配失败");
|
||||
throw new BadRequestException("MAC匹配失败");
|
||||
}
|
||||
|
||||
|
||||
if(key_price.getMainBoardSerial().equals(system_price.getMainBoardSerial())){
|
||||
log.error("主板匹配成功");
|
||||
}else{
|
||||
|
|
|
|||
|
|
@ -5,14 +5,7 @@ import java.util.List;
|
|||
|
||||
public class LicenseCheck implements Serializable {
|
||||
|
||||
/**
|
||||
* 可被允许的IP地址
|
||||
*/
|
||||
private List<String> ipAddress;
|
||||
/**
|
||||
* 可被允许的mac地址
|
||||
*/
|
||||
private List<String> macAddress;
|
||||
|
||||
|
||||
/**
|
||||
* 可被允许的CPU序列号
|
||||
|
|
@ -39,20 +32,6 @@ public class LicenseCheck implements Serializable {
|
|||
|
||||
}
|
||||
|
||||
public List<String> getIpAddress() {
|
||||
return ipAddress;
|
||||
}
|
||||
public void setIpAddress(List<String> ipAddress) {
|
||||
this.ipAddress = ipAddress;
|
||||
}
|
||||
|
||||
public List<String> getMacAddress() {
|
||||
return macAddress;
|
||||
}
|
||||
|
||||
public void setMacAddress(List<String> macAddress) {
|
||||
this.macAddress = macAddress;
|
||||
}
|
||||
|
||||
public String getCpuSerial() {
|
||||
return cpuSerial;
|
||||
|
|
|
|||
Loading…
Reference in New Issue