Ver código fonte

首页处理

Signed-off-by: anderx <312518615@qq.com>
anderx 6 anos atrás
pai
commit
bcfc280f4b

+ 2 - 2
src/main/java/com/kede/common/controller/WebpageController.java

@@ -131,7 +131,7 @@ public class WebpageController extends BaseController {
 		List<OutNews> gs2=new ArrayList<>();
 		for (int i = 0; i < list.size(); i++) {
 			list.get(i).setReleaseTimeConvert(DateUtils.formatDate(list.get(i).getReleaseTime(), AFTConstants.MMDD));
-			list.get(i).setContent(displayRestriction(list.get(i).getContent()));
+//			list.get(i).setContent(displayRestriction(list.get(i).getContent()));
 			if (i==1) {
 				gs1=list.get(i);
 			}else {
@@ -144,7 +144,7 @@ public class WebpageController extends BaseController {
 		List<OutNews>hy=(List<OutNews>) newsService.listnewsDetails(in, 3, 1).getList();
 		for (OutNews o : hy) {
 			o.setReleaseTimeConvert(DateUtils.formatDate(o.getReleaseTime(), AFTConstants.MMDD));
-			o.setContent(displayRestriction(o.getContent()));
+//			o.setContent(displayRestriction(o.getContent()));
 		}
 		modelview.addObject("hy", hy);
 		//获取战略合作16个

+ 8 - 2
src/main/java/com/kede/common/mapper/NewsMapper.xml

@@ -467,15 +467,18 @@
   	date_format(create_time,'%Y-%m-%d %H:%i:%S') as createTimeConvert,create_time createTime,  
     date_format(release_time,'%Y-%m-%d %H:%i:%S') as releaseTimeConvert ,release_time releaseTime
     from news where 1=1
-    <if test="n.id!=null">
+     <if test="n.id!=null">
     and id = #{n.id}
     </if>
     <if test="n.title!=null">
-    and title  like concat('%',#{n.title},'%')
+    and title like concat('%',#{n.title},'%') 
     </if>
     <if test="n.releaseStatus!=null">
     and release_status = #{n.releaseStatus}
     </if>
+    <if test="n.status!=null">
+    and status = #{n.status}
+    </if>
     <if test="n.type!=null">
     and type = #{n.type}
     </if>
@@ -497,6 +500,9 @@
     <if test="n.releaseStatus!=null">
     and release_status = #{n.releaseStatus}
     </if>
+    <if test="n.status!=null">
+    and status = #{n.status}
+    </if>
     <if test="n.type!=null">
     and type = #{n.type}
     </if>