-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
FLY的狐狸
committed
Jan 26, 2017
1 parent
52df620
commit 2d99b92
Showing
181 changed files
with
28,574 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -242,5 +242,18 @@ public Controller removeSessionAttrCache(String key) { | |
cache.remove(key + "_" + id); | ||
return this; | ||
} | ||
|
||
/** | ||
* 是否是管理员 | ||
* | ||
* 2017年1月21日 下午11:55:16 | ||
* flyfox [email protected] | ||
* @param user | ||
* @return | ||
*/ | ||
@SuppressWarnings("rawtypes") | ||
public boolean isAdmin(SessionUser user){ | ||
return user.getInt("usertype") == 1; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,11 +17,7 @@ | |
public class FrontCacheService extends BaseService { | ||
|
||
private final static String cacheName = "FrontCacheService"; | ||
/** | ||
* 目录缓存 | ||
*/ | ||
private static Cache cache = CacheManager.get(cacheName); | ||
|
||
private final static Cache cache = CacheManager.get(cacheName); | ||
/** | ||
* 更新缓存,清空 | ||
* | ||
|
@@ -179,6 +175,35 @@ public Page<TbArticle> getArticleBySiteId(Paginator paginator, int siteId) { | |
return articles; | ||
} | ||
|
||
/** | ||
* 返回对应文章列表 | ||
* | ||
* 2015年5月24日 下午10:52:05 flyfox [email protected] | ||
* | ||
* @param paginator | ||
* @param folderId | ||
* @return | ||
*/ | ||
public Page<TbArticle> getArticleByOrder(Paginator paginator, int siteId, int orderType) { | ||
String key = ("articleOrder_" + paginator.getPageNo() + "_" + paginator.getPageSize() + "_" + siteId + "_" + orderType); | ||
String fromSql = " from tb_article t " // | ||
+ " left join tb_folder tf on tf.id = t.folder_id " // | ||
+ " where " + getPublicWhere() // | ||
+ " and tf.site_id = ? "; | ||
if (orderType==1) { // 默认 | ||
fromSql +=" order by t.sort,t.create_time desc"; | ||
} else if (orderType==2){ // 最新 | ||
fromSql +=" order by t.create_time desc"; | ||
} else if (orderType==3){ // 精品 | ||
fromSql +=" order by (t.count_comment*10+t.count_view) desc"; | ||
} else if (orderType==4){ // 待回复的 | ||
fromSql +=" and t.count_comment = 0 order by t.create_time desc"; | ||
} | ||
// 推荐文章列表 | ||
Page<TbArticle> articles = TbArticle.dao.paginateCache(cacheName, key, paginator, "select t.* ", fromSql, siteId); | ||
return articles; | ||
} | ||
|
||
/** | ||
* 返回对应文章列表 | ||
* | ||
|
@@ -278,4 +303,4 @@ public String getPublicWhere() { | |
+ " and t.type in (11,12) " // 查询状态为显示,类型是预览和正常的文章 | ||
; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,6 +138,21 @@ public Page<TbArticle> articlePageTop(int pageNo, int pageSize, int siteId) { | |
public Page<TbArticle> articlePageSite(int pageNo, int pageSize, int siteId) { | ||
return service.getArticleBySiteId(new Paginator(pageNo, pageSize), siteId); | ||
} | ||
|
||
/** | ||
* 按照特定排序,返回文章列表 | ||
* | ||
* 2017年1月17日 下午5:37:16 | ||
* flyfox [email protected] | ||
* @param pageNo | ||
* @param pageSize | ||
* @param siteId | ||
* @param orderType | ||
* @return | ||
*/ | ||
public Page<TbArticle> articleOrder(int pageNo, int pageSize, int siteId, int orderType) { | ||
return service.getArticleByOrder(new Paginator(pageNo, pageSize), siteId, orderType); | ||
} | ||
|
||
/** | ||
* 返回文章列表 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+281 KB
src/main/webapp/jflyfox/project/site_thumbnail/20170113_162827_889442.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+156 Bytes
src/main/webapp/static/component/filemanager/themes/flat/images/accept.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+847 Bytes
src/main/webapp/static/component/filemanager/themes/flat/images/ajax-loader.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+94 Bytes
...bapp/static/component/filemanager/themes/flat/images/application_view_icons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+85 Bytes
...ebapp/static/component/filemanager/themes/flat/images/application_view_list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+188 Bytes
src/main/webapp/static/component/filemanager/themes/flat/images/bin_closed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+201 Bytes
...in/webapp/static/component/filemanager/themes/flat/images/bullet_arrow_down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+201 Bytes
...main/webapp/static/component/filemanager/themes/flat/images/bullet_arrow_up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+613 Bytes
src/main/webapp/static/component/filemanager/themes/flat/images/copy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+131 Bytes
src/main/webapp/static/component/filemanager/themes/flat/images/download.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+559 Bytes
src/main/webapp/static/component/filemanager/themes/flat/images/edit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+205 Bytes
src/main/webapp/static/component/filemanager/themes/flat/images/folder_add.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+301 Bytes
src/main/webapp/static/component/filemanager/themes/flat/images/house.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+691 Bytes
src/main/webapp/static/component/filemanager/themes/flat/images/info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+340 Bytes
src/main/webapp/static/component/filemanager/themes/flat/images/level-up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+197 Bytes
src/main/webapp/static/component/filemanager/themes/flat/images/move.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+388 Bytes
src/main/webapp/static/component/filemanager/themes/flat/images/parentfolder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+119 Bytes
src/main/webapp/static/component/filemanager/themes/flat/images/plus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+128 Bytes
src/main/webapp/static/component/filemanager/themes/flat/images/replace.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+290 Bytes
src/main/webapp/static/component/filemanager/themes/flat/images/reset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+215 Bytes
src/main/webapp/static/component/filemanager/themes/flat/images/tag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+134 Bytes
src/main/webapp/static/component/filemanager/themes/flat/images/upload.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.78 KB
src/main/webapp/static/component/filemanager/themes/flat/images/wait30trans.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.