@RequestMapping("leaveTopic") public String leaveTopic(@RequestParam String client_id, @RequestParam String huanxin_group_id) { User user = new User(); Topic topic = new Topic(); topic.setHuanxin_group_id(huanxin_group_id); user.setClient_id(client_id); topicDao.userLeaveTopic(user); return "SUCCESS"; }
@RequestMapping("addTopic") public String addTopic( HttpServletRequest request, @RequestParam String client_id, @RequestParam String huanxin_group_id, @RequestParam String subject, @RequestParam String label_name) throws Exception { request.setCharacterEncoding("UTF-8"); User user = new User(); user.setClient_id(client_id); Label label = new Label(); label.setLabel_name(label_name); Topic topic = new Topic(); topic.setHuanxin_group_id(huanxin_group_id); topic.setLabel(label); topic.setUser(user); topicDao.save(topic); return "success"; }