package com.moon.server.entity.other;
|
|
import com.moon.server.helper.StringHelper;
|
|
import java.util.Calendar;
|
|
/**
|
* FloatServerResponse
|
* @author WWW
|
*/
|
public class FloatServerResponse {
|
private String modules;
|
|
private String id;
|
|
private String expireDate;
|
|
private int processNum;
|
|
private long time;
|
|
private int availableNum;
|
|
private String licenseCode;
|
|
private String localId;
|
|
public FloatServerResponse() {
|
}
|
|
public FloatServerResponse(ReqParamFloatServer rfs) {
|
Calendar calendar = Calendar.getInstance();
|
calendar.set(Calendar.YEAR, 2025);
|
|
this.id = rfs.getId();
|
this.localId = rfs.getLocalId();
|
this.availableNum = rfs.getAvailableNum();
|
this.time = calendar.getTimeInMillis();
|
this.expireDate = StringHelper.YMD_FORMAT.format(this.time);
|
//this.licenseCode = "78a82f0920de0f557f8177bec1e48601c4dc25e4054a00728e4314b56528d3a1632de5298edee38a65412277977a174fea5d91c452b19ef138dbc2ba089ba632";
|
this.licenseCode = CheckOutLicense.createFloatingLicense(rfs.getAvailableNum(), rfs.getId(), this.time);
|
}
|
|
public String getModules() {
|
return this.modules;
|
}
|
|
public void setModules(final String modules) {
|
this.modules = modules;
|
}
|
|
public String getId() {
|
return this.id;
|
}
|
|
public void setId(final String id) {
|
this.id = id;
|
}
|
|
public String getExpireDate() {
|
return this.expireDate;
|
}
|
|
public void setExpireDate(final String expireDate) {
|
this.expireDate = expireDate;
|
}
|
|
public int getProcessNum() {
|
return this.processNum;
|
}
|
|
public void setProcessNum(final int processNum) {
|
this.processNum = processNum;
|
}
|
|
public int getAvailableNum() {
|
return this.availableNum;
|
}
|
|
public void setAvailableNum(final int availableNum) {
|
this.availableNum = availableNum;
|
}
|
|
public long getTime() {
|
return this.time;
|
}
|
|
public void setTime(final long time) {
|
this.time = time;
|
}
|
|
public String getLicenseCode() {
|
return this.licenseCode;
|
}
|
|
public void setLicenseCode(final String licenseCode) {
|
this.licenseCode = licenseCode;
|
}
|
|
public String getLocalId() {
|
return localId;
|
}
|
|
public void setLocalId(String localId) {
|
this.localId = localId;
|
}
|
}
|