From 5068fccfbf9ccac286016d0510ed452ee9298c72 Mon Sep 17 00:00:00 2001
From: jyy <935090232@qq.com>
Date: Thu, 18 Mar 2021 15:50:35 +0800
Subject: [PATCH] 积分商城3
---
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxScoreProductAction.java | 2 ++
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShoppingCartAction.java | 26 +++++++++++++-------------
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopShoppingCartDao.xml | 2 +-
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopShoppingCartDao.java | 2 +-
4 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxScoreProductAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxScoreProductAction.java
index 20318d0..4e069b7 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxScoreProductAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxScoreProductAction.java
@@ -62,4 +62,6 @@
+
+
}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShoppingCartAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShoppingCartAction.java
index f2e72e4..e01efca 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShoppingCartAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShoppingCartAction.java
@@ -1,25 +1,24 @@
package com.matrix.system.shopXcx.api.action;
+import com.matrix.biz.bean.BizUser;
+import com.matrix.component.redis.RedisUserLoginUtils;
import com.matrix.core.constance.SystemErrorCode;
import com.matrix.core.constance.SystemMessageCode;
import com.matrix.core.exception.GlobleException;
import com.matrix.core.pojo.AjaxResult;
import com.matrix.core.tools.StringUtils;
-import com.matrix.biz.bean.BizUser;
-import com.matrix.component.redis.RedisUserLoginUtils;
import com.matrix.system.common.constance.AppConstance;
-
-import com.matrix.system.shopXcx.bean.ShopShoppingCart;
-import com.matrix.system.shopXcx.bean.ShopSku;
-import com.matrix.system.shopXcx.dao.ShopShoppingCartDao;
-import com.matrix.system.shopXcx.dao.ShopSkuDao;
import com.matrix.system.shopXcx.api.service.ShoppingCartService;
import com.matrix.system.shopXcx.api.service.WxShopCouponService;
import com.matrix.system.shopXcx.api.vo.ShopCartBillVo;
import com.matrix.system.shopXcx.api.vo.ShopCartVo;
+import com.matrix.system.shopXcx.bean.ShopShoppingCart;
+import com.matrix.system.shopXcx.bean.ShopSku;
+import com.matrix.system.shopXcx.dao.ShopShoppingCartDao;
+import com.matrix.system.shopXcx.dao.ShopSkuDao;
+import io.swagger.annotations.Api;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
@@ -32,7 +31,8 @@
* @date 2019-06-12 19:15
*/
@CrossOrigin(origins = "*", maxAge = 3600)
-@Controller
+@Api(tags = "购物车类")
+@RestController
@RequestMapping(value = "wxapi/ShoppingCart")
public class WxShoppingCartAction {
@Autowired
@@ -259,7 +259,7 @@
* @param
* @return
*/
- @RequestMapping("/updateCartSelected")
+ @PostMapping("/updateCartSelected")
@ResponseBody
public AjaxResult updateCartSelected(@RequestBody ShopShoppingCart shoppingCart) {
Map<String, Object> modifyMap = new HashMap<>();
@@ -275,13 +275,13 @@
* @param
* @return
*/
- @RequestMapping("/updateCartAllSelected/{shopId}/{isSelected}")
+ @PostMapping("/updateCartAllSelected/{shopId}/{isSelected}/{cartType}")
@ResponseBody
public AjaxResult updateCartAllSelected(@PathVariable("isSelected") Integer isSelected,
- @PathVariable("shopId") Long shopId) {
+ @PathVariable("shopId") Long shopId,@PathVariable("cartType") Integer cartType) {
Map<String, Object> modifyMap = new HashMap<>();
BizUser user = redisUserLoginUtils.getLoginUser(BizUser.class);
- shoppingCartDao.updateAllSelected(user.getOpenId(),shopId, isSelected);
+ shoppingCartDao.updateAllSelected(user.getOpenId(),shopId, isSelected,cartType);
return new AjaxResult(AjaxResult.STATUS_SUCCESS, "修改成功");
}
}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopShoppingCartDao.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopShoppingCartDao.java
index 29c7691..89a5eb1 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopShoppingCartDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopShoppingCartDao.java
@@ -44,7 +44,7 @@
public Integer selectUserCartCount(@Param("shopId")Long shopId, @Param("openId")String openId);
- public int updateAllSelected(@Param("openId") String openId,@Param("shopId") Long shopId, @Param("isSelected") Integer isSelected);
+ public int updateAllSelected(@Param("openId") String openId, @Param("shopId") Long shopId, @Param("isSelected") Integer isSelected,@Param("artType") Integer artType);
/**
* 删除用户选中的购物车明细
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopShoppingCartDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopShoppingCartDao.xml
index 1b65878..68b9909 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopShoppingCartDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopShoppingCartDao.xml
@@ -223,7 +223,7 @@
<update id="updateAllSelected" >
- update shop_shopping_cart set isSelected = #{isSelected} where shop_id=#{shopId} and cart_user_id=#{openId}
+ update shop_shopping_cart set isSelected = #{isSelected} where shop_id=#{shopId} and cart_user_id=#{openId} and art_type=#{artType}
</update>
--
Gitblit v1.9.1