Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo-1
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
solo-1
Commits
7f78e8d2
Unverified
Commit
7f78e8d2
authored
Aug 20, 2019
by
Liang Ding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐛
Fix #12856
parent
88c319c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/main/java/org/b3log/solo/repository/TagArticleRepository.java
.../java/org/b3log/solo/repository/TagArticleRepository.java
+3
-3
No files found.
src/main/java/org/b3log/solo/repository/TagArticleRepository.java
View file @
7f78e8d2
...
@@ -36,7 +36,7 @@ import java.util.List;
...
@@ -36,7 +36,7 @@ import java.util.List;
* Tag-Article repository.
* Tag-Article repository.
*
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.1.
0.0, Jun
20, 2019
* @version 1.1.
1.0, Aug
20, 2019
* @since 0.3.1
* @since 0.3.1
*/
*/
@Repository
@Repository
...
@@ -115,7 +115,7 @@ public class TagArticleRepository extends AbstractRepository {
...
@@ -115,7 +115,7 @@ public class TagArticleRepository extends AbstractRepository {
?
Latkes
.
getLocalProperty
(
"jdbc.tablePrefix"
)
+
"_"
?
Latkes
.
getLocalProperty
(
"jdbc.tablePrefix"
)
+
"_"
:
""
;
:
""
;
final
List
<
JSONObject
>
result
=
select
(
"SELECT\n"
+
final
List
<
JSONObject
>
result
=
select
(
"SELECT\n"
+
"\tcount(*) AS
c
\n"
+
"\tcount(*) AS
`C`
\n"
+
"FROM\n"
+
"FROM\n"
+
"\t"
+
tableNamePrefix
+
"tag_article AS t,\n"
+
"\t"
+
tableNamePrefix
+
"tag_article AS t,\n"
+
"\t"
+
tableNamePrefix
+
"article AS a\n"
+
"\t"
+
tableNamePrefix
+
"article AS a\n"
+
...
@@ -123,7 +123,7 @@ public class TagArticleRepository extends AbstractRepository {
...
@@ -123,7 +123,7 @@ public class TagArticleRepository extends AbstractRepository {
"\tt.article_oId = a.oId\n"
+
"\tt.article_oId = a.oId\n"
+
"AND a.articleStatus = ?\n"
+
"AND a.articleStatus = ?\n"
+
"AND t.tag_oId = ?"
,
Article
.
ARTICLE_STATUS_C_PUBLISHED
,
tagId
);
"AND t.tag_oId = ?"
,
Article
.
ARTICLE_STATUS_C_PUBLISHED
,
tagId
);
return
result
.
get
(
0
).
optInt
(
"
c
"
);
return
result
.
get
(
0
).
optInt
(
"
C
"
);
}
catch
(
final
Exception
e
)
{
}
catch
(
final
Exception
e
)
{
LOGGER
.
log
(
Level
.
ERROR
,
"Gets tag ["
+
tagId
+
"]'s published article count failed"
,
e
);
LOGGER
.
log
(
Level
.
ERROR
,
"Gets tag ["
+
tagId
+
"]'s published article count failed"
,
e
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment