| | |
| | | import com.ruoyi.system.api.domain.dto.RefundDTO; |
| | | import com.ruoyi.system.api.domain.vo.AuctionGoodsListVO; |
| | | import com.ruoyi.system.api.domain.vo.AuctionGoodsinfoVO; |
| | | import com.ruoyi.system.api.domain.vo.GoodsInfoTitleValueVO; |
| | | import com.ruoyi.system.api.domain.vo.getHomeGoodsSkuXxiVO; |
| | | import com.ruoyi.system.api.feignClient.AuctionClient; |
| | | import com.ruoyi.system.api.feignClient.GoodsSkuClient; |
| | | import com.ruoyi.system.api.feignClient.MemberClient; |
| | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.Comparator; |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | if (goodsSku.getStock() + auctionGoodsOrg.getAuctionStock() < dto.getAuctionStock()) { |
| | | throw new ServiceException("商品库存不足"); |
| | | } |
| | | if (!auctionGoodsOrg.getAuctionStock().equals(dto.getAuctionStock())) { |
| | | // 更新商品库存 |
| | | GoodsStockUpdDTO goodsStockUpdDTO = new GoodsStockUpdDTO(); |
| | | goodsStockUpdDTO.setGoodsSkuId(goodsSkuId); |
| | | goodsStockUpdDTO.setAuctionStock( |
| | | auctionGoodsOrg.getAuctionStock() - dto.getAuctionStock()); |
| | | goodsSkuClient.updGoodsStock(Lists.newArrayList(goodsStockUpdDTO), |
| | | SecurityConstants.INNER); |
| | | } |
| | | auctionGoodsOrg.setStartingPrice(dto.getStartingPrice()); |
| | | auctionGoodsOrg.setMinimumMarkupAmount(dto.getMinimumMarkupAmount()); |
| | | auctionGoodsOrg.setStartTime(dto.getStartTime()); |
| | |
| | | auctionGoodsOrg.setShareTitle(dto.getShareTitle()); |
| | | auctionGoodsOrg.setSharePic(dto.getSharePic()); |
| | | this.updateById(auctionGoodsOrg); |
| | | // 更新商品库存 |
| | | GoodsStockUpdDTO goodsStockUpdDTO = new GoodsStockUpdDTO(); |
| | | goodsStockUpdDTO.setGoodsSkuId(goodsSkuId); |
| | | goodsStockUpdDTO.setAuctionStock( |
| | | auctionGoodsOrg.getAuctionStock() - dto.getAuctionStock()); |
| | | goodsSkuClient.updGoodsStock(Lists.newArrayList(goodsStockUpdDTO), |
| | | SecurityConstants.INNER); |
| | | auctionAsyncMethodService.auctionGoodsScheduleTask(Lists.newArrayList(auctionGoods)); |
| | | } |
| | | auctionAsyncMethodService.auctionGoodsScheduleTask(Lists.newArrayList(auctionGoods)); |
| | | } |
| | | |
| | | /** |
| | |
| | | GoodsCategory data1 = goodsSkuClient.getCategoryOne(goodsSkuOne.getCategoryId(), SecurityConstants.INNER).getData(); |
| | | GoodsSeries data2 = goodsSkuClient.getSeriesOne(goodsSkuOne.getSeriesId(), SecurityConstants.INNER).getData(); |
| | | GoodsFlavorType data3 = goodsSkuClient.getFlavorTypeOne(goodsSkuOne.getFlavorTypeId(), SecurityConstants.INNER).getData(); |
| | | auctionGoodsinfoVO.setBrand(data.getBrandName()); |
| | | auctionGoodsinfoVO.setCategory(data1.getCategoryName()); |
| | | if (data!=null){ |
| | | auctionGoodsinfoVO.setBrand(data.getBrandName()); |
| | | } |
| | | if (data1!=null){ |
| | | auctionGoodsinfoVO.setCategory(data1.getCategoryName()); |
| | | } |
| | | if (data2!=null){ |
| | | auctionGoodsinfoVO.setSeries(data2.getSeriesName()); |
| | | auctionGoodsinfoVO.setFlavorType(data3.getFlavorTypeName()); |
| | | } |
| | | if (data3!=null) { |
| | | auctionGoodsinfoVO.setFlavorType(data3.getFlavorTypeName()); |
| | | } |
| | | auctionGoodsinfoVO.setCoverPic(goodsSkuOne.getCoverPic()); |
| | | auctionGoodsinfoVO.setAlbum(goodsSkuOne.getAlbum()); |
| | | auctionGoodsinfoVO.setAuthentication(byId.getAuthentication()); |
| | |
| | | LambdaQueryWrapper<AuctionBrowseRecord> wrapper3=Wrappers.lambdaQuery(); |
| | | wrapper3.eq(AuctionBrowseRecord::getDelFlag,0); |
| | | wrapper3.eq(AuctionBrowseRecord::getTargetId,auctionGoodsListDTO.getGoodsSkuId()); |
| | | wrapper3.eq(AuctionBrowseRecord::getBrowseType,AuctionOrderTypeEnum.REGULAR_ITEMS); |
| | | wrapper3.eq(AuctionBrowseRecord::getMemberId,auctionGoodsListDTO.getMemberId()); |
| | | wrapper3.ge(AuctionBrowseRecord::getCreateTime, newTime7) |
| | | .le(AuctionBrowseRecord::getCreateTime, now); |
| | |
| | | |
| | | CustomConfig returnAddressUserName = sysUserClient.getconfig("MALL_ORDER_DESCRIPTION").getData(); |
| | | auctionGoodsinfoVO.setExplain(returnAddressUserName.getConfigValue()); |
| | | |
| | | |
| | | List<getHomeGoodsSkuXxiVO> homeGoodsSkuXxiVOS=new ArrayList<>(); |
| | | List<GoodsInfoTitleValueVO> goodsInfoTitleValueVOList = goodsSkuClient.getlistByGoodsId(goodsSkuOne.getId(), SecurityConstants.INNER).getData(); |
| | | Collections.sort(goodsInfoTitleValueVOList, Comparator.comparingInt(GoodsInfoTitleValueVO::getSortNum)); |
| | | for (GoodsInfoTitleValueVO goodsInfoTitleValueVO:goodsInfoTitleValueVOList){ |
| | | getHomeGoodsSkuXxiVO getHomeGoodsSkuXxiVOs=new getHomeGoodsSkuXxiVO(); |
| | | getHomeGoodsSkuXxiVOs.setContent(goodsInfoTitleValueVO.getContent()); |
| | | getHomeGoodsSkuXxiVOs.setTitleName(goodsInfoTitleValueVO.getTitleName()); |
| | | homeGoodsSkuXxiVOS.add(getHomeGoodsSkuXxiVOs); |
| | | } |
| | | auctionGoodsinfoVO.setXxiVOS(homeGoodsSkuXxiVOS); |
| | | |
| | | return auctionGoodsinfoVO; |
| | | } |
| | | |
| | |
| | | memberAuctionSalesroomDTO.setMemberId(auctionGoodsListDTO.getMemberId()); |
| | | List<OrderAuctionBond> data = orderClient.getAuctionGoodsOrderAuctionBondList(auctionGoodsListDTO, SecurityConstants.INNER).getData(); |
| | | Set<Long> goodsSkuIdList = null; |
| | | if (data!=null){ |
| | | if (data.size()>0){ |
| | | goodsSkuIdList = data.stream().map(OrderAuctionBond::getAuctionSalesroomId) |
| | | .collect(Collectors.toSet()); |
| | | }else { |
| | |
| | | .equals(AuctionStartStatusEnum.IN_AUCTION)) { |
| | | auctionGoods.setStartStatus(AuctionStartStatusEnum.ENDED); |
| | | this.updateById(auctionGoods); |
| | | // TODO 退保证金 |
| | | orderClient.returnBondByAuctionGoodsId(id, SecurityConstants.INNER); |
| | | |
| | | Map<String, Object> map = new ConcurrentHashMap<>(); |