From 15cdb405c03affe797449794f1ee94e017908f90 Mon Sep 17 00:00:00 2001 From: wangxy <1481820854@qq.com> Date: Mon, 24 Mar 2025 15:11:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E9=A6=96=E9=A1=B5=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AE=A3=E4=BC=A0=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/controller/home/HomeController.java | 21 +++++++++++++++++++ .../main/resources/templates/home/base.html | 10 ++++----- .../templates/system/column/column.html | 5 +++-- 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/home/HomeController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/home/HomeController.java index 421ec63..620ac70 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/home/HomeController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/home/HomeController.java @@ -67,6 +67,9 @@ public class HomeController { //专题活动类型 public static final String WINDOW_COLUMN_TYPE = "3"; + //宣传活动类型 + public static final String XCHD_COLUMN_TYPE = "4"; + public static final String STATUS = "0"; @@ -89,6 +92,15 @@ public class HomeController { List contentList = contentService.selectSysContentHomeList(new SysContent()); mmap.put("contentList", contentList); + //宣传活动对应的栏目 + LambdaQueryWrapper qxWrapper= new LambdaQueryWrapper<>(); + qxWrapper.eq(SysColumn::getColumnType, XCHD_COLUMN_TYPE); + qxWrapper.eq(SysColumn::getColumnGrade, COLUMN_GRADE); + qxWrapper.eq(SysColumn::getStatus,STATUS); + qxWrapper.last("limit 6"); + qxWrapper.orderByAsc(SysColumn::getOrderNum); + List xchdColumns = columnService.list(qxWrapper); + mmap.put("xchdColumns", xchdColumns); //部门动态对应的栏目 LambdaQueryWrapper query= new LambdaQueryWrapper<>(); query.eq(SysColumn::getColumnType, DEPT_COLUMN_TYPE); @@ -145,6 +157,15 @@ public class HomeController { List contentList = contentService.selectSysContentHomeList(new SysContent()); mmap.put("contentList", contentList); + //宣传活动对应的栏目 + LambdaQueryWrapper qxWrapper= new LambdaQueryWrapper<>(); + qxWrapper.eq(SysColumn::getColumnType, XCHD_COLUMN_TYPE); + qxWrapper.eq(SysColumn::getColumnGrade, COLUMN_GRADE); + qxWrapper.eq(SysColumn::getStatus,STATUS); + qxWrapper.last("limit 6"); + qxWrapper.orderByAsc(SysColumn::getOrderNum); + List xchdColumns = columnService.list(qxWrapper); + mmap.put("xchdColumns", xchdColumns); //部门动态对应的栏目 LambdaQueryWrapper query= new LambdaQueryWrapper<>(); query.eq(SysColumn::getColumnType, DEPT_COLUMN_TYPE); diff --git a/ruoyi-admin/src/main/resources/templates/home/base.html b/ruoyi-admin/src/main/resources/templates/home/base.html index d905158..a029bce 100644 --- a/ruoyi-admin/src/main/resources/templates/home/base.html +++ b/ruoyi-admin/src/main/resources/templates/home/base.html @@ -53,10 +53,10 @@ -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .layui-col-md6{ - min-height: 461px; + max-height: 461px; } .layui-card{ - min-height: 461px; + max-height: 461px; } @@ -106,7 +106,7 @@ 更多+ -
+

[[${#strings.abbreviate(noticeList[0].noticeTitle,33)}]] @@ -131,10 +131,10 @@ diff --git a/ruoyi-admin/src/main/resources/templates/system/column/column.html b/ruoyi-admin/src/main/resources/templates/system/column/column.html index 86f668c..1c4b377 100644 --- a/ruoyi-admin/src/main/resources/templates/system/column/column.html +++ b/ruoyi-admin/src/main/resources/templates/system/column/column.html @@ -94,10 +94,11 @@ } else if (item.columnType == '2') { return '专题活动'; - }else{ + }else if(item.columnType == '3'){ return '兰铁视窗'; + }else{ + return '宣传图'; } - } }, {