admin
2020-04-02 e8e2e233af733ca3ba625223e2fd2255165e6b70
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java
@@ -49,7 +49,6 @@
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
import com.yeshi.fanli.service.inter.config.ConfigService;
import com.yeshi.fanli.service.inter.count.DailyCountMomentsService;
import com.yeshi.fanli.service.inter.dynamic.ArticleOfficialService;
import com.yeshi.fanli.service.inter.dynamic.DynamicInfoService;
import com.yeshi.fanli.service.inter.dynamic.GoodsEvaluateService;
@@ -137,12 +136,11 @@
   @Resource
   private ShareGoodsService shareGoodsService;
   
   @Resource
   private DailyCountMomentsService dailyCountMomentsService;
   // @Resource
   // private DailyCountMomentsService dailyCountMomentsService;
   
   @Resource(name = "taskExecutor")
   private TaskExecutor executor;
   private final static long TYPE_REXIAO = 1;// 热销
   private final static long TYPE_TUIJIAN = 2;// 推荐
@@ -842,7 +840,8 @@
                     if (imgInfo.getGoodsVO() != null)
                        if (imgInfo.getGoodsVO().getGoodsId().longValue() == goodsId.longValue()
                              && imgInfo.getGoodsVO().getGoodsType() == goodsType.intValue()) {
                           String jumpLink = getJumpLink(imgInfo.getGoodsVO(), user, relationId, inviteCode, imgInfo.getUrl());
                           String jumpLink = getJumpLink(imgInfo.getGoodsVO(), user, relationId, inviteCode,
                                 imgInfo.getUrl());
                           if (!StringUtil.isNullOrEmpty(jumpLink)) {
                              list.add(jumpLink);
                           }
@@ -852,7 +851,8 @@
               } else if (type == 2 || type == 3) {
                  for (ImgInfo imgInfo : imgs) {
                     if (imgInfo.getGoodsVO() != null) {
                        String jumpLink = getJumpLink(imgInfo.getGoodsVO(), user, relationId, inviteCode, imgInfo.getUrl() );
                        String jumpLink = getJumpLink(imgInfo.getGoodsVO(), user, relationId, inviteCode,
                              imgInfo.getUrl());
                        if (!StringUtil.isNullOrEmpty(jumpLink)) {
                           list.add(jumpLink);
                        }
@@ -889,7 +889,8 @@
            executor.execute(new Runnable() {
               @Override
               public void run() { // 添加每日统计
                  dailyCountMomentsService.addShareClick();
                  // TODO
                  // dailyCountMomentsService.addShareClick();
               }
            });
         }
@@ -909,7 +910,8 @@
      }
   }
   private String getJumpLink(GoodsDetailVO goodsVO, UserInfo user, String relationId, String inviteCode, String mainPic) {
   private String getJumpLink(GoodsDetailVO goodsVO, UserInfo user, String relationId, String inviteCode,
         String mainPic) {
      String jumpLink = null;
      if (goodsVO.getGoodsType() == Constant.SOURCE_TYPE_TAOBAO) {
         TaoBaoLink taoBaoLink = null;
@@ -1006,7 +1008,8 @@
      }
      String newText = text; // 非通用券需要验证
      if (comment != null && comment.getTypeEnum() != CommentInfoEnum.currencyCoupon) {
      if ((comment != null && comment.getTypeEnum() != CommentInfoEnum.currencyCoupon)
            || goodsEvaluate.getType() == EvaluateEnum.activity) {
         try {
            newText = convertLinkManager.convertLinkFromText(text, uid, true);
         } catch (ConvertLinkExceptionException e) {
@@ -1021,7 +1024,6 @@
         }
      }
   
      // 替换价格
      if (goodsEvaluate.getType() == EvaluateEnum.single) {
         GoodsDetailVO goods = goodsEvaluate.getGoods();
@@ -1035,7 +1037,6 @@
         newText.replace("\r\n\r\n", "\r\n").replace("\r\n\r\n", "\r\n").replace("\r\n\r\n", "\r\n");
      }
      
      JSONObject data = new JSONObject();
      data.put("text", newText);
      out.print(JsonUtil.loadTrueResult(data));
@@ -1043,7 +1044,8 @@
      executor.execute(new Runnable() {
         @Override
         public void run() { // 添加每日统计
            dailyCountMomentsService.addCopyComment();
            // TODO
            // dailyCountMomentsService.addCopyComment();
         }
      });
   }