diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/dept/SysPostConvert.java b/src/main/java/cn/iocoder/dashboard/modules/system/convert/dept/SysPostConvert.java index 973d87cf8..06c1a5024 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/dept/SysPostConvert.java +++ b/src/main/java/cn/iocoder/dashboard/modules/system/convert/dept/SysPostConvert.java @@ -3,9 +3,7 @@ package cn.iocoder.dashboard.modules.system.convert.dept; import cn.iocoder.dashboard.common.pojo.PageResult; import cn.iocoder.dashboard.modules.system.controller.dept.vo.post.*; import cn.iocoder.dashboard.modules.system.dal.mysql.dataobject.dept.SysPostDO; -import com.baomidou.mybatisplus.core.metadata.IPage; import org.mapstruct.Mapper; -import org.mapstruct.Mapping; import org.mapstruct.factory.Mappers; import java.util.List; @@ -21,9 +19,6 @@ public interface SysPostConvert { SysPostRespVO convert(SysPostDO id); - @Mapping(source = "records", target = "list") - PageResult convertPage02(IPage page); - SysPostDO convert(SysPostCreateReqVO bean); SysPostDO convert(SysPostUpdateReqVO reqVO); diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/dict/SysDictDataConvert.java b/src/main/java/cn/iocoder/dashboard/modules/system/convert/dict/SysDictDataConvert.java index e10abcb7b..bd532ed71 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/dict/SysDictDataConvert.java +++ b/src/main/java/cn/iocoder/dashboard/modules/system/convert/dict/SysDictDataConvert.java @@ -3,9 +3,7 @@ package cn.iocoder.dashboard.modules.system.convert.dict; import cn.iocoder.dashboard.common.pojo.PageResult; import cn.iocoder.dashboard.modules.system.controller.dict.vo.data.*; import cn.iocoder.dashboard.modules.system.dal.mysql.dataobject.dict.SysDictDataDO; -import com.baomidou.mybatisplus.core.metadata.IPage; import org.mapstruct.Mapper; -import org.mapstruct.Mapping; import org.mapstruct.factory.Mappers; import java.util.List; @@ -25,9 +23,6 @@ public interface SysDictDataConvert { SysDictDataDO convert(SysDictDataCreateReqVO bean); - @Mapping(source = "records", target = "list") - PageResult convertPage02(IPage page); - List convertList02(List bean); } diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/dict/SysDictTypeConvert.java b/src/main/java/cn/iocoder/dashboard/modules/system/convert/dict/SysDictTypeConvert.java index b4fa65aee..5fd448f04 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/dict/SysDictTypeConvert.java +++ b/src/main/java/cn/iocoder/dashboard/modules/system/convert/dict/SysDictTypeConvert.java @@ -3,9 +3,7 @@ package cn.iocoder.dashboard.modules.system.convert.dict; import cn.iocoder.dashboard.common.pojo.PageResult; import cn.iocoder.dashboard.modules.system.controller.dict.vo.type.*; import cn.iocoder.dashboard.modules.system.dal.mysql.dataobject.dict.SysDictTypeDO; -import com.baomidou.mybatisplus.core.metadata.IPage; import org.mapstruct.Mapper; -import org.mapstruct.Mapping; import org.mapstruct.factory.Mappers; import java.util.List; @@ -19,9 +17,6 @@ public interface SysDictTypeConvert { SysDictTypeRespVO convert(SysDictTypeDO bean); - @Mapping(source = "records", target = "list") - PageResult convertPage02(IPage page); - SysDictTypeDO convert(SysDictTypeCreateReqVO bean); SysDictTypeDO convert(SysDictTypeUpdateReqVO bean); diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/notice/SysNoticeConvert.java b/src/main/java/cn/iocoder/dashboard/modules/system/convert/notice/SysNoticeConvert.java index 30f80b3f7..d28eb17ad 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/notice/SysNoticeConvert.java +++ b/src/main/java/cn/iocoder/dashboard/modules/system/convert/notice/SysNoticeConvert.java @@ -5,9 +5,7 @@ import cn.iocoder.dashboard.modules.system.controller.notice.vo.SysNoticeCreateR import cn.iocoder.dashboard.modules.system.controller.notice.vo.SysNoticeRespVO; import cn.iocoder.dashboard.modules.system.controller.notice.vo.SysNoticeUpdateReqVO; import cn.iocoder.dashboard.modules.system.dal.mysql.dataobject.notice.SysNoticeDO; -import com.baomidou.mybatisplus.core.metadata.IPage; import org.mapstruct.Mapper; -import org.mapstruct.Mapping; import org.mapstruct.factory.Mappers; @Mapper @@ -23,7 +21,4 @@ public interface SysNoticeConvert { SysNoticeDO convert(SysNoticeCreateReqVO bean); - @Mapping(source = "records", target = "list") - PageResult convertPage02(IPage page); - } diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/permission/SysRoleConvert.java b/src/main/java/cn/iocoder/dashboard/modules/system/convert/permission/SysRoleConvert.java index 3d7bf6092..6d8a9a06a 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/permission/SysRoleConvert.java +++ b/src/main/java/cn/iocoder/dashboard/modules/system/convert/permission/SysRoleConvert.java @@ -1,11 +1,8 @@ package cn.iocoder.dashboard.modules.system.convert.permission; -import cn.iocoder.dashboard.common.pojo.PageResult; import cn.iocoder.dashboard.modules.system.controller.permission.vo.role.*; import cn.iocoder.dashboard.modules.system.dal.mysql.dataobject.permission.SysRoleDO; -import com.baomidou.mybatisplus.core.metadata.IPage; import org.mapstruct.Mapper; -import org.mapstruct.Mapping; import org.mapstruct.factory.Mappers; import java.util.List; @@ -19,9 +16,6 @@ public interface SysRoleConvert { SysRoleRespVO convert(SysRoleDO bean); - @Mapping(source = "records", target = "list") - PageResult convertPage(IPage page); - SysRoleDO convert(SysRoleCreateReqVO bean); List convertList02(List list); diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/user/SysUserConvert.java b/src/main/java/cn/iocoder/dashboard/modules/system/convert/user/SysUserConvert.java index 0ba3e5973..70778c1ab 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/user/SysUserConvert.java +++ b/src/main/java/cn/iocoder/dashboard/modules/system/convert/user/SysUserConvert.java @@ -1,12 +1,9 @@ package cn.iocoder.dashboard.modules.system.convert.user; -import cn.iocoder.dashboard.common.pojo.PageResult; import cn.iocoder.dashboard.modules.system.controller.user.vo.user.*; import cn.iocoder.dashboard.modules.system.dal.mysql.dataobject.dept.SysDeptDO; import cn.iocoder.dashboard.modules.system.dal.mysql.dataobject.user.SysUserDO; -import com.baomidou.mybatisplus.core.metadata.IPage; import org.mapstruct.Mapper; -import org.mapstruct.Mapping; import org.mapstruct.factory.Mappers; @Mapper @@ -18,9 +15,6 @@ public interface SysUserConvert { SysUserPageItemRespVO.Dept convert(SysDeptDO bean); - @Mapping(source = "records", target = "list") - PageResult convertPage(IPage page); - SysUserDO convert(SysUserCreateReqVO bean); SysUserDO convert(SysUserUpdateReqVO bean); diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dao/dept/SysPostMapper.java b/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dao/dept/SysPostMapper.java index 0909a4423..c28ef431f 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dao/dept/SysPostMapper.java +++ b/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dao/dept/SysPostMapper.java @@ -1,30 +1,29 @@ package cn.iocoder.dashboard.modules.system.dal.mysql.dao.dept; +import cn.iocoder.dashboard.common.pojo.PageResult; +import cn.iocoder.dashboard.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.dashboard.framework.mybatis.core.query.QueryWrapperX; -import cn.iocoder.dashboard.framework.mybatis.core.util.MyBatisUtils; import cn.iocoder.dashboard.modules.system.controller.dept.vo.post.SysPostExportReqVO; import cn.iocoder.dashboard.modules.system.controller.dept.vo.post.SysPostPageReqVO; import cn.iocoder.dashboard.modules.system.dal.mysql.dataobject.dept.SysPostDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; import org.apache.ibatis.annotations.Mapper; import java.util.Collection; import java.util.List; @Mapper -public interface SysPostMapper extends BaseMapper { +public interface SysPostMapper extends BaseMapperX { default List selectList(Collection ids, Collection statuses) { return selectList(new QueryWrapperX().inIfPresent("id", ids) .inIfPresent("status", statuses)); } - default IPage selectList(SysPostPageReqVO reqVO) { - return selectPage(MyBatisUtils.buildPage(reqVO), - new QueryWrapperX().likeIfPresent("name", reqVO.getName()) - .eqIfPresent("status", reqVO.getStatus())); + default PageResult selectPage(SysPostPageReqVO reqVO) { + return selectPage(reqVO, new QueryWrapperX() + .likeIfPresent("name", reqVO.getName()) + .eqIfPresent("status", reqVO.getStatus())); } default List selectList(SysPostExportReqVO reqVO) { diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dao/dict/SysDictDataMapper.java b/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dao/dict/SysDictDataMapper.java index 61426b224..2b442e7ab 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dao/dict/SysDictDataMapper.java +++ b/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dao/dict/SysDictDataMapper.java @@ -1,22 +1,19 @@ package cn.iocoder.dashboard.modules.system.dal.mysql.dao.dict; +import cn.iocoder.dashboard.common.pojo.PageResult; +import cn.iocoder.dashboard.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.dashboard.framework.mybatis.core.query.QueryWrapperX; -import cn.iocoder.dashboard.framework.mybatis.core.util.MyBatisUtils; import cn.iocoder.dashboard.modules.system.controller.dict.vo.data.SysDictDataExportReqVO; import cn.iocoder.dashboard.modules.system.controller.dict.vo.data.SysDictDataPageReqVO; import cn.iocoder.dashboard.modules.system.dal.mysql.dataobject.dict.SysDictDataDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; import org.apache.ibatis.annotations.Mapper; import java.util.Date; import java.util.List; -import static com.baomidou.mybatisplus.core.metadata.OrderItem.asc; - @Mapper -public interface SysDictDataMapper extends BaseMapper { +public interface SysDictDataMapper extends BaseMapperX { default SysDictDataDO selectByLabel(String label) { return selectOne(new QueryWrapper().eq("label", label)); @@ -26,12 +23,12 @@ public interface SysDictDataMapper extends BaseMapper { return selectCount(new QueryWrapper().eq("dict_type", dictType)); } - default IPage selectList(SysDictDataPageReqVO reqVO) { - return selectPage(MyBatisUtils.buildPage(reqVO), - new QueryWrapperX().likeIfPresent("label", reqVO.getLabel()) - .likeIfPresent("dict_type", reqVO.getDictType()) - .eqIfPresent("status", reqVO.getStatus())) - .addOrder(asc("dict_type"), asc("sort")); + default PageResult selectPage(SysDictDataPageReqVO reqVO) { + return selectPage(reqVO, new QueryWrapperX() + .likeIfPresent("label", reqVO.getLabel()) + .likeIfPresent("dict_type", reqVO.getDictType()) + .eqIfPresent("status", reqVO.getStatus()) + .orderByAsc("dict_type", "sort")); } default List selectList() { diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dao/dict/SysDictTypeMapper.java b/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dao/dict/SysDictTypeMapper.java index 0c17ea5d3..487e7f16e 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dao/dict/SysDictTypeMapper.java +++ b/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dao/dict/SysDictTypeMapper.java @@ -1,26 +1,25 @@ package cn.iocoder.dashboard.modules.system.dal.mysql.dao.dict; +import cn.iocoder.dashboard.common.pojo.PageResult; +import cn.iocoder.dashboard.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.dashboard.framework.mybatis.core.query.QueryWrapperX; -import cn.iocoder.dashboard.framework.mybatis.core.util.MyBatisUtils; import cn.iocoder.dashboard.modules.system.controller.dict.vo.type.SysDictTypeExportReqVO; import cn.iocoder.dashboard.modules.system.controller.dict.vo.type.SysDictTypePageReqVO; import cn.iocoder.dashboard.modules.system.dal.mysql.dataobject.dict.SysDictTypeDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; import org.apache.ibatis.annotations.Mapper; import java.util.List; @Mapper -public interface SysDictTypeMapper extends BaseMapper { +public interface SysDictTypeMapper extends BaseMapperX { - default IPage selectList(SysDictTypePageReqVO reqVO) { - return selectPage(MyBatisUtils.buildPage(reqVO), - new QueryWrapperX().likeIfPresent("name", reqVO.getName()) - .likeIfPresent("dict_type", reqVO.getType()) - .eqIfPresent("status", reqVO.getStatus()) - .betweenIfPresent("create_time", reqVO.getBeginTime(), reqVO.getEndTime())); + default PageResult selectPage(SysDictTypePageReqVO reqVO) { + return selectPage(reqVO, new QueryWrapperX() + .likeIfPresent("name", reqVO.getName()) + .likeIfPresent("dict_type", reqVO.getType()) + .eqIfPresent("status", reqVO.getStatus()) + .betweenIfPresent("create_time", reqVO.getBeginTime(), reqVO.getEndTime())); } default List selectList(SysDictTypeExportReqVO reqVO) { diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dao/notice/SysNoticeMapper.java b/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dao/notice/SysNoticeMapper.java index 1b2470771..2f90196b7 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dao/notice/SysNoticeMapper.java +++ b/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dao/notice/SysNoticeMapper.java @@ -1,20 +1,19 @@ package cn.iocoder.dashboard.modules.system.dal.mysql.dao.notice; +import cn.iocoder.dashboard.common.pojo.PageResult; +import cn.iocoder.dashboard.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.dashboard.framework.mybatis.core.query.QueryWrapperX; -import cn.iocoder.dashboard.framework.mybatis.core.util.MyBatisUtils; import cn.iocoder.dashboard.modules.system.controller.notice.vo.SysNoticePageReqVO; import cn.iocoder.dashboard.modules.system.dal.mysql.dataobject.notice.SysNoticeDO; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; import org.apache.ibatis.annotations.Mapper; @Mapper -public interface SysNoticeMapper extends BaseMapper { +public interface SysNoticeMapper extends BaseMapperX { - default IPage selectList(SysNoticePageReqVO reqVO) { - return selectPage(MyBatisUtils.buildPage(reqVO), - new QueryWrapperX().likeIfPresent("title", reqVO.getTitle()) - .eqIfPresent("status", reqVO.getStatus())); + default PageResult selectPage(SysNoticePageReqVO reqVO) { + return selectPage(reqVO, new QueryWrapperX() + .likeIfPresent("title", reqVO.getTitle()) + .eqIfPresent("status", reqVO.getStatus())); } } diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dao/permission/SysRoleMapper.java b/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dao/permission/SysRoleMapper.java index e1f74bc01..112d31348 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dao/permission/SysRoleMapper.java +++ b/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dao/permission/SysRoleMapper.java @@ -1,13 +1,12 @@ package cn.iocoder.dashboard.modules.system.dal.mysql.dao.permission; +import cn.iocoder.dashboard.common.pojo.PageResult; import cn.iocoder.dashboard.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.dashboard.framework.mybatis.core.query.QueryWrapperX; -import cn.iocoder.dashboard.framework.mybatis.core.util.MyBatisUtils; import cn.iocoder.dashboard.modules.system.controller.permission.vo.role.SysRoleExportReqVO; import cn.iocoder.dashboard.modules.system.controller.permission.vo.role.SysRolePageReqVO; import cn.iocoder.dashboard.modules.system.dal.mysql.dataobject.permission.SysRoleDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; import org.apache.ibatis.annotations.Mapper; import org.springframework.lang.Nullable; @@ -18,12 +17,11 @@ import java.util.List; @Mapper public interface SysRoleMapper extends BaseMapperX { - default IPage selectPage(SysRolePageReqVO reqVO) { - return selectPage(MyBatisUtils.buildPage(reqVO), - new QueryWrapperX().likeIfPresent("name", reqVO.getName()) - .likeIfPresent("code", reqVO.getCode()) - .eqIfPresent("status", reqVO.getStatus()) - .betweenIfPresent("create_time", reqVO.getBeginTime(), reqVO.getEndTime())); + default PageResult selectPage(SysRolePageReqVO reqVO) { + return selectPage(reqVO, new QueryWrapperX().likeIfPresent("name", reqVO.getName()) + .likeIfPresent("code", reqVO.getCode()) + .eqIfPresent("status", reqVO.getStatus()) + .betweenIfPresent("create_time", reqVO.getBeginTime(), reqVO.getEndTime())); } default List listRoles(SysRoleExportReqVO reqVO) { diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dao/user/SysUserMapper.java b/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dao/user/SysUserMapper.java index 5103fc00e..933bdde00 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dao/user/SysUserMapper.java +++ b/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dao/user/SysUserMapper.java @@ -1,20 +1,19 @@ package cn.iocoder.dashboard.modules.system.dal.mysql.dao.user; +import cn.iocoder.dashboard.common.pojo.PageResult; +import cn.iocoder.dashboard.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.dashboard.framework.mybatis.core.query.QueryWrapperX; -import cn.iocoder.dashboard.framework.mybatis.core.util.MyBatisUtils; import cn.iocoder.dashboard.modules.system.controller.user.vo.user.SysUserExportReqVO; import cn.iocoder.dashboard.modules.system.controller.user.vo.user.SysUserPageReqVO; import cn.iocoder.dashboard.modules.system.dal.mysql.dataobject.user.SysUserDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; import org.apache.ibatis.annotations.Mapper; import java.util.Collection; import java.util.List; @Mapper -public interface SysUserMapper extends BaseMapper { +public interface SysUserMapper extends BaseMapperX { default SysUserDO selectByUsername(String username) { return selectOne(new QueryWrapper().eq("username", username)); @@ -28,13 +27,13 @@ public interface SysUserMapper extends BaseMapper { return selectOne(new QueryWrapper().eq("email", email)); } - default IPage selectList(SysUserPageReqVO reqVO, Collection deptIds) { - return selectPage(MyBatisUtils.buildPage(reqVO), - new QueryWrapperX().likeIfPresent("username", reqVO.getUsername()) - .likeIfPresent("mobile", reqVO.getMobile()) - .eqIfPresent("status", reqVO.getStatus()) - .betweenIfPresent("create_time", reqVO.getBeginTime(), reqVO.getEndTime()) - .inIfPresent("dept_id", deptIds)); + default PageResult selectPage(SysUserPageReqVO reqVO, Collection deptIds) { + return selectPage(reqVO, new QueryWrapperX() + .likeIfPresent("username", reqVO.getUsername()) + .likeIfPresent("mobile", reqVO.getMobile()) + .eqIfPresent("status", reqVO.getStatus()) + .betweenIfPresent("create_time", reqVO.getBeginTime(), reqVO.getEndTime()) + .inIfPresent("dept_id", deptIds)); } default List selectList(SysUserExportReqVO reqVO, Collection deptIds) { diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/dept/impl/SysPostServiceImpl.java b/src/main/java/cn/iocoder/dashboard/modules/system/service/dept/impl/SysPostServiceImpl.java index e8910b490..ea4f73c72 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/dept/impl/SysPostServiceImpl.java +++ b/src/main/java/cn/iocoder/dashboard/modules/system/service/dept/impl/SysPostServiceImpl.java @@ -36,7 +36,7 @@ public class SysPostServiceImpl implements SysPostService { @Override public PageResult pagePosts(SysPostPageReqVO reqVO) { - return SysPostConvert.INSTANCE.convertPage02(postMapper.selectList(reqVO)); + return postMapper.selectPage(reqVO); } @Override diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/dict/impl/SysDictDataServiceImpl.java b/src/main/java/cn/iocoder/dashboard/modules/system/service/dict/impl/SysDictDataServiceImpl.java index 338a6ef35..6e8f02388 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/dict/impl/SysDictDataServiceImpl.java +++ b/src/main/java/cn/iocoder/dashboard/modules/system/service/dict/impl/SysDictDataServiceImpl.java @@ -138,7 +138,7 @@ public class SysDictDataServiceImpl implements SysDictDataService { @Override public PageResult pageDictDatas(SysDictDataPageReqVO reqVO) { - return SysDictDataConvert.INSTANCE.convertPage02(dictDataMapper.selectList(reqVO)); + return dictDataMapper.selectPage(reqVO); } @Override diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/dict/impl/SysDictTypeServiceImpl.java b/src/main/java/cn/iocoder/dashboard/modules/system/service/dict/impl/SysDictTypeServiceImpl.java index bb0416b07..e7eb9fa2a 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/dict/impl/SysDictTypeServiceImpl.java +++ b/src/main/java/cn/iocoder/dashboard/modules/system/service/dict/impl/SysDictTypeServiceImpl.java @@ -12,10 +12,8 @@ import cn.iocoder.dashboard.modules.system.dal.mysql.dataobject.dict.SysDictType import cn.iocoder.dashboard.modules.system.service.dict.SysDictDataService; import cn.iocoder.dashboard.modules.system.service.dict.SysDictTypeService; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; - import java.util.List; import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*; @@ -28,8 +26,6 @@ import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*; @Service public class SysDictTypeServiceImpl implements SysDictTypeService { - @Resource - private SysDictTypeServiceImpl self; @Resource private SysDictDataService dictDataService; @@ -38,7 +34,7 @@ public class SysDictTypeServiceImpl implements SysDictTypeService { @Override public PageResult pageDictTypes(SysDictTypePageReqVO reqVO) { - return SysDictTypeConvert.INSTANCE.convertPage02(dictTypeMapper.selectList(reqVO)); + return dictTypeMapper.selectPage(reqVO); } @Override @@ -77,18 +73,6 @@ public class SysDictTypeServiceImpl implements SysDictTypeService { @Override public void deleteDictType(Long id) { - // 执行删除 - self.deleteDictType0(id); - // TODO 发送 MQ 消息 - } - - @Override - public List listDictTypes() { - return dictTypeMapper.selectList(); - } - - @Transactional - public void deleteDictType0(Long id) { // 校验是否存在 SysDictTypeDO dictType = this.checkDictTypeExists(id); // 校验是否有字典数据 @@ -99,6 +83,11 @@ public class SysDictTypeServiceImpl implements SysDictTypeService { dictTypeMapper.deleteById(id); } + @Override + public List listDictTypes() { + return dictTypeMapper.selectList(); + } + private void checkCreateOrUpdate(Long id, String name, String type) { // 校验自己存在 checkDictTypeExists(id); diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/notice/impl/SysNoticeServiceImpl.java b/src/main/java/cn/iocoder/dashboard/modules/system/service/notice/impl/SysNoticeServiceImpl.java index b40bef781..422f87fd3 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/notice/impl/SysNoticeServiceImpl.java +++ b/src/main/java/cn/iocoder/dashboard/modules/system/service/notice/impl/SysNoticeServiceImpl.java @@ -28,7 +28,7 @@ public class SysNoticeServiceImpl implements SysNoticeService { @Override public PageResult pageNotices(SysNoticePageReqVO reqVO) { - return SysNoticeConvert.INSTANCE.convertPage02(noticeMapper.selectList(reqVO)); + return noticeMapper.selectPage(reqVO); } @Override diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/permission/impl/SysRoleServiceImpl.java b/src/main/java/cn/iocoder/dashboard/modules/system/service/permission/impl/SysRoleServiceImpl.java index cf21a8e6b..6b2d74cc4 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/permission/impl/SysRoleServiceImpl.java +++ b/src/main/java/cn/iocoder/dashboard/modules/system/service/permission/impl/SysRoleServiceImpl.java @@ -18,7 +18,6 @@ import cn.iocoder.dashboard.modules.system.enums.permission.SysRoleTypeEnum; import cn.iocoder.dashboard.modules.system.mq.producer.permission.SysRoleProducer; import cn.iocoder.dashboard.modules.system.service.permission.SysPermissionService; import cn.iocoder.dashboard.modules.system.service.permission.SysRoleService; -import com.baomidou.mybatisplus.core.metadata.IPage; import com.google.common.collect.ImmutableMap; import lombok.extern.slf4j.Slf4j; import org.springframework.lang.Nullable; @@ -201,8 +200,7 @@ public class SysRoleServiceImpl implements SysRoleService { @Override public PageResult pageRole(SysRolePageReqVO reqVO) { - IPage roleDOPage = roleMapper.selectPage(reqVO); - return SysRoleConvert.INSTANCE.convertPage(roleDOPage); + return roleMapper.selectPage(reqVO); } @Override diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/user/SysUserServiceImpl.java b/src/main/java/cn/iocoder/dashboard/modules/system/service/user/SysUserServiceImpl.java index b71e634cf..af8dd1a64 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/user/SysUserServiceImpl.java +++ b/src/main/java/cn/iocoder/dashboard/modules/system/service/user/SysUserServiceImpl.java @@ -74,8 +74,7 @@ public class SysUserServiceImpl implements SysUserService { @Override public PageResult pageUsers(SysUserPageReqVO reqVO) { - return SysUserConvert.INSTANCE.convertPage(userMapper.selectList(reqVO, - this.getDeptCondition(reqVO.getDeptId()))); + return userMapper.selectPage(reqVO, this.getDeptCondition(reqVO.getDeptId())); } @Override