瀏覽代碼

最新通告置顶

吴志根 3 年之前
父節點
當前提交
e591df0a00

+ 1 - 1
src/dsb/com/cnd3b/restcontroller/publicmethod/homepage/SQL/搜索_直播.sql

@@ -25,4 +25,4 @@ select t1.tliveid,
 from tlive t1
          inner join tagents t2 on t1.siteid = t2.siteid and t1.tagentsid = t2.tagentsid
 WHERE t1.siteid = $siteid$
-  and (t1.createby LIKE $keyStr$ OR t1.channelname LIKE $keyStr$)
+  and (t1.createby LIKE $keyStr$ OR t1.channelname LIKE $keyStr$ OR t2.fagentname LIKE $keyStr$ OR t1.categoryname LIKE $keyStr$)

+ 3 - 1
src/dsb/com/cnd3b/restcontroller/publicmethod/homepage/SQL/最新管理端发布的通告.sql

@@ -1,4 +1,4 @@
-SELECT t1.tnoticeid,
+SELECT top 10 t1.tnoticeid,
        t1.ftype,
        t1.ftitle,
        t1.fsummary,
@@ -20,4 +20,6 @@ FROM tnotice AS t1
 WHERE  t1.ftype = '¹Ù·½'
   AND t1.fishomepage = 1
   AND t1.fstatus = '·¢²¼'
+  AND t1.fisontop = 0
+ORDER BY t1.createdate DESC
 

+ 25 - 0
src/dsb/com/cnd3b/restcontroller/publicmethod/homepage/SQL/最新管理端发布的通告_置顶.sql

@@ -0,0 +1,25 @@
+SELECT t1.tnoticeid,
+       t1.ftype,
+       t1.ftitle,
+       t1.fsummary,
+       t1.fcontent,
+       t1.checkdate,
+       t1.fisontop,
+       t1.fbegdate,
+       t1.fenddate,
+       t1.fstatus,
+       t1.freadcount,
+       t1.checkby,
+       t1.fisagentsubuser,
+       t1.fischeckagent,
+       t1.fishomepage,
+       t1.fissingleagent,
+       t1.fisspecifiedrange,
+       t1.tenterprise_userid
+FROM tnotice AS t1
+WHERE  t1.ftype = '¹Ù·½'
+  AND t1.fishomepage = 1
+  AND t1.fstatus = '·¢²¼'
+  AND t1.fisontop = 1
+ORDER BY t1.createdate DESC
+

+ 5 - 3
src/dsb/com/cnd3b/restcontroller/publicmethod/homepage/homepage.java

@@ -179,12 +179,14 @@ public class homepage extends Controller {
      * 获取管理端发布的最新通告
      */
     public String getNewestNoticeList() {
-        SQLFactory sql = new SQLFactory(this, "最新管理端发布的通告", pageSize, pageNumber, "t1.createdate DESC");
-        Rows rows = sql.runSqlQuery();
+        SQLFactory sqlTop = new SQLFactory(this, "最新管理端发布的通告_置顶");
+        Rows rows = sqlTop.runSqlQuery();
+        SQLFactory sql = new SQLFactory(this, "最新管理端发布的通告");
+        rows.addAll(sql.runSqlQuery());
         for (Row row : rows) {
             row.put("attinfos", getAttachmentUrl("tnotice", row.getString("tnoticeid")));
         }
-        return getSucReturnObject().setDataByPaging(rows).preloading(1).toString();
+        return getSucReturnObject().setData(rows).toString();
     }
 
     /**