admin
2020-07-03 651a15c78f668bef3859d9ed1bb7ad0b669d3600
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsTextTemplateServiceImpl.java
@@ -5,6 +5,8 @@
import javax.annotation.Resource;
import com.yeshi.fanli.entity.SystemEnum;
import com.yeshi.fanli.service.inter.user.UserInfoService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.yeshi.utils.BigDecimalUtil;
@@ -47,6 +49,9 @@
   @Resource
   private ConfigTaoLiJinService configTaoLiJinService;
   @Resource
   private UserInfoService userInfoService;
   @Override
   public void saveCommonTemplate(Long uid, String template) throws ShareGoodsTextTemplateException {
@@ -234,8 +239,9 @@
            template = ""; // 老板分享
         }
      }
      SystemEnum system=userInfoService.getUserSystem(uid);
      if (StringUtil.isNullOrEmpty(template)) {
         template = configService.get(ConfigKeyEnum.shareCommentTextTB.getKey());
         template = configService.getValue(ConfigKeyEnum.shareCommentTextTB.getKey(),system);
      }
      return template;
@@ -252,7 +258,8 @@
         }
      }
      if (StringUtil.isNullOrEmpty(template)) {
         template = configService.get(ConfigKeyEnum.shareCommentTextJD.getKey());
         SystemEnum system=userInfoService.getUserSystem(uid);
         template = configService.getValue(ConfigKeyEnum.shareCommentTextJD.getKey(),system);
      }
      return template;
   }
@@ -268,7 +275,8 @@
         }
      }
      if (StringUtil.isNullOrEmpty(template)) {
         template = configService.get(ConfigKeyEnum.shareCommentTextPDD.getKey());
         SystemEnum system=userInfoService.getUserSystem(uid);
         template = configService.getValue(ConfigKeyEnum.shareCommentTextPDD.getKey(),system);
      }
      return template;
@@ -282,7 +290,8 @@
         template = objct.getShareVIPTextTemplate();
      }
      if (StringUtil.isNullOrEmpty(template)) {
         template = configService.get(ConfigKeyEnum.shareCommentTextVIP.getKey());
         SystemEnum system=userInfoService.getUserSystem(uid);
         template = configService.getValue(ConfigKeyEnum.shareCommentTextVIP.getKey(),system);
      }
      return template;
@@ -296,7 +305,8 @@
         template = objct.getShareSuNingTextTemplate();
      }
      if (StringUtil.isNullOrEmpty(template)) {
         template = configService.get(ConfigKeyEnum.shareCommentTextSuNing.getKey());
         SystemEnum system=userInfoService.getUserSystem(uid);
         template = configService.getValue(ConfigKeyEnum.shareCommentTextSuNing.getKey(),system);
      }
      return template;
@@ -837,8 +847,8 @@
   }
   @Override
   public String getRecommendText(boolean coupon, String title, String sales, String couponAmount, String description) {
      String template = configService.get(ConfigKeyEnum.quickShareGoodsText.getKey());
   public String getRecommendText(boolean coupon, String title, String sales, String couponAmount, String description, SystemEnum system) {
      String template = configService.getValue(ConfigKeyEnum.quickShareGoodsText.getKey(),system);
      String recommendText = template.replace("[商品标题]", title);
      if (!coupon) {
         recommendText = recommendText.replace("推荐理由:[推荐语]", "");
@@ -862,8 +872,8 @@
   
   @Override
   public String getCommentTextByTaoToken(boolean coupon, String taoToken, String zkPrice, String quanPrice) {
      String quickCommentText = configService.get(ConfigKeyEnum.quickShareTBCommentText.getKey());
   public String getCommentTextByTaoToken(boolean coupon, String taoToken, String zkPrice, String quanPrice, SystemEnum system) {
      String quickCommentText = configService.getValue(ConfigKeyEnum.quickShareTBCommentText.getKey(),system);
      String commentText = quickCommentText.replace("[原价]", zkPrice);
      commentText = commentText.replace("[淘口令]", TaoBaoUtil.filterTaoToken(taoToken));
      if (!coupon) {
@@ -876,8 +886,8 @@
   }
   
   @Override
   public String getCommentTextByLink(boolean coupon, String link, String zkPrice, String quanPrice, ConfigKeyEnum keyEnum) {
      String quickCommentText = configService.get(keyEnum.getKey());
   public String getCommentTextByLink(boolean coupon, String link, String zkPrice, String quanPrice, ConfigKeyEnum keyEnum, SystemEnum system) {
      String quickCommentText = configService.getValue(keyEnum.getKey(),system);
      String commentText = quickCommentText.replace("[原价]", zkPrice);
      commentText = commentText.replace("[链接]", link);
      if (!coupon) {