Browse Source

upgrade feat (#9949)

* 适配最新版

* upgrade smart-socket

* upgrade smart-socket

* upgrade smart-socket

* upgrade smart-socket

* upgrade feat

* upgrade feat

* upgrade feat

* upgrade feat

* upgrade feat
三刀 2 months ago
parent
commit
d68cba9c53

+ 2 - 2
frameworks/Java/smart-socket/src/main/java/org/smartboot/http/MultipleQueriesHandler.java

@@ -1,7 +1,7 @@
 package org.smartboot.http;
 
 
-import tech.smartboot.feat.core.common.utils.NumberUtils;
+import tech.smartboot.feat.core.common.FeatUtils;
 import tech.smartboot.feat.core.server.HttpHandler;
 import tech.smartboot.feat.core.server.HttpRequest;
 import tech.smartboot.feat.core.server.HttpResponse;
@@ -31,7 +31,7 @@ public class MultipleQueriesHandler implements HttpHandler {
         HttpResponse response = httpRequest.getResponse();
         Thread.startVirtualThread(() -> {
             try {
-                int queries = Math.min(Math.max(NumberUtils.toInt(httpRequest.getParameter("queries"), 1), 1), 500);
+                int queries = Math.min(Math.max(FeatUtils.toInt(httpRequest.getParameter("queries"), 1), 1), 500);
                 World[] worlds = new World[queries];
                 try (Connection connection = dataSource.getConnection();
                      PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM World WHERE id=?");) {

+ 2 - 2
frameworks/Java/smart-socket/src/main/java/org/smartboot/http/UpdateHandler.java

@@ -1,7 +1,7 @@
 package org.smartboot.http;
 
 
-import tech.smartboot.feat.core.common.utils.NumberUtils;
+import tech.smartboot.feat.core.common.FeatUtils;
 import tech.smartboot.feat.core.server.HttpHandler;
 import tech.smartboot.feat.core.server.HttpRequest;
 import tech.smartboot.feat.core.server.HttpResponse;
@@ -29,7 +29,7 @@ public class UpdateHandler implements HttpHandler {
     @Override
     public void handle(HttpRequest request) throws IOException {
         HttpResponse response = request.getResponse();
-        int queries = Math.min(Math.max(NumberUtils.toInt(request.getParameter("queries"), 1), 1), 500);
+        int queries = Math.min(Math.max(FeatUtils.toInt(request.getParameter("queries"), 1), 1), 500);
         World[] worlds = new World[queries];
         StringJoiner updateSql = new StringJoiner(
                 ", ",