修复每日动画被固定成true的问题

This commit is contained in:
yutou 2021-01-14 17:35:55 +08:00
parent 34dc1c2210
commit 92fc97e128
3 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication @SpringBootApplication
public class ToolsApplication { public class ToolsApplication {
public static final String version="1.0.15"; public static final String version="1.0.15.01";
public static void main(String[] args) { public static void main(String[] args) {
System.out.println("当前版本号:"+version); System.out.println("当前版本号:"+version);

View File

@ -190,8 +190,9 @@ public class BangumiTools {
* @return 番剧列表 * @return 番剧列表
*/ */
public static String reportToDayBangumi() { public static String reportToDayBangumi() {
if (!RedisTools.get("reportToDayBangumi").equals("true")) { String toDayTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
RedisTools.set("reportToDayBangumi", "true"); if (!RedisTools.get("reportToDayBangumi").equals(toDayTime)) {
RedisTools.set("reportToDayBangumi", toDayTime);
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
JSONObject toDay = getBangumi(0); JSONObject toDay = getBangumi(0);
if (toDay == null) { if (toDay == null) {

View File

@ -120,7 +120,6 @@ public class QQBotManager {
public String sendMessage(String text) { public String sendMessage(String text) {
if (bot != null) { if (bot != null) {
try { try {
System.out.println("发送QQ");
return Objects.requireNonNull(bot.getGroup(qqGroup)).sendMessage(text).toString(); return Objects.requireNonNull(bot.getGroup(qqGroup)).sendMessage(text).toString();
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();