From 8e2af5c93cfe23de86df7a52bc89f601a6391c11 Mon Sep 17 00:00:00 2001 From: rentaiming <806181062@qq.com> Date: 星期六, 20 七月 2024 21:22:07 +0800 Subject: [PATCH] 修改bug --- ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml | 2 ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/controller/forepart/ForepartAuctionSalesroomController.java | 11 +++ ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomGoodsServiceImpl.java | 5 + ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/HomeGoodsSkuInfoVO.java | 1 ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/HomeGoodsSeckillInfoVO.java | 3 + ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomServiceImpl.java | 19 ++++++ ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/MemberGoodsCollectionServiceImpl.java | 29 +++++---- ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsGroupPurchaseServiceImpl.java | 86 ++++++++++++++++++++-------- ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSkuServiceImpl.java | 1 ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSeckillServiceImpl.java | 2 10 files changed, 120 insertions(+), 39 deletions(-) diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/HomeGoodsSeckillInfoVO.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/HomeGoodsSeckillInfoVO.java index 8576ad9..b4bb914 100644 --- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/HomeGoodsSeckillInfoVO.java +++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/HomeGoodsSeckillInfoVO.java @@ -113,4 +113,7 @@ @ApiModelProperty(value = "是预约 1未预约,2预约") @JsonInclude(JsonInclude.Include.ALWAYS) private Integer isAppointment; + + @ApiModelProperty(value = "秒杀库存") + private Integer seckillStock; } diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/HomeGoodsSkuInfoVO.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/HomeGoodsSkuInfoVO.java index 77d898d..0d25865 100644 --- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/HomeGoodsSkuInfoVO.java +++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/HomeGoodsSkuInfoVO.java @@ -100,4 +100,5 @@ @ApiModelProperty(value = "是团购 1没有团购商品,2有团购商品") private Integer GroupPurchaseGoods; + } diff --git a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/controller/forepart/ForepartAuctionSalesroomController.java b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/controller/forepart/ForepartAuctionSalesroomController.java index 4b2eae0..2a49467 100644 --- a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/controller/forepart/ForepartAuctionSalesroomController.java +++ b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/controller/forepart/ForepartAuctionSalesroomController.java @@ -1,6 +1,8 @@ package com.ruoyi.auction.controller.forepart; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ruoyi.auction.mapper.AuctionGoodsMapper; import com.ruoyi.auction.service.IAuctionGoodsService; import com.ruoyi.common.core.exception.ServiceException; @@ -119,6 +121,15 @@ if (auctionGoods.getListingStatus().getCode()==1){ throw new ServiceException("商品拍卖下线"); } + }else{ + AuctionSalesroom byId = iAuctionSalesroomService.getById(memberAuctionSalesroomBondDTO.getAuctionSalesroomId()); + if(byId==null){ + LambdaQueryWrapper<AuctionSalesroom> wrapper= Wrappers.lambdaQuery(); + wrapper.eq(AuctionSalesroom::getAuctionSalesroomNo,memberAuctionSalesroomBondDTO.getAuctionSalesroomId()); + wrapper.eq(AuctionSalesroom::getDelFlag,0); + byId =iAuctionSalesroomService.getOne(wrapper); + memberAuctionSalesroomBondDTO.setAuctionSalesroomId(byId.getId()); + } } PayInfoVO payInfoVO = iAuctionSalesroomService.SaveSignUpNow(memberAuctionSalesroomBondDTO); diff --git a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomGoodsServiceImpl.java b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomGoodsServiceImpl.java index e54fa91..bc4abbe 100644 --- a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomGoodsServiceImpl.java +++ b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomGoodsServiceImpl.java @@ -321,6 +321,11 @@ wrapper2.orderByAsc(AuctionSalesroomGoods::getSortNum); wrapper2.last("limit 1"); AuctionSalesroomGoods auctionSalesroomGoods = this.getOne(wrapper2); + + if (auctionSalesroomGoods==null){ + throw new ServiceException("以没有待拍卖商品"); + } + if(auctionSalesroomGoods!=null){ auctionSalesroomGoods.setStatus(AuctionGoodsStatusEnum.IN_PROGRESS); auctionSalesroomGoods.setStartTime(LocalDateTime.now()); diff --git a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomServiceImpl.java b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomServiceImpl.java index 053ad8a..3881244 100644 --- a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomServiceImpl.java +++ b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomServiceImpl.java @@ -427,6 +427,7 @@ wrapper.eq(AuctionSalesroom::getAuctionSalesroomNo,memberAuctionSalesroomDTO.getAuctionSalesroomId()); wrapper.eq(AuctionSalesroom::getDelFlag,0); byId =this.getOne(wrapper); + memberAuctionSalesroomDTO.setAuctionSalesroomId(byId.getId()); } if (byId.getType().getCode()==0){ @@ -446,6 +447,7 @@ memberAuctionSalesroomInfoVO.setStartTime(byId.getStartTime()); memberAuctionSalesroomInfoVO.setStatus(byId.getStatus()); memberAuctionSalesroomInfoVO.setCoverPic(byId.getCoverPic()); + List<OrderAuctionBond> data = orderClient.getOrderAuctionBondList1(memberAuctionSalesroomDTO, SecurityConstants.INNER).getData(); if (data.size()>0){ memberAuctionSalesroomInfoVO.setIsApply(2); @@ -567,6 +569,15 @@ @Override public void CancelSignUpNow(MemberAuctionSalesroomBondDTO memberAuctionSalesroomBondDTO) { if (memberAuctionSalesroomBondDTO.getBondType()==2){ + AuctionSalesroom byId = this.getById(memberAuctionSalesroomBondDTO.getAuctionSalesroomId()); + if(byId==null){ + LambdaQueryWrapper<AuctionSalesroom> wrapper= Wrappers.lambdaQuery(); + wrapper.eq(AuctionSalesroom::getAuctionSalesroomNo,memberAuctionSalesroomBondDTO.getAuctionSalesroomId()); + wrapper.eq(AuctionSalesroom::getDelFlag,0); + byId =this.getOne(wrapper); + memberAuctionSalesroomBondDTO.setAuctionSalesroomId(byId.getId()); + } + OrderAuctionBond orderAuctionBond = orderClient.getOrderAuctionBondone(memberAuctionSalesroomBondDTO, SecurityConstants.INNER).getData(); List<RefundDTO> refundDTOList = new ArrayList<>(); @@ -636,6 +647,14 @@ if (byId.getStartingPrice().doubleValue()>bidVO.getLastBidAmount().doubleValue()){ throw new ServiceException("出价不能比起拍价低"); } + AuctionSalesroom byId1 = this.getById(bidVO.getAuctionSalesroomId()); + if(byId1==null){ + LambdaQueryWrapper<AuctionSalesroom> wrapper= Wrappers.lambdaQuery(); + wrapper.eq(AuctionSalesroom::getAuctionSalesroomNo,bidVO.getAuctionSalesroomId()); + wrapper.eq(AuctionSalesroom::getDelFlag,0); + AuctionSalesroom one = this.getOne(wrapper); + bidVO.setAuctionSalesroomId(one.getId()); + } LambdaQueryWrapper<AuctionBidRecord> wrapper3=Wrappers.lambdaQuery(); wrapper3.eq(AuctionBidRecord::getAuctionSalesroomId,bidVO.getAuctionSalesroomId()); diff --git a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsGroupPurchaseServiceImpl.java b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsGroupPurchaseServiceImpl.java index 9c92c18..2d12b44 100644 --- a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsGroupPurchaseServiceImpl.java +++ b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsGroupPurchaseServiceImpl.java @@ -8,11 +8,8 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.Lists; import com.ruoyi.common.core.constant.SecurityConstants; -import com.ruoyi.common.core.enums.ClientTypeEnum; -import com.ruoyi.common.core.enums.GroupStatusEnum; -import com.ruoyi.common.core.enums.ListingStatusEnum; -import com.ruoyi.common.core.enums.OrderStatusEnum; -import com.ruoyi.common.core.enums.StartStatusEnum; +import com.ruoyi.common.core.domain.R; +import com.ruoyi.common.core.enums.*; import com.ruoyi.common.core.exception.ServiceException; import com.ruoyi.common.core.utils.DateUtils; import com.ruoyi.common.core.utils.StringUtils; @@ -37,11 +34,7 @@ import com.ruoyi.system.api.domain.GoodsSku; import com.ruoyi.system.api.domain.Order; import com.ruoyi.system.api.domain.WebsocketMessageDTO; -import com.ruoyi.system.api.domain.dto.GoodsStockUpdDTO; -import com.ruoyi.system.api.domain.dto.HomeGoodsSkuDTO; -import com.ruoyi.system.api.domain.dto.ListStatusDTO; -import com.ruoyi.system.api.domain.dto.OrderUpdDTO; -import com.ruoyi.system.api.domain.dto.RefundDTO; +import com.ruoyi.system.api.domain.dto.*; import com.ruoyi.system.api.domain.vo.GoodsGroupPurchaseInfoVO; import com.ruoyi.system.api.domain.vo.OrderVO; import com.ruoyi.system.api.domain.vo.WdGoodsGroupPurchaseVO; @@ -386,23 +379,31 @@ goodsGroupPurchaseInfoVO.setGroupSize(one.getGroupSize()); goodsGroupPurchaseInfoVO.setLimitNumber(one.getLimitNumber()); - LambdaQueryWrapper<GoodsGroupPurchaseInfo> wrapper6= Wrappers.lambdaQuery(); - wrapper6.eq(GoodsGroupPurchaseInfo::getDelFlag,0); - wrapper6.eq(GoodsGroupPurchaseInfo::getGroupStatus,0); - wrapper6.eq(GoodsGroupPurchaseInfo::getGroupPurchaseId,one.getId()); - GoodsGroupPurchaseInfo one1 = goodsGroupPurchaseInfoService.getOne(wrapper6); - if (one1!=null){ - goodsGroupPurchaseInfoVO.setCurrentNumber(one1.getCurrentNumber()); - if (one1.getGroupStatus()==0){ - goodsGroupPurchaseInfoVO.setGroupStatus(GroupStatusEnum.TO_FORM_A_GROUP); - }else{ - goodsGroupPurchaseInfoVO.setGroupStatus(GroupStatusEnum.FORMED_INTO_A_GROUP); - } + if (one.getGroupStatus().getCode()==2){ + LambdaQueryWrapper<GoodsGroupPurchaseInfo> wrapper6= Wrappers.lambdaQuery(); + wrapper6.eq(GoodsGroupPurchaseInfo::getDelFlag,0); + wrapper6.eq(GoodsGroupPurchaseInfo::getGroupStatus,0); + wrapper6.eq(GoodsGroupPurchaseInfo::getGroupPurchaseId,one.getId()); + GoodsGroupPurchaseInfo one1 = goodsGroupPurchaseInfoService.getOne(wrapper6); + if (one1!=null){ + goodsGroupPurchaseInfoVO.setCurrentNumber(one1.getCurrentNumber()); + if (one1.getGroupStatus()==0){ + goodsGroupPurchaseInfoVO.setGroupStatus(GroupStatusEnum.TO_FORM_A_GROUP); + }if(one1.getGroupStatus()==1){ + goodsGroupPurchaseInfoVO.setGroupStatus(GroupStatusEnum.FORMED_INTO_A_GROUP); + }if(one1.getGroupStatus()==2){ + goodsGroupPurchaseInfoVO.setGroupStatus(GroupStatusEnum.GROUP_FAILURE); + } + }else{ + goodsGroupPurchaseInfoVO.setCurrentNumber(one.getCurrentNumber()); + goodsGroupPurchaseInfoVO.setGroupStatus(one.getGroupStatus()); + } }else{ - goodsGroupPurchaseInfoVO.setCurrentNumber(one.getCurrentNumber()); + goodsGroupPurchaseInfoVO.setCurrentNumber(one.getGroupSize()); goodsGroupPurchaseInfoVO.setGroupStatus(one.getGroupStatus()); } + goodsGroupPurchaseInfoVO.setStartTime(one.getStartTime()); goodsGroupPurchaseInfoVO.setEndTime(one.getEndTime()); goodsGroupPurchaseInfoVO.setDescription(one.getDescription()); @@ -436,9 +437,15 @@ if (one7!=null){ goodsGroupPurchaseInfoVO.setCurrentNumber(one7.getCurrentNumber()); if (one7.getGroupStatus()==0){ - goodsGroupPurchaseInfoVO.setGroupStatus(GroupStatusEnum.TO_FORM_A_GROUP); - }else{ + if (one7.getGroupSize()-one7.getCurrentNumber()<5){ + goodsGroupPurchaseInfoVO.setGroupStatus(GroupStatusEnum.MS_FAILURE); + }else{ + goodsGroupPurchaseInfoVO.setGroupStatus(GroupStatusEnum.TO_FORM_A_GROUP); + } + }if(one7.getGroupStatus()==1){ goodsGroupPurchaseInfoVO.setGroupStatus(GroupStatusEnum.FORMED_INTO_A_GROUP); + }if(one7.getGroupStatus()==2){ + goodsGroupPurchaseInfoVO.setGroupStatus(GroupStatusEnum.GROUP_FAILURE); } } @@ -539,6 +546,35 @@ goodsGroupPurchaseeVO.setPrice(byId.getPrice()); goodsGroupPurchaseeVO.setYears(String.valueOf(byId.getYears().getYear())); goodsGroupPurchaseeVO.setIsGoodsGroupPurchase(2); + OrderDTO orderDTO =new OrderDTO(); + orderDTO.setOrderFrom(OrderFromEnum.GROUP_PURCHASE_ORDERS); + orderDTO.setGoodsSkuId(goodsGroupPurchaseeVO.getId()); + orderDTO.setMemberId(homeGoodsSkuDTO.getMemberId()); + Order orderOne = orderClient.getOrderOne(orderDTO, SecurityConstants.INNER).getData(); + + LambdaQueryWrapper<GoodsGroupPurchaseInfo> wrapper6= Wrappers.lambdaQuery(); + wrapper6.eq(GoodsGroupPurchaseInfo::getDelFlag,0); + wrapper6.eq(GoodsGroupPurchaseInfo::getGroupStatus,0); + wrapper6.eq(GoodsGroupPurchaseInfo::getGroupPurchaseId,goodsGroupPurchaseeVO.getId()); + wrapper6.eq(GoodsGroupPurchaseInfo::getMubre,orderOne.getGroupNo()); + GoodsGroupPurchaseInfo one1 = goodsGroupPurchaseInfoService.getOne(wrapper6); + if (one1!=null){ + goodsGroupPurchaseeVO.setCurrentNumber(one1.getCurrentNumber()); + if (one1.getGroupStatus()==0){ + if (one1.getGroupSize()-one1.getCurrentNumber()<5){ + goodsGroupPurchaseeVO.setGroupStatus(GroupStatusEnum.MS_FAILURE); + }else{ + goodsGroupPurchaseeVO.setGroupStatus(GroupStatusEnum.TO_FORM_A_GROUP); + } + }if (one1.getGroupStatus()==1){ + goodsGroupPurchaseeVO.setGroupStatus(GroupStatusEnum.FORMED_INTO_A_GROUP); + }if (one1.getGroupStatus()==2){ + goodsGroupPurchaseeVO.setGroupStatus(GroupStatusEnum.GROUP_FAILURE); + } + + } + + } diff --git a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSeckillServiceImpl.java b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSeckillServiceImpl.java index 2664565..250a8fa 100644 --- a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSeckillServiceImpl.java +++ b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSeckillServiceImpl.java @@ -471,6 +471,8 @@ homeGoodsSeckillInfoVO.setStartTime(byId.getStartTime()); homeGoodsSeckillInfoVO.setEndTime(byId.getEndTime()); homeGoodsSeckillInfoVO.setStartStatus(byId.getStartStatus()); + homeGoodsSeckillInfoVO.setSeckillStock(byId.getSeckillStock()); + LambdaQueryWrapper<MemberGoodsCollection> wrapper3= Wrappers.lambdaQuery(); wrapper3.eq(MemberGoodsCollection::getDelFlag,0); diff --git a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSkuServiceImpl.java b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSkuServiceImpl.java index 1823b6e..40cce93 100644 --- a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSkuServiceImpl.java +++ b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSkuServiceImpl.java @@ -419,6 +419,7 @@ homeGoodsSkuInfoVO.setCoverPic(byId.getCoverPic()); homeGoodsSkuInfoVO.setAlbum(byId.getAlbum()); homeGoodsSkuInfoVO.setDescription(byId.getDescription()); + homeGoodsSkuInfoVO.setStock(byId.getStock()); homeGoodsSkuInfoVO.setDetail(byId.getDetail()); homeGoodsSkuInfoVO.setShareTitle(byId.getShareTitle()); homeGoodsSkuInfoVO.setSharePic(byId.getSharePic()); diff --git a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/MemberGoodsCollectionServiceImpl.java b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/MemberGoodsCollectionServiceImpl.java index 313439f..1aa37c2 100644 --- a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/MemberGoodsCollectionServiceImpl.java +++ b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/MemberGoodsCollectionServiceImpl.java @@ -149,19 +149,22 @@ } if(auctionCollection.getType()==2){ GoodsGroupPurchase goodsGroupPurchase = goodsGroupPurchaseMapper.selectById(auctionCollection.getTargetId()); HomeGoodsSkuListVO auctionGoodsVO=new HomeGoodsSkuListVO(); - GoodsSku goodsSku = goodsSkuMapper.selectById(goodsGroupPurchase.getGoodsSkuId()); - auctionGoodsVO.setId(auctionCollection.getTargetId()); - auctionGoodsVO.setPrice(goodsGroupPurchase.getGroupPurchasePrice()); - auctionGoodsVO.setCoverPic(goodsSku.getCoverPic()); - auctionGoodsVO.setSkuName(goodsSku.getSkuName()); - auctionGoodsVO.setSoldQuantity(goodsSku.getSoldQuantity()); - auctionGoodsVO.setIsCollection(2); - auctionGoodsVO.setXiaosPrice(goodsSku.getPrice()); - auctionGoodsVO.setStartTime(goodsGroupPurchase.getStartTime()); - auctionGoodsVO.setEndTime(goodsGroupPurchase.getEndTime()); - auctionGoodsVO.setXiaosPrice(goodsGroupPurchase.getGroupPurchasePrice()); - auctionGoodsVO.setType(auctionCollection.getType()); - auctionGoodsVOS.add(auctionGoodsVO); + if(goodsGroupPurchase!=null){ + GoodsSku goodsSku = goodsSkuMapper.selectById(goodsGroupPurchase.getGoodsSkuId()); + auctionGoodsVO.setId(auctionCollection.getTargetId()); + auctionGoodsVO.setPrice(goodsGroupPurchase.getGroupPurchasePrice()); + auctionGoodsVO.setCoverPic(goodsSku.getCoverPic()); + auctionGoodsVO.setSkuName(goodsSku.getSkuName()); + auctionGoodsVO.setSoldQuantity(goodsSku.getSoldQuantity()); + auctionGoodsVO.setIsCollection(2); + auctionGoodsVO.setXiaosPrice(goodsSku.getPrice()); + auctionGoodsVO.setStartTime(goodsGroupPurchase.getStartTime()); + auctionGoodsVO.setEndTime(goodsGroupPurchase.getEndTime()); + auctionGoodsVO.setXiaosPrice(goodsGroupPurchase.getGroupPurchasePrice()); + auctionGoodsVO.setType(auctionCollection.getType()); + auctionGoodsVOS.add(auctionGoodsVO); + } + } } diff --git a/ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml b/ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml index d6590c9..570e932 100644 --- a/ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml +++ b/ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml @@ -19,7 +19,7 @@ SELECT ifnull(SUM(o.goods_quantity), 0) FROM t_order o WHERE o.goods_sku_id = #{goodsSkuId} - AND o.order_status IN (1,2,3) + AND o.order_status IN (2,3) and o.member_id =#{memberId} </select> -- Gitblit v1.7.1