| | |
| | | /** |
| | | * 跳转到修改车辆管理 |
| | | */ |
| | | @RequestMapping("/tCompetition_update/{id}") |
| | | public String tCarUpdate(@PathVariable Integer id, Model model) { |
| | | Competition competition = competitionClient.queryById(id); |
| | | model.addAttribute("item",competition); |
| | | return PREFIX + "tCompetition_edit.html"; |
| | | @RequestMapping("/tCity_update/{id}") |
| | | public String tCityUpdate(@PathVariable Integer id, Model model) { |
| | | TCityManager byId = cityClient.getById(id); |
| | | model.addAttribute("item",byId); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, byId.getProvinceCode())); |
| | | List<TCity> list1 = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId,one.getId() )); |
| | | model.addAttribute("list1",list1); |
| | | return PREFIX + "tCity_edit.html"; |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/update") |
| | | public Object update(Competition competition) { |
| | | @ResponseBody |
| | | public Object update(TCityManager manager) { |
| | | try { |
| | | competitionClient.update(competition); |
| | | return SUCCESS_TIP; |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, manager.getProvinceCode())); |
| | | manager.setProvince(one.getName()); |
| | | TCity one1 = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, manager.getCityCode())); |
| | | manager.setCity(one1.getName()); |
| | | cityClient.update(manager); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/freeze") |
| | | @ResponseBody |
| | | public Object freeze(Integer id) { |
| | | try { |
| | | cityClient.freeze(id); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | @RequestMapping(value = "/unfreeze") |
| | | @ResponseBody |
| | | public Object unfreeze(Integer id) { |
| | | try { |
| | | cityClient.unfreeze(id); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/pwd") |
| | | @ResponseBody |
| | | public Object pwd(Integer id) { |
| | | try { |
| | | TCityManager byId = cityClient.getById(id); |
| | | byId.setPassword(SecureUtil.md5("a123456")); |
| | | cityClient.update(byId); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/getPeopleFromId") |
| | | public Object getPeopleFromId(Integer id,Integer state) { |
| | | try { |