| | |
| | | |
| | | // 拼多多 |
| | | if (goodsType == Constant.SOURCE_TYPE_PDD) { |
| | | createPDDShare(acceptData, uid, Long.parseLong(goodsId), source, needGoods, out); |
| | | createPDDShare(acceptData, uid, goodsId, source, needGoods, out); |
| | | return; |
| | | } |
| | | |
| | |
| | | createTaoLijin(uid, goodsId, totalNum, relationId, acceptData, request, out); |
| | | return; |
| | | } else {// 普通分享创建 |
| | | if("猜你喜欢".equalsIgnoreCase(source)){ |
| | | out.print(JsonUtil.loadFalseResult(4, "暂不支持分享")); |
| | | return; |
| | | } |
| | | createCommonTaoBaoShare(acceptData.getPlatform(), acceptData.getVersion(), goodsId, inviteCode, uid, |
| | | needGoods, relationId, acceptData, out); |
| | | return; |
| | |
| | | * @param source |
| | | * @param out |
| | | */ |
| | | public void createPDDShare(AcceptData acceptData, Long uid, Long goodsId, String source, boolean needGoods, |
| | | public void createPDDShare(AcceptData acceptData, Long uid, String goodsId, String source, boolean needGoods, |
| | | PrintWriter out) { |
| | | |
| | | //查询当前用户是否授权 |
| | |
| | | |
| | | |
| | | ShareInfoVO shareInfo = new ShareInfoVO(); |
| | | shareInfo.setClickUrl(convertResult.getQrCode()); |
| | | shareInfo.setWxErCode(convertResult.getQrCode()); |
| | | shareInfo.setClickUrl(convertResult.getZlink()); |
| | | shareInfo.setWxErCode(convertResult.getZlink()); |
| | | shareInfo.setCommentTexts(new ArrayList<>()); |
| | | shareInfo.setRule(configService.getValue(ConfigKeyEnum.shareRuleLinkDY.getKey(), system)); |
| | | shareInfo.setPictUrl(goods.getCover()); |
| | |
| | | } |
| | | |
| | | if (goodsType == Constant.SOURCE_TYPE_PDD) { |
| | | createPDDViewText(acceptData.getSystem(), goodsType, uid, template, Long.parseLong(goodsId), hasCoupon, out); |
| | | createPDDViewText(acceptData.getSystem(), goodsType, uid, template, goodsId, hasCoupon, out); |
| | | return; |
| | | } |
| | | |
| | |
| | | * @param hasCoupon |
| | | * @param out |
| | | */ |
| | | private void createPDDViewText(SystemEnum system, Integer goodsType, Long uid, String template, Long goodsId, Boolean hasCoupon, |
| | | private void createPDDViewText(SystemEnum system, Integer goodsType, Long uid, String template, String goodsId, Boolean hasCoupon, |
| | | PrintWriter out) { |
| | | PDDGoodsDetail goods = pinDuoDuoCacheUtil.getGoodsInfo(goodsId); |
| | | if (goods == null) { |
| | |
| | | goodsDetail = GoodsDetailVOFactory.convertJDGoods(goods, paramsDTO); |
| | | } |
| | | } else if (goodsType == Constant.SOURCE_TYPE_PDD) { |
| | | PDDGoodsDetail goods = pinDuoDuoCacheUtil.getGoodsInfo(Long.parseLong(goodsId)); |
| | | PDDGoodsDetail goods = pinDuoDuoCacheUtil.getGoodsInfo(goodsId); |
| | | if (goods != null) { |
| | | goodsDetail = GoodsDetailVOFactory.convertPDDGoods(goods, paramsDTO); |
| | | } |