From 5009e66ce85fef754ef3772062f7f7e53d07be66 Mon Sep 17 00:00:00 2001 From: blank <2649084208@qq.com> Date: Mon, 14 Nov 2022 10:49:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/api/service/impl/DapingServiceImpl.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ruoyi-api/src/main/java/com/ruoyi/api/service/impl/DapingServiceImpl.java b/ruoyi-api/src/main/java/com/ruoyi/api/service/impl/DapingServiceImpl.java index b3ba859..8bc4349 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/api/service/impl/DapingServiceImpl.java +++ b/ruoyi-api/src/main/java/com/ruoyi/api/service/impl/DapingServiceImpl.java @@ -5,10 +5,13 @@ import com.ruoyi.api.mapper.DapingMapper; import com.ruoyi.api.service.DapingService; import com.ruoyi.code.camera.domain.WaterPhotoInfo; import com.ruoyi.common.core.page.R; -import com.ruoyi.common.utils.StringUtils; import org.springframework.stereotype.Service; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; @Service public class DapingServiceImpl extends ServiceImpl implements DapingService{ @@ -18,7 +21,12 @@ public class DapingServiceImpl extends ServiceImpl */ @Override public List getStationInfo() { - return baseMapper.selectStationInfo(); + return baseMapper.selectStationInfo().stream().filter(waterPhotoInfo -> { + String imgName = waterPhotoInfo.getImgName(); + String img = imgName.replace("\\", "/"); + waterPhotoInfo.setImgName(img); + return true; + }).collect(Collectors.toList()); } /**