package com.fdkankan.goods.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fdkankan.goods.entity.CameraSpace;
import com.fdkankan.goods.mapper.ICameraSpaceMapper;
import com.fdkankan.goods.service.ICameraSpaceService;
import com.fdkankan.user.vo.ResponseCameraSpace;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 相机容量表 服务实现类
 * </p>
 *
 * @author 
 * @since 2021-12-24
 */
@Service
public class CameraSpaceServiceImpl extends ServiceImpl<ICameraSpaceMapper, CameraSpace> implements ICameraSpaceService {

    @Resource
    private ICameraSpaceMapper cameraSpaceMapper;

    @Override
    public List<CameraSpace> getListByCameraId(Long cameraId) {
        QueryWrapper<CameraSpace> queryWrapper = new QueryWrapper<>();
        queryWrapper.lambda().eq(CameraSpace::getCameraId,cameraId);
        return this.list(queryWrapper);
    }

    @Override
    public List<ResponseCameraSpace> getVoListByCameraId(Long cameraId) {
        return cameraSpaceMapper.getVoListByCameraId(cameraId);
    }
}
