package com.xhkjedu.sapi.controller.region;

import com.xhkjedu.sapi.service.region.RAppAnalyzeService;
import com.xhkjedu.utils.N_Utils;
import com.xhkjedu.vo.ResultVo;
import com.xhkjedu.sapi.vo.region.RegionParam;
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;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @author ywx
 * @classname RAppAnalyzeController
 * @description 区域后台统计--应用统计
 * @date 2021/7/15 8:53
 **/
@RestController
@RequestMapping("/raanalyze")
public class RAppAnalyzeController {
    @Resource
    private RAppAnalyzeService rAppAnalyzeService;

    @PostMapping("/list_app")
    public ResultVo listApp(@RequestBody RegionParam param){
        Integer level = param.getLevel();
        N_Utils.validation(new Object[]{level,"学段",1,param.getYear(),"学年",1});
        Map map = rAppAnalyzeService.listApp(param);
        return new ResultVo(0,"获取应用统计成功",map);
    }
}
