mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-10-31 10:57:13 +08:00 
			
		
		
		
	chore: continew-starter 1.4.1-SNAPSHOT => 1.5.0-SNAPSHOT
1.适配 ContiNew Starter IService 包结构优化 2.解决部分冲突
This commit is contained in:
		| @@ -13,7 +13,7 @@ | |||||||
| <img src="https://sonarcloud.io/api/project_badges/measure?project=Charles7c_continew-admin&metric=alert_status" alt="Sonar Status" /> | <img src="https://sonarcloud.io/api/project_badges/measure?project=Charles7c_continew-admin&metric=alert_status" alt="Sonar Status" /> | ||||||
| </a> | </a> | ||||||
| <a href="https://github.com/Charles7c/continew-starter" target="_blank"> | <a href="https://github.com/Charles7c/continew-starter" target="_blank"> | ||||||
| <img src="https://img.shields.io/badge/ContiNew Starter-1.4.1-%236CB52D.svg" alt="ContiNew Starter" /> | <img src="https://img.shields.io/badge/ContiNew Starter-1.5.0-%236CB52D.svg" alt="ContiNew Starter" /> | ||||||
| </a> | </a> | ||||||
| <a href="https://spring.io/projects/spring-boot" target="_blank"> | <a href="https://spring.io/projects/spring-boot" target="_blank"> | ||||||
| <img src="https://img.shields.io/badge/Spring Boot-3.1.8-%236CB52D.svg?logo=Spring-Boot" alt="Spring Boot" /> | <img src="https://img.shields.io/badge/Spring Boot-3.1.8-%236CB52D.svg?logo=Spring-Boot" alt="Spring Boot" /> | ||||||
| @@ -231,7 +231,7 @@ git clone https://github.com/Charles7c/continew-admin.git | |||||||
|  |  | ||||||
| | 名称                                                         | 版本           | 简介                                                         | | | 名称                                                         | 版本           | 简介                                                         | | ||||||
| | :----------------------------------------------------------- |:-------------| :----------------------------------------------------------- | | | :----------------------------------------------------------- |:-------------| :----------------------------------------------------------- | | ||||||
| | [ContiNew Starter](https://github.com/Charles7c/continew-starter) | 1.4.1-SNAPSHOT        | ContiNew Starter 包含了一系列经过企业实践优化的依赖包(如 MyBatis-Plus、SaToken),可轻松集成到应用中,为开发人员减少手动引入依赖及配置的麻烦,为 Spring Boot Web 项目的灵活快速构建提供支持。 | | | [ContiNew Starter](https://github.com/Charles7c/continew-starter) | 1.5.0-SNAPSHOT       | ContiNew Starter 包含了一系列经过企业实践优化的依赖包(如 MyBatis-Plus、SaToken),可轻松集成到应用中,为开发人员减少手动引入依赖及配置的麻烦,为 Spring Boot Web 项目的灵活快速构建提供支持。 | | ||||||
| | <a href="https://spring.io/projects/spring-boot" target="_blank">Spring Boot</a> | 3.1.8        | 简化 Spring 应用的初始搭建和开发过程,基于“约定优于配置”的理念,使开发人员不再需要定义样板化的配置。(Spring Boot 3.0 开始,要求 Java 17 作为最低版本) | | | <a href="https://spring.io/projects/spring-boot" target="_blank">Spring Boot</a> | 3.1.8        | 简化 Spring 应用的初始搭建和开发过程,基于“约定优于配置”的理念,使开发人员不再需要定义样板化的配置。(Spring Boot 3.0 开始,要求 Java 17 作为最低版本) | | ||||||
| | <a href="https://undertow.io/" target="_blank">Undertow</a>  | 2.3.10.Final | 采用 Java 开发的灵活的高性能 Web 服务器,提供包括阻塞和基于 NIO 的非堵塞机制。 | | | <a href="https://undertow.io/" target="_blank">Undertow</a>  | 2.3.10.Final | 采用 Java 开发的灵活的高性能 Web 服务器,提供包括阻塞和基于 NIO 的非堵塞机制。 | | ||||||
| | <a href="https://sa-token.dev33.cn/" target="_blank">Sa-Token + JWT</a> | 1.37.0       | 轻量级 Java 权限认证框架,让鉴权变得简单、优雅。             | | | <a href="https://sa-token.dev33.cn/" target="_blank">Sa-Token + JWT</a> | 1.37.0       | 轻量级 Java 权限认证框架,让鉴权变得简单、优雅。             | | ||||||
| @@ -280,6 +280,9 @@ continew-admin | |||||||
| │  │  │     │  ├─ application-prod.yml(生产环境配置文件) | │  │  │     │  ├─ application-prod.yml(生产环境配置文件) | ||||||
| │  │  │     │  └─ application.yml(通用配置文件) | │  │  │     │  └─ application.yml(通用配置文件) | ||||||
| │  │  │     ├─ db/changelog(Liquibase 数据脚本配置目录) | │  │  │     ├─ db/changelog(Liquibase 数据脚本配置目录) | ||||||
|  | │  │  │     │  ├─ mysql(MySQL 数据库初始 SQL 脚本目录) | ||||||
|  | │  │  │     │  ├─ postgresql(PostgreSQL 数据库初始 SQL 脚本目录) | ||||||
|  | │  │  │     │  └─ db.changelog-master.yaml(Liquibase 变更记录文件) | ||||||
| │  │  │     ├─ templates(模板配置目录,例如:邮件模板) | │  │  │     ├─ templates(模板配置目录,例如:邮件模板) | ||||||
| │  │  │     ├─ banner.txt(Banner 配置文件) | │  │  │     ├─ banner.txt(Banner 配置文件) | ||||||
| │  │  │     └─ logback-spring.xml(日志配置文件) | │  │  │     └─ logback-spring.xml(日志配置文件) | ||||||
|   | |||||||
| @@ -153,7 +153,7 @@ public class LoginServiceImpl implements LoginService { | |||||||
|         // 查询菜单列表 |         // 查询菜单列表 | ||||||
|         Set<MenuResp> menuSet = new LinkedHashSet<>(); |         Set<MenuResp> menuSet = new LinkedHashSet<>(); | ||||||
|         if (roleCodeSet.contains(SysConstants.ADMIN_ROLE_CODE)) { |         if (roleCodeSet.contains(SysConstants.ADMIN_ROLE_CODE)) { | ||||||
|             menuSet.addAll(menuService.list()); |             menuSet.addAll(menuService.listAll()); | ||||||
|         } else { |         } else { | ||||||
|             roleCodeSet.forEach(roleCode -> menuSet.addAll(menuService.listByRoleCode(roleCode))); |             roleCodeSet.forEach(roleCode -> menuSet.addAll(menuService.listByRoleCode(roleCode))); | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -18,6 +18,7 @@ package top.charles7c.continew.admin.system.model.query; | |||||||
|  |  | ||||||
| import io.swagger.v3.oas.annotations.media.Schema; | import io.swagger.v3.oas.annotations.media.Schema; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
|  | import lombok.NoArgsConstructor; | ||||||
| import top.charles7c.continew.starter.data.core.annotation.Query; | import top.charles7c.continew.starter.data.core.annotation.Query; | ||||||
| import top.charles7c.continew.starter.data.core.enums.QueryType; | import top.charles7c.continew.starter.data.core.enums.QueryType; | ||||||
|  |  | ||||||
| @@ -31,6 +32,7 @@ import java.io.Serializable; | |||||||
|  * @since 2023/2/15 20:21 |  * @since 2023/2/15 20:21 | ||||||
|  */ |  */ | ||||||
| @Data | @Data | ||||||
|  | @NoArgsConstructor | ||||||
| @Schema(description = "菜单查询条件") | @Schema(description = "菜单查询条件") | ||||||
| public class MenuQuery implements Serializable { | public class MenuQuery implements Serializable { | ||||||
|  |  | ||||||
| @@ -49,4 +51,8 @@ public class MenuQuery implements Serializable { | |||||||
|      */ |      */ | ||||||
|     @Schema(description = "状态(1:启用;2:禁用)", example = "1") |     @Schema(description = "状态(1:启用;2:禁用)", example = "1") | ||||||
|     private Integer status; |     private Integer status; | ||||||
|  |  | ||||||
|  |     public MenuQuery(Integer status) { | ||||||
|  |         this.status = status; | ||||||
|  |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -23,7 +23,7 @@ import top.charles7c.continew.admin.system.model.resp.AnnouncementDetailResp; | |||||||
| import top.charles7c.continew.admin.system.model.resp.AnnouncementResp; | import top.charles7c.continew.admin.system.model.resp.AnnouncementResp; | ||||||
| import top.charles7c.continew.admin.system.model.resp.DashboardAnnouncementResp; | import top.charles7c.continew.admin.system.model.resp.DashboardAnnouncementResp; | ||||||
| import top.charles7c.continew.starter.extension.crud.service.BaseService; | import top.charles7c.continew.starter.extension.crud.service.BaseService; | ||||||
| import top.charles7c.continew.starter.extension.crud.service.IService; | import top.charles7c.continew.starter.data.mybatis.plus.service.IService; | ||||||
|  |  | ||||||
| import java.util.List; | import java.util.List; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -22,7 +22,7 @@ import top.charles7c.continew.admin.system.model.req.DeptReq; | |||||||
| import top.charles7c.continew.admin.system.model.resp.DeptDetailResp; | import top.charles7c.continew.admin.system.model.resp.DeptDetailResp; | ||||||
| import top.charles7c.continew.admin.system.model.resp.DeptResp; | import top.charles7c.continew.admin.system.model.resp.DeptResp; | ||||||
| import top.charles7c.continew.starter.extension.crud.service.BaseService; | import top.charles7c.continew.starter.extension.crud.service.BaseService; | ||||||
| import top.charles7c.continew.starter.extension.crud.service.IService; | import top.charles7c.continew.starter.data.mybatis.plus.service.IService; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * 部门业务接口 |  * 部门业务接口 | ||||||
|   | |||||||
| @@ -23,7 +23,7 @@ import top.charles7c.continew.admin.system.model.req.DictItemReq; | |||||||
| import top.charles7c.continew.admin.system.model.resp.DictItemDetailResp; | import top.charles7c.continew.admin.system.model.resp.DictItemDetailResp; | ||||||
| import top.charles7c.continew.admin.system.model.resp.DictItemResp; | import top.charles7c.continew.admin.system.model.resp.DictItemResp; | ||||||
| import top.charles7c.continew.starter.extension.crud.service.BaseService; | import top.charles7c.continew.starter.extension.crud.service.BaseService; | ||||||
| import top.charles7c.continew.starter.extension.crud.service.IService; | import top.charles7c.continew.starter.data.mybatis.plus.service.IService; | ||||||
|  |  | ||||||
| import java.io.Serializable; | import java.io.Serializable; | ||||||
| import java.util.List; | import java.util.List; | ||||||
|   | |||||||
| @@ -22,7 +22,7 @@ import top.charles7c.continew.admin.system.model.req.DictReq; | |||||||
| import top.charles7c.continew.admin.system.model.resp.DictDetailResp; | import top.charles7c.continew.admin.system.model.resp.DictDetailResp; | ||||||
| import top.charles7c.continew.admin.system.model.resp.DictResp; | import top.charles7c.continew.admin.system.model.resp.DictResp; | ||||||
| import top.charles7c.continew.starter.extension.crud.service.BaseService; | import top.charles7c.continew.starter.extension.crud.service.BaseService; | ||||||
| import top.charles7c.continew.starter.extension.crud.service.IService; | import top.charles7c.continew.starter.data.mybatis.plus.service.IService; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * 字典业务接口 |  * 字典业务接口 | ||||||
|   | |||||||
| @@ -22,8 +22,8 @@ import top.charles7c.continew.admin.system.model.entity.FileDO; | |||||||
| import top.charles7c.continew.admin.system.model.query.FileQuery; | import top.charles7c.continew.admin.system.model.query.FileQuery; | ||||||
| import top.charles7c.continew.admin.system.model.req.FileReq; | import top.charles7c.continew.admin.system.model.req.FileReq; | ||||||
| import top.charles7c.continew.admin.system.model.resp.FileResp; | import top.charles7c.continew.admin.system.model.resp.FileResp; | ||||||
|  | import top.charles7c.continew.starter.data.mybatis.plus.service.IService; | ||||||
| import top.charles7c.continew.starter.extension.crud.service.BaseService; | import top.charles7c.continew.starter.extension.crud.service.BaseService; | ||||||
| import top.charles7c.continew.starter.extension.crud.service.IService; |  | ||||||
|  |  | ||||||
| import java.util.List; | import java.util.List; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -21,7 +21,7 @@ import top.charles7c.continew.admin.system.model.query.MenuQuery; | |||||||
| import top.charles7c.continew.admin.system.model.req.MenuReq; | import top.charles7c.continew.admin.system.model.req.MenuReq; | ||||||
| import top.charles7c.continew.admin.system.model.resp.MenuResp; | import top.charles7c.continew.admin.system.model.resp.MenuResp; | ||||||
| import top.charles7c.continew.starter.extension.crud.service.BaseService; | import top.charles7c.continew.starter.extension.crud.service.BaseService; | ||||||
| import top.charles7c.continew.starter.extension.crud.service.IService; | import top.charles7c.continew.starter.data.mybatis.plus.service.IService; | ||||||
|  |  | ||||||
| import java.util.List; | import java.util.List; | ||||||
| import java.util.Set; | import java.util.Set; | ||||||
| @@ -34,6 +34,13 @@ import java.util.Set; | |||||||
|  */ |  */ | ||||||
| public interface MenuService extends BaseService<MenuResp, MenuResp, MenuQuery, MenuReq>, IService<MenuDO> { | public interface MenuService extends BaseService<MenuResp, MenuResp, MenuQuery, MenuReq>, IService<MenuDO> { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询全部菜单 | ||||||
|  |      * | ||||||
|  |      * @return 菜单列表 | ||||||
|  |      */ | ||||||
|  |     List<MenuResp> listAll(); | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 根据用户 ID 查询 |      * 根据用户 ID 查询 | ||||||
|      * |      * | ||||||
|   | |||||||
| @@ -24,7 +24,7 @@ import top.charles7c.continew.admin.system.model.req.RoleReq; | |||||||
| import top.charles7c.continew.admin.system.model.resp.RoleDetailResp; | import top.charles7c.continew.admin.system.model.resp.RoleDetailResp; | ||||||
| import top.charles7c.continew.admin.system.model.resp.RoleResp; | import top.charles7c.continew.admin.system.model.resp.RoleResp; | ||||||
| import top.charles7c.continew.starter.extension.crud.service.BaseService; | import top.charles7c.continew.starter.extension.crud.service.BaseService; | ||||||
| import top.charles7c.continew.starter.extension.crud.service.IService; | import top.charles7c.continew.starter.data.mybatis.plus.service.IService; | ||||||
|  |  | ||||||
| import java.util.List; | import java.util.List; | ||||||
| import java.util.Set; | import java.util.Set; | ||||||
|   | |||||||
| @@ -22,7 +22,7 @@ import top.charles7c.continew.admin.system.model.req.StorageReq; | |||||||
| import top.charles7c.continew.admin.system.model.resp.StorageDetailResp; | import top.charles7c.continew.admin.system.model.resp.StorageDetailResp; | ||||||
| import top.charles7c.continew.admin.system.model.resp.StorageResp; | import top.charles7c.continew.admin.system.model.resp.StorageResp; | ||||||
| import top.charles7c.continew.starter.extension.crud.service.BaseService; | import top.charles7c.continew.starter.extension.crud.service.BaseService; | ||||||
| import top.charles7c.continew.starter.extension.crud.service.IService; | import top.charles7c.continew.starter.data.mybatis.plus.service.IService; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * 存储库业务接口 |  * 存储库业务接口 | ||||||
|   | |||||||
| @@ -26,7 +26,7 @@ import top.charles7c.continew.admin.system.model.req.UserRoleUpdateReq; | |||||||
| import top.charles7c.continew.admin.system.model.resp.UserDetailResp; | import top.charles7c.continew.admin.system.model.resp.UserDetailResp; | ||||||
| import top.charles7c.continew.admin.system.model.resp.UserResp; | import top.charles7c.continew.admin.system.model.resp.UserResp; | ||||||
| import top.charles7c.continew.starter.extension.crud.service.BaseService; | import top.charles7c.continew.starter.extension.crud.service.BaseService; | ||||||
| import top.charles7c.continew.starter.extension.crud.service.IService; | import top.charles7c.continew.starter.data.mybatis.plus.service.IService; | ||||||
|  |  | ||||||
| import java.util.List; | import java.util.List; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -71,6 +71,12 @@ public class MenuServiceImpl extends BaseServiceImpl<MenuMapper, MenuDO, MenuRes | |||||||
|         super.delete(ids); |         super.delete(ids); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     @Override | ||||||
|  |     @Cached(key = "'ALL'", name = CacheConstants.MENU_KEY_PREFIX) | ||||||
|  |     public List<MenuResp> listAll() { | ||||||
|  |         return super.list(new MenuQuery(DisEnableStatusEnum.ENABLE.getValue()), null); | ||||||
|  |     } | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|     public Set<String> listPermissionByUserId(Long userId) { |     public Set<String> listPermissionByUserId(Long userId) { | ||||||
|         return baseMapper.selectPermissionByUserId(userId); |         return baseMapper.selectPermissionByUserId(userId); | ||||||
| @@ -85,14 +91,6 @@ public class MenuServiceImpl extends BaseServiceImpl<MenuMapper, MenuDO, MenuRes | |||||||
|         return list; |         return list; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Override |  | ||||||
|     @Cached(key = "'ALL'", name = CacheConstants.MENU_KEY_PREFIX) |  | ||||||
|     public List<MenuResp> list() { |  | ||||||
|         MenuQuery menuQuery = new MenuQuery(); |  | ||||||
|         menuQuery.setStatus(DisEnableStatusEnum.ENABLE.getValue()); |  | ||||||
|         return super.list(menuQuery, null); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 名称是否存在 |      * 名称是否存在 | ||||||
|      * |      * | ||||||
|   | |||||||
| @@ -132,7 +132,7 @@ public class RoleServiceImpl extends BaseServiceImpl<RoleMapper, RoleDO, RoleRes | |||||||
|         if (obj instanceof RoleDetailResp detail) { |         if (obj instanceof RoleDetailResp detail) { | ||||||
|             Long roleId = detail.getId(); |             Long roleId = detail.getId(); | ||||||
|             if (SysConstants.ADMIN_ROLE_CODE.equals(detail.getCode())) { |             if (SysConstants.ADMIN_ROLE_CODE.equals(detail.getCode())) { | ||||||
|                 List<MenuResp> list = menuService.list(null, null); |                 List<MenuResp> list = menuService.listAll(); | ||||||
|                 List<Long> menuIds = list.stream().map(MenuResp::getId).toList(); |                 List<Long> menuIds = list.stream().map(MenuResp::getId).toList(); | ||||||
|                 detail.setMenuIds(menuIds); |                 detail.setMenuIds(menuIds); | ||||||
|             } else { |             } else { | ||||||
|   | |||||||
| @@ -5,5 +5,5 @@ | |||||||
|   \____|\___/ |_| |_| \__||_||_| \_| \___|  \_/\_/       /_/   \_\\__,_||_| |_| |_||_||_| |_| |   \____|\___/ |_| |_| \__||_||_| \_| \___|  \_/\_/       /_/   \_\\__,_||_| |_| |_||_||_| |_| | ||||||
|  |  | ||||||
|  :: ${project.name}   ::                                               v${project.version} |  :: ${project.name}   ::                                               v${project.version} | ||||||
|  :: ContiNew Starter ::                                               v1.4.1-SNAPSHOT |  :: ContiNew Starter ::                                               v1.5.0-SNAPSHOT | ||||||
|  :: Spring Boot      ::                                               v${spring-boot.version} |  :: Spring Boot      ::                                               v${spring-boot.version} | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								pom.xml
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								pom.xml
									
									
									
									
									
								
							| @@ -12,7 +12,7 @@ | |||||||
|     <parent> |     <parent> | ||||||
|         <groupId>top.charles7c.continew</groupId> |         <groupId>top.charles7c.continew</groupId> | ||||||
|         <artifactId>continew-starter</artifactId> |         <artifactId>continew-starter</artifactId> | ||||||
|         <version>1.4.1-SNAPSHOT</version> |         <version>1.5.0-SNAPSHOT</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <groupId>top.charles7c.continew</groupId> |     <groupId>top.charles7c.continew</groupId> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user