package vip.xiaonuo.disk.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import vip.xiaonuo.common.pojo.CommonResult;
import vip.xiaonuo.disk.service.FileStasticService;

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

@Tag(name = "operationLog", description = "资源概览接口")
@RestController
@Slf4j
@RequestMapping("/fileStastic")
public class FileStasticController {

   @Resource
   private FileStasticService fileStasticService;


    @Operation(summary = "资源概览存储空间统计接口", description = "资源概览存储空间统计接口")
    @RequestMapping(value = "/queryList", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<Map<String, Object>> queryList() {
        Map<String, Object> map= fileStasticService.queryList();
        return CommonResult.data(map);
    }


}
