package com.kxs.store.biz.controller.kxsapp;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kxs.common.core.util.R;
import com.kxs.product.api.dto.kxsapp.machine.StoreActMachineDayDetailDTO;
import com.kxs.product.api.dto.kxsapp.machine.StoreActMachineMonthTotalDTO;
import com.kxs.store.api.vo.kxsapp.storeAct.StoreActTotalVO;
import com.kxs.store.biz.service.KxsActTotalService;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.springdoc.core.annotations.ParameterObject;
import org.springframework.web.bind.annotation.*;

/**
 * 仓库模块激活统计控制器
 *
 * @author 系统
 * @since 2024-01-10 11:43:19
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("storeAct")
public class StoreActTotalController {

    private final KxsActTotalService kxsActTotalService;


    /**
     * 订单管理-激活统计
     *
     * @param page 分页对象
     * @param param 查询实体
     * @return 订单管理-激活统计
     */
    @GetMapping("/activateMachineMonthTotal")
    public R activateMachineMonthTotal(@ParameterObject Page<StoreActTotalVO> page, @Valid @ParameterObject StoreActMachineMonthTotalDTO param) {

        return R.ok(kxsActTotalService.activateMachineMonthTotal(page, param));
    }


    /**
     * 订单管理-激活统计明细
     *
     * @param page 分页对象
     * @param param 查询实体
     * @return 订单管理-激活统计明细
     */
    @GetMapping("/activateMachineMonthTotalDetail")
    public R activateMachineMonthTotalDetail(@ParameterObject Page<StoreActTotalVO> page, @Valid @ParameterObject StoreActMachineDayDetailDTO param) {

        return R.ok(kxsActTotalService.activateMachineMonthTotalDetail(page, param));
    }


}

