package com.jsowell.pile.service.impl;

import java.util.List;

import com.jsowell.common.util.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jsowell.pile.mapper.PileCameraInfoMapper;
import com.jsowell.pile.domain.PileCameraInfo;
import com.jsowell.pile.service.PileCameraInfoService;

/**
 * 车位相机信息Service业务层处理
 *
 * @author jsowell
 * @date 2023-12-09
 */
@Service
public class PileCameraInfoServiceImpl implements PileCameraInfoService {
    @Autowired
    private PileCameraInfoMapper pileCameraInfoMapper;

    /**
     * 查询车位相机信息
     *
     * @param id 车位相机信息主键
     * @return 车位相机信息
     */
    @Override
    public PileCameraInfo selectPileCameraInfoById(Long id) {
        return pileCameraInfoMapper.selectPileCameraInfoById(id);
    }

    /**
     * 查询车位相机信息列表
     *
     * @param pileCameraInfo 车位相机信息
     * @return 车位相机信息
     */
    @Override
    public List<PileCameraInfo> selectPileCameraInfoList(PileCameraInfo pileCameraInfo) {
        return pileCameraInfoMapper.selectPileCameraInfoList(pileCameraInfo);
    }

    /**
     * 新增车位相机信息
     *
     * @param pileCameraInfo 车位相机信息
     * @return 结果
     */
    @Override
    public int insertPileCameraInfo(PileCameraInfo pileCameraInfo) {
        pileCameraInfo.setCreateTime(DateUtils.getNowDate());
        return pileCameraInfoMapper.insertPileCameraInfo(pileCameraInfo);
    }

    /**
     * 修改车位相机信息
     *
     * @param pileCameraInfo 车位相机信息
     * @return 结果
     */
    @Override
    public int updatePileCameraInfo(PileCameraInfo pileCameraInfo) {
        return pileCameraInfoMapper.updatePileCameraInfo(pileCameraInfo);
    }

    /**
     * 批量删除车位相机信息
     *
     * @param ids 需要删除的车位相机信息主键
     * @return 结果
     */
    @Override
    public int deletePileCameraInfoByIds(Long[] ids) {
        return pileCameraInfoMapper.deletePileCameraInfoByIds(ids);
    }

    /**
     * 删除车位相机信息信息
     *
     * @param id 车位相机信息主键
     * @return 结果
     */
    @Override
    public int deletePileCameraInfoById(Long id) {
        return pileCameraInfoMapper.deletePileCameraInfoById(id);
    }
}
