| | |
| | | import com.ruoyi.common.core.enums.OrderFromEnum; |
| | | import com.ruoyi.common.core.utils.DateUtils; |
| | | import com.ruoyi.system.api.constants.NotificationTypeConstant; |
| | | import com.ruoyi.system.api.domain.AuctionSalesroom; |
| | | import com.ruoyi.system.api.domain.CustomConfig; |
| | | import com.ruoyi.system.api.domain.GoodsBrand; |
| | | import com.ruoyi.system.api.domain.GoodsCategory; |
| | | import com.ruoyi.system.api.domain.GoodsFlavorType; |
| | | import com.ruoyi.system.api.domain.GoodsSeries; |
| | | import com.ruoyi.system.api.domain.GoodsSku; |
| | | import com.ruoyi.system.api.domain.Member; |
| | | import com.ruoyi.system.api.domain.MemberAddress; |
| | | import com.ruoyi.system.api.domain.Order; |
| | | import com.ruoyi.system.api.domain.*; |
| | | import com.ruoyi.system.api.domain.dto.AuctionSalesroomDTO; |
| | | import com.ruoyi.system.api.domain.dto.AuctionSalesroomGoodsInfoDTO; |
| | | import com.ruoyi.system.api.domain.dto.GoodsStockUpdDTO; |
| | | import com.ruoyi.system.api.domain.dto.OrderAuctionBondDTO; |
| | | import com.ruoyi.system.api.domain.dto.OrderDTO; |
| | | import com.ruoyi.system.api.domain.vo.AuctionBidRecordVO; |
| | | import com.ruoyi.system.api.domain.vo.AuctionSalesroomGoodsInfoVO; |
| | | import com.ruoyi.system.api.domain.vo.AuctionSalesroomVO; |
| | | import com.ruoyi.system.api.domain.vo.ForepartAuctionSalesroomGoodsVO; |
| | | import com.ruoyi.system.api.domain.vo.*; |
| | | import com.ruoyi.system.api.feignClient.GoodsSkuClient; |
| | | import com.ruoyi.system.api.feignClient.MemberClient; |
| | | import com.ruoyi.system.api.feignClient.OrderClient; |
| | | import com.ruoyi.system.api.feignClient.SysUserClient; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | import javax.annotation.Resource; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | auctionSalesroomGoods.getGoodsSkuId(), SecurityConstants.INNER); |
| | | GoodsSku goodsSku=goodsSkuOne.getData(); |
| | | currentAuctionSalesroomGoods.setGoodsSkuName(goodsSku.getSkuName()); |
| | | currentAuctionSalesroomGoods.setGoodsSkuId(auctionSalesroomGoods.getGoodsSkuId()); |
| | | currentAuctionSalesroomGoods.setGoodsSkuId(auctionSalesroomGoods.getId()); |
| | | currentAuctionSalesroomGoods.setCoverPic(goodsSku.getCoverPic()); |
| | | currentAuctionSalesroomGoods.setStartTime(auctionSalesroomGoods.getStartTime()); |
| | | currentAuctionSalesroomGoods.setGoodsSkustatus(auctionSalesroomGoods.getStatus()); |
| | |
| | | LambdaQueryWrapper<AuctionSalesroomGoods> wrapper1=Wrappers.lambdaQuery(); |
| | | wrapper1.eq(AuctionSalesroomGoods::getDelFlag,0); |
| | | wrapper1.eq(AuctionSalesroomGoods::getStatus,0); |
| | | wrapper1.eq(AuctionSalesroomGoods::getAuctionSalesroomId,ationSalesroomGoodsDTO.getAuctionSalesroomId()); |
| | | if (auctionSalesroomGoods!=null) { |
| | | wrapper1.eq(AuctionSalesroomGoods::getSortNum, auctionSalesroomGoods.getSortNum() + 1); |
| | | list.add(auctionSalesroomGoods.getSortNum()+1); |
| | |
| | | auctionSalesroomGoodss.getGoodsSkuId(), SecurityConstants.INNER); |
| | | GoodsSku goodsSku=goodsSkuOne.getData(); |
| | | currentAuctionSalesroomGoods.setGoodsSkuName(goodsSku.getSkuName()); |
| | | currentAuctionSalesroomGoods.setGoodsSkuId(auctionSalesroomGoodss.getGoodsSkuId()); |
| | | currentAuctionSalesroomGoods.setGoodsSkuId(auctionSalesroomGoodss.getId()); |
| | | currentAuctionSalesroomGoods.setCoverPic(goodsSku.getCoverPic()); |
| | | currentAuctionSalesroomGoods.setStartTime(auctionSalesroomGoodss.getStartTime()); |
| | | currentAuctionSalesroomGoods.setGoodsSkustatus(auctionSalesroomGoodss.getStatus()); |
| | |
| | | nextAuctionSalesroomGoods.setNextGoodsSkuName(goodsSku1.getSkuName()); |
| | | nextAuctionSalesroomGoods.setCoverPic(goodsSku1.getCoverPic()); |
| | | nextAuctionSalesroomGoods.setGoodsSkustatus(auctionSalesroomGoods1.getStatus()); |
| | | nextAuctionSalesroomGoods.setGoodsSkuId(auctionSalesroomGoods1.getGoodsSkuId()); |
| | | nextAuctionSalesroomGoods.setGoodsSkuId(auctionSalesroomGoods1.getId()); |
| | | auctionSalesroomVO.setNextAuctionSalesroomGoods(nextAuctionSalesroomGoods); |
| | | } |
| | | LambdaQueryWrapper<AuctionSalesroomGoods> wrapper2=Wrappers.lambdaQuery(); |
| | |
| | | GoodsSku goodsSku2=goodsSkuOne2.getData(); |
| | | forepartAuctionSalesroomGoodsVO1.setGoodsSkuName(goodsSku2.getSkuName()); |
| | | forepartAuctionSalesroomGoodsVO1.setCoverPic(goodsSku2.getCoverPic()); |
| | | forepartAuctionSalesroomGoodsVO1.setGoodsSkuId(salesroomGoods.getGoodsSkuId()); |
| | | forepartAuctionSalesroomGoodsVO1.setGoodsSkuId(salesroomGoods.getId()); |
| | | forepartAuctionSalesroomGoodsVO1.setGoodsSkustatus(salesroomGoods.getStatus()); |
| | | auctionSalesroomGoodsVOS.add(forepartAuctionSalesroomGoodsVO1); |
| | | } |
| | |
| | | auctionSalesroomGoods.setStartTime(LocalDateTime.now()); |
| | | this.updateById(auctionSalesroomGoods); |
| | | } |
| | | |
| | | |
| | | Map<String, Object> map = new ConcurrentHashMap<>(); |
| | | map.put("notification_type", NotificationTypeConstant.AUCTION_SALESROOM); |
| | | map.put("auctionSalesroomId", auctionSalesroom.getId()); |
| | |
| | | LambdaQueryWrapper<AuctionSalesroomGoods> wrapper2=Wrappers.lambdaQuery(); |
| | | wrapper2.eq(AuctionSalesroomGoods::getAuctionSalesroomId,auctionSalesroomGoodsDTO.getAuctionSalesroomId()); |
| | | wrapper2.eq(AuctionSalesroomGoods::getDelFlag,0); |
| | | wrapper2.eq(AuctionSalesroomGoods::getGoodsSkuId,auctionSalesroomGoodsDTO.getGoodsSkuId()); |
| | | wrapper2.eq(AuctionSalesroomGoods::getId,auctionSalesroomGoodsDTO.getGoodsSkuId()); |
| | | AuctionSalesroomGoods auctionSalesroomGoods=this.getOne(wrapper2); |
| | | auctionSalesroomGoods.setStatus(AuctionGoodsStatusEnum.IN_PROGRESS); |
| | | auctionSalesroomGoods.setStartTime(LocalDateTime.now()); |
| | |
| | | Map<String, Object> map = new ConcurrentHashMap<>(); |
| | | map.put("notification_type", NotificationTypeConstant.AUCTION_SALESROOM_GOODS); |
| | | map.put("notification_time", DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss")); |
| | | map.put("goodsSkuId", auctionSalesroomGoods.getId()); |
| | | map.put("goodsSkuId", auctionSalesroomGoods.getId().toString()); |
| | | map.put("auctionSalesroomId", auctionSalesroomGoods.getAuctionSalesroomId().toString()); |
| | | map.put("message_type", "start"); |
| | | map.put("type",1); |
| | | map.put("type",2); |
| | | map.put("AuctionGoodsStatusEnum",auctionSalesroomGoods.getStatus()); |
| | | String msg = null; |
| | | try { |
| | |
| | | LambdaQueryWrapper<AuctionSalesroomGoods> wrapper2=Wrappers.lambdaQuery(); |
| | | wrapper2.eq(AuctionSalesroomGoods::getAuctionSalesroomId,auctionSalesroomGoodsDTO.getAuctionSalesroomId()); |
| | | wrapper2.eq(AuctionSalesroomGoods::getDelFlag,0); |
| | | wrapper2.eq(AuctionSalesroomGoods::getGoodsSkuId,auctionSalesroomGoodsDTO.getGoodsSkuId()); |
| | | wrapper2.eq(AuctionSalesroomGoods::getId,auctionSalesroomGoodsDTO.getGoodsSkuId()); |
| | | AuctionSalesroomGoods auctionSalesroomGoods=this.getOne(wrapper2); |
| | | AuctionSalesroom auctionSalesroom=iAuctionSalesroomService.getById(auctionSalesroomGoodsDTO.getAuctionSalesroomId()); |
| | | |
| | |
| | | if(auctionBidRecordList.size()>0){ |
| | | //判断 |
| | | if (auctionBidRecordList.size() >= auctionSalesroomGoods.getSalesroomStock()) { |
| | | for (int i = 0; i <= auctionSalesroomGoods.getSalesroomStock(); i++) { |
| | | for (int i = 0; i < auctionSalesroomGoods.getSalesroomStock(); i++) { |
| | | AuctionBidRecord auctionBidRecord = auctionBidRecordList.get(i); |
| | | auctionBidRecord.setStatus(BidStatusEnum.SUCCESSFUL); |
| | | AddOrder(auctionBidRecord.getTargetId(), auctionBidRecord.getMemberId(), |
| | |
| | | SecurityConstants.INNER); |
| | | |
| | | |
| | | for (int i = 0; i <= auctionBidRecordList.size(); i++) { |
| | | for (int i = 0; i < auctionBidRecordList.size(); i++) { |
| | | AuctionBidRecord auctionBidRecord = auctionBidRecordList.get(i); |
| | | auctionBidRecord.setStatus(BidStatusEnum.SUCCESSFUL); |
| | | AddOrder(auctionBidRecord.getTargetId(), auctionBidRecord.getMemberId(), |
| | |
| | | Map<String, Object> map = new ConcurrentHashMap<>(); |
| | | map.put("notification_type", NotificationTypeConstant.AUCTION_SALESROOM_GOODS); |
| | | map.put("notification_time", DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss")); |
| | | map.put("goodsSkuId", auctionSalesroomGoods.getId()); |
| | | map.put("goodsSkuId", auctionSalesroomGoods.getId().toString()); |
| | | map.put("auctionSalesroomId", auctionSalesroomGoods.getAuctionSalesroomId().toString()); |
| | | map.put("message_type", "end"); |
| | | map.put("type",2); |
| | | map.put("AuctionGoodsStatusEnum",auctionSalesroomGoods.getStatus()); |
| | |
| | | GoodsCategory data1 = goodsSkuClient.getCategoryOne(goodsSku.getCategoryId(), SecurityConstants.INNER).getData(); |
| | | GoodsSeries data2 = goodsSkuClient.getSeriesOne(goodsSku.getSeriesId(), SecurityConstants.INNER).getData(); |
| | | GoodsFlavorType data3 = goodsSkuClient.getFlavorTypeOne(goodsSku.getFlavorTypeId(), SecurityConstants.INNER).getData(); |
| | | AuctionSalesroomGoodsInfoVO.setBrand(data.getBrandName()); |
| | | if(data!=null){ |
| | | AuctionSalesroomGoodsInfoVO.setBrand(data.getBrandName()); |
| | | } |
| | | if(data1!=null){ |
| | | AuctionSalesroomGoodsInfoVO.setCategory(data1.getCategoryName()); |
| | | } |
| | | if(data2!=null){ |
| | | AuctionSalesroomGoodsInfoVO.setSeries(data2.getSeriesName()); |
| | | } |
| | | if(data3!=null){ |
| | | AuctionSalesroomGoodsInfoVO.setFlavorType(data3.getFlavorTypeName()); |
| | | } |
| | | AuctionSalesroomGoodsInfoVO.setCoverPic(goodsSku.getCoverPic()); |
| | | AuctionSalesroomGoodsInfoVO.setAlbum(goodsSku.getAlbum()); |
| | | AuctionSalesroomGoodsInfoVO.setSpec(goodsSku.getSpec()); |
| | |
| | | if (list2!=null){ |
| | | AuctionSalesroomGoodsInfoVO.setZgBid(list2.getLastBidAmount()); |
| | | } |
| | | |
| | | /* List<GoodsInfoTitleValueVO> goodsInfoTitleValueVOList = goodsInfoTitleValueService.listByGoodsId(homeGoodsSkuDTO.getGoodsSkuId()); |
| | | 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); |
| | | }*/ |
| | | |
| | | return AuctionSalesroomGoodsInfoVO; |
| | | } |
| | |
| | | Double aDouble= Double.valueOf(memberPointsMoney.getConfigValue()) * Double.valueOf(memberPointsPoints.getConfigValue()); |
| | | BigDecimal pi=lastBidAmount.multiply(new BigDecimal(aDouble)); |
| | | order.setPoints(pi.intValue()); |
| | | if (memberAddress!=null){ |
| | | order.setReceiverCity(memberAddress.getCity()); |
| | | order.setReceiverDetailAddress(memberAddress.getDetailedAddress()); |
| | | order.setReceiverphone(memberAddress.getRecipientPhone()); |
| | | order.setReceiverName(memberAddress.getRecipientName()); |
| | | } |
| | | |
| | | |
| | | order.setReceiverCity(memberAddress.getCity()); |
| | | order.setReceiverDetailAddress(memberAddress.getDetailedAddress()); |
| | | order.setReceiverphone(memberAddress.getRecipientPhone()); |
| | | order.setReceiverName(memberAddress.getRecipientName()); |
| | | order.setBound(bound); |
| | | order.setAuctionType(AuctionOrderTypeEnum.AUCTION_ITEMS); |
| | | GoodsSku goodsSku = goodsSkuClient.getGoodsSkuOne(auctionSalesroomGoods.getGoodsSkuId(), SecurityConstants.INNER) |