package com.fs.app.controller;

import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSON;
import com.fs.course.domain.FsCourseWatchLog;
import com.fs.course.service.IFsCourseWatchLogService;
import com.fs.course.service.impl.FsCourseWatchLogServiceImpl;
import com.fs.fastGpt.service.AiService;
import com.fs.qwHookApi.vo.QwHookMsgVO;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
@AllArgsConstructor
@RocketMQMessageListener(topic = "watchLog", consumerGroup = "watchLog-group")
public class RocketMQWatchLogService implements RocketMQListener<String> {

    @Autowired
    private IFsCourseWatchLogService fsCourseWatchLogService;
    @Override
    public void onMessage(String message) {
            fsCourseWatchLogService.addCourseWatchLogDay();
    }
}
