From b59fef5c00b15fdfdfa9d4be26e5bf6b41c75458 Mon Sep 17 00:00:00 2001 From: admin <2780501319@qq.com> Date: 星期日, 23 二月 2020 00:16:52 +0800 Subject: [PATCH] 2.0.7相关服务端功能添加 --- fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsTextTemplateServiceImpl.java | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsTextTemplateServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsTextTemplateServiceImpl.java index 7d8e6da..af1b5c6 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsTextTemplateServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsTextTemplateServiceImpl.java @@ -21,6 +21,7 @@ import com.yeshi.fanli.service.inter.tlj.ConfigTaoLiJinService; import com.yeshi.fanli.util.MoneyBigDecimalUtil; import com.yeshi.fanli.util.StringUtil; +import com.yeshi.fanli.util.TaoBaoConstant; import com.yeshi.fanli.util.jd.JDUtil; import com.yeshi.fanli.util.pinduoduo.PinDuoDuoUtil; import com.yeshi.fanli.util.taobao.TaoBaoUtil; @@ -109,7 +110,7 @@ return null; } - @Transactional + @Transactional(rollbackFor=Exception.class) @Override public void saveCouponTemplate(Long uid, String template) throws ShareGoodsTextTemplateException { // 鏍煎紡楠岃瘉 @@ -131,7 +132,7 @@ } } - @Transactional + @Transactional(rollbackFor=Exception.class) @Override public void saveCouponTemplateJD(Long uid, String template) throws ShareGoodsTextTemplateException { // 鏍煎紡楠岃瘉 @@ -153,7 +154,7 @@ } } - @Transactional + @Transactional(rollbackFor=Exception.class) @Override public void saveCouponTemplatePDD(Long uid, String template) throws ShareGoodsTextTemplateException { // 鏍煎紡楠岃瘉 @@ -175,7 +176,7 @@ } } - @Transactional + @Transactional(rollbackFor=Exception.class) @Override public void saveTaoLiJinTemplate(Long uid, String template) throws ShareGoodsTextTemplateException { @@ -314,15 +315,15 @@ .replace("{娣樼ぜ閲戦潰棰潁", BigDecimalUtil.getWithNoZera(spreadMoney).toString()) .replace("{浼樻儬鍒镐环}", BigDecimalUtil.getWithNoZera(TaoBaoUtil.getAfterUseCouplePrice(goods)).toString()) - .replace("{搴楅摵绫诲瀷}", goods.getUserType() == 1 ? "澶╃尗浠�" : "娣樺疂浠�"); + .replace("{搴楅摵绫诲瀷}", goods.getUserType() == 1 ? TaoBaoConstant.SHARE_PRICE_TM : TaoBaoConstant.SHARE_PRICE_TAOBAO); } if (!hasCoupon) { return template.replace("{鏍囬}", goods.getTitle()) .replace("{鍟嗗搧鍘熶环}", BigDecimalUtil.getWithNoZera(goods.getZkPrice()).toString()) .replace("{鏈堥攢閲弣", TaoBaoUtil.getSaleCount(goods.getBiz30day())).replace("{棰嗗埜鐭摼}", shortLink) - .replace("{娣樺彛浠", token).replace("{搴楅摵绫诲瀷}", goods.getUserType() == 1 ? "澶╃尗浠�" - : "娣樺疂浠�"); + .replace("{娣樺彛浠", token).replace("{搴楅摵绫诲瀷}", goods.getUserType() == 1 ? TaoBaoConstant.SHARE_PRICE_TM + : TaoBaoConstant.SHARE_PRICE_TAOBAO); } else { return template.replace("{鏍囬}", goods.getTitle()) .replace("{鍟嗗搧鍘熶环}", BigDecimalUtil.getWithNoZera(goods.getZkPrice()).toString()) @@ -331,7 +332,7 @@ .replace("{浼樻儬鍒搁潰棰潁", BigDecimalUtil.getWithNoZera(goods.getCouponAmount()).toString()) .replace("{浼樻儬鍒镐环}", BigDecimalUtil.getWithNoZera(TaoBaoUtil.getAfterUseCouplePrice(goods)).toString()) - .replace("{搴楅摵绫诲瀷}", goods.getUserType() == 1 ? "澶╃尗浠�" : "娣樺疂浠�"); + .replace("{搴楅摵绫诲瀷}", goods.getUserType() == 1 ? TaoBaoConstant.SHARE_PRICE_TM : TaoBaoConstant.SHARE_PRICE_TAOBAO); } } @@ -352,7 +353,7 @@ template = template.replace("{鏍囬}", goods.getSkuName()) .replace("{鍟嗗搧鍘熶环}", BigDecimalUtil.getWithNoZera(price).toString()) .replace("{鏈堥攢閲弣", JDUtil.getSaleCount(goods.getInOrderCount30Days())).replace("{鐭摼鎺", shortLink) - .replace("{浼樻儬鍒搁潰棰潁", BigDecimalUtil.getWithNoZera(goods.getCouponInfo().getDiscount()).toString()) + .replace("{浼樻儬鍒搁潰棰潁", BigDecimalUtil.getWithNoZera(JDUtil.getShowCouponInfo( goods).getDiscount()).toString()) .replace("{浼樻儬鍒镐环}", BigDecimalUtil.getWithNoZera(JDUtil.getQuanPrice(goods)).toString()); } -- Gitblit v1.8.0