package com.ruoyi.device.camera.service.impl;
|
|
import java.util.List;
|
|
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.device.camera.domain.ArdCameras;
|
import com.ruoyi.device.camera.mapper.ArdCamerasMapper;
|
import com.ruoyi.device.camera.service.IArdCamerasService;
|
import com.ruoyi.common.annotation.DataScope;
|
import org.springframework.stereotype.Service;
|
|
import javax.annotation.Resource;
|
|
/**
|
* 相机设备Service业务层处理
|
*
|
* @author 刘苏义
|
* @date 2023-02-11
|
*/
|
@Service
|
public class ArdCamerasServiceImpl implements IArdCamerasService {
|
@Resource
|
private ArdCamerasMapper ardCamerasMapper;
|
|
/**
|
* 查询相机设备
|
*
|
* @param id 相机设备主键
|
* @return 相机设备
|
*/
|
@Override
|
public ArdCameras selectArdCamerasById(String id) {
|
return ardCamerasMapper.selectArdCamerasById(id);
|
}
|
|
/**
|
* 查询相机设备列表
|
*
|
* @param ardCameras 相机设备
|
* @return 相机设备
|
*/
|
@Override
|
@DataScope(deptAlias = "d", userAlias = "u")
|
public List<ArdCameras> selectArdCamerasList(ArdCameras ardCameras) {
|
return ardCamerasMapper.selectArdCamerasList(ardCameras);
|
}
|
|
/**
|
* 查询相机设备列表-不进行数据过滤
|
*
|
* @param ardCameras 相机设备
|
* @return 相机设备
|
*/
|
@Override
|
public List<ArdCameras> selectArdCamerasListNoDataScope(ArdCameras ardCameras) {
|
return ardCamerasMapper.selectArdCamerasListNoDataScope(ardCameras);
|
}
|
|
/**
|
* 新增相机设备
|
*
|
* @param ardCameras 相机设备
|
* @return 结果
|
*/
|
@Override
|
public int insertArdCameras(ArdCameras ardCameras) {
|
ardCameras.setCreateBy(SecurityUtils.getUsername());
|
ardCameras.setCreateTime(DateUtils.getNowDate());
|
ardCameras.setUserId(SecurityUtils.getUserId());
|
return ardCamerasMapper.insertArdCameras(ardCameras);
|
}
|
|
/**
|
* 修改相机设备
|
*
|
* @param ardCameras 相机设备
|
* @return 结果
|
*/
|
@Override
|
public int updateArdCameras(ArdCameras ardCameras) {
|
ardCameras.setUpdateTime(DateUtils.getNowDate());
|
return ardCamerasMapper.updateArdCameras(ardCameras);
|
}
|
|
/**
|
* 批量删除相机设备
|
*
|
* @param ids 需要删除的相机设备主键
|
* @return 结果
|
*/
|
@Override
|
public int deleteArdCamerasByIds(String[] ids) {
|
return ardCamerasMapper.deleteArdCamerasByIds(ids);
|
}
|
|
/**
|
* 删除相机设备信息
|
*
|
* @param id 相机设备主键
|
* @return 结果
|
*/
|
@Override
|
public int deleteArdCamerasById(String id) {
|
return ardCamerasMapper.deleteArdCamerasById(id);
|
}
|
|
public List findOptions(ArdCameras ardCameras) {
|
return ardCamerasMapper.findOptions(ardCameras);
|
}
|
}
|