package com.ruoyi.personnelManagement.service.impl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.ruoyi.personnelManagement.pojo.Attendance;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
import com.ruoyi.personnelManagement.mapper.AttendanceMapper;
|
import com.ruoyi.personnelManagement.service.IAttendanceService;
|
import java.util.Arrays;
|
import java.util.List;
|
|
/**
|
* 考勤记录Service业务层处理
|
*
|
* @author ruoyi
|
* @date 2025-08-08
|
*/
|
@Service
|
public class AttendanceServiceImpl extends ServiceImpl<AttendanceMapper, Attendance> implements IAttendanceService
|
{
|
@Autowired
|
private AttendanceMapper attendanceMapper;
|
|
/**
|
* 查询考勤记录
|
*
|
* @param id 考勤记录主键
|
* @return 考勤记录
|
*/
|
@Override
|
public Attendance selectAttendanceById(Long id)
|
{
|
return getById(id);
|
}
|
|
/**
|
* 查询考勤记录列表
|
*
|
* @param attendance 考勤记录
|
* @return 考勤记录
|
*/
|
@Override
|
public List<Attendance> selectAttendanceList(Attendance attendance)
|
{
|
return attendanceMapper.selectAttendanceList(attendance);
|
}
|
|
/**
|
* 新增考勤记录
|
*
|
* @param attendance 考勤记录
|
* @return 结果
|
*/
|
@Override
|
public int insertAttendance(Attendance attendance)
|
{
|
return save(attendance)?1:0;
|
}
|
|
/**
|
* 修改考勤记录
|
*
|
* @param attendance 考勤记录
|
* @return 结果
|
*/
|
@Override
|
public int updateAttendance(Attendance attendance)
|
{
|
return updateById(attendance)?1:0;
|
}
|
|
/**
|
* 批量删除考勤记录
|
*
|
* @param ids 需要删除的考勤记录主键
|
* @return 结果
|
*/
|
@Override
|
public int deleteAttendanceByIds(Long[] ids)
|
{
|
return removeByIds(Arrays.asList(ids))?1:0;
|
}
|
|
/**
|
* 删除考勤记录信息
|
*
|
* @param id 考勤记录主键
|
* @return 结果
|
*/
|
@Override
|
public int deleteAttendanceById(Long id)
|
{
|
return removeById(id)?1:0;
|
}
|
|
}
|