package com.xhkjedu.sapi.service.itemtool;

import com.xhkjedu.sapi.mapper.itemtool.StudentTodoMapper;
import com.xhkjedu.sapi.mapper.system.UserMapper;
import com.xhkjedu.sapi.vo.itemtool.StudentTodoVo;
import com.xhkjedu.utils.N_Utils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author ywx
 * @classname TodoService
 * @description 
 * @date 2020/6/12 16:05
 **/
@Service
public class StudentTodoService {
    @Resource
    private StudentTodoMapper studentTodoMapper;
    @Resource
    private UserMapper userMapper;

    /**
     * 获取学生代办事项列表
     * @Param [todos]
     * @Author ywx
     * @Date 2020/7/27 14:15
     * @return java.util.List<com.xhkjedu.vo.paperstudent.StudentTodoVo>
     **/
    public List<StudentTodoVo> listTodoNum(List<StudentTodoVo> todos) {
        Integer studentid = todos.get(0).getStudentid();
        Integer schoolid = userMapper.getSchoolIdByUserId(studentid);
        return studentTodoMapper.listTodoNum(todos, schoolid, N_Utils.getSecondTimestamp());
    }

}
