Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

删除过期任务 #818

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 0 additions & 50 deletions src/Ray.BiliBiliTool.Application/VipBigPointAppService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ public override async Task DoTaskAsync(CancellationToken cancellationToken = def

//日常任务

//浏览追番频道页10秒
taskInfo = await ViewAnimate(taskInfo);

//浏览会员购页面10秒
taskInfo = await ViewVipMall(taskInfo);

Expand Down Expand Up @@ -276,53 +273,6 @@ private async Task<VipTaskInfo> Privilege(VipTaskInfo info)
return info;
}

[TaskInterceptor("浏览追番频道页10秒", TaskLevel.Two, false)]
private async Task<VipTaskInfo> ViewAnimate(VipTaskInfo info)
{
const string moduleCode = "日常任务";
const string taskCode = "animatetab";

var code = "jp_channel";

CommonTaskItem targetTask = GetTarget(info, moduleCode, taskCode);

if (targetTask == null)
{
_logger.LogInformation("任务失效");
return info;
}

//如果状态不等于3,则做
if (targetTask.state == 3)
{
_logger.LogInformation("已完成,跳过");
return info;
}

//0需要领取
if (targetTask.state == 0)
{
_logger.LogInformation("开始领取任务");
await TryReceive(targetTask.task_code);
}

_logger.LogInformation("开始完成任务");
var re = await CompleteView(code);

//确认
if (re)
{
var infoResult = await _vipApi.GetTaskListAsync();
if (infoResult.Code != 0) throw new Exception(infoResult.ToJsonStr());
info = infoResult.Data;
targetTask = GetTarget(info, moduleCode, taskCode);

_logger.LogInformation("确认:{re}", targetTask.state == 3 && targetTask.complete_times >= 1);
}

return info;
}

[TaskInterceptor("浏览会员购页面10秒", TaskLevel.Two, false)]
private async Task<VipTaskInfo> ViewVipMall(VipTaskInfo info)
{
Expand Down