From fd41cee17828aadbf92943369191e406b8495335 Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Sun, 9 Oct 2022 10:44:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8C=BA=E5=9F=9F=E5=85=AC?= =?UTF-8?q?=E5=8F=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/cweb/controller/CmsContentController.java | 5 ++++- hai-service/src/main/java/com/hai/entity/CmsCategory.java | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hai-cweb/src/main/java/com/cweb/controller/CmsContentController.java b/hai-cweb/src/main/java/com/cweb/controller/CmsContentController.java index 2b865ad1..fe783705 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/CmsContentController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/CmsContentController.java @@ -69,7 +69,7 @@ public class CmsContentController { for (CmsCategory cmsCategory : categoryList) { JSONObject object = new JSONObject(); // 1.小图一行四个 2.轮播图 3.消息通知 4.大图展示 5.一横图三小图 6.数据库数据 7.小图一行五个 - if (cmsCategory.getType() == 1 || cmsCategory.getType() == 2 || cmsCategory.getType() == 4 || cmsCategory.getType() == 5|| cmsCategory.getType() == 7 ) { + if (cmsCategory.getType() == 1 || cmsCategory.getType() == 2 || cmsCategory.getType() == 4 || cmsCategory.getType() == 5|| cmsCategory.getType() == 7 || cmsCategory.getType() == 8 ) { object.put("type" , cmsCategory.getType()); object.put("name" , cmsCategory.getName()); object.put("sort" , cmsCategory.getSort()); @@ -80,6 +80,9 @@ public class CmsContentController { object.put("name" , cmsCategory.getName()); object.put("sort" , cmsCategory.getSort()); object.put("code" , cmsCategory.getCode()); + List cmsContent = cmsContentService.getListCmsContentByCategoryId(cmsCategory.getId() , companyId , platform); + object.put("jumpType" , cmsContent.get(0).getJumpType()); + object.put("jumpUrl" , cmsContent.get(0).getJumpUrl()); object.put("childDate" , cmsContentConfig.getCmsContentData(cmsCategory.getName() , companyId)); } else if(cmsCategory.getType() == 3) { object.put("type" , cmsCategory.getType()); diff --git a/hai-service/src/main/java/com/hai/entity/CmsCategory.java b/hai-service/src/main/java/com/hai/entity/CmsCategory.java index 5e37a56c..ca23e784 100644 --- a/hai-service/src/main/java/com/hai/entity/CmsCategory.java +++ b/hai-service/src/main/java/com/hai/entity/CmsCategory.java @@ -18,7 +18,7 @@ public class CmsCategory implements Serializable { private Long id; /** - * 类型: // 1.小图一行四个 2.轮播图 3.消息通知 4.大图展示 5.一横图三小图 6.数据库数据 7.小图一行五个 + * 类型: // 1.小图一行四个 2.轮播图 3.消息通知 4.大图展示 5.一横图三小图 6.数据库数据 7.小图一行五个 8 首页背景图 */ private Integer type;