package com.fjhx.controller.order;

import com.fjhx.entity.order.OrderInfo;
import com.fjhx.params.order.OrderDetailsEx;
import com.fjhx.service.order.OrderDetailsService;
import org.springblade.core.tool.api.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 销售订单明细表 前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2022-12-02
 */
@RestController
@RequestMapping("/orderDetails")
public class OrderDetailsController {

    @Autowired
    private OrderDetailsService orderDetailsService;

    @PostMapping("/listByOrderSalesId")
    public R listByOrderSalesId(@RequestBody OrderInfo orderInfo) {
        List<OrderDetailsEx> result = orderDetailsService.listByOrderSalesId(orderInfo.getId());
        return R.success(result);
    }

}

