| | |
| | | }) |
| | | 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(); |