admin
2021-01-27 e1a62ec62e7331d97af9302e90e1ce44af8235eb
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java
@@ -11,6 +11,7 @@
import com.yeshi.fanli.entity.SystemEnum;
import com.yeshi.fanli.entity.SystemFunction;
import com.yeshi.fanli.service.inter.pdd.PDDAuthService;
import com.yeshi.fanli.service.inter.user.tb.UserExtraTaoBaoInfoService;
import com.yeshi.fanli.util.*;
import org.json.simple.JSONArray;
@@ -209,6 +210,10 @@
    @Resource
    private UserExtraTaoBaoInfoService userExtraTaoBaoInfoService;
    @Resource
    private PDDAuthService pddAuthService;
    private ConfigParamsDTO getParamsDTO(String platform, String version, Long uid, SystemEnum system) {
        UserLevelEnum level = UserLevelEnum.daRen;
@@ -923,7 +928,7 @@
            return;
        }
        PDDGoodsDetail pddGoods = PinDuoDuoApiUtil.getGoodsDetail(id,PinDuoDuoApiUtil.PID_FANLI,uid+"");
        PDDGoodsDetail pddGoods = PinDuoDuoApiUtil.getGoodsDetail(id, PinDuoDuoApiUtil.PID_FANLI, pddAuthService.getFanliCustomParams(uid));
        if (pddGoods == null) {
            out.print(JsonUtil.loadFalseResult(2, "商品不存在"));
            return;
@@ -1066,6 +1071,14 @@
        if (VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(), acceptData.getVersion())) {
            getCloudInfo(acceptData, uid, goodsDetail, extraVO); // 云发单文案信息
        }
        if (extraVO.getListCouponUser() == null) {
            extraVO.setListCouponUser(new ArrayList<>());
        }
        if (extraVO.getListShareUser() == null) {
            extraVO.setListShareUser(new ArrayList<>());
        }
        // 免单商品
@@ -1214,6 +1227,14 @@
        shareInfoVO.setHelpLink(helpLink);
        extraVO.setShare(shareInfoVO);
        if (extraVO.getListShareUser() == null) {
            extraVO.setListShareUser(new ArrayList<>());
        }
        if (extraVO.getListCouponUser() == null) {
            extraVO.setListCouponUser(new ArrayList<>());
        }
        // 云发单文案信息
        getCloudInfo(acceptData, uid, goodsDetail, extraVO);
@@ -1347,6 +1368,14 @@
        ShareVO shareInfoVO = new ShareVO();
        shareInfoVO.setHelpLink(helpLink);
        extraVO.setShare(shareInfoVO);
        if (extraVO.getListShareUser() == null) {
            extraVO.setListShareUser(new ArrayList<>());
        }
        if (extraVO.getListCouponUser() == null) {
            extraVO.setListCouponUser(new ArrayList<>());
        }
        // 云发单文案信息
        getCloudInfo(acceptData, uid, goodsDetail, extraVO);
@@ -1782,8 +1811,9 @@
        }
        //TODO 是否需要返回绑定链接
        boolean auth = PinDuoDuoApiUtil.isAuth(pid, uid + "");
        PDDPromotionUrl convertUrl = PinDuoDuoApiUtil.convert(id, pid + "", uid + "", !auth);
        String customParams = pddAuthService.getFanliCustomParams(uid);
        boolean auth = PinDuoDuoApiUtil.isAuth(pid, customParams);
        PDDPromotionUrl convertUrl = PinDuoDuoApiUtil.convert(id, pid + "", customParams, !auth);
        JSONObject data = new JSONObject();
        data.put("native", true);
        data.put("jumpLink", convertUrl.getUrl());