package com.ruoyi.order.controller;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.web.controller.BaseController;
|
import com.ruoyi.order.service.OrderGoodService;
|
import com.ruoyi.model.OrderGood;
|
import org.springframework.web.bind.annotation.*;
|
|
import javax.annotation.Resource;
|
import java.util.List;
|
|
/**
|
* <p>
|
* 前端控制器
|
* </p>
|
*
|
* @author luodangjia
|
* @since 2024-11-21
|
*/
|
@RestController
|
@RequestMapping("/order-good")
|
public class OrderGoodController extends BaseController {
|
@Resource
|
private OrderGoodService orderGoodService;
|
|
/**
|
* 查询指定商品订单
|
*/
|
@PostMapping("/selectGoodsOrder")
|
public R<List<OrderGood>> selectGoodsOrder(@RequestBody List<Long> goodsIds){
|
startPage();
|
List<OrderGood> orderGoods = orderGoodService.list(new LambdaQueryWrapper<OrderGood>()
|
.in(OrderGood::getGoodsId, goodsIds));
|
return R.ok(orderGoods);
|
}
|
}
|