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

import com.seer.teach.common.dto.mq.IntegerDTO;
import com.seer.teach.common.enums.im.CommandTopicTagEnum;
import com.seer.teach.common.enums.MessagePushStatusEnums;
import com.seer.teach.netty.common.proto.MessageType;
import com.seer.teach.netty.im.handler.mq.ImCommandHandler;
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-15 17:01
 */
@Slf4j
@Component
public class GameSelectTypeHandler implements ImCommandHandler<IntegerDTO> {
    @Override
    public void handle(IntegerDTO messageBody, String device) {
        ImUtils.pushSingleChatToDeviceWithAck(device, MessagePushStatusEnums.SUCCESS.getCode(), MessageType.MessageContentType.GAME_SELECT_TYPE.getMsgContentType(), messageBody.getData());
    }

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

    @Override
    public String getTag() {
        return CommandTopicTagEnum.GAME_SELECT_TYPE.getTag();
    }
}
