package com.dcsoft.system.face.service.impl;

import java.util.List;
import com.dcsoft.common.core.utils.DateUtils;
import com.dcsoft.system.face.domain.FaceRecord;
import com.dcsoft.system.face.mapper.FaceRecordMapper;
import com.dcsoft.system.face.service.IFaceRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 评分核验记录Service业务层处理
 *
 * @author 倪春
 * @date 2023-04-21
 */
@Service
public class FaceRecordServiceImpl implements IFaceRecordService
{
    @Autowired
    private FaceRecordMapper faceRecordMapper;

    /**
     * 查询评分核验记录
     *
     * @param id 评分核验记录主键
     * @return 评分核验记录
     */
    @Override
    public FaceRecord selectFaceRecordById(Long id)
    {
        return faceRecordMapper.selectFaceRecordById(id);
    }

    /**
     * 查询评分核验记录列表
     *
     * @param faceRecord 评分核验记录
     * @return 评分核验记录
     */
    @Override
    public List<FaceRecord> selectFaceRecordList(FaceRecord faceRecord)
    {
        return faceRecordMapper.selectFaceRecordList(faceRecord);
    }

    /**
     * 新增评分核验记录
     *
     * @param faceRecord 评分核验记录
     * @return 结果
     */
    @Override
    public int insertFaceRecord(FaceRecord faceRecord)
    {
        faceRecord.setCreateTime(DateUtils.getNowDate());
        return faceRecordMapper.insertFaceRecord(faceRecord);
    }

    /**
     * 修改评分核验记录
     *
     * @param faceRecord 评分核验记录
     * @return 结果
     */
    @Override
    public int updateFaceRecord(FaceRecord faceRecord)
    {
        faceRecord.setUpdateTime(DateUtils.getNowDate());
        return faceRecordMapper.updateFaceRecord(faceRecord);
    }

    /**
     * 批量删除评分核验记录
     *
     * @param ids 需要删除的评分核验记录主键
     * @return 结果
     */
    @Override
    public int deleteFaceRecordByIds(Long[] ids)
    {
        return faceRecordMapper.deleteFaceRecordByIds(ids);
    }

    /**
     * 删除评分核验记录信息
     *
     * @param id 评分核验记录主键
     * @return 结果
     */
    @Override
    public int deleteFaceRecordById(Long id)
    {
        return faceRecordMapper.deleteFaceRecordById(id);
    }
}
