mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-11-01 08:57:16 +08:00 
			
		
		
		
	refactor: 适配 ContiNew Starter Query 组件的包结构优化
This commit is contained in:
		| @@ -18,8 +18,8 @@ package top.charles7c.continew.admin.system.model.query; | ||||
|  | ||||
| import io.swagger.v3.oas.annotations.media.Schema; | ||||
| import lombok.Data; | ||||
| import top.charles7c.continew.starter.data.mybatis.plus.query.Query; | ||||
| import top.charles7c.continew.starter.data.mybatis.plus.query.QueryType; | ||||
| import top.charles7c.continew.starter.data.core.annotation.Query; | ||||
| import top.charles7c.continew.starter.data.core.enums.QueryType; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
|   | ||||
| @@ -18,8 +18,8 @@ package top.charles7c.continew.admin.system.model.query; | ||||
|  | ||||
| import io.swagger.v3.oas.annotations.media.Schema; | ||||
| import lombok.Data; | ||||
| import top.charles7c.continew.starter.data.mybatis.plus.query.Query; | ||||
| import top.charles7c.continew.starter.data.mybatis.plus.query.QueryType; | ||||
| import top.charles7c.continew.starter.data.core.annotation.Query; | ||||
| import top.charles7c.continew.starter.data.core.enums.QueryType; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
|   | ||||
| @@ -18,8 +18,8 @@ package top.charles7c.continew.admin.system.model.query; | ||||
|  | ||||
| import io.swagger.v3.oas.annotations.media.Schema; | ||||
| import lombok.Data; | ||||
| import top.charles7c.continew.starter.data.mybatis.plus.query.Query; | ||||
| import top.charles7c.continew.starter.data.mybatis.plus.query.QueryType; | ||||
| import top.charles7c.continew.starter.data.core.annotation.Query; | ||||
| import top.charles7c.continew.starter.data.core.enums.QueryType; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
|   | ||||
| @@ -18,8 +18,8 @@ package top.charles7c.continew.admin.system.model.query; | ||||
|  | ||||
| import io.swagger.v3.oas.annotations.media.Schema; | ||||
| import lombok.Data; | ||||
| import top.charles7c.continew.starter.data.mybatis.plus.query.Query; | ||||
| import top.charles7c.continew.starter.data.mybatis.plus.query.QueryType; | ||||
| import top.charles7c.continew.starter.data.core.annotation.Query; | ||||
| import top.charles7c.continew.starter.data.core.enums.QueryType; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
|   | ||||
| @@ -18,8 +18,8 @@ package top.charles7c.continew.admin.system.model.query; | ||||
|  | ||||
| import io.swagger.v3.oas.annotations.media.Schema; | ||||
| import lombok.Data; | ||||
| import top.charles7c.continew.starter.data.mybatis.plus.query.Query; | ||||
| import top.charles7c.continew.starter.data.mybatis.plus.query.QueryType; | ||||
| import top.charles7c.continew.starter.data.core.annotation.Query; | ||||
| import top.charles7c.continew.starter.data.core.enums.QueryType; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
|   | ||||
| @@ -18,9 +18,9 @@ package top.charles7c.continew.admin.system.model.query; | ||||
|  | ||||
| import io.swagger.v3.oas.annotations.media.Schema; | ||||
| import lombok.Data; | ||||
| import top.charles7c.continew.starter.data.mybatis.plus.query.Query; | ||||
| import top.charles7c.continew.starter.data.mybatis.plus.query.QueryIgnore; | ||||
| import top.charles7c.continew.starter.data.mybatis.plus.query.QueryType; | ||||
| import top.charles7c.continew.starter.data.core.annotation.Query; | ||||
| import top.charles7c.continew.starter.data.core.annotation.QueryIgnore; | ||||
| import top.charles7c.continew.starter.data.core.enums.QueryType; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
|   | ||||
| @@ -16,19 +16,16 @@ | ||||
|  | ||||
| package top.charles7c.continew.admin.system.model.query; | ||||
|  | ||||
| import io.swagger.v3.oas.annotations.media.Schema; | ||||
| import jakarta.validation.constraints.NotEmpty; | ||||
| import lombok.Data; | ||||
| import top.charles7c.continew.starter.data.core.annotation.Query; | ||||
| import top.charles7c.continew.starter.data.core.enums.QueryType; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
| import java.util.List; | ||||
|  | ||||
| import jakarta.validation.constraints.NotEmpty; | ||||
|  | ||||
| import lombok.Data; | ||||
|  | ||||
| import io.swagger.v3.oas.annotations.media.Schema; | ||||
|  | ||||
| import top.charles7c.continew.starter.data.mybatis.plus.query.Query; | ||||
| import top.charles7c.continew.starter.data.mybatis.plus.query.QueryType; | ||||
|  | ||||
| /** | ||||
|  * 参数查询条件 | ||||
|  * | ||||
|   | ||||
| @@ -18,8 +18,8 @@ package top.charles7c.continew.admin.system.model.query; | ||||
|  | ||||
| import io.swagger.v3.oas.annotations.media.Schema; | ||||
| import lombok.Data; | ||||
| import top.charles7c.continew.starter.data.mybatis.plus.query.Query; | ||||
| import top.charles7c.continew.starter.data.mybatis.plus.query.QueryType; | ||||
| import top.charles7c.continew.starter.data.core.annotation.Query; | ||||
| import top.charles7c.continew.starter.data.core.enums.QueryType; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
|   | ||||
| @@ -18,8 +18,8 @@ package top.charles7c.continew.admin.system.model.query; | ||||
|  | ||||
| import io.swagger.v3.oas.annotations.media.Schema; | ||||
| import lombok.Data; | ||||
| import top.charles7c.continew.starter.data.mybatis.plus.query.Query; | ||||
| import top.charles7c.continew.starter.data.mybatis.plus.query.QueryType; | ||||
| import top.charles7c.continew.starter.data.core.annotation.Query; | ||||
| import top.charles7c.continew.starter.data.core.enums.QueryType; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
|   | ||||
| @@ -20,8 +20,8 @@ import cn.hutool.core.date.DatePattern; | ||||
| import io.swagger.v3.oas.annotations.media.Schema; | ||||
| import lombok.Data; | ||||
| import org.springframework.format.annotation.DateTimeFormat; | ||||
| import top.charles7c.continew.starter.data.mybatis.plus.query.Query; | ||||
| import top.charles7c.continew.starter.data.mybatis.plus.query.QueryType; | ||||
| import top.charles7c.continew.starter.data.core.annotation.Query; | ||||
| import top.charles7c.continew.starter.data.core.enums.QueryType; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
|   | ||||
| @@ -159,7 +159,8 @@ public class DeptServiceImpl extends BaseServiceImpl<DeptMapper, DeptDO, DeptRes | ||||
|      * @return 子部门列表 | ||||
|      */ | ||||
|     private List<DeptDO> listChildren(Long id) { | ||||
|         DatabaseType databaseType = MetaUtils.getDatabaseTypeOrDefault(SpringUtil.getBean(DynamicRoutingDataSource.class), DatabaseType.MYSQL); | ||||
|         DatabaseType databaseType = MetaUtils.getDatabaseTypeOrDefault(SpringUtil | ||||
|             .getBean(DynamicRoutingDataSource.class), DatabaseType.MYSQL); | ||||
|         return baseMapper.lambdaQuery().apply(databaseType.findInSet(id, "ancestors")).list(); | ||||
|     } | ||||
|  | ||||
| @@ -174,7 +175,8 @@ public class DeptServiceImpl extends BaseServiceImpl<DeptMapper, DeptDO, DeptRes | ||||
|         if (CollUtil.isEmpty(ids)) { | ||||
|             return 0L; | ||||
|         } | ||||
|         DatabaseType databaseType = MetaUtils.getDatabaseTypeOrDefault(SpringUtil.getBean(DynamicRoutingDataSource.class), DatabaseType.MYSQL); | ||||
|         DatabaseType databaseType = MetaUtils.getDatabaseTypeOrDefault(SpringUtil | ||||
|             .getBean(DynamicRoutingDataSource.class), DatabaseType.MYSQL); | ||||
|         return ids.stream() | ||||
|             .mapToLong(id -> baseMapper.lambdaQuery().apply(databaseType.findInSet(id, "ancestors")).count()) | ||||
|             .sum(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user