فهرست منبع

474,772,502bug

jyc 1 ماه پیش
والد
کامیت
a02461f1a8

+ 1 - 1
alien-entity/src/main/java/shop/alien/entity/store/vo/StoreCommentAppealVo.java

@@ -25,7 +25,7 @@ public class StoreCommentAppealVo extends StoreCommentAppeal {
     @ApiModelProperty(value = "评论图片链接")
     private List<String> commentImgList;
 
-    @ApiModelProperty(value = "商家申诉图片id")
+    @ApiModelProperty(value = "评论图片id")
     private String commentImgId;
 
     @ApiModelProperty(value = "申诉状态字符串")

+ 1 - 1
alien-entity/src/main/java/shop/alien/mapper/StoreCommentAppealMapper.java

@@ -26,7 +26,7 @@ public interface StoreCommentAppealMapper extends BaseMapper<StoreCommentAppeal>
      * @param queryWrapper 查询条件
      * @return IPage<StoreCommentAppealVo>
      */
-    @Select("select a.*, b.dict_detail appeal_status_str, c.comment_content, c.comment_star, c.score score, c.other_score,c.is_anonymous, d.user_name, d.user_image, e.store_name, f.phone store_phone, f.name store_contact, e.store_type " +
+    @Select("select a.*, b.dict_detail appeal_status_str, c.comment_content, c.comment_star, c.score score, c.other_score,c.is_anonymous,c.img_id commentImgId, d.user_name, d.user_image, e.store_name, f.phone store_phone, f.name store_contact, e.store_type " +
             "from store_comment_appeal a " +
             "left join store_dictionary b on a.appeal_status = b.dict_id and b.type_name = 'appealStatus' and b.delete_flag = 0 " +
             "left join store_comment c on a.comment_id = c.id " +

+ 12 - 0
alien-store/src/main/java/shop/alien/store/service/impl/StoreCommentAppealServiceImpl.java

@@ -108,6 +108,18 @@ public class StoreCommentAppealServiceImpl extends ServiceImpl<StoreCommentAppea
                 }
             }
             item.setImgList(imgList);
+
+            if (StringUtils.isNotEmpty(item.getCommentImgId())) {
+                String[] imgId = item.getCommentImgId().split(",");
+                List<String> commentImg = new ArrayList<>();
+                for (String s : imgId) {
+                    StoreImg storeImg = storeImgMapper.selectById(s);
+                    if (null != storeImg) {
+                        commentImg.add(storeImg.getImgUrl());
+                    }
+                }
+                item.setCommentImgList(commentImg);
+            }
         });
         return storeCommentAppealPage;
     }