帖子功能加入[发布/更新/评论/置顶/加精/删除]

This commit is contained in:
2018-01-09 23:16:16 +08:00
parent f2cc75b5bd
commit cb3a29991e
20 changed files with 376 additions and 67 deletions

View File

@@ -7,5 +7,15 @@ import com.lxyer.model.base.BaseActLog;
*/
@SuppressWarnings("serial")
public class ActLog extends BaseActLog<ActLog> {
public static ActLog dao = new ActLog().dao();
@Override
public String sqlSpace() {
return "actLog";
}
@Override
public ActLog getDao() {
return dao;
}
}

View File

@@ -7,5 +7,15 @@ import com.lxyer.model.base.BaseComment;
*/
@SuppressWarnings("serial")
public class Comment extends BaseComment<Comment> {
public static final Comment dao = new Comment().dao();
@Override
public String sqlSpace() {
return "comment";
}
@Override
public Comment getDao() {
return dao;
}
}

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.BaseContent;
/**
@@ -18,4 +20,8 @@ public class Content extends BaseContent<Content> {
public Content getDao() {
return dao;
}
public static void upReplyNum(int contentId){
Db.update(Db.getSqlPara("content.upReplyNum", Kv.by("contentId", contentId)));
}
}

View File

@@ -7,7 +7,7 @@ import com.jfinal.plugin.activerecord.IBean;
* Generated by JFinal, do not modify this file.
*/
@SuppressWarnings("serial")
public abstract class BaseActLog<M extends BaseActLog<M>> extends Model<M> implements IBean {
public abstract class BaseActLog<M extends BaseActLog<M>> extends Model<M> implements IBean,IModel<M> {
public void setLogid(java.lang.Integer logid) {
set("logid", logid);

View File

@@ -7,7 +7,7 @@ import com.jfinal.plugin.activerecord.IBean;
* Generated by JFinal, do not modify this file.
*/
@SuppressWarnings("serial")
public abstract class BaseComment<M extends BaseComment<M>> extends Model<M> implements IBean {
public abstract class BaseComment<M extends BaseComment<M>> extends Model<M> implements IBean,IModel<M> {
public void setCommentId(java.lang.Integer commentId) {
set("commentId", commentId);