From b29becf95484be48aa09e87fcc7cc19f94cf9c81 Mon Sep 17 00:00:00 2001 From: rentaiming <806181062@qq.com> Date: 星期三, 10 七月 2024 18:16:23 +0800 Subject: [PATCH] 修改bug --- ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionGoodsServiceImpl.java | 25 ++++++++++++++++++++----- 1 files changed, 20 insertions(+), 5 deletions(-) diff --git a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionGoodsServiceImpl.java b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionGoodsServiceImpl.java index 42d9475..cdcd3ee 100644 --- a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionGoodsServiceImpl.java +++ b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionGoodsServiceImpl.java @@ -302,6 +302,10 @@ if (StringUtils.isNull(auctionGoods)) { throw new ServiceException("拍卖商品不存在"); } + // 远程调用商品服务,获取商品信息 + GoodsSku goodsSku = goodsSkuClient.getGoodsSkuOne(auctionGoods.getGoodsSkuId(), + SecurityConstants.INNER) + .getData(); if (auctionGoods.getStartStatus().equals(AuctionStartStatusEnum.IN_AUCTION)) { // 查询出价记录 List<AuctionBidRecord> auctionBidRecords = auctionBidRecordService.getBidRecordByGoodsId( @@ -325,7 +329,7 @@ OrderDTO orderDTO = new OrderDTO(); orderDTO.setAuctionType(AuctionOrderTypeEnum.REGULAR_ITEMS); orderDTO.setGoodsQuantity(auctionGoods.getAuctionStock()); - orderDTO.setGoodsSkuId(auctionGoods.getGoodsSkuId()); + orderDTO.setGoodsSkuId(auctionGoods.getId()); orderDTO.setBound(auctionGoods.getBond()); orderDTO.setMemberId(auctionBidRecord.getMemberId()); orderDTO.setTotalAmount(auctionBidRecord.getLastBidAmount()); @@ -340,6 +344,11 @@ orderDTO.setReceiverCity(data.getReceiverCity()); orderDTO.setReceiverDetailAddress(data.getDetailedAddress()); orderDTO.setReceiverphone(data.getRecipientPhone()); + } + if (StringUtils.isNotNull(goodsSku)) { + orderDTO.setCoverPic(goodsSku.getCoverPic()); + orderDTO.setPrice(goodsSku.getPrice()); + orderDTO.setSkuName(goodsSku.getSkuName()); } orderClient.saveOrderOne(orderDTO, SecurityConstants.INNER); } else { @@ -453,6 +462,7 @@ auctionGoodsinfoVO.setUnit(goodsSkuOne.getUnit()); auctionGoodsinfoVO.setBond(byId.getBond()); auctionGoodsinfoVO.setDescription(goodsSkuOne.getDescription()); + auctionGoodsinfoVO.setExplain(byId.getDescription()); auctionGoodsinfoVO.setYears(goodsSkuOne.getYears()); GoodsBrand data = goodsSkuClient.getBrandOne(goodsSkuOne.getBrandId(), SecurityConstants.INNER).getData(); GoodsCategory data1 = goodsSkuClient.getCategoryOne(goodsSkuOne.getCategoryId(), SecurityConstants.INNER).getData(); @@ -557,8 +567,8 @@ } - CustomConfig returnAddressUserName = sysUserClient.getconfig("MALL_ORDER_DESCRIPTION").getData(); - auctionGoodsinfoVO.setExplain(returnAddressUserName.getConfigValue()); + /*CustomConfig returnAddressUserName = sysUserClient.getconfig("MALL_ORDER_DESCRIPTION").getData(); + auctionGoodsinfoVO.setExplain(returnAddressUserName.getConfigValue());*/ List<getHomeGoodsSkuXxiVO> homeGoodsSkuXxiVOS=new ArrayList<>(); @@ -582,7 +592,7 @@ List<OrderAuctionBond> data = orderClient.getAuctionGoodsOrderAuctionBondList(auctionGoodsListDTO, SecurityConstants.INNER).getData(); Set<Long> goodsSkuIdList = null; if (data.size()>0){ - goodsSkuIdList = data.stream().map(OrderAuctionBond::getAuctionSalesroomId) + goodsSkuIdList = data.stream().map(OrderAuctionBond::getAuctionGoodsId) .collect(Collectors.toSet()); }else { Set<Long> goodsSkuIdList1 =new HashSet<>(); @@ -596,7 +606,12 @@ } if (auctionGoodsListDTO.getStartStatus()!=4){ - auctionGoodsListPageDTO.setStartStatus(auctionGoodsListDTO.getStartStatus()); + if (auctionGoodsListDTO.getStartStatus()==0){ + auctionGoodsListPageDTO.setStartStatus(5); + }else{ + auctionGoodsListPageDTO.setStartStatus(auctionGoodsListDTO.getStartStatus()); + } + } Page<AuctionGoodsListVO> page = new Page<>(); -- Gitblit v1.7.1