From 8dd45c1c726b5628dfd8cae1992a27112ebb6af6 Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Wed, 16 Mar 2022 15:23:38 +0800 Subject: [PATCH] Merge branch 'bea-back' of http://120.27.238.55:7000/r/exchange-back into bea-back --- src/main/java/com/xcong/excoin/modules/helpCenter/service/impl/HelpCenterServiceImpl.java | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/xcong/excoin/modules/helpCenter/service/impl/HelpCenterServiceImpl.java b/src/main/java/com/xcong/excoin/modules/helpCenter/service/impl/HelpCenterServiceImpl.java index 379a13f..c642d12 100644 --- a/src/main/java/com/xcong/excoin/modules/helpCenter/service/impl/HelpCenterServiceImpl.java +++ b/src/main/java/com/xcong/excoin/modules/helpCenter/service/impl/HelpCenterServiceImpl.java @@ -20,8 +20,10 @@ import com.xcong.excoin.common.entity.QueryRequest; import com.xcong.excoin.modules.helpCenter.entity.HelpCenterArticleEntity; import com.xcong.excoin.modules.helpCenter.entity.HelpCenterNoticeEntity; +import com.xcong.excoin.modules.helpCenter.entity.HelpCenterTypeEntity; import com.xcong.excoin.modules.helpCenter.mapper.HelpCenterArticleMapper; import com.xcong.excoin.modules.helpCenter.mapper.HelpCenterNoticeMapper; +import com.xcong.excoin.modules.helpCenter.mapper.HelpCenterTypeMapper; import com.xcong.excoin.modules.helpCenter.service.HelpCenterService; import cn.hutool.core.collection.CollUtil; @@ -37,6 +39,8 @@ private final HelpCenterNoticeMapper helpCenterNoticeMapper; private final HelpCenterArticleMapper helpCenterArticleMapper; + + private final HelpCenterTypeMapper helpCenterTypeMapper; @Override public IPage<HelpCenterNoticeEntity> findHelpCenterListInPage(HelpCenterNoticeEntity helpCenterNoticeEntity, @@ -160,6 +164,31 @@ } return new FebsResponse().success(); } + + @Override + public IPage<HelpCenterTypeEntity> findHelpCenterTypeListInPage(HelpCenterTypeEntity helpCenterTypeEntity, + QueryRequest request) { + Page<HelpCenterTypeEntity> page = new Page<>(request.getPageNum(), request.getPageSize()); + IPage<HelpCenterTypeEntity> helpCenterTypeEntitys = helpCenterTypeMapper.findHelpCenterTypeListInPage(page, helpCenterTypeEntity); + return helpCenterTypeEntitys; + } + + @Override + public void helpCenterTypeAdds(@Valid HelpCenterTypeEntity helpCenterTypeEntity) { + helpCenterTypeMapper.insert(helpCenterTypeEntity); + } + + @Override + public FebsResponse helpCenterTypeDelete(@NotNull(message = "{required}") Long id) { + + HelpCenterTypeEntity helpCenterTypeEntity = helpCenterTypeMapper.selectById(id); + if(ObjectUtil.isEmpty(helpCenterTypeEntity)) { + return new FebsResponse().fail().message("记录不存在"); + } + + helpCenterTypeMapper.deleteById(id); + return new FebsResponse().success(); + } -- Gitblit v1.9.1