package com.cxyxiaomo.epp.miniprogram.index.service;

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

import java.util.List;

@Service
public class ReportServiceImpl implements ReportService {

    @Autowired
    private ReportDao reportDao;

    // TODO
    // @Autowired
    // private UserDao userDao;

    @Override
    public int doReport(Report report) {
        // TODO
        // if(!report.getNormal().equals("发热") || !report.getIsolation().equals("无需隔离")){
        //     SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
        //     String date = formatter.format(new Date()) ;
        //     // 修改用户状态
        //     userDao.updState(report.getUser_id(),date);
        // }else{
        //     userDao.updState(report.getUser_id(),"1999-01-01");
        // }
        // return reportDao.doReport(report);
        return 0;
    }

    @Override
    public List<Report> myReport(Integer id) {
        return reportDao.myReport(id);
    }
}
