From 45bae40260aa5468c94501842856ff50c4fad98f Mon Sep 17 00:00:00 2001 From: LiuY <1622779752@qq.com> Date: Wed, 11 Oct 2023 09:57:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../noticeconfig/NoticeConfigAppController.java | 17 ++++++++++++++++- .../noticeconfig/INoticeConfigService.java | 10 +++++++++- .../impl/NoticeConfigServiceImpl.java | 10 +++++++++- .../noticeconfig/notice-config-mapper.xml | 5 ++++- 4 files changed, 38 insertions(+), 4 deletions(-) diff --git a/module-notice/src/main/java/cn/com/tenlion/notice/controller/app/api/noticeconfig/NoticeConfigAppController.java b/module-notice/src/main/java/cn/com/tenlion/notice/controller/app/api/noticeconfig/NoticeConfigAppController.java index 0f37c4a..75680d6 100644 --- a/module-notice/src/main/java/cn/com/tenlion/notice/controller/app/api/noticeconfig/NoticeConfigAppController.java +++ b/module-notice/src/main/java/cn/com/tenlion/notice/controller/app/api/noticeconfig/NoticeConfigAppController.java @@ -33,6 +33,20 @@ public class NoticeConfigAppController extends DefaultBaseController { @Autowired private INoticeConfigService noticeConfigService; + + @ApiOperation(value = "菜单显示的栏目配置列表", notes = "菜单显示的栏目配置列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listswitchview") + public List listSwitchView(@RequestHeader("token") String token) { + Map params = requestParams(); + return noticeConfigService.listSwitchView(params); + } + + + @ApiOperation(value = "新增通知公告配置", notes = "新增通知公告配置接口") @ApiImplicitParams({ @ApiImplicitParam(name = "token", value = "token", paramType = "header") @@ -92,6 +106,7 @@ public class NoticeConfigAppController extends DefaultBaseController { return noticeConfigService.list(params); } + @ApiOperation(value = "通知公告配置分页列表", notes = "通知公告配置分页列表接口") @ApiImplicitParams({ @ApiImplicitParam(name = "token", value = "token", paramType = "header"), @@ -117,4 +132,4 @@ public class NoticeConfigAppController extends DefaultBaseController { return new SuccessResultData<>(noticeConfigService.count(params)); } -} \ No newline at end of file +} diff --git a/module-notice/src/main/java/cn/com/tenlion/notice/service/noticeconfig/INoticeConfigService.java b/module-notice/src/main/java/cn/com/tenlion/notice/service/noticeconfig/INoticeConfigService.java index 83d582a..e37d6be 100644 --- a/module-notice/src/main/java/cn/com/tenlion/notice/service/noticeconfig/INoticeConfigService.java +++ b/module-notice/src/main/java/cn/com/tenlion/notice/service/noticeconfig/INoticeConfigService.java @@ -19,6 +19,14 @@ import java.util.Map; **/ public interface INoticeConfigService { + + /** + * 菜单显示的新闻栏目 + * @param params + * @return + */ + List listSwitchView(Map params); + void updateMenu(String noticeConfigId, String parentMenuId,String managerMenuId, String viewMenuId, String checkMenuId); NoticeConfigMenuDTO getMenu(String noticeConfigId); @@ -189,4 +197,4 @@ public interface INoticeConfigService { */ Integer count(Map params); -} \ No newline at end of file +} diff --git a/module-notice/src/main/java/cn/com/tenlion/notice/service/noticeconfig/impl/NoticeConfigServiceImpl.java b/module-notice/src/main/java/cn/com/tenlion/notice/service/noticeconfig/impl/NoticeConfigServiceImpl.java index 1dae753..c5e664c 100644 --- a/module-notice/src/main/java/cn/com/tenlion/notice/service/noticeconfig/impl/NoticeConfigServiceImpl.java +++ b/module-notice/src/main/java/cn/com/tenlion/notice/service/noticeconfig/impl/NoticeConfigServiceImpl.java @@ -45,6 +45,14 @@ public class NoticeConfigServiceImpl extends DefaultBaseService implements INoti @Autowired private IMenuBaseService iMenuBaseService; + + public List listSwitchView(Map params){ + params.put("configSwitch","1"); + return this.list(params); + } + + + @Override public void save(NoticeConfigVO noticeConfigVO) { saveReturnId(noticeConfigVO); @@ -320,4 +328,4 @@ public class NoticeConfigServiceImpl extends DefaultBaseService implements INoti return count == null ? 0 : count; } -} \ No newline at end of file +} diff --git a/module-notice/src/main/resources/mybatis/mapper/noticeconfig/notice-config-mapper.xml b/module-notice/src/main/resources/mybatis/mapper/noticeconfig/notice-config-mapper.xml index 066f2c6..f3c659b 100644 --- a/module-notice/src/main/resources/mybatis/mapper/noticeconfig/notice-config-mapper.xml +++ b/module-notice/src/main/resources/mybatis/mapper/noticeconfig/notice-config-mapper.xml @@ -396,6 +396,9 @@ #{noticeConfigIds[${index}]} + + AND t1.config_switch = #{configSwitch} + ORDER BY t1.config_order @@ -503,4 +506,4 @@ t1.is_delete = 0 - \ No newline at end of file +