|
@@ -6,6 +6,7 @@ import com.keao.edu.auth.api.entity.SysUser;
|
|
|
import com.keao.edu.common.dal.BaseDAO;
|
|
|
import com.keao.edu.common.exception.BizException;
|
|
|
import com.keao.edu.common.service.impl.BaseServiceImpl;
|
|
|
+import com.keao.edu.common.tenant.OrganContextHolder;
|
|
|
import com.keao.edu.im.api.client.ImFeignService;
|
|
|
import com.keao.edu.im.api.entity.ImResult;
|
|
|
import com.keao.edu.im.api.entity.ImUserModel;
|
|
@@ -56,6 +57,10 @@ public class OrganizationServiceImpl extends BaseServiceImpl<Integer, Organizati
|
|
|
//获取当前用的organ
|
|
|
SysUser queryUserInfo = sysUserFeignService.queryUserInfo();
|
|
|
Organization currentOrganization = organDao.findByUserId(queryUserInfo.getId());
|
|
|
+ if(currentOrganization == null){
|
|
|
+ Integer organId = OrganContextHolder.getOrganId();
|
|
|
+ currentOrganization = organDao.get(organId);
|
|
|
+ }
|
|
|
if(currentOrganization.getLevel() == 3){
|
|
|
throw new BizException("无权限创建合作单位");
|
|
|
}
|