package com.sky.ioc.controller.life;

import com.sky.ioc.entity.params.IocParam;
import com.sky.ioc.service.fitness.HealthService;
import com.sky.ioc.tool.ReturnMsg;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author LunCe
 */
@Api(tags ="智享生活----健康小屋")
@Slf4j
@RestController
@RequestMapping("healthhome")
public class HealthHomeController {

    @Autowired
    private HealthService healthService;

    @ApiOperation("查询智慧生活中健康小屋的核心指标")
    @PostMapping("getCoreIndicators")
    public ReturnMsg getCoreIndicators(@RequestBody IocParam iocParam){
//        dateType   1.周，2.月，3.年
        return healthService.getCoreIndicators(iocParam);
    }



    @ApiOperation("查询智慧生活中健康小屋的小屋分析")
    @PostMapping("getHutAnalysis")
    public ReturnMsg  getHutAnalysis(@RequestBody IocParam iocParam){
//        dateType   1.周，2.月，3.年
        return healthService.getHutAnalysis(iocParam);
    }



    @ApiOperation("查询智慧生活中健康小屋的环境监测")
    @PostMapping("getEnvironmentalDetection")
    public ReturnMsg  getEnvironmentalDetection(@RequestBody IocParam iocParam){
//        dateType   1.周，2.月，3.年
        return healthService.getEnvironmentalDetection(iocParam);
    }









}
