From d73687bc6115007145b4aab050e4e29ff87fd8ae Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期一, 01 三月 2021 18:44:36 +0800
Subject: [PATCH] 布丸代码优化

---
 src/main/java/com/yeshi/buwan/service/imp/StarService.java |   34 +++++-----------------------------
 1 files changed, 5 insertions(+), 29 deletions(-)

diff --git a/src/main/java/com/yeshi/buwan/service/imp/StarService.java b/src/main/java/com/yeshi/buwan/service/imp/StarService.java
index 65d56a5..5f03467 100644
--- a/src/main/java/com/yeshi/buwan/service/imp/StarService.java
+++ b/src/main/java/com/yeshi/buwan/service/imp/StarService.java
@@ -47,30 +47,6 @@
     @Resource
     private VideoResourceMapExtraInfoService videoResourceMapExtraInfoService;
 
-    public SuperHotStarDao getSuperHotStarDao() {
-        return superHotStarDao;
-    }
-
-    public void setSuperHotStarDao(SuperHotStarDao superHotStarDao) {
-        this.superHotStarDao = superHotStarDao;
-    }
-
-    public VideoInfoDao getVideoInfoDao() {
-        return videoInfoDao;
-    }
-
-    public void setVideoInfoDao(VideoInfoDao videoInfoDao) {
-        this.videoInfoDao = videoInfoDao;
-    }
-
-    public HotStarDao getHotStarDao() {
-        return hotStarDao;
-    }
-
-    public void setHotStarDao(HotStarDao hotStarDao) {
-        this.hotStarDao = hotStarDao;
-    }
-
     public StarService() {
 
     }
@@ -239,18 +215,18 @@
     }
 
     @SuppressWarnings("unchecked")
-    public List<HotStarAdmin> getHotStarAdmin(String key, int detailSystem, int page) {
+    public List<HotStarAdmin> getHotStarAdmin(String key, String systemId, int detailSystem, int page) {
         key = StringUtil.isNullOrEmpty(key) ? "" : key;
         List<HotStarAdmin> zhiBoClassList = new ArrayList<>();
 
         try {
-            List<DetailSystem> detailSystemList = detailSystemDao.list("from DetailSystem");
+            List<DetailSystem> detailSystemList = detailSystemDao.list("from DetailSystem ds where ds.system.id=" + systemId);
             String sql = "";
             if (detailSystem > 0)
                 sql = "select sh.hotStar from SuperHotStar sh where  sh.detailSystem.id=" + detailSystem
                         + " and sh.hotStar.name like ?  order by  sh.hotStar.orderby desc";
             else
-                sql = "from HotStar zb where zb.name like ? order by zb.orderby desc";
+                sql = "from HotStar zb where zb.name like ? and zb.system.id=" + systemId + " order by zb.orderby desc";
 
             List<HotStar> list = hotStarDao.list(sql, (page - 1) * Constant.pageCount, Constant.pageCount,
                     new Serializable[]{"%" + key + "%"});
@@ -287,7 +263,7 @@
         return zhiBoClassList;
     }
 
-    public long getHotStarAdminCount(String key, int detailSystem) {
+    public long getHotStarAdminCount(String key, String systemId, int detailSystem) {
         key = StringUtil.isNullOrEmpty(key) ? "" : key;
 
         String sql = "";
@@ -296,7 +272,7 @@
                     + detailSystem + " and c.name like '%" + key + "%' group by zb.hotstarid) s";
         else
             sql = "select count(*) from  (select count(*) from wk_video_hotstar zb left join wk_video_hotstar c on c.id=zb.id where c.name like '%"
-                    + key + "%'  group by zb.id) s";
+                    + key + "%' and zb.system=" + systemId + "  group by zb.id) s";
 
         return hotStarDao.getCountSQL(sql);
     }

--
Gitblit v1.8.0