package com.red.circle.other.app.command.task;


import com.red.circle.other.app.dto.cmd.task.DailyTasksEventCmd;
import com.red.circle.other.infra.database.mongo.service.task.DailyTaskStorageService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 设置已完成的任务.
 *
 * @author pengliang on 2021/5/8
 */
@Slf4j
@Component
@RequiredArgsConstructor
public class VoiceTaskCompletedTaskSettingCmdExe {

  private final DailyTaskStorageService dailyTaskStorageService;

  public void execute(DailyTasksEventCmd cmd) {
    dailyTaskStorageService.changeStatusCompleted(cmd.getReqUserId(), cmd.getEventName());
  }
}
