| | |
| | | userShareGoodsGroup.setCreateTime(null);
|
| | | userShareGoodsGroup.setUpdateTime(null);
|
| | | userShareGoodsGroup.setRecordId(null);
|
| | | dataObject.put("group", gson.toJson(userShareGoodsGroup));
|
| | | |
| | | dataObject.put("todayBrowse",userShareGoodsGroup.getTodayBrowse() );
|
| | | dataObject.put("totalBrowse",userShareGoodsGroup.getTotalBrowse() );
|
| | | dataObject.put("totalOrder", userShareGoodsGroup.getTotalOrder());
|
| | | dataObject.put("totalMoney", "¥"+userShareGoodsGroup.getTotalMoney());
|
| | | dataObject.put("goods", gson.toJson(TaoBaoUtil.getTaoBaoGoodsBriefExtra(goodsBrief, proportion, null)));
|
| | | array.add(dataObject);
|
| | | }
|
| | |
| | | goodsBrief = redisManager.getTaoBaoGoodsBrief(commonGoods.getGoodsId());
|
| | |
|
| | | goodsState = 0;
|
| | | if (goodsBrief.getCouponLeftCount() < 1 || StringUtil.isNullOrEmpty(goodsBrief.getCouponInfo())) {
|
| | | goodsBrief.setState(1); // 已抢光
|
| | | }
|
| | |
|
| | | CommonGoods upadeteCommonGoods = CommonGoodsFactory.create(goodsBrief);
|
| | | upadeteCommonGoods.setState(goodsState);
|
| | |
| | | if (goodsBrief == null) {
|
| | | goodsBrief = TaoBaoUtil.convert(commonGoods);
|
| | | }
|
| | |
|
| | | |
| | | if (goodsBrief.getCouponLeftCount() < 1 || StringUtil.isNullOrEmpty(goodsBrief.getCouponInfo())) {
|
| | | goodsBrief.setState(1); // 已抢光
|
| | | }
|
| | | |
| | | // 改变图片尺寸
|
| | | String pictUrl = goodsBrief.getPictUrl();
|
| | | if (!StringUtil.isNullOrEmpty(pictUrl) && !pictUrl.contains("320x320")) {
|
| | |
| | | throw new UserShareGoodsRecordException(1, "分享记录不存在");
|
| | | }
|
| | |
|
| | | shareRecord.setShareState(1);// 分享生效
|
| | | updateByPrimaryKeySelective(shareRecord);
|
| | | // 更新商品为已分享
|
| | | userGoodsStorageService.updateShareState(shareId);
|
| | | }
|
| | | }
|