From 651a15c78f668bef3859d9ed1bb7ad0b669d3600 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 03 七月 2020 17:52:07 +0800 Subject: [PATCH] 多APP优化 --- fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/GoodsController.java | 36 +++++++++++++++++------------------- 1 files changed, 17 insertions(+), 19 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/GoodsController.java b/fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/GoodsController.java index de4fe52..477cf82 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/GoodsController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/GoodsController.java @@ -10,6 +10,8 @@ import javax.annotation.Resource; +import com.yeshi.fanli.entity.SystemEnum; +import com.yeshi.fanli.util.*; import org.json.simple.JSONArray; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -60,10 +62,6 @@ import com.yeshi.fanli.service.inter.user.UserShareGoodsRecordService; import com.yeshi.fanli.service.inter.user.vip.UserVIPInfoService; import com.yeshi.fanli.tag.PageEntity; -import com.yeshi.fanli.util.Constant; -import com.yeshi.fanli.util.JumpDetailUtil; -import com.yeshi.fanli.util.StringUtil; -import com.yeshi.fanli.util.ThreadUtil; import com.yeshi.fanli.util.cache.JDGoodsCacheUtil; import com.yeshi.fanli.util.cache.PinDuoDuoCacheUtil; import com.yeshi.fanli.util.factory.CommonGoodsFactory; @@ -150,12 +148,14 @@ */ @RequestMapping(value = "getTopCategory", method = RequestMethod.POST) public void getTopCategory(WXMPAcceptData acceptData, Long uid, PrintWriter out) { + + SystemEnum system= SystemInfoUtil.getSystemByWXCXCAppId(acceptData.getAppId()); JSONObject data = new JSONObject(); - data.put("list", configService.get(ConfigKeyEnum.jdWXMPClass.getKey())); + data.put("list", configService.getValue(ConfigKeyEnum.jdWXMPClass.getKey(),system)); String tips = null; if (uid == null || uid <= 0) { - tips = configService.get(ConfigKeyEnum.tipGuideNewUser.getKey()); + tips = configService.getValue(ConfigKeyEnum.tipGuideNewUser.getKey(),system); } else { long rebateOrder = hongBaoV2CountService.countRebateOrder(uid); long shareOrInviteOrder = hongBaoV2CountService.countShareOrInviteOrder(uid); @@ -163,13 +163,13 @@ // 鐔熷鐗� } else if (rebateOrder <= 0 && shareOrInviteOrder <= 0) { // 鏂颁汉鐗� - tips = configService.get(ConfigKeyEnum.tipGuideNewUser.getKey()); + tips = configService.getValue(ConfigKeyEnum.tipGuideNewUser.getKey(),system); } else if (rebateOrder > 0 && shareOrInviteOrder <= 0) { // 鐪侀挶鐗� - tips = configService.get(ConfigKeyEnum.tipGuideSaveMoney.getKey()); + tips = configService.getValue(ConfigKeyEnum.tipGuideSaveMoney.getKey(),system); } else { // 璧氶挶鐗� - tips = configService.get(ConfigKeyEnum.tipGuideShareInvite.getKey()); + tips = configService.getValue(ConfigKeyEnum.tipGuideShareInvite.getKey(),system); } } @@ -200,7 +200,7 @@ String platform = acceptData.getPlatform(); int version = Integer.parseInt(acceptData.getVersion()); List<BannerVO> picList = swiperPictureService.getByBannerCardAndVersion("index_top", platform, - version); + version,acceptData.getSystem()); if (picList == null) { picList = new ArrayList<>(); } @@ -258,7 +258,6 @@ * @param goodsId * 鍟嗗搧id * @param uid - * @param code * 閭�璇风爜 * @param goodsType * 鍟嗗搧绫诲瀷 @@ -330,7 +329,7 @@ } goodsDetail.getMoneyInfo() - .setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey())); + .setRateInfoHelpUrl(configService.getValue(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey(),acceptData.getSystem())); // 闄勫姞淇℃伅 OtherInfo otherInfo = new OtherInfo(); @@ -391,14 +390,14 @@ // IOS鏄惁姝e湪涓婄嚎 if ("ios".equalsIgnoreCase(acceptData.getPlatform())) { String version = acceptData.getVersion(); - extraVO.setIosOnling(configService.iosOnLining(Integer.parseInt(version))); + extraVO.setIosOnling(configService.iosOnLining(Integer.parseInt(version),acceptData.getSystem())); } Long inOrderCount30Days = jdGoods.getInOrderCount30Days(); List<ShamUser> listShareUser = new ArrayList<ShamUser>(); // 浜笢寮�鍚垎浜� - String open = configService.get(ConfigKeyEnum.shareOpenJD.getKey()); + String open = configService.getValue(ConfigKeyEnum.shareOpenJD.getKey(),acceptData.getSystem()); if ("1".equals(open.trim())) { extraVO.setShareValid(true); MoneyInfoVO moneyInfo = goodsDetail.getMoneyInfo(); @@ -430,7 +429,7 @@ extraVO.setDetailUrl("https://in.m.jd.com/product/jieshao/video/" + id + ".html"); // 鍟嗗搧閾炬帴 - String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(), + String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(acceptData.getSystem()), Constant.systemCommonConfig.getShareGoodsPagePathJD(), "", id + ""); try { extraVO.setH5Url(HttpUtil.getShortLink(h5Url)); @@ -442,7 +441,7 @@ extraVO.setFanliValid(true); if (StringUtil.isNullOrEmpty(helpLink)) { - helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey()); + helpLink = configService.getValue(ConfigKeyEnum.noRebateHelpLink.getKey(),acceptData.getSystem()); } ShareVO shareInfoVO = new ShareVO(); @@ -573,7 +572,7 @@ } // 鍒嗕韩璺緞 - String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(), + String h5Url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(acceptData.getSystem()), Constant.systemCommonConfig.getShareGoodsPagePathPDD(), "", id + ""); try { extraVO.setH5Url(HttpUtil.getShortLink(h5Url)); @@ -586,7 +585,7 @@ extraVO.setShareValid(true); if (StringUtil.isNullOrEmpty(helpLink)) { - helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey()); + helpLink = configService.getValue(ConfigKeyEnum.noRebateHelpLink.getKey(),acceptData.getSystem()); } ShareVO shareInfoVO = new ShareVO(); @@ -722,7 +721,6 @@ * @param goodsId * 鍟嗗搧id * @param uid - * @param code * 閭�璇风爜 * @param goodsType * 鍟嗗搧绫诲瀷 -- Gitblit v1.8.0