From 2cfcb15fdff730140b6a03a874466802704078eb Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: 星期五, 22 十二月 2023 10:01:42 +0800
Subject: [PATCH] 群组
---
ard-work/src/main/java/com/ruoyi/rongcloud/service/Impl/RongCloudServiceImpl.java | 14 +++++++
ard-work/src/main/java/com/ruoyi/rongcloud/domain/RongCloudGroupDisParam.java | 14 +++++++
ard-work/src/main/java/com/ruoyi/rongcloud/service/RongCloudService.java | 6 +++
ard-work/src/main/java/com/ruoyi/utils/forest/RongCloudClient.java | 8 ++++
ard-work/src/main/java/com/ruoyi/rongcloud/controller/RongCloudController.java | 17 ++++++++
ard-work/src/main/java/com/ruoyi/rongcloud/domain/RongCloudGroupParam.java | 15 +++++++
6 files changed, 74 insertions(+), 0 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/rongcloud/controller/RongCloudController.java b/ard-work/src/main/java/com/ruoyi/rongcloud/controller/RongCloudController.java
index 56c08fb..5e07f0d 100644
--- a/ard-work/src/main/java/com/ruoyi/rongcloud/controller/RongCloudController.java
+++ b/ard-work/src/main/java/com/ruoyi/rongcloud/controller/RongCloudController.java
@@ -2,6 +2,8 @@
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.rongcloud.domain.RongCloudGroupDisParam;
+import com.ruoyi.rongcloud.domain.RongCloudGroupParam;
import com.ruoyi.rongcloud.service.RongCloudService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -44,4 +46,19 @@
return AjaxResult.success(map);
}
+ @PostMapping("/groupCreate")
+ @ApiOperation("缇ょ粍绠$悊-鍒涘缓缇ょ粍")
+ public AjaxResult groupCreate(@RequestBody RongCloudGroupParam group)
+ {
+ Map map = rongCloudService.groupCreate(group);
+ return AjaxResult.success(map);
+ }
+
+ @PostMapping("/groupDismiss")
+ @ApiOperation("缇ょ粍绠$悊-瑙f暎缇ょ粍")
+ public AjaxResult groupDismiss(@RequestBody RongCloudGroupDisParam groupDis)
+ {
+ Map map = rongCloudService.groupDismiss(groupDis);
+ return AjaxResult.success(map);
+ }
}
diff --git a/ard-work/src/main/java/com/ruoyi/rongcloud/domain/RongCloudGroupDisParam.java b/ard-work/src/main/java/com/ruoyi/rongcloud/domain/RongCloudGroupDisParam.java
new file mode 100644
index 0000000..f0d766b
--- /dev/null
+++ b/ard-work/src/main/java/com/ruoyi/rongcloud/domain/RongCloudGroupDisParam.java
@@ -0,0 +1,14 @@
+package com.ruoyi.rongcloud.domain;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ */
+@Data
+public class RongCloudGroupDisParam {
+ String userId;
+ String groupId;
+}
diff --git a/ard-work/src/main/java/com/ruoyi/rongcloud/domain/RongCloudGroupParam.java b/ard-work/src/main/java/com/ruoyi/rongcloud/domain/RongCloudGroupParam.java
new file mode 100644
index 0000000..3f381cf
--- /dev/null
+++ b/ard-work/src/main/java/com/ruoyi/rongcloud/domain/RongCloudGroupParam.java
@@ -0,0 +1,15 @@
+package com.ruoyi.rongcloud.domain;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ */
+@Data
+public class RongCloudGroupParam {
+ List<String> userId;
+ String groupId;
+ String groupName;
+}
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 104ad6e..0bd5645 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
@@ -2,6 +2,8 @@
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.rongcloud.domain.RongCloudGroupDisParam;
+import com.ruoyi.rongcloud.domain.RongCloudGroupParam;
import com.ruoyi.rongcloud.domain.RongCloudParam;
import com.ruoyi.rongcloud.service.RongCloudService;
import com.ruoyi.utils.forest.RongCloudClient;
@@ -75,6 +77,18 @@
return isOnline.get("status").equals("1");
}
+ @Override
+ public Map<String, Object> groupCreate(RongCloudGroupParam group) {
+ Map<String, Object> groupMap = rongCloudClient.groupCreate(getRongCloudHead(),group);
+ return groupMap;
+ }
+
+ @Override
+ public Map<String, Object> groupDismiss(RongCloudGroupDisParam groupDis) {
+ Map<String, Object> groupMap = rongCloudClient.groupDismiss(getRongCloudHead(),groupDis);
+ return groupMap;
+ }
+
/**
* 鑾峰彇铻嶄簯绛惧悕淇℃伅
*/
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 91a13da..895ab5a 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
@@ -1,5 +1,8 @@
package com.ruoyi.rongcloud.service;
+import com.ruoyi.rongcloud.domain.RongCloudGroupDisParam;
+import com.ruoyi.rongcloud.domain.RongCloudGroupParam;
+
import java.util.List;
import java.util.Map;
@@ -15,4 +18,7 @@
String getToken(String userId,String name);
Map<String,Object> checkOnline(List<String>userIds);
Boolean checkOnline(String userId);
+
+ Map<String,Object> groupCreate(RongCloudGroupParam group);
+ Map<String,Object> groupDismiss(RongCloudGroupDisParam groupDis);
}
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 950f004..e3f4ad4 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
@@ -1,6 +1,8 @@
package com.ruoyi.utils.forest;
import com.dtflys.forest.annotation.*;
+import com.ruoyi.rongcloud.domain.RongCloudGroupDisParam;
+import com.ruoyi.rongcloud.domain.RongCloudGroupParam;
import com.ruoyi.rongcloud.domain.RongCloudParam;
import com.ruoyi.rongcloud.service.MyAddressSource;
@@ -17,4 +19,10 @@
@Post(url = "user/checkOnline.json")
Map<String,Object> checkOnline(@Header Map<String, Object> headerMap, @Body RongCloudParam param);
+
+ @Post(url = "/group/create.json")
+ Map<String,Object> groupCreate(@Header Map<String, Object> headerMap, @Body RongCloudGroupParam group);
+
+ @Post(url = "/group/dismiss.json")
+ Map<String,Object> groupDismiss(@Header Map<String, Object> headerMap, @Body RongCloudGroupDisParam groupDis);
}
--
Gitblit v1.9.3