| | |
| | |
|
| | |
|
| | | @Override
|
| | | // @Cacheable(value = "dynamicCache", key = "'queryV2-'+#platform+'-'+#version+'-'+#start+'-'+#count+'-'+#cid+'-'+#subId")
|
| | | @Cacheable(value = "dynamicCache", key = "'queryV2-'+#platform+'-'+#version+'-'+#start+'-'+#count+'-'+#cid+'-'+#subId")
|
| | | public List<DynamicInfo> queryV2(int platform, int version, int start, int count, Long cid, Long subId) {
|
| | | List<DynamicInfo> listNew = new ArrayList<DynamicInfo>();
|
| | | List<DynamicInfo> list = dynamicInfoDao.query(start, count, cid, subId);
|
| | |
| | | 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() {
|