| | |
| | | @RequestMapping("/base/site/addSiteBooking") |
| | | public Object addSiteBooking(@RequestBody SiteBooking siteBooking){ |
| | | if(siteBooking.getId()!= null ){ |
| | | |
| | | return siteBookingService.updateById(siteBooking); |
| | | }else { |
| | | return siteBookingService.save(siteBooking); |
| | |
| | | map.put("siteType",siteType.getName()); |
| | | map.put("shopName",byId1.getName()); |
| | | map.put("shopAddress",byId1.getAddress()); |
| | | |
| | | map.put("name",site.getName()); |
| | | |
| | | |
| | | |
| | | List<Integer> ids = getIds(byId.getSiteId()); |
| | | byId.setStorePhone(byId1.getPhone()); |
| | | |
| | | //拼接开始结束时间 |
| | | Date startTime = byId.getStartTime(); |
| | | Date endTime = byId.getEndTime(); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| | | |
| | | String startTimeString = sdf.format(startTime); |
| | | String endTimeString = sdf.format(endTime); |
| | | |
| | | String result = startTimeString + "-" + endTimeString.substring(11); |
| | | byId.setTimes(result); |
| | | |
| | | |
| | | |
| | | |
| | | byId.setSid(Arrays.asList(storeId)); |
| | | List<Site> list = siteService.list(new LambdaQueryWrapper<Site>().eq(Site::getStoreId, storeId).eq(Site::getSign, 1)); |
| | | List<Site> list = siteService.list(new LambdaQueryWrapper<Site>() |
| | | .eq(Site::getStoreId, storeId) |
| | | .eq(Site::getSign, 1)); |
| | | List<Integer> collect = list.stream().map(Site::getId).collect(Collectors.toList()); |
| | | byId.setRid(collect); |
| | | map.put("data",byId); |
| | | |
| | | |
| | | map.put("ids",ids); |
| | | return ResultUtil.success(map); |
| | | }catch (Exception e){ |