From 7a0f7e715ffacab8851de10abcf6b857ca84a263 Mon Sep 17 00:00:00 2001 From: rentaiming <806181062@qq.com> Date: 星期二, 09 七月 2024 17:54:13 +0800 Subject: [PATCH] 修改bug --- ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/ReturnRequestStatusEnum.java | 2 ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomServiceImpl.java | 2 ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderReturnRequestServiceImpl.java | 2 ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/getHomeGoodsSkuXxiVO.java | 4 + ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSkuServiceImpl.java | 20 +++++++-- ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSeckillServiceImpl.java | 3 - ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java | 30 ++++++++++++++ 7 files changed, 51 insertions(+), 12 deletions(-) diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/getHomeGoodsSkuXxiVO.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/getHomeGoodsSkuXxiVO.java index bba195e..100cc4d 100644 --- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/getHomeGoodsSkuXxiVO.java +++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/getHomeGoodsSkuXxiVO.java @@ -11,6 +11,8 @@ private String titleName; @ApiModelProperty(value = "内容") - @TableField("content") private String content; + + @ApiModelProperty(value = "排序") + private Integer num; } diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/ReturnRequestStatusEnum.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/ReturnRequestStatusEnum.java index 92aab8b..541d82f 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/ReturnRequestStatusEnum.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/ReturnRequestStatusEnum.java @@ -17,7 +17,7 @@ TO_BE_RECEIVED_BY_THE_PLATFORM(3, "待平台收货"), COMPLETED(4, "已完成"), REJECTED(5, "已拒绝"), - QX(6, "已拒绝"); + QX(6, "已取消"); @EnumValue private final int code; @JsonValue 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 e6aab42..535b17f 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 @@ -722,7 +722,7 @@ map.put("notification_type", NotificationTypeConstant.AUCTION_SALESROOM); map.put("auctionSalesroomId", byId.getId()); map.put("byId", byId.getStartStatus()); - map.put("lastBidAmount",one.getLastBidAmount()); + map.put("lastBidAmount",one3.getLastBidAmount()); map.put("message_type", "BidRecor"); map.put("type",4); String msg = null; 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 d3e2e84..e061b5c 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 @@ -264,8 +264,7 @@ public PageDTO<HomeGoodsSeckillVO> getHomeGoodsSeckillVOList(HomeGoodsSkuDTO homeGoodsSkuDTO) { LambdaQueryWrapper<GoodsSku> wrapper3= Wrappers.lambdaQuery(); wrapper3.eq(GoodsSku::getDelFlag,0); - wrapper3.eq(GoodsSku::getListingStatus,0); - if (homeGoodsSkuDTO.getSkuName()!=null){ + if (homeGoodsSkuDTO.getSkuName()!=null && homeGoodsSkuDTO.getSkuName()!=""){ wrapper3.like(GoodsSku::getSkuName,homeGoodsSkuDTO.getSkuName()); } if (homeGoodsSkuDTO.getBrandId()!=null){ 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 42fa06a..90f8d8f 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 @@ -554,15 +554,25 @@ } List<GoodsInfoTitleValueVO> goodsInfoTitleValueVOList = goodsInfoTitleValueService.listByGoodsId(homeGoodsSkuDTO.getGoodsSkuId()); - Collections.sort(goodsInfoTitleValueVOList, Comparator.comparingInt(GoodsInfoTitleValueVO::getSortNum)); - for (GoodsInfoTitleValueVO goodsInfoTitleValueVO:goodsInfoTitleValueVOList){ + List<getHomeGoodsSkuXxiVO> homeGoodsSkuXxiVOS1=new ArrayList<>(); + for (int i=0;i<goodsInfoTitleValueVOList.size();i++){ getHomeGoodsSkuXxiVO getHomeGoodsSkuXxiVOs=new getHomeGoodsSkuXxiVO(); - getHomeGoodsSkuXxiVOs.setContent(goodsInfoTitleValueVO.getContent()); - getHomeGoodsSkuXxiVOs.setTitleName(goodsInfoTitleValueVO.getTitleName()); - homeGoodsSkuXxiVOS.add(getHomeGoodsSkuXxiVOs); + getHomeGoodsSkuXxiVOs.setContent(goodsInfoTitleValueVOList.get(i).getContent()); + getHomeGoodsSkuXxiVOs.setTitleName(goodsInfoTitleValueVOList.get(i).getTitleName()); + if (goodsInfoTitleValueVOList.get(i).getSortNum()!=null){ + getHomeGoodsSkuXxiVOs.setNum(goodsInfoTitleValueVOList.get(i).getSortNum()); + }else{ + getHomeGoodsSkuXxiVOs.setNum(i+1); + } + + + homeGoodsSkuXxiVOS1.add(getHomeGoodsSkuXxiVOs); } + homeGoodsSkuXxiVOS1.sort((o1, o2) -> Integer.compare(o2.getNum(),o1.getNum())); + homeGoodsSkuXxiVOS.addAll(homeGoodsSkuXxiVOS1); + return homeGoodsSkuXxiVOS; } diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderReturnRequestServiceImpl.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderReturnRequestServiceImpl.java index 48f95b4..b764521 100644 --- a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderReturnRequestServiceImpl.java +++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderReturnRequestServiceImpl.java @@ -117,7 +117,7 @@ Order order = orderMapper.selectById(byId.getOrderId()); order.setOrderStatus(OrderStatusEnum.FINISHED); orderMapper.updateById(order); - this.updateById(byId); + this.removeById(byId); } @Override diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java index b47b927..498ea7d 100644 --- a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java +++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java @@ -676,6 +676,7 @@ @Override public PageDTO<MemberOrderListVO> MemberrderList(MemberOrderListDTO memberOrderListDTO) { + Page<Order> page = new Page<>(memberOrderListDTO.getPageCurr(), memberOrderListDTO.getPageSize()); LambdaQueryWrapper<Order> wrapper= Wrappers.lambdaQuery(); wrapper.eq(Order::getMemberId,memberOrderListDTO.getMemberId()); @@ -753,7 +754,8 @@ OrderReturnRequest orderReturnRequest = orderReturnRequestService.getOne( Wrappers.lambdaQuery(OrderReturnRequest.class) .eq(OrderReturnRequest::getOrderId, - orderVO.getId()).last("limit 1")); + orderVO.getId()).eq(OrderReturnRequest::getDelFlag, + 0).last("limit 1")); if (StringUtils.isNotNull(orderReturnRequest)&&orderReturnRequest!=null) { orderVO.setStatus(orderReturnRequest.getStatus()); orderVO.setRequestId(orderReturnRequest.getId()); @@ -989,6 +991,32 @@ @Override public MemberOrderNumVO MemberOrderNum(MemberOrderListDTO memberOrderListDTO) { + + + LambdaQueryWrapper<Order> wrapper1= Wrappers.lambdaQuery(); + wrapper1.eq(Order::getMemberId,memberOrderListDTO.getMemberId()); + wrapper1.eq(Order::getOrderStatus,1); + wrapper1.eq(Order::getIsOrder,1); + wrapper1.eq(Order::getDelFlag,0); + wrapper1.orderByDesc(Order::getCancelTime); + List<Order> page2 = this.list(wrapper1); + for (Order MemberOrderList:page2) { + if (MemberOrderList.getOrderStatus().getCode() == 1) { + if (MemberOrderList.getOrderFrom().getCode() == 1 || MemberOrderList.getOrderFrom().getCode() == 2 || MemberOrderList.getOrderFrom().getCode() == 3) { + LocalDateTime localDateTime = MemberOrderList.getOrderTime().plusMinutes(30); + if (LocalDateTime.now().isAfter(localDateTime)) { + // dateTime1 在 dateTime2 之后 + MemberOrderList.setOrderStatus(OrderStatusEnum.CANCELED); + Order order = this.getById(MemberOrderList.getId()); + order.setOrderStatus(OrderStatusEnum.CANCELED); + this.updateById(order); + } + + } + } + } + + MemberOrderNumVO vo=new MemberOrderNumVO(); LambdaQueryWrapper<Order> paylogEntityWrapper = Wrappers.lambdaQuery(); -- Gitblit v1.7.1