package com.infoepoch.pms.agent.tool.union.care;

import com.infoepoch.pms.agent.common.utils.LogHelper;
import com.infoepoch.pms.agent.domain.care.log.CareTraceLogSupport;
import com.infoepoch.pms.agent.domain.care.model.UserProfileSummary;
import com.infoepoch.pms.agent.tool.union.care.provider.CareBusinessDataProvider;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

/**
 * 当前用户信息工具
 */
@Component
@RequiredArgsConstructor
public class CurrentUserProfileTool {

    private final CareBusinessDataProvider careBusinessDataProvider;

    /**
     * 查询当前会话绑定用户的基础画像信息。
     */
    public UserProfileSummary execute(String traceId, String sessionId) {
        LogHelper.info(this, CareTraceLogSupport.format(
                traceId,
                sessionId,
                "当前用户工具分发",
                "调用当前用户信息工具"
        ));
        return careBusinessDataProvider.getCurrentUserProfile(traceId, sessionId);
    }
}

