Skip to content

Commit

Permalink
#795 Add a read or unread label to list of popular / stock / history
Browse files Browse the repository at this point in the history
  • Loading branch information
koda-masaru committed Jul 12, 2017
1 parent 9bab2f1 commit b94ead1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ public Boundary list() throws Exception {
}

/**
* 閲覧履歴の表示
* イベント一覧
*
* @return
* @throws InvalidParamException
Expand Down Expand Up @@ -563,6 +563,7 @@ public Boundary show_history() throws InvalidParamException {
}
List<KnowledgesEntity> histories = knowledgeLogic.getKnowledges(historyIds, loginedUser);
List<StockKnowledge> stocks = knowledgeLogic.setStockInfo(histories, loginedUser);
KnowledgeLogic.get().setViewed(stocks, getLoginedUser());
setAttribute("histories", stocks);
LOG.trace("履歴取得完了");

Expand All @@ -587,6 +588,7 @@ public Boundary show_popularity() throws InvalidParamException {

List<KnowledgesEntity> list = knowledgeLogic.getPopularityKnowledges(loginedUser, 0, 20);
List<StockKnowledge> stocks = knowledgeLogic.setStockInfo(list, loginedUser);
KnowledgeLogic.get().setViewed(stocks, getLoginedUser());
setAttribute("popularities", stocks);
LOG.trace("取得完了");
// ナレッジの公開先の情報を取得
Expand Down Expand Up @@ -625,7 +627,7 @@ public Boundary stocks() throws InvalidParamException {
KnowledgeLogic knowledgeLogic = KnowledgeLogic.get();
List<KnowledgesEntity> list = knowledgeLogic.getStocks(loginedUser, offset * PAGE_LIMIT, PAGE_LIMIT, stockid);
List<StockKnowledge> stocks = knowledgeLogic.setStockInfo(list, loginedUser);
// setAttribute("stocks", list);
KnowledgeLogic.get().setViewed(stocks, getLoginedUser());
setAttribute("popularities", stocks);
LOG.trace("取得完了");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ public GenKnowledgesEntity(Long knowledgeId) {
/** タグ名称一覧 */
private String tagNames;
/** いいね件数 */
private Long likeCount;
private Long likeCount = new Long(0);
/** コメント件数 */
private Integer commentCount;
private Integer commentCount = 0;
/** 参照件数 */
private Long viewCount;
private Long viewCount = new Long(0);
/** テンプレートの種類ID */
private Integer typeId;
/** 通知ステータス */
Expand Down

0 comments on commit b94ead1

Please sign in to comment.