Commit 8eb4f3a1 by 郑勇

feat: [1007217] 智能背诵

parent 814bc069
......@@ -2241,10 +2241,10 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
// 是不是rays链接
public Boolean isRaysLink(String url) {
return ReUtil.contains("^(https|http?)://weixin\\w+[.]",url) || ReUtil.contains("^(https|http?)://(app\\w*)[.]",url);
return ReUtil.contains("^(https|http)?://weixin\\w+[.]",url) || ReUtil.contains("^(https|http)?://(app\\w*)[.]",url);
}
public static final String DOMAIN_REG = "^(https|http?)://([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6}(\\/)";
public static final String DOMAIN_REG = "^(https|http)?://([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6}(\\/)";
// 阿法迪单独特殊处理(临时方案)
public String aFaDiExchangeLinkDomain(String url,String domain,Boolean isReplaceAccountId) {
......@@ -2256,7 +2256,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
domain += '/';
}
url = ReUtil.replaceAll(url, DOMAIN_REG, domain);
return isReplaceAccountId ? url.replace("/W(d\\*)/", "/W${"+officialAccountId+"}/") : url;
return isReplaceAccountId ? url.replaceAll("/W(\\d+)/C", "/W"+officialAccountId+"/C") : url;
}
// url处理
......@@ -2269,7 +2269,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
}
url = ReUtil.replaceAll(url, DOMAIN_REG, domain);
// OFFICIAL_ACCOUNT_ID 测试23, uat35515, 生产23
return isReplaceAccountId ? url.replace("/W(d\\*)/", "/W${"+getOffAccount()+"}/") : url;
return isReplaceAccountId ? url.replaceAll("/W(\\d+)/C", "/W"+getOffAccount()+"/C") : url;
}
public Long getOffAccount(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment