package com.bonus.boot.manager.index.service;

import com.bonus.boot.manager.index.dao.IndexDao;
import com.bonus.boot.manager.index.entity.IndexBean;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IndexServiceImpl implements IndexService {
    private final IndexDao indexDao;

    public IndexServiceImpl(IndexDao indexDao) {
        this.indexDao = indexDao;
    }


    @Override
    public Integer getAgeDistribution(int i, String date) {
        int j = i+9;
        return indexDao.getAgeDistribution(i,j,date);
    }

    @Override
    public List<IndexBean> getIllnessCount(String date) {
        return indexDao.getIllnessCount(date);
    }

    @Override
    public List<IndexBean> getDiseaseDetectionRate(String date) {
        return indexDao.getDiseaseDetectionRate(date);
    }

    @Override
    public List<IndexBean> getMaleIllnessCount(String date) {
        return indexDao.getMaleIllnessCount(date);
    }

    @Override
    public List<IndexBean> getFemaleIllnessCount(String date) {
        return indexDao.getFemaleIllnessCount(date);
    }



}
