admin
2025-02-25 30d8e227e8d823b6c38c3b9c90ac2df03b63befe
fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/GoodsController.java
@@ -268,7 +268,7 @@
     * @param out
     */
    @RequestMapping(value = "getGoodsDetial")
    public void getGoodsDetial(WXMPAcceptData acceptData, Long goodsId, Integer goodsType, String from, Long uid,
    public void getGoodsDetial(WXMPAcceptData acceptData, String goodsId, Integer goodsType, String from, Long uid,
                               PrintWriter out) {
        if (goodsType == null || goodsType < 2 || goodsType > 3) {
            out.print(JsonUtil.loadFalseResult(1, "请传递正确平台参数"));
@@ -283,7 +283,7 @@
        /*-------- 拼多多商品  -------*/
        if (goodsType.intValue() == Constant.SOURCE_TYPE_PDD) {
            getDetialPDD(acceptData, goodsId, uid, from, out);
            getDetialPDD(acceptData, Long.parseLong(goodsId), uid, from, out);
            return;
        }
    }
@@ -297,10 +297,10 @@
     * @param from
     * @param out
     */
    private void getDetialJD(WXMPAcceptData acceptData, Long id, Long uid, String from, PrintWriter out) {
    private void getDetialJD(WXMPAcceptData acceptData, String id, Long uid, String from, PrintWriter out) {
        JDGoods jdGoods = JDApiUtil.queryGoodsDetail(id); // 高级接口
        if (jdGoods == null) {
            jdGoods = JDUtil.getGoodsDetail(id); // 爬取网页
//            jdGoods = JDUtil.getGoodsDetail(id); // 爬取网页
            // jdGoods = JDApiUtil.getGoodsDetail(id); // 普通接口
        }
@@ -764,7 +764,7 @@
        String jumpLink = null;
        if (goodsType.intValue() == Constant.SOURCE_TYPE_JD) { // 京东
            JDGoods goods = jdGoodsCacheUtil.getGoodsInfo(Long.parseLong(goodsId));
            JDGoods goods = jdGoodsCacheUtil.getGoodsInfo(goodsId);
            if (goods == null) {
                out.print(JsonUtil.loadFalseResult(2, "商品已下架"));
                return;
@@ -863,7 +863,7 @@
        }
        if (goodsType.intValue() == Constant.SOURCE_TYPE_JD) { // 京东
            createPosterJD(acceptData, Long.parseLong(goodsId), goodsType, from, type, user, inviteCode, out);
            createPosterJD(acceptData, goodsId, goodsType, from, type, user, inviteCode, out);
        } else if (goodsType.intValue() == Constant.SOURCE_TYPE_PDD) { // 拼多多
            createPosterPDD(acceptData, goodsId, goodsType, from, type, user, inviteCode, out);
        } else {
@@ -874,7 +874,7 @@
    /**
     * 创建京东分享海报
     */
    private void createPosterJD(WXMPAcceptData acceptData, Long goodsId, Integer goodsType, String from, Integer type,
    private void createPosterJD(WXMPAcceptData acceptData, String goodsId, Integer goodsType, String from, Integer type,
                                UserInfo user, String inviteCode, PrintWriter out) {
        JDGoods jdGoods = jdGoodsCacheUtil.getGoodsInfo(goodsId);
        if (jdGoods == null) {