package com.srs.teacher.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.srs.common.utils.SecurityUtils;
import com.srs.teacher.domain.SysTeacherKpiFillingBonusPointsMaterials;
import com.srs.teacher.mapper.SysTeacherKpiFillingBonusPointsMaterialsMapper;
import com.srs.teacher.service.ISysTeacherKpiFillingBonusPointsMaterialsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 业绩考核-个人填报-加分项佐证材料Service业务层处理
 *
 * @author Codex
 * @date 2026-03-26
 */
@Service
public class SysTeacherKpiFillingBonusPointsMaterialsServiceImpl extends ServiceImpl<SysTeacherKpiFillingBonusPointsMaterialsMapper, SysTeacherKpiFillingBonusPointsMaterials> implements ISysTeacherKpiFillingBonusPointsMaterialsService {
    @Autowired
    private SysTeacherKpiFillingBonusPointsMaterialsMapper materialsMapper;

    @Override
    public SysTeacherKpiFillingBonusPointsMaterials selectSysTeacherKpiFillingBonusPointsMaterialsById(Long id) {
        return materialsMapper.selectSysTeacherKpiFillingBonusPointsMaterialsById(id);
    }

    @Override
    public List<SysTeacherKpiFillingBonusPointsMaterials> selectSysTeacherKpiFillingBonusPointsMaterialsList(SysTeacherKpiFillingBonusPointsMaterials materials) {
        materials.setFdyName(SecurityUtils.getLoginUser().getUser().getNickName());
        return materialsMapper.selectSysTeacherKpiFillingBonusPointsMaterialsList(materials);
    }

    @Override
    public List<SysTeacherKpiFillingBonusPointsMaterials> selectSysTeacherKpiFillingBonusPointsMaterialsByFdyName(String fdyName, String fillingYear, String fillingMonth, String classType, String bonusType) {
        return materialsMapper.selectSysTeacherKpiFillingBonusPointsMaterialsByFdyName(fdyName, fillingYear, fillingMonth, classType, bonusType);
    }

    @Override
    public int insertSysTeacherKpiFillingBonusPointsMaterials(SysTeacherKpiFillingBonusPointsMaterials materials) {
        materials.setFdyName(SecurityUtils.getLoginUser().getUser().getNickName());
        return materialsMapper.insertSysTeacherKpiFillingBonusPointsMaterials(materials);
    }

    @Override
    public int updateSysTeacherKpiFillingBonusPointsMaterials(SysTeacherKpiFillingBonusPointsMaterials materials) {
        materials.setFdyName(SecurityUtils.getLoginUser().getUser().getNickName());
        return materialsMapper.updateSysTeacherKpiFillingBonusPointsMaterials(materials);
    }

    @Override
    public int deleteSysTeacherKpiFillingBonusPointsMaterialsByIds(Long[] ids) {
        return materialsMapper.deleteSysTeacherKpiFillingBonusPointsMaterialsByIds(ids);
    }

    @Override
    public int deleteSysTeacherKpiFillingBonusPointsMaterialsById(Long id) {
        return materialsMapper.deleteSysTeacherKpiFillingBonusPointsMaterialsById(id);
    }
}
