工会申请保留时间

lvxinran 2019-10-31 14:36:52 +08:00
parent 156456a98e
commit 3f6113ca9f
1 changed files with 11 additions and 0 deletions

View File

@ -151,7 +151,18 @@ public class GuildLogic {
Collection<GuildInfo> guildInfos = GuilidManager.recommandGuild(user);
Family.FamilyRecommandResponse.Builder builder = Family.FamilyRecommandResponse.newBuilder();
Map<Integer, GuildApply> applyGuildInfos = GuilidManager.getApplyGuildInfos(uid, 1);
int now =(int)(System.currentTimeMillis()/1000);
if(applyGuildInfos.size()>0){
for(Map.Entry<Integer, GuildApply> applyEntry:applyGuildInfos.entrySet()){
GuildApply guildApply = applyEntry.getValue();
if(now - guildApply.getCreateTime() > SGuildSetting.sGuildSetting.getApplyReserve()){
GuilidManager.removeOneApplyGuildInfos(guildApply.getGuildId(),guildApply.getId());
continue;
}
}
}
for(GuildInfo guildInfo : guildInfos){
builder.addFamilyRecomandInfo(Family.FamilyRecomandInfo.newBuilder().
setFamilyBaseInfo(CBean2Proto.getFamilyBaseInfo(guildInfo))
.setIsApply(applyGuildInfos.containsKey(guildInfo.getId())?1:0)