新版权限小组角色查询方式调整

This commit is contained in:
anhc 2022-07-07 17:22:21 +08:00
parent 5c5bfd37b9
commit b54b65bc53
3 changed files with 4 additions and 1 deletions

View File

@ -613,6 +613,9 @@ public class CoeCooperationAPIManager {
public void removeCooperationHideRole(String teamId, String roleName) {
CoeCooperationRoleDao roleDao = new CoeCooperationRoleDao();
CoeCooperationRoleModel deletedRole = roleDao.getCooperationHideRoleByRoleName(teamId, roleName);
if (deletedRole == null){
return;
}
removeCooperationRolePerms(teamId, deletedRole.getId());
roleDao.remove(teamId, deletedRole.getId());
}

View File

@ -183,7 +183,7 @@ public class CoeCooperationRoleDao extends DaoObject<CoeCooperationRoleModel> {
* @return
*/
public List<CoeCooperationRoleModel> getCooperationRoleByTeam(String teamId) {
String sql = "SELECT * FROM " + entityName() + " WHERE " + CoeCooperationRoleModel.TEAMID + " =?";
String sql = "SELECT * FROM " + entityName() + " WHERE " + CoeCooperationRoleModel.TEAMID + " =? and "+CoeCooperationRoleModel.ISUSER +"=0";
return DBSql.query(sql, rowMapper(), new Object[]{teamId});
}