ソースを参照

政策、新闻修改

anderx 7 年 前
コミット
3be1ccec6c

+ 5 - 0
src/main/java/com/goafanti/common/bo/MyCollection.java

@@ -1,5 +1,7 @@
 package com.goafanti.common.bo;
 
+import org.apache.commons.lang3.StringUtils;
+
 public class MyCollection {
 	 	private String id; 
 		private String name;
@@ -22,6 +24,9 @@ public class MyCollection {
 			this.name = name;
 		}
 		public String getIntroduction() {
+			if (StringUtils.isBlank(introduction)) {
+				return "暂无描述";
+			}
 			return introduction;
 		}
 		public void setIntroduction(String introduction) {

+ 1 - 1
src/main/java/com/goafanti/common/mapper/NewsMapper.xml

@@ -404,7 +404,7 @@ where audit_status = 2 and p.id=#{0}
 			a.title_img as titleImg
 		from news a
 		left join district_glossory d on a.province_id=d.id
-		where a.type =98
+		where a.type =98 and audit_status=2
 		order by a.release_date desc
 		<if test="page_sql != null">
 			${page_sql}

+ 1 - 1
src/main/java/com/goafanti/common/mapper/NewsMapperExt.xml

@@ -211,7 +211,7 @@
   <select id="selectinformationDetail" resultType="com.goafanti.news.bo.NewsPortalList">
   	select id,create_time as createTime,title,title_img as titleImg,type,hot,
 summary,source,audit_status as auditStatus,release_date as releaseDate,release_status as releaseStatus
-from news where type=0
+from news where type=0 and audit_status=2
   and id= #{id,jdbcType=VARCHAR}
   </select>
 </mapper>

+ 1 - 0
src/main/java/com/goafanti/common/mapper/PolicyMapper.xml

@@ -625,6 +625,7 @@
   date_format(p.release_date,'%Y-%m-%d %H:%I:%S')as releaseDate,
   p.title_img as titleImg 
   from policy p
+  where audit_status=2
   order by p.release_date desc
   <if test="page_sql!=null">
   ${page_sql}

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

@@ -3,6 +3,8 @@ package com.goafanti.common.model;
 import java.math.BigDecimal;
 import java.util.Date;
 
+import com.goafanti.common.utils.StringUtils;
+
 public class JtBusinessProject {
 
 	/**
@@ -525,6 +527,9 @@ public class JtBusinessProject {
 	 * @mbg.generated  Wed Aug 01 10:34:40 CST 2018
 	 */
 	public String getAdvertisement() {
+		if (StringUtils.isBlank(advertisement)) {
+			return "暂无描述";
+		}
 		return advertisement;
 	}