工会申请保留时间
parent
156456a98e
commit
3f6113ca9f
|
@ -151,7 +151,18 @@ public class GuildLogic {
|
||||||
Collection<GuildInfo> guildInfos = GuilidManager.recommandGuild(user);
|
Collection<GuildInfo> guildInfos = GuilidManager.recommandGuild(user);
|
||||||
Family.FamilyRecommandResponse.Builder builder = Family.FamilyRecommandResponse.newBuilder();
|
Family.FamilyRecommandResponse.Builder builder = Family.FamilyRecommandResponse.newBuilder();
|
||||||
Map<Integer, GuildApply> applyGuildInfos = GuilidManager.getApplyGuildInfos(uid, 1);
|
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){
|
for(GuildInfo guildInfo : guildInfos){
|
||||||
|
|
||||||
builder.addFamilyRecomandInfo(Family.FamilyRecomandInfo.newBuilder().
|
builder.addFamilyRecomandInfo(Family.FamilyRecomandInfo.newBuilder().
|
||||||
setFamilyBaseInfo(CBean2Proto.getFamilyBaseInfo(guildInfo))
|
setFamilyBaseInfo(CBean2Proto.getFamilyBaseInfo(guildInfo))
|
||||||
.setIsApply(applyGuildInfos.containsKey(guildInfo.getId())?1:0)
|
.setIsApply(applyGuildInfos.containsKey(guildInfo.getId())?1:0)
|
||||||
|
|
Loading…
Reference in New Issue