package com.seer.teach.netty.im.handler.mq.impl.business;

import com.seer.teach.common.dto.mq.StringDTO;
import com.seer.teach.common.enums.MessagePushStatusEnums;
import com.seer.teach.common.enums.im.BusinessTopicTagEnum;
import com.seer.teach.netty.common.proto.MessageType;
import com.seer.teach.netty.im.handler.mq.ImBusinessHandler;
import com.seer.teach.netty.im.utils.ImUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * <p>
 *
 * </p >
 *
 * @author Captain
 * @since 2025-08-06 10:07
 */
@Slf4j
@Component
public class TestGradingHandler implements ImBusinessHandler<StringDTO> {
    @Override
    public void handle(StringDTO messageBody, String device) {
        ImUtils.pushSingleChatToDeviceWithAck(device, MessagePushStatusEnums.SUCCESS.getCode(), MessageType.MessageContentType.TEST_GRADING.getMsgContentType(), "");
    }

    @Override
    public Class<StringDTO> getType() {
        return StringDTO.class;
    }

    @Override
    public String getTag() {
        return BusinessTopicTagEnum.TEST_GRADING.getTag();
    }
}
