package com.da.dangan.service.impl;

import com.da.common.utils.DateUtils;
import com.da.dangan.domain.DaPicturesRecard;
import com.da.dangan.mapper.DaPicturesRecardMapper;
import com.da.dangan.service.IDaPicturesRecardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 档案图片信息记录Service业务层处理
 * 
 * @author hs
 * @date 2024-05-13
 */
@Service
public class DaPicturesRecardServiceImpl implements IDaPicturesRecardService 
{
    @Autowired
    private DaPicturesRecardMapper daPicturesRecardMapper;

    /**
     * 查询档案图片信息记录
     * 
     * @param id 档案图片信息记录主键
     * @return 档案图片信息记录
     */
    @Override
    public DaPicturesRecard selectDaPicturesRecardById(Long id)
    {
        return daPicturesRecardMapper.selectDaPicturesRecardById(id);
    }

    /**
     * 查询档案图片信息记录列表
     * 
     * @param daPicturesRecard 档案图片信息记录
     * @return 档案图片信息记录
     */
    @Override
    public List<DaPicturesRecard> selectDaPicturesRecardList(DaPicturesRecard daPicturesRecard)
    {
        return daPicturesRecardMapper.selectDaPicturesRecardList(daPicturesRecard);
    }

    /**
     * 新增档案图片信息记录
     * 
     * @param daPicturesRecard 档案图片信息记录
     * @return 结果
     */
    @Override
    public int insertDaPicturesRecard(DaPicturesRecard daPicturesRecard)
    {
        daPicturesRecard.setCreateTime(DateUtils.getNowDate());
        return daPicturesRecardMapper.insertDaPicturesRecard(daPicturesRecard);
    }

    /**
     * 修改档案图片信息记录
     * 
     * @param daPicturesRecard 档案图片信息记录
     * @return 结果
     */
    @Override
    public int updateDaPicturesRecard(DaPicturesRecard daPicturesRecard)
    {
        daPicturesRecard.setUpdateTime(DateUtils.getNowDate());
        return daPicturesRecardMapper.updateDaPicturesRecard(daPicturesRecard);
    }

    /**
     * 批量删除档案图片信息记录
     * 
     * @param ids 需要删除的档案图片信息记录主键
     * @return 结果
     */
    @Override
    public int deleteDaPicturesRecardByIds(Long[] ids)
    {
        return daPicturesRecardMapper.deleteDaPicturesRecardByIds(ids);
    }

    /**
     * 删除档案图片信息记录信息
     * 
     * @param id 档案图片信息记录主键
     * @return 结果
     */
    @Override
    public int deleteDaPicturesRecardById(Long id)
    {
        return daPicturesRecardMapper.deleteDaPicturesRecardById(id);
    }
}
