From 78cddaab8b5cb26ad055a1a4ec1b350bba806c0b Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: 星期二, 26 十二月 2023 14:41:23 +0800
Subject: [PATCH] 融云刷新
---
ard-work/src/main/java/com/ruoyi/rongcloud/service/Impl/RongCloudServiceImpl.java | 16 ++++++++--------
ard-work/src/main/java/com/ruoyi/rongcloud/domain/ArdRongGroup.java | 2 ++
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/rongcloud/domain/ArdRongGroup.java b/ard-work/src/main/java/com/ruoyi/rongcloud/domain/ArdRongGroup.java
index b5d525d..b6ca260 100644
--- a/ard-work/src/main/java/com/ruoyi/rongcloud/domain/ArdRongGroup.java
+++ b/ard-work/src/main/java/com/ruoyi/rongcloud/domain/ArdRongGroup.java
@@ -1,11 +1,13 @@
package com.ruoyi.rongcloud.domain;
+import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import java.util.Date;
@Data
public class ArdRongGroup {
+ @TableId(value = "group_id")
private String groupId;
private String groupName;
private String createName;
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 6349054..4166545 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
@@ -194,16 +194,16 @@
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<>();
- queryWrapper.eq("user_id", groupParam.getGroupId())
- .eq("group_id", groupParam.getUserId());
- ardRongGroupUserMapper.delete(queryWrapper);
- }
+ String groupId = groupParam.getGroupId();
+ String groupName = groupParam.getGroupName();
+ QueryWrapper<ArdRongGroup> queryWrapper = new QueryWrapper<>();
+ queryWrapper.eq("group_id",groupId);
+ ArdRongGroup ardRongGroup = ardRongGroupMapper.selectOne(queryWrapper);
+ ardRongGroup.setGroupName(groupName);
+ ardRongGroupMapper.updateById(ardRongGroup);
}
groupMap.put("groupId", groupParam.getGroupId());
- groupMap.put("userId", groupParam.getUserId());
+ groupMap.put("groupName", groupParam.getGroupName());
return AjaxResult.success(groupMap);
}
--
Gitblit v1.9.3