package com.sonic.frog.service.impl;

import com.sonic.frog.domain.output.ExploreInfoOutput;
import com.sonic.frog.service.AdvertiseService;
import com.sonic.frog.service.ExploreService;
import com.sonic.frog.service.RankService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class ExploreServiceImpl implements ExploreService {

    @Autowired
    private AdvertiseService advertiseService;
    @Autowired
    private RankService rankService;

    @Override
    public ExploreInfoOutput exploreInfo(Long userId) {
        ExploreInfoOutput output = new ExploreInfoOutput();
        output.setAdvertiseList(advertiseService.getAdvertiseList(userId));
        output.setAiChatRankTop3List(rankService.chatRank(userId, 3));
        output.setAiHeartbeatRankTop3List(rankService.aiHeartbeatRank(userId, 3));
        output.setAiGiftRankTop3List(rankService.giftRank(userId, 3));
        return output;
    }
}
