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;