修复fastjson的代码
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
package com.yutou.nas.utils;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.yutou.nas.Services.IBangumiService;
|
||||
import com.yutou.nas.bangumi.AnimationData;
|
||||
import com.yutou.nas.mybatis.model.BangumiItem;
|
||||
@@ -63,7 +64,7 @@ public class BTDownloadManager implements ApplicationContextAware {
|
||||
String url = getRSSUrl(item);
|
||||
String _json = HttpTools.get(url);
|
||||
if (!StringUtils.isEmpty(_json)) {
|
||||
JSONObject json = JSONObject.parseObject(_json);
|
||||
JSONObject json = JSON.parseObject(_json);
|
||||
download(item, json);
|
||||
} else {
|
||||
QQBotManager.getInstance().sendMessage(item.getTitle() + "\n下载失败\n"+getDmhyUrl(item));
|
||||
@@ -153,7 +154,7 @@ public class BTDownloadManager implements ApplicationContextAware {
|
||||
if (StringUtils.isEmpty(_title)) {
|
||||
return new JSONArray();
|
||||
}
|
||||
return JSONArray.parseArray(_title);
|
||||
return JSON.parseArray(_title);
|
||||
}
|
||||
|
||||
private boolean isDownload(String title, String key) {
|
||||
@@ -162,7 +163,7 @@ public class BTDownloadManager implements ApplicationContextAware {
|
||||
if (StringUtils.isEmpty(_title)) {
|
||||
return false;
|
||||
} else {
|
||||
array = JSONArray.parseArray(_title);
|
||||
array = JSON.parseArray(_title);
|
||||
}
|
||||
return array.contains(key);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user