Ver Fonte

Revert "冲突"

This reverts commit 37689b4cc1ba7fb994917c31befe3dcf27f2d5fa.
qinxuyang há 1 mês atrás
pai
commit
eb846bd0eb

+ 0 - 4
alien-entity/src/main/java/shop/alien/entity/store/StoreBusinessInfo.java

@@ -68,8 +68,4 @@ public class StoreBusinessInfo {
     @TableField("updated_user_id")
     private Integer updatedUserId;
 
-    @ApiModelProperty(value = "关联essential_holiday_comparison 表id")
-    @TableField("essential_id")
-    private String essentialId;
-
 }

+ 0 - 4
alien-entity/src/main/java/shop/alien/entity/store/vo/StoreBusinessInfoVo.java

@@ -3,7 +3,6 @@ package shop.alien.entity.store.vo;
 import com.fasterxml.jackson.annotation.JsonInclude;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
-import shop.alien.entity.store.EssentialHolidayComparison;
 import shop.alien.entity.store.StoreBusinessInfo;
 
 import java.util.List;
@@ -20,7 +19,4 @@ public class StoreBusinessInfoVo extends StoreBusinessInfo {
 
     @ApiModelProperty(value = "营业时间基本信息")
     private List<StoreBusinessInfo> businessInfos;
-
-    @ApiModelProperty(value = "关联的节假日信息")
-    private EssentialHolidayComparison holidayInfo;
 }

+ 1 - 1
alien-store/src/main/java/shop/alien/store/controller/StoreInfoController.java

@@ -756,7 +756,7 @@ public class StoreInfoController {
     @ApiOperation(value = "门店装修-门店营业时间")
     @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "门店id", dataType = "Long", paramType = "query", required = true)})
     @GetMapping("/getStoreInfoBusinessHours")
-    public R<List<StoreBusinessInfoVo>> getStoreInfoBusinessHours(Integer id) {
+    public R<List<StoreBusinessInfo>> getStoreInfoBusinessHours(Integer id) {
         log.info("StoreInfoController.getStoreInfoBusinessHours?id={}", id);
         return R.data(storeInfoService.getStoreInfoBusinessHours(id));
     }

+ 1 - 1
alien-store/src/main/java/shop/alien/store/service/StoreInfoService.java

@@ -39,7 +39,7 @@ public interface StoreInfoService extends IService<StoreInfo> {
     /**
      *
      */
-    List<shop.alien.entity.store.vo.StoreBusinessInfoVo>  getStoreInfoBusinessHours(Integer id);
+    List<StoreBusinessInfo>  getStoreInfoBusinessHours(Integer id);
 
     /**
      * 门店信息-修改后展示

+ 133 - 137
alien-store/src/main/java/shop/alien/store/service/impl/StoreInfoServiceImpl.java

@@ -157,6 +157,8 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
 
     private final StoreImgService storeImgService;
 
+    private final StorePaymentConfigService storePaymentConfigService;
+
     private final StoreOfficialAlbumMapper storeOfficialAlbumMapper;
 
     /**
@@ -181,10 +183,6 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
 
     private final LifeUserViolationMapper lifeUserViolationMapper;
 
-    private final EssentialHolidayComparisonMapper essentialHolidayComparisonMapper;
-
-    private final StorePaymentConfigService storePaymentConfigService;
-
 
     @Value("${spring.web.resources.excel-path}")
     private String excelPath;
@@ -398,20 +396,13 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
         if (storeMainInfoVo.getRenewContractStatus() == 1) {
             storeMainInfoVo.setRenewContractStatus(0);
         }
-        // 处理注销状态:如果已超过7天,店铺应该已被定时任务删除,这里只处理7天内的倒计时
-        if (storeMainInfoVo.getStoreStatus() == -1 && storeMainInfoVo.getLogoutTime() != null) {
+        if (storeMainInfoVo.getStoreStatus() == -1) {
             LocalDateTime localDateTime = storeMainInfoVo.getLogoutTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
             LocalDateTime future = localDateTime.plusDays(7);
             LocalDateTime now = LocalDateTime.now();
             Duration duration = Duration.between(now, future);
             long correct = duration.toMillis();
-            // 如果倒计时已过期(小于0),说明已超过7天,店铺应该已被删除,不设置倒计时
-            if (correct > 0) {
-                storeMainInfoVo.setCountdown(correct);
-            } else {
-                // 超过7天,倒计时设为0,前端应该提示店铺已注销
-                storeMainInfoVo.setCountdown(0);
-            }
+            storeMainInfoVo.setCountdown(correct);
         }
         //存入门店地址
         storeMainInfoVo.setStoreAddress(storeInfo.getStoreAddress());
@@ -442,40 +433,10 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
     }
 
     @Override
-    public List<StoreBusinessInfoVo> getStoreInfoBusinessHours(Integer id) {
-        // 查询营业时间(包含正常时间和特殊时间)
-        List<StoreBusinessInfo> storeBusinessInfoList = storeBusinessInfoMapper.selectList(
-                new LambdaQueryWrapper<StoreBusinessInfo>()
-                        .eq(StoreBusinessInfo::getStoreId, id)
-                        .eq(StoreBusinessInfo::getDeleteFlag, 0)
-                        .orderByAsc(StoreBusinessInfo::getBusinessType) // 先按类型排序:1-正常时间,2-特殊时间
-                        .orderByAsc(StoreBusinessInfo::getBusinessDate) // 再按日期排序
-        );
-
-        // 转换为 VO 并关联节假日信息
-        List<StoreBusinessInfoVo> resultList = new ArrayList<>();
-        for (StoreBusinessInfo businessInfo : storeBusinessInfoList) {
-            StoreBusinessInfoVo vo = new StoreBusinessInfoVo();
-            // 复制基本信息
-            BeanUtils.copyProperties(businessInfo, vo);
-
-            // 如果有关联的节假日ID,查询节假日信息
-            if (businessInfo.getEssentialId() != null && !businessInfo.getEssentialId().trim().isEmpty()) {
-                try {
-                    Integer essentialId = Integer.parseInt(businessInfo.getEssentialId().trim());
-                    EssentialHolidayComparison holiday = essentialHolidayComparisonMapper.selectById(essentialId);
-                    if (holiday != null) {
-                        vo.setHolidayInfo(holiday);
-                    }
-                } catch (NumberFormatException e) {
-                    log.warn("门店营业时间关联的节假日ID格式错误,storeId={}, essentialId={}", id, businessInfo.getEssentialId());
-                }
-            }
-
-            resultList.add(vo);
-        }
-
-        return resultList;
+    public List<StoreBusinessInfo> getStoreInfoBusinessHours(Integer id) {
+        //营业时间
+        List<StoreBusinessInfo> storeBusinessInfoList = storeBusinessInfoMapper.selectList(new LambdaQueryWrapper<StoreBusinessInfo>().eq(StoreBusinessInfo::getStoreId, id));
+        return storeBusinessInfoList;
     }
 
     /**
@@ -1289,17 +1250,9 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
         if (StringUtils.isNotEmpty(storeInfoDto.getStorePositionLongitude()) && StringUtils.isNotEmpty(storeInfoDto.getStorePositionLatitude())) {
             nearMeService.inGeolocation(new Point(Double.parseDouble(storeInfoDto.getStorePositionLongitude()), Double.parseDouble(storeInfoDto.getStorePositionLatitude())), storeInfo.getId().toString(), Boolean.TRUE);
         }
-
         //修改门店店铺用户绑定关系
         String userAccount = storeInfoDto.getUserAccount();
         StoreUser storeUser = storeUserMapper.selectById(userAccount);
-        storeUser.setStoreId(storeInfo.getId());
-        if (StringUtils.isNotEmpty(storeInfoDto.getStoreContact())) {
-            storeUser.setName(storeInfoDto.getStoreContact());
-        }
-        if (StringUtils.isNotEmpty(storeInfoDto.getIdCard())) {
-            storeUser.setIdCard(storeInfoDto.getIdCard());
-        }
 
         // 通过store_user_id查询支付配置并更新绑定store_id
         StorePaymentConfig paymentConfig = storePaymentConfigService.getByStoreUserId(storeUser.getId());
@@ -1308,6 +1261,13 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
             storePaymentConfigService.updateById(paymentConfig);
         }
 
+        storeUser.setStoreId(storeInfo.getId());
+        if (StringUtils.isNotEmpty(storeInfoDto.getStoreContact())) {
+            storeUser.setName(storeInfoDto.getStoreContact());
+        }
+        if (StringUtils.isNotEmpty(storeInfoDto.getIdCard())) {
+            storeUser.setIdCard(storeInfoDto.getIdCard());
+        }
         storeUserMapper.updateById(storeUser);
         //存入店铺营业执照图片
         List<String> businessLicenseAddress = storeInfoDto.getBusinessLicenseAddress();
@@ -1403,21 +1363,6 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
             tagStoreRelationMapper.insert(tagStoreRelation);
         }
 
-        // 保存门店营业时间
-        if (storeInfoDto.getStoreBusinessTime() != null && !storeInfoDto.getStoreBusinessTime().isEmpty()) {
-            List<StoreBusinessInfo> storeBusinessTimeList = storeInfoDto.getStoreBusinessTime();
-            for (StoreBusinessInfo businessInfo : storeBusinessTimeList) {
-                // 设置门店ID
-                businessInfo.setStoreId(storeInfo.getId());
-                // 新增门店时,所有营业时间都是新增,清空ID确保是新增
-                businessInfo.setId(null);
-            }
-            // 批量保存营业时间
-            for (StoreBusinessInfo businessInfo : storeBusinessTimeList) {
-                storeBusinessInfoMapper.insert(businessInfo);
-            }
-            log.info("保存门店营业时间成功,门店ID:{},营业时间数量:{}", storeInfo.getId(), storeBusinessTimeList.size());
-        }
 
         // 发送通知
         SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -2811,25 +2756,6 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
         LambdaQueryWrapper<StoreInfo> storeUserLambdaQueryWrapper = new LambdaQueryWrapper<>();
         storeUserLambdaQueryWrapper.eq(StoreInfo::getId, storeInfo.getId());
         StoreInfo storeIn = storeInfoMapper.selectOne(storeUserLambdaQueryWrapper);
-        
-        // 检查店铺是否存在
-        if (storeIn == null) {
-            throw new IllegalArgumentException("店铺不存在或已被删除");
-        }
-        
-        // 检查是否超过7天冷静期
-        if (storeIn.getLogoutTime() != null) {
-            Date logoutTime = storeIn.getLogoutTime();
-            Calendar calendar = Calendar.getInstance();
-            calendar.setTime(logoutTime);
-            calendar.add(Calendar.DAY_OF_YEAR, 7);
-            Date sevenDaysLater = calendar.getTime();
-            Date now = new Date();
-            if (now.after(sevenDaysLater)) {
-                throw new IllegalArgumentException("已超过7天冷静期,无法取消注销");
-            }
-        }
-        
         // 修改注销标记为0
         storeIn.setLogoutFlag(0);
         // 注销状态变为可用
@@ -3005,24 +2931,6 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
                 );
             }
 
-            // 5.5. 判断门店名称是否改变,如果改变则清空类型为20或21的图片
-            StoreInfo oldStoreInfo = storeInfoMapper.selectById(storeInfodto.getId());
-            if (Objects.nonNull(oldStoreInfo) && StringUtils.isNotEmpty(storeInfodto.getStoreName())) {
-                String oldStoreName = oldStoreInfo.getStoreName();
-                String newStoreName = storeInfodto.getStoreName();
-                // 如果门店名称发生改变
-                if (!Objects.equals(oldStoreName, newStoreName)) {
-                    log.info("门店名称发生改变,清空类型为20或21的图片。门店ID:{},旧名称:{},新名称:{}", 
-                            storeInfodto.getId(), oldStoreName, newStoreName);
-                    // 删除该门店类型为20或21的图片
-                    LambdaUpdateWrapper<StoreImg> imgUpdateWrapper = new LambdaUpdateWrapper<>();
-                    imgUpdateWrapper.eq(StoreImg::getStoreId, storeInfodto.getId())
-                            .in(StoreImg::getImgType, Arrays.asList(20, 21))
-                            .set(StoreImg::getDeleteFlag, 1); // 逻辑删除
-                    storeImgMapper.update(null, imgUpdateWrapper);
-                }
-            }
-
             // 6. 执行更新
             int updateNum = storeInfoMapper.updateById(storeInfo);
 
@@ -3490,11 +3398,6 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
                     map.put("overall_match", dataMap.get("overall_match"));
                     if (Objects.nonNull(matchResults) && !matchResults.isEmpty()) {
                         map.put("match_reason", matchResults.get(0).get("match_reason"));
-
-                        //根据url查询表中图片信息
-//                        LambdaQueryWrapper<StoreImg> eq = new LambdaQueryWrapper<StoreImg>().eq(StoreImg::getImgType, 20).eq(StoreImg::getImgUrl, imageUrl);
-//                        StoreImg storeImg = storeImgMapper.selectOne(eq);
-//                        storeImg.setImgStatus("true".equals(matchResults.get(0).get("overall_match"))?1:2);
                     }
                 }
             } else {
@@ -6005,7 +5908,12 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
             result.setClockInStoreToday(0);
         }
 
+
+        Map<String, Object> commitCountAndScore = storeCommentService.getCommitCountAndScore(null, 5, Integer.parseInt(storeId), null, null);
+//        result.setScore(Double.parseDouble(commitCountAndScore.get("score").toString()));
+//        result.setCommitCount(commitCountAndScore.get("commitCount").toString());
         Integer totalCount = 0;
+        double storeScore;
         Object ratingObj =  commonRatingService.getRatingCount(storeInfo.getId(), 1);
         if (ratingObj != null) {
             Map<String, Object> ratingMap = (Map<String, Object>) ratingObj;
@@ -6154,7 +6062,58 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
 
     @Override
     public StoreInfoVo getStoreInfoVoWithDistanceFields(Integer storeId, String jingdu, String weidu) {
-        return null;
+        if (storeId == null) {
+            return null;
+        }
+        StoreInfo storeInfo = storeInfoMapper.selectById(storeId);
+        if (storeInfo == null) {
+            return null;
+        }
+        StoreInfoVo result = new StoreInfoVo();
+        BeanUtils.copyProperties(storeInfo, result);
+        String storePosition = result.getStorePosition();
+        if (StringUtils.isNotEmpty(storePosition) && storePosition.contains(",")) {
+            String[] pos = storePosition.split(",");
+            result.setStorePositionLongitude(pos[0]);
+            result.setStorePositionLatitude(pos[1]);
+            result.setLongitude(pos[0]);
+            result.setLatitude(pos[1]);
+        }
+        // 用户经纬度存在时设置与用户距离(与 getClientStoreDetail 一致)
+        if ((jingdu != null && !jingdu.isEmpty()) && (weidu != null && !weidu.isEmpty())) {
+            Double distance = storeInfoMapper.getStoreDistance(jingdu + "," + weidu, result.getId());
+            result.setDistance(distance != null ? distance : 0);
+        }
+        // 店铺到最近地铁站距离及地铁名(与 getClientStoreDetail 一致)
+        if (StringUtils.isNotEmpty(storePosition) && storePosition.contains(",")) {
+            String[] pos = storePosition.split(",");
+            JSONObject nearbySubway = gaoDeMapUtil.getNearbySubway(pos[0], pos[1]);
+            String subWayName = nearbySubway != null ? nearbySubway.getString("name") : null;
+            result.setSubwayName(subWayName);
+            String subWayJing = null;
+            String subWayWei = null;
+            if (nearbySubway != null && nearbySubway.getString("location") != null) {
+                String[] loc = nearbySubway.getString("location").split(",");
+                if (loc.length >= 2) {
+                    subWayJing = loc[0];
+                    subWayWei = loc[1];
+                }
+            }
+            if (subWayJing != null && !subWayJing.isEmpty() && subWayWei != null && !subWayWei.isEmpty()) {
+                double storeJing = Double.parseDouble(pos[0]);
+                double storeWei = Double.parseDouble(pos[1]);
+                double storeDistance2 = DistanceUtil.haversineCalculateDistance(Double.parseDouble(subWayJing), Double.parseDouble(subWayWei), storeJing, storeWei);
+                result.setDistance2(storeDistance2);
+            } else {
+                result.setDistance2(0);
+            }
+        } else {
+            result.setSubwayName(null);
+            result.setDistance2(0);
+        }
+        // 门店位置/地址(与 getClientStoreDetail 及 LifeUserStoreService 一致)
+        result.setStoreLocation(result.getStoreAddress());
+        return result;
     }
 
     @Override
@@ -7632,6 +7591,7 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
         String name = holidayName.trim();
 
         try {
+            // 元旦:1月1日,通常3天假期(1月1日-1月3日)
             if (name.contains("元旦")) {
                 return new LocalDate[]{
                     LocalDate.of(year, 1, 1),
@@ -7639,16 +7599,21 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
                 };
             }
 
+            // 春节:农历正月初一,通常7天假期
             if (name.contains("春节")) {
-                if (year == 2028) {
+                // 春节日期每年不同,这里提供近几年的数据,建议使用农历工具精确计算
+                // 2024年春节:2月10日(农历正月初一)-2月16日
+                // 2025年春节:1月29日(农历正月初一)-2月4日
+                // 2026年春节:2月17日(农历正月初一)-2月23日
+                if (year == 2024) {
                     return new LocalDate[]{
-                        LocalDate.of(year, 1, 25),
-                        LocalDate.of(year, 2, 2)
+                        LocalDate.of(year, 2, 10),
+                        LocalDate.of(year, 2, 16)
                     };
-                } else if (year == 2027) {
+                } else if (year == 2025) {
                     return new LocalDate[]{
-                        LocalDate.of(year, 2, 5),
-                        LocalDate.of(year, 2, 13)
+                        LocalDate.of(year, 1, 29),
+                        LocalDate.of(year, 2, 4)
                     };
                 } else if (year == 2026) {
                     return new LocalDate[]{
@@ -7656,6 +7621,7 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
                         LocalDate.of(year, 2, 23)
                     };
                 } else {
+                    // 默认:根据年份大致估算(建议使用农历工具精确计算)
                     return new LocalDate[]{
                         LocalDate.of(year, 2, 10),
                         LocalDate.of(year, 2, 16)
@@ -7663,34 +7629,42 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
                 }
             }
 
+            // 情人节:2月14日,1天
             if (name.contains("情人节")) {
                 LocalDate date = LocalDate.of(year, 2, 14);
                 return new LocalDate[]{date, date};
             }
 
+            // 元宵节:农历正月十五,1天(通常在2月或3月)
             if (name.contains("元宵")) {
-                if (year == 2028) {
-                    LocalDate date = LocalDate.of(year, 2, 9);
+                // 元宵节是春节后的第15天,这里简化处理
+                // 2024年元宵节:2月24日,2025年元宵节:2月12日,2026年元宵节:3月4日
+                if (year == 2024) {
+                    LocalDate date = LocalDate.of(year, 2, 24);
                     return new LocalDate[]{date, date};
-                } else if (year == 2027) {
-                    LocalDate date = LocalDate.of(year, 2, 20);
+                } else if (year == 2025) {
+                    LocalDate date = LocalDate.of(year, 2, 12);
                     return new LocalDate[]{date, date};
                 } else if (year == 2026) {
-                    LocalDate date = LocalDate.of(year, 3, 3);
+                    LocalDate date = LocalDate.of(year, 3, 4);
                     return new LocalDate[]{date, date};
                 } else {
+                    // 默认:大致在2月底3月初
                     LocalDate date = LocalDate.of(year, 2, 24);
                     return new LocalDate[]{date, date};
                 }
             }
 
+            // 清明节:通常4月4日或5日,通常3天假期
             if (name.contains("清明")) {
+                // 清明节通常在4月4日或5日,这里以4月4日为基准,包含前后各1天
                 return new LocalDate[]{
                     LocalDate.of(year, 4, 4),
                     LocalDate.of(year, 4, 6)
                 };
             }
 
+            // 劳动节:5月1日,通常5天假期(5月1日-5月5日)
             if (name.contains("劳动") || name.contains("五一")) {
                 return new LocalDate[]{
                     LocalDate.of(year, 5, 1),
@@ -7698,19 +7672,25 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
                 };
             }
 
+            // 儿童节:6月1日,1天
             if (name.contains("儿童")) {
                 LocalDate date = LocalDate.of(year, 6, 1);
                 return new LocalDate[]{date, date};
             }
 
+            // 端午节:农历五月初五,通常3天假期
             if (name.contains("端午")) {
-                if (year == 2028) {
+                // 端午节通常在6月,这里提供近几年的数据
+                // 2024年端午节:6月10日,2025年端午节:5月31日,2026年端午节:6月19日
+                if (year == 2024) {
                     return new LocalDate[]{
-                        LocalDate.of(year, 6, 27)
+                        LocalDate.of(year, 6, 10),
+                        LocalDate.of(year, 6, 12)
                     };
-                } else if (year == 2027) {
+                } else if (year == 2025) {
                     return new LocalDate[]{
-                        LocalDate.of(year, 6, 9)
+                        LocalDate.of(year, 5, 31),
+                        LocalDate.of(year, 6, 2)
                     };
                 } else if (year == 2026) {
                     return new LocalDate[]{
@@ -7718,6 +7698,7 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
                         LocalDate.of(year, 6, 21)
                     };
                 } else {
+                    // 默认:大致在6月中旬
                     return new LocalDate[]{
                         LocalDate.of(year, 6, 10),
                         LocalDate.of(year, 6, 12)
@@ -7725,30 +7706,39 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
                 }
             }
 
+            // 七夕:农历七月初七,1天(通常在8月)
             if (name.contains("七夕")) {
-                if (year == 2028) {
-                    LocalDate date = LocalDate.of(year, 8, 26);
+                // 七夕通常在8月,这里提供近几年的数据
+                // 2024年七夕:8月10日,2025年七夕:7月31日,2026年七夕:8月20日
+                if (year == 2024) {
+                    LocalDate date = LocalDate.of(year, 8, 10);
                     return new LocalDate[]{date, date};
-                } else if (year == 2027) {
-                    LocalDate date = LocalDate.of(year, 8, 8);
+                } else if (year == 2025) {
+                    LocalDate date = LocalDate.of(year, 7, 31);
                     return new LocalDate[]{date, date};
                 } else if (year == 2026) {
-                    LocalDate date = LocalDate.of(year, 8, 19);
+                    LocalDate date = LocalDate.of(year, 8, 20);
                     return new LocalDate[]{date, date};
                 } else {
+                    // 默认:大致在8月上旬
                     LocalDate date = LocalDate.of(year, 8, 10);
                     return new LocalDate[]{date, date};
                 }
             }
 
+            // 中秋节:农历八月十五,通常3天假期
             if (name.contains("中秋")) {
-                if (year == 2028) {
+                // 中秋节通常在9月或10月,这里提供近几年的数据
+                // 2024年中秋节:9月17日,2025年中秋节:10月6日,2026年中秋节:9月25日
+                if (year == 2024) {
                     return new LocalDate[]{
-                        LocalDate.of(year, 10, 3)
+                        LocalDate.of(year, 9, 17),
+                        LocalDate.of(year, 9, 19)
                     };
-                } else if (year == 2027) {
+                } else if (year == 2025) {
                     return new LocalDate[]{
-                        LocalDate.of(year, 9, 15)
+                        LocalDate.of(year, 10, 6),
+                        LocalDate.of(year, 10, 8)
                     };
                 } else if (year == 2026) {
                     return new LocalDate[]{
@@ -7756,6 +7746,7 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
                         LocalDate.of(year, 9, 27)
                     };
                 } else {
+                    // 默认:大致在9月下旬
                     return new LocalDate[]{
                         LocalDate.of(year, 9, 29),
                         LocalDate.of(year, 10, 1)
@@ -7763,6 +7754,7 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
                 }
             }
 
+            // 国庆节:10月1日,通常7天假期(10月1日-10月7日)
             if (name.contains("国庆")) {
                 return new LocalDate[]{
                     LocalDate.of(year, 10, 1),
@@ -7770,16 +7762,20 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
                 };
             }
 
+            // 冬至:通常12月21日或22日,1天
             if (name.contains("冬至")) {
+                // 冬至通常在12月21日或22日,这里统一为12月22日
                 LocalDate date = LocalDate.of(year, 12, 22);
                 return new LocalDate[]{date, date};
             }
 
+            // 平安夜:12月24日,1天
             if (name.contains("平安夜")) {
                 LocalDate date = LocalDate.of(year, 12, 24);
                 return new LocalDate[]{date, date};
             }
 
+            // 圣诞节:12月25日,1天
             if (name.contains("圣诞")) {
                 LocalDate date = LocalDate.of(year, 12, 25);
                 return new LocalDate[]{date, date};