add/push

리스트에 추가로 계속 저장하는건 add/push

@RequestMapping(value = "threat_before_detail_info.json")
	public @ResponseBody JsonResultEntity getBeforeThreatListDetailInfo(HttpSession session,
    		@RequestBody Map<String,Object> map) {
		
		ThreatStatusDAO dao = sqlSession.getMapper(ThreatStatusDAO.class);
		List<Map<String, Object>> selectThreatDetail = dao.selectThreatDetailInfo(map);
		String allData;
		List<String> allDataArr  = new ArrayList<String>();
		for(Map<String, Object> m : selectThreatDetail) {
			String field_name = (StringUtil.get(m.get("field_name")));
			String cnt = (StringUtil.get(m.get("cnt")));
			String field_value = (StringUtil.get(m.get("field_value")));
			allData = field_name+" : "+field_value+" 외 "+cnt+"건";
			allDataArr.add(allData);
		}
		return reFac.getJsonResultEntity(allDataArr);
	}

좋은 웹페이지 즐겨찾기