新增[评论点赞]

This commit is contained in:
2018-01-10 14:09:41 +08:00
parent cb3a29991e
commit 9e59872966
7 changed files with 76 additions and 6 deletions

View File

@@ -1,5 +1,7 @@
package com.lxyer.model;
import com.jfinal.kit.Kv;
import com.jfinal.plugin.activerecord.Db;
import com.lxyer.model.base.BaseComment;
/**
@@ -18,4 +20,12 @@ public class Comment extends BaseComment<Comment> {
public Comment getDao() {
return dao;
}
/**
* 更新点赞数
* @param commentId
*/
public static void upSupportNum(Integer commentId) {
Db.update(Db.getSqlPara("comment.upSupportNum", Kv.by("commentId", commentId)));
}
}