|
|
@@ -110,6 +110,8 @@ public class LifeUserStoreService {
|
|
|
Map<String, List<Map<String, Object>>> avgPriceMap = lifeUserOrderMapper.allStoreAvgPrice().stream().collect(Collectors.groupingBy(o -> o.get("store_id").toString()));
|
|
|
// 获取所有店铺的打卡次数
|
|
|
List<Map<Integer, Integer>> storeClockInCountList = storeClockInService.getStoreClockInCount();
|
|
|
+ // 获取所有店铺打卡次数(有图片并且设置为可见的)
|
|
|
+ List<Map<Integer, Integer>> storeClockInCountMapList = storeClockInService.getStoreClockInWithCanLookCount();
|
|
|
// 遍历所有门店信息,构造返回结果
|
|
|
for (StoreInfoVo store : storeInfoVoList) {
|
|
|
|
|
|
@@ -204,10 +206,22 @@ public class LifeUserStoreService {
|
|
|
storeMap.put("storeClockInCount", b.get("count"));
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+ storeClockInCountMapList.forEach(b -> {
|
|
|
+ Integer storeId = b.get("storeId");
|
|
|
+ if (Objects.equals(storeId, store.getId())) {
|
|
|
+ storeMap.put("storeClockInCountWithCanLook", b.get("count"));
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
// 如果未找到打卡次数,则设置为0
|
|
|
if (null == storeMap.get("storeClockInCount")) {
|
|
|
storeMap.put("storeClockInCount", 0);
|
|
|
}
|
|
|
+ // 如果未找到打卡次数(有图片并且设置为可见的),则设置为0
|
|
|
+ if (null == storeMap.get("storeClockInCountWithCanLook")) {
|
|
|
+ storeMap.put("storeClockInCountWithCanLook", 0);
|
|
|
+ }
|
|
|
// 将当前门店的信息添加到返回结果列表中
|
|
|
returnMaps.add(storeMap);
|
|
|
}
|