|
|
@@ -3,6 +3,7 @@ package com.zhongshu.card.server.core.dao.org;
|
|
|
import com.github.microservice.auth.security.type.AuthType;
|
|
|
import com.github.microservice.components.data.mongo.mongo.dao.MongoDao;
|
|
|
import com.zhongshu.card.client.type.UserState;
|
|
|
+import com.zhongshu.card.client.type.user.OrgUserState;
|
|
|
import com.zhongshu.card.server.core.dao.org.extend.OrganizationUserDaoExtend;
|
|
|
import com.zhongshu.card.server.core.domain.org.Organization;
|
|
|
import com.zhongshu.card.server.core.domain.org.OrganizationUser;
|
|
|
@@ -44,17 +45,6 @@ public interface OrganizationUserDao extends MongoDao<OrganizationUser>, Organiz
|
|
|
// 用户是否存在
|
|
|
Boolean existsByOrganizationAndUser(Organization organization, UserAccount user);
|
|
|
|
|
|
- // 统计用户所在的机构数量
|
|
|
- long countByUserAndState(UserAccount user, UserState state);
|
|
|
-
|
|
|
- long countByUserAndStateAndAuthType(UserAccount user, UserState state, AuthType authType);
|
|
|
-
|
|
|
- long countByProjectOid(String projectOid);
|
|
|
-
|
|
|
- long countByOrganization(Organization organization);
|
|
|
-
|
|
|
- void deleteByOrganization(Organization organization);
|
|
|
-
|
|
|
// 查询用户所在机构
|
|
|
List<OrganizationUser> findByUserAndAuthTypeAndState(UserAccount userAccount, AuthType authType, UserState state);
|
|
|
|
|
|
@@ -66,4 +56,12 @@ public interface OrganizationUserDao extends MongoDao<OrganizationUser>, Organiz
|
|
|
|
|
|
List<OrganizationUser> findByUserIdAndProjectOid(String userId, String projectOid);
|
|
|
|
|
|
+ // 统计用户所在的机构数量
|
|
|
+ long countByUserIdAndProjectOid(String userId, String projectOid);
|
|
|
+
|
|
|
+ long countByProjectOidAndOrgUserState(String projectOid, OrgUserState orgUserState);
|
|
|
+
|
|
|
+ long countByOrganization(Organization organization);
|
|
|
+
|
|
|
+ void deleteByOrganization(Organization organization);
|
|
|
}
|