
package org.lym.pom.service.impl;

import org.lym.pom.notify.event.FollowAddEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Service;

/**
 * @author lym
 */
@Service
public class FollowEventConsumer {

    // private RedisTemplate redisTemplate;

    /**
     *  1. 通知被关注人：你被关注了
     *  2. 触发被关注的自动逻辑：给粉丝发自动回复消息，促进互动
     * @param followAddEvent 关注新增事件
     */
    @EventListener(FollowAddEvent.class)
    public void onFollowAddEvent(FollowAddEvent followAddEvent) {
        notifyAuthorFollowed(followAddEvent);
        replyFans(followAddEvent);
    }


    void notifyAuthorFollowed(FollowAddEvent followAddEvent) {

    }

    private void replyFans(FollowAddEvent followAddEvent) {

    }

}