package com.leromro.core.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.leromro.core.mapper.VolunteerAccountMapper;
import com.leromro.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.leromro.core.mapper.VolunteerAccountMapper;
import com.leromro.core.domain.VolunteerAccount;
import com.leromro.core.service.IVolunteerAccountService;

/**
 * 志愿者账户Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-11
 */
@Service
public class VolunteerAccountServiceImpl extends ServiceImpl<VolunteerAccountMapper, VolunteerAccount> implements IVolunteerAccountService
{
    @Autowired
    private VolunteerAccountMapper volunteerAccountMapper;

    /**
     * 查询志愿者账户
     * 
     * @param volunteerAccountId 志愿者账户主键
     * @return 志愿者账户
     */
    @Override
    public VolunteerAccount selectVolunteerAccountByVolunteerAccountId(Long volunteerAccountId)
    {
        return volunteerAccountMapper.selectVolunteerAccountByVolunteerAccountId(volunteerAccountId);
    }

    /**
     * 查询志愿者账户列表
     * 
     * @param volunteerAccount 志愿者账户
     * @return 志愿者账户
     */
    @Override
    public List<VolunteerAccount> selectVolunteerAccountList(VolunteerAccount volunteerAccount)
    {
        return volunteerAccountMapper.selectVolunteerAccountList(volunteerAccount);
    }

    /**
     * 新增志愿者账户
     * 
     * @param volunteerAccount 志愿者账户
     * @return 结果
     */
    @Override
    public Boolean insertVolunteerAccount(VolunteerAccount volunteerAccount)
    {
        return this.save(volunteerAccount);
    }

    /**
     * 修改志愿者账户
     * 
     * @param volunteerAccount 志愿者账户
     * @return 结果
     */
    @Override
    public Boolean updateVolunteerAccount(VolunteerAccount volunteerAccount)
    {
        return this.updateById(volunteerAccount);
    }

    /**
     * 批量删除志愿者账户
     * 
     * @param volunteerAccountIds 需要删除的志愿者账户主键
     * @return 结果
     */
    @Override
    public int deleteVolunteerAccountByVolunteerAccountIds(Long[] volunteerAccountIds)
    {
        return volunteerAccountMapper.deleteVolunteerAccountByVolunteerAccountIds(volunteerAccountIds);
    }

    /**
     * 删除志愿者账户信息
     * 
     * @param volunteerAccountId 志愿者账户主键
     * @return 结果
     */
    @Override
    public int deleteVolunteerAccountByVolunteerAccountId(Long volunteerAccountId)
    {
        return volunteerAccountMapper.deleteVolunteerAccountByVolunteerAccountId(volunteerAccountId);
    }
}
