admin
2021-02-27 4ebe7c447e964e1b3ead12abb1d95b75faf67426
src/main/java/com/yeshi/buwan/service/imp/HomeNoticeService.java
@@ -158,16 +158,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";