From c9cbad5f5d18c6b2ac5a063e41007933d7028329 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期二, 07 七月 2020 15:24:17 +0800 Subject: [PATCH] 返利配置文件加入系统区分 --- fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java | 50 +++++++++++++++++++++++++------------------------- 1 files changed, 25 insertions(+), 25 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java index 0b1f2cb..d2a16de 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java @@ -452,7 +452,7 @@ shareInfo.setNotifyDesc(configService.getValue(ConfigKeyEnum.goodsShareNotify.getKey(),system)); // 娣诲姞鍒嗕韩璁板綍 - BigDecimal rate = hongBaoManageService.getShareRate(); + BigDecimal rate = hongBaoManageService.getShareRate(acceptData.getSystem()); BigDecimal shareMoney = TaoBaoUtil.getShareGoodsHongBaoInfo(goods, rate); shareInfo.setShareMoney("楼" + shareMoney.toString()); try { @@ -512,7 +512,7 @@ TaoBaoLink taoBaoLink = taoBaoLinkManager.getTaoBaoLinkForShare(uid, goodsId, relationId,null); if (taoBaoLink != null && taoBaoLink.getGoods() != null && needGoods) { - ConfigParamsDTO dto = orderHongBaoMoneyComputeService.getShowComputeRate(platform, version); + ConfigParamsDTO dto = orderHongBaoMoneyComputeService.getShowComputeRate(platform, version,acceptData.getSystem()); GoodsDetailVO goodsInfo = GoodsDetailVOFactory.convertTaoBao(taoBaoLink.getGoods(), dto); shareInfo.setGoodsInfo(goodsInfo); } @@ -605,7 +605,7 @@ shareInfo.setNotifyDesc(configService.getValue(ConfigKeyEnum.goodsShareNotify.getKey(),system)); // 鍒嗕韩閲戦 - BigDecimal rate = hongBaoManageService.getShareRate(); + BigDecimal rate = hongBaoManageService.getShareRate(acceptData.getSystem()); BigDecimal shareMoney = TaoBaoUtil.getShareGoodsHongBaoInfo(taoBaoLink.getGoods(), rate); shareInfo.setShareMoney("楼" + shareMoney.toString()); @@ -671,7 +671,7 @@ // 璁剧疆璇勮鏂囨湰閫夐」 shareInfo.setCommentTextChoiceList( getCommentChoiceList(shareInfo.getCommentText(), null, inviteCode, TaoBaoUtil.getGoodsHongBaoMoney( - taoBaoLink.getGoods(), hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP), false))); + taoBaoLink.getGoods(), hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP,acceptData.getSystem()), false))); out.print(JsonUtil.loadTrueResult( JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()).create().toJson(shareInfo))); @@ -751,7 +751,7 @@ if (needGoods) shareInfo.setGoodsInfo(GoodsDetailVOFactory.convertJDGoods(jdGoods, orderHongBaoMoneyComputeService - .getShowComputeRate(acceptData.getPlatform(), acceptData.getVersion()))); + .getShowComputeRate(acceptData.getPlatform(), acceptData.getVersion(),acceptData.getSystem()))); boolean hasCoupon = false; if (couponInfo != null) { @@ -782,7 +782,7 @@ shareInfo.setNotifyDesc(configService.getValue(ConfigKeyEnum.goodsShareNotifyJD.getKey(),SystemInfoUtil.getSystem(acceptData))); // 娣诲姞鍒嗕韩璁板綍 - BigDecimal shareRate = hongBaoManageService.getShareRate(); + BigDecimal shareRate = hongBaoManageService.getShareRate(acceptData.getSystem()); BigDecimal shareMoney = JDUtil.getGoodsFanLiMoney(jdGoods, shareRate); shareInfo.setShareMoney("楼" + shareMoney.toString()); try { @@ -840,7 +840,7 @@ // 璁剧疆璇勮鏂囨湰閫夐」 shareInfo.setCommentTextChoiceList(getCommentChoiceList(null, shareInfo.getCommentText(), inviteCode, - JDUtil.getGoodsFanLiMoney(jdGoods, hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP)))); + JDUtil.getGoodsFanLiMoney(jdGoods, hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP,acceptData.getSystem())))); out.print(JsonUtil.loadTrueResult( JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()).create().toJson(shareInfo))); @@ -916,9 +916,9 @@ if (needGoods) { shareInfo .setGoodsInfo(GoodsDetailVOFactory.convertPDDGoods(goods, - new ConfigParamsDTO(hongBaoManageService.getFanLiRate(), - hongBaoManageService.getShareRate(), Constant.MAX_REWARD_RATE, - hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP)))); + new ConfigParamsDTO(hongBaoManageService.getFanLiRate(acceptData.getSystem()), + hongBaoManageService.getShareRate(acceptData.getSystem()), Constant.MAX_REWARD_RATE, + hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP,acceptData.getSystem())))); } // 鍒涘缓鍙d护 @@ -953,7 +953,7 @@ shareInfo.setNotifyDesc(configService.getValue(ConfigKeyEnum.goodsShareNotifyPDD.getKey(),system)); // 娣诲姞鍒嗕韩璁板綍 - BigDecimal shareRate = hongBaoManageService.getShareRate(); + BigDecimal shareRate = hongBaoManageService.getShareRate(acceptData.getSystem()); BigDecimal shareMoney = PinDuoDuoUtil.getGoodsFanLiMoney(goods, shareRate); shareInfo.setShareMoney("楼" + shareMoney.toString()); @@ -1015,7 +1015,7 @@ // 璁剧疆璇勮鏂囨湰閫夐」 shareInfo.setCommentTextChoiceList(getCommentChoiceList(null, shareInfo.getCommentText(), inviteCode, - PinDuoDuoUtil.getGoodsFanLiMoney(goods, hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP)))); + PinDuoDuoUtil.getGoodsFanLiMoney(goods, hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP,acceptData.getSystem())))); out.print(JsonUtil.loadTrueResult( JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()).create().toJson(shareInfo))); @@ -1084,9 +1084,9 @@ if (needGoods) { shareInfo .setGoodsInfo(GoodsDetailVOFactory.convertVIPGoods(goods, - new ConfigParamsDTO(hongBaoManageService.getFanLiRate(), - hongBaoManageService.getShareRate(), Constant.MAX_REWARD_RATE, - hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP)))); + new ConfigParamsDTO(hongBaoManageService.getFanLiRate(acceptData.getSystem()), + hongBaoManageService.getShareRate(acceptData.getSystem()), Constant.MAX_REWARD_RATE, + hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP,acceptData.getSystem())))); } String template = shareGoodsTextTemplateService.getTextTemplateByVIP(uid); @@ -1108,7 +1108,7 @@ shareInfo.setNotifyDesc(configService.getValue(ConfigKeyEnum.goodsShareNotifyVIP.getKey(),system)); // 娣诲姞鍒嗕韩璁板綍 - BigDecimal shareRate = hongBaoManageService.getShareRate(); + BigDecimal shareRate = hongBaoManageService.getShareRate(acceptData.getSystem()); BigDecimal shareMoney = VipShopUtil.getGoodsFanLiMoney(goods, shareRate); shareInfo.setShareMoney("楼" + shareMoney.toString()); @@ -1144,7 +1144,7 @@ // 璁剧疆璇勮鏂囨湰閫夐」 shareInfo.setCommentTextChoiceList(getCommentChoiceList(null, shareInfo.getCommentText(), inviteCode, - VipShopUtil.getGoodsFanLiMoney(goods, hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP)))); + VipShopUtil.getGoodsFanLiMoney(goods, hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP,acceptData.getSystem())))); out.print(JsonUtil.loadTrueResult( JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()).create().toJson(shareInfo))); @@ -1219,9 +1219,9 @@ if (needGoods) { shareInfo .setGoodsInfo(GoodsDetailVOFactory.convertSuningGoods(goods, - new ConfigParamsDTO(hongBaoManageService.getFanLiRate(), - hongBaoManageService.getShareRate(), Constant.MAX_REWARD_RATE, - hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP)))); + new ConfigParamsDTO(hongBaoManageService.getFanLiRate(acceptData.getSystem()), + hongBaoManageService.getShareRate(acceptData.getSystem()), Constant.MAX_REWARD_RATE, + hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP,acceptData.getSystem())))); } String template = shareGoodsTextTemplateService.getTextTemplateBySuNing(uid); @@ -1251,7 +1251,7 @@ shareInfo.setNotifyDesc(configService.getValue(ConfigKeyEnum.goodsShareNotifySuning.getKey(),system)); // 娣诲姞鍒嗕韩璁板綍 - BigDecimal shareRate = hongBaoManageService.getShareRate(); + BigDecimal shareRate = hongBaoManageService.getShareRate(acceptData.getSystem()); BigDecimal shareMoney = SuningUtil.getGoodsFanLiMoney(goods, shareRate); shareInfo.setShareMoney("楼" + shareMoney.toString()); @@ -1325,7 +1325,7 @@ // 璁剧疆璇勮鏂囨湰閫夐」 shareInfo.setCommentTextChoiceList(getCommentChoiceList(null, shareInfo.getCommentText(), inviteCode, - SuningUtil.getGoodsFanLiMoney(goods, hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP)))); + SuningUtil.getGoodsFanLiMoney(goods, hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP,acceptData.getSystem())))); out.print(JsonUtil.loadTrueResult( JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()).create().toJson(shareInfo))); @@ -1846,7 +1846,7 @@ } ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(), - acceptData.getVersion()); + acceptData.getVersion(),acceptData.getSystem()); Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()) .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create(); @@ -1918,8 +1918,8 @@ GoodsDetailVO goodsDetail = null; ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(), - acceptData.getVersion()); - paramsDTO.setBaseFanliRate(hongBaoManageService.getBaseFanliRate()); + acceptData.getVersion(),acceptData.getSystem()); + paramsDTO.setBaseFanliRate(hongBaoManageService.getBaseFanliRate(acceptData.getSystem())); if (goodsType == Constant.SOURCE_TYPE_TAOBAO) { TaoBaoGoodsBrief goods = taoBaoGoodsCacheUtil.getCommonTaoBaoGoodsInfo(Long.parseLong(goodsId)); -- Gitblit v1.8.0