MCPcopy Create free account
hub / github.com/diyhi/bbs / addView

Method addView

src/main/java/cms/component/topic/TopicComponent.java:77–85  ·  view source on GitHub ↗

增加话题展示次数 @param topicId 话题Id @param ip IP

(Long topicId,String ip)

Source from the content-addressed store, hash-verified

75 * @param ip IP
76 */
77 public void addView(Long topicId,String ip){
78
79 Long time = new Date().getTime();
80 Long oldTime = topicCacheManager.ipRecord(topicId+"_"+ip, time);
81 if(oldTime != null && time.equals(oldTime)){
82 //增加
83 countMap.incrementAndGet(topicId);
84 }
85 }
86
87 /**
88 * 读取话题本地展示次数

Callers 2

getQuestionDetailMethod · 0.45
getTopicDetailMethod · 0.45

Calls 2

ipRecordMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected