zjy 3 mesiacov pred
rodič
commit
3a8891318f

+ 4 - 6
alien-second/src/main/java/shop/alien/second/service/impl/PlatformUserViolationServiceImpl.java

@@ -74,21 +74,19 @@ public class PlatformUserViolationServiceImpl extends ServiceImpl<SecondUserViol
 
             // 查询图片信息
             LambdaQueryWrapper<StoreImg> wrapper = new LambdaQueryWrapper<>();
-            wrapper.eq(StoreImg::getStoreId, item.getBusinessId());
+            wrapper.eq(StoreImg::getStoreId, item.getId());
             wrapper.eq(StoreImg::getImgType, Constants.ImageType.SECOND_HAND_REPORT);
             List<StoreImg> imgList = storeImgMapper.selectList(wrapper);
 
-            for (int i = 0; i < imgList.size(); i++) {
+            for (StoreImg img : imgList) {
                 Map<String, Object> map = new HashMap<>();
-
-                String fileType = imgList.get(i).getImgUrl().substring(imgList.get(i).getImgUrl().lastIndexOf(".") + 1);
-
+                String fileType = img.getImgUrl().substring(img.getImgUrl().lastIndexOf(".") + 1);
                 if (videoFileType.contains(fileType.toLowerCase())) {
                     map.put("type", "video");
                 } else {
                     map.put("type", "image");
                 }
-                map.put("imgUrl", imgList.get(i).getImgUrl());
+                map.put("imgUrl", img.getImgUrl());
                 list.add(map);
             }
             item.setImgList(list);