yujian
2019-05-20 c4d752a1d340652d9c7d2abb5abff65cdee40d69
fanli/src/main/java/com/yeshi/fanli/controller/client/ShareController.java
@@ -685,6 +685,7 @@
            String url = String.format("http://%s%s?uid=%s&id=%s&appType=flq", configService.getH5Host(),
                  Constant.systemCommonConfig.getShareGoodsPagePath(), AESUtil.encrypt(uid + "", Constant.UIDAESKEY),
                  auctionId + "");
            String shortLink = HttpUtil.getShortLink(url);
            if (!StringUtil.isNullOrEmpty(shortLink)) {
               url = shortLink;
@@ -753,7 +754,7 @@
            ShareInfoDTO shareInfo = userShareGoodsRecordService.saveShareRecord(uid, 
                  ShareSourceTypeEnum.activity, title, listGoods);
            data.put("shareId", shareInfo.getShareId());
            data.put("clickUrl", shareInfo.getCodeUrl());
            data.put("clickUrl", shareInfo.getShareUrl());
            data.put("pictUrl", TbImgUtil.getTBSizeImg(picUrl, 500));
            // 帮助链接
            data.put("helpLink","http://apph5.yeshitv.com/apppage/all_help_content.html?id=148&from=singlemessage&isappinstalled=0");
@@ -798,11 +799,34 @@
                     + Constant.systemCommonConfig.getProjectName() + "/client/threeShareNew?uid=" + uid);
               data.put("inviteLink", shortLink);
               data.put("inviteCode", inviteCode);
               data.put("helpLink", configService.get("invite_help_link"));
               
               // 邀请图片
               // 邀请背景图片
               List<GoodsPicture> imgs = dynamicInfo.getImgs();
               String imgLink = spreadUserImgService.getInviteImg(uid, imgs.get(0).getUrl(), inviteCode);
               data.put("imgLink", imgLink);
               String bgUrl = imgs.get(0).getUrl();
               // 用户信息
               UserInfo userInfo = userInfoService.selectByPKey(uid);
               String portrait = userInfo.getPortrait();
               // 画邀请图片
               if (StringUtil.isNullOrEmpty(dynamicInfo.getInviteMaterialId())) {
                  String imgLink = spreadUserImgService.getInviteImg(bgUrl,uid, portrait, inviteCode);
                  data.put("imgLink", imgLink);
               } else {
                  String title ="";
                  List<ClientTextStyleVO> listTitle = dynamicInfo.getTitle();
                  if (listTitle != null && listTitle.size() > 0) {
                     for (ClientTextStyleVO textStyleVO : listTitle) {
                        title += textStyleVO.getContent();
                     }
                  }
                  title = title.replace("【邀请码】", inviteCode);
                  title = title.replace("【邀请链接】", UserUtil.getInviteShortLink(uid));
                  String imgLink = spreadUserImgService.getInviteImgToGreet(bgUrl,uid, portrait, inviteCode, title, new Date());
                  data.put("imgLink", imgLink);
               }
               
               //  邀请规则
               BusinessSystem system = new BusinessSystem();