package com.tanpu.community.manager;
import com.tanpu.common.auth.UserHolder;
import com.tanpu.community.api.enums.VisitTypeEnum;
import com.tanpu.community.service.VisitSummaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
public class VisitSummaryManager {
@Resource
private VisitSummaryService visitSummaryService;
@Autowired
private UserHolder userHolder;
public void addTopicPageView(String topicId) {
String userId = userHolder.getUserId();
visitSummaryService.addPageView(userId, topicId, VisitTypeEnum.TOPIC_PAGE_VIEW);
}
public void addThemePageView(String themeId) {
String userId = userHolder.getUserId();
visitSummaryService.addPageView(userId, themeId, VisitTypeEnum.TOPIC_PAGE_VIEW);
}
}
-
刘基明 authored5d29373d