package com.sky.ioc.controller.life;

import com.sky.ioc.entity.params.IocParam;
import com.sky.ioc.service.supermarket.SupermarketService;
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;

/**
 * TODO 无人超市
 * @Description
 * @Author LunCe
 * @Date 2023/2/10 14:17
 **/
@Api(tags ="智享生活----无人超市")
@Slf4j
@RestController
@RequestMapping("/life_supermarket")
public class SupermarketController {


    @Autowired
    private SupermarketService supermarketService;


    @ApiOperation("查询智慧生活中无人超市的核心指标")
    @PostMapping("getCoreIndicators")
    public ReturnMsg getCoreIndicators(@RequestBody IocParam iocParam){
//        iocDateParam   1.周，2.月，3.年
        return supermarketService.getCoreIndicators(iocParam);
    }



    @ApiOperation("查询智慧生活中无人超市的商超分析")
    @PostMapping("getQuotientAnalysiss")
    public ReturnMsg  getQuotientAnalysiss(@RequestBody IocParam iocParam){
//        iocDateParam   1.周，2.月，3.年
        return supermarketService.getQuotientAnalysiss(iocParam);
    }


    @ApiOperation("查询智慧生活中无人超市的商品排行")
    @PostMapping("getProductRanking")
    public ReturnMsg  getProductRanking(@RequestBody IocParam iocParam){
//        iocDateParam   1.周，2.月，3.年
        return supermarketService.getProductRanking(iocParam);
    }















}
