admin
2019-08-19 9c09cead959dbeef292628f345e5f80c30fc3d17
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ShareController.java
@@ -320,7 +320,7 @@
         TaoBaoGoodsBrief goods = taoBaoLink.getGoods();
         // 计算推广红包
         String warningRate = configTaoLiJinService.getValueByKey("warning_value");
         String warningRate = configTaoLiJinService.getValueByKey("warning_value",null);
         BigDecimal spreadMoney = TaoLiJinUtil.getSpreadMoney(warningRate, goods);
         // 推广红包 不能小于1
@@ -387,7 +387,7 @@
         {
            String text = shareGoodsTextTemplateService.getTaoLiJinTemplate(uid);
            if (StringUtil.isNullOrEmpty(text))
               text = configTaoLiJinService.getValueByKey("goods_share_text");
               text = configTaoLiJinService.getValueByKey("goods_share_text",new Date());
            shareText = text.replace("{标题}", taoBaoLink.getGoods().getTitle())
                  .replace("{商品原价}", MoneyBigDecimalUtil.getWithNoZera(taoBaoLink.getGoods().getZkPrice()) + "")
@@ -834,7 +834,7 @@
         if (tljId != null) {
            String template = shareGoodsTextTemplateService.getTaoLiJinTemplate(uid);
            if (StringUtil.isNullOrEmpty(template))
               template = configTaoLiJinService.getValueByKey("goods_share_text");
               template = configTaoLiJinService.getValueByKey("goods_share_text",new Date());
            return template;
         } else {
            String template = shareGoodsTextTemplateService.geteCouponTemplate(uid);
@@ -885,7 +885,7 @@
   @RequestMapping(value = "getShareTextTemplateRules", method = RequestMethod.POST)
   public void getShareTextTemplateRules(AcceptData acceptData, Long tljId, PrintWriter out) {
      if (tljId != null) {
         out.print(JsonUtil.loadTrueResult(configTaoLiJinService.getValueByKey("share_goods_rules")));
         out.print(JsonUtil.loadTrueResult(configTaoLiJinService.getValueByKey("share_goods_rules",new Date())));
      } else {
         out.print(JsonUtil.loadTrueResult(configService.get("share_goods_template_rules")));
      }
@@ -926,6 +926,11 @@
         if (cid == 1 || cid == 2) { // 1 热销单品 2 推荐好货
            if (cid == 1) {
               List<GoodsPicture> imgs = dynamicInfo.getImgs();
               if (imgs == null || imgs.size() == 0) {
                  out.print(JsonUtil.loadFalseResult("该商品已下架"));
                  return;
               }
               GoodsPicture goodsPicture = imgs.get(0);
               if (goodsPicture.getGoodState() == 1) {
                  out.print(JsonUtil.loadFalseResult("该商品已下架"));
@@ -933,6 +938,11 @@
               } 
               
               TaoBaoGoodsBriefExtra goods = goodsPicture.getGoods();
               if (goods == null) {
                  out.print(JsonUtil.loadFalseResult("该商品已下架"));
                  return;
               }
               if (goods.getState() != null && goods.getState() == 1) {
                  out.print(JsonUtil.loadFalseResult("该商品已下架"));
                  return;