From cdcbed9af813b2a02cdc01eefa24db8bec6b51a9 Mon Sep 17 00:00:00 2001 From: yujian <yujian> Date: 星期三, 27 三月 2019 12:17:33 +0800 Subject: [PATCH] 主分类 + 子分类 DAO改造 --- fanli/src/main/java/com/yeshi/fanli/controller/client/RecommendController.java | 308 +++++++++++++++++++++----------------------------- 1 files changed, 131 insertions(+), 177 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/RecommendController.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/RecommendController.java index 91cb72c..9000ddd 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/client/RecommendController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/RecommendController.java @@ -16,6 +16,7 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; +import org.yeshi.utils.HttpUtil; import org.yeshi.utils.IPUtil; import org.yeshi.utils.JsonUtil; import org.yeshi.utils.NumberUtil; @@ -32,13 +33,11 @@ import com.yeshi.fanli.entity.bus.homemodule.Special; import com.yeshi.fanli.entity.bus.homemodule.SuperSpecial; import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture; -import com.yeshi.fanli.entity.bus.lable.QualityFactory; import com.yeshi.fanli.entity.bus.recommend.Honest; import com.yeshi.fanli.entity.bus.recommend.RecommendBanner; import com.yeshi.fanli.entity.bus.recommend.RecommendBannerV2; import com.yeshi.fanli.entity.bus.recommend.RecommendSpecial; import com.yeshi.fanli.entity.bus.su.recommend.SuperRecommendBanner; -import com.yeshi.fanli.entity.bus.su.recommend.SuperRecommendBannerV2; import com.yeshi.fanli.entity.bus.su.recommend.SuperRecommendSpecial; import com.yeshi.fanli.entity.bus.user.Order; import com.yeshi.fanli.entity.bus.user.ShamUser; @@ -79,7 +78,6 @@ import com.yeshi.fanli.service.inter.goods.ScanHistoryV2Service; import com.yeshi.fanli.service.inter.goods.SuperRecommendBannerService; import com.yeshi.fanli.service.inter.goods.SuperRecommendBannerV2Service; -import com.yeshi.fanli.service.inter.goods.SuperRecommendSectionService; import com.yeshi.fanli.service.inter.goods.SuperRecommendSpecialService; import com.yeshi.fanli.service.inter.goods.TaoBaoCouponService; import com.yeshi.fanli.service.inter.goods.TaoBaoGoodsBriefService; @@ -128,11 +126,7 @@ private SuperRecommendBannerService superRecommendBannerService; @Resource - private SuperRecommendSectionService superRecommendSectionService; - - @Resource private SuperRecommendSpecialService superRecommendSpecialService; - @Resource private OrderService orderService; @@ -227,10 +221,10 @@ @Resource private UserInfoExtraService userInfoExtraService; - @RequestMapping(value = "getHonestList") public void getHonestList(AcceptData acceptData, PrintWriter out) { - BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), acceptData.getPackages()); + BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), + acceptData.getPackages()); List<Honest> honestList = null; List<TaoBaoUnionConfig> configList = taoBaoUnionConfigService.getConfigByTypeCache(PidUser.TYPE_FANLI_ANDROID); if ((Integer.parseInt(acceptData.getVersion()) >= 20 && "android".equalsIgnoreCase(acceptData.getPlatform())) @@ -397,7 +391,8 @@ @RequestMapping(value = "getrecommendspecial") public void getRecommendSpecial(AcceptData acceptData, PrintWriter out) { - BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), acceptData.getPackages()); + BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), + acceptData.getPackages()); if (system == null) { out.print(JsonUtil.loadFalseResult(1, "绯荤粺涓嶅瓨鍦�")); @@ -408,25 +403,28 @@ if (!"1".equals(version) && "android".equalsIgnoreCase(acceptData.getPlatform())) { jumpDetail = jumpDetailService.getlastJumpDetailCache(); } + List<RecommendSpecial> recommendSpecialList = null; + List<SuperRecommendSpecial> superRecommendSpecialList = superRecommendSpecialService .getSuperRecommendSpecialBySystemId(system.getId()); + if (superRecommendSpecialList != null && superRecommendSpecialList.size() > 0) { - List<RecommendSpecial> recommendSpecialList = null; - for (SuperRecommendSpecial superRecommendSpecial : superRecommendSpecialList) { - if (recommendSpecialList == null) { - recommendSpecialList = new ArrayList<RecommendSpecial>(); + recommendSpecialList = new ArrayList<RecommendSpecial>(); + + for (SuperRecommendSpecial superRecommendSpecial : superRecommendSpecialList) { + RecommendSpecial recommendSpecial = superRecommendSpecial.getRecommendSpecial(); + if (jumpDetail != null) { + recommendSpecial.setJumpDetail(jumpDetail); + } + recommendSpecialList.add(recommendSpecial); } - RecommendSpecial recommendSpecial = superRecommendSpecial.getRecommendSpecial(); - if (jumpDetail != null) { - recommendSpecial.setJumpDetail(jumpDetail); - } - recommendSpecialList.add(recommendSpecial); } if (recommendSpecialList == null || recommendSpecialList.size() == 0) { out.print(JsonUtil.loadFalseResult(1, "鏆傛棤鏁版嵁")); return; } + JSONObject data = new JSONObject(); data.put("count", recommendSpecialList.size()); Gson gson = new Gson(); @@ -439,7 +437,8 @@ @RequestMapping(value = "guessLike", method = RequestMethod.POST) public void guessLike(AcceptData acceptData, PrintWriter out) { - BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), acceptData.getPackages()); + BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), + acceptData.getPackages()); if (system == null) { out.print(JsonUtil.loadFalseResult(1, "绯荤粺涓嶅瓨鍦�")); @@ -477,7 +476,8 @@ @RequestMapping(value = "getrecommendbanner") public void getRecommendBanner(AcceptData acceptData, PrintWriter out) { - BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), acceptData.getPackages()); + BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), + acceptData.getPackages()); JSONObject json = new JSONObject(); if (system == null) { out.print(JsonUtil.loadFalseResult(1, "绯荤粺涓嶅瓨鍦�")); @@ -544,7 +544,8 @@ out.print(JsonUtil.loadFalseResult(1, "璇蜂笂浼爄d")); return; } - BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), acceptData.getPackages()); + BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), + acceptData.getPackages()); if (system == null) { out.print(JsonUtil.loadFalseResult(1, "绯荤粺涓嶅瓨鍦�")); @@ -697,7 +698,8 @@ out.print(JsonUtil.loadFalseResult(1, "璇蜂笂浼爄d")); return; } - BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), acceptData.getPackages()); + BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), + acceptData.getPackages()); if (system == null) { out.print(JsonUtil.loadFalseResult(1, "绯荤粺涓嶅瓨鍦�")); @@ -716,38 +718,11 @@ // 鑾峰彇娣樺鍙傛暟 ClientTBPid clientTBPid = null; // 鐢ㄦ埛宸茬粡鐧诲綍 - if (!StringUtil.isNullOrEmpty(uid)) { - TBPid tbPid = null; - if (acceptData.getPlatform().equalsIgnoreCase("android")) { - tbPid = tbPidService.getTBPid(Long.parseLong(uid), PidUser.TYPE_FANLI_ANDROID); - if (tbPid != null) { - String siteId = tbPid.getPid().split("_")[2]; - String adzoneId = tbPid.getPid().split("_")[3]; - TaoBaoUnionConfig config = taoBaoUnionConfigService.getConfigByAppIdCache(siteId); - clientTBPid = new ClientTBPid(config.getAppKey(), tbPid.getPid(), siteId, adzoneId); - } else { - clientTBPid = tbPidService.getAndroidDefault(); - } - } else { - tbPid = tbPidService.getTBPid(Long.parseLong(uid), PidUser.TYPE_FANLI_IOS); - if (tbPid != null) { - - String siteId = tbPid.getPid().split("_")[2]; - String adzoneId = tbPid.getPid().split("_")[3]; - TaoBaoUnionConfig config = taoBaoUnionConfigService.getConfigByAppIdCache(siteId); - clientTBPid = new ClientTBPid(config.getAppKey(), tbPid.getPid(), siteId, adzoneId); - } else { - clientTBPid = tbPidService.getIOSDefault(); - } - } - - } else { - if (acceptData.getPlatform().equalsIgnoreCase("android")) - clientTBPid = tbPidService.getAndroidDefault(); - else - clientTBPid = tbPidService.getIOSDefault(); - } + if (acceptData.getPlatform().equalsIgnoreCase("android")) + clientTBPid = tbPidService.getAndroidDefault(); + else + clientTBPid = tbPidService.getIOSDefault(); LogHelper.test("鑾峰彇PID鑰楁椂锛�" + (java.lang.System.currentTimeMillis() - startTime)); @@ -1000,25 +975,9 @@ if (!StringUtil.isNullOrEmpty(uid)) { TBPid tbPid = null; if (acceptData.getPlatform().equalsIgnoreCase("android")) { - tbPid = tbPidService.getTBPid(Long.parseLong(uid), PidUser.TYPE_FANLI_ANDROID); - if (tbPid != null) { - String siteId = tbPid.getPid().split("_")[2]; - String adzoneId = tbPid.getPid().split("_")[3]; - TaoBaoUnionConfig config = taoBaoUnionConfigService.getConfigByAppIdCache(siteId); - clientTBPid = new ClientTBPid(config.getAppKey(), tbPid.getPid(), siteId, adzoneId); - } else { - clientTBPid = tbPidService.getAndroidDefault(); - } + clientTBPid = tbPidService.getAndroidDefault(); } else { - tbPid = tbPidService.getTBPid(Long.parseLong(uid), PidUser.TYPE_FANLI_IOS); - if (tbPid != null) { - String siteId = tbPid.getPid().split("_")[2]; - String adzoneId = tbPid.getPid().split("_")[3]; - TaoBaoUnionConfig config = taoBaoUnionConfigService.getConfigByAppIdCache(siteId); - clientTBPid = new ClientTBPid(config.getAppKey(), tbPid.getPid(), siteId, adzoneId); - } else { - clientTBPid = tbPidService.getIOSDefault(); - } + clientTBPid = tbPidService.getIOSDefault(); } } else { @@ -1064,7 +1023,8 @@ // 鏍规嵁鍟嗗搧鑾峰彇鎺ㄨ崘 @RequestMapping(value = "getgoodsrecommend", method = RequestMethod.POST) public void getGoodsRecommend(final AcceptData acceptData, long id, PrintWriter out) { - BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), acceptData.getPackages()); + BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), + acceptData.getPackages()); if (system == null) { out.print(JsonUtil.loadFalseResult(1, "绯荤粺涓嶅瓨鍦�")); return; @@ -1190,7 +1150,8 @@ return; } page = page + 1; - BusinessSystem sys = businessSystemService.getBusinessSystem(acceptData.getPlatform(), acceptData.getPackages()); + BusinessSystem sys = businessSystemService.getBusinessSystem(acceptData.getPlatform(), + acceptData.getPackages()); if (sys == null) { out.print(JsonUtil.loadFalseResult(1, "涓嶅瓨鍦ㄨ绯荤粺")); return; @@ -1235,7 +1196,8 @@ @RequestMapping(value = "deletescanhistory", method = RequestMethod.POST) public void deleteScanHistory(AcceptData acceptData, String type, String uid, String ids, PrintWriter out) { - BusinessSystem sys = businessSystemService.getBusinessSystem(acceptData.getPlatform(), acceptData.getPackages()); + BusinessSystem sys = businessSystemService.getBusinessSystem(acceptData.getPlatform(), + acceptData.getPackages()); if (sys == null) { out.print(JsonUtil.loadFalseResult(1, "绯荤粺涓嶅瓨鍦�")); @@ -1347,7 +1309,7 @@ for (TaoBaoGoodsBrief goods : result.getTaoBaoGoodsBriefs()) { if (!StringUtil.isNullOrEmpty(goods.getCouponInfo()) && goods.getCouponAmount() != null && goods.getCouponAmount().compareTo(new BigDecimal("5")) >= 0 - && goods.getBiz30day() > 1000) + && goods.getBiz30day() > 1000 && !StringUtil.isNullOrEmpty(goods.getPictUrlWhite())) goodsList.add(goods); } try { @@ -1400,33 +1362,16 @@ @RequestMapping(value = "getRecommendInfo") public void getRecommendHomeInfo(AcceptData acceptData, PrintWriter out) { - BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), acceptData.getPackages()); + BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), + acceptData.getPackages()); if (system == null) { out.print(JsonUtil.loadFalseResult(1, "绯荤粺涓嶅瓨鍦�")); return; } // 棣栭〉Banner - List<RecommendBannerV2> listBanner = null; - - List<SuperRecommendBannerV2> listRecommendBanner = superRecommendBannerV2Service - .getSuperRecommendBannerV2sBySystem(system); - - if (listRecommendBanner != null && listRecommendBanner.size() > 0) { - - listBanner = new ArrayList<RecommendBannerV2>(); - - for (SuperRecommendBannerV2 superRecommendBanner : listRecommendBanner) { - RecommendBannerV2 recommendBanner = superRecommendBanner.getRecommendBanner(); - // 娣樼壒浠锋殏鏃朵慨鏀� - if (system.getId() == 7) { - recommendBanner.getJumpDetail().setActivity(recommendBanner.getJumpDetail().getActivity() - .replace("com.yeshi.ec.rebate.myapplication", "com.yeshi.ec.taospecial")); - } - - listBanner.add(recommendBanner); - } - } + List<RecommendBannerV2> listBanner = superRecommendBannerV2Service + .getSuperRecommendBannerV2sBySystem(system.getId()); JSONObject root = new JSONObject(); root.put("banner", listBanner); @@ -1507,7 +1452,8 @@ public void getNewRecommendInfo(AcceptData acceptData, Long uid, String specialCard, String swiperCard, PrintWriter out) { - BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), acceptData.getPackages()); + BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), + acceptData.getPackages()); if (system == null) { out.print(JsonUtil.loadFalseResult(1, "绯荤粺涓嶅瓨鍦�")); return; @@ -1645,7 +1591,8 @@ return; } - BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), acceptData.getPackages()); + BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), + acceptData.getPackages()); if (system == null) { out.print(JsonUtil.loadFalseResult(1, "绯荤粺涓嶅瓨鍦�")); return; @@ -1665,43 +1612,11 @@ // 鑾峰彇娣樺鍙傛暟 ClientTBPid clientTBPid = null; - if (StringUtil.isNullOrEmpty(uid)) { - // 鐢ㄦ埛鏈櫥褰� - if (acceptData.getPlatform().equalsIgnoreCase("android")) { - clientTBPid = tbPidService.getAndroidDefault(); - } else { - clientTBPid = tbPidService.getIOSDefault(); - } - + // 鐢ㄦ埛鏈櫥褰� + if (acceptData.getPlatform().equalsIgnoreCase("android")) { + clientTBPid = tbPidService.getAndroidDefault(); } else { - // 鐢ㄦ埛宸茬粡鐧诲綍 - TBPid tbPid = null; - if (acceptData.getPlatform().equalsIgnoreCase("android")) { - - tbPid = tbPidService.getTBPid(Long.parseLong(uid), PidUser.TYPE_FANLI_ANDROID); - - if (tbPid == null) { - clientTBPid = tbPidService.getAndroidDefault(); - } else { - String siteId = tbPid.getPid().split("_")[2]; - String adzoneId = tbPid.getPid().split("_")[3]; - TaoBaoUnionConfig config = taoBaoUnionConfigService.getConfigByAppIdCache(siteId); - clientTBPid = new ClientTBPid(config.getAppKey(), tbPid.getPid(), siteId, adzoneId); - } - - } else { - - tbPid = tbPidService.getTBPid(Long.parseLong(uid), PidUser.TYPE_FANLI_IOS); - - if (tbPid == null) { - clientTBPid = tbPidService.getIOSDefault(); - } else { - String siteId = tbPid.getPid().split("_")[2]; - String adzoneId = tbPid.getPid().split("_")[3]; - TaoBaoUnionConfig config = taoBaoUnionConfigService.getConfigByAppIdCache(siteId); - clientTBPid = new ClientTBPid(config.getAppKey(), tbPid.getPid(), siteId, adzoneId); - } - } + clientTBPid = tbPidService.getIOSDefault(); } LogHelper.test("鑾峰彇PID鑰楁椂锛�" + (java.lang.System.currentTimeMillis() - startTime)); @@ -1724,6 +1639,21 @@ try { goods = redisManager.getTaoBaoGoodsBrief(Long.parseLong(id)); + if (goods.getTkRate() == null || new BigDecimal(0).compareTo(goods.getTkRate()) == 0) { + String appId = clientPid.split("_")[2]; + TaoBaoUnionConfig config = taoBaoUnionConfigService.getConfigByAppIdCache(appId); + TaoKeAppInfo app = new TaoKeAppInfo(); + app.setAdzoneId(clientPid.split("_")[3]); + app.setAppKey(config.getAppKey()); + app.setAppSecret(config.getAppSecret()); + app.setPid(clientPid); + TaoBaoGoodsBrief linkInfo = TaoKeApiUtil.specialConvertCoupon(goods.getAuctionId(), app); + if (linkInfo != null) { + goods.setAuctionUrl(linkInfo.getAuctionUrl()); + goods.setCouponLink(linkInfo.getCouponLink()); + goods.setTkRate(linkInfo.getTkRate()); + } + } } catch (TaobaoGoodsDownException e) { // 鍟嗗搧涓嬫灦 ThreadUtil.run(new Runnable() { @@ -1750,6 +1680,15 @@ // 娴嬭瘯浣跨敤 ticket.put("couponUrl", goods.getCouponLink()); data.put("ticket", ticket); + } + + if (goods.getTkRate() == null || new BigDecimal(0).compareTo(goods.getTkRate()) == 0) { + TaoBaoGoodsBrief linkInfo = TaoKeApiUtil.specialConvertCoupon(goods.getAuctionId(), app); + if (linkInfo != null) { + goods.setAuctionUrl(linkInfo.getAuctionUrl()); + goods.setCouponLink(linkInfo.getCouponLink()); + goods.setTkRate(linkInfo.getTkRate()); + } } } catch (NumberFormatException e) { @@ -1867,9 +1806,13 @@ String token = ""; if (!StringUtil.isNullOrEmpty(tb.getCouponLink())) { - token = TaoKeApiUtil.getTKToken(tb.getPictUrl(), tb.getTitle(), tb.getCouponLink()); - tb.setCouponLinkTaoToken(token); + token = redisManager.getCommonTaoToken(tb.getAuctionId()); + if (StringUtil.isNullOrEmpty(token)) { + token = TaoKeApiUtil.getTKToken(tb.getPictUrl(), tb.getTitle(), tb.getCouponLink()); + redisManager.saveCommonTaoToken(tb.getAuctionId(), token); + } } + tb.setCouponLinkTaoToken(token); // 鏈嶅姟绔浆閾� if (convertInServer && !StringUtil.isNullOrEmpty(tb.getCouponLink())) { @@ -1945,9 +1888,14 @@ data.put("shareUsers", listShareUser); data.put("couponUsers", listCouponUser); data.put("detailWebUrl", "http://apph5.yeshitv.com/apppage/goods_img.html?id=" + id); - //鍟嗗搧閾炬帴 - data.put("h5Url", String.format("http://%s%s?id=%s&appType=flq", configService.getH5Host(), - Constant.systemCommonConfig.getShareGoodsPagePath(), tb.getAuctionId() + "")); + // 鍟嗗搧閾炬帴 + String h5Url = String.format("http://%s%s?id=%s&appType=flq", configService.getH5Host(), + Constant.systemCommonConfig.getShareGoodsPagePath(), tb.getAuctionId() + ""); + try { + data.put("h5Url", HttpUtil.getShortLink(h5Url)); + } catch (Exception e) { + data.put("h5Url", h5Url); + } // 鍙栨秷鍒嗕韩娲诲姩 // if (!StringUtil.isNullOrEmpty(uid) @@ -2043,7 +1991,8 @@ @RequestMapping(value = "getgoodsderivation", method = RequestMethod.POST) public void getRecommendGoods(AcceptData acceptData, long id, PrintWriter out) { - BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), acceptData.getPackages()); + BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), + acceptData.getPackages()); if (system == null) { out.print(JsonUtil.loadFalseResult(1, "绯荤粺涓嶅瓨鍦�")); return; @@ -2075,39 +2024,43 @@ }); List<TaoBaoGoodsBrief> listQuality = new ArrayList<TaoBaoGoodsBrief>(); - - try { - List<QualityFactory> listRecommend = qualityGoodsService.recommendByAuctionId(id); - - if (listRecommend != null && listRecommend.size() > 1) { - for (QualityFactory quality : listRecommend) { - - TaoBaoGoodsBrief taoBaoGoodsBrief = quality.getTaoBaoGoodsBrief(); - if (taoBaoGoodsBrief == null) { - continue; - } - - int biz30day = taoBaoGoodsBrief.getBiz30day(); - if (biz30day >= 10000) { - double sales = biz30day; - String salesCountMidea = String.format("%.1f", sales / 10000); - taoBaoGoodsBrief.setSalesCount(salesCountMidea + "涓�"); - } else { - taoBaoGoodsBrief.setSalesCount(biz30day + ""); - } - - // 鏀瑰彉鍥剧墖灏哄 - String pictUrl = taoBaoGoodsBrief.getPictUrl(); - if (!StringUtil.isNullOrEmpty(pictUrl) && !pictUrl.contains("320x320")) { - taoBaoGoodsBrief.setPictUrl(TbImgUtil.getTBSize320Img(pictUrl)); - } - - listQuality.add(TaoBaoUtil.getTaoBaoGoodsBriefExtra(taoBaoGoodsBrief, proportion.toString(), null)); - } - } - } catch (Exception e2) { - e2.printStackTrace(); - } + // 鍒犻櫎鎺ㄨ崘 + // + // try { + // List<QualityFactory> listRecommend = + // qualityGoodsService.recommendByAuctionId(id); + // + // if (listRecommend != null && listRecommend.size() > 1) { + // for (QualityFactory quality : listRecommend) { + // + // TaoBaoGoodsBrief taoBaoGoodsBrief = quality.getTaoBaoGoodsBrief(); + // if (taoBaoGoodsBrief == null) { + // continue; + // } + // + // int biz30day = taoBaoGoodsBrief.getBiz30day(); + // if (biz30day >= 10000) { + // double sales = biz30day; + // String salesCountMidea = String.format("%.1f", sales / 10000); + // taoBaoGoodsBrief.setSalesCount(salesCountMidea + "涓�"); + // } else { + // taoBaoGoodsBrief.setSalesCount(biz30day + ""); + // } + // + // // 鏀瑰彉鍥剧墖灏哄 + // String pictUrl = taoBaoGoodsBrief.getPictUrl(); + // if (!StringUtil.isNullOrEmpty(pictUrl) && + // !pictUrl.contains("320x320")) { + // taoBaoGoodsBrief.setPictUrl(TbImgUtil.getTBSize320Img(pictUrl)); + // } + // + // listQuality.add(TaoBaoUtil.getTaoBaoGoodsBriefExtra(taoBaoGoodsBrief, + // proportion.toString(), null)); + // } + // } + // } catch (Exception e2) { + // e2.printStackTrace(); + // } // 鍙栧伓鏁颁釜鏁版嵁 if (listExtra.size() % 2 != 0) { @@ -2119,8 +2072,8 @@ } JSONObject data = new JSONObject(); - data.put("listGuess", JsonUtil.getApiCommonGson().toJson(listExtra)); - data.put("listQuality", JsonUtil.getApiCommonGson().toJson(listQuality)); + data.put("listQuality", JsonUtil.getApiCommonGson().toJson(listExtra)); + data.put("listGuess", JsonUtil.getApiCommonGson().toJson(listQuality)); out.print(JsonUtil.loadTrueResult(data)); } @@ -2134,7 +2087,8 @@ @RequestMapping(value = "getSpecialActivities") public void getSpecialActivities(AcceptData acceptData, Long uid, PrintWriter out) { - BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), acceptData.getPackages()); + BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), + acceptData.getPackages()); if (system == null) { out.print(JsonUtil.loadFalseResult(1, "绯荤粺涓嶅瓨鍦�")); return; -- Gitblit v1.8.0