-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #319 from support-project/develop
Develop
- Loading branch information
Showing
7 changed files
with
85 additions
and
56 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
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
10 changes: 3 additions & 7 deletions
10
...ain/resources/org/support/project/knowledge/dao/sql/ExUsersDao/selectAccountInfoOnKey.sql
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 |
---|---|---|
@@ -1,14 +1,10 @@ | ||
SELECT | ||
USERS.USER_ID, USERS.USER_KEY, USERS.USER_NAME, | ||
COUNT(KNOWLEDGES.KNOWLEDGE_ID) AS KNOWLEDGE_COUNT, | ||
COUNT(LIKES.NO) AS LIKE_COUNT, | ||
COUNT(STOCK_KNOWLEDGES.STOCK_ID) AS STOCK_COUNT | ||
COUNT(KNOWLEDGES.KNOWLEDGE_ID) AS KNOWLEDGE_COUNT | ||
FROM | ||
USERS | ||
LEFT OUTER JOIN KNOWLEDGES ON KNOWLEDGES.INSERT_USER = USERS.USER_ID | ||
LEFT OUTER JOIN LIKES ON LIKES.KNOWLEDGE_ID = KNOWLEDGES.KNOWLEDGE_ID | ||
LEFT OUTER JOIN STOCK_KNOWLEDGES ON STOCK_KNOWLEDGES.KNOWLEDGE_ID = KNOWLEDGES.KNOWLEDGE_ID | ||
LEFT OUTER JOIN KNOWLEDGES ON (KNOWLEDGES.INSERT_USER = USERS.USER_ID AND KNOWLEDGES.DELETE_FLAG = 0) | ||
WHERE | ||
USERS.USER_ID = ? | ||
AND USERS.DELETE_FLAG = 0 | ||
GROUP BY USERS.USER_ID | ||
GROUP BY USERS.USER_ID, USERS.USER_KEY, USERS.USER_NAME |
9 changes: 9 additions & 0 deletions
9
...n/resources/org/support/project/knowledge/dao/sql/ExUsersDao/selectLikeCountOnAccount.sql
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
SELECT | ||
COUNT(LIKES.NO) AS LIKE_COUNT | ||
FROM | ||
USERS | ||
INNER JOIN KNOWLEDGES ON (KNOWLEDGES.INSERT_USER = USERS.USER_ID AND KNOWLEDGES.DELETE_FLAG = 0) | ||
INNER JOIN LIKES ON (LIKES.KNOWLEDGE_ID = KNOWLEDGES.KNOWLEDGE_ID AND LIKES.DELETE_FLAG = 0) | ||
WHERE | ||
USERS.USER_ID = ? | ||
AND USERS.DELETE_FLAG = 0 |
9 changes: 9 additions & 0 deletions
9
.../resources/org/support/project/knowledge/dao/sql/ExUsersDao/selectStockCountOnAccount.sql
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
SELECT | ||
COUNT(STOCK_KNOWLEDGES.STOCK_ID) AS STOCK_COUNT | ||
FROM | ||
USERS | ||
INNER JOIN KNOWLEDGES ON (KNOWLEDGES.INSERT_USER = USERS.USER_ID AND KNOWLEDGES.DELETE_FLAG = 0) | ||
INNER JOIN STOCK_KNOWLEDGES ON (STOCK_KNOWLEDGES.KNOWLEDGE_ID = KNOWLEDGES.KNOWLEDGE_ID AND STOCK_KNOWLEDGES.DELETE_FLAG = 0) | ||
WHERE | ||
USERS.USER_ID = ? | ||
AND USERS.DELETE_FLAG = 0 |