新增B站大会员积分签到
修复B站操作前没做登陆校验的问题
This commit is contained in:
parent
5d15f24847
commit
938d3d532a
@ -3,6 +3,7 @@ package com.yutou.qqbot.bilibili;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ -12,7 +13,7 @@ public class AppUserTask {
|
||||
private long progress;
|
||||
private long target;
|
||||
private Wallet wallet;
|
||||
private List<WeekTask> weekTask;
|
||||
private List<WeekTask> weekTask = new ArrayList<>();
|
||||
private long weekTotal;
|
||||
private long weekGroup;
|
||||
private DayTask dayTask;
|
||||
@ -35,8 +36,9 @@ public class AppUserTask {
|
||||
|
||||
public String toMessageFormat() {
|
||||
return switch (getStatus()) {
|
||||
case 0 -> "不可领取,需要发送弹幕:" + getTarget() + ",进度:" + getProgress();
|
||||
case 2 -> "未领取";
|
||||
case 0 -> "不可领取,需要发送弹幕数:" + getTarget() + ",进度:" + getProgress();
|
||||
case 1 -> "进行中,需要发送弹幕数:" + getTarget() + ",进度:" + getProgress();
|
||||
case 2 -> "可领取";
|
||||
case 3 -> "已领取";
|
||||
default -> "未知状态:" + this;
|
||||
};
|
||||
@ -64,7 +66,7 @@ public class AppUserTask {
|
||||
return switch (getStatus()) {
|
||||
case 0 ->
|
||||
"任务id:" + id + ",不可领取, 进度天数:" + totalNum + ",需要天数:" + minimalDay + ",任务奖励电池:" + rewardNum;
|
||||
case 2 -> "任务id:" + id + ":未领取" + ",任务奖励电池:" + rewardNum;
|
||||
case 2 -> "任务id:" + id + ":可领取" + ",任务奖励电池:" + rewardNum;
|
||||
case 3 -> "任务id:" + id + ":已领取" + ",任务奖励电池:" + rewardNum;
|
||||
default -> "未知状态:" + this;
|
||||
};
|
||||
|
@ -102,6 +102,7 @@ public class BiliBiliAppUtils {
|
||||
|
||||
public AppUserTask getTaskProgress() {
|
||||
JSONObject task = biliUtils.http_get("https://api.live.bilibili.com/xlive/app-ucenter/v1/userTask/GetUserTaskProgress");
|
||||
System.out.println("task = " + task);
|
||||
assert task != null;
|
||||
return task.getObject("data", AppUserTask.class);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user