From f46ad930ab492d630377f8615c969259b25a04af Mon Sep 17 00:00:00 2001
From: rentaiming <806181662@qq.com>
Date: 星期日, 14 七月 2024 14:21:16 +0800
Subject: [PATCH] 用户端拍卖修改
---
ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionGoodsServiceImpl.java | 32 ++++++++++++++++++++++++--------
1 files changed, 24 insertions(+), 8 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 676db97..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();
@@ -472,7 +482,7 @@
}
auctionGoodsinfoVO.setCoverPic(goodsSkuOne.getCoverPic());
auctionGoodsinfoVO.setAlbum(goodsSkuOne.getAlbum());
- auctionGoodsinfoVO.setAuthentication(byId.getAuthentication());
+ auctionGoodsinfoVO.setAuthentication(byId.getAuthentication().getCode());
auctionGoodsinfoVO.setMinimumMarkupAmount(byId.getMinimumMarkupAmount());
auctionGoodsinfoVO.setSpec(goodsSkuOne.getSpec());
auctionGoodsinfoVO.setSpecUnit(goodsSkuOne.getSpecUnit());
@@ -481,8 +491,8 @@
auctionGoodsinfoVO.setDetail(goodsSkuOne.getDetail());
auctionGoodsinfoVO.setBond(byId.getBond());
auctionGoodsinfoVO.setYears(goodsSkuOne.getYears());
- auctionGoodsinfoVO.setSharePic(goodsSkuOne.getSharePic());
- auctionGoodsinfoVO.setShareTitle(goodsSkuOne.getShareTitle());
+ auctionGoodsinfoVO.setSharePic(byId.getSharePic());
+ auctionGoodsinfoVO.setShareTitle(byId.getShareTitle());
LambdaQueryWrapper<AuctionBidRecord> wrapper1= Wrappers.lambdaQuery();
wrapper1.eq(AuctionBidRecord::getAuctionType,1);
wrapper1.eq(AuctionBidRecord::getTargetId,byId.getId());
@@ -549,6 +559,7 @@
LambdaQueryWrapper<AuctionBidRecord> wrapper5= Wrappers.lambdaQuery();
wrapper5.eq(AuctionBidRecord::getAuctionType,1);
wrapper5.eq(AuctionBidRecord::getTargetId,byId.getId());
+ wrapper5.eq(AuctionBidRecord::getMemberId,auctionGoodsListDTO.getMemberId());
wrapper5.eq(AuctionBidRecord::getDelFlag,0);
AuctionBidRecord list5 = auctionBidRecordService.getOne(wrapper5);
if (list5!=null){
@@ -556,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<>();
@@ -581,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<>();
@@ -595,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