@ -5,10 +5,13 @@ import com.ruoyi.api.mapper.DapingMapper;
@@ -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 < DapingMapper , WaterPhotoInfo > implements DapingService {
@ -18,11 +21,12 @@ public class DapingServiceImpl extends ServiceImpl<DapingMapper, WaterPhotoInfo>
@@ -18,11 +21,12 @@ public class DapingServiceImpl extends ServiceImpl<DapingMapper, WaterPhotoInfo>
* /
@Override
public List < WaterPhotoInfo > getStationInfo ( ) {
List < WaterPhotoInfo > list = baseMapper . selectStationInfo ( ) ;
for ( WaterPhotoInfo waterPhotoInfo : list ) {
waterPhotoInfo . setImgName ( waterPhotoInfo . getImgName ( ) . replace ( "\\" , "/" ) ) ;
}
return list ;
return baseMapper . selectStationInfo ( ) . stream ( ) . filter ( waterPhotoInfo - > {
String imgName = waterPhotoInfo . getImgName ( ) ;
String img = imgName . replace ( "\\" , "/" ) ;
waterPhotoInfo . setImgName ( img ) ;
return true ;
} ) . collect ( Collectors . toList ( ) ) ;
}
/ * *