From db88b87df461820152d68d3d55a28f30c2da83e6 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 20 九月 2019 17:54:42 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div --- fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java | 40 +++++++++++++++++++++++++++++----------- 1 files changed, 29 insertions(+), 11 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java index 2bf7a0c..8631263 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java @@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestMethod; import org.yeshi.utils.JsonUtil; +import com.fasterxml.jackson.core.util.VersionUtil; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonElement; @@ -45,10 +46,11 @@ import com.yeshi.fanli.service.inter.goods.ShareGoodsService; import com.yeshi.fanli.service.inter.goods.ShareGoodsTextTemplateService; import com.yeshi.fanli.service.inter.homemodule.SwiperPictureService; -import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService; import com.yeshi.fanli.service.inter.lable.QualityGoodsService; +import com.yeshi.fanli.service.inter.money.UserMoneyExtraService; import com.yeshi.fanli.service.inter.monitor.BusinessEmergent110Service; import com.yeshi.fanli.service.inter.monitor.MonitorService; +import com.yeshi.fanli.service.inter.order.config.HongBaoManageService; import com.yeshi.fanli.service.inter.taobao.ShareHotGoodsService; import com.yeshi.fanli.service.inter.taobao.TLJBuyGoodsService; import com.yeshi.fanli.service.inter.tlj.ConfigTaoLiJinService; @@ -56,11 +58,10 @@ import com.yeshi.fanli.service.inter.tlj.UserTaoLiJinDetailService; import com.yeshi.fanli.service.inter.tlj.UserTaoLiJinOriginService; import com.yeshi.fanli.service.inter.tlj.UserTaoLiJinRecordService; -import com.yeshi.fanli.service.inter.user.UserExtraTaoBaoInfoService; import com.yeshi.fanli.service.inter.user.UserInfoExtraService; import com.yeshi.fanli.service.inter.user.UserInfoService; -import com.yeshi.fanli.service.inter.user.UserMoneyExtraService; import com.yeshi.fanli.service.inter.user.UserShareGoodsRecordService; +import com.yeshi.fanli.service.inter.user.tb.UserExtraTaoBaoInfoService; import com.yeshi.fanli.util.Constant; import com.yeshi.fanli.util.StringUtil; import com.yeshi.fanli.util.TaoBaoConstant; @@ -252,15 +253,14 @@ BigDecimal lastMonthUse = userTaoLiJinDetailService.countUseMoneyByDate(uid, 4); if (lastMonthUse == null || lastMonthUse.compareTo(zero) > 0) { lastMonthUse = zero; - } - - String giveMin = configTaoLiJinService.getValueByKey("give_min_amount"); + } - + String giveMin = configTaoLiJinService.getValueByKey("give_min_amount"); + JSONObject data = new JSONObject(); data.put("tlj", tlj.setScale(2).toString()); data.put("giveMin", giveMin); - data.put("giveTip", "娉�:璧犻�佹帹骞跨孩鍖呴噾棰濊嚦灏�"+ giveMin +"鍏�"); + data.put("giveTip", "娉�:璧犻�佹帹骞跨孩鍖呴噾棰濊嚦灏�" + giveMin + "鍏�"); data.put("helpLink", configTaoLiJinService.getValueByKey("hongbao_help_link")); data.put("countShare", countShare); data.put("todayWin", todayWin.setScale(2).toString()); @@ -647,6 +647,15 @@ } GoodsDetailVO detailVO = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, null, fanLiRate, shareRate); + + // 澶т簬1.6.5鐨勬墠浼氭樉绀虹鍒╀环 + if (com.yeshi.fanli.util.VersionUtil.greaterThan_1_6_5(acceptData.getPlatform(), acceptData.getVersion())) { + if (detailVO.getCouponPrice() != null && detailVO.getCouponPrice().compareTo(new BigDecimal(0)) > 0) + detailVO.setCouponPrice(detailVO.getCouponPrice().subtract(spreadMoney)); + else + detailVO.setZkPrice(detailVO.getZkPrice().subtract(spreadMoney)); + } + // 鍘绘帀鏍囩 detailVO.setLabels(null); @@ -794,6 +803,15 @@ } GoodsDetailVO detailVO = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, null, proportion, proportion); + + // 澶т簬1.6.5鐨勬墠浼氭樉绀虹鍒╀环 + if (com.yeshi.fanli.util.VersionUtil.greaterThan_1_6_5(acceptData.getPlatform(), acceptData.getVersion())) { + if (detailVO.getCouponPrice() != null && detailVO.getCouponPrice().compareTo(new BigDecimal(0)) > 0) + detailVO.setCouponPrice(detailVO.getCouponPrice().subtract(spreadMoney)); + else + detailVO.setZkPrice(detailVO.getZkPrice().subtract(spreadMoney)); + } + // 鍘绘帀鏍囩 detailVO.setLabels(null); @@ -834,10 +852,10 @@ } out.print(JsonUtil.loadTrueResult(data)); } - - + /** * 璧犻�佹窐绀奸噾 + * * @param acceptData * @param uid * @param amount @@ -849,7 +867,7 @@ out.print(JsonUtil.loadFalseResult(1, "鐢ㄦ埛鏈櫥褰�")); return; } - + try { String tips = userTaoLiJinRecordService.giveTaolijin(uid, amount); out.print(JsonUtil.loadTrueResult(tips)); -- Gitblit v1.8.0