diff --git a/bweb/src/main/java/com/bweb/controller/CmsController.java b/bweb/src/main/java/com/bweb/controller/CmsController.java index fae860d..cef6aae 100644 --- a/bweb/src/main/java/com/bweb/controller/CmsController.java +++ b/bweb/src/main/java/com/bweb/controller/CmsController.java @@ -47,8 +47,6 @@ public class CmsController { if (body == null || body.getType() == null || StringUtils.isBlank(body.getImgUrl()) - || body.getJumpType() == null - || StringUtils.isBlank(body.getJumpUrl()) ) { throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR); } diff --git a/cweb/src/main/java/com/cweb/controller/CmsController.java b/cweb/src/main/java/com/cweb/controller/CmsController.java index 8a29974..b87cefb 100644 --- a/cweb/src/main/java/com/cweb/controller/CmsController.java +++ b/cweb/src/main/java/com/cweb/controller/CmsController.java @@ -93,11 +93,12 @@ public class CmsController { redisUtil.hset(CmsContentServiceImpl.CACHE_CMS_ONLINE, "" + type, dataList); } for (CmsContent data : dataList) { - if (CmsTypeEnum.type1.getType().equals(data.getType()) && userSession != null) { - // 用户是否阅读 - data.setExt1(""+cmsContentReadService.isRead(data.getId(), userSession.getUser().getId())); + if (CmsTypeEnum.type2.getType().equals(data.getType()) && userSession != null) { + // 用户是否阅读,阅读过就不展示 + data.setExt1(""+(!cmsContentReadService.isRead(data.getId(), userSession.getUser().getId()))); } else { - data.setExt1("false"); + // 展示 + data.setExt1("true"); } } return ResponseMsgUtil.success(dataList); diff --git a/service/src/main/java/com/hfkj/sysenum/cms/CmsTypeEnum.java b/service/src/main/java/com/hfkj/sysenum/cms/CmsTypeEnum.java index 993156d..07894a6 100644 --- a/service/src/main/java/com/hfkj/sysenum/cms/CmsTypeEnum.java +++ b/service/src/main/java/com/hfkj/sysenum/cms/CmsTypeEnum.java @@ -19,7 +19,7 @@ public enum CmsTypeEnum { /** * 首页弹出框 */ - type2(1 , "首页弹出框"), + type2(2 , "首页弹出框"), ; private Integer type;