zhijiezhao vor 2 Jahren
Ursprung
Commit
bc4e26bb51

+ 6 - 0
pom.xml

@@ -139,6 +139,12 @@
             <version>1.11.2</version>
         </dependency>
 
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+            <version>3.3.2</version>
+        </dependency>
+
     </dependencies>
 
 

+ 5 - 3
src/main/java/com/caimei/www/service/page/impl/SinglePageServiceImpl.java

@@ -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;
@@ -49,8 +51,8 @@ public class SinglePageServiceImpl implements SinglePageService {
         }
         PageContent pageContent = singlePageDao.getFreePageById(id);
         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("");