| | |
| | | package com.ycl.service.video.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ycl.entity.video.VideoPoint; |
| | |
| | | import com.ycl.vo.equipment.VideoPointVo; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public class VideoPointServiceImpl extends ServiceImpl<VideoPointMapper, VideoPoint> implements IVideoPointService { |
| | | |
| | | @Override |
| | | public IPage<VideoPointVo> getList(Integer streetId, Integer communityId, Integer current, Integer size) { |
| | | return baseMapper.search(new Page<>(current, size), streetId, communityId); |
| | | public IPage<VideoPointVo> getList(Integer streetId, Integer communityId, Integer type, Integer current, Integer size) { |
| | | return baseMapper.search(new Page<>(current, size), streetId, communityId, type); |
| | | } |
| | | |
| | | @Override |
| | | public VideoPoint getByCode(String code) { |
| | | VideoPoint videoPoint = null; |
| | | LambdaQueryWrapper<VideoPoint> queryWrapper = new LambdaQueryWrapper<VideoPoint>() |
| | | .eq(VideoPoint::getPlatResourceId, code) |
| | | .or().eq(VideoPoint::getCode, code); |
| | | List<VideoPoint> pointList = this.list(queryWrapper); |
| | | if (pointList.size() > 0) { |
| | | videoPoint = pointList.get(0); |
| | | } |
| | | return videoPoint; |
| | | } |
| | | |
| | | @Override |
| | | public VideoPoint getByChannelId(Integer channelId) { |
| | | VideoPoint videoPoint = null; |
| | | LambdaQueryWrapper<VideoPoint> queryWrapper = new LambdaQueryWrapper<VideoPoint>() |
| | | .eq(VideoPoint::getChannelId, channelId); |
| | | List<VideoPoint> pointList = this.list(queryWrapper); |
| | | if (pointList.size() > 0) { |
| | | videoPoint = pointList.get(0); |
| | | } |
| | | return videoPoint; |
| | | } |
| | | } |