@RequestMapping("/cardInfomation") public String cardInfomation(Model model, HttpSession session) { String forwardPath = "index"; if ((Member) session.getAttribute("sMember") == null) { return "redirect:login"; } Member member = (Member) session.getAttribute("sMember"); // ArrayList<HashMap<String, String>> moneyMap = textFormatUtil.head_Nav_CardUseList(member.getM_email()); model.addAttribute("head_nav_moneyList_size", moneyMap.size()); model.addAttribute("head_nav_moneyList", moneyMap); // /** ************** 상단 nav schedule 알람 ************************ */ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String strDate = sdf.format(new Date()); HashMap<String, String> sMap = new HashMap<String, String>(); sMap.put("s_m_email", member.getM_email()); sMap.put("s_end", strDate); List<Scheduler> scList = schedulerService.selectforHeadNav(sMap); model.addAttribute("scList", scList); /** ************************************************************** */ ArrayList<Card> cardList = cardService.getCardListByEmail(member.getM_email()); model.addAttribute("cardList", cardList); model.addAttribute("path", "cardInfomation.jsp"); return forwardPath; }
@RequestMapping("/registration") public String cardRegist( @RequestParam("name") String name, @RequestParam("company") String company, @RequestParam(value = "keyword") String[] keyword, @RequestParam(value = "mainCard", required = false) String mainCard, @RequestParam(value = "sms", required = false) String sms, @RequestParam("m_email") String sm_email, Model model, HttpSession session) { String forwardPath = "index"; if ((Member) session.getAttribute("sMember") == null) { return "redirect:login"; } Member member = (Member) session.getAttribute("sMember"); HashMap<String, String> cMap = new HashMap<String, String>(); cMap.put("c_name", name); cMap.put("c_company", company); cMap.put("c_m_email", sm_email); StringBuffer sb = new StringBuffer(); for (String arr : keyword) { sb.append(arr + "`"); } cMap.put("c_keyword", sb.toString()); cMap.put("c_maincard", mainCard != null ? "1" : "0"); cMap.put("c_sms_receive", sms != null ? "1" : "0"); cardService.cardRegist(cMap); forwardPath = "index"; // ArrayList<HashMap<String, String>> moneyMap = textFormatUtil.head_Nav_CardUseList(member.getM_email()); model.addAttribute("head_nav_moneyList_size", moneyMap.size()); model.addAttribute("head_nav_moneyList", moneyMap); // /** ************** 상단 nav schedule 알람 ************************ */ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String strDate = sdf.format(new Date()); HashMap<String, String> sMap = new HashMap<String, String>(); sMap.put("s_m_email", member.getM_email()); sMap.put("s_end", strDate); List<Scheduler> scList = schedulerService.selectforHeadNav(sMap); model.addAttribute("scList", scList); /** ************************************************************** */ ArrayList<Card> cardList = cardService.getCardListByEmail(member.getM_email()); model.addAttribute("cardList", cardList); model.addAttribute("path", "cardInfomation.jsp"); return forwardPath; }