Explorar o código

门店营业时间 解决冲突 提交

qinxuyang hai 1 mes
pai
achega
41f0dd7550

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

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

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

@@ -3,6 +3,7 @@ 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;
@@ -19,4 +20,7 @@ public class StoreBusinessInfoVo extends StoreBusinessInfo {
 
     @ApiModelProperty(value = "营业时间基本信息")
     private List<StoreBusinessInfo> businessInfos;
+
+    @ApiModelProperty(value = "关联的节假日信息")
+    private EssentialHolidayComparison holidayInfo;
 }

+ 3 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/StoreInfoVo.java

@@ -190,6 +190,9 @@ public class StoreInfoVo extends StoreInfo {
     private StoreBusinessInfo storeBusinessInfo;
     private List<StoreBusinessInfo> storeBusinessInfos;
 
+    @ApiModelProperty(value = "门店营业时间列表(包含节假日信息)")
+    private List<StoreBusinessInfoVo> storeBusinessInfoVos;
+
     @ApiModelProperty(value = "是否营业中(0否1是)")
     private Integer yyFlag;
 

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

@@ -17,7 +17,6 @@ import org.springframework.beans.BeanUtils;
 import org.springframework.http.ResponseEntity;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartRequest;
 import shop.alien.entity.result.R;
 import shop.alien.entity.store.*;
@@ -27,8 +26,9 @@ import shop.alien.entity.storePlatform.StoreLicenseHistory;
 import shop.alien.mapper.*;
 import shop.alien.mapper.storePlantform.StoreLicenseHistoryMapper;
 import shop.alien.store.config.BaseRedisService;
-import shop.alien.store.service.StoreInfoService;
-import shop.alien.store.service.StoreQualificationService;
+import shop.alien.store.service.*;
+import shop.alien.entity.store.StoreCuisine;
+import shop.alien.entity.store.StorePrice;
 import shop.alien.entity.store.UserLoginInfo;
 import shop.alien.util.common.TokenInfo;
 import springfox.documentation.annotations.ApiIgnore;
@@ -76,6 +76,12 @@ public class StoreInfoController {
     private final StoreUserMapper storeUserMapper;
     private final LifeFansMapper lifeFansMapper;
 
+    private final StoreCuisineService storeCuisineService;
+    private final StorePriceService storePriceService;
+    private final StoreStaffConfigService storeStaffConfigService;
+    private final PerformanceListService performanceListService;
+    private final SportsEquipmentFacilityService sportsEquipmentFacilityService;
+
     @ApiOperation("获取所有门店")
     @ApiOperationSupport(order = 1)
     @GetMapping("/getAll")
@@ -750,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<StoreBusinessInfo>> getStoreInfoBusinessHours(Integer id) {
+    public R<List<StoreBusinessInfoVo>> getStoreInfoBusinessHours(Integer id) {
         log.info("StoreInfoController.getStoreInfoBusinessHours?id={}", id);
         return R.data(storeInfoService.getStoreInfoBusinessHours(id));
     }
@@ -1807,63 +1813,114 @@ public class StoreInfoController {
     }
 
     /**
-     * 设置收款账号(接收表单参数及证书/图片等文件上传)
-     * 账号类型为微信时:传 appid、mchid、API证书序列号、APIv3 Key、支付公钥ID、私钥证书(.pem)、公钥证书(.pem)
-     * 账号类型为支付宝时:传 应用ID、应用私钥、应用公钥证书(.crt)、支付宝公钥证书(.crt)、支付宝根证书(.crt)
+     * 根据经营板块返回店铺详情页可展示的标签(仅当对应接口有数据时才展示)
+     * <p>
+     * 美食:价目表、人员;
+     * 休闲娱乐:价目表、人员、演出;
+     * 生活服务:价目表、设施、教练、人员。
+     * 每个标签会调用对应数据接口判断是否有数据,无数据则不返回该标签。
+     * </p>
+     *
+     * @param storeId         门店 ID
+     * @param businessSection 经营板块:传 dictId 或名称。1/美食、2/休闲娱乐、3/生活服务
+     * @return 有数据的标签列表,每项包含标签名和对应接口路径
      */
-    @ApiOperation("设置收款账号")
+    @ApiOperation("根据经营板块获取店铺详情页展示标签(仅展示有数据的标签)")
     @ApiOperationSupport(order = 100)
-    @PostMapping(value = "/setCollectionAccount", consumes = "multipart/form-data")
-    public R<String> setCollectionAccount(
-            @ApiParam(value = "账号类型:wechat-微信,alipay-支付宝", required = true) @RequestParam("accountType") String accountType,
-            @ApiParam("微信-appid") @RequestParam(value = "appid", required = false) String appid,
-            @ApiParam("微信-商户号mchid") @RequestParam(value = "mchid", required = false) String mchid,
-            @ApiParam("微信-API证书序列号") @RequestParam(value = "apiCertificateSerialNumber", required = false) String apiCertificateSerialNumber,
-            @ApiParam("微信-APIv3 Key") @RequestParam(value = "apiV3Key", required = false) String apiV3Key,
-            @ApiParam("微信-支付公钥ID") @RequestParam(value = "paymentPublicKeyId", required = false) String paymentPublicKeyId,
-            @ApiParam("微信-私钥证书(.pem)") @RequestParam(value = "privateKeyCert", required = false) MultipartFile privateKeyCert,
-            @ApiParam("微信-公钥证书(.pem)") @RequestParam(value = "publicKeyCert", required = false) MultipartFile publicKeyCert,
-            @ApiParam("支付宝-应用ID") @RequestParam(value = "appId", required = false) String appId,
-            @ApiParam("支付宝-应用私钥") @RequestParam(value = "appPrivateKey", required = false) String appPrivateKey,
-            @ApiParam("支付宝-应用公钥证书(.crt)") @RequestParam(value = "appPublicKeyCert", required = false) MultipartFile appPublicKeyCert,
-            @ApiParam("支付宝-支付宝公钥证书(.crt)") @RequestParam(value = "alipayPublicKeyCert", required = false) MultipartFile alipayPublicKeyCert,
-            @ApiParam("支付宝-支付宝根证书(.crt)") @RequestParam(value = "alipayRootCert", required = false) MultipartFile alipayRootCert
-    ) {
-        log.info("StoreInfoController.setCollectionAccount accountType={}, appid={}, mchid={}, appId={}",
-                accountType, appid, mchid, appId);
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "storeId", value = "门店ID", dataType = "Integer", paramType = "query", required = true),
+            @ApiImplicitParam(name = "businessSection", value = "经营板块:1或美食、2或休闲娱乐、3或生活服务", dataType = "String", paramType = "query", required = true)
+    })
+    @GetMapping("/getStoreSectionTags")
+    public R<Map<String, Boolean>> getStoreSectionTags(
+            @RequestParam Integer storeId,
+            @RequestParam String businessSection) {
+        log.info("StoreInfoController.getStoreSectionTags?storeId={}, businessSection={}", storeId, businessSection);
+        if (storeId == null) {
+            return R.fail("门店ID不能为空");
+        }
+        if (StringUtils.isBlank(businessSection)) {
+            return R.fail("经营板块不能为空");
+        }
+        String section = businessSection.trim();
+        boolean isFood = "3".equals(section) || "美食".equals(section);
+        boolean isLeisure = "1".equals(section) || "休闲娱乐".equals(section);
+        boolean isLifeService = "2".equals(section) || "生活服务".equals(section);
+        if (!isFood && !isLeisure && !isLifeService) {
+            return R.fail("未知的经营板块: " + businessSection);
+        }
+        Map<String, Boolean> tags = buildSectionTagsByData(storeId, isFood, isLeisure, isLifeService);
+        return R.data(tags);
+    }
+
+    /**
+     * 根据实际数据判断各标签是否有数据,返回 Map(key 为标签名,value 有数据 true / 无数据 false)
+     */
+    private Map<String, Boolean> buildSectionTagsByData(Integer storeId, boolean isFood, boolean isLeisure, boolean isLifeService) {
+        Map<String, Boolean> map = new HashMap<>(8);
+
+        map.put("showPriceCard", hasPriceListData(storeId));
+        map.put("showStaffCard", hasStaffData(storeId));
+
+        if (isLeisure) {
+            map.put("showPerformance", hasPerformanceData(storeId));
+        }
+        if (isLifeService) {
+            map.put("showFacilityServiceCard", hasFacilityData(storeId));
+        }
+
+        return map;
+    }
+
+    /** 价目表是否有数据:美食价目或通用价目存在且已上架 */
+    private boolean hasPriceListData(Integer storeId) {
+        long cuisineCount = storeCuisineService.count(
+                new LambdaQueryWrapper<StoreCuisine>()
+                        .eq(StoreCuisine::getStoreId, storeId)
+                        .eq(StoreCuisine::getShelfStatus, 1));
+        if (cuisineCount > 0) {
+            return true;
+        }
+        return storePriceService.count(
+                new LambdaQueryWrapper<StorePrice>()
+                        .eq(StorePrice::getStoreId, storeId)
+                        .eq(StorePrice::getShelfStatus, 1)) > 0;
+    }
+
+    /** 人员是否有数据:按标题分组的员工列表非空 */
+    private boolean hasStaffData(Integer storeId) {
         try {
-            if (StringUtils.isBlank(accountType)) {
-                return R.fail("账号类型不能为空");
-            }
-            if ("wechat".equalsIgnoreCase(accountType)) {
-                if (StringUtils.isAnyBlank(appid, mchid, apiCertificateSerialNumber, apiV3Key, paymentPublicKeyId)) {
-                    return R.fail("微信账号:appid、mchid、API证书序列号、APIv3 Key、支付公钥ID为必填");
-                }
-                if (privateKeyCert == null || privateKeyCert.isEmpty() || publicKeyCert == null || publicKeyCert.isEmpty()) {
-                    return R.fail("微信账号:私钥证书、公钥证书为必传,支持.pem格式,大小不超过2MB");
-                }
-                // TODO: 校验 .pem 格式、大小 2MB,落库或写配置
-                return R.success("微信收款账号参数已接收,待接入存储逻辑");
-            }
-            if ("alipay".equalsIgnoreCase(accountType)) {
-                if (StringUtils.isAnyBlank(appId, appPrivateKey)) {
-                    return R.fail("支付宝账号:应用ID、应用私钥为必填");
-                }
-                if (appPublicKeyCert == null || appPublicKeyCert.isEmpty()
-                        || alipayPublicKeyCert == null || alipayPublicKeyCert.isEmpty()
-                        || alipayRootCert == null || alipayRootCert.isEmpty()) {
-                    return R.fail("支付宝账号:应用公钥证书、支付宝公钥证书、支付宝根证书为必传,支持.crt格式");
-                }
-                // TODO: 校验 .crt 格式,落库或写配置
-                return R.success("支付宝收款账号参数已接收,待接入存储逻辑");
-            }
-            return R.fail("账号类型仅支持 wechat 或 alipay");
+            List<StaffTitleGroupVo> groups = storeStaffConfigService.queryStaffListByTitle(storeId);
+            return CollectionUtils.isNotEmpty(groups);
         } catch (Exception e) {
-            log.error("设置收款账号异常", e);
-            return R.fail(e.getMessage());
+            log.warn("查询人员数据异常 storeId={}, {}", storeId, e.getMessage());
+            return false;
+        }
+    }
+
+    /** 演出是否有数据:演出列表接口有记录 */
+    private boolean hasPerformanceData(Integer storeId) {
+        try {
+            IPage<PerformanceListVo> page = performanceListService.queryPerformanceList(1, 1, storeId);
+            return page != null && page.getTotal() > 0;
+        } catch (Exception e) {
+            log.warn("查询演出数据异常 storeId={}, {}", storeId, e.getMessage());
+            return false;
+        }
+    }
+
+    /** 设施是否有数据:运动器材设施分类汇总有数据 */
+    private boolean hasFacilityData(Integer storeId) {
+        try {
+            List<SportsEquipmentFacilityCategorySummaryVo> list = sportsEquipmentFacilityService.getCategorySummary(storeId);
+            return CollectionUtils.isNotEmpty(list);
+        } catch (Exception e) {
+            log.warn("查询设施数据异常 storeId={}, {}", storeId, e.getMessage());
+            return false;
         }
     }
-    
+
+
     /**
      * 店铺信息(包含商户头像)
      */
@@ -1882,5 +1939,4 @@ public class StoreInfoController {
     }
 
 
-    
 }

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

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

+ 143 - 88
alien-store/src/main/java/shop/alien/store/service/impl/StoreInfoServiceImpl.java

@@ -156,8 +156,6 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
 
     private final StoreImgService storeImgService;
 
-    private final StorePaymentConfigService storePaymentConfigService;
-
     private final StoreOfficialAlbumMapper storeOfficialAlbumMapper;
 
     /**
@@ -182,6 +180,10 @@ 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;
@@ -395,13 +397,20 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
         if (storeMainInfoVo.getRenewContractStatus() == 1) {
             storeMainInfoVo.setRenewContractStatus(0);
         }
-        if (storeMainInfoVo.getStoreStatus() == -1) {
+        // 处理注销状态:如果已超过7天,店铺应该已被定时任务删除,这里只处理7天内的倒计时
+        if (storeMainInfoVo.getStoreStatus() == -1 && storeMainInfoVo.getLogoutTime() != null) {
             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();
-            storeMainInfoVo.setCountdown(correct);
+            // 如果倒计时已过期(小于0),说明已超过7天,店铺应该已被删除,不设置倒计时
+            if (correct > 0) {
+                storeMainInfoVo.setCountdown(correct);
+            } else {
+                // 超过7天,倒计时设为0,前端应该提示店铺已注销
+                storeMainInfoVo.setCountdown(0);
+            }
         }
         //存入门店地址
         storeMainInfoVo.setStoreAddress(storeInfo.getStoreAddress());
@@ -432,10 +441,40 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
     }
 
     @Override
-    public List<StoreBusinessInfo> getStoreInfoBusinessHours(Integer id) {
-        //营业时间
-        List<StoreBusinessInfo> storeBusinessInfoList = storeBusinessInfoMapper.selectList(new LambdaQueryWrapper<StoreBusinessInfo>().eq(StoreBusinessInfo::getStoreId, id));
-        return storeBusinessInfoList;
+    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;
     }
 
     /**
@@ -1249,9 +1288,17 @@ 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());
@@ -1260,13 +1307,6 @@ 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();
@@ -1362,6 +1402,21 @@ 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");
@@ -2755,6 +2810,25 @@ 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);
         // 注销状态变为可用
@@ -2930,6 +3004,24 @@ 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);
 
@@ -3375,6 +3467,11 @@ 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 {
@@ -5885,12 +5982,7 @@ 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;
@@ -5980,13 +6072,13 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
 //        // 获取店铺动态总数
 //        result.setTotalDynamicsNum(storeDynamicslist.size());
 
-        //营业时间
-        List<StoreBusinessInfo> storeBusinessInfos = storeBusinessInfoMapper.selectList(
-                new LambdaQueryWrapper<StoreBusinessInfo>()
-                        .eq(StoreBusinessInfo::getStoreId, storeId)
-                        .eq(StoreBusinessInfo::getDeleteFlag, 0)
-        );
-        // 回显所有营业时间信息(特殊营业时间和正常营业时间)
+        //营业时间(通过 getStoreInfoBusinessHours 方法获取,包含节假日信息)
+        List<StoreBusinessInfoVo> storeBusinessInfoVos = this.getStoreInfoBusinessHours(Integer.parseInt(storeId));
+        // 设置包含节假日信息的营业时间列表
+        result.setStoreBusinessInfoVos(storeBusinessInfoVos);
+        // 转换为 List<StoreBusinessInfo> 用于后续判断(StoreBusinessInfoVo 继承自 StoreBusinessInfo)
+        List<StoreBusinessInfo> storeBusinessInfos = new ArrayList<>(storeBusinessInfoVos);
+        // 回显所有营业时间信息(特殊营业时间和正常营业时间,包含节假日信息
         if (ObjectUtils.isNotEmpty(storeBusinessInfos)) {
             result.setStoreBusinessInfo(storeBusinessInfos.get(0));
             result.setStoreBusinessInfos(storeBusinessInfos);
@@ -7568,7 +7660,6 @@ 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),
@@ -7576,21 +7667,16 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
                 };
             }
 
-            // 春节:农历正月初一,通常7天假期
             if (name.contains("春节")) {
-                // 春节日期每年不同,这里提供近几年的数据,建议使用农历工具精确计算
-                // 2024年春节:2月10日(农历正月初一)-2月16日
-                // 2025年春节:1月29日(农历正月初一)-2月4日
-                // 2026年春节:2月17日(农历正月初一)-2月23日
-                if (year == 2024) {
+                if (year == 2028) {
                     return new LocalDate[]{
-                        LocalDate.of(year, 2, 10),
-                        LocalDate.of(year, 2, 16)
+                        LocalDate.of(year, 1, 25),
+                        LocalDate.of(year, 2, 2)
                     };
-                } else if (year == 2025) {
+                } else if (year == 2027) {
                     return new LocalDate[]{
-                        LocalDate.of(year, 1, 29),
-                        LocalDate.of(year, 2, 4)
+                        LocalDate.of(year, 2, 5),
+                        LocalDate.of(year, 2, 13)
                     };
                 } else if (year == 2026) {
                     return new LocalDate[]{
@@ -7598,7 +7684,6 @@ 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)
@@ -7606,42 +7691,34 @@ 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("元宵")) {
-                // 元宵节是春节后的第15天,这里简化处理
-                // 2024年元宵节:2月24日,2025年元宵节:2月12日,2026年元宵节:3月4日
-                if (year == 2024) {
-                    LocalDate date = LocalDate.of(year, 2, 24);
+                if (year == 2028) {
+                    LocalDate date = LocalDate.of(year, 2, 9);
                     return new LocalDate[]{date, date};
-                } else if (year == 2025) {
-                    LocalDate date = LocalDate.of(year, 2, 12);
+                } else if (year == 2027) {
+                    LocalDate date = LocalDate.of(year, 2, 20);
                     return new LocalDate[]{date, date};
                 } else if (year == 2026) {
-                    LocalDate date = LocalDate.of(year, 3, 4);
+                    LocalDate date = LocalDate.of(year, 3, 3);
                     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),
@@ -7649,25 +7726,19 @@ 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("端午")) {
-                // 端午节通常在6月,这里提供近几年的数据
-                // 2024年端午节:6月10日,2025年端午节:5月31日,2026年端午节:6月19日
-                if (year == 2024) {
+                if (year == 2028) {
                     return new LocalDate[]{
-                        LocalDate.of(year, 6, 10),
-                        LocalDate.of(year, 6, 12)
+                        LocalDate.of(year, 6, 27)
                     };
-                } else if (year == 2025) {
+                } else if (year == 2027) {
                     return new LocalDate[]{
-                        LocalDate.of(year, 5, 31),
-                        LocalDate.of(year, 6, 2)
+                        LocalDate.of(year, 6, 9)
                     };
                 } else if (year == 2026) {
                     return new LocalDate[]{
@@ -7675,7 +7746,6 @@ 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)
@@ -7683,39 +7753,30 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
                 }
             }
 
-            // 七夕:农历七月初七,1天(通常在8月)
             if (name.contains("七夕")) {
-                // 七夕通常在8月,这里提供近几年的数据
-                // 2024年七夕:8月10日,2025年七夕:7月31日,2026年七夕:8月20日
-                if (year == 2024) {
-                    LocalDate date = LocalDate.of(year, 8, 10);
+                if (year == 2028) {
+                    LocalDate date = LocalDate.of(year, 8, 26);
                     return new LocalDate[]{date, date};
-                } else if (year == 2025) {
-                    LocalDate date = LocalDate.of(year, 7, 31);
+                } else if (year == 2027) {
+                    LocalDate date = LocalDate.of(year, 8, 8);
                     return new LocalDate[]{date, date};
                 } else if (year == 2026) {
-                    LocalDate date = LocalDate.of(year, 8, 20);
+                    LocalDate date = LocalDate.of(year, 8, 19);
                     return new LocalDate[]{date, date};
                 } else {
-                    // 默认:大致在8月上旬
                     LocalDate date = LocalDate.of(year, 8, 10);
                     return new LocalDate[]{date, date};
                 }
             }
 
-            // 中秋节:农历八月十五,通常3天假期
             if (name.contains("中秋")) {
-                // 中秋节通常在9月或10月,这里提供近几年的数据
-                // 2024年中秋节:9月17日,2025年中秋节:10月6日,2026年中秋节:9月25日
-                if (year == 2024) {
+                if (year == 2028) {
                     return new LocalDate[]{
-                        LocalDate.of(year, 9, 17),
-                        LocalDate.of(year, 9, 19)
+                        LocalDate.of(year, 10, 3)
                     };
-                } else if (year == 2025) {
+                } else if (year == 2027) {
                     return new LocalDate[]{
-                        LocalDate.of(year, 10, 6),
-                        LocalDate.of(year, 10, 8)
+                        LocalDate.of(year, 9, 15)
                     };
                 } else if (year == 2026) {
                     return new LocalDate[]{
@@ -7723,7 +7784,6 @@ 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)
@@ -7731,7 +7791,6 @@ 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),
@@ -7739,20 +7798,16 @@ 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};