
package com.tmerclub.cloud.order.controller.admin;

import com.tmerclub.cloud.common.response.ServerResponseEntity;
import com.tmerclub.cloud.order.service.OrderItemService;
import com.tmerclub.cloud.order.vo.OrderDetailVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Pineapple
 * @date 2021/6/9 9:19
 */
@RestController("adminOrderItemController")
@RequestMapping("/mp/order_item")
@Tag(name = "admin-订单项信息")
public class OrderItemController {

    @Autowired
    private OrderItemService orderItemService;

    @GetMapping("/get_order_detail")
    @Operation(summary = "查询订单项、退款详情", description = "根据id查询")
    public ServerResponseEntity<OrderDetailVO> getOrderItemDetail(Long orderId, Long refundId) {
        OrderDetailVO orderDetailVO = orderItemService.listDetailByParam(orderId, refundId);
        return ServerResponseEntity.success(orderDetailVO);
    }
}
