|
|
@@ -5636,18 +5636,20 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
|
|
|
Integer totalCount = 0;
|
|
|
double storeScore;
|
|
|
Object ratingObj = commonRatingService.getRatingCount(storeInfo.getId(), 1);
|
|
|
- if (ratingObj != null) {
|
|
|
+ if (ratingObj != null && ratingObj instanceof Map) {
|
|
|
Map<String, Object> ratingMap = (Map<String, Object>) ratingObj;
|
|
|
- Object totalCountObj = ratingMap.get("totalCount");
|
|
|
- if (totalCountObj != null) {
|
|
|
- // 安全转换为整数
|
|
|
- try {
|
|
|
- totalCount = Integer.parseInt(totalCountObj.toString().trim());
|
|
|
- } catch (NumberFormatException e) {
|
|
|
- totalCount = 0; // 转换失败时默认值
|
|
|
+
|
|
|
+ // 校验外层状态(success、code)
|
|
|
+ Boolean isSuccess = (Boolean) ratingMap.get("success");
|
|
|
+ Integer code = (Integer) ratingMap.get("code");
|
|
|
+ if (isSuccess != null && isSuccess && code != null && code == 200) {
|
|
|
+ // 提取核心数据层data
|
|
|
+ Map<String, Object> dataMap = (Map<String, Object>) ratingMap.get("data");
|
|
|
+ if (dataMap != null) {
|
|
|
+ // 解析各字段(非空校验+类型转换)
|
|
|
+ storeScore = dataMap.get("storeScore") != null ? Double.parseDouble(dataMap.get("storeScore").toString()) : 0.0;
|
|
|
+ totalCount = dataMap.get("totalCount") != null ? Integer.parseInt(dataMap.get("totalCount").toString()) : 0;
|
|
|
}
|
|
|
- } else {
|
|
|
- totalCount = 0;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -5861,27 +5863,19 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
|
|
|
);
|
|
|
|
|
|
boolean isInBusiness;
|
|
|
- // 判断是否是全天营业(00:00到00:00)
|
|
|
- LocalTime midnight = LocalTime.of(0, 0);
|
|
|
- if (start.equals(midnight) && end.equals(midnight)) {
|
|
|
- // 全天营业
|
|
|
- isInBusiness = true;
|
|
|
- log.info("特殊日期营业时间判断 - 全天营业(00:00-00:00),当前时间: {},是否在营业时间内: true", currentTime);
|
|
|
+ // 处理跨天营业
|
|
|
+ if (start.isBefore(end) || start.equals(end)) {
|
|
|
+ // 同一天营业:包含边界值
|
|
|
+ isInBusiness = (currentTime.isAfter(start) || currentTime.equals(start))
|
|
|
+ && (currentTime.isBefore(end) || currentTime.equals(end));
|
|
|
} else {
|
|
|
- // 处理跨天营业
|
|
|
- if (start.isBefore(end) || start.equals(end)) {
|
|
|
- // 同一天营业:包含边界值
|
|
|
- isInBusiness = (currentTime.isAfter(start) || currentTime.equals(start))
|
|
|
- && (currentTime.isBefore(end) || currentTime.equals(end));
|
|
|
- } else {
|
|
|
- // 跨天营业:包含边界值
|
|
|
- isInBusiness = (currentTime.isAfter(start) || currentTime.equals(start))
|
|
|
- || (currentTime.isBefore(end) || currentTime.equals(end));
|
|
|
- }
|
|
|
- log.info("特殊日期营业时间判断 - 开始时间: {}, 结束时间: {}, 当前时间: {}, 是否在营业时间内: {}",
|
|
|
- start, end, currentTime, isInBusiness);
|
|
|
+ // 跨天营业:包含边界值
|
|
|
+ isInBusiness = (currentTime.isAfter(start) || currentTime.equals(start))
|
|
|
+ || (currentTime.isBefore(end) || currentTime.equals(end));
|
|
|
}
|
|
|
|
|
|
+ log.info("特殊日期营业时间判断 - 开始时间: {}, 结束时间: {}, 当前时间: {}, 是否在营业时间内: {}",
|
|
|
+ start, end, currentTime, isInBusiness);
|
|
|
result.setYyFlag(isInBusiness ? 1 : 0);
|
|
|
isCurrentSpecialBusinessTime = isInBusiness;
|
|
|
} else {
|
|
|
@@ -5948,27 +5942,19 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
|
|
|
);
|
|
|
|
|
|
boolean isInBusiness;
|
|
|
- // 判断是否是全天营业(00:00到00:00)
|
|
|
- LocalTime midnight = LocalTime.of(0, 0);
|
|
|
- if (start.equals(midnight) && end.equals(midnight)) {
|
|
|
- // 全天营业
|
|
|
- isInBusiness = true;
|
|
|
- log.info("正常营业时间判断 - 全天营业(00:00-00:00),当前时间: {},是否在营业时间内: true", currentTime);
|
|
|
+ // 处理跨天营业
|
|
|
+ if (start.isBefore(end) || start.equals(end)) {
|
|
|
+ // 同一天营业:包含边界值
|
|
|
+ isInBusiness = (currentTime.isAfter(start) || currentTime.equals(start))
|
|
|
+ && (currentTime.isBefore(end) || currentTime.equals(end));
|
|
|
} else {
|
|
|
- // 处理跨天营业
|
|
|
- if (start.isBefore(end) || start.equals(end)) {
|
|
|
- // 同一天营业:包含边界值
|
|
|
- isInBusiness = (currentTime.isAfter(start) || currentTime.equals(start))
|
|
|
- && (currentTime.isBefore(end) || currentTime.equals(end));
|
|
|
- } else {
|
|
|
- // 跨天营业:包含边界值
|
|
|
- isInBusiness = (currentTime.isAfter(start) || currentTime.equals(start))
|
|
|
- || (currentTime.isBefore(end) || currentTime.equals(end));
|
|
|
- }
|
|
|
- log.info("正常营业时间判断 - 开始时间: {}, 结束时间: {}, 当前时间: {}, 是否在营业时间内: {}",
|
|
|
- start, end, currentTime, isInBusiness);
|
|
|
+ // 跨天营业:包含边界值
|
|
|
+ isInBusiness = (currentTime.isAfter(start) || currentTime.equals(start))
|
|
|
+ || (currentTime.isBefore(end) || currentTime.equals(end));
|
|
|
}
|
|
|
|
|
|
+ log.info("正常营业时间判断 - 开始时间: {}, 结束时间: {}, 当前时间: {}, 是否在营业时间内: {}",
|
|
|
+ start, end, currentTime, isInBusiness);
|
|
|
result.setYyFlag(isInBusiness ? 1 : 0);
|
|
|
} else {
|
|
|
log.warn("正常营业时间格式错误 - 开始时间: {}, 结束时间: {}",
|
|
|
@@ -6401,13 +6387,7 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
|
|
|
.set(StoreImg::getDeleteFlag, 1);
|
|
|
storeImgMapper.update(null, deleteWrapper);
|
|
|
|
|
|
- // 插入新的营业执照图片
|
|
|
- storeImg.setImgType(14);
|
|
|
- storeImg.setImgDescription("营业执照");
|
|
|
- storeImg.setImgSort(0);
|
|
|
- storeImg.setDeleteFlag(0);
|
|
|
- storeImgMapper.insert(storeImg);
|
|
|
-
|
|
|
+ // 不再立即插入新的营业执照图片,等审核通过后再插入
|
|
|
// 插入营业执照历史记录(licenseStatus=1表示营业执照,licenseExecuteStatus=2表示审核中)
|
|
|
StoreLicenseHistory licenseHistory = new StoreLicenseHistory();
|
|
|
licenseHistory.setStoreId(storeImg.getStoreId());
|
|
|
@@ -6422,7 +6402,7 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
|
|
|
storeInfo.setId(storeImg.getStoreId());
|
|
|
storeInfo.setBusinessLicenseStatus(2); // 2-待审核
|
|
|
storeInfo.setUpdateBusinessLicenseTime(new Date());
|
|
|
-
|
|
|
+
|
|
|
storeInfoMapper.updateById(storeInfo);
|
|
|
|
|
|
// 异步调用证照审核AI接口并处理审核结果
|
|
|
@@ -6503,18 +6483,11 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
|
|
|
|
|
|
// 收集所有图片URL
|
|
|
List<String> imgUrlList = new ArrayList<>();
|
|
|
-
|
|
|
- // 插入新的其他资质证明图片(最多9张)
|
|
|
+
|
|
|
+ // 不再立即插入新的其他资质证明图片,等审核通过后再插入
|
|
|
+ // 收集图片URL
|
|
|
for (int i = 0; i < maxCount; i++) {
|
|
|
StoreImg storeImg = storeImgList.get(i);
|
|
|
- storeImg.setStoreId(storeId);
|
|
|
- storeImg.setImgType(35); // 其他资质证明图片
|
|
|
- storeImg.setImgDescription("其他资质证明");
|
|
|
- storeImg.setImgSort(i + 1);
|
|
|
- storeImg.setDeleteFlag(0);
|
|
|
- storeImgMapper.insert(storeImg);
|
|
|
-
|
|
|
- // 收集图片URL
|
|
|
if (StringUtils.isNotEmpty(storeImg.getImgUrl())) {
|
|
|
imgUrlList.add(storeImg.getImgUrl());
|
|
|
}
|