Skip to content

Commit

Permalink
🐛 fixed admin articles list error
Browse files Browse the repository at this point in the history
  • Loading branch information
hellokaton committed Jun 12, 2018
1 parent 6e42b40 commit e2c4a1b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 34 deletions.
3 changes: 3 additions & 0 deletions package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

mvn clean package -Pprod -Dmaven.test.skip=true
5 changes: 2 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

<groupId>io.github.otale</groupId>
<artifactId>tale</artifactId>
<version>least</version>
<version>letast</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sqlite.version>3.21.0.1</sqlite.version>
<blade-mvc.version>2.0.8-R3</blade-mvc.version>
<blade-mvc.version>2.0.8-SNAPSHOT</blade-mvc.version>
<anima.version>0.2.3-SNAPSHOT</anima.version>
<blade-tpl.verion>0.1.3</blade-tpl.verion>
<blade-validator>0.0.2</blade-validator>
Expand Down Expand Up @@ -205,7 +205,6 @@
<addClasspath>true</addClasspath>
</manifest>
<manifestEntries>
<!-- 在Class-Path下添加配置文件的路径 -->
<Class-Path>resources/</Class-Path>
</manifestEntries>
</archive>
Expand Down
29 changes: 0 additions & 29 deletions src/main/java/com/tale/bootstrap/ExceptionHandler.java

This file was deleted.

6 changes: 4 additions & 2 deletions src/main/java/com/tale/service/ContentsService.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public Page<Contents> getArticles(Integer mid, int page, int limit) {
}

public Page<Contents> findArticles(ArticleParam articleParam) {
AnimaQuery<Contents> query = select().from(Contents.class);
AnimaQuery<Contents> query = select().from(Contents.class).exclude(Contents::getContent);

if (StringKit.isNotEmpty(articleParam.getStatus())) {
query.and(Contents::getStatus, articleParam.getStatus());
Expand All @@ -160,7 +160,9 @@ private Contents mapContent(Contents contents) {
} else {
contents.setUrl("/article/" + contents.getCid());
}
contents.setContent(contents.getContent().replaceAll("\\\\\"", "\\\""));
if (StringKit.isNotEmpty(contents.getContent())) {
contents.setContent(contents.getContent().replaceAll("\\\\\"", "\\\""));
}
return contents;
}
}

0 comments on commit e2c4a1b

Please sign in to comment.