刘帅
2026-09-28 2914eea299ec5a1d6bfdf40b2743226ef9cbc5af
cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java
@@ -677,9 +677,18 @@
    })
    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();