package com.xtd.project.assets.service.impl;

import java.util.List;
import com.xtd.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xtd.project.assets.mapper.DbAuditFormMapper;
import com.xtd.project.assets.domain.DbAuditForm;
import com.xtd.project.assets.service.IDbAuditFormService;

/**
 * 审核Service业务层处理
 * 
 * @author xtd
 * @date 2020-04-09
 */
@Service
public class DbAuditFormServiceImpl implements IDbAuditFormService 
{
    @Autowired
    private DbAuditFormMapper dbAuditFormMapper;

    /**
     * 查询审核
     * 
     * @param id 审核ID
     * @return 审核
     */
    @Override
    public DbAuditForm selectDbAuditFormById(Long id)
    {
        return dbAuditFormMapper.selectDbAuditFormById(id);
    }

    /**
     * 查询审核列表
     * 
     * @param dbAuditForm 审核
     * @return 审核
     */
    @Override
    public List<DbAuditForm> selectDbAuditFormList(DbAuditForm dbAuditForm)
    {
        return dbAuditFormMapper.selectDbAuditFormList(dbAuditForm);
    }

    /**
     * 新增审核
     * 
     * @param dbAuditForm 审核
     * @return 结果
     */
    @Override
    public int insertDbAuditForm(DbAuditForm dbAuditForm)
    {
        dbAuditForm.setCreateTime(DateUtils.getNowDate());
        return dbAuditFormMapper.insertDbAuditForm(dbAuditForm);
    }

    /**
     * 修改审核
     * 
     * @param dbAuditForm 审核
     * @return 结果
     */
    @Override
    public int updateDbAuditForm(DbAuditForm dbAuditForm)
    {
        dbAuditForm.setUpdateTime(DateUtils.getNowDate());
        return dbAuditFormMapper.updateDbAuditForm(dbAuditForm);
    }

    /**
     * 批量删除审核
     * 
     * @param ids 需要删除的审核ID
     * @return 结果
     */
    @Override
    public int deleteDbAuditFormByIds(Long[] ids)
    {
        return dbAuditFormMapper.deleteDbAuditFormByIds(ids);
    }

    /**
     * 删除审核信息
     * 
     * @param id 审核ID
     * @return 结果
     */
    @Override
    public int deleteDbAuditFormById(Long id)
    {
        return dbAuditFormMapper.deleteDbAuditFormById(id);
    }
}
