Commit 35797e5e authored by 张辰's avatar 张辰
parents 48a22737 22b440bb
......@@ -23,11 +23,18 @@ public class TopicRankQo {
@ApiModelProperty(value = "讨论量")
private Integer disscussCount;
@ApiModelProperty(value = "是否置顶")
private Integer isTop;
/**
* TODO 热度计算算法
* @return
*/
public Integer getRank(){
//顶置话题
if (isTop>0){
return Integer.MAX_VALUE;
}
return this.viewCount+this.disscussCount*3;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment