mitao
2024-06-17 0b9f2eeb5e2ff7995f39d217e90a6c64e37366d4
ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/controller/inner/OrderController.java
@@ -9,13 +9,20 @@
import com.ruoyi.system.api.domain.dto.HomeGoodsSkuDTO;
import com.ruoyi.system.api.domain.dto.OrderDTO;
import com.ruoyi.system.api.domain.dto.OrderUpdDTO;
import java.util.List;
import com.ruoyi.system.api.domain.vo.OrderVO;
import java.util.Collection;
import java.util.List;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
/**
@@ -106,4 +113,15 @@
        orderService.updateBatchById(orders);
        return R.ok();
    }
    /**
     * 根据优惠券id集合查询订单列表
     *
     * @param couponIds 优惠券id集合
     * @return List<Order>
     */
    @PostMapping("/order/list-by-coupon")
    R<List<Order>> getOrderByCouponIds(@RequestBody Collection<Long> couponIds) {
        return R.ok(orderService.getOrderByCouponIds(couponIds));
    }
}