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

import com.seer.teach.common.dto.mq.StringDTO;
import com.seer.teach.common.enums.im.UserInfoTopiTagEnum;
import com.seer.teach.netty.im.handler.mq.ImUserInfoHandler;
import com.seer.teach.netty.im.utils.PushTimeStampUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 处理激活成功指令
 * <p>
 * 处理激活成功指令
 * </p>
 *
 * @author Captain
 * @version 1.0
 * @since 2025-07-17 10:40
 */
@Slf4j
@Component
public class UpdatePushTimeHandler implements ImUserInfoHandler<StringDTO> {
    @Override
    public void handle(StringDTO messageBody, String device) {
        PushTimeStampUtils.updateTimeStamp(messageBody.getData());
    }

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

    @Override
    public String getTag() {
        return UserInfoTopiTagEnum.UPDATE_PUSH_TIME.getTag();
    }
}
