pull/296/head
ruibaby 2019-09-03 10:11:25 +08:00
parent c30f107a96
commit 3d280de545
6 changed files with 14 additions and 42 deletions

View File

@ -62,7 +62,7 @@ public class PostParam implements InputConverter<Post> {
@Override
public Post convertTo() {
if (StringUtils.isBlank(url)) {
url = title;
url = title.replace(".","");
}
if (null == thumbnail) {
thumbnail = "";
@ -80,7 +80,7 @@ public class PostParam implements InputConverter<Post> {
@Override
public void update(Post post) {
if (StringUtils.isBlank(url)) {
url = title;
url = title.replace(".","");
}
if (null == thumbnail) {
thumbnail = "";

View File

@ -53,13 +53,9 @@ public class SheetParam implements InputConverter<Sheet> {
@Override
public Sheet convertTo() {
if (StringUtils.isBlank(url)) {
url = HaloUtils.normalizeUrl(title);
} else {
url = HaloUtils.normalizeUrl(url);
url = title.replace(".","");
}
url = HaloUtils.initializeUrlIfBlank(url);
if (null == thumbnail) {
thumbnail = "";
}
@ -76,13 +72,9 @@ public class SheetParam implements InputConverter<Sheet> {
@Override
public void update(Sheet sheet) {
if (StringUtils.isBlank(url)) {
url = HaloUtils.normalizeUrl(title);
} else {
url = HaloUtils.normalizeUrl(url);
url = title.replace(".","");
}
url = HaloUtils.initializeUrlIfBlank(url);
if (null == thumbnail) {
thumbnail = "";
}

View File

@ -194,7 +194,7 @@ public class AdminServiceImpl implements AdminService {
@Override
public StatisticDTO getCount() {
StatisticDTO statisticDTO = new StatisticDTO();
statisticDTO.setPostCount(postService.countByStatus(PostStatus.PUBLISHED));
statisticDTO.setPostCount(postService.countByStatus(PostStatus.PUBLISHED) + sheetService.countByStatus(PostStatus.PUBLISHED));
statisticDTO.setAttachmentCount(attachmentService.count());
// Handle comment count

View File

@ -1,16 +1,8 @@
server:
port: 8090
use-forward-headers: true
undertow:
io-threads: 2
worker-threads: 36
buffer-size: 1024
directBuffers: true
servlet:
session:
timeout: 86400s
compression:
enabled: true
enabled: false
mime-types: application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain
spring:
jackson:
@ -48,7 +40,9 @@ spring:
multipart:
max-file-size: 10240MB
max-request-size: 10240MB
mvc:
favicon:
enabled: false
cache:
type: none
logging:

View File

@ -1,16 +1,8 @@
server:
port: 8090
use-forward-headers: true
undertow:
io-threads: 2
worker-threads: 36
buffer-size: 1024
directBuffers: true
servlet:
session:
timeout: 86400s
compression:
enabled: true
enabled: false
mime-types: application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain
spring:
jackson:
@ -47,7 +39,9 @@ spring:
multipart:
max-file-size: 10MB
max-request-size: 10MB
mvc:
favicon:
enabled: false
cache:
type: none
logging:

View File

@ -1,16 +1,8 @@
server:
port: 8090
use-forward-headers: true
undertow:
io-threads: 2
worker-threads: 36
buffer-size: 1024
directBuffers: true
servlet:
session:
timeout: 86400s
compression:
enabled: true
enabled: false
mime-types: application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain
spring:
jackson: