package com.java110.user.dao.impl;

import com.java110.core.base.dao.BaseServiceDao;
import com.java110.user.dao.property.IAttendanceReminderV1ServiceDao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

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

@Service("attendanceReminderV1ServiceDaoImpl")
public class AttendanceReminderV1ServiceDaoImpl extends BaseServiceDao implements IAttendanceReminderV1ServiceDao {

    private static Logger logger = LoggerFactory.getLogger(AttendanceReminderV1ServiceDaoImpl.class);

    @Override
    public List<Map> queryStaffSchedules(Map params) {
        return sqlSessionTemplate.selectList("attendanceReminderV1ServiceDaoImpl.queryStaffSchedules", params);
    }

    @Override
    public List<Map> queryScheduleById(Map params) {
        return sqlSessionTemplate.selectList("attendanceReminderV1ServiceDaoImpl.queryScheduleById", params);
    }

    @Override
    public List<Map> queryScheduleDay(Map params) {
        return sqlSessionTemplate.selectList("attendanceReminderV1ServiceDaoImpl.queryScheduleDay", params);
    }

    @Override
    public List<Map> queryScheduleTimes(Map params) {
        return sqlSessionTemplate.selectList("attendanceReminderV1ServiceDaoImpl.queryScheduleTimes", params);
    }

    @Override
    public Map queryTodayPunch(Map params) {
        List<Map> list = sqlSessionTemplate.selectList("attendanceReminderV1ServiceDaoImpl.queryTodayPunch", params);
        if (list != null && !list.isEmpty()) {
            return list.get(0);
        }
        return null;
    }
}
