package com.czg.controller.admin;

import com.czg.account.service.ShopProdStatisticService;
import com.czg.resp.CzgResult;
import com.czg.sa.StpKit;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Administrator
 */
@RestController
@RequestMapping("/admin/statistic")
public class ShopStatisticController {
    @Resource
    private ShopProdStatisticService shopProdStatisticService;

    @GetMapping("/prod")
    public CzgResult<?> getProduct(String name, String categoryId, String startTime, String endTime) {
        return CzgResult.success(shopProdStatisticService.pageInfo(StpKit.USER.getShopId(), name, categoryId, startTime, endTime));
    }
}
