package com.ichangzuo.system.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ichangzuo.common.result.PageResult;
import com.ichangzuo.system.model.query.IntegralPageQuery;
import com.ichangzuo.system.model.query.OrderPageQuery;
import com.ichangzuo.system.model.vo.IntegralAdminPageVO;
import com.ichangzuo.system.model.vo.OrderPageVO;
import com.ichangzuo.system.service.impl.OrderServiceImpl;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/order")
@RequiredArgsConstructor
public class OrderController {
    private final OrderServiceImpl orderService;

    @GetMapping("/page")
    public PageResult<OrderPageVO> listAdminPage(
            OrderPageQuery queryParams
    ){
        IPage<OrderPageVO> page = orderService.listPage(queryParams);
        return PageResult.success(page);
    }
}
