1. 程式人生 > >java 獲取實體類的屬性值

java 獲取實體類的屬性值


	    List<EntryVO> indexEntryList = service.getIndexEntryVOList();
	    List<EntryVO> personalList = new ArrayList<>();
	    List<EntryVO> partyBuildList = new ArrayList<>();
	    if(CollectionUtils.isNotEmpty(indexEntryList))
	    {
	    	if(indexEntryList.size() > 6) 
	    	{
	    	personalList = indexEntryList.subList(0, 6);
	    	partyBuildList = indexEntryList.subList(6, indexEntryList.size());
	    	}
	    	else
	    	{
	    		personalList = indexEntryList;
	    	}
	    	
	    for(FastEntryVO entry:personalList)
	    {
	    	if("my_message".equals(entry.gettEntryCode()))
	    	{
	    		List<MessageNoticeVO> messageList = messageService.getMessageNoticeList(user.getUserId());
	    		if(CollectionUtils.isNotEmpty(messageList))
	    		{
	    			entry.setRelCount(messageList.size());
	    		}
	    	}
	    }