From f537abe9f3646c739beaf15076246a2f71a347e9 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期四, 20 二月 2025 16:57:55 +0800
Subject: [PATCH] IOS广告增加区域屏蔽

---
 src/main/java/com/yeshi/buwan/service/imp/HomeNoticeService.java |   42 +++++++++---------------------------------
 1 files changed, 9 insertions(+), 33 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 9a0cc5f..8ccbe9b 100644
--- a/src/main/java/com/yeshi/buwan/service/imp/HomeNoticeService.java
+++ b/src/main/java/com/yeshi/buwan/service/imp/HomeNoticeService.java
@@ -16,11 +16,11 @@
 import com.yeshi.buwan.dao.HomeNoticeDao;
 import com.yeshi.buwan.dao.SuperHomeNoticeDao;
 import com.yeshi.buwan.dao.VideoInfoDao;
-import com.yeshi.buwan.domain.DetailSystem;
+import com.yeshi.buwan.domain.system.DetailSystem;
 import com.yeshi.buwan.domain.HomeNotice;
 import com.yeshi.buwan.domain.HomeType;
 import com.yeshi.buwan.domain.SuperHomeNotice;
-import com.yeshi.buwan.domain.SystemInfo;
+import com.yeshi.buwan.domain.system.SystemInfo;
 import com.yeshi.buwan.domain.web.DetailSystemSelect;
 import com.yeshi.buwan.domain.web.HomeNoticeAdmin;
 import com.yeshi.buwan.util.Constant;
@@ -33,30 +33,6 @@
 	private VideoInfoDao videoInfoDao;
 	@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) {
@@ -112,7 +88,7 @@
 	}
 
 	public List<HomeType> getIOSTestHomeType() {
-		List<HomeType> list = new ArrayList<HomeType>();
+		List<HomeType> list = new ArrayList<>();
 		HomeType type = new HomeType();
 		type.setId("130");
 		type.setName("钀屽疇濂囪叮");
@@ -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<HomeNoticeAdmin>();
+				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";
@@ -179,7 +155,7 @@
 								.createQuery("select vb.detailSystem from SuperHomeNotice vb where vb.homeNotice.id=?")
 								.setParameter(0, vb.getId()).list();
 
-						List<DetailSystemSelect> dssList = new ArrayList<DetailSystemSelect>();
+						List<DetailSystemSelect> dssList = new ArrayList<>();
 
 						for (DetailSystem ds : detailSystemList) {
 							DetailSystemSelect dss = new DetailSystemSelect();

--
Gitblit v1.8.0