dev_该合并了 #8

Merged
yutou merged 83 commits from dev_ into master 2024-01-17 17:23:44 +08:00
3 changed files with 9 additions and 6 deletions
Showing only changes of commit 938d3d532a - Show all commits

View File

@ -3,6 +3,7 @@ package com.yutou.qqbot.bilibili;
import lombok.Data; import lombok.Data;
import java.util.ArrayList;
import java.util.List; import java.util.List;
@Data @Data
@ -12,7 +13,7 @@ public class AppUserTask {
private long progress; private long progress;
private long target; private long target;
private Wallet wallet; private Wallet wallet;
private List<WeekTask> weekTask; private List<WeekTask> weekTask = new ArrayList<>();
private long weekTotal; private long weekTotal;
private long weekGroup; private long weekGroup;
private DayTask dayTask; private DayTask dayTask;
@ -35,8 +36,9 @@ public class AppUserTask {
public String toMessageFormat() { public String toMessageFormat() {
return switch (getStatus()) { return switch (getStatus()) {
case 0 -> "不可领取,需要发送弹幕:" + getTarget() + ",进度:" + getProgress(); case 0 -> "不可领取,需要发送弹幕数:" + getTarget() + ",进度:" + getProgress();
case 2 -> "未领取"; case 1 -> "进行中,需要发送弹幕数:" + getTarget() + ",进度:" + getProgress();
case 2 -> "可领取";
case 3 -> "已领取"; case 3 -> "已领取";
default -> "未知状态:" + this; default -> "未知状态:" + this;
}; };
@ -64,7 +66,7 @@ public class AppUserTask {
return switch (getStatus()) { return switch (getStatus()) {
case 0 -> case 0 ->
"任务id:" + id + ",不可领取, 进度天数:" + totalNum + ",需要天数:" + minimalDay + ",任务奖励电池:" + rewardNum; "任务id:" + id + ",不可领取, 进度天数:" + totalNum + ",需要天数:" + minimalDay + ",任务奖励电池:" + rewardNum;
case 2 -> "任务id:" + id + ":领取" + ",任务奖励电池:" + rewardNum; case 2 -> "任务id:" + id + ":领取" + ",任务奖励电池:" + rewardNum;
case 3 -> "任务id:" + id + ":已领取" + ",任务奖励电池:" + rewardNum; case 3 -> "任务id:" + id + ":已领取" + ",任务奖励电池:" + rewardNum;
default -> "未知状态:" + this; default -> "未知状态:" + this;
}; };

View File

@ -102,6 +102,7 @@ public class BiliBiliAppUtils {
public AppUserTask getTaskProgress() { public AppUserTask getTaskProgress() {
JSONObject task = biliUtils.http_get("https://api.live.bilibili.com/xlive/app-ucenter/v1/userTask/GetUserTaskProgress"); JSONObject task = biliUtils.http_get("https://api.live.bilibili.com/xlive/app-ucenter/v1/userTask/GetUserTaskProgress");
System.out.println("task = " + task);
assert task != null; assert task != null;
return task.getObject("data", AppUserTask.class); return task.getObject("data", AppUserTask.class);
} }