From f059de0b3cfe92ba2980c8ce4c5772637c64e9d2 Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: 星期六, 23 十二月 2023 17:03:34 +0800
Subject: [PATCH] 权限
---
ard-work/src/main/java/com/ruoyi/rongcloud/service/Impl/RongCloudServiceImpl.java | 24 +++++++++++++++++++-----
ard-work/src/main/java/com/ruoyi/rongcloud/service/RongCloudService.java | 1 +
ard-work/src/main/java/com/ruoyi/utils/forest/RongCloudClient.java | 3 +++
ard-work/src/main/java/com/ruoyi/rongcloud/controller/RongCloudController.java | 7 +++++++
ard-work/src/main/java/com/ruoyi/sy/controller/ArdSyCarController.java | 4 ++--
5 files changed, 32 insertions(+), 7 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 2b88f32..75c052c 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
@@ -80,4 +80,11 @@
{
return rongCloudService.groupUserQuery(groupId);
}
+
+ @PostMapping("/groupRefresh")
+ @ApiOperation("缇ょ粍绠$悊-鍒锋柊缇ょ粍淇℃伅")
+ public AjaxResult groupRefresh(@RequestBody RongCloudGroupParam groupParam)
+ {
+ return rongCloudService.groupUserQuery(groupParam);
+ }
}
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 eb3484d..e1e767a 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
@@ -161,6 +161,25 @@
Map<String, Object> groupMap = rongCloudClient.groupQuit(getRongCloudHead(),groupParam);
Integer code = (Integer) groupMap.get("code");
if(code.equals(200)){
+ ArdRongGroup ardRongGroup = ardRongGroupMapper.selectById(groupParam.getGroupId());
+ ardRongGroup.setGroupName(groupParam.getGroupName());
+ ardRongGroupMapper.updateById(ardRongGroup);
+ }
+ groupMap.put("groupId",groupParam.getGroupId());
+ groupMap.put("groupName",groupParam.getGroupName());
+ return AjaxResult.success(groupMap);
+ }
+
+ @Override
+ public AjaxResult groupUserQuery(RongCloudGroupParam groupId) {
+ return AjaxResult.success(rongCloudClient.groupUserQuery(getRongCloudHead(),groupId));
+ }
+
+ @Override
+ public AjaxResult groupRefresh(RongCloudGroupParam groupParam) {
+ Map<String, Object> groupMap = rongCloudClient.groupRefresh(getRongCloudHead(),groupParam);
+ Integer code = (Integer) groupMap.get("code");
+ if(code.equals(200)){
List<String> userList = groupParam.getUserId();
for (int i = 0; i < userList.size(); i++) {
QueryWrapper<ArdRongGroupUser> queryWrapper = new QueryWrapper<>();
@@ -172,11 +191,6 @@
groupMap.put("groupId",groupParam.getGroupId());
groupMap.put("userId",groupParam.getUserId());
return AjaxResult.success(groupMap);
- }
-
- @Override
- public AjaxResult groupUserQuery(RongCloudGroupParam groupId) {
- return AjaxResult.success(rongCloudClient.groupUserQuery(getRongCloudHead(),groupId));
}
/**
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 1227f0e..049b7be 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
@@ -25,4 +25,5 @@
AjaxResult groupJoin(RongCloudGroupParam groupParam);
AjaxResult groupQuit(RongCloudGroupParam groupParam);
AjaxResult groupUserQuery(RongCloudGroupParam groupId);
+ AjaxResult groupRefresh(RongCloudGroupParam groupParam);
}
diff --git a/ard-work/src/main/java/com/ruoyi/sy/controller/ArdSyCarController.java b/ard-work/src/main/java/com/ruoyi/sy/controller/ArdSyCarController.java
index 4dea016..e7fb078 100644
--- a/ard-work/src/main/java/com/ruoyi/sy/controller/ArdSyCarController.java
+++ b/ard-work/src/main/java/com/ruoyi/sy/controller/ArdSyCarController.java
@@ -233,7 +233,7 @@
/**
* 鑾峰彇鍏ㄩ儴鐨勪笁涓�杞﹁締
*/
- @PreAuthorize("@ss.hasPermi('sy:syCar:getArdSyCarAll')")
+// @PreAuthorize("@ss.hasPermi('sy:syCar:getArdSyCarAll')")
@PostMapping("/getArdSyCarAll")
@ApiOperation("鑾峰彇鍏ㄩ儴鐨勪笁涓�杞﹁締")
public Map<String,Object> getArdSyCarAll(){
@@ -314,7 +314,7 @@
}
}
- @PreAuthorize("@ss.hasPermi('sy:syCar:carListById')")
+// @PreAuthorize("@ss.hasPermi('sy:syCar:carListById')")
@PostMapping("/carListById/{id}")
@ApiOperation("鏍规嵁杞﹁締ID鑾峰彇杞﹁締鍒楄〃")
public Results carListById(@PathVariable String id){
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 95f8313..c39ce08 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
@@ -34,4 +34,7 @@
@Post(url = "/group/user/query.json")
Map<String,Object> groupUserQuery(@Header Map<String, Object> headerMap, @Body RongCloudGroupParam groupParam);
+
+ @Post(url = "/group/refresh.json")
+ Map<String,Object> groupRefresh(@Header Map<String, Object> headerMap, @Body RongCloudGroupParam groupParam);
}
--
Gitblit v1.9.3