|
@@ -0,0 +1,67 @@
|
|
|
+package com.zhongzheng.controller.order;
|
|
|
+
|
|
|
+import com.zhongzheng.common.annotation.Log;
|
|
|
+import com.zhongzheng.common.core.controller.BaseController;
|
|
|
+import com.zhongzheng.common.core.domain.AjaxResult;
|
|
|
+import com.zhongzheng.common.core.page.TableDataInfo;
|
|
|
+import com.zhongzheng.common.enums.BusinessType;
|
|
|
+import com.zhongzheng.common.utils.SecurityUtils;
|
|
|
+import com.zhongzheng.modules.order.bo.OrderAddBo;
|
|
|
+import com.zhongzheng.modules.order.bo.OrderGoodsQueryBo;
|
|
|
+import com.zhongzheng.modules.order.bo.OrderQueryBo;
|
|
|
+import com.zhongzheng.modules.order.service.IOrderGoodsService;
|
|
|
+import com.zhongzheng.modules.order.service.IOrderService;
|
|
|
+import com.zhongzheng.modules.order.vo.OrderGoodsVo;
|
|
|
+import com.zhongzheng.modules.order.vo.OrderListVo;
|
|
|
+import com.zhongzheng.modules.order.vo.OrderVo;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 订单Controller
|
|
|
+ *
|
|
|
+ * @author ruoyi
|
|
|
+ * @date 2021-11-08
|
|
|
+ */
|
|
|
+@Api(value = "订单控制器", tags = {"订单管理"})
|
|
|
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
|
|
+@RestController
|
|
|
+@RequestMapping("/order")
|
|
|
+public class OrderController extends BaseController {
|
|
|
+
|
|
|
+ private final IOrderService iOrderService;
|
|
|
+
|
|
|
+ private final IOrderGoodsService iOrderGoodsService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询订单列表
|
|
|
+ */
|
|
|
+ @ApiOperation("查询订单列表")
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:order:list')")
|
|
|
+ @GetMapping("/list")
|
|
|
+ public TableDataInfo<OrderListVo> list(OrderQueryBo bo) {
|
|
|
+ startPage();
|
|
|
+ List<OrderListVo> list = iOrderService.selectList(bo);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询订单商品列表
|
|
|
+ */
|
|
|
+ @ApiOperation("查询订单商品列表")
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:goods:list')")
|
|
|
+ @GetMapping("/goods/list")
|
|
|
+ public TableDataInfo<OrderGoodsVo> goodsList(OrderGoodsQueryBo bo) {
|
|
|
+ startPage();
|
|
|
+ List<OrderGoodsVo> list = iOrderGoodsService.selectList(bo);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|