package com.duiba.tuia.youtui.web.message.handlers;

import cn.com.duiba.tuia.activity.center.api.constant.EventKeys;
import com.duiba.tuia.youtui.web.message.AbstractMessageResultHandler;
import com.duiba.tuia.youtui.web.message.ActivityWebCacheBashHandler;
import com.duiba.tuia.youtui.web.message.RocketMqMessageListener;
import com.duiba.tuia.youtui.web.service.ActivityService;
import com.google.common.primitives.Longs;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 *
 * @author lichao 2018/4/18
 */
@Component
public class OpenBuoyHandler extends ActivityWebCacheBashHandler {

    @Autowired
    private ActivityService activityService;

    /**
     * 获取消费tag
     * getListenTag:(这里用一句话描述这个方法的作用). <br/>
     *
     * @return
     * @author zf
     * @since JDK 1.6
     */
    @Override
    public String getListenTag() {

        return EventKeys.CACHE_BUOY_ALL.getKey();
    }


    @Override
    public void consumerNative(String message) {
        activityService.refreshCache("openBuoyCache",null);
    }

}
