📄 article_sql.properties
字号:
# 添加文章
add.article = insert into ARTICLE \
(TITLE,CONTENT,CLICKS,AUTHOR,ADD_DATE,SOURCE,RELEASE_STATE,\
IS_COMMENT,IS_DEL,ACTION_ID,RESTRICT_ID,ARTICLE_CLASS_ID,SPECIAL_ID,\
PAGINATION_ID,FRAME_TEMPLET_ID,COLOR_TEMPLET_ID,KEY_WORD,\
LINK_TO_EXTERIOR,HOMEPAGE_IMAGE,SAVE_DATE,IS_ONTOP,IS_ELITE,IS_COMMEND, \
ADD_USER,SUMMARY,CURR_AUDIT_LEVEL,ID) values \
(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
# 修改文章
modify.article = update ARTICLE set \
TITLE = ? , CONTENT = ? , CLICKS = ? , AUTHOR = ? , \
SOURCE = ? , RELEASE_STATE = ? , IS_COMMENT = ? , IS_DEL = ? , \
ACTION_ID = ? , RESTRICT_ID = ? , ARTICLE_CLASS_ID = ? , SPECIAL_ID = ? , \
PAGINATION_ID = ? , FRAME_TEMPLET_ID = ? , COLOR_TEMPLET_ID = ? , KEY_WORD = ? , \
LINK_TO_EXTERIOR = ? , HOMEPAGE_IMAGE = ? , SAVE_DATE = ? , IS_ONTOP = ? , IS_ELITE = ? , \
IS_COMMEND = ? , ADD_USER = ? , SUMMARY = ? \
where ID = ?
# 更新文章计数信息
update.article.clicks = update ARTICLE set CLICKS = CLICKS + ? where ID = ?
# 删除一条数据,放入回收站
del.article.recycle.bin = \
update ARTICLE set IS_DEL = "true" where ID = ?
# 移动文章至另一栏目
move.article = \
update ARTICLE set ARTICLE_CLASS_ID = ? where ID = ?
# 固顶(解除固顶)一篇文章
ontop.article = \
update ARTICLE set IS_ONTOP = ? where ID = ?
# 推荐(解除推荐)一篇文章
commend.article = \
update ARTICLE set IS_COMMEND = ? where ID = ?
# 审核通过一篇文章
auditing.article = \
update ARTICLE set RELEASE_STATE = "immediately" where ID = ?
#更新当前文章的审核级别
auditing.article.level= \
update ARTICLE set CURR_AUDIT_LEVEL = ? where ID = ?
# 将文章从一个专题移动至另外一个专题中
move.special.article = \
update ARTICLE set SPECIAL_ID = ? where ID = ?
# 还原回收站中所有文章
resume.all.recyclebin.article = \
update ARTICLE set IS_DEL = "false" where IS_DEL = "true"
# 还原回收站中的一篇文章
resume.recyclebin.article = \
update ARTICLE set IS_DEL = "false" where ID = ?
# 清空回收站
del.all.recyclebin.article = \
delete from ARTICLE where IS_DEL = "true"
# 彻底删除回收站中的一篇文章
del.recyclebin.article = \
delete from ARTICLE where IS_DEL = "true" and ID = ?
# 彻底删除某一栏目内所有文章
del.class.article = \
delete from ARTICLE where ARTICLE_CLASS_ID = ?
# 统计某一专题的文章数
total.special.article.count = \
select count(*) as COUNT from ARTICLE \
where SPECIAL_ID = ? and IS_DEL = "false" and RELEASE_STATE = "immediately"
# 统计某一专题的文章所有点击数
total.special.article.clicks = \
select sum(CLICKS) as SUM from ARTICLE \
where SPECIAL_ID = ? and IS_DEL = "false" and RELEASE_STATE = "immediately"
# 取得某篇文章的点击数
get.article.clicks = \
select CLICKS from ARTICLE \
where ID = ?
# 取得一篇文章的栏目编号
get.article.class.id = \
select ARTICLE_CLASS_ID from ARTICLE where ID = ?
#统计所有文章数
get.article.count= select count(*) as count FROM ARTICLE where IS_DEL = 'false'
#取是专题内文章总数
get.special.article.count = select count(*) as COUNT from ARTICLE \
where SPECIAL_ID !=1 and IS_DEL = "false" \
and RELEASE_STATE = "immediately"
#更新文章的HTML保存路径 2005-12-23
set.article.htmlsavepath = \
update ARTICLE set HTML_SAVE_PATH = ? where ID = ?
#取得文章的HTML保存路径 2005-12-23
get.article.htmlsavepath = \
select HTML_SAVE_PATH from ARTICLE where ID = ?
#################################################################
# Article标签中用到的SQL
#################################################################
# 取得所有文章
get.all.article = \
select t1.* from ARTICLE AS t1 \
LEFT JOIN article_class as t2 on t1.ARTICLE_CLASS_ID = t2.ARTICLE_CLASS_ID \
WHERE t2.class_State = 1 \
order by t1.ID desc \
# 取文章:前台模式
get.article.templet = \
select t1.* FROM ARTICLE as t1 \
left join ARTICLE_CLASS as t2 on t1.ARTICLE_CLASS_ID = t2.ARTICLE_CLASS_ID \
where $WHERE order by t1.IS_ONTOP='true' DESC , $ORDER \
limit $POSITION,$COUNTER
# 取文章:管理模式
get.article.admin.templet = \
select * from \
(article t1 left join article_class t2 \
on t1.article_class_id = t2.article_class_id \
left join map_class_user t3 \
on t3.article_class_id = t2.article_class_id) \
where $WHERE order by t1.IS_ONTOP='true' DESC , $ORDER \
limit $POSITION,$COUNTER
# 取文章数:前台模式
get.article.count.templet = \
select count(*) as count FROM ARTICLE as t1 \
left join ARTICLE_CLASS as t2 on t1.ARTICLE_CLASS_ID = t2.ARTICLE_CLASS_ID \
where $WHERE
# 取文章数:管理模式
get.article.count.admin.templet = \
select count(*) as count from \
(article t1 left join article_class t2 \
on t1.article_class_id = t2.article_class_id \
left join map_class_user t3 \
on t3.article_class_id = t2.article_class_id) \
where $WHERE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -