package com.sqx.modules.firstLogin.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sqx.modules.firstLogin.dao.EduDao;
import com.sqx.modules.firstLogin.entity.Edu;
import com.sqx.modules.firstLogin.service.EduService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EduServiceImpl extends ServiceImpl<EduDao, Edu> implements EduService {
    @Override
    public List<Edu> selectEdu( Integer userId) {
        QueryWrapper<Edu> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("user_id", userId).eq("is_use",1);
        queryWrapper.orderByAsc("start_time");
        return baseMapper.selectList(queryWrapper);

    }
}
