lighter 1 vuosi sitten
vanhempi
commit
dc29f20216

+ 1 - 1
src/main/java/thyyxxk/webserver/service/externalhttp/CorpWxSrvc.java

@@ -5,6 +5,6 @@ import com.dtflys.forest.annotation.Get;
 import com.dtflys.forest.annotation.Var;
 
 public interface CorpWxSrvc {
-    @Get(value = "https://qyapi.weixin.qq.com/cgi-bin/user/get?access_token={token}&userid={userid}", timeout = 3000)
+    @Get(value = "https://qyapi.weixin.qq.com/cgi-bin/user/get?access_token={token}&userid={userid}", timeout = 1500)
     JSONObject getUserinfo(@Var("token") String token, @Var("userid") String userid);
 }

+ 4 - 4
src/main/java/thyyxxk/webserver/service/externalhttp/WebSocketService.java

@@ -39,17 +39,17 @@ public interface WebSocketService {
     @Get("/isBeingEditing?documentId={documentId}")
     ResultVo<String> isBeingEditing(@Var("documentId") String documentId);
 
-    @Get("/textToSpeech?text={text}&id={id}")
+    @Get(value = "/textToSpeech?text={text}&id={id}", timeout = 5000)
     ResultVo<String> textToSpeech(@Var("text") String text, @Var("id") String id);
 
 
-    @Get("/getWeComAddressBookToken")
+    @Get(value = "/getWeComAddressBookToken", timeout = 1000)
     String getWeComAddressBookToken();
 
-    @Get("/getWeComClockInToken")
+    @Get(value = "/getWeComClockInToken", timeout = 1000)
     String getWeComClockInToken();
 
-    @Get("/getWeComSendMsgToken")
+    @Get(value = "/getWeComSendMsgToken", timeout = 1000)
     String getWeComSendMsgToken();
 
     @Get("/getWeComSendFileToken")

+ 10 - 1
src/main/java/thyyxxk/webserver/utils/DateUtil.java

@@ -25,11 +25,20 @@ public class DateUtil {
         return null == priceTime ? "" : priceTime.split("\\.")[0].replace("T", " ");
     }
 
+    public static String formatDate(Date date) {
+        if (null == date) {
+            return "";
+        }
+        SimpleDateFormat sdf = new SimpleDateFormat(DATE);
+        return sdf.format(date);
+    }
+
+
     public static String formatDatetime(Date date, String pattern) {
         if (null == date) {
             return "";
         }
-        SimpleDateFormat sdf = new SimpleDateFormat(pattern);
+        SimpleDateFormat sdf = new SimpleDateFormat(null == pattern ? DEFAULT_PATTERN : pattern);
         return sdf.format(date);
     }