|
@@ -202,8 +202,7 @@ public class TenantGroupServiceImpl extends ServiceImpl<TenantGroupMapper, Tenan
|
|
|
ImGroup imGroup = imGroupService.getById(oldImGroupId);
|
|
|
// 群被删除过,并且需要重新建群
|
|
|
if (imGroup == null) {
|
|
|
- SysUser sysUser = sysUserService.getByUserId(entity.getAdminId());
|
|
|
- String imGroupId = createImGroup(entity.getAdminId(), sysUser.getUsername());
|
|
|
+ String imGroupId = createImGroup(entity.getAdminId(), tenantGroup.getName());
|
|
|
entity.setImGroupId(imGroupId);
|
|
|
|
|
|
// 添加群成员
|
|
@@ -439,13 +438,13 @@ public class TenantGroupServiceImpl extends ServiceImpl<TenantGroupMapper, Tenan
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- public String createImGroup(Long groupAdmin, String userName) {
|
|
|
+ public String createImGroup(Long groupAdmin, String groupName) {
|
|
|
try {
|
|
|
ImGroupWrapper.ImGroup imGroup = new ImGroupWrapper.ImGroup();
|
|
|
imGroup.setId(IdWorker.getId());
|
|
|
imGroup.setCreateBy(groupAdmin);
|
|
|
imGroup.setType(ImGroupType.ORG.getCode());
|
|
|
- imGroup.setName(userName);
|
|
|
+ imGroup.setName(groupName);
|
|
|
return imGroupService.create(imGroup);
|
|
|
} catch (Exception e) {
|
|
|
log.error("创建机构小组群失败", e);
|