管理员任务处理
This commit is contained in:
parent
f9c6c47f15
commit
40be2a0440
@ -179,7 +179,7 @@ public class BindInviteCodeExe {
|
||||
int inviteCount = incrementDailyInviteCount(inviterProfile.getId());
|
||||
|
||||
// 处理送礁1个礼物任务
|
||||
if (inviteCount >= 1) {
|
||||
/*if (inviteCount >= 1) {
|
||||
spinsUserTaskProgressService.updateTaskProgress(
|
||||
new SpinsTaskProgressUpdateCmd()
|
||||
.setUserId(inviterProfile.getId())
|
||||
@ -196,7 +196,7 @@ public class BindInviteCodeExe {
|
||||
.setTaskCode("SPINS_INVITE_USER_3")
|
||||
.setProgressValue(inviteCount)
|
||||
);
|
||||
}
|
||||
}*/
|
||||
|
||||
// 关注一个用户任务
|
||||
taskMqMessage.sendTask(TaskApprovalEvent.builder()
|
||||
|
||||
@ -250,25 +250,18 @@ public class GiftCountStrategy implements GiftStrategy {
|
||||
|
||||
});
|
||||
|
||||
// 守护贡献
|
||||
userGuardCountService.incrLasts15Days(runningWater.getUserId(),
|
||||
runningWater.getAcceptUsers().stream()
|
||||
.map(GiftAcceptUser::getAcceptUserId)
|
||||
.toList(),
|
||||
giftValueCount.longValue()
|
||||
);
|
||||
|
||||
// 家族
|
||||
processFamily(runningWater, isLuckyGift, luckyGiftRatio);
|
||||
// processFamily(runningWater, isLuckyGift, luckyGiftRatio);
|
||||
|
||||
// 处理关系卡
|
||||
processUserFriendCard(runningWater, isLuckyGift, luckyGiftRatio);
|
||||
// processUserFriendCard(runningWater, isLuckyGift, luckyGiftRatio);
|
||||
|
||||
// 累计活动
|
||||
// consumeActivity(runningWater, isLuckyGift, luckyGiftRatio);
|
||||
|
||||
// Spins 送礼物任务
|
||||
handleSpinsGiftTask(runningWater);
|
||||
// handleSpinsGiftTask(runningWater);
|
||||
|
||||
giftGiveRunningWaterService.addLog(runningWater.getId(), "结束:礼物统计相关");
|
||||
}
|
||||
|
||||
@ -98,6 +98,22 @@ public class TaskListener implements MessageListener {
|
||||
// 处理任务-11 的逻辑 填写其他人的邀请码
|
||||
handleTask11(eventBody);
|
||||
break;
|
||||
case 12:
|
||||
// 处理任务-12 的逻辑 管理员任务 - 麦克风使用时长
|
||||
handleAdminMicUsageTask(eventBody);
|
||||
break;
|
||||
case 13:
|
||||
// 处理任务-12 的逻辑 管理员任务 - 新绑定 BD Leader
|
||||
handleAdminNewBdLeaderTask(eventBody.getUserId());
|
||||
break;
|
||||
case 14:
|
||||
// 处理任务-11 的逻辑 管理员任务 - 新绑定 BD
|
||||
handleAdminNewBdTask(eventBody.getUserId());
|
||||
break;
|
||||
case 15:
|
||||
// 处理任务-11 的逻辑 管理员任务 - 新绑定代理
|
||||
handleAdminNewAgencyTask(eventBody.getUserId());
|
||||
break;
|
||||
default:
|
||||
// 处理未知任务 ID 的情况
|
||||
handleUnknownTask(taskId);
|
||||
@ -124,17 +140,7 @@ public class TaskListener implements MessageListener {
|
||||
}
|
||||
|
||||
// 处理 Spins 上麦任务进度
|
||||
handleSpinsMicTask(eventBody.getUserId(), inc);
|
||||
|
||||
// 处理管理员麦克风使用时长任务(每次心跳 = 1分钟,累积60次 = 1小时)
|
||||
if (StringUtils.isNotEmpty(inc)) {
|
||||
int micMinutes = Integer.parseInt(inc);
|
||||
// 每60分钟算一次更新
|
||||
if (micMinutes % 60 == 0) {
|
||||
int micHours = micMinutes / 60;
|
||||
handleAdminMicUsageTask(eventBody.getUserId(), 1);
|
||||
}
|
||||
}
|
||||
// handleSpinsMicTask(eventBody.getUserId(), inc);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -365,7 +371,10 @@ public class TaskListener implements MessageListener {
|
||||
/**
|
||||
* 处理管理员任务 - 麦克风使用时长
|
||||
*/
|
||||
private void handleAdminMicUsageTask(Long userId, int micHours) {
|
||||
private void handleAdminMicUsageTask(TaskApprovalEvent eventBody) {
|
||||
Long userId = eventBody.getUserId();
|
||||
int micHours = 0;
|
||||
|
||||
try {
|
||||
String MIC_TYPE = AdminTaskType.MIC_USAGE.name();
|
||||
if (adminTaskService.isTaskCompleted(userId, MIC_TYPE, null)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user