@Override public List<HumanAgent> findByBotIdAndStatus(String botId, String status) { List<HumanAgent> humanAgents = new ArrayList<>(); try { Query query = new Query().addCriteria(Criteria.where("bot_id").is(botId)) .addCriteria(Criteria.where("status").is(status)); humanAgents = mongoTemplate.find(query, HumanAgent.class); log.info("find HumanAgent by botId {}, status {}, have size {}", botId, status, humanAgents.size()); }catch (Exception ex){ log.error("ERROR {}", ExceptionUtils.getStackTrace(ex)); } return humanAgents; }