|
@@ -20,6 +20,7 @@ import com.qmth.teachcloud.common.mapper.SysUserMapper;
|
|
|
import com.qmth.teachcloud.common.service.*;
|
|
|
import com.qmth.teachcloud.common.util.ResultUtil;
|
|
|
import com.qmth.teachcloud.common.util.ServletUtil;
|
|
|
+import org.apache.ibatis.annotations.Case;
|
|
|
import org.springframework.dao.DuplicateKeyException;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -301,9 +302,18 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
|
|
|
|
|
|
@Override
|
|
|
public List<SysOrg> findDeepByOrgIdAndType(OrgTypeEnum orgTypeEnum) {
|
|
|
- Set<Long> orgIds = teachcloudCommonService.listSubOrgIds(null);
|
|
|
- return this.list(new QueryWrapper<SysOrg>().lambda().eq(SysOrg::getType, orgTypeEnum)
|
|
|
- .eq(SysOrg::getEnable, true)
|
|
|
- .in(SysOrg::getId, orgIds));
|
|
|
+
|
|
|
+ Set<Long> orgIds = null;
|
|
|
+ if (OrgTypeEnum.TEACHING_ROOM.equals(orgTypeEnum)){
|
|
|
+ orgIds = teachcloudCommonService.listSubOrgIds(null);
|
|
|
+ }
|
|
|
+ QueryWrapper<SysOrg> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.lambda().eq(SysOrg::getType, orgTypeEnum)
|
|
|
+ .eq(SysOrg::getEnable, true);
|
|
|
+ if (Objects.nonNull(orgIds)){
|
|
|
+ queryWrapper.lambda().in(SysOrg::getId,orgIds);
|
|
|
+ }
|
|
|
+
|
|
|
+ return this.list(queryWrapper);
|
|
|
}
|
|
|
}
|