Browse Source

1.添加群ID过滤

yuanliang 1 year ago
parent
commit
d0df131620

+ 2 - 2
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TenantGroupServiceImpl.java

@@ -367,8 +367,8 @@ public class TenantGroupServiceImpl extends ServiceImpl<TenantGroupMapper, Tenan
         List<Long> tenantGroupIds =
                 details.stream().map(TenantGroupWrapper.AdjustTenantGroupDetail::getTenantGroupId).collect(Collectors.toList());
         List<TenantGroup> tenantGroups = this.lambdaQuery().in(TenantGroup::getId, tenantGroupIds).list();
-        Map<Long, String> groupBy = tenantGroups.stream().collect(Collectors.toMap(TenantGroup::getId,
-                TenantGroup::getImGroupId));
+        Map<Long, String> groupBy = tenantGroups.stream().filter(next -> next.getImGroupId() != null)
+                .collect(Collectors.toMap(TenantGroup::getId, TenantGroup::getImGroupId));
         for (TenantGroupWrapper.AdjustTenantGroupDetail detail : details) {
             Long toTeacher = detail.getTeacherId();
             if (teacherId.equals(toTeacher) && Boolean.FALSE.equals(detail.getDismiss())) {