zhanghua
2025-04-14 1cad14bca191807e18705c3a5526eda8151be439
ycl-platform/src/main/java/com/ycl/service/trend/impl/TrendAnalysisServiceImpl.java
@@ -4,11 +4,13 @@
import com.ycl.dto.trend.TrendAnalysisParam;
import com.ycl.mapper.trend.TrendAnalysisMapper;
import com.ycl.service.trend.TrendAnalysisService;
import com.ycl.vo.TrendAnalysisVo;
import com.ycl.vo.TrendVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.amqp.RabbitProperties;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
@@ -16,7 +18,7 @@
public class TrendAnalysisServiceImpl implements TrendAnalysisService {
    @Autowired
    @Resource
    TrendAnalysisMapper trendAnalysisMapper;
    @Override
@@ -25,12 +27,20 @@
    }
    @Override
    public List<TrendVo> queryPointInfo(String id) {
        return trendAnalysisMapper.selectTrendPointInfo(id);
    public List<TrendVo> queryPointInfo(String longitude, String latitude) {
        return trendAnalysisMapper.selectTrendPointInfo(longitude, latitude);
    }
    @Override
    public TrendAnalysisVo queryPointInfoByTime(Long pointId, String startTime, String endTime) {
        TrendAnalysisVo vo = new TrendAnalysisVo();
        vo.setTimeList(trendAnalysisMapper.queryPointInfoByTime(pointId, startTime, endTime));
        vo.setTypeList(trendAnalysisMapper.queryPointInfoTypeByTime(pointId, startTime, endTime));
        return vo;
    }
    @Override
    public List<TrendVo> queryListByCount(TrendAnalysisParam trendAnalysisParam, Integer pageSize, Integer pageNum) {
        return trendAnalysisMapper.selectTrendInfo(trendAnalysisParam).stream().filter(item->"1".equals(item.getCount())).collect(Collectors.toList());
        return trendAnalysisMapper.selectTrendInfo(trendAnalysisParam).stream().filter(item -> 1 == item.getCount()).collect(Collectors.toList());
    }
}