no message

main
768863620@qq.com 2024-05-22 17:13:58 +08:00
parent 3411639263
commit 7ef3763a14
3 changed files with 6 additions and 66 deletions

View File

@ -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){

View File

@ -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{

View File

@ -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;