管理员任务处理
This commit is contained in:
parent
f9c6c47f15
commit
40be2a0440
@ -179,7 +179,7 @@ public class BindInviteCodeExe {
|
|||||||
int inviteCount = incrementDailyInviteCount(inviterProfile.getId());
|
int inviteCount = incrementDailyInviteCount(inviterProfile.getId());
|
||||||
|
|
||||||
// 处理送礁1个礼物任务
|
// 处理送礁1个礼物任务
|
||||||
if (inviteCount >= 1) {
|
/*if (inviteCount >= 1) {
|
||||||
spinsUserTaskProgressService.updateTaskProgress(
|
spinsUserTaskProgressService.updateTaskProgress(
|
||||||
new SpinsTaskProgressUpdateCmd()
|
new SpinsTaskProgressUpdateCmd()
|
||||||
.setUserId(inviterProfile.getId())
|
.setUserId(inviterProfile.getId())
|
||||||
@ -196,7 +196,7 @@ public class BindInviteCodeExe {
|
|||||||
.setTaskCode("SPINS_INVITE_USER_3")
|
.setTaskCode("SPINS_INVITE_USER_3")
|
||||||
.setProgressValue(inviteCount)
|
.setProgressValue(inviteCount)
|
||||||
);
|
);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
// 关注一个用户任务
|
// 关注一个用户任务
|
||||||
taskMqMessage.sendTask(TaskApprovalEvent.builder()
|
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);
|
// consumeActivity(runningWater, isLuckyGift, luckyGiftRatio);
|
||||||
|
|
||||||
// Spins 送礼物任务
|
// Spins 送礼物任务
|
||||||
handleSpinsGiftTask(runningWater);
|
// handleSpinsGiftTask(runningWater);
|
||||||
|
|
||||||
giftGiveRunningWaterService.addLog(runningWater.getId(), "结束:礼物统计相关");
|
giftGiveRunningWaterService.addLog(runningWater.getId(), "结束:礼物统计相关");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -98,6 +98,22 @@ public class TaskListener implements MessageListener {
|
|||||||
// 处理任务-11 的逻辑 填写其他人的邀请码
|
// 处理任务-11 的逻辑 填写其他人的邀请码
|
||||||
handleTask11(eventBody);
|
handleTask11(eventBody);
|
||||||
break;
|
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:
|
default:
|
||||||
// 处理未知任务 ID 的情况
|
// 处理未知任务 ID 的情况
|
||||||
handleUnknownTask(taskId);
|
handleUnknownTask(taskId);
|
||||||
@ -124,17 +140,7 @@ public class TaskListener implements MessageListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 处理 Spins 上麦任务进度
|
// 处理 Spins 上麦任务进度
|
||||||
handleSpinsMicTask(eventBody.getUserId(), inc);
|
// 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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -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 {
|
try {
|
||||||
String MIC_TYPE = AdminTaskType.MIC_USAGE.name();
|
String MIC_TYPE = AdminTaskType.MIC_USAGE.name();
|
||||||
if (adminTaskService.isTaskCompleted(userId, MIC_TYPE, null)) {
|
if (adminTaskService.isTaskCompleted(userId, MIC_TYPE, null)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user