anderx лет назад: 7
Родитель
Сommit
4da333fabe

+ 7 - 1
src/main/java/com/goafanti/business/service/impl/JtBusinessServiceImpl.java

@@ -68,6 +68,7 @@ public class JtBusinessServiceImpl  extends BaseMybatisDao<JtBusinessProjectMapp
 		JtBusinessProjectResult j=jtBusinessProjectMapper.selectByPrimaryKeyWithModule(id,uid);
 		j.setCommentDetailResult(jtCommodityCommentMapper.selectByProjectId(id));
 		j.setTags(jtTagMapper.selectProjectTag(id));
+		if (StringUtils.isBlank(j.getAdvertisement()))j.setAdvertisement("暂无描述");
 		return j;
 	}
 
@@ -118,7 +119,12 @@ public class JtBusinessServiceImpl  extends BaseMybatisDao<JtBusinessProjectMapp
 		if(orderType!=null)params.put("orderType", orderType);
 		if(orderSort!=null)params.put("orderSort", orderSort);
 		if(StringUtils.isNotBlank(tag))params.put("tag", tag);
-		return (Pagination<JtBusinessProjectResult>)findPage("findJtBusinessProjectByPage","findJtBusinessCountByPage",params,pageNo,pageSize);
+		Pagination<JtBusinessProjectResult> pagination=(Pagination<JtBusinessProjectResult>)findPage("findJtBusinessProjectByPage","findJtBusinessCountByPage",params,pageNo,pageSize);
+		List<JtBusinessProjectResult> list =(List<JtBusinessProjectResult>) pagination.getList();
+		for (JtBusinessProjectResult j : list) {
+			if (StringUtils.isBlank(j.getAdvertisement()))j.setAdvertisement("暂无描述");
+		}
+		return pagination;
 	}
 	
 	private Map<String, Object> disposeParams(String topId, String secondId,  String name) {

+ 0 - 3
src/main/java/com/goafanti/common/model/JtBusinessProject.java

@@ -527,9 +527,6 @@ public class JtBusinessProject {
 	 * @mbg.generated  Wed Aug 01 10:34:40 CST 2018
 	 */
 	public String getAdvertisement() {
-		if (StringUtils.isBlank(advertisement)) {
-			return "暂无描述";
-		}
 		return advertisement;
 	}