Explorar o código

bugfix:3366优化(提测0304):店铺详情中,点击价目表,进入价目表详情页面,下方显示商铺动态,进入动态页面,未显示店铺信息

刘云鑫 hai 1 mes
pai
achega
c13e62baf8

+ 7 - 4
alien-store/src/main/java/shop/alien/store/service/LifeUserDynamicsService.java

@@ -14,9 +14,10 @@ import org.springframework.util.CollectionUtils;
 import org.springframework.util.ObjectUtils;
 import org.springframework.util.StringUtils;
 import shop.alien.entity.store.*;
-import shop.alien.entity.store.vo.*;
+import shop.alien.entity.store.vo.CommonCommentVo;
+import shop.alien.entity.store.vo.LifePinglunVo;
+import shop.alien.entity.store.vo.LifeUserDynamicsVo;
 import shop.alien.mapper.*;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import shop.alien.util.common.constant.CommentSourceTypeEnum;
 
 import java.util.*;
@@ -574,6 +575,7 @@ public class LifeUserDynamicsService extends ServiceImpl<LifeUserDynamicsMapper,
                 if (storeUser.getStoreId() != null) {
                     StoreInfo storeInfo = storeInfoMapper.selectById(storeUser.getStoreId());
                     resultMap.put("businessSection",storeInfo.getBusinessSection());
+                    resultMap.put("scoreAvg",storeInfo.getScoreAvg());
                     if (storeInfo != null && storeInfo.getStoreName() != null) {
                         // 使用店铺名称作为昵称
                         storeUser.setUserName(storeInfo.getStoreName());
@@ -646,8 +648,9 @@ public class LifeUserDynamicsService extends ServiceImpl<LifeUserDynamicsMapper,
                 dynamicsVo.setIsLike("0");
             }
             // 根据store_comment 表 business_id 查询评论数量
-            int commentCount = storeCommentService.count(new QueryWrapper<StoreComment>().eq("business_id", dynamicsVo.getId()).eq("delete_flag", "0").eq("comment_type", "1"));
-            dynamicsVo.setCommentCount(commentCount);
+//            int commentCount = storeCommentService.count(new QueryWrapper<StoreComment>().eq("business_id", dynamicsVo.getId()).eq("delete_flag", "0").eq("comment_type", "1"));
+            int commonCommentCount = commonCommentMapper.selectCount(new QueryWrapper<CommonComment>().eq("source_id", dynamicsVo.getId()).eq("delete_flag", "0").eq("source_type", CommentSourceTypeEnum.DYNAMIC_COMMENT.getType()));
+            dynamicsVo.setCommentCount(commonCommentCount);
             String phoneId1 = dynamicsVo.getPhoneId();
             String storeUserId = "";
             if (phoneId1.startsWith("user_")) {