From 4011b8d0b377af33e2bc435f7726329630d706cb Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期二, 02 三月 2021 18:28:52 +0800
Subject: [PATCH] 搜索引擎接口更新

---
 src/main/java/com/yeshi/buwan/service/imp/HomeNoticeService.java |   32 ++++----------------------------
 1 files changed, 4 insertions(+), 28 deletions(-)

diff --git a/src/main/java/com/yeshi/buwan/service/imp/HomeNoticeService.java b/src/main/java/com/yeshi/buwan/service/imp/HomeNoticeService.java
index 5524105..a83a07a 100644
--- a/src/main/java/com/yeshi/buwan/service/imp/HomeNoticeService.java
+++ b/src/main/java/com/yeshi/buwan/service/imp/HomeNoticeService.java
@@ -34,30 +34,6 @@
 	@Resource
 	private SuperHomeNoticeDao superHomeNoticeDao;
 
-	public SuperHomeNoticeDao getSuperHomeNoticeDao() {
-		return superHomeNoticeDao;
-	}
-
-	public void setSuperHomeNoticeDao(SuperHomeNoticeDao superHomeNoticeDao) {
-		this.superHomeNoticeDao = superHomeNoticeDao;
-	}
-
-	public VideoInfoDao getVideoInfoDao() {
-		return videoInfoDao;
-	}
-
-	public void setVideoInfoDao(VideoInfoDao videoInfoDao) {
-		this.videoInfoDao = videoInfoDao;
-	}
-
-	public HomeNoticeDao getHomeNoticeDao() {
-		return homeNoticeDao;
-	}
-
-	public void setHomeNoticeDao(HomeNoticeDao homeNoticeDao) {
-		this.homeNoticeDao = homeNoticeDao;
-	}
-
 	// 棣栭〉鍏憡
 	public List<HomeNotice> getHomeNoticeList(SystemInfo system) {
 		List<HomeNotice> list = homeNoticeDao
@@ -158,16 +134,16 @@
 
 	// 鍚庡彴鎿嶄綔
 	@SuppressWarnings("unchecked")
-	public List<HomeNoticeAdmin> getHomeNoticeAdmin(final String key, final int detailSystem, final int page) {
+	public List<HomeNoticeAdmin> getHomeNoticeAdmin(final String key, final SystemInfo system, final int page) {
 
 		return (List<HomeNoticeAdmin>) homeNoticeDao.excute(new HibernateCallback<List<HomeNoticeAdmin>>() {
 			public List<HomeNoticeAdmin> doInHibernate(Session session) throws HibernateException {
 				List<HomeNoticeAdmin> zhiBoClassList = new ArrayList<>();
 				try {
-					List<DetailSystem> detailSystemList = session.createQuery("from DetailSystem").list();
+					List<DetailSystem> detailSystemList = session.createQuery("from DetailSystem d where d.system.id="+system.getId()).list();
 					String sql = "";
-					if (detailSystem > 0)
-						sql = "select sh.homeNotice from SuperHomeNotice sh where  sh.detailSystem.id=" + detailSystem
+					if (system!=null)
+						sql = "select sh.homeNotice from SuperHomeNotice sh where  sh.detailSystem.system.id=" + system.getId()
 								+ " order by  sh.homeNotice.createtime desc";
 					else
 						sql = "from HomeNotice zb order by zb.createtime desc";

--
Gitblit v1.8.0