package com.ruoyi.ie.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ie.mapper.AWishRecordMapper;
import com.ruoyi.ie.domain.AWishRecord;
import com.ruoyi.ie.service.IAWishRecordService;

/**
 * 志愿记录Service业务层处理
 * 
 * @author voluntary
 * @date 2023-11-26
 */
@Service
public class AWishRecordServiceImpl implements IAWishRecordService 
{
    @Autowired
    private AWishRecordMapper aWishRecordMapper;

    /**
     * 查询志愿记录
     * 
     * @param id 志愿记录主键
     * @return 志愿记录
     */
    @Override
    public AWishRecord selectAWishRecordById(Long id)
    {
        return aWishRecordMapper.selectAWishRecordById(id);
    }

    /**
     * 查询志愿记录列表
     * 
     * @param aWishRecord 志愿记录
     * @return 志愿记录
     */
    @Override
    public List<AWishRecord> selectAWishRecordList(AWishRecord aWishRecord)
    {
        return aWishRecordMapper.selectAWishRecordList(aWishRecord);
    }

    /**
     * 新增志愿记录
     * 
     * @param aWishRecord 志愿记录
     * @return 结果
     */
    @Override
    public int insertAWishRecord(AWishRecord aWishRecord)
    {
        aWishRecord.setCreateTime(DateUtils.getNowDate());
        return aWishRecordMapper.insertAWishRecord(aWishRecord);
    }

    /**
     * 修改志愿记录
     * 
     * @param aWishRecord 志愿记录
     * @return 结果
     */
    @Override
    public int updateAWishRecord(AWishRecord aWishRecord)
    {
        aWishRecord.setUpdateTime(DateUtils.getNowDate());
        return aWishRecordMapper.updateAWishRecord(aWishRecord);
    }

    /**
     * 批量删除志愿记录
     * 
     * @param ids 需要删除的志愿记录主键
     * @return 结果
     */
    @Override
    public int deleteAWishRecordByIds(Long[] ids)
    {
        return aWishRecordMapper.deleteAWishRecordByIds(ids);
    }

    @Override
    public int deleteAWishRecordByMap(Map cond)
    {
        return aWishRecordMapper.deleteAWishRecordByMap(cond);
    }


    /**
     * 删除志愿记录信息
     * 
     * @param id 志愿记录主键
     * @return 结果
     */
    @Override
    public int deleteAWishRecordById(Long id)
    {
        return aWishRecordMapper.deleteAWishRecordById(id);
    }
}
