1. 123后缀处理 2. 修复缓存时间戳格式问题

This commit is contained in:
qaiu
2024-09-18 15:41:56 +08:00
parent c12e56d402
commit 0d609daffa
4 changed files with 9 additions and 5 deletions

View File

@@ -57,8 +57,8 @@ public enum PanDomainTemplate {
WsTool.class), WsTool.class),
// https://www.123pan.com/s/ // https://www.123pan.com/s/
YE("123网盘", YE("123网盘",
"https://www\\.123pan\\.com/s/(.+)\\.html", "https://www\\.123pan\\.com/s/(.+)",
"https://www.123pan.com/s/{shareKey}.html", "https://www.123pan.com/s/{shareKey}",
YeTool.class), YeTool.class),
// https://www.ecpan.cn/web/#/yunpanProxy?path=%2F%23%2Fdrive%2Foutside&data={code}&isShare=1 // https://www.ecpan.cn/web/#/yunpanProxy?path=%2F%23%2Fdrive%2Foutside&data={code}&isShare=1
EC("移动云空间", EC("移动云空间",

View File

@@ -35,6 +35,7 @@ public class LogStatistics implements AfterInterceptor {
ParserLogInfo parserLogInfo = new ParserLogInfo(); ParserLogInfo parserLogInfo = new ParserLogInfo();
parserLogInfo.setPath(ctx.request().uri()); parserLogInfo.setPath(ctx.request().uri());
if (responseData == null) return;
if (responseData.containsKey("code") && responseData.getInteger("code") == 500) { if (responseData.containsKey("code") && responseData.getInteger("code") == 500) {
log.error("code 500: {} {}", ctx.request().path(), responseData.getString("msg")); log.error("code 500: {} {}", ctx.request().path(), responseData.getString("msg"));
} else { } else {

View File

@@ -21,15 +21,18 @@ public class URLParamUtil {
* @return 完整的URL字符串 * @return 完整的URL字符串
*/ */
public static String parserParams(HttpServerRequest request) { public static String parserParams(HttpServerRequest request) {
String url = request.absoluteURI(); String url = request.absoluteURI();
MultiMap params = request.params(); MultiMap params = request.params();
// 处理URL截断的情况例如: url='https://...&key=...&code=...' // 处理URL截断的情况例如: url='https://...&key=...&code=...'
if (params.contains("url")) { if (params.contains("url")) {
String encodedUrl = params.get("url"); String encodedUrl = params.get("url");
url = handleTruncatedUrl(encodedUrl, params); url = handleTruncatedUrl(encodedUrl, params);
if (url.endsWith(".html")) {
// 123云盘的后缀处理
url = url.replace(".html", "");
}
} }
return url; return url;
} }

View File

@@ -63,7 +63,7 @@ public class CacheServiceImpl implements CacheService {
} }
private String generateDate(Long ts) { private String generateDate(Long ts) {
return DateFormatUtils.format(new Date(ts), "yyyy-MM-dd hh:mm:ss"); return DateFormatUtils.format(new Date(ts), "yyyy-MM-dd HH:mm:ss");
} }
@Override @Override