package com.diagbot.web;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.diagbot.annotation.SysLogger;
import com.diagbot.dto.RespDTO;
import com.diagbot.entity.OrderDetails;
import com.diagbot.facade.OrderDetailsFacade;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: 订单明细 前端控制器
 * @Author: wangyu
 * @Date: 15:46 2018/9/17
 */
@RestController
@RequestMapping("/diagOrderDetails")
@Api(value="订单明细API", tags={"订单明细API"})
@SuppressWarnings("unchecked")
public class DiagOrderDetailsController {
    @Autowired
    private OrderDetailsFacade orderDetailsFacade;

    @ApiOperation(value = "根据订单编号查询订单明细[by:wangyu]", notes = "orderNum订单编号  必填<br>")
    @PostMapping("/orderDetialShow")
    @SysLogger("orderDetialShow")
    public RespDTO<IPage<OrderDetails>> orderDetialShow(Page page,OrderDetails orderDetails){
        IPage<OrderDetails> orderDetailsIPage = orderDetailsFacade.orderDetialShows(page,orderDetails);
        return RespDTO.onSuc(orderDetailsIPage);
    }
}

