From 70ebe043e6b62756be9e257fe954c747d46568b9 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期五, 16 九月 2022 19:00:59 +0800
Subject: [PATCH] 商品ID字符串化

---
 fanli/src/main/java/com/yeshi/fanli/util/factory/CommonGoodsFactory.java |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/util/factory/CommonGoodsFactory.java b/fanli/src/main/java/com/yeshi/fanli/util/factory/CommonGoodsFactory.java
index 385baef..47c1305 100644
--- a/fanli/src/main/java/com/yeshi/fanli/util/factory/CommonGoodsFactory.java
+++ b/fanli/src/main/java/com/yeshi/fanli/util/factory/CommonGoodsFactory.java
@@ -15,6 +15,7 @@
 import com.yeshi.fanli.util.StringUtil;
 import com.yeshi.fanli.util.factory.goods.TaoBaoGoodsFactory;
 import com.yeshi.fanli.util.jd.JDUtil;
+import com.yeshi.fanli.util.taobao.TaoBaoUtil;
 import com.yeshi.goods.facade.dto.taobao.haodanku.HaoDanKuJDGoodsInfo;
 import com.yeshi.goods.facade.dto.taobao.haodanku.HaoDanKuPDDGoodsInfo;
 import com.yeshi.goods.facade.entity.taobao.TaoBaoGoodsBrief;
@@ -43,7 +44,10 @@
         cg.setCouponLeftCount(goods.getCouponLeftCount());
         cg.setCouponStartPrice(goods.getCouponStartFee());
         cg.setCouponTotalCount(goods.getCouponTotalCount());
-        cg.setGoodsId(goods.getAuctionId());
+        cg.setGoodsId(TaoBaoUtil.getAuctionId(goods.getAuctionId()));
+        if(TaoBaoUtil.isNewAuctionId(goods.getAuctionId())){
+            cg.setGoodsSign(goods.getAuctionId());
+        }
         cg.setGoodsType(CommonGoods.GOODS_TYPE_TB);
         cg.setPicture(goods.getPictUrl());
         cg.setPictureWhite(goods.getPictUrlWhite());
@@ -133,7 +137,7 @@
             cg.setSellerName(shopInfo.getShopName() == null ? "" : shopInfo.getShopName());
         }
 
-        cg.setGoodsId(goods.getSkuId());
+        cg.setGoodsId(goods.getSkuId()+"");
         cg.setTitle(goods.getSkuName());
         cg.setGoodsType(CommonGoods.GOODS_TYPE_JD);
         cg.setPicture(goods.getPicUrl());
@@ -202,7 +206,7 @@
         }
 
         cg.setCouponTotalCount(Integer.parseInt(goods.getCouponTotalQuantity() + ""));
-        cg.setGoodsId(goods.getGoodsId());
+        cg.setGoodsId(goods.getGoodsId()+"");
         cg.setGoodsType(CommonGoods.GOODS_TYPE_PDD);
         cg.setPicture(goods.getGoodsThumbnailUrl());
         cg.setPictureWhite(null);
@@ -260,7 +264,7 @@
         cg.setCouponAmount(new BigDecimal(0));
 
         cg.setCouponTotalCount(0);
-        cg.setGoodsId(Long.parseLong(goods.getGoodsId()));
+        cg.setGoodsId(Long.parseLong(goods.getGoodsId())+"");
         cg.setGoodsType(CommonGoods.GOODS_TYPE_VIP);
         cg.setPicture(goods.getGoodsThumbUrl());
         cg.setPictureWhite(null);
@@ -317,7 +321,7 @@
             cg.setCouponAmount(new BigDecimal(0));
         }
 
-        cg.setGoodsId(Long.parseLong(goods.getCommodityInfo().getCommodityCode()));
+        cg.setGoodsId(Long.parseLong(goods.getCommodityInfo().getCommodityCode())+"");
         cg.setGoodsType(CommonGoods.GOODS_TYPE_SUNING);
         if (goods.getCommodityInfo().getPictureUrl() != null && goods.getCommodityInfo().getPictureUrl().size() > 0)
             cg.setPicture(goods.getCommodityInfo().getPictureUrl().get(0).getPicUrl());
@@ -369,7 +373,7 @@
         cg.setRate(goods.getPromotion_rate());
         cg.setSellerName(goods.getShopname());
 
-        cg.setGoodsId(Long.parseLong(goods.getGoods_id()));
+        cg.setGoodsId(Long.parseLong(goods.getGoods_id())+"");
         cg.setTitle(goods.getGoodsname());
         cg.setGoodsType(CommonGoods.GOODS_TYPE_PDD);
         cg.setPicture(goods.getItempic());
@@ -398,7 +402,7 @@
         cg.setRate(goods.getCommissionshare());
         cg.setSellerName(goods.getShopname());
 
-        cg.setGoodsId(Long.parseLong(goods.getSkuid()));
+        cg.setGoodsId(goods.getSkuid());
         cg.setTitle(goods.getGoodsname());
         cg.setGoodsType(CommonGoods.GOODS_TYPE_JD);
         cg.setPicture(goods.getItempic());

--
Gitblit v1.8.0