package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.core.domain.entity.FormalParentsStudent;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.FormalParentsStudentMapper;
import com.ruoyi.system.service.IFormalParentsStudentService;

/**
 * 家长-学生(审核通过之后数据)Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-05-30
 */
@Service
public class FormalParentsStudentServiceImpl implements IFormalParentsStudentService 
{
    @Autowired
    private FormalParentsStudentMapper formalParentsStudentMapper;

    /**
     * 查询家长-学生(审核通过之后数据)
     * 
     * @param id 家长-学生(审核通过之后数据)主键
     * @return 家长-学生(审核通过之后数据)
     */
    @Override
    public FormalParentsStudent selectFormalParentsStudentById(Long id)
    {
        return formalParentsStudentMapper.selectFormalParentsStudentById(id);
    }

    /**
     * 查询家长-学生(审核通过之后数据)列表
     * 
     * @param formalParentsStudent 家长-学生(审核通过之后数据)
     * @return 家长-学生(审核通过之后数据)
     */
    @Override
    public List<FormalParentsStudent> selectFormalParentsStudentList(FormalParentsStudent formalParentsStudent)
    {
        return formalParentsStudentMapper.selectFormalParentsStudentList(formalParentsStudent);
    }

    /**
     * 新增家长-学生(审核通过之后数据)
     * 
     * @param formalParentsStudent 家长-学生(审核通过之后数据)
     * @return 结果
     */
    @Override
    public int insertFormalParentsStudent(FormalParentsStudent formalParentsStudent)
    {
        formalParentsStudent.setCreateTime(DateUtils.getNowDate());
        return formalParentsStudentMapper.insertFormalParentsStudent(formalParentsStudent);
    }

    /**
     * 修改家长-学生(审核通过之后数据)
     * 
     * @param formalParentsStudent 家长-学生(审核通过之后数据)
     * @return 结果
     */
    @Override
    public int updateFormalParentsStudent(FormalParentsStudent formalParentsStudent)
    {
        formalParentsStudent.setUpdateTime(DateUtils.getNowDate());
        return formalParentsStudentMapper.updateFormalParentsStudent(formalParentsStudent);
    }

    /**
     * 批量删除家长-学生(审核通过之后数据)
     * 
     * @param ids 需要删除的家长-学生(审核通过之后数据)主键
     * @return 结果
     */
    @Override
    public int deleteFormalParentsStudentByIds(Long[] ids)
    {
        return formalParentsStudentMapper.deleteFormalParentsStudentByIds(ids);
    }

    /**
     * 删除家长-学生(审核通过之后数据)信息
     * 
     * @param id 家长-学生(审核通过之后数据)主键
     * @return 结果
     */
    @Override
    public int deleteFormalParentsStudentById(Long id)
    {
        return formalParentsStudentMapper.deleteFormalParentsStudentById(id);
    }
}
