| | |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.yeshi.utils.HttpUtil; |
| | | import org.yeshi.utils.JsonUtil; |
| | | import org.yeshi.utils.entity.FileUploadResult; |
| | | |
| | |
| | | import com.yeshi.fanli.entity.dynamic.ImgInfo.ImgEnum; |
| | | import com.yeshi.fanli.entity.jd.JDGoods; |
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum; |
| | | import com.yeshi.fanli.entity.taobao.TaoBaoLink; |
| | | import com.yeshi.fanli.exception.share.ShareGoodsException; |
| | | import com.yeshi.fanli.service.inter.common.JumpDetailV2Service; |
| | | import com.yeshi.fanli.service.inter.config.ConfigService; |
| | | import com.yeshi.fanli.service.inter.dynamic.ArticleOfficialService; |
| | | import com.yeshi.fanli.service.inter.dynamic.DynamicInfoService; |
| | | import com.yeshi.fanli.service.inter.dynamic.GoodsEvaluateService; |
| | | import com.yeshi.fanli.service.inter.goods.ShareGoodsService; |
| | | import com.yeshi.fanli.service.inter.goods.TaoBaoGoodsBriefService; |
| | | import com.yeshi.fanli.service.inter.homemodule.SpecialService; |
| | | import com.yeshi.fanli.service.inter.homemodule.SwiperPictureService; |
| | |
| | | import com.yeshi.fanli.service.inter.user.UserInfoService; |
| | | import com.yeshi.fanli.service.inter.user.tb.UserExtraTaoBaoInfoService; |
| | | import com.yeshi.fanli.service.manger.goods.ConvertLinkManager; |
| | | import com.yeshi.fanli.util.AESUtil; |
| | | import com.yeshi.fanli.util.Constant; |
| | | import com.yeshi.fanli.util.StringUtil; |
| | | import com.yeshi.fanli.util.VersionUtil; |
| | |
| | | continue; |
| | | } |
| | | |
| | | String jumpLink = getJumpLink(goodsVO, user, inviteCode); |
| | | String jumpLink = getJumpLink(goodsVO, user,relationId, inviteCode); |
| | | if (!StringUtil.isNullOrEmpty(jumpLink)) { |
| | | list.add(jumpLink); |
| | | } |
| | |
| | | if (imgInfo.getGoodsVO() != null) |
| | | if (imgInfo.getGoodsVO().getGoodsId().longValue() == goodsId.longValue() |
| | | && imgInfo.getGoodsVO().getGoodsType() == goodsType.intValue()) { |
| | | String jumpLink = getJumpLink(imgInfo.getGoodsVO(), user, inviteCode); |
| | | String jumpLink = getJumpLink(imgInfo.getGoodsVO(), user,relationId, inviteCode); |
| | | if (!StringUtil.isNullOrEmpty(jumpLink)) { |
| | | list.add(jumpLink); |
| | | } |
| | |
| | | } else if (type == 2 || type == 3) { |
| | | for (ImgInfo imgInfo : imgs) { |
| | | if (imgInfo.getGoodsVO() != null) { |
| | | String jumpLink = getJumpLink(imgInfo.getGoodsVO(), user, inviteCode); |
| | | String jumpLink = getJumpLink(imgInfo.getGoodsVO(), user,relationId, inviteCode); |
| | | if (!StringUtil.isNullOrEmpty(jumpLink)) { |
| | | list.add(jumpLink); |
| | | } |
| | |
| | | data.put("list", list); |
| | | out.print(JsonUtil.loadTrueResult(data)); |
| | | } |
| | | |
| | | @Resource |
| | | private ShareGoodsService shareGoodsService; |
| | | |
| | | private String getJumpLink(GoodsDetailVO goodsVO, UserInfo user, String inviteCode) { |
| | | private String getJumpLink(GoodsDetailVO goodsVO, UserInfo user,String relationId, String inviteCode) { |
| | | String jumpLink = null; |
| | | if (goodsVO.getGoodsType() == Constant.SOURCE_TYPE_TAOBAO) { |
| | | String url = String.format("http://%s%s?uid=%s&id=%s&appType=flq", configService.getH5Host(), |
| | | Constant.systemCommonConfig.getShareGoodsPagePath(), |
| | | AESUtil.encrypt(user.getId() + "", Constant.UIDAESKEY), goodsVO.getGoodsId() + ""); |
| | | String shortLink = HttpUtil.getShortLink(url); |
| | | if (!StringUtil.isNullOrEmpty(shortLink)) { |
| | | url = shortLink; |
| | | TaoBaoLink taoBaoLink=null; |
| | | try { |
| | | taoBaoLink = shareGoodsService.getTaoBaoLinkForShare(user.getId(), goodsVO.getGoodsId(), relationId); |
| | | } catch (ShareGoodsException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | jumpLink = url; |
| | | |
| | | jumpLink =configService.get(ConfigKeyEnum.taobaoShareQrcodeText.getKey()).replace("[淘口令]", taoBaoLink.getTaoToken()); |
| | | } else if (goodsVO.getGoodsType() == Constant.SOURCE_TYPE_JD) { |
| | | JDGoods jdGoods = jdGoodsCacheUtil.getGoodsInfo(goodsVO.getGoodsId()); |
| | | if (jdGoods == null) { |
| | |
| | | JSONArray array = JSONArray.fromObject(imgs);
|
| | | shareInfo.setNotifyPicture(array.optString(0));
|
| | |
|
| | | // 2.0.7版本后的提示图片
|
| | | imgs = configService.get(ConfigKeyEnum.goodsShareNotifyImgs207.getKey());
|
| | | array = JSONArray.fromObject(imgs);
|
| | | shareInfo.setNotifyPictureNew(array.optString(0));
|
| | |
|
| | | shareInfo.setNotifyDesc(configService.get(ConfigKeyEnum.goodsShareNotify.getKey()));
|
| | |
|
| | | // 添加分享记录
|
| | |
| | | taoBaoLink.getGoods(), shareInfo.getToken()));
|
| | |
|
| | | // 提示图文内容
|
| | | String imgs = configService.getByVersion(ConfigKeyEnum.goodsShareNotifyImgs.getKey(), platform,
|
| | | Integer.parseInt(version));
|
| | | String imgs = configService.get(ConfigKeyEnum.goodsShareNotifyImgs.getKey());
|
| | | JSONArray array = JSONArray.fromObject(imgs);
|
| | |
|
| | | shareInfo.setNotifyPicture(array.optString(0));
|
| | |
|
| | | // 2.0.7版本后的提示图片
|
| | | imgs = configService.get(ConfigKeyEnum.goodsShareNotifyImgs207.getKey());
|
| | | array = JSONArray.fromObject(imgs);
|
| | | shareInfo.setNotifyPictureNew(array.optString(0));
|
| | |
|
| | | shareInfo.setNotifyDesc(configService.get(ConfigKeyEnum.goodsShareNotify.getKey()));
|
| | |
|
| | |
| | | }
|
| | |
|
| | | // 设置评论文本选项
|
| | | shareInfo.setCommentTextChoiceList(getCommentChoiceList(shareInfo.getToken(), null, inviteCode,
|
| | | shareInfo.setCommentTextChoiceList(getCommentChoiceList(shareInfo.getShareText(), null, inviteCode,
|
| | | TaoBaoUtil.getGoodsHongBaoMoney(taoBaoLink.getGoods(), hongBaoManageService.getFanLiRate())));
|
| | | shareInfo.setCommentText(shareInfo.getShareText());
|
| | |
|
| | | if (VersionUtil.greaterThan_2_0_7(platform, version))
|
| | | shareInfo.setRecommendText(taoBaoLink.getGoods().getDescription());
|
| | | else
|
| | | if (VersionUtil.greaterThan_2_0_7(platform, version)) {
|
| | | String recommend = taoBaoLink.getGoods().getTitle();
|
| | | if (!StringUtil.isNullOrEmpty(taoBaoLink.getGoods().getDescription()))
|
| | | recommend += "\n\r" + taoBaoLink.getGoods().getDescription();
|
| | | shareInfo.setRecommendText(recommend);
|
| | | } else
|
| | | shareInfo.setRecommendText(shareInfo.getDescText());
|
| | |
|
| | | out.print(JsonUtil.loadTrueResult(
|
| | |
| | |
|
| | | shareInfo.setNotifyPicture(array.size() > 1 ? array.optString(1) : array.optString(0));
|
| | |
|
| | | // 2.0.7版本后的提示图片
|
| | | imgs = configService.get(ConfigKeyEnum.goodsShareNotifyImgs207.getKey());
|
| | | array = JSONArray.fromObject(imgs);
|
| | | shareInfo.setNotifyPictureNew(array.size() > 1 ? array.optString(1) : array.optString(0));
|
| | |
|
| | | shareInfo.setNotifyDesc(configService.get(ConfigKeyEnum.goodsShareNotifyJD.getKey()));
|
| | |
|
| | | // 添加分享记录
|
| | |
| | | String inviteCode = userInfoExtraService.getInviteCodeByUid(uid);
|
| | |
|
| | | // 设置评论文本选项
|
| | | shareInfo.setCommentTextChoiceList(getCommentChoiceList(null, shareInfo.getClickUrl(), inviteCode,
|
| | | shareInfo.setCommentTextChoiceList(getCommentChoiceList(null, shareInfo.getShareText(), inviteCode,
|
| | | JDUtil.getGoodsFanLiMoney(jdGoods, hongBaoManageService.getFanLiRate())));
|
| | |
|
| | | shareInfo.setCommentText(shareInfo.getShareText());
|
| | | shareInfo.setRecommendText(shareInfo.getDescText());
|
| | | if (VersionUtil.greaterThan_2_0_7(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | shareInfo.setRecommendText(jdGoods.getSkuName());
|
| | | else
|
| | | shareInfo.setRecommendText(shareInfo.getDescText());
|
| | |
|
| | | out.print(JsonUtil.loadTrueResult(
|
| | | JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()).create().toJson(shareInfo)));
|
| | |
| | |
|
| | | shareInfo.setNotifyPicture(array.size() > 1 ? array.optString(1) : array.optString(0));
|
| | |
|
| | | // 2.0.7版本后的提示图片
|
| | | imgs = configService.get(ConfigKeyEnum.goodsShareNotifyImgs207.getKey());
|
| | | array = JSONArray.fromObject(imgs);
|
| | | shareInfo.setNotifyPictureNew(array.size() > 1 ? array.optString(1) : array.optString(0));
|
| | |
|
| | | shareInfo.setNotifyDesc(configService.get(ConfigKeyEnum.goodsShareNotifyPDD.getKey()));
|
| | |
|
| | | // 添加分享记录
|
| | |
| | | String inviteCode = userInfoExtraService.getInviteCodeByUid(uid);
|
| | |
|
| | | // 设置评论文本选项
|
| | | shareInfo.setCommentTextChoiceList(getCommentChoiceList(null, shareInfo.getClickUrl(), inviteCode,
|
| | | shareInfo.setCommentTextChoiceList(getCommentChoiceList(null, shareInfo.getShareText(), inviteCode,
|
| | | PinDuoDuoUtil.getGoodsFanLiMoney(goods, hongBaoManageService.getFanLiRate())));
|
| | |
|
| | | shareInfo.setCommentText(shareInfo.getShareText());
|
| | | shareInfo.setRecommendText(shareInfo.getDescText());
|
| | | if (VersionUtil.greaterThan_2_0_7(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | shareInfo.setRecommendText(goods.getGoodsName());
|
| | | else
|
| | | shareInfo.setRecommendText(shareInfo.getDescText());
|
| | |
|
| | | out.print(JsonUtil.loadTrueResult(
|
| | | JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()).create().toJson(shareInfo)));
|
| | |
| | | import com.yeshi.fanli.exception.user.UserAccountException;
|
| | | import com.yeshi.fanli.exception.user.UserInfoExtraException;
|
| | | import com.yeshi.fanli.exception.user.vip.UserVIPInfoException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.count.HongBaoV2CountService;
|
| | | import com.yeshi.fanli.service.inter.money.UserMoneyDetailService;
|
| | |
| | | return;
|
| | | }
|
| | | String phoneNumber = WXXCXUtil.getPhoneNumber(sessionKey, phoneEncryptedData, phoneIv);
|
| | | LogHelper.test("小程序获取到的电话号码为:"+phoneNumber);
|
| | | |
| | | if (StringUtil.isNullOrEmpty(phoneNumber)) {
|
| | | out.print(JsonUtil.loadFalseResult("获取电话号码失败"));
|
| | | return;
|
| | |
| | | shareGoodsTemplateRulesJD("share_goods_template_rules_jd", "京东模板规则"),
|
| | | shareGoodsTemplateRulesPDD("share_goods_template_rules_pdd", "拼多多模板规则"),
|
| | | goodsShareNotifyImgs("goods_share_notify_imgs", "单个商品分享的券提示图片"),
|
| | | goodsShareNotifyImgs207("goods_share_notify_imgs_207", "单个商品分享的券提示图片(2.0.7及以后)"),
|
| | | goodsShareMultipleNotify("goods_share_multiple_notify", "多个商品分享提醒"),
|
| | | goodsShareNotify("goods_share_notify", "单个商品分享提醒"),
|
| | | goodsShareNotifyJD("goods_share_notify_jd", "京东分享提醒"),
|
| | |
| | | import com.yeshi.fanli.exception.user.UserAccountException;
|
| | | import com.yeshi.fanli.service.inter.user.ForbiddenUserIdentifyCodeService;
|
| | | import com.yeshi.fanli.service.inter.user.UserAccountService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.invite.ThreeSaleSerivce;
|
| | | import com.yeshi.fanli.service.inter.user.wx.WXMPUserLoginService;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserInfoService userInfoService;
|
| | |
|
| | | @Resource
|
| | | private UserInfoExtraService userInfoExtraService;
|
| | |
|
| | | @Resource
|
| | | private ForbiddenUserIdentifyCodeService forbiddenUserIdentifyCodeService;
|
| | |
| | | } else {// 登录
|
| | | UserInfo userInfo = userAccountService.getUserInfoByPhone(loginData.getAppId(), loginData.getPhone());
|
| | | if (userInfo != null) {// 已存在的用户
|
| | | UserInfo boss = threeSaleSerivce.getBoss(userInfo.getId());
|
| | | if (boss == null) {// 需要绑定邀请码
|
| | | String inviteCode = userInfoExtraService.getInviteCodeByUid(userInfo.getId());
|
| | | if (StringUtil.isNullOrEmpty(inviteCode)) {// 需要绑定邀请码
|
| | | if (loginData.getBoss() != null) {
|
| | | // 绑定上级
|
| | | return bindInviteCode(loginData.getBoss(), userInfo);
|
| | |
| | | // 通过微信网页邀请关系进来的激活生效
|
| | | threeSaleSerivce.effective(userInfo);
|
| | |
|
| | | UserInfo boss = threeSaleSerivce.getBoss(userInfo.getId());
|
| | | if (boss == null) {// 需要绑定邀请码
|
| | | String inviteCode = userInfoExtraService.getInviteCodeByUid(userInfo.getId());
|
| | | if (StringUtil.isNullOrEmpty(inviteCode)) {// 需要绑定邀请码
|
| | | // 提示客户端需要绑定邀请码
|
| | | return new WXMPLoginResult(WXMPLoginResult.CODE_BIND_INVITE_CODE, userInfo);
|
| | | }
|
| | |
| | | package com.yeshi.fanli.service.manger;
|
| | |
|
| | | import java.util.Arrays;
|
| | | import java.util.HashSet;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
| | |
|
| | | /**
|
| | | * 粘贴板解析
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | |
| | | private TokenRecordService tokenRecordService;
|
| | |
|
| | | /**
|
| | | * @Title: parseContentType
|
| | | * @Description: 解析文本的类型
|
| | | * @param text
|
| | | * @return |
| | | * Set<ClipboardContentType> 返回类型
|
| | | * @throws
|
| | | * @Title: parseContentType @Description: 解析文本的类型 @param text @return Set
|
| | | * <ClipboardContentType> 返回类型 @throws
|
| | | */
|
| | | public static Set<ClipboardContentType> parseContentType(String originText) {
|
| | | public static Set<ClipboardContentType> parseContentType(String originText, String platform, String version) {
|
| | | Set<ClipboardContentType> typeSet = new HashSet<>();
|
| | | StringBuffer textBuffer = new StringBuffer(originText);
|
| | | String text = textBuffer.toString();
|
| | |
| | | }
|
| | |
|
| | | // 淘口令
|
| | | List<String> taoBaoTokenList = TaoBaoUtil.getTokenListFromText(text);
|
| | | List<String> taoBaoTokenList = null;
|
| | | if (VersionUtil.greaterThan_2_0_7(platform, version))
|
| | | taoBaoTokenList = TaoBaoUtil.getTokenListFromTextWithKuoHao(text);
|
| | | else
|
| | | taoBaoTokenList = TaoBaoUtil.getTokenListFromText(text);
|
| | | if (taoBaoTokenList != null && taoBaoTokenList.size() > 0) {
|
| | | typeSet.add(ClipboardContentType.taoBaoToken);
|
| | | for (String token : taoBaoTokenList) {
|
| | | text = text.replace(token, "");
|
| | | }
|
| | | }
|
| | |
|
| | | // 文本
|
| | | if (text != null && text.trim().length() > 0) {
|
| | | typeSet.add(ClipboardContentType.text);
|
| | |
| | |
|
| | | /**
|
| | | *
|
| | | * @Title: parse
|
| | | * @Description: 解析
|
| | | * @param text
|
| | | * @param typeSet |
| | | * void 返回类型
|
| | | * @throws
|
| | | * @Title: parse @Description: 解析 @param text @param typeSet void
|
| | | * 返回类型 @throws
|
| | | */
|
| | | public void parse(String platform, String version, String text, Long uid, IClipboardAnalysisResult resultListener) {
|
| | | if (text == null)
|
| | | return;
|
| | | text = text.trim();
|
| | |
|
| | | Set<ClipboardContentType> typeSet = parseContentType(text);
|
| | | Set<ClipboardContentType> typeSet = parseContentType(text, platform, version);
|
| | |
|
| | | // 系统口令
|
| | | if (typeSet.contains(ClipboardContentType.systemToken)) {
|
| | |
| | | }
|
| | | } else if (typeSet.size() == 2) {
|
| | | List<String> urlList = HttpUtil.getUrlListFromText(text);
|
| | | List<String> tokenList = TaoBaoUtil.getTokenListFromText(text);
|
| | | List<String> tokenList = null;
|
| | | if (VersionUtil.greaterThan_2_0_7(platform, version))
|
| | | tokenList = TaoBaoUtil.getTokenListFromTextWithKuoHao(text);
|
| | | else
|
| | | tokenList = TaoBaoUtil.getTokenListFromText(text);
|
| | |
|
| | | String link = null;
|
| | | String token = null;
|
| | |
| | | resultListener.onResult(new GoodsDocParseResultVO(text, urlList.get(0)));
|
| | | } else {
|
| | | if (VersionUtil.greaterThan_2_0_7(platform, version)) {
|
| | | resultListener.onResult(new GoodsDocParseResultVO(text, goods));
|
| | | if (urlList.size() == 1)// 单链接+文本
|
| | | resultListener.onResult(goods);
|
| | | else
|
| | | resultListener.onResult(new GoodsDocParseResultVO(text, goods));
|
| | | } else {
|
| | | resultListener.onResult(goods);
|
| | | }
|
| | |
| | | if (goods == null) {
|
| | | if (text.trim().indexOf("【") > -1 && text.trim().indexOf("】") > 0) {
|
| | | // 截取标题
|
| | | String title = text.trim().substring(text.trim().indexOf("【")+1, text.trim().lastIndexOf("】"));
|
| | | String title = text.trim().substring(text.trim().indexOf("【") + 1,
|
| | | text.trim().lastIndexOf("】"));
|
| | | goods = new CommonGoods();
|
| | | goods.setTitle(title);
|
| | | goods.setPicture("http://");
|
| | |
| | |
|
| | | /**
|
| | | *
|
| | | * @Title: parseLink
|
| | | * @Description: 解析单链接
|
| | | * @param link
|
| | | * @return |
| | | * CommonGoods 返回类型
|
| | | * @throws
|
| | | * @Title: parseLink @Description: 解析单链接 @param link @return CommonGoods
|
| | | * 返回类型 @throws
|
| | | */
|
| | | public CommonGoods parseLink(String link) {
|
| | |
|
| | |
| | |
|
| | | /**
|
| | | *
|
| | | * @Title: analysisDouYin
|
| | | * @Description: 抖音解析
|
| | | * @param link
|
| | | * @return |
| | | * CommonGoods 返回类型
|
| | | * @throws
|
| | | * @Title: analysisDouYin @Description: 抖音解析 @param link @return CommonGoods
|
| | | * 返回类型 @throws
|
| | | */
|
| | | private TaoBaoGoodsBrief analysisDouYin(String link) {
|
| | | String location = HttpUtil.getLocation(link);
|
| | |
| | |
|
| | | /**
|
| | | * 粘贴板解析结果
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | |
| | | import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
|
| | | import org.apache.commons.httpclient.methods.GetMethod;
|
| | | import org.apache.commons.httpclient.params.HttpMethodParams;
|
| | | import org.hibernate.cache.spi.NaturalIdCacheKey;
|
| | | import org.jsoup.Connection;
|
| | | import org.jsoup.Jsoup;
|
| | | import org.jsoup.nodes.Document;
|
| | |
| | | }
|
| | |
|
| | | /**
|
| | | * 获取未参与推广的淘宝商品详情
|
| | | * @Title: getTaoBaoGoodsBrief
|
| | | * @Description: |
| | | * @param id
|
| | | * @return |
| | | * TaoBaoGoodsBrief 包含(标题与图片)
|
| | | * @throws
|
| | | * 获取未参与推广的淘宝商品详情 @Title: getTaoBaoGoodsBrief @Description: @param
|
| | | * id @return TaoBaoGoodsBrief 包含(标题与图片) @throws
|
| | | */
|
| | | public static TaoBaoGoodsBrief getTaoBaoGoodsBriefNotInPub(Long id) {
|
| | | TaoBaoGoodsBrief tb = TaoBaoUtil.getTmallGoodsInfo(id+"");
|
| | | TaoBaoGoodsBrief tb = TaoBaoUtil.getTmallGoodsInfo(id + "");
|
| | | return tb;
|
| | | }
|
| | |
|
| | |
| | | return false;
|
| | | }
|
| | |
|
| | | private final static String[] taoTokenSymbols = new String[] { "₳-₳", "¥-¥", "¥-¥", "€-€", "\\$-\\$", "₴-₴", "¢-¢",
|
| | | "₤-₤" };
|
| | |
|
| | | /**
|
| | | * 从文本中提取淘口令
|
| | | * @Title: getTokenListFromText
|
| | | * @Description: |
| | | * @param str
|
| | | * @return |
| | | * List<String> 返回类型
|
| | | * @throws
|
| | | * 从文本中提取淘口令 @Title: getTokenListFromText @Description: @param str @return
|
| | | * List<String> 返回类型 @throws
|
| | | */
|
| | | public static List<String> getTokenListFromText(String str) {
|
| | | String[] marks = new String[] { "₳", "¥", "¥", "€", "\\$", "₴", "¢", "₤" };
|
| | | String[] marks = taoTokenSymbols;
|
| | |
|
| | | return getTokenListFromText(str, Arrays.asList(marks));
|
| | | }
|
| | |
|
| | | /**
|
| | | * 从文本中提取淘口令(括号的口令也算)
|
| | | * |
| | | * @param str
|
| | | * @return
|
| | | */
|
| | | public static List<String> getTokenListFromTextWithKuoHao(String str) {
|
| | | String[] marks = taoTokenSymbols;
|
| | | List<String> list = new ArrayList<>();
|
| | | for (String st : marks)
|
| | | list.add(st);
|
| | | list.add("\\(-\\)");
|
| | | return getTokenListFromText(str, list);
|
| | | }
|
| | |
|
| | | public static List<String> getTokenListFromText(String str, List<String> markList) {
|
| | | List<String> expressList = new ArrayList<>();
|
| | | for (String st : markList) {
|
| | | expressList.add(String.format("(%s{1}[A-Za-z0-9]{11,13}+%s{1})", st, st));
|
| | | expressList.add(String.format("(%s{1}[A-Za-z0-9]{11,13}+%s{1})", st.split("-")[0], st.split("-")[1]));
|
| | | }
|
| | | String pattern = StringUtil.concat(expressList, "|");
|
| | | Pattern r = Pattern.compile(pattern);
|
| | |
| | | @Expose
|
| | | private String notifyPicture;
|
| | |
|
| | | @Expose
|
| | | private String notifyPictureNew;
|
| | |
|
| | | // 分享规则链接(帮助中心)
|
| | | @Expose
|
| | | private String rule;
|
| | |
| | | public void setSpreadMoney(String spreadMoney) {
|
| | | this.spreadMoney = spreadMoney;
|
| | | }
|
| | |
|
| | | public String getNotifyPictureNew() {
|
| | | return notifyPictureNew;
|
| | | }
|
| | |
|
| | | public void setNotifyPictureNew(String notifyPictureNew) {
|
| | | this.notifyPictureNew = notifyPictureNew;
|
| | | }
|
| | | }
|