935090232@qq.com
2021-03-19 81a3369395a7cccceb7cd36f5238cc6fe2aa88e5
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShoppingCartAction.java
@@ -95,12 +95,12 @@
    }
    @ApiOperation(value = "查询微商城购物车数量", notes = "")
    @PostMapping(value = "/getUserCartCount/{shopId}/{cartType}")
    @PostMapping(value = "/getUserCartCount/{shopId}")
    public
    @ResponseBody
    AjaxResult getUserCartCount(@PathVariable("shopId") Long shopId,@PathVariable("cartType") Integer cartType) {
    AjaxResult getUserCartCount(@PathVariable("shopId") Long shopId) {
        BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class);
        Integer userCartCount = shoppingCartDao.selectUserCartCount(shopId, loginUser.getOpenId(),cartType);
        Integer userCartCount = shoppingCartDao.selectUserCartCount(shopId, loginUser.getOpenId());
        if (userCartCount == null) {
            userCartCount = 0;
        }
@@ -187,7 +187,7 @@
            return new AjaxResult(AjaxResult.STATUS_FAIL, "保存失败");
        }
        int userCartCount = shoppingCartDao.selectUserCartCount(shoppingCart.getShopId(),
                loginUser.getOpenId(),shoppingCart.getCartType());
                loginUser.getOpenId());
        AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, "保存成功");
        result.putInMap("userCartCount", userCartCount);
        return result;
@@ -267,12 +267,12 @@
     * @param
     * @return
     */
    @PostMapping("/updateCartAllSelected/{shopId}/{isSelected}/{cartType}")
    @PostMapping("/updateCartAllSelected/{shopId}/{isSelected}")
    @ResponseBody
    public AjaxResult updateCartAllSelected(@PathVariable("isSelected") Integer isSelected,
                                            @PathVariable("shopId") Long shopId,@PathVariable("cartType") Integer cartType) {
                                            @PathVariable("shopId") Long shopId) {
        BizUser user = redisUserLoginUtils.getLoginUser(BizUser.class);
        shoppingCartDao.updateAllSelected(user.getOpenId(),shopId, isSelected,cartType);
        shoppingCartDao.updateAllSelected(user.getOpenId(),shopId, isSelected);
        return new AjaxResult(AjaxResult.STATUS_SUCCESS, "修改成功");
    }
}