申请工会修改
parent
984f0f7bae
commit
2b60d06ff8
|
@ -454,12 +454,12 @@ public class GuildLogic {
|
|||
GuilidManager.removeOneApplyGuildInfos(guildApply.getGuildId(),guildApply.getId());
|
||||
continue;
|
||||
}
|
||||
int id = guildApply.getId();
|
||||
User userApply = UserManager.getUser(id);
|
||||
if(userApply.getPlayerInfoManager().getGuildId()!=0){
|
||||
GuilidManager.removeOneApplyGuildInfos(guildId,id);
|
||||
continue;
|
||||
}
|
||||
// int id = guildApply.getId();
|
||||
// User userApply = UserManager.getUser(id);
|
||||
// if(userApply.getPlayerInfoManager().getGuildId()!=0){
|
||||
// GuilidManager.removeOneApplyGuildInfos(guildId,id);
|
||||
// continue;
|
||||
// }
|
||||
|
||||
guildApplies.add(guildApply);
|
||||
}
|
||||
|
@ -513,27 +513,25 @@ public class GuildLogic {
|
|||
throw new ErrorCodeException(ErrorCode.FAMILY_MAXFULL);
|
||||
}
|
||||
boolean memberGuild = false;
|
||||
for(Integer addUid : applyGuild.keySet()){
|
||||
if(UserManager.getUser(addUid).getPlayerInfoManager().getGuildId()!=0){
|
||||
for(Map.Entry<Integer, GuildApply> entry:applyGuild.entrySet()){
|
||||
if(UserManager.getUser(entry.getKey()).getPlayerInfoManager().getGuildId()!=0){
|
||||
memberGuild = true;
|
||||
continue;
|
||||
}
|
||||
if(30-count<=0){
|
||||
break;
|
||||
}
|
||||
applyToJoin(guildInfo,addUid,true);
|
||||
applyToJoin(guildInfo,entry.getKey(),true);
|
||||
GuilidManager.removeOneApplyGuildInfos(entry.getValue().getGuildId(),entry.getValue().getId());
|
||||
// Map<Integer, GuildApply> applyPersonal = GuilidManager.getApplyGuildInfos(entry.getValue().getId(), 1);
|
||||
// for(Map.Entry<Integer, GuildApply> personalEntry:applyPersonal.entrySet()) {
|
||||
// GuilidManager.removeOneApplyGuildInfos(personalEntry.getValue().getGuildId(),personalEntry.getValue().getId());
|
||||
// }
|
||||
count++;
|
||||
}
|
||||
if(memberGuild){
|
||||
throw new ErrorCodeException(ErrorCode.FAMILY_SOMEONE_QUIT);
|
||||
}
|
||||
for(Map.Entry<Integer, GuildApply> entry:applyGuild.entrySet()){
|
||||
GuilidManager.removeOneApplyGuildInfos(entry.getValue().getGuildId(),entry.getValue().getId());
|
||||
Map<Integer, GuildApply> applyPersonal = GuilidManager.getApplyGuildInfos(entry.getValue().getId(), 1);
|
||||
for(Map.Entry<Integer, GuildApply> personalEntry:applyPersonal.entrySet()) {
|
||||
GuilidManager.removeOneApplyGuildInfos(personalEntry.getValue().getGuildId(),personalEntry.getValue().getId());
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2: //全部拒绝
|
||||
Family.RefuseJoinFamily refuse = Family.RefuseJoinFamily.newBuilder().setName(guildInfo.getName()).build();
|
||||
|
@ -546,16 +544,16 @@ public class GuildLogic {
|
|||
break;
|
||||
case 3: //同意一个
|
||||
if(UserManager.getUser(applyId).getPlayerInfoManager().getGuildId()!=0){
|
||||
throw new ErrorCodeException(ErrorCode.FAMILY_SOMEONE_QUIT);
|
||||
throw new ErrorCodeException(ErrorCode.FAMILY_IN_OTHER);
|
||||
}
|
||||
if(guildInfo.getTotalMembers()>=STableManager.getConfig(SGuildLevelConfig.class).get(guildInfo.getLevel()).getNum()){
|
||||
throw new ErrorCodeException(ErrorCode.FAMILY_MAX);
|
||||
}
|
||||
applyToJoin(guildInfo,applyId,true);
|
||||
Map<Integer, GuildApply> applyPersonal = GuilidManager.getApplyGuildInfos(applyId, 1);
|
||||
for(Map.Entry<Integer, GuildApply> personalEntry:applyPersonal.entrySet()) {
|
||||
GuilidManager.removeOneApplyGuildInfos(personalEntry.getValue().getGuildId(),personalEntry.getValue().getId());
|
||||
}
|
||||
GuilidManager.removeOneApplyGuildInfos(guildInfo.getId(),user.getId());
|
||||
// Map<Integer, GuildApply> applyPersonal = GuilidManager.getApplyGuildInfos(applyId, 1);
|
||||
// for(Map.Entry<Integer, GuildApply> personalEntry:applyPersonal.entrySet()) {
|
||||
// }
|
||||
break;
|
||||
case 4: //拒绝一个
|
||||
GuilidManager.removeOneApplyGuildInfos(guildId,applyId);
|
||||
|
|
Loading…
Reference in New Issue