| | |
| | | } |
| | | |
| | | @Override |
| | | public void saveSingleShareRecord(Long uid, Long goodsId, Integer goodsType) throws UserShareGoodsRecordException { |
| | | public void saveSingleShareRecord(Long uid, String goodsId, Integer goodsType) throws UserShareGoodsRecordException { |
| | | if (goodsId == null) { |
| | | throw new UserShareGoodsRecordException(1, "分享商品不能为空"); |
| | | } |
| | |
| | | |
| | | List<UserShareGoodsGroup> list = userShareGoodsGroupService.listByRecordId(recordId, true); |
| | | |
| | | List<Long> listGid = new ArrayList<Long>(); |
| | | List<String> listGid = new ArrayList<>(); |
| | | for (UserShareGoodsGroup goodsGroup : list) { |
| | | CommonGoods commonGoods = goodsGroup.getCommonGoods(); |
| | | if (commonGoods == null) { |
| | |
| | | |
| | | if (listTaoKeGoods != null && listTaoKeGoods.size() > 0) { |
| | | int state = 1; // 默认停售 |
| | | Long goodsId = commonGoods.getGoodsId(); |
| | | String goodsId = commonGoods.getGoodsId(); |
| | | for (TaoBaoGoodsBrief taoKeGoods : listTaoKeGoods) { |
| | | Long auctionId = taoKeGoods.getAuctionId(); |
| | | if (goodsId == auctionId || goodsId.equals(auctionId)) { |
| | | String auctionId = taoKeGoods.getAuctionId(); |
| | | if (TaoBaoUtil.isEqual(goodsId ,auctionId)) { |
| | | state = 0; // 在售 |
| | | break; |
| | | } |
| | |
| | | |
| | | if (list != null && list.size() > 0) { |
| | | |
| | | List<Long> listGid = new ArrayList<Long>(); |
| | | List<String> listGid = new ArrayList<>(); |
| | | for (UserShareGoodsGroup goodsGroup : list) { |
| | | CommonGoods commonGoods = goodsGroup.getCommonGoods(); |
| | | if (commonGoods == null) { |
| | |
| | | |
| | | if (listTaoKeGoods != null && listTaoKeGoods.size() > 0) { |
| | | int state = 1; // 默认停售 |
| | | Long goodsId = commonGoods.getGoodsId(); |
| | | String goodsId = commonGoods.getGoodsId(); |
| | | for (TaoBaoGoodsBrief taoKeGoods : listTaoKeGoods) { |
| | | Long auctionId = taoKeGoods.getAuctionId(); |
| | | if (goodsId == auctionId || goodsId.equals(auctionId)) { |
| | | String auctionId = taoKeGoods.getAuctionId(); |
| | | if (TaoBaoUtil.isEqual( goodsId , auctionId)) { |
| | | state = 0; // 在售 |
| | | break; |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public ShareGoodsRecordDTO addRecordGoodsDetail(Long uid, Long auctionId, Integer goodsType, boolean isTaolijin) |
| | | public ShareGoodsRecordDTO addRecordGoodsDetail(Long uid, String auctionId, Integer goodsType, boolean isTaolijin) |
| | | throws UserShareGoodsRecordException { |
| | | if (auctionId == null || uid == null || uid <= 0) { |
| | | throw new UserShareGoodsRecordException(1, "传递参数不正确"); |