修复Redis返回默认值的问题

This commit is contained in:
yutou
2021-01-18 18:16:05 +08:00
parent d7a882cf8f
commit 45ce18edac
4 changed files with 4 additions and 12 deletions

View File

@@ -248,7 +248,7 @@ public class BangumiTools {
*/
public static String reportToDayBangumi() {
String toDayTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
if (!RedisTools.get("reportToDayBangumi").equals(toDayTime)) {
if (!toDayTime.equals(RedisTools.get("reportToDayBangumi"))) {
RedisTools.set("reportToDayBangumi", toDayTime);
StringBuilder builder = new StringBuilder();
JSONObject toDay = getBangumi(0);