From fc91fcf22224762d3d9c4bce358977bc6b0eec3a Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期一, 05 八月 2019 15:37:23 +0800 Subject: [PATCH] 订单隐藏位数修改 --- fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/DynamicInfoServiceImpl.java | 58 ++++++++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 44 insertions(+), 14 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/DynamicInfoServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/DynamicInfoServiceImpl.java index f1d2871..c876f43 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/DynamicInfoServiceImpl.java +++ b/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; // 宸蹭笅鏋禝D List<Long> listDown = new ArrayList<Long>(); // 鍟嗗搧鍒楄〃 @@ -1081,7 +1101,17 @@ dynamicInfo.setDesc(shareMoneyDesc); } } + + // 闇�瑕佹洿鏂颁俊鎭紱 + needUpdate = true; } + + // 鏃犳晥鏇存柊淇℃伅 + if (!needUpdate) { + continue; + } + + // 鏇存柊鍟嗗搧淇℃伅 dynamicInfo.setImgs(listPicture); // 鍟嗗搧宸蹭笅鏋� -- Gitblit v1.8.0