|
@@ -6,14 +6,16 @@ import com.caimei.www.pojo.page.ImageLink;
|
|
|
import com.caimei.www.pojo.page.PageContent;
|
|
|
import com.caimei.www.service.page.SinglePageService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.http.HttpHeaders;
|
|
|
import org.springframework.http.MediaType;
|
|
|
import org.springframework.http.ZeroCopyHttpOutputMessage;
|
|
|
import org.springframework.http.server.reactive.ServerHttpResponse;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
-import org.springframework.util.StringUtils;
|
|
|
import reactor.core.publisher.Mono;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
@@ -48,9 +50,12 @@ public class SinglePageServiceImpl implements SinglePageService {
|
|
|
return null;
|
|
|
}
|
|
|
PageContent pageContent = singlePageDao.getFreePageById(id);
|
|
|
+ if (null == pageContent) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
String mobileContent = singlePageDao.findMobileContent(id);
|
|
|
- if (StringUtils.isEmpty(mobileContent)) {
|
|
|
- if (!ObjectUtils.isEmpty(pageContent.getContent())) {
|
|
|
+ if (StringUtils.isBlank(mobileContent)) {
|
|
|
+ if (StringUtils.isNotBlank(pageContent.getContent())) {
|
|
|
pageContent.setMobileContent(pageContent.getContent());
|
|
|
} else {
|
|
|
pageContent.setMobileContent("");
|