From ab849f796bdc17236a95ea5fe5c166fb8f24a75c Mon Sep 17 00:00:00 2001
From: sws <15810472099@163.com>
Date: 星期六, 26 十一月 2022 16:12:02 +0800
Subject: [PATCH] 1

---
 src/main/java/com/lf/server/entity/other/FloatServerResponse.java |  107 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 107 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/lf/server/entity/other/FloatServerResponse.java b/src/main/java/com/lf/server/entity/other/FloatServerResponse.java
new file mode 100644
index 0000000..de5ed9d
--- /dev/null
+++ b/src/main/java/com/lf/server/entity/other/FloatServerResponse.java
@@ -0,0 +1,107 @@
+package com.lf.server.entity.other;
+
+import com.lf.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;
+    }
+}

--
Gitblit v1.9.3