yujian
2019-03-27 2bcdc1bacd38ec716a6e94dd9d863b5809bb7212
店铺地址 手动处理
1个文件已修改
21 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/util/RedisManager.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/RedisManager.java
@@ -296,19 +296,38 @@
        String value = "";
        if (Constant.IS_OUTNET)
            value = getCommonString(key);
        if (StringUtil.isNullOrEmpty(value)) {
            TaoBaoGoodsBrief goods = new TaoBaoGoodsBrief();
            goods.setShopTitle(shopTitle);
            goods.setSellerId(sellerId);
            goods.setAuctionId(auctionId);
            TaoBaoShopInfo info = taoBaoShopService.getTaoBaoShopInfo(goods);
            if(info != null) {
                String shopUrl = info.getShopUrl();
                if(shopUrl != null && shopUrl.contains("tmall://page.tm/shop")) {
                    shopUrl = "http://store.taobao.com/shop/view_shop.htm?user_number_id=" + sellerId;
                    info.setShopUrl(shopUrl);
                }
            }
            if (Constant.IS_OUTNET && info != null) {
                value = new Gson().toJson(info);
                cacheCommonString(key, value, 60 * 60 * 2);
            }
            return info;
        } else {
            return new Gson().fromJson(value, TaoBaoShopInfo.class);
            TaoBaoShopInfo info = new Gson().fromJson(value, TaoBaoShopInfo.class);
            String shopUrl = info.getShopUrl();
            if(shopUrl != null && shopUrl.contains("tmall://page.tm/shop")) {
                shopUrl = "http://store.taobao.com/shop/view_shop.htm?user_number_id=" + sellerId;
                info.setShopUrl(shopUrl);
            }
            return info;
        }
    }