package com.cxyxiaomo.epp.access.service;

import com.cxyxiaomo.epp.access.dao.ReportDao;
import com.cxyxiaomo.epp.common.pojo.Report;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ReportServiceImpl implements ReportService {

    @Autowired
    ReportDao reportDao;

    @Override
    public void addRecord(Report report) {
        reportDao.insert(report);
    }

    public List<Report> getRecordListByUserId(Integer userId) {
        return reportDao.getReportListByUserId(userId);
    }

    public Report getLatestRecordByUserId(Integer userId) {
        return reportDao.getLatestReportByUserId(userId);
    }
}
