Commit a90bb920 by 李传峰

Merge branch 'feature/1007217' into 'release'

feat: [1007217] 智能背诵

See merge request rays/pcloud-book!1594
parents 6d9f9ef6 8eb4f3a1
...@@ -2241,10 +2241,10 @@ public class ResourcePageBizImpl implements ResourcePageBiz { ...@@ -2241,10 +2241,10 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
// 是不是rays链接 // 是不是rays链接
public Boolean isRaysLink(String url) { 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) { public String aFaDiExchangeLinkDomain(String url,String domain,Boolean isReplaceAccountId) {
...@@ -2256,7 +2256,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz { ...@@ -2256,7 +2256,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
domain += '/'; domain += '/';
} }
url = ReUtil.replaceAll(url, DOMAIN_REG, 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处理 // url处理
...@@ -2269,7 +2269,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz { ...@@ -2269,7 +2269,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
} }
url = ReUtil.replaceAll(url, DOMAIN_REG, domain); url = ReUtil.replaceAll(url, DOMAIN_REG, domain);
// OFFICIAL_ACCOUNT_ID 测试23, uat35515, 生产23 // 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(){ 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