任务中心领取防抖

This commit is contained in:
2025-01-07 18:02:12 +08:00
parent 0e71a843cc
commit 3ef912482e

View File

@@ -93,7 +93,7 @@ public class TaskCenterController {
@ApiImplicitParam(name = "id", value = "任务id", dataTypeClass = Long.class),
})
@ApiOperation("App 任务中心 领取")
@Debounce(interval = 1000, value = "#userId")
@Debounce(interval = 600000, value = "#userId,#id")
public Result taskReceive(@ApiIgnore @RequestAttribute("userId") Long userId, Long id) {
return taskCenterService.taskReceive(userId, id);
}
@@ -105,7 +105,7 @@ public class TaskCenterController {
@ApiImplicitParam(name = "taskId", value = "任务id", dataTypeClass = Long.class, paramType = "body"),
@ApiImplicitParam(name = "sourceId", value = "实物(物品Id)", dataTypeClass = Long.class, paramType = "body")
})
@Debounce(interval = 1000, value = "#userId")
@Debounce(interval = 1000, value = "#userId,#record.taskId")
public Result receiveGoods(@ApiIgnore @RequestAttribute("userId") Long userId,@ApiIgnore TaskCenterRecord record) {
TaskCenter task = taskCenterService.getById(record.getTaskId());
if (Objects.isNull(task)) {