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

import com.red.circle.other.app.command.SpinsTaskProgressUpdateExe;
import com.red.circle.other.app.dto.cmd.SpinsTaskProgressUpdateCmd;
import com.red.circle.other.app.service.SpinsUserTaskProgressService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * Spins用户任务进度服务实现
 *
 * @author system
 * @date 2025-01-21
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class SpinsUserTaskProgressServiceImpl implements SpinsUserTaskProgressService {

    private final SpinsTaskProgressUpdateExe spinsTaskProgressUpdateExe;

    @Override
    public void updateTaskProgress(SpinsTaskProgressUpdateCmd cmd) {
        log.info("更新用户任务进度, userId={}, taskCode={}, progressValue={}", 
                cmd.getUserId(), cmd.getTaskCode(), cmd.getProgressValue());
        spinsTaskProgressUpdateExe.execute(cmd);
    }

}
