@RequestMapping(value = "/update/{id}", method = RequestMethod.GET) public RoncooUserLog update2(@PathVariable(value = "id") Integer id) { RoncooUserLog bean = RoncooUserLogCache.selectById(id); if(bean == null){ bean = new RoncooUserLog(); } bean.setUserName("测试"); bean.setCreateTime(new Date()); bean.setUserIp("192.168.1.1"); RoncooUserLogCache.updateById(bean); return bean; }
@RequestMapping(value = "/update", method = RequestMethod.GET) public RoncooUserLog update(@RequestParam(defaultValue = "1") Integer id) { RoncooUserLog bean = roncooUserLogCache.selectById(id); bean.setUserName("测试"); bean.setCreateTime(new Date()); roncooUserLogCache.updateById(bean); return bean; }
@RequestMapping(value = "/update", method = RequestMethod.GET) public RoncooUserLog update(@RequestParam(defaultValue = "1") Integer id) { RoncooUserLog bean = roncooUserLogCache.selectById(id); bean.setUserName("测试"); bean.setCreateTime(new Date()); roncooUserLogCache.updateById(bean); return bean; }
@RequestMapping(value = "/update/{id}", method = RequestMethod.GET) public RoncooUserLog update2(@PathVariable(value = "id") Integer id) { RoncooUserLog bean = RoncooUserLogCache.selectById(id); if(bean == null){ bean = new RoncooUserLog(); } bean.setUserName("测试"); bean.setCreateTime(new Date()); bean.setUserIp("192.168.1.1"); RoncooUserLogCache.updateById(bean); return bean; }
@RequestMapping(value = "/update", method = RequestMethod.GET) public RoncooUserLog update(@RequestParam(defaultValue = "1") Integer id) { RoncooUserLog bean = roncooUserLogCache.selectById(id); bean.setUserName("测试"); bean.setCreateTime(new Date()); roncooUserLogCache.updateById(bean); return bean; }
@RequestMapping(value = "/update/{id}", method = RequestMethod.GET) public RoncooUserLog update2(@PathVariable(value = "id") Integer id) { RoncooUserLog bean = RoncooUserLogCache.selectById(id); if(bean == null){ bean = new RoncooUserLog(); } bean.setUserName("测试"); bean.setCreateTime(new Date()); bean.setUserIp("192.168.1.1"); RoncooUserLogCache.updateById(bean); return bean; }
@RequestMapping(value = "/update", method = RequestMethod.GET) public RoncooUserLog update(@RequestParam(defaultValue = "1") Integer id) { RoncooUserLog bean = roncooUserLogCache.selectById(id); bean.setUserName("测试"); bean.setCreateTime(new Date()); roncooUserLogCache.updateById(bean); return bean; }
@RequestMapping(value = "/update/{id}", method = RequestMethod.GET) public RoncooUserLog update2(@PathVariable(value = "id") Integer id) { RoncooUserLog bean = RoncooUserLogCache.selectById(id); if(bean == null){ bean = new RoncooUserLog(); } bean.setUserName("测试"); bean.setCreateTime(new Date()); bean.setUserIp("192.168.1.1"); RoncooUserLogCache.updateById(bean); return bean; }
@RequestMapping(value = "/update", method = RequestMethod.GET) public RoncooUserLog update(@RequestParam(defaultValue = "1") Integer id) { RoncooUserLog bean = roncooUserLogCache.selectById(id); bean.setUserName("测试"); bean.setCreateTime(new Date()); roncooUserLogCache.updateById(bean); return bean; }
@RequestMapping(value = "/update") public RoncooUserLog update(@RequestBody JsonNode jsonNode) { System.out.println("jsonNode=" + jsonNode); RoncooUserLog bean = RoncooUserLogCache.selectById(jsonNode.get("id").asInt(1)); if(bean == null){ bean = new RoncooUserLog(); } bean.setUserName("测试"); bean.setCreateTime(new Date()); bean.setUserIp("192.168.1.1"); RoncooUserLogCache.updateById(bean); return bean; }
@RequestMapping(value = "/update", method = RequestMethod.GET) public RoncooUserLog update(@RequestParam(defaultValue = "1") Integer id) { RoncooUserLog bean = roncooUserLogCache.selectById(id); bean.setUserName("测试"); bean.setCreateTime(new Date()); roncooUserLogCache.updateById(bean); return bean; }
@RequestMapping(value = "/update") public RoncooUserLog update(@RequestBody JsonNode jsonNode) { System.out.println("jsonNode=" + jsonNode); RoncooUserLog bean = RoncooUserLogCache.selectById(jsonNode.get("id").asInt(1)); if(bean == null){ bean = new RoncooUserLog(); } bean.setUserName("测试"); bean.setCreateTime(new Date()); bean.setUserIp("192.168.1.1"); RoncooUserLogCache.updateById(bean); return bean; }
@RequestMapping(value = "/update", method = RequestMethod.GET) public RoncooUserLog update(@RequestParam(defaultValue = "1") Integer id) { RoncooUserLog bean = roncooUserLogCache.selectById(id); bean.setUserName("测试"); bean.setCreateTime(new Date()); roncooUserLogCache.updateById(bean); return bean; }
@RequestMapping(value = "/update") public RoncooUserLog update(@RequestBody JsonNode jsonNode) { System.out.println("jsonNode=" + jsonNode); RoncooUserLog bean = RoncooUserLogCache.selectById(jsonNode.get("id").asInt(1)); if(bean == null){ bean = new RoncooUserLog(); } bean.setUserName("测试"); bean.setCreateTime(new Date()); bean.setUserIp("192.168.1.1"); RoncooUserLogCache.updateById(bean); return bean; }
@RequestMapping(value = "/update", method = RequestMethod.GET) public RoncooUserLog update(@RequestParam(defaultValue = "1") Integer id) { RoncooUserLog bean = roncooUserLogCache.selectById(id); bean.setUserName("测试"); bean.setCreateTime(new Date()); roncooUserLogCache.updateById(bean); return bean; }
@RequestMapping(value = "/update") public RoncooUserLog update(@RequestBody JsonNode jsonNode) { System.out.println("jsonNode=" + jsonNode); RoncooUserLog bean = RoncooUserLogCache.selectById(jsonNode.get("id").asInt(1)); if(bean == null){ bean = new RoncooUserLog(); } bean.setUserName("测试"); bean.setCreateTime(new Date()); bean.setUserIp("192.168.1.1"); RoncooUserLogCache.updateById(bean); return bean; }
/** * 用户注册 * * @return */ @Transactional public String register(String name, String ip) { // 1.添加用户 RoncooUser roncooUser = new RoncooUser(); roncooUser.setName(name); roncooUser.setCreateTime(new Date()); roncooUserDao.insert(roncooUser); // 测试使用 //boolean flag = true; //if (flag) { // throw new RuntimeException(); //} // 2.添加注册日志 RoncooUserLog roncooUserLog = new RoncooUserLog(); roncooUserLog.setUserName(name); roncooUserLog.setUserIp(ip); roncooUserLog.setCreateTime(new Date()); roncooUserLogDao.save(roncooUserLog); return "success"; }
/** * 用户注册 * * @return */ @Transactional public String register(String name, String ip) { // 1.添加用户 RoncooUser roncooUser = new RoncooUser(); roncooUser.setName(name); roncooUser.setCreateTime(new Date()); roncooUserDao.insert(roncooUser); // 测试使用 //boolean flag = true; //if (flag) { // throw new RuntimeException(); //} // 2.添加注册日志 RoncooUserLog roncooUserLog = new RoncooUserLog(); roncooUserLog.setUserName(name); roncooUserLog.setUserIp(ip); roncooUserLog.setCreateTime(new Date()); roncooUserLogDao.save(roncooUserLog); return "success"; }
/** * 用户注册 * * @return */ @Transactional public String register(String name, String ip) { // 1.添加用户 RoncooUser roncooUser = new RoncooUser(); roncooUser.setName(name); roncooUser.setCreateTime(new Date()); roncooUserDao.insert(roncooUser); // 测试使用 //boolean flag = true; //if (flag) { // throw new RuntimeException(); //} // 2.添加注册日志 RoncooUserLog roncooUserLog = new RoncooUserLog(); roncooUserLog.setUserName(name); roncooUserLog.setUserIp(ip); roncooUserLog.setCreateTime(new Date()); roncooUserLogDao.save(roncooUserLog); return "success"; }
/** * 用户注册 * * @return */ @Transactional public String register(String name, String ip) { // 1.添加用户 RoncooUser roncooUser = new RoncooUser(); roncooUser.setName(name); roncooUser.setCreateTime(new Date()); roncooUserDao.insert(roncooUser); // 测试使用 //boolean flag = true; //if (flag) { // throw new RuntimeException(); //} // 2.添加注册日志 RoncooUserLog roncooUserLog = new RoncooUserLog(); roncooUserLog.setUserName(name); roncooUserLog.setUserIp(ip); roncooUserLog.setCreateTime(new Date()); roncooUserLogDao.save(roncooUserLog); return "success"; }