anderx 7 роки тому
батько
коміт
57f87aa20a

+ 8 - 0
src/main/java/com/goafanti/common/model/JtCollectSearch.java

@@ -1,5 +1,7 @@
 package com.goafanti.common.model;
 
+import com.goafanti.common.utils.StringUtils;
+
 public class JtCollectSearch {
     /**
      *
@@ -153,6 +155,9 @@ public class JtCollectSearch {
      * @mbg.generated Mon Sep 10 14:08:59 CST 2018
      */
     public String getKeyword() {
+    	if (StringUtils.isBlank(keyword)) {
+			return "暂无";
+		}
         return keyword;
     }
 
@@ -169,6 +174,9 @@ public class JtCollectSearch {
     }
 
 	public String getSummary() {
+		if (StringUtils.isBlank(summary)) {
+			return "暂无";
+		}
 		return summary;
 	}
 

+ 2 - 11
src/main/java/com/goafanti/common/service/GlobalSearchService.java

@@ -21,18 +21,9 @@ public class GlobalSearchService  extends BaseMybatisDao<JtCollectSearchMapper>
 		if(StringUtils.isNotBlank(name))params.put("name", name);
 		if(pageNo==null||pageNo<1)pageNo=1;
 		if(pageSize==null||pageSize<1)pageSize=10;
-		Pagination<JtCollectSearch> p=		(Pagination<JtCollectSearch>) findPage("globalSearchList", "globalSearchCount", params, pageNo,
+		return (Pagination<JtCollectSearch>) findPage("globalSearchList", "globalSearchCount", params, pageNo,
 				pageSize);
-		List<JtCollectSearch> list= (List<JtCollectSearch>) p.getList();
-		for (JtCollectSearch j : list) {
-			if (StringUtils.isBlank(j.getKeyword())) {
-				j.setKeyword("暂无");
-			}
-			if (StringUtils.isBlank(j.getSummary())) {
-				j.setSummary("暂无");
-			}
-		}
-				return p;
+		
 		
 	}