admin
2019-05-15 3be3f6e670d2e11d7ced76b8202f0ef30b56870f
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserShareGoodsRecordServiceImpl.java
@@ -231,6 +231,35 @@
      singleGoodsShare(userShareGoodsRecord, goodsBrief);
   }
   @Override
   public Long saveSingleShareRecord(Long uid, Long auctionId) throws UserShareGoodsRecordException {
      if (auctionId == null) {
         throw new UserShareGoodsRecordException(1, "分享商品不能为空");
      }
      if (uid == null) {
         throw new UserShareGoodsRecordException(1, "用户ID不能为空");
      }
      TaoBaoGoodsBrief goodsBrief = null;
      try {
         goodsBrief = redisManager.getTaoBaoGoodsBrief(auctionId);
      } catch (TaobaoGoodsDownException e) {
         throw new UserShareGoodsRecordException(1, "商品已下架");
      }
      UserShareGoodsRecord userShareGoodsRecord = new UserShareGoodsRecord();
      userShareGoodsRecord.setUid(uid);
      userShareGoodsRecord.setSource(ShareSourceTypeEnum.goodsDetail);
      userShareGoodsRecord.setShareState(0);
      // 单个商品分享
      singleGoodsShare(userShareGoodsRecord, goodsBrief);
      return userShareGoodsRecord.getId();
   }
   @Override
   public void save(Long uid, ShareSourceTypeEnum source, String title, TaoBaoGoodsBrief taoBaoGoodsBrief)
         throws UserShareGoodsRecordException {