From 5f21fd4703a6893e4385d55dafbf5b2a1a1d7785 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期三, 27 十一月 2024 20:14:52 +0800
Subject: [PATCH] 完善部分接口逻辑
---
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ShoppingCartController.java | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ShoppingCartController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ShoppingCartController.java
index d9e7874..6132371 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ShoppingCartController.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ShoppingCartController.java
@@ -1,7 +1,10 @@
package com.ruoyi.order.controller;
+import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.BaseTable;
+import com.ruoyi.common.core.web.page.TableDataInfo;
+import com.ruoyi.order.service.ShoppingCartService;
import com.ruoyi.order.vo.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
@@ -9,12 +12,15 @@
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
+import javax.annotation.Resource;
+
@RestController
@RequestMapping("/shopping-cart")
@Api(tags = "购物车")
-public class ShoppingCartController {
+public class ShoppingCartController extends BaseController {
-
+ @Resource
+ private ShoppingCartService shoppingCartService;
@ResponseBody
@@ -24,9 +30,9 @@
@ApiImplicitParam(name = "type", value = "商品类型(1=服务商品,2=单品商品)", required = true, dataType = "int"),
@ApiImplicitParam(name = "shopId", value = "核销门店id", required = true, dataType = "int")
})
- public AjaxResult<BaseTable<MyShoppingCartVo>> getMyShoppingCart(@PathVariable("type") Integer type, @PathVariable("shopId") Integer shopId){
- // todo 待完善 pu
- return AjaxResult.success();
+ public TableDataInfo<MyShoppingCartVo> getMyShoppingCart(@PathVariable("type") Integer type, @PathVariable("shopId") Integer shopId){
+ startPage();
+ return getDataTable(shoppingCartService.getMyShoppingCart(type, shopId));
}
--
Gitblit v1.7.1