Commit 04bed42f authored by 刘基明's avatar 刘基明

顶置话题

parent 7b5d6e28
...@@ -23,11 +23,18 @@ public class TopicRankQo { ...@@ -23,11 +23,18 @@ public class TopicRankQo {
@ApiModelProperty(value = "讨论量") @ApiModelProperty(value = "讨论量")
private Integer disscussCount; private Integer disscussCount;
@ApiModelProperty(value = "是否置顶")
private Integer isTop;
/** /**
* TODO 热度计算算法 * TODO 热度计算算法
* @return * @return
*/ */
public Integer getRank(){ public Integer getRank(){
//顶置话题
if (isTop>0){
return Integer.MAX_VALUE;
}
return this.viewCount+this.disscussCount*3; 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