| | |
| | | @Autowired |
| | | private CityManagerClient cityManagerClient; |
| | | |
| | | |
| | | /** |
| | | * 获取所有场地 |
| | | */ |
| | | @RequestMapping("/base/site/getList") |
| | | @ResponseBody |
| | | public List<Site> getList(){ |
| | | return siteService.list(new QueryWrapper<Site>().ne("state",3)); |
| | | } |
| | | /** |
| | | * 获取场地预约记录 |
| | | */ |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加场地管理 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/base/site/addSiteBooking") |
| | | public Object addSiteBooking(@RequestBody SiteBooking siteBooking){ |
| | | if(siteBooking.getId()!= null ){ |
| | | |
| | | return siteBookingService.updateById(siteBooking); |
| | | }else { |
| | | return siteBookingService.save(siteBooking); |
| | | } |
| | | } |
| | | |
| | | @RequestMapping("/base/site/listById") |
| | | public Site listById(@RequestParam("id") Integer id){ |
| | | Site byId = siteService.getById(id); |
| | | return byId; |
| | | } |
| | | |
| | | |
| | | @RequestMapping("/base/site/listBooks") |
| | | public List<SiteBooking> listBooks(@RequestParam("id") Integer id){ |
| | | List<SiteBooking> siteId = siteBookingService.list(new QueryWrapper<SiteBooking>().eq("siteId", id)); |
| | | return siteId; |
| | | } |
| | | @ResponseBody |
| | | @PostMapping("/base/site/querySiteType") |
| | | @ApiOperation(value = "获取场地类型", tags = {"用户—预约场地"}) |
| | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/site/queryByCode") |
| | | public Integer queryByCode(@RequestBody String code){ |
| | | |
| | | return siteBookingService.queryByCode(code); |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/site/getNewAddSiteList") |
| | | public List<SiteVo> getAppUserSiteList(){ |
| | | List<SiteVo> siteVos = new ArrayList<>(); |