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