From dc31792dc1b8ad1658e49ba8fce9a1be924e6fbb Mon Sep 17 00:00:00 2001 From: wu <731351411@qq.com> Date: 星期四, 30 十一月 2023 08:44:04 +0800 Subject: [PATCH] 理片笼测试修改 --- springboot-vue3/src/main/java/com/example/springboot/service/impl/RoleMenuListServiceImpl.java | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/springboot-vue3/src/main/java/com/example/springboot/service/impl/RoleMenuListServiceImpl.java b/springboot-vue3/src/main/java/com/example/springboot/service/impl/RoleMenuListServiceImpl.java new file mode 100644 index 0000000..91a64d8 --- /dev/null +++ b/springboot-vue3/src/main/java/com/example/springboot/service/impl/RoleMenuListServiceImpl.java @@ -0,0 +1,33 @@ +package com.example.springboot.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.example.springboot.mapper.MenuListMapper; +import com.example.springboot.mapper.RoleMapper; +import com.example.springboot.mapper.RoleMenuListMapper; +import com.example.springboot.service.RoleMenuListService; +import com.example.springboot.entity.RoleMenuList; +import com.example.springboot.entity.vo.RoleMenuListVo; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +@Slf4j +public class RoleMenuListServiceImpl extends ServiceImpl<RoleMenuListMapper, RoleMenuList> implements RoleMenuListService { + @Autowired + private MenuListMapper menuListDao; + @Autowired + private RoleMapper roleDao; + + @Override + public IPage<RoleMenuList> selectPage(RoleMenuListVo roleMenuListVO) { + IPage<RoleMenuList> roleMenuListIPage = lambdaQuery().page(new Page<>(roleMenuListVO.getPageNum(), roleMenuListVO.getPageSize())); + roleMenuListIPage.getRecords().forEach(rm -> { + rm.setMenuList(menuListDao.selectById(rm.getMenuListId())); + rm.setRole(roleDao.selectById(rm.getRoleId())); + }); + return roleMenuListIPage; + } +} -- Gitblit v1.8.0