| | |
| | | }) |
| | | public ResultUtil<Map<String, Object>> queryMySiteById(Integer id) { |
| | | try { |
| | | Integer uid = tokenUtil.getUserIdFormRedis(); |
| | | if (uid == null) { |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | System.err.println("预约id"+id); |
| | | SiteBooking siteBooking = siteBookingService.getById(id); |
| | | // This endpoint now returns the original contact data to the APP, |
| | | // so an authenticated user may only read their own booking. |
| | | if (siteBooking == null || !uid.equals(siteBooking.getAppUserId())) { |
| | | return ResultUtil.error("预约记录不存在"); |
| | | } |
| | | Integer targetAudience = siteBooking.getTargetAudience(); |
| | | System.err.println("预约"+siteBooking); |
| | | Integer storeId = siteBooking.getStoreId(); |
| | |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/api/site/entryQr") |
| | | @ApiOperation(value = "获取订场进场二维码", tags = {"用户—预约场地"}) |
| | | @ApiOperation(value = "获取订场进场二维码(废弃没用)", tags = {"用户—预约场地"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "预约数据 id", name = "bookingId", dataType = "int", required = true), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header") |
| | |
| | | } |
| | | Map<String, Object> data = new HashMap<>(); |
| | | data.put("shortCode", link.getShortCode()); |
| | | data.put("url", "https://www.weparklife.com/other/q/" + link.getShortCode()); |
| | | data.put("url", "http://8.137.22.229:56666/other/q/" + link.getShortCode()); |
| | | data.put("expiresAt", link.getExpiresAt()); |
| | | return ResultUtil.success(data); |
| | | } catch (Exception e) { |