From 17d950682cc0c09c3ae3681459253c9e1d4d7794 Mon Sep 17 00:00:00 2001
From: ‘liusuyi’ <1951119284@qq.com>
Date: 星期一, 07 八月 2023 17:01:21 +0800
Subject: [PATCH] 优化
---
ard-work/src/main/java/com/ruoyi/rongcloud/service/Impl/RongCloudServiceImpl.java | 14 +++++---------
/dev/null | 13 -------------
ard-work/src/main/java/com/ruoyi/rongcloud/service/RongCloudService.java | 2 +-
ard-work/src/main/java/com/ruoyi/app/position/controller/ArdAppPositionController.java | 2 +-
ard-work/src/main/java/com/ruoyi/utils/forest/RongCloudClient.java | 4 ++--
ard-work/src/main/java/com/ruoyi/alarm/global/service/impl/GlobalAlarmServiceImpl.java | 2 +-
ruoyi-admin/src/main/resources/logback.xml | 12 ++++++------
7 files changed, 16 insertions(+), 33 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/alarm/global/service/impl/GlobalAlarmServiceImpl.java b/ard-work/src/main/java/com/ruoyi/alarm/global/service/impl/GlobalAlarmServiceImpl.java
index fec6e6f..94c327e 100644
--- a/ard-work/src/main/java/com/ruoyi/alarm/global/service/impl/GlobalAlarmServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/alarm/global/service/impl/GlobalAlarmServiceImpl.java
@@ -583,7 +583,7 @@
// 缁撴潫鏃堕棿
long etime = System.currentTimeMillis();
// 璁$畻鎵ц鏃堕棿
- log.info("闆疯揪鎶ヨ澶勭悊鏃堕暱锛�" + (etime - stime) + "姣");
+ log.debug("闆疯揪鎶ヨ澶勭悊鏃堕暱锛�" + (etime - stime) + "姣");
}
//endregion
diff --git a/ard-work/src/main/java/com/ruoyi/app/position/controller/ArdAppPositionController.java b/ard-work/src/main/java/com/ruoyi/app/position/controller/ArdAppPositionController.java
index 03b7a05..1abb135 100644
--- a/ard-work/src/main/java/com/ruoyi/app/position/controller/ArdAppPositionController.java
+++ b/ard-work/src/main/java/com/ruoyi/app/position/controller/ArdAppPositionController.java
@@ -201,7 +201,7 @@
@ApiOperation("涓婁紶鏂囦欢")
public AjaxResult uploadFile(MultipartFile file,String type)
{
- String url = MinioUtils.putObjectAndGetUrl("app1",type, file);
+ String url = MinioUtils.putObjectAndGetUrl("app",type, file);
return AjaxResult.success(url);
}
}
diff --git a/ard-work/src/main/java/com/ruoyi/rongcloud/service/Impl/RongCloudServiceImpl.java b/ard-work/src/main/java/com/ruoyi/rongcloud/service/Impl/RongCloudServiceImpl.java
index 1666afa..104ad6e 100644
--- a/ard-work/src/main/java/com/ruoyi/rongcloud/service/Impl/RongCloudServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/rongcloud/service/Impl/RongCloudServiceImpl.java
@@ -46,7 +46,7 @@
RongCloudParam param = new RongCloudParam();
param.setUserId(userId);
param.setName(name);
- Map map = rongCloudClient.getToken(getRongCloudHead(), param);
+ Map<String,Object> map = rongCloudClient.getToken(getRongCloudHead(), param);
token = (String) map.get("token");
log.debug("鐢ㄦ埛" + userId + "鑾峰彇鍒拌瀺浜憈oken:" + token);
} catch (Exception ex) {
@@ -56,12 +56,12 @@
}
@Override
- public Map checkOnline(List<String> userIds) {
+ public Map<String,Object> checkOnline(List<String> userIds) {
Map<String, Object> onlineMap = new HashMap<>();
for (String userId : userIds) {
RongCloudParam param = new RongCloudParam();
param.setUserId(userId);
- Map isOnline = rongCloudClient.checkOnline(getRongCloudHead(), param);
+ Map<String,Object> isOnline = rongCloudClient.checkOnline(getRongCloudHead(), param);
onlineMap.put(userId, isOnline.get("status"));
}
return onlineMap;
@@ -71,12 +71,8 @@
public Boolean checkOnline(String userId) {
RongCloudParam param = new RongCloudParam();
param.setUserId(userId);
- Map isOnline = rongCloudClient.checkOnline(getRongCloudHead(), param);
- if (isOnline.get("status").equals("1")) {
- return true;
- } else {
- return false;
- }
+ Map<String,Object> isOnline = rongCloudClient.checkOnline(getRongCloudHead(), param);
+ return isOnline.get("status").equals("1");
}
/**
diff --git a/ard-work/src/main/java/com/ruoyi/rongcloud/service/RongCloudService.java b/ard-work/src/main/java/com/ruoyi/rongcloud/service/RongCloudService.java
index 3d40277..91a13da 100644
--- a/ard-work/src/main/java/com/ruoyi/rongcloud/service/RongCloudService.java
+++ b/ard-work/src/main/java/com/ruoyi/rongcloud/service/RongCloudService.java
@@ -13,6 +13,6 @@
public interface RongCloudService {
String getToken(String userId,String name);
- Map checkOnline(List<String>userIds);
+ Map<String,Object> checkOnline(List<String>userIds);
Boolean checkOnline(String userId);
}
diff --git a/ard-work/src/main/java/com/ruoyi/utils/forest/RongCloudClient.java b/ard-work/src/main/java/com/ruoyi/utils/forest/RongCloudClient.java
index f3c3207..950f004 100644
--- a/ard-work/src/main/java/com/ruoyi/utils/forest/RongCloudClient.java
+++ b/ard-work/src/main/java/com/ruoyi/utils/forest/RongCloudClient.java
@@ -13,8 +13,8 @@
public interface RongCloudClient {
@Post(url = "/user/getToken.json")
- Map getToken(@Header Map<String, Object> headerMap, @Body RongCloudParam param);
+ Map<String,Object> getToken(@Header Map<String, Object> headerMap, @Body RongCloudParam param);
@Post(url = "user/checkOnline.json")
- Map checkOnline(@Header Map<String, Object> headerMap, @Body RongCloudParam param);
+ Map<String,Object> checkOnline(@Header Map<String, Object> headerMap, @Body RongCloudParam param);
}
diff --git a/ruoyi-admin/src/main/resources/logback.xml b/ruoyi-admin/src/main/resources/logback.xml
index 55a35f3..451aed7 100644
--- a/ruoyi-admin/src/main/resources/logback.xml
+++ b/ruoyi-admin/src/main/resources/logback.xml
@@ -214,7 +214,7 @@
<logger name="com.ruoyi" level="info"/>
<!-- Spring鏃ュ織绾у埆鎺у埗 -->
<logger name="org.springframework" level="warn"/>
-
+ <!--鎺у埗鍙版棩蹇楃骇鍒帶鍒�-->
<root level="debug">
<appender-ref ref="console"/>
</root>
@@ -245,11 +245,11 @@
<appender-ref ref="stealAlarm"/>
</logger>
<!--websocket鏃ュ織鎵撳嵃绛夌骇-->
- <logger name="websocket" level="DEBUG">
+ <logger name="websocket" level="INFO">
<appender-ref ref="websocket"/>
</logger>
<!--鍏夌數宸℃鏃ュ織鎵撳嵃绛夌骇-->
- <logger name="PatrolInspectionTask" level="DEBUG">
+ <logger name="PatrolInspectionTask" level="INFO">
<appender-ref ref="PatrolInspectionTask"/>
</logger>
<!--mqtt鏃ュ織鎵撳嵃绛夌骇-->
@@ -257,7 +257,7 @@
<appender-ref ref="mqtt"/>
</logger>
<!--guideQueue鏃ュ織鎵撳嵃绛夌骇-->
- <logger name="guideQueue" level="DEBUG">
+ <logger name="guideQueue" level="INFO">
<appender-ref ref="guideQueue"/>
</logger>
<!--rongCloud鏃ュ織鎵撳嵃绛夌骇-->
@@ -265,10 +265,10 @@
<appender-ref ref="rongCloud"/>
</logger>
<!--cmd鏃ュ織鎵撳嵃绛夌骇-->
- <logger name="cmd" level="DEBUG">
+ <logger name="cmd" level="INFO">
<appender-ref ref="cmd"/>
</logger>
- <logger name="uav" level="DEBUG">
+ <logger name="uav" level="INFO">
<appender-ref ref="uav"/>
</logger>
</configuration>
\ No newline at end of file
diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/AppTask.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/AppTask.java
deleted file mode 100644
index f2b8ecd..0000000
--- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/AppTask.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.ruoyi.quartz.task;
-
-/**
- * @Description:
- * @ClassName: AppTask
- * @Author: 鍒樿嫃涔�
- * @Date: 2023骞�07鏈�26鏃�11:57:33
- * @Version: 1.0
- **/
-public class AppTask {
-
-
-}
--
Gitblit v1.9.3