From f7e51fc7c91e474e5c0bcc79c47f074c0a59b5c3 Mon Sep 17 00:00:00 2001 From: 44323 <443237572@qq.com> Date: 星期三, 11 十月 2023 20:03:35 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/BallController.java | 465 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 435 insertions(+), 30 deletions(-) diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/BallController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/BallController.java index 210b1ff..6c7ba02 100644 --- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/BallController.java +++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/BallController.java @@ -18,14 +18,12 @@ import com.dsh.course.feignClient.other.BallClient; import com.dsh.course.feignClient.other.SiteClient; import com.dsh.course.feignClient.other.model.Site; +import com.dsh.course.service.TGameConfigService; import com.dsh.guns.config.UserExt; import com.dsh.guns.core.base.controller.BaseController; import com.dsh.guns.modular.system.model.*; import com.dsh.guns.modular.system.model.dto.*; -import com.dsh.guns.modular.system.service.ICityService; -import com.dsh.guns.modular.system.service.ICoursePackageService; -import com.dsh.guns.modular.system.service.IStoreService; -import com.dsh.guns.modular.system.service.ITSiteService; +import com.dsh.guns.modular.system.service.*; import com.dsh.guns.modular.system.util.HttpRequestUtil; import com.dsh.guns.modular.system.util.ResultUtil; import com.google.common.base.Ascii; @@ -34,6 +32,7 @@ import com.sun.org.apache.xerces.internal.impl.io.ASCIIReader; import io.netty.util.AsciiString; import io.rong.util.HttpUtil; +import io.swagger.models.auth.In; import org.apache.commons.lang.StringEscapeUtils; import org.apache.logging.log4j.util.Base64Util; import org.springframework.beans.factory.annotation.Autowired; @@ -56,7 +55,9 @@ import java.nio.charset.StandardCharsets; import java.text.ParseException; import java.text.SimpleDateFormat; +import java.time.LocalDate; import java.time.LocalTime; +import java.time.format.DateTimeFormatter; import java.util.*; @Controller @@ -106,6 +107,72 @@ return PREFIX+"ball.html"; } + //入园方式 + @RequestMapping("/joinmethod/{id}") + public String joinmethod(Model model,@PathVariable("id") Integer id) { + + + model.addAttribute("id",id); + + return PREFIX+"join.html"; + } + + + @RequestMapping("/selectJoin") + @ResponseBody + public ResultUtil join(@RequestBody MethodDto method) { + + System.out.println("============"+method); + SiteBooking siteBooking = new SiteBooking(); + siteBooking.setStatus(2); + siteBooking.setId(method.getId()); + siteBooking.setGoType(method.getMethod()); + iSiteBookingService.updateById(siteBooking); + + return new ResultUtil<>(0,0,"到店成功",null,null); + } + + + + @RequestMapping(value = "/yunying") + @ResponseBody + public ResultUtil getUserSlect() { + + + + List<SelectDto> selectDtos = storeService.getSelect(); + Map<String,List<SelectDto>> map = new HashMap<>(); + map.put("options",selectDtos); + + System.out.println("=======selectDtos====="+selectDtos); + return new ResultUtil(0,0,"编辑成功",map,""); + } + + //取消凭证页面 + @RequestMapping("/tocancel/{id}") + public String tocancel(Model model,@PathVariable("id") Integer id) { + + model.addAttribute("id",id); + + return PREFIX+"cancel.html"; + } + + + @RequestMapping("/cancel") + @ResponseBody + public ResultUtil cancel(Integer id,String voucher,String textarea) { + + System.out.println("============"+id); + SiteBooking siteBooking = new SiteBooking(); + siteBooking.setId(id); + siteBooking.setStatus(5); + siteBooking.setVoucher(voucher); + siteBooking.setRemark(textarea); + siteBooking.setCancelUserId(UserExt.getUser().getId()); + iSiteBookingService.updateById(siteBooking); + + return new ResultUtil<>(0,0,"到店成功",null,null); + } /** * 获取变更列表 @@ -123,17 +190,17 @@ @RequestMapping("/save") @ResponseBody - public ResultUtil save(String red, String blue, String province, String city, Integer site, Integer store - , String kuacheng, BigDecimal kuachengCoin, BigDecimal kuachengCash,String kuachengImage,BigDecimal kuachengInt,Integer kuachengId - , String shequ, BigDecimal shequCoin, BigDecimal shequCash,String shequImage,BigDecimal shequInt,Integer shequId - , String shemen, BigDecimal shemenCoin, BigDecimal shemenCash,String shemenImage,BigDecimal shemenInt,Integer shemenId - , String sudu, BigDecimal suduCoin, BigDecimal suduCash,String suduImage,BigDecimal suduInt,Integer suduId - , String fangkuai, BigDecimal fangkuaiCoin, BigDecimal fangkuaiCash,String fangkuaiImage,BigDecimal fangkuaiInt,Integer fangkuaiId - , String jx, BigDecimal jxCoin, BigDecimal jxCash,String jxImage,BigDecimal jxInt,Integer jxId - , String sq, BigDecimal sqCoin, BigDecimal sqCash,String sqImage,BigDecimal sqInt,Integer sqId - , String zs, BigDecimal zsCoin, BigDecimal zsCash,String zsImage,BigDecimal zsInt,Integer zsId - , String zs2, BigDecimal zs2Coin, BigDecimal zs2Cash,String zs2Image,BigDecimal zs2Int,Integer zs2Id - , String ly, BigDecimal lyCoin, BigDecimal lyCash,String lyImage,BigDecimal lyInt,Integer lyId + public ResultUtil save(Integer id, String operationId, String red, String blue, String province, String city, Integer site, Integer store + , String kuacheng, BigDecimal kuachengCoin, BigDecimal kuachengCash, String kuachengImage, BigDecimal kuachengInt, Integer kuachengId,Integer kcId + , String shequ, BigDecimal shequCoin, BigDecimal shequCash, String shequImage, BigDecimal shequInt, Integer shequId,Integer shequIId + , String shemen, BigDecimal shemenCoin, BigDecimal shemenCash, String shemenImage, BigDecimal shemenInt, Integer shemenId,Integer smId + , String sudu, BigDecimal suduCoin, BigDecimal suduCash, String suduImage, BigDecimal suduInt, Integer suduId,Integer sdId + , String fangkuai, BigDecimal fangkuaiCoin, BigDecimal fangkuaiCash, String fangkuaiImage, BigDecimal fangkuaiInt, Integer fangkuaiId,Integer fkId + , String jx, BigDecimal jxCoin, BigDecimal jxCash, String jxImage, BigDecimal jxInt, Integer jxId,Integer jxIId + , String sq, BigDecimal sqCoin, BigDecimal sqCash, String sqImage, BigDecimal sqInt, Integer sqId,Integer qwId + , String zs, BigDecimal zsCoin, BigDecimal zsCash, String zsImage, BigDecimal zsInt, Integer zsId,Integer zsIId + , String zs2, BigDecimal zs2Coin, BigDecimal zs2Cash, String zs2Image, BigDecimal zs2Int, Integer zs2Id,Integer zs2IId + , String ly, BigDecimal lyCoin, BigDecimal lyCash, String lyImage, BigDecimal lyInt, Integer lyId,Integer lyIId @@ -148,6 +215,14 @@ game.setCityCode(city); game.setSiteId(site); game.setStoreId(store); + game.setId(id); + + + if (!operationId.equals("平台")){ + game.setOperationId(Integer.valueOf(operationId));} + else { + game.setOperationId(0); + } System.out.println("============"+game); Integer gameId = ballClient.save(game); @@ -158,6 +233,7 @@ //玩湃跨城赛 TGameConfig gameConfigkuacheng = new TGameConfig(); + gameConfigkuacheng.setId(kcId); gameConfigkuacheng.setGameId(kuachengId); gameConfigkuacheng.setCash(kuachengCash); gameConfigkuacheng.setImg(kuachengImage); @@ -172,72 +248,77 @@ //社区冠军赛 TGameConfig gameConfigshequ = new TGameConfig(); + gameConfigshequ.setId(shequIId); gameConfigshequ.setGameId(shequId); gameConfigshequ.setCash(shequCash); gameConfigshequ.setImg(shequImage); gameConfigshequ.setName(shequ); gameConfigshequ.setPlayCoin(shequCoin); gameConfigshequ.setIntegral(shequInt); - gameConfigshequ.setOtherId(shequId); + gameConfigshequ.setOtherId(gameId); gameConfigList.add(gameConfigshequ); //射门速度-玩湃熊之力 TGameConfig gameConfigshemen = new TGameConfig(); gameConfigshemen.setGameId(shemenId); + gameConfigshemen.setId(smId); gameConfigshemen.setCash(shemenCash); gameConfigshemen.setImg(shemenImage); gameConfigshemen.setName(shemen); gameConfigshemen.setPlayCoin(shemenCoin); gameConfigshemen.setIntegral(shemenInt); - gameConfigshemen.setOtherId(shemenId); + gameConfigshemen.setOtherId(gameId); gameConfigList.add(gameConfigshemen); //玩湃熊之力-速度 TGameConfig gameConfigsudu = new TGameConfig(); - gameConfigsudu.setGameId(suduId); + gameConfigsudu.setGameId(suduId);gameConfigsudu.setId(sdId); gameConfigsudu.setCash(suduCash); gameConfigsudu.setImg(suduImage); gameConfigsudu.setName(sudu); gameConfigsudu.setPlayCoin(suduCoin); gameConfigsudu.setIntegral(suduInt); - gameConfigsudu.setOtherId(suduId); + gameConfigsudu.setOtherId(gameId); gameConfigList.add(gameConfigsudu); //方块球王 TGameConfig gameConfigfangkuai = new TGameConfig(); gameConfigfangkuai.setGameId(fangkuaiId); + gameConfigfangkuai.setId(fkId); gameConfigfangkuai.setCash(fangkuaiCash); gameConfigfangkuai.setImg(fangkuaiImage); gameConfigfangkuai.setName(fangkuai); gameConfigfangkuai.setPlayCoin(fangkuaiCoin); gameConfigfangkuai.setIntegral(fangkuaiInt); - gameConfigfangkuai.setOtherId(fangkuaiId); + gameConfigfangkuai.setOtherId(gameId); gameConfigList.add(gameConfigfangkuai); //镜像阵容 TGameConfig gameConfigjx = new TGameConfig(); gameConfigjx.setGameId(jxId); + gameConfigjx.setId(jxIId); gameConfigjx.setCash(jxCash); gameConfigjx.setImg(jxImage); gameConfigjx.setName(jx); gameConfigjx.setPlayCoin(jxCoin); gameConfigjx.setIntegral(jxInt); - gameConfigjx.setOtherId(jxId); + gameConfigjx.setOtherId(gameId); gameConfigList.add(gameConfigjx); //社区小球王 TGameConfig gameConfigsq = new TGameConfig(); gameConfigsq.setGameId(sqId); + gameConfigsq.setId(qwId); gameConfigsq.setCash(sqCash); gameConfigsq.setImg(sqImage); gameConfigsq.setName(sq); gameConfigsq.setPlayCoin(sqCoin); gameConfigsq.setIntegral(sqInt); - gameConfigsq.setOtherId(sqId); + gameConfigsq.setOtherId(gameId); gameConfigList.add(gameConfigsq); @@ -245,34 +326,36 @@ //涨姿势 TGameConfig gameConfigzs = new TGameConfig(); gameConfigzs.setGameId(zsId); + gameConfigzs.setId(zsIId); gameConfigzs.setCash(zsCash); gameConfigzs.setImg(zsImage); gameConfigzs.setName(zs); gameConfigzs.setPlayCoin(zsCoin); gameConfigzs.setIntegral(zsInt); - gameConfigzs.setOtherId(zsId); + gameConfigzs.setOtherId(gameId); gameConfigList.add(gameConfigzs); //涨姿势2 TGameConfig gameConfigzs2 = new TGameConfig(); - gameConfigzs2.setGameId(zs2Id); + gameConfigzs2.setGameId(zs2Id);gameConfigzs2.setId(zs2IId); gameConfigzs2.setCash(zs2Cash); gameConfigzs2.setImg(zs2Image); gameConfigzs2.setName(zs2); gameConfigzs2.setPlayCoin(zs2Coin); gameConfigzs2.setIntegral(zs2Int); - gameConfigzs2.setOtherId(zs2Id); + gameConfigzs2.setOtherId(gameId); gameConfigList.add(gameConfigzs2); //绿茵密码 TGameConfig gameConfigly = new TGameConfig(); gameConfigly.setGameId(lyId); + gameConfigly.setId(lyIId); gameConfigly.setCash(lyCash); gameConfigly.setImg(lyImage); gameConfigly.setName(ly); gameConfigly.setPlayCoin(lyCoin); gameConfigly.setIntegral(lyInt); - gameConfigly.setOtherId(lyId); + gameConfigly.setOtherId(gameId); gameConfigList.add(gameConfigly); @@ -285,13 +368,15 @@ @RequestMapping("/pre_add") public String add(Model model) { - + model.addAttribute("is","${is}"); return PREFIX+"ball_pre_add.html"; } + @Autowired + private TGameConfigService gameConfigService; @RequestMapping("/pre_edit/{id}") public String pre_edit(@PathVariable("id") Integer id,Model model) { @@ -299,8 +384,297 @@ System.out.println("---------game------"+game); model.addAttribute("game",game); + + TGameConfig kc = gameConfigService.getOne(new QueryWrapper<TGameConfig>().eq("otherId", id).eq("gameId", 14)); + model.addAttribute("kc",kc); + + + TGameConfig sq = gameConfigService.getOne(new QueryWrapper<TGameConfig>().eq("otherId", id).eq("gameId", 16)); + model.addAttribute("sq",sq); + + + TGameConfig sm = gameConfigService.getOne(new QueryWrapper<TGameConfig>().eq("otherId", id).eq("gameId", 13)); + model.addAttribute("sm",sm); + + TGameConfig sd = gameConfigService.getOne(new QueryWrapper<TGameConfig>().eq("otherId", id).eq("gameId", 15)); + model.addAttribute("sd",sd); + + TGameConfig fk = gameConfigService.getOne(new QueryWrapper<TGameConfig>().eq("otherId", id).eq("gameId", 1)); + model.addAttribute("fk",fk); + + TGameConfig jx = gameConfigService.getOne(new QueryWrapper<TGameConfig>().eq("otherId", id).eq("gameId", 7)); + model.addAttribute("jx",jx); + + TGameConfig qw = gameConfigService.getOne(new QueryWrapper<TGameConfig>().eq("otherId", id).eq("gameId", 8)); + model.addAttribute("qw",qw); + + TGameConfig zs = gameConfigService.getOne(new QueryWrapper<TGameConfig>().eq("otherId", id).eq("gameId", 10)); + model.addAttribute("zs",zs); + + TGameConfig zs2 = gameConfigService.getOne(new QueryWrapper<TGameConfig>().eq("otherId", id).eq("gameId", 11)); + model.addAttribute("zs2",zs2); + + TGameConfig ly = gameConfigService.getOne(new QueryWrapper<TGameConfig>().eq("otherId", id).eq("gameId", 5)); + model.addAttribute("ly",ly); + + + return PREFIX+"ball_pre_edit.html"; } + + @Autowired + private ISiteBookingService iSiteBookingService; + + @RequestMapping("/yueyue_edit/{id}") + public String yueyue_edit(@PathVariable("id") Integer id,Model model) { + + List<String> strings1 = new ArrayList<>(); + + SiteBooking book = iSiteBookingService.getById(id); + model.addAttribute("item", book); + if (book.getMoney()!=null){ + model.addAttribute("money",book.getMoney().split(","));} + String[] split1 = book.getTimes().split(";"); + model.addAttribute("date",split1[0].substring(0,10)); + + for (String s : split1) { + + String convertedValue = s.substring(11); + strings1.add(convertedValue); + } + + System.out.println("========strings1====="+strings1); + +//时间段 + List<String> strings = new ArrayList<>(); +// List<SiteBooking> siteBookings = siteClient.listBooks(book.getSiteId()); + List<SiteBooking> siteBookings = iSiteBookingService.list(new QueryWrapper<SiteBooking>().eq("siteId", book.getSiteId()).like("times",split1[0].substring(0,10))); + System.out.println("=======siteBookings======"+siteBookings); + for (SiteBooking siteBooking : siteBookings) { + String[] split = siteBooking.getTimes().split(";"); + for (String s : split) { + + String convertedValue = s.substring(11); + strings.add(convertedValue); + } + + } + System.out.println("======strings======="+strings); + + + List<OrderDto> timeRanges = new ArrayList<>(); + + + Site site = siteClient.listById(book.getSiteId()); + System.out.println("================"+site); + String appointmentStartTime = site.getAppointmentStartTime(); + String appointmentEndTime = site.getAppointmentEndTime(); + //生成用于比较日期是否超过的当前日期 + LocalDate currentDate = LocalDate.now(); + LocalDate parsedDate = LocalDate.parse(split1[0].substring(0,10), DateTimeFormatter.ISO_DATE); + boolean isAfterCurrentDate = parsedDate.isBefore(currentDate); + System.out.println("是否超过当前日期"+isAfterCurrentDate); + String currentTime = appointmentStartTime; + while (currentTime.compareTo(appointmentEndTime) < 0) { + String nextTime = getNextTime(currentTime); + + + String timeRange = currentTime + "-" + nextTime; + OrderDto orderDto = new OrderDto(); + orderDto.setTime(timeRange); + + LocalTime currentTime1 = LocalTime.now(); + LocalTime targetTime = LocalTime.parse(currentTime); + + boolean hasExceeded = currentTime1.isAfter(targetTime); + //是否超过当前时间 + if (hasExceeded){ + orderDto.setState(0); + } + //是否已经预定 + if (strings.contains(timeRange)){ + orderDto.setState(0); + } + //日期是否超过 + if (isAfterCurrentDate){ + orderDto.setState(0); + } + //是否是当前场地当前日期预定的 + if (strings1.contains(timeRange)){ + orderDto.setState(1); + } + + + + + timeRanges.add(orderDto); + currentTime = nextTime; + } + System.out.println("-------------"+timeRanges); + model.addAttribute("timeRanges",timeRanges); + +System.out.println("======timeRanges========"+timeRanges); + + + + + + + Integer objectType = UserExt.getUser().getObjectType(); + Integer objectId = UserExt.getUser().getObjectId(); + + String cityCode = null; + if(objectType == 2){//城市管理员 + CityManager cityManager = cityManagerClient.queryCityManagerById(objectId); + cityCode = cityManager.getCityCode(); + } + List<Map<String, Object>> list = storeService.queryProvince(cityCode); + model.addAttribute("province", list); + Object code = list.get(0).get("code"); + List<Map<String, Object>> list1 = storeService.queryCity(code.toString(), cityCode); + model.addAttribute("city", list1); + String code1 = list1.get(0).get("code").toString(); + List<TStore> list2 = storeService.list(new QueryWrapper<TStore>().eq("cityCode", code1).eq("state", 1)); + model.addAttribute("store", list2); + TStore store = list2.get(0); + List<TSite> list3 = siteService.list(new QueryWrapper<TSite>().eq("storeId", store.getId()).eq("state", 1)); + model.addAttribute("site", list3); + + + return PREFIX+"yuyue_edit.html"; + } + + + + +@Autowired +private IUserService userService; + @RequestMapping("/yueyue_info/{id}") + public String yueyue_info(@PathVariable("id") Integer id,Model model) { + + List<String> strings1 = new ArrayList<>(); + + SiteBooking book = iSiteBookingService.getById(id); + model.addAttribute("item", book); + if (book.getMoney()!=null){ + model.addAttribute("money",book.getMoney().split(","));} + String[] split1 = book.getTimes().split(";"); + model.addAttribute("date",split1[0].substring(0,10)); + + + User user = userService.getById(book.getCancelUserId()); + if (user!=null) { + model.addAttribute("cancelUser", user.getName()); + } + + + for (String s : split1) { + + String convertedValue = s.substring(11); + strings1.add(convertedValue); + } + + System.out.println("========strings1====="+strings1); + +//时间段 + List<String> strings = new ArrayList<>(); +// List<SiteBooking> siteBookings = siteClient.listBooks(book.getSiteId()); + List<SiteBooking> siteBookings = iSiteBookingService.list(new QueryWrapper<SiteBooking>().eq("siteId", book.getSiteId()).like("times",split1[0].substring(0,10))); + System.out.println("=======siteBookings======"+siteBookings); + for (SiteBooking siteBooking : siteBookings) { + String[] split = siteBooking.getTimes().split(";"); + for (String s : split) { + + String convertedValue = s.substring(11); + strings.add(convertedValue); + } + + } + System.out.println("======strings======="+strings); + + + List<OrderDto> timeRanges = new ArrayList<>(); + + + Site site = siteClient.listById(book.getSiteId()); + System.out.println("================"+site); + String appointmentStartTime = site.getAppointmentStartTime(); + String appointmentEndTime = site.getAppointmentEndTime(); + //生成用于比较日期是否超过的当前日期 + LocalDate currentDate = LocalDate.now(); + LocalDate parsedDate = LocalDate.parse(split1[0].substring(0,10), DateTimeFormatter.ISO_DATE); + boolean isAfterCurrentDate = parsedDate.isBefore(currentDate); + System.out.println("是否超过当前日期"+isAfterCurrentDate); + String currentTime = appointmentStartTime; + while (currentTime.compareTo(appointmentEndTime) < 0) { + String nextTime = getNextTime(currentTime); + + + String timeRange = currentTime + "-" + nextTime; + OrderDto orderDto = new OrderDto(); + orderDto.setTime(timeRange); + + LocalTime currentTime1 = LocalTime.now(); + LocalTime targetTime = LocalTime.parse(currentTime); + + boolean hasExceeded = currentTime1.isAfter(targetTime); + //是否超过当前时间 + if (hasExceeded){ + orderDto.setState(0); + } + //是否已经预定 + if (strings.contains(timeRange)){ + orderDto.setState(0); + } + //日期是否超过 + if (isAfterCurrentDate){ + orderDto.setState(0); + } + //是否是当前场地当前日期预定的 + if (strings1.contains(timeRange)){ + orderDto.setState(1); + } + + + + + timeRanges.add(orderDto); + currentTime = nextTime; + } + System.out.println("-------------"+timeRanges); + model.addAttribute("timeRanges",timeRanges); + + System.out.println("======timeRanges========"+timeRanges); + + + + + + + Integer objectType = UserExt.getUser().getObjectType(); + Integer objectId = UserExt.getUser().getObjectId(); + + String cityCode = null; + if(objectType == 2){//城市管理员 + CityManager cityManager = cityManagerClient.queryCityManagerById(objectId); + cityCode = cityManager.getCityCode(); + } + List<Map<String, Object>> list = storeService.queryProvince(cityCode); + model.addAttribute("province", list); + Object code = list.get(0).get("code"); + List<Map<String, Object>> list1 = storeService.queryCity(code.toString(), cityCode); + model.addAttribute("city", list1); + String code1 = list1.get(0).get("code").toString(); + List<TStore> list2 = storeService.list(new QueryWrapper<TStore>().eq("cityCode", code1).eq("state", 1)); + model.addAttribute("store", list2); + TStore store = list2.get(0); + List<TSite> list3 = siteService.list(new QueryWrapper<TSite>().eq("storeId", store.getId()).eq("state", 1)); + model.addAttribute("site", list3); + + + return PREFIX+"yuyue_info.html"; + } + @RequestMapping("/paike") @@ -434,11 +808,13 @@ @RequestMapping("/yuyuetimes/{id}") @ResponseBody - public List<OrderDto> yuyuetimes(@PathVariable("id") Integer id) { - + public List<OrderDto> yuyuetimes(@PathVariable("id") Integer id,String date) { + System.out.println("=======date======"+date); List<String> strings = new ArrayList<>(); - List<SiteBooking> siteBookings = siteClient.listBooks(id); + +// List<SiteBooking> siteBookings = siteClient.listBooks(id); + List<SiteBooking> siteBookings = iSiteBookingService.list(new QueryWrapper<SiteBooking>().eq("siteId", id).like("times",date)); System.out.println("=======siteBookings======"+siteBookings); for (SiteBooking siteBooking : siteBookings) { String[] split = siteBooking.getTimes().split(";"); @@ -503,6 +879,25 @@ } return String.format("%02d:%02d", hour, minute); + +// String[] parts = currentTime.split(":"); +// int hour = Integer.parseInt(parts[0]); +// int minute = Integer.parseInt(parts[1]); +// +// if (minute == 45) { +// hour++; +// minute = 0; +// } else if (minute == 0){ +// minute = 15; +// }else if (minute == 15){ +// minute = 30; +// }else if (minute == 30){ +// minute = 45; +// } +// +// return String.format("%02d:%02d", hour, minute); + + } @@ -556,4 +951,14 @@ return new ResultUtil<>(null,200,null,null,null); } + @RequestMapping("/orderedit") + @ResponseBody + public ResultUtil orderedit(SiteBooking siteBooking){ + iSiteBookingService.updateById(siteBooking); + + System.out.println("================="+siteBooking); + + return new ResultUtil<>(null,200,null,null,null); + } + } -- Gitblit v1.7.1