admin
2019-08-05 fc91fcf22224762d3d9c4bce358977bc6b0eec3a
fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/DynamicInfoServiceImpl.java
@@ -925,43 +925,62 @@
               continue;
            }
            
            // 店铺信息
            TaoBaoShop shop = dynamicNew.getShop();
            if (shop != null) {
               Integer userType = shop.getUserType();
               if (userType == null || userType == 0) {
                  shop.setUserType(10);
               } else {
                  shop.setUserType(11);
               TaoBaoShop shopNew = new TaoBaoShop();
               try {
                  PropertyUtils.copyProperties(shopNew, shop);
               } catch (Exception e) {
                  e.printStackTrace();
                  continue;
               }
               dynamicNew.setShop(shop);
               Integer userType = shopNew.getUserType();
               if (userType == null || userType == 0) {
                  shopNew.setUserType(10);
               } else {
                  shopNew.setUserType(11);
               }
               dynamicNew.setShop(shopNew);
            }
            
            List<GoodsPicture> imgsNew = new ArrayList<GoodsPicture>();
            List<GoodsPicture> imgs = dynamicNew.getImgs();
            if (imgs != null && imgs.size() > 0) {
               for (GoodsPicture goodsPicture: imgs) {
                  TaoBaoGoodsBriefExtra goods = goodsPicture.getGoods();
                  if (goods == null) {
                     imgsNew.add(goodsPicture);
                     continue;
                  }
                  GoodsDetailVO detailVO = GoodsDetailVOFactory.convertTaoBaoGoodsBriefExtra(goods, fanLiRate, shareRate);
                  goodsPicture.setGoodsVO(detailVO);
                  goodsPicture.setGoods(null);
                  
                  JumpDetailV2 jumpDetail = goodsPicture.getJumpDetail();
                  GoodsPicture goodsNew = new GoodsPicture();
                  try {
                     PropertyUtils.copyProperties(goodsNew, goodsPicture);
                  } catch (Exception e) {
                     e.printStackTrace();
                     continue;
                  }
                  GoodsDetailVO detailVO = GoodsDetailVOFactory.convertTaoBaoGoodsBriefExtra(goods, fanLiRate, shareRate);
                  goodsNew.setGoodsVO(detailVO);
                  goodsNew.setGoods(null);
                  JumpDetailV2 jumpDetail = goodsNew.getJumpDetail();
                  if (jumpDetail != null) {
                     JumpDetailV2 jumpDetailV2 = jumpDetailV2Service.getByTypeCache(jumpDetail.getType(), platform, version);
                     if (jumpDetailV2 != null) {
                        goodsPicture.setJumpDetail(jumpDetailV2);
                        goodsNew.setJumpDetail(jumpDetailV2);
                     }
                  }
                  imgsNew.add(goodsNew);
               }
               dynamicNew.setImgs(imgsNew);
            }
            dynamicNew.setImgs(imgs);
            listNew.add(dynamicNew);
         }
      }
      
      // 更新商品信息
      executor.execute(new Runnable() {
@@ -1014,6 +1033,7 @@
               }
            }
            boolean needUpdate = false;
            // 已下架ID
            List<Long> listDown = new ArrayList<Long>();
            // 商品列表
@@ -1081,7 +1101,17 @@
                     dynamicInfo.setDesc(shareMoneyDesc);
                  }
               }
               // 需要更新信息;
               needUpdate = true;
            }
            // 无效更新信息
            if (!needUpdate) {
               continue;
            }
            // 更新商品信息
            dynamicInfo.setImgs(listPicture);
            // 商品已下架