admin
2024-10-16 62a447d89331aee1feae7724c7616aa1bb2cfe79
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java
@@ -249,7 +249,7 @@
        // 拼多多
        if (goodsType == Constant.SOURCE_TYPE_PDD) {
            createPDDShare(acceptData, uid, Long.parseLong(goodsId), source, needGoods, out);
            createPDDShare(acceptData, uid, goodsId, source, needGoods, out);
            return;
        }
@@ -357,6 +357,10 @@
            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;
@@ -951,7 +955,7 @@
     * @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) {
        //查询当前用户是否授权
@@ -1469,8 +1473,8 @@
        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());
@@ -1630,7 +1634,7 @@
        }
        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;
        }
@@ -1774,7 +1778,7 @@
     * @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) {
@@ -2235,7 +2239,7 @@
                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);
            }