diff --git a/README.md b/README.md index 9f676106c..d43db2a6e 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,6 @@ ### 系统功能 - | | 功能 | 描述 | | --- | --- | --- | | | 用户管理 | 用户是系统操作者,该功能主要完成系统用户配置 | @@ -41,10 +40,6 @@ | 🚀 | 错误码管理 | 系统所有错误码的管理,可在线修改错误提示,无需重启服务 | | | 通知公告 | 系统通知公告信息发布维护 | -计划新增功能: -* 邮件 -* 钉钉、飞书等通知 - ### 基础设施 | | 功能 | 描述 | @@ -64,9 +59,6 @@ | 🚀 | 日志服务 | 轻量级日志中心,查看远程服务器的日志 | | 🚀 | 单元测试 |基于 JUnit + Mockito 实现单元测试,保证功能的正确性、代码的质量等 | -计划新增: -* 工作流 - ### 研发工具 | | 功能 | 描述 | @@ -88,6 +80,15 @@ ## 技术栈 +| 项目 | 说明 | +| --- | --- | +| `yudao-dependencies` | Maven 依赖版本管理 | +| `yudao-framework` | Java 框架拓展 | +| `yudao-admin-server` | 管理后台的服务端 | +| `yudao-admin-ui` | 管理后台的 UI 界面 | +| `yudao-user-server` | 用户前台的服务端 | +| `yudao-user-ui` | 用户前台的 UI 界面 | + ### 后端 | 框架 | 说明 | 版本 | 学习指南 | diff --git a/bin/deploy.sh b/bin/deploy.sh index 3a156c9b0..ce295c7c1 100644 --- a/bin/deploy.sh +++ b/bin/deploy.sh @@ -8,11 +8,11 @@ set -e DATE=$(date +%Y%m%d%H%M) # 基础路径 -BASE_PATH=/work/projects/dashboard +BASE_PATH=/work/projects/yudao-admin-server # 编译后 jar 的地址。部署时,Jenkins 会上传 jar 包到该目录下 SOURCE_PATH=$BASE_PATH/build # 服务名称。同时约定部署服务的 jar 包名字也为它。 -SERVER_NAME=dashboard +SERVER_NAME=yudao-admin-server # 环境 PROFILES_ACTIVE=dev # 健康检查 URL diff --git a/pom.xml b/pom.xml index 546c01014..eec621676 100644 --- a/pom.xml +++ b/pom.xml @@ -3,365 +3,62 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 + cn.iocoder.boot + yudao + ${revision} + pom + + yudao-dependencies + yudao-framework + yudao-admin-server + - cn.iocoder - dashboard - 1.0.0 - - dashboard - http://www.iocoder.cn - 芋道管理系统 - jar + ${artifactId} + 芋道项目基础脚手架 + https://github.com/YunaiV/ruoyi-vue-pro - UTF-8 - UTF-8 - @ + 1.0.0 + 1.8 ${java.version} ${java.version} - 3.8.0 - - 2.4.4 - - 3.0.2 - 1.5.22 - - 5.1.46 - 1.2.4 - 3.4.2 - 3.3.2 - 3.15.1 - - 1.7.0 - - 2.2.0 - 1.7.0 - - 8.5.0 - 6.1 - 2.3.1 - - 1.16.14 - 1.4.1.Final - 5.6.1 - 2.2.7 - 2.2 - 1.0.5 - 7.2.6.RELEASE - 0.1.16 - - 4.5.18 - 2.1.0 - 1.2.7 + 3.0.0-M5 - - - org.springframework.boot - spring-boot-dependencies - ${spring.boot.version} + cn.iocoder.boot + yudao-dependencies + ${revision} pom import - - - - - org.springframework.boot - spring-boot-configuration-processor - true - - - - org.springframework.boot - spring-boot-starter-aop - - - - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework.boot - spring-boot-starter-security - - - - org.springframework.boot - spring-boot-starter-validation - - - - com.github.xiaoymin - knife4j-spring-boot-starter - ${knife4j.version} - - - mapstruct - org.mapstruct - - - guava - com.google.guava - - - swagger-annotations - io.swagger - - - - - io.swagger - swagger-annotations - ${swagger-annotations.version} - - - - - mysql - mysql-connector-java - ${mysql-connector-java.version} - - - com.alibaba - druid-spring-boot-starter - ${druid.version} - - - com.baomidou - mybatis-plus-boot-starter - ${mybatis-plus.version} - - - com.baomidou - dynamic-datasource-spring-boot-starter - ${dynamic-datasource.version} - - - - org.redisson - redisson-spring-boot-starter - ${redisson.version} - - - - - com.ctrip.framework.apollo - apollo-client - ${apollo.version} - - - - - org.springframework.boot - spring-boot-starter-quartz - - - - - com.baomidou - lock4j-redisson-spring-boot-starter - ${lock4j.version} - - - redisson-spring-boot-starter - org.redisson - - - - - - io.github.resilience4j - resilience4j-spring-boot2 - ${resilience4j.version} - - - - - org.apache.skywalking - apm-toolkit-trace - ${skywalking.version} - - - org.apache.skywalking - apm-toolkit-logback-1.x - ${skywalking.version} - - - org.apache.skywalking - apm-toolkit-opentracing - ${skywalking.version} - - - - de.codecentric - spring-boot-admin-starter-server - ${spring-boot-admin.version} - - - de.codecentric - spring-boot-admin-starter-client - ${spring-boot-admin.version} - - - - - org.springframework.boot - spring-boot-starter-test - test - - - asm - org.ow2.asm - - - - - - com.h2database - h2 - test - - - - com.github.fppt - jedis-mock - ${jedis-mock.version} - test - - - - uk.co.jemos.podam - podam - ${podam.version} - test - - - - - org.projectlombok - lombok - ${lombok.version} - - - - org.mapstruct - mapstruct - ${mapstruct.version} - - - org.mapstruct - mapstruct-processor - ${mapstruct.version} - true - - - org.mapstruct - mapstruct-jdk8 - ${mapstruct.version} - - - - cn.hutool - hutool-all - ${hutool.version} - - - - com.alibaba - easyexcel - ${easyexcel.verion} - - - - org.apache.velocity - velocity-engine-core - ${velocity.version} - - - - cn.smallbun.screw - screw-core - ${screw.version} - - - - - - - com.yunpian.sdk - yunpian-java-sdk - ${yunpian-java-sdk.version} - - - - com.aliyun - aliyun-java-sdk-core - ${aliyun-java-sdk-core.version} - - - com.aliyun - aliyun-java-sdk-dysmsapi - ${aliyun-java-sdk-dysmsapi.version} - - - - - - - - ${project.artifactId} - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - true - - - - - repackage - - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - ${java.version} - ${java.version} - - - org.mapstruct - mapstruct-processor - ${mapstruct.version} - - - org.projectlombok - lombok - ${lombok.version} - - - - - + + + + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven-surefire-plugin.version} + + + + + + + aliyun + aliyun + http://maven.aliyun.com/nexus/content/groups/public + + + diff --git a/src/main/java/cn/iocoder/dashboard/common/enums/DefaultBitFieldEnum.java b/src/main/java/cn/iocoder/dashboard/common/enums/DefaultBitFieldEnum.java deleted file mode 100644 index 7738d40a2..000000000 --- a/src/main/java/cn/iocoder/dashboard/common/enums/DefaultBitFieldEnum.java +++ /dev/null @@ -1,27 +0,0 @@ -package cn.iocoder.dashboard.common.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 通用状态枚举 - * - * @author 芋道源码 - */ -@Getter -@AllArgsConstructor -public enum DefaultBitFieldEnum { - - NO(0, "否"), - YES(1, "是"); - - /** - * 状态值 - */ - private final Integer val; - /** - * 状态名 - */ - private final String name; - -} diff --git a/src/main/java/cn/iocoder/dashboard/framework/captcha/package-info.java b/src/main/java/cn/iocoder/dashboard/framework/captcha/package-info.java deleted file mode 100644 index 432e3d449..000000000 --- a/src/main/java/cn/iocoder/dashboard/framework/captcha/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -/** - * 基于 Hutool captcha 库,实现验证码功能 - */ -package cn.iocoder.dashboard.framework.captcha; diff --git a/src/main/java/cn/iocoder/dashboard/framework/codegen/package-info.java b/src/main/java/cn/iocoder/dashboard/framework/codegen/package-info.java deleted file mode 100644 index 29f1464fe..000000000 --- a/src/main/java/cn/iocoder/dashboard/framework/codegen/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -/** - * 代码生成器 - */ -package cn.iocoder.dashboard.framework.codegen; diff --git a/src/main/java/cn/iocoder/dashboard/framework/dict/config/DictConfiguration.java b/src/main/java/cn/iocoder/dashboard/framework/dict/config/DictConfiguration.java deleted file mode 100644 index d2ff54d10..000000000 --- a/src/main/java/cn/iocoder/dashboard/framework/dict/config/DictConfiguration.java +++ /dev/null @@ -1,18 +0,0 @@ -package cn.iocoder.dashboard.framework.dict.config; - -import cn.iocoder.dashboard.framework.dict.core.service.DictDataFrameworkService; -import cn.iocoder.dashboard.framework.dict.core.util.DictUtils; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -@Configuration -public class DictConfiguration { - - @Bean - @SuppressWarnings("InstantiationOfUtilityClass") - public DictUtils dictUtils(DictDataFrameworkService service) { - DictUtils.init(service); - return new DictUtils(); - } - -} diff --git a/src/main/java/cn/iocoder/dashboard/framework/dict/core/util/DictUtils.java b/src/main/java/cn/iocoder/dashboard/framework/dict/core/util/DictUtils.java deleted file mode 100644 index 5b03200c5..000000000 --- a/src/main/java/cn/iocoder/dashboard/framework/dict/core/util/DictUtils.java +++ /dev/null @@ -1,28 +0,0 @@ -package cn.iocoder.dashboard.framework.dict.core.util; - -import cn.iocoder.dashboard.framework.dict.core.service.DictDataFrameworkService; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dict.SysDictDataDO; -import lombok.extern.slf4j.Slf4j; - -/** - * 字典工具类 - */ -@Slf4j -public class DictUtils { - - private static DictDataFrameworkService service; - - public static void init(DictDataFrameworkService service) { - DictUtils.service = service; - log.info("[init][初始化 DictUtils 成功]"); - } - - public static SysDictDataDO getDictDataFromCache(String type, String value) { - return service.getDictDataFromCache(type, value); - } - - public static SysDictDataDO parseDictDataFromCache(String type, String label) { - return service.getDictDataFromCache(type, label); - } - -} diff --git a/src/main/java/cn/iocoder/dashboard/framework/dict/package-info.java b/src/main/java/cn/iocoder/dashboard/framework/dict/package-info.java deleted file mode 100644 index adc37f7b6..000000000 --- a/src/main/java/cn/iocoder/dashboard/framework/dict/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -/** - * 字典数据模块,提供 {@link cn.iocoder.dashboard.framework.dict.core.util.DictUtils} 工具类 - * - * 通过将字典缓存在内存中,保证性能 - */ -package cn.iocoder.dashboard.framework.dict; diff --git a/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/package-info.java b/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/package-info.java deleted file mode 100644 index 88d69c2a8..000000000 --- a/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package cn.iocoder.dashboard.framework.logger.operatelog.core; diff --git a/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/service/OperateLogFrameworkService.java b/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/service/OperateLogFrameworkService.java deleted file mode 100644 index d16ecf804..000000000 --- a/src/main/java/cn/iocoder/dashboard/framework/logger/operatelog/core/service/OperateLogFrameworkService.java +++ /dev/null @@ -1,17 +0,0 @@ -package cn.iocoder.dashboard.framework.logger.operatelog.core.service; - -import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogCreateReqVO; - -import java.util.concurrent.Future; - -public interface OperateLogFrameworkService { - - /** - * 异步记录操作日志 - * - * @param reqVO 操作日志请求 - * @return true: 记录成功,false: 记录失败 - */ - Future createOperateLogAsync(SysOperateLogCreateReqVO reqVO); - -} diff --git a/src/main/java/cn/iocoder/dashboard/framework/logger/package-info.java b/src/main/java/cn/iocoder/dashboard/framework/logger/package-info.java deleted file mode 100644 index 258db8aa7..000000000 --- a/src/main/java/cn/iocoder/dashboard/framework/logger/package-info.java +++ /dev/null @@ -1,10 +0,0 @@ -/** - * 日志组件,包括: - * - * 1. 用户操作日志:记录用户的操作,用于对用户的操作的审计与追溯,永久保存。 - * 2. API 日志:包含两类 - * 2.1 API 访问日志:记录用户访问 API 的访问日志,定期归档历史日志。 - * 2.2 API 异常日志:记录用户访问 API 的系统异常,方便日常排查问题与告警。 - * 3. 通用 Logger 日志:将 {@link org.slf4j.Logger} 打印的日志,只满足大于等于配置的 {@link org.slf4j.event.Level} 进行持久化,可以理解成简易的“日志中心”。 - */ -package cn.iocoder.dashboard.framework.logger; diff --git a/src/main/java/cn/iocoder/dashboard/framework/package-info.java b/src/main/java/cn/iocoder/dashboard/framework/package-info.java deleted file mode 100644 index e8231cbf8..000000000 --- a/src/main/java/cn/iocoder/dashboard/framework/package-info.java +++ /dev/null @@ -1,10 +0,0 @@ -/** - * 该包是技术组件,每个子包,代表一个组件。每个组件包括两部分: - * 1. core 包:是该组件的核心分装 - * 2. config 包:是该组件基于 Spring 的配置 - * - * 技术组件,也分成两类: - * 1. 框架组件:和我们熟悉的 MyBatis、Redis 等等的拓展 - * 2. 业务组件:和业务相关的组件的封装,例如说数据字典、操作日志等等。 - */ -package cn.iocoder.dashboard.framework; diff --git a/src/main/java/cn/iocoder/dashboard/framework/sms/core/client/impl/aliyun/AliyunSmsCodeMapping.java b/src/main/java/cn/iocoder/dashboard/framework/sms/core/client/impl/aliyun/AliyunSmsCodeMapping.java deleted file mode 100644 index 6319e257b..000000000 --- a/src/main/java/cn/iocoder/dashboard/framework/sms/core/client/impl/aliyun/AliyunSmsCodeMapping.java +++ /dev/null @@ -1,43 +0,0 @@ -package cn.iocoder.dashboard.framework.sms.core.client.impl.aliyun; - -import cn.iocoder.dashboard.common.exception.ErrorCode; -import cn.iocoder.dashboard.common.exception.enums.GlobalErrorCodeConstants; -import cn.iocoder.dashboard.framework.sms.core.client.SmsCodeMapping; - -import static cn.iocoder.dashboard.framework.sms.core.enums.SmsFrameworkErrorCodeConstants.*; - -/** - * 阿里云的 SmsCodeMapping 实现类 - * - * 参见 https://help.aliyun.com/document_detail/101346.htm 文档 - * - * @author 芋道源码 - */ -public class AliyunSmsCodeMapping implements SmsCodeMapping { - - @Override - public ErrorCode apply(String apiCode) { - switch (apiCode) { - case "OK": return GlobalErrorCodeConstants.SUCCESS; - case "isv.ACCOUNT_NOT_EXISTS": - case "isv.ACCOUNT_ABNORMAL": - case "MissingAccessKeyId": return SMS_ACCOUNT_INVALID; - case "isp.RAM_PERMISSION_DENY": return SMS_PERMISSION_DENY; - case "isv.INVALID_JSON_PARAM": - case "isv.INVALID_PARAMETERS": return SMS_API_PARAM_ERROR; - case "isv.BUSINESS_LIMIT_CONTROL": return SMS_SEND_BUSINESS_LIMIT_CONTROL; - case "isv.DAY_LIMIT_CONTROL": return SMS_SEND_DAY_LIMIT_CONTROL; - case "isv.SMS_CONTENT_ILLEGAL": return SMS_SEND_CONTENT_INVALID; - case "isv.SMS_TEMPLATE_ILLEGAL": return SMS_TEMPLATE_INVALID; - case "isv.SMS_SIGNATURE_ILLEGAL": - case "isv.SIGN_NAME_ILLEGAL": - case "isv.SMS_SIGN_ILLEGAL": return SMS_SIGN_INVALID; - case "isv.AMOUNT_NOT_ENOUGH": - case "isv.OUT_OF_SERVICE": return SMS_ACCOUNT_MONEY_NOT_ENOUGH; - case "isv.MOBILE_NUMBER_ILLEGAL": return SMS_MOBILE_INVALID; - case "isv.TEMPLATE_MISSING_PARAMETERS": return SMS_TEMPLATE_PARAM_ERROR; - } - return SMS_UNKNOWN; - } - -} diff --git a/src/main/java/cn/iocoder/dashboard/framework/sms/core/client/impl/debug/DebugDingTalkCodeMapping.java b/src/main/java/cn/iocoder/dashboard/framework/sms/core/client/impl/debug/DebugDingTalkCodeMapping.java deleted file mode 100644 index a2aafb7c0..000000000 --- a/src/main/java/cn/iocoder/dashboard/framework/sms/core/client/impl/debug/DebugDingTalkCodeMapping.java +++ /dev/null @@ -1,23 +0,0 @@ -package cn.iocoder.dashboard.framework.sms.core.client.impl.debug; - -import cn.iocoder.dashboard.common.exception.ErrorCode; -import cn.iocoder.dashboard.common.exception.enums.GlobalErrorCodeConstants; -import cn.iocoder.dashboard.framework.sms.core.client.SmsCodeMapping; - -import java.util.Objects; - -import static cn.iocoder.dashboard.framework.sms.core.enums.SmsFrameworkErrorCodeConstants.SMS_UNKNOWN; - -/** - * 钉钉的 SmsCodeMapping 实现类 - * - * @author 芋道源码 - */ -public class DebugDingTalkCodeMapping implements SmsCodeMapping { - - @Override - public ErrorCode apply(String apiCode) { - return Objects.equals(apiCode, "0") ? GlobalErrorCodeConstants.SUCCESS : SMS_UNKNOWN; - } - -} diff --git a/src/main/java/cn/iocoder/dashboard/framework/sms/core/client/impl/yunpian/YunpianSmsCodeMapping.java b/src/main/java/cn/iocoder/dashboard/framework/sms/core/client/impl/yunpian/YunpianSmsCodeMapping.java deleted file mode 100644 index ef980023d..000000000 --- a/src/main/java/cn/iocoder/dashboard/framework/sms/core/client/impl/yunpian/YunpianSmsCodeMapping.java +++ /dev/null @@ -1,45 +0,0 @@ -package cn.iocoder.dashboard.framework.sms.core.client.impl.yunpian; - -import cn.iocoder.dashboard.common.exception.ErrorCode; -import cn.iocoder.dashboard.framework.sms.core.client.SmsCodeMapping; - -import static cn.iocoder.dashboard.common.exception.enums.GlobalErrorCodeConstants.SUCCESS; -import static cn.iocoder.dashboard.framework.sms.core.enums.SmsFrameworkErrorCodeConstants.*; -import static com.yunpian.sdk.constant.Code.*; - -/** - * 云片的 SmsCodeMapping 实现类 - * - * 参见 https://www.yunpian.com/official/document/sms/zh_CN/returnvalue_common 文档 - * - * @author 芋道源码 - */ -public class YunpianSmsCodeMapping implements SmsCodeMapping { - - @Override - public ErrorCode apply(String apiCode) { - int code = Integer.parseInt(apiCode); - switch (code) { - case OK: return SUCCESS; - case ARGUMENT_MISSING: return SMS_API_PARAM_ERROR; - case BAD_ARGUMENT_FORMAT: return SMS_TEMPLATE_PARAM_ERROR; - case TPL_NOT_FOUND: - case TPL_NOT_VALID: return SMS_TEMPLATE_INVALID; - case MONEY_NOT_ENOUGH: return SMS_ACCOUNT_MONEY_NOT_ENOUGH; - case BLACK_WORD: return SMS_SEND_CONTENT_INVALID; - case DUP_IN_SHORT_TIME: - case TOO_MANY_TIME_IN_5: - case DAY_LIMIT_PER_MOBILE: - case HOUR_LIMIT_PER_MOBILE: return SMS_SEND_BUSINESS_LIMIT_CONTROL; - case BLACK_PHONE_FILTER: return SMS_MOBILE_BLACK; - case SIGN_NOT_MATCH: - case BAD_SIGN_FORMAT: - case SIGN_NOT_VALID: return SMS_SIGN_INVALID; - case BAD_API_KEY: return SMS_ACCOUNT_INVALID; - case API_NOT_ALLOWED: return SMS_PERMISSION_DENY; - case IP_NOT_ALLOWED: return SMS_IP_DENY; - } - return SMS_UNKNOWN; - } - -} diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/convert/config/InfConfigConvert.java b/src/main/java/cn/iocoder/dashboard/modules/infra/convert/config/InfConfigConvert.java deleted file mode 100644 index 93b3d2273..000000000 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/convert/config/InfConfigConvert.java +++ /dev/null @@ -1,29 +0,0 @@ -package cn.iocoder.dashboard.modules.infra.convert.config; - -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.infra.controller.config.vo.InfConfigCreateReqVO; -import cn.iocoder.dashboard.modules.infra.controller.config.vo.InfConfigExcelVO; -import cn.iocoder.dashboard.modules.infra.controller.config.vo.InfConfigRespVO; -import cn.iocoder.dashboard.modules.infra.controller.config.vo.InfConfigUpdateReqVO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.config.InfConfigDO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; - -@Mapper -public interface InfConfigConvert { - - InfConfigConvert INSTANCE = Mappers.getMapper(InfConfigConvert.class); - - PageResult convertPage(PageResult page); - - InfConfigRespVO convert(InfConfigDO bean); - - InfConfigDO convert(InfConfigCreateReqVO bean); - - InfConfigDO convert(InfConfigUpdateReqVO bean); - - List convertList(List list); - -} diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/mq/consumer/package-info.java b/src/main/java/cn/iocoder/dashboard/modules/infra/mq/consumer/package-info.java deleted file mode 100644 index 301ea9ad5..000000000 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/mq/consumer/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package cn.iocoder.dashboard.modules.infra.mq.consumer; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/mq/message/package-info.java b/src/main/java/cn/iocoder/dashboard/modules/infra/mq/message/package-info.java deleted file mode 100644 index 5c63e494c..000000000 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/mq/message/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package cn.iocoder.dashboard.modules.infra.mq.message; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/mq/producer/package-info.java b/src/main/java/cn/iocoder/dashboard/modules/infra/mq/producer/package-info.java deleted file mode 100644 index 0895cd99a..000000000 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/mq/producer/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package cn.iocoder.dashboard.modules.infra.mq.producer; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/operatelog/SysOperateLogCreateReqVO.java b/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/operatelog/SysOperateLogCreateReqVO.java deleted file mode 100644 index 5cb849093..000000000 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/operatelog/SysOperateLogCreateReqVO.java +++ /dev/null @@ -1,13 +0,0 @@ -package cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog; - -import io.swagger.annotations.ApiModel; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; - -@ApiModel(value = "操作日志创建 Request VO", description = "暂时提供给前端,仅仅后端切面记录操作日志时,进行使用") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class SysOperateLogCreateReqVO extends SysOperateLogBaseVO { -} diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/dept/SysDeptConvert.java b/src/main/java/cn/iocoder/dashboard/modules/system/convert/dept/SysDeptConvert.java deleted file mode 100644 index f114c3afb..000000000 --- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/dept/SysDeptConvert.java +++ /dev/null @@ -1,28 +0,0 @@ -package cn.iocoder.dashboard.modules.system.convert.dept; - -import cn.iocoder.dashboard.modules.system.controller.dept.vo.dept.SysDeptCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.dept.vo.dept.SysDeptRespVO; -import cn.iocoder.dashboard.modules.system.controller.dept.vo.dept.SysDeptSimpleRespVO; -import cn.iocoder.dashboard.modules.system.controller.dept.vo.dept.SysDeptUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysDeptDO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; - -@Mapper -public interface SysDeptConvert { - - SysDeptConvert INSTANCE = Mappers.getMapper(SysDeptConvert.class); - - List convertList(List list); - - List convertList02(List list); - - SysDeptRespVO convert(SysDeptDO bean); - - SysDeptDO convert(SysDeptCreateReqVO bean); - - SysDeptDO convert(SysDeptUpdateReqVO bean); - -} diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/errorcode/SysErrorCodeConvert.java b/src/main/java/cn/iocoder/dashboard/modules/system/convert/errorcode/SysErrorCodeConvert.java deleted file mode 100644 index 695c2fa02..000000000 --- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/errorcode/SysErrorCodeConvert.java +++ /dev/null @@ -1,42 +0,0 @@ -package cn.iocoder.dashboard.modules.system.convert.errorcode; - -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.errorcode.core.dto.ErrorCodeAutoGenerateReqDTO; -import cn.iocoder.dashboard.framework.errorcode.core.dto.ErrorCodeRespDTO; -import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodeCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodeExcelVO; -import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodeRespVO; -import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodeUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.errorcode.SysErrorCodeDO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; - -/** - * 错误码 Convert - * - * @author 芋道源码 - */ -@Mapper -public interface SysErrorCodeConvert { - - SysErrorCodeConvert INSTANCE = Mappers.getMapper(SysErrorCodeConvert.class); - - SysErrorCodeDO convert(SysErrorCodeCreateReqVO bean); - - SysErrorCodeDO convert(SysErrorCodeUpdateReqVO bean); - - SysErrorCodeRespVO convert(SysErrorCodeDO bean); - - List convertList(List list); - - PageResult convertPage(PageResult page); - - List convertList02(List list); - - SysErrorCodeDO convert(ErrorCodeAutoGenerateReqDTO bean); - - List convertList03(List list); - -} diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/logger/SysLoginLogConvert.java b/src/main/java/cn/iocoder/dashboard/modules/system/convert/logger/SysLoginLogConvert.java deleted file mode 100644 index 13c286273..000000000 --- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/logger/SysLoginLogConvert.java +++ /dev/null @@ -1,24 +0,0 @@ -package cn.iocoder.dashboard.modules.system.convert.logger; - -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogExcelVO; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogRespVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.logger.SysLoginLogDO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; - -@Mapper -public interface SysLoginLogConvert { - - SysLoginLogConvert INSTANCE = Mappers.getMapper(SysLoginLogConvert.class); - - SysLoginLogDO convert(SysLoginLogCreateReqVO bean); - - PageResult convertPage(PageResult page); - - List convertList(List list); - -} 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 deleted file mode 100644 index 8d6f20646..000000000 --- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/notice/SysNoticeConvert.java +++ /dev/null @@ -1,24 +0,0 @@ -package cn.iocoder.dashboard.modules.system.convert.notice; - -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.notice.vo.SysNoticeCreateReqVO; -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.dataobject.notice.SysNoticeDO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -@Mapper -public interface SysNoticeConvert { - - SysNoticeConvert INSTANCE = Mappers.getMapper(SysNoticeConvert.class); - - PageResult convertPage(PageResult page); - - SysNoticeRespVO convert(SysNoticeDO bean); - - SysNoticeDO convert(SysNoticeUpdateReqVO bean); - - SysNoticeDO convert(SysNoticeCreateReqVO bean); - -} diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/permission/SysMenuConvert.java b/src/main/java/cn/iocoder/dashboard/modules/system/convert/permission/SysMenuConvert.java deleted file mode 100644 index 3d5b2221a..000000000 --- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/permission/SysMenuConvert.java +++ /dev/null @@ -1,28 +0,0 @@ -package cn.iocoder.dashboard.modules.system.convert.permission; - -import cn.iocoder.dashboard.modules.system.controller.permission.vo.menu.SysMenuCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.permission.vo.menu.SysMenuRespVO; -import cn.iocoder.dashboard.modules.system.controller.permission.vo.menu.SysMenuSimpleRespVO; -import cn.iocoder.dashboard.modules.system.controller.permission.vo.menu.SysMenuUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysMenuDO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; - -@Mapper -public interface SysMenuConvert { - - SysMenuConvert INSTANCE = Mappers.getMapper(SysMenuConvert.class); - - List convertList(List list); - - SysMenuDO convert(SysMenuCreateReqVO bean); - - SysMenuDO convert(SysMenuUpdateReqVO bean); - - SysMenuRespVO convert(SysMenuDO bean); - - List convertList02(List list); - -} diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/notice/SysNoticeMapper.java b/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/notice/SysNoticeMapper.java deleted file mode 100644 index ead252d85..000000000 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/notice/SysNoticeMapper.java +++ /dev/null @@ -1,19 +0,0 @@ -package cn.iocoder.dashboard.modules.system.dal.mysql.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.modules.system.controller.notice.vo.SysNoticePageReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.notice.SysNoticeDO; -import org.apache.ibatis.annotations.Mapper; - -@Mapper -public interface SysNoticeMapper extends BaseMapperX { - - 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/enums/dict/SysDictTypeEnum.java b/src/main/java/cn/iocoder/dashboard/modules/system/enums/dict/SysDictTypeEnum.java deleted file mode 100644 index 59e6d0d13..000000000 --- a/src/main/java/cn/iocoder/dashboard/modules/system/enums/dict/SysDictTypeEnum.java +++ /dev/null @@ -1,39 +0,0 @@ -package cn.iocoder.dashboard.modules.system.enums.dict; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 字典类型的类型枚举 - */ -@Getter -@AllArgsConstructor -public enum SysDictTypeEnum { - - USER_TYPE("user_type"), // 用户类型 - - SYS_USER_SEX("sys_user_sex"), // 用户性别 - SYS_COMMON_STATUS("sys_common_status"), // 系统状态 - SYS_OPERATE_TYPE("sys_operate_type"), // 操作类型 - SYS_LOGIN_RESULT("sys_login_result"), // 登陆结果 - SYS_CONFIG_TYPE("sys_config_type"), // 参数配置类型 - SYS_BOOLEAN_STRING("sys_boolean_string"), // Boolean 是否类型 - SYS_SMS_CHANNEL_CODE("sys_sms_channel_code"), // 短信渠道编码 - SYS_SMS_TEMPLATE_TYPE("sys_sms_template_type"), // 短信模板类型 - SYS_SMS_SEND_STATUS("sys_sms_send_status"), // 短信发送状态 - SYS_SMS_RECEIVE_STATUS("sys_sms_receive_status"), // 短信接收状态 - SYS_ERROR_CODE_TYPE("inf_error_code_type"), // 错误码的类型枚举 - - INF_REDIS_TIMEOUT_TYPE("inf_redis_timeout_type"), // Redis 超时类型 - INF_JOB_STATUS("inf_job_status"), // 定时任务状态的枚举 - INF_JOB_LOG_STATUS("inf_job_log_status"), // 定时任务日志状态的枚举 - INF_API_ERROR_LOG_PROCESS_STATUS("inf_api_error_log_process_status"), // API 错误日志的处理状态的枚举 - ; - - - /** - * 值 - */ - private final String value; - -} diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/job/package-info.java b/src/main/java/cn/iocoder/dashboard/modules/system/job/package-info.java deleted file mode 100644 index de704997d..000000000 --- a/src/main/java/cn/iocoder/dashboard/modules/system/job/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package cn.iocoder.dashboard.modules.system.job; diff --git a/src/main/resources/META-INF/services/com.ctrip.framework.apollo.internals.Injector b/src/main/resources/META-INF/services/com.ctrip.framework.apollo.internals.Injector deleted file mode 100644 index a52f206f2..000000000 --- a/src/main/resources/META-INF/services/com.ctrip.framework.apollo.internals.Injector +++ /dev/null @@ -1 +0,0 @@ -cn.iocoder.dashboard.framework.apollo.internals.DefaultXInjector diff --git a/src/main/resources/META-INF/spring.factories b/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 8a5fa5488..000000000 --- a/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,2 +0,0 @@ -org.springframework.boot.env.EnvironmentPostProcessor=\ - cn.iocoder.dashboard.framework.apollo.spring.boot.ApolloApplicationContextInitializer diff --git a/src/test-integration/java/cn/iocoder/dashboard/framework/sms/core/client/package-info.java b/src/test-integration/java/cn/iocoder/dashboard/framework/sms/core/client/package-info.java deleted file mode 100644 index 037ce8ca2..000000000 --- a/src/test-integration/java/cn/iocoder/dashboard/framework/sms/core/client/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package cn.iocoder.dashboard.framework.sms.core.client; diff --git a/src/test-integration/java/cn/iocoder/dashboard/modules/system/service/package-info.java b/src/test-integration/java/cn/iocoder/dashboard/modules/system/service/package-info.java deleted file mode 100644 index 09c1d9d14..000000000 --- a/src/test-integration/java/cn/iocoder/dashboard/modules/system/service/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package cn.iocoder.dashboard.modules.system.service; diff --git a/src/test/java/cn/iocoder/dashboard/framework/package-info.java b/src/test/java/cn/iocoder/dashboard/framework/package-info.java deleted file mode 100644 index 0274647fb..000000000 --- a/src/test/java/cn/iocoder/dashboard/framework/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package cn.iocoder.dashboard.framework; diff --git a/yudao-admin-server/pom.xml b/yudao-admin-server/pom.xml new file mode 100644 index 000000000..107b67e6b --- /dev/null +++ b/yudao-admin-server/pom.xml @@ -0,0 +1,142 @@ + + + + cn.iocoder.boot + yudao + ${revision} + + 4.0.0 + + yudao-admin-server + jar + + yudao-admin-server + 管理后台 Server,提供其 API 接口 + https://github.com/YunaiV/ruoyi-vue-pro + + + + + cn.iocoder.boot + yudao-spring-boot-starter-biz-operatelog + + + cn.iocoder.boot + yudao-spring-boot-starter-biz-dict + + + cn.iocoder.boot + yudao-spring-boot-starter-biz-sms + + + + + cn.iocoder.boot + yudao-spring-boot-starter-web + + + + cn.iocoder.boot + yudao-spring-boot-starter-security + + + + + cn.iocoder.boot + yudao-spring-boot-starter-mybatis + + + + cn.iocoder.boot + yudao-spring-boot-starter-redis + + + + + cn.iocoder.boot + yudao-spring-boot-starter-config + + + + + cn.iocoder.boot + yudao-spring-boot-starter-job + + + + + cn.iocoder.boot + yudao-spring-boot-starter-mq + + + + + cn.iocoder.boot + yudao-spring-boot-starter-protection + + + + + cn.iocoder.boot + yudao-spring-boot-starter-monitor + + + + de.codecentric + spring-boot-admin-starter-server + + + + + cn.iocoder.boot + yudao-spring-boot-starter-test + test + + + + + cn.iocoder.boot + yudao-spring-boot-starter-excel + + + + org.apache.velocity + velocity-engine-core + + + + cn.smallbun.screw + screw-core + + + cn.iocoder.boot + yudao-spring-boot-starter-mq + + + + + + + ${artifactId} + + + + org.springframework.boot + spring-boot-maven-plugin + + true + + + + + repackage + + + + + + + + diff --git a/src/main/java/cn/iocoder/dashboard/DashboardApplication.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/AdminServerApplication.java similarity index 58% rename from src/main/java/cn/iocoder/dashboard/DashboardApplication.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/AdminServerApplication.java index 3161e147a..ba791871d 100644 --- a/src/main/java/cn/iocoder/dashboard/DashboardApplication.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/AdminServerApplication.java @@ -1,13 +1,13 @@ -package cn.iocoder.dashboard; +package cn.iocoder.yudao.adminserver; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication -public class DashboardApplication { +public class AdminServerApplication { public static void main(String[] args) { - SpringApplication.run(DashboardApplication.class, args); + SpringApplication.run(AdminServerApplication.class, args); } } diff --git a/src/main/java/cn/iocoder/dashboard/framework/async/config/AsyncConfiguration.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/framework/async/config/AsyncConfiguration.java similarity index 75% rename from src/main/java/cn/iocoder/dashboard/framework/async/config/AsyncConfiguration.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/framework/async/config/AsyncConfiguration.java index 58096d5da..720fc5a74 100644 --- a/src/main/java/cn/iocoder/dashboard/framework/async/config/AsyncConfiguration.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/framework/async/config/AsyncConfiguration.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.async.config; +package cn.iocoder.yudao.adminserver.framework.async.config; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.EnableAsync; diff --git a/src/main/java/cn/iocoder/dashboard/framework/async/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/framework/async/package-info.java similarity index 50% rename from src/main/java/cn/iocoder/dashboard/framework/async/package-info.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/framework/async/package-info.java index 375358995..aac87cd3a 100644 --- a/src/main/java/cn/iocoder/dashboard/framework/async/package-info.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/framework/async/package-info.java @@ -1,4 +1,4 @@ /** * 异步执行,基于 Spring @Async 实现 */ -package cn.iocoder.dashboard.framework.async; +package cn.iocoder.yudao.adminserver.framework.async; diff --git a/src/main/java/cn/iocoder/dashboard/framework/async/《芋道 Spring Boot 异步任务入门》.md b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/framework/async/《芋道 Spring Boot 异步任务入门》.md similarity index 100% rename from src/main/java/cn/iocoder/dashboard/framework/async/《芋道 Spring Boot 异步任务入门》.md rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/framework/async/《芋道 Spring Boot 异步任务入门》.md diff --git a/src/main/java/cn/iocoder/dashboard/framework/monitor/config/AdminServerConfiguration.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/framework/monitor/config/AdminServerConfiguration.java similarity index 76% rename from src/main/java/cn/iocoder/dashboard/framework/monitor/config/AdminServerConfiguration.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/framework/monitor/config/AdminServerConfiguration.java index 77c166c8f..c9614410d 100644 --- a/src/main/java/cn/iocoder/dashboard/framework/monitor/config/AdminServerConfiguration.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/framework/monitor/config/AdminServerConfiguration.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.monitor.config; +package cn.iocoder.yudao.adminserver.framework.monitor.config; import de.codecentric.boot.admin.server.config.EnableAdminServer; import org.springframework.context.annotation.Configuration; diff --git a/src/main/java/cn/iocoder/dashboard/framework/monitor/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/framework/monitor/package-info.java similarity index 53% rename from src/main/java/cn/iocoder/dashboard/framework/monitor/package-info.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/framework/monitor/package-info.java index dec6e31fb..0d380cfaa 100644 --- a/src/main/java/cn/iocoder/dashboard/framework/monitor/package-info.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/framework/monitor/package-info.java @@ -1,4 +1,4 @@ /** * 使用 Spring Boot Admin 实现简单的监控平台 */ -package cn.iocoder.dashboard.framework.monitor; +package cn.iocoder.yudao.adminserver.framework.monitor; diff --git a/src/main/java/cn/iocoder/dashboard/framework/monitor/《芋道 Spring Boot 监控工具 Admin 入门》.md b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/framework/monitor/《芋道 Spring Boot 监控工具 Admin 入门》.md similarity index 100% rename from src/main/java/cn/iocoder/dashboard/framework/monitor/《芋道 Spring Boot 监控工具 Admin 入门》.md rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/framework/monitor/《芋道 Spring Boot 监控工具 Admin 入门》.md diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/framework/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/framework/package-info.java new file mode 100644 index 000000000..fcb2a0936 --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/framework/package-info.java @@ -0,0 +1,6 @@ +/** + * 属于整个 yudao-admin-server 的 framework 封装 + * + * @author 芋道源码 + */ +package cn.iocoder.yudao.adminserver.framework; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/InfConfigController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/config/InfConfigController.java similarity index 78% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/InfConfigController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/config/InfConfigController.java index a0a9ec62f..b0ff2ca9a 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/InfConfigController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/config/InfConfigController.java @@ -1,13 +1,13 @@ -package cn.iocoder.dashboard.modules.infra.controller.config; +package cn.iocoder.yudao.adminserver.modules.infra.controller.config; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; -import cn.iocoder.dashboard.modules.infra.controller.config.vo.*; -import cn.iocoder.dashboard.modules.infra.convert.config.InfConfigConvert; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.config.InfConfigDO; -import cn.iocoder.dashboard.modules.infra.service.config.InfConfigService; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.*; +import cn.iocoder.yudao.adminserver.modules.infra.convert.config.InfConfigConvert; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.config.InfConfigDO; +import cn.iocoder.yudao.adminserver.modules.infra.service.config.InfConfigService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -21,10 +21,10 @@ import javax.validation.Valid; import java.io.IOException; import java.util.List; -import static cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; -import static cn.iocoder.dashboard.modules.infra.enums.InfErrorCodeConstants.CONFIG_GET_VALUE_ERROR_IF_SENSITIVE; +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.adminserver.modules.infra.enums.InfErrorCodeConstants.CONFIG_GET_VALUE_ERROR_IF_SENSITIVE; @Api(tags = "参数配置") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/vo/InfConfigBaseVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/config/vo/InfConfigBaseVO.java similarity index 95% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/vo/InfConfigBaseVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/config/vo/InfConfigBaseVO.java index c8034e425..82b0f48ed 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/vo/InfConfigBaseVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/config/vo/InfConfigBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.infra.controller.config.vo; +package cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/vo/InfConfigCreateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/config/vo/InfConfigCreateReqVO.java similarity index 89% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/vo/InfConfigCreateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/config/vo/InfConfigCreateReqVO.java index 7b0bcfb5d..ee2b90abc 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/vo/InfConfigCreateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/config/vo/InfConfigCreateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.infra.controller.config.vo; +package cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/vo/InfConfigExcelVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/config/vo/InfConfigExcelVO.java similarity index 67% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/vo/InfConfigExcelVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/config/vo/InfConfigExcelVO.java index a11de329c..2a5c04498 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/vo/InfConfigExcelVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/config/vo/InfConfigExcelVO.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.infra.controller.config.vo; +package cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo; -import cn.iocoder.dashboard.framework.excel.core.annotations.DictFormat; -import cn.iocoder.dashboard.framework.excel.core.convert.DictConvert; -import cn.iocoder.dashboard.modules.system.enums.dict.SysDictTypeEnum; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.adminserver.modules.system.enums.SysDictTypeConstants; import com.alibaba.excel.annotation.ExcelProperty; import lombok.Data; @@ -30,11 +30,11 @@ public class InfConfigExcelVO { private String value; @ExcelProperty(value = "参数类型", converter = DictConvert.class) - @DictFormat(SysDictTypeEnum.SYS_CONFIG_TYPE) + @DictFormat(SysDictTypeConstants.CONFIG_TYPE) private Integer type; @ExcelProperty(value = "是否敏感", converter = DictConvert.class) - @DictFormat(SysDictTypeEnum.SYS_BOOLEAN_STRING) + @DictFormat(SysDictTypeConstants.BOOLEAN_STRING) private Boolean sensitive; @ExcelProperty("备注") diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/vo/InfConfigExportReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/config/vo/InfConfigExportReqVO.java similarity index 84% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/vo/InfConfigExportReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/config/vo/InfConfigExportReqVO.java index d8f549c9b..550a5dfc4 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/vo/InfConfigExportReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/config/vo/InfConfigExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.infra.controller.config.vo; +package cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,7 +7,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel("参数配置导出 Request VO") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/vo/InfConfigPageReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/config/vo/InfConfigPageReqVO.java similarity index 82% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/vo/InfConfigPageReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/config/vo/InfConfigPageReqVO.java index be4710d74..3f031fa2c 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/vo/InfConfigPageReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/config/vo/InfConfigPageReqVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.infra.controller.config.vo; +package cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo; -import cn.iocoder.dashboard.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -10,7 +10,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel("参数配置分页 Request VO") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/vo/InfConfigRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/config/vo/InfConfigRespVO.java similarity index 93% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/vo/InfConfigRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/config/vo/InfConfigRespVO.java index 10673e2d3..84689b70b 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/vo/InfConfigRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/config/vo/InfConfigRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.infra.controller.config.vo; +package cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/vo/InfConfigUpdateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/config/vo/InfConfigUpdateReqVO.java similarity index 88% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/vo/InfConfigUpdateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/config/vo/InfConfigUpdateReqVO.java index 478f3081b..7e9d49ca7 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/vo/InfConfigUpdateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/config/vo/InfConfigUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.infra.controller.config.vo; +package cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/doc/InfDbDocController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/doc/InfDbDocController.java similarity index 88% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/doc/InfDbDocController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/doc/InfDbDocController.java index 6d21d772c..48b52f88a 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/doc/InfDbDocController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/doc/InfDbDocController.java @@ -1,14 +1,16 @@ -package cn.iocoder.dashboard.modules.infra.controller.doc; +package cn.iocoder.yudao.adminserver.modules.infra.controller.doc; import cn.hutool.core.io.FileUtil; import cn.hutool.core.util.IdUtil; -import cn.iocoder.dashboard.util.servlet.ServletUtils; +import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; import cn.smallbun.screw.core.Configuration; import cn.smallbun.screw.core.engine.EngineConfig; import cn.smallbun.screw.core.engine.EngineFileType; import cn.smallbun.screw.core.engine.EngineTemplateType; import cn.smallbun.screw.core.execute.DocumentationExecute; import cn.smallbun.screw.core.process.ProcessConfig; +import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DataSourceProperty; +import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties; import com.zaxxer.hikari.HikariConfig; import com.zaxxer.hikari.HikariDataSource; import io.swagger.annotations.Api; @@ -32,7 +34,7 @@ import java.util.Collections; public class InfDbDocController { @Resource - private DataSourceProperties dataSourceProperties; + private DynamicDataSourceProperties dynamicDataSourceProperties; private static final String FILE_OUTPUT_DIR = System.getProperty("java.io.tmpdir") + File.separator + "db-doc"; @@ -114,11 +116,14 @@ public class InfDbDocController { */ // TODO 芋艿:screw 暂时不支持 druid,尴尬 private HikariDataSource buildDataSource() { + // 获得 DataSource 数据源,目前只支持首个 + String primary = dynamicDataSourceProperties.getPrimary(); + DataSourceProperty dataSourceProperty = dynamicDataSourceProperties.getDatasource().get(primary); // 创建 HikariConfig 配置类 HikariConfig hikariConfig = new HikariConfig(); - hikariConfig.setJdbcUrl(dataSourceProperties.getUrl()); - hikariConfig.setUsername(dataSourceProperties.getUsername()); - hikariConfig.setPassword(dataSourceProperties.getPassword()); + hikariConfig.setJdbcUrl(dataSourceProperty.getUrl()); + hikariConfig.setUsername(dataSourceProperty.getUsername()); + hikariConfig.setPassword(dataSourceProperty.getPassword()); hikariConfig.addDataSourceProperty("useInformationSchema", "true"); // 设置可以获取 tables remarks 信息 // 创建数据源 return new HikariDataSource(hikariConfig); diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/file/InfFileController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/file/InfFileController.java similarity index 79% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/file/InfFileController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/file/InfFileController.java index a21f0d817..223aa9001 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/file/InfFileController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/file/InfFileController.java @@ -1,14 +1,14 @@ -package cn.iocoder.dashboard.modules.infra.controller.file; +package cn.iocoder.yudao.adminserver.modules.infra.controller.file; import cn.hutool.core.io.IoUtil; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.infra.controller.file.vo.InfFilePageReqVO; -import cn.iocoder.dashboard.modules.infra.controller.file.vo.InfFileRespVO; -import cn.iocoder.dashboard.modules.infra.convert.file.InfFileConvert; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.file.InfFileDO; -import cn.iocoder.dashboard.modules.infra.service.file.InfFileService; -import cn.iocoder.dashboard.util.servlet.ServletUtils; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.infra.controller.file.vo.InfFilePageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.file.vo.InfFileRespVO; +import cn.iocoder.yudao.adminserver.modules.infra.convert.file.InfFileConvert; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.file.InfFileDO; +import cn.iocoder.yudao.adminserver.modules.infra.service.file.InfFileService; +import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -25,7 +25,7 @@ import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; import java.io.IOException; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @Api(tags = "文件存储") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/file/vo/InfFilePageReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/file/vo/InfFilePageReqVO.java similarity index 80% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/file/vo/InfFilePageReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/file/vo/InfFilePageReqVO.java index 8eae6e6c7..152466a19 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/file/vo/InfFilePageReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/file/vo/InfFilePageReqVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.infra.controller.file.vo; +package cn.iocoder.yudao.adminserver.modules.infra.controller.file.vo; -import cn.iocoder.dashboard.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -10,7 +10,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel("文件分页 Request VO") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/file/vo/InfFileRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/file/vo/InfFileRespVO.java similarity index 88% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/file/vo/InfFileRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/file/vo/InfFileRespVO.java index e78074da5..2388d7f3d 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/file/vo/InfFileRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/file/vo/InfFileRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.infra.controller.file.vo; +package cn.iocoder.yudao.adminserver.modules.infra.controller.file.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/InfJobController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/InfJobController.java similarity index 87% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/InfJobController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/InfJobController.java index 90894c6d4..1cd3c8dc7 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/InfJobController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/InfJobController.java @@ -1,14 +1,14 @@ -package cn.iocoder.dashboard.modules.infra.controller.job; +package cn.iocoder.yudao.adminserver.modules.infra.controller.job; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; -import cn.iocoder.dashboard.framework.quartz.core.util.CronUtils; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.job.*; -import cn.iocoder.dashboard.modules.infra.convert.job.InfJobConvert; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.job.InfJobDO; -import cn.iocoder.dashboard.modules.infra.service.job.InfJobService; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.quartz.core.util.CronUtils; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.*; +import cn.iocoder.yudao.adminserver.modules.infra.convert.job.InfJobConvert; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job.InfJobDO; +import cn.iocoder.yudao.adminserver.modules.infra.service.job.InfJobService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -27,8 +27,8 @@ import java.util.Collections; import java.util.Date; import java.util.List; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "定时任务") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/InfJobLogController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/InfJobLogController.java similarity index 72% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/InfJobLogController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/InfJobLogController.java index 704e951d9..d6e263980 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/InfJobLogController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/InfJobLogController.java @@ -1,16 +1,16 @@ -package cn.iocoder.dashboard.modules.infra.controller.job; +package cn.iocoder.yudao.adminserver.modules.infra.controller.job; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.log.InfJobLogExcelVO; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.log.InfJobLogExportReqVO; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.log.InfJobLogPageReqVO; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.log.InfJobLogRespVO; -import cn.iocoder.dashboard.modules.infra.convert.job.InfJobLogConvert; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.job.InfJobLogDO; -import cn.iocoder.dashboard.modules.infra.service.job.InfJobLogService; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogExcelVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogRespVO; +import cn.iocoder.yudao.adminserver.modules.infra.convert.job.InfJobLogConvert; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job.InfJobLogDO; +import cn.iocoder.yudao.adminserver.modules.infra.service.job.InfJobLogService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -28,8 +28,8 @@ import java.io.IOException; import java.util.Collection; import java.util.List; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "定时任务日志") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/job/InfJobBaseVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/job/InfJobBaseVO.java similarity index 94% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/job/InfJobBaseVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/job/InfJobBaseVO.java index 2df3ad823..2d7b51f24 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/job/InfJobBaseVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/job/InfJobBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.infra.controller.job.vo.job; +package cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/job/InfJobCreateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/job/InfJobCreateReqVO.java similarity index 88% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/job/InfJobCreateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/job/InfJobCreateReqVO.java index a8ba55d8e..b2325d741 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/job/InfJobCreateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/job/InfJobCreateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.infra.controller.job.vo.job; +package cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/job/InfJobExcelVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/job/InfJobExcelVO.java similarity index 76% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/job/InfJobExcelVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/job/InfJobExcelVO.java index 531dd843d..0d9daf8eb 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/job/InfJobExcelVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/job/InfJobExcelVO.java @@ -1,14 +1,13 @@ -package cn.iocoder.dashboard.modules.infra.controller.job.vo.job; +package cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job; -import cn.iocoder.dashboard.framework.excel.core.annotations.DictFormat; -import cn.iocoder.dashboard.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.adminserver.modules.infra.enums.InfDictTypeConstants; import com.alibaba.excel.annotation.ExcelProperty; import lombok.Data; import java.util.Date; -import static cn.iocoder.dashboard.modules.system.enums.dict.SysDictTypeEnum.INF_JOB_STATUS; - /** * 定时任务 Excel VO * @@ -24,7 +23,7 @@ public class InfJobExcelVO { private String name; @ExcelProperty(value = "任务状态", converter = DictConvert.class) - @DictFormat(INF_JOB_STATUS) + @DictFormat(InfDictTypeConstants.JOB_STATUS) private Integer status; @ExcelProperty("处理器的名字") diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/job/InfJobExportReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/job/InfJobExportReqVO.java similarity index 90% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/job/InfJobExportReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/job/InfJobExportReqVO.java index a0fe9f39e..9c578e96c 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/job/InfJobExportReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/job/InfJobExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.infra.controller.job.vo.job; +package cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/job/InfJobPageReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/job/InfJobPageReqVO.java similarity index 84% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/job/InfJobPageReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/job/InfJobPageReqVO.java index a2e700ee5..eec31e9b3 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/job/InfJobPageReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/job/InfJobPageReqVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.infra.controller.job.vo.job; +package cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job; -import cn.iocoder.dashboard.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/job/InfJobRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/job/InfJobRespVO.java similarity index 92% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/job/InfJobRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/job/InfJobRespVO.java index c23eb8b5c..ffe3a6914 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/job/InfJobRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/job/InfJobRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.infra.controller.job.vo.job; +package cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/job/InfJobUpdateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/job/InfJobUpdateReqVO.java similarity index 87% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/job/InfJobUpdateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/job/InfJobUpdateReqVO.java index 1316667a4..d741a98e4 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/job/InfJobUpdateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/job/InfJobUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.infra.controller.job.vo.job; +package cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/log/InfJobLogBaseVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/log/InfJobLogBaseVO.java similarity index 90% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/log/InfJobLogBaseVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/log/InfJobLogBaseVO.java index 81c1d5899..0dbd67e9c 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/log/InfJobLogBaseVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/log/InfJobLogBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.infra.controller.job.vo.log; +package cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -7,7 +7,7 @@ import org.springframework.format.annotation.DateTimeFormat; import javax.validation.constraints.NotNull; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; /** * 定时任务日志 Base VO,提供给添加、修改、详细的子 VO 使用 diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/log/InfJobLogExcelVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/log/InfJobLogExcelVO.java similarity index 74% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/log/InfJobLogExcelVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/log/InfJobLogExcelVO.java index 6f6d829f9..fd7078b70 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/log/InfJobLogExcelVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/log/InfJobLogExcelVO.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.infra.controller.job.vo.log; +package cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log; -import cn.iocoder.dashboard.framework.excel.core.annotations.DictFormat; -import cn.iocoder.dashboard.framework.excel.core.convert.DictConvert; -import cn.iocoder.dashboard.modules.system.enums.dict.SysDictTypeEnum; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.adminserver.modules.infra.enums.InfDictTypeConstants; import com.alibaba.excel.annotation.ExcelProperty; import lombok.Data; @@ -41,7 +41,7 @@ public class InfJobLogExcelVO { private Integer duration; @ExcelProperty(value = "任务状态", converter = DictConvert.class) - @DictFormat(SysDictTypeEnum.INF_JOB_STATUS) + @DictFormat(InfDictTypeConstants.JOB_STATUS) private Integer status; @ExcelProperty("结果数据") diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/log/InfJobLogExportReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/log/InfJobLogExportReqVO.java similarity index 82% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/log/InfJobLogExportReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/log/InfJobLogExportReqVO.java index e5fd05a77..3e3e85b58 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/log/InfJobLogExportReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/log/InfJobLogExportReqVO.java @@ -1,14 +1,13 @@ -package cn.iocoder.dashboard.modules.infra.controller.job.vo.log; +package cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; -import javax.validation.constraints.NotNull; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel(value = "定时任务 Excel 导出 Request VO", description = "参数和 InfJobLogPageReqVO 是一致的") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/log/InfJobLogPageReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/log/InfJobLogPageReqVO.java similarity index 81% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/log/InfJobLogPageReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/log/InfJobLogPageReqVO.java index 5a679ab69..0c5b55867 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/log/InfJobLogPageReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/log/InfJobLogPageReqVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.infra.controller.job.vo.log; +package cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log; -import cn.iocoder.dashboard.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -10,7 +10,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel("定时任务日志分页 Request VO") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/log/InfJobLogRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/log/InfJobLogRespVO.java similarity index 88% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/log/InfJobLogRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/log/InfJobLogRespVO.java index 72587f5df..497e6913d 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/vo/log/InfJobLogRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/job/vo/log/InfJobLogRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.infra.controller.job.vo.log; +package cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/InfApiAccessLogController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/InfApiAccessLogController.java similarity index 60% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/InfApiAccessLogController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/InfApiAccessLogController.java index 4a40424d7..434fb1f75 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/InfApiAccessLogController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/InfApiAccessLogController.java @@ -1,24 +1,22 @@ -package cn.iocoder.dashboard.modules.infra.controller.logger; +package cn.iocoder.yudao.adminserver.modules.infra.controller.logger; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogExcelVO; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogExportReqVO; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogPageReqVO; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogRespVO; -import cn.iocoder.dashboard.modules.infra.convert.logger.InfApiAccessLogConvert; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.logger.InfApiAccessLogDO; -import cn.iocoder.dashboard.modules.infra.service.logger.InfApiAccessLogService; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogExcelVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogRespVO; +import cn.iocoder.yudao.adminserver.modules.infra.convert.logger.InfApiAccessLogConvert; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.logger.InfApiAccessLogDO; +import cn.iocoder.yudao.adminserver.modules.infra.service.logger.InfApiAccessLogService; import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; @@ -27,8 +25,8 @@ import javax.validation.Valid; import java.io.IOException; import java.util.List; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "API 访问日志") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/InfApiErrorLogController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/InfApiErrorLogController.java similarity index 67% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/InfApiErrorLogController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/InfApiErrorLogController.java index 4e868fe50..abc227fae 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/InfApiErrorLogController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/InfApiErrorLogController.java @@ -1,16 +1,16 @@ -package cn.iocoder.dashboard.modules.infra.controller.logger; +package cn.iocoder.yudao.adminserver.modules.infra.controller.logger; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogExcelVO; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogExportReqVO; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogPageReqVO; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogRespVO; -import cn.iocoder.dashboard.modules.infra.convert.logger.InfApiErrorLogConvert; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.logger.InfApiErrorLogDO; -import cn.iocoder.dashboard.modules.infra.service.logger.InfApiErrorLogService; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogExcelVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogRespVO; +import cn.iocoder.yudao.adminserver.modules.infra.convert.logger.InfApiErrorLogConvert; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.logger.InfApiErrorLogDO; +import cn.iocoder.yudao.adminserver.modules.infra.service.logger.InfApiErrorLogService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -25,9 +25,9 @@ import javax.validation.Valid; import java.io.IOException; import java.util.List; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; -import static cn.iocoder.dashboard.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; @Api(tags = "API 错误日志") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogBaseVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogBaseVO.java similarity index 93% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogBaseVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogBaseVO.java index 04dbf39ce..d5e300f62 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogBaseVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog; +package cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -7,7 +7,7 @@ import org.springframework.format.annotation.DateTimeFormat; import javax.validation.constraints.NotNull; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; /** * API 访问日志 Base VO,提供给添加、修改、详细的子 VO 使用 diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogExcelVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogExcelVO.java similarity index 78% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogExcelVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogExcelVO.java index 9d2f4b1c6..d0265351f 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogExcelVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogExcelVO.java @@ -1,14 +1,13 @@ -package cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog; +package cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog; -import cn.iocoder.dashboard.framework.excel.core.annotations.DictFormat; -import cn.iocoder.dashboard.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.adminserver.modules.system.enums.SysDictTypeConstants; import com.alibaba.excel.annotation.ExcelProperty; import lombok.Data; import java.util.Date; -import static cn.iocoder.dashboard.modules.system.enums.dict.SysDictTypeEnum.USER_TYPE; - /** * API 访问日志 Excel VO * @@ -27,7 +26,7 @@ public class InfApiAccessLogExcelVO { private Long userId; @ExcelProperty(value = "用户类型", converter = DictConvert.class) - @DictFormat(USER_TYPE) + @DictFormat(SysDictTypeConstants.USER_TYPE) private Integer userType; @ExcelProperty("应用名") diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogExportReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogExportReqVO.java similarity index 87% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogExportReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogExportReqVO.java index 7821cfc89..8e9dc409d 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogExportReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog; +package cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,7 +7,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel(value = "API 访问日志 Excel 导出 Request VO", description = "参数和 InfApiAccessLogPageReqVO 是一致的") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogPageReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogPageReqVO.java similarity index 84% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogPageReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogPageReqVO.java index df0b12b9f..c04520528 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogPageReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogPageReqVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog; +package cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog; -import cn.iocoder.dashboard.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -10,7 +10,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel("API 访问日志分页 Request VO") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogRespVO.java similarity index 86% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogRespVO.java index d3300c8c6..15dbed3e1 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apiaccesslog/InfApiAccessLogRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog; +package cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogBaseVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogBaseVO.java similarity index 95% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogBaseVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogBaseVO.java index ca9aa0cbe..87eb2ddd6 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogBaseVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog; +package cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -7,7 +7,7 @@ import org.springframework.format.annotation.DateTimeFormat; import javax.validation.constraints.NotNull; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; /** * API 错误日志 Base VO,提供给添加、修改、详细的子 VO 使用 diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogExcelVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogExcelVO.java similarity index 79% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogExcelVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogExcelVO.java index ddf52a1ab..3224a3017 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogExcelVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogExcelVO.java @@ -1,15 +1,14 @@ -package cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog; +package cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog; -import cn.iocoder.dashboard.framework.excel.core.annotations.DictFormat; -import cn.iocoder.dashboard.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.adminserver.modules.infra.enums.InfDictTypeConstants; +import cn.iocoder.yudao.adminserver.modules.system.enums.SysDictTypeConstants; import com.alibaba.excel.annotation.ExcelProperty; import lombok.Data; import java.util.Date; -import static cn.iocoder.dashboard.modules.system.enums.dict.SysDictTypeEnum.INF_API_ERROR_LOG_PROCESS_STATUS; -import static cn.iocoder.dashboard.modules.system.enums.dict.SysDictTypeEnum.USER_TYPE; - /** * API 错误日志 Excel VO * @@ -28,7 +27,7 @@ public class InfApiErrorLogExcelVO { private Integer userId; @ExcelProperty(value = "用户类型", converter = DictConvert.class) - @DictFormat(USER_TYPE) + @DictFormat(SysDictTypeConstants.USER_TYPE) private Integer userType; @ExcelProperty("应用名") @@ -80,7 +79,7 @@ public class InfApiErrorLogExcelVO { private Date createTime; @ExcelProperty(value = "处理状态", converter = DictConvert.class) - @DictFormat(INF_API_ERROR_LOG_PROCESS_STATUS) + @DictFormat(InfDictTypeConstants.API_ERROR_LOG_PROCESS_STATUS) private Integer processStatus; @ExcelProperty("处理时间") diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogExportReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogExportReqVO.java similarity index 85% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogExportReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogExportReqVO.java index 991987d0e..a86288e1c 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogExportReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog; +package cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,7 +7,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel(value = "API 错误日志 Excel 导出 Request VO", description = "参数和 InfApiErrorLogPageReqVO 是一致的") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogPageReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogPageReqVO.java similarity index 83% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogPageReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogPageReqVO.java index c966ab068..cc47dd8d3 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogPageReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogPageReqVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog; +package cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog; -import cn.iocoder.dashboard.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -10,7 +10,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel("API 错误日志分页 Request VO") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogRespVO.java similarity index 89% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogRespVO.java index 9ac31540d..9e4521c11 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/logger/vo/apierrorlog/InfApiErrorLogRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog; +package cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/redis/RedisController.http b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/redis/RedisController.http similarity index 100% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/redis/RedisController.http rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/redis/RedisController.http diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/redis/RedisController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/redis/RedisController.java similarity index 76% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/redis/RedisController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/redis/RedisController.java index 61932e6df..f39a38b2e 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/redis/RedisController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/redis/RedisController.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.infra.controller.redis; +package cn.iocoder.yudao.adminserver.modules.infra.controller.redis; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.framework.redis.core.RedisKeyDefine; -import cn.iocoder.dashboard.framework.redis.core.RedisKeyRegistry; -import cn.iocoder.dashboard.modules.infra.controller.redis.vo.InfRedisKeyRespVO; -import cn.iocoder.dashboard.modules.infra.controller.redis.vo.InfRedisMonitorRespVO; -import cn.iocoder.dashboard.modules.infra.convert.redis.RedisConvert; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.redis.core.RedisKeyDefine; +import cn.iocoder.yudao.framework.redis.core.RedisKeyRegistry; +import cn.iocoder.yudao.adminserver.modules.infra.controller.redis.vo.InfRedisKeyRespVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.redis.vo.InfRedisMonitorRespVO; +import cn.iocoder.yudao.adminserver.modules.infra.convert.redis.RedisConvert; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.data.redis.connection.RedisServerCommands; @@ -20,7 +20,7 @@ import javax.annotation.Resource; import java.util.List; import java.util.Properties; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @Api(tags = "Redis 监控") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/redis/vo/InfRedisKeyRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/redis/vo/InfRedisKeyRespVO.java similarity index 88% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/redis/vo/InfRedisKeyRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/redis/vo/InfRedisKeyRespVO.java index d62297c7d..60a14cf40 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/redis/vo/InfRedisKeyRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/redis/vo/InfRedisKeyRespVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.infra.controller.redis.vo; +package cn.iocoder.yudao.adminserver.modules.infra.controller.redis.vo; -import cn.iocoder.dashboard.framework.redis.core.RedisKeyDefine; +import cn.iocoder.yudao.framework.redis.core.RedisKeyDefine; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/redis/vo/InfRedisMonitorRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/redis/vo/InfRedisMonitorRespVO.java similarity index 94% rename from src/main/java/cn/iocoder/dashboard/modules/infra/controller/redis/vo/InfRedisMonitorRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/redis/vo/InfRedisMonitorRespVO.java index 35389c7f5..8481fa92f 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/redis/vo/InfRedisMonitorRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/redis/vo/InfRedisMonitorRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.infra.controller.redis.vo; +package cn.iocoder.yudao.adminserver.modules.infra.controller.redis.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/config/InfConfigConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/config/InfConfigConvert.java new file mode 100644 index 000000000..0b076b6e0 --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/config/InfConfigConvert.java @@ -0,0 +1,29 @@ +package cn.iocoder.yudao.adminserver.modules.infra.convert.config; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigExcelVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigRespVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.config.InfConfigDO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +import java.util.List; + +@Mapper +public interface InfConfigConvert { + + InfConfigConvert INSTANCE = Mappers.getMapper(InfConfigConvert.class); + + PageResult convertPage(PageResult page); + + InfConfigRespVO convert(InfConfigDO bean); + + InfConfigDO convert(InfConfigCreateReqVO bean); + + InfConfigDO convert(InfConfigUpdateReqVO bean); + + List convertList(List list); + +} diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/convert/file/InfFileConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/file/InfFileConvert.java similarity index 51% rename from src/main/java/cn/iocoder/dashboard/modules/infra/convert/file/InfFileConvert.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/file/InfFileConvert.java index 9b8d49b6a..9d3e95ca9 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/convert/file/InfFileConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/file/InfFileConvert.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.infra.convert.file; +package cn.iocoder.yudao.adminserver.modules.infra.convert.file; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.infra.controller.file.vo.InfFileRespVO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.file.InfFileDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.infra.controller.file.vo.InfFileRespVO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.file.InfFileDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/convert/job/InfJobConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/job/InfJobConvert.java similarity index 51% rename from src/main/java/cn/iocoder/dashboard/modules/infra/convert/job/InfJobConvert.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/job/InfJobConvert.java index 2f871361c..2b6fbc1d9 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/convert/job/InfJobConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/job/InfJobConvert.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.infra.convert.job; +package cn.iocoder.yudao.adminserver.modules.infra.convert.job; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.job.InfJobCreateReqVO; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.job.InfJobExcelVO; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.job.InfJobRespVO; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.job.InfJobUpdateReqVO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.job.InfJobDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobExcelVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobRespVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job.InfJobDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/convert/job/InfJobLogConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/job/InfJobLogConvert.java similarity index 58% rename from src/main/java/cn/iocoder/dashboard/modules/infra/convert/job/InfJobLogConvert.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/job/InfJobLogConvert.java index b08e03028..146c7fb34 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/convert/job/InfJobLogConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/job/InfJobLogConvert.java @@ -1,9 +1,9 @@ -package cn.iocoder.dashboard.modules.infra.convert.job; +package cn.iocoder.yudao.adminserver.modules.infra.convert.job; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.log.InfJobLogExcelVO; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.log.InfJobLogRespVO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.job.InfJobLogDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogExcelVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogRespVO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job.InfJobLogDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/convert/logger/InfApiAccessLogConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/logger/InfApiAccessLogConvert.java similarity index 56% rename from src/main/java/cn/iocoder/dashboard/modules/infra/convert/logger/InfApiAccessLogConvert.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/logger/InfApiAccessLogConvert.java index be013240f..71b319cb4 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/convert/logger/InfApiAccessLogConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/logger/InfApiAccessLogConvert.java @@ -1,10 +1,10 @@ -package cn.iocoder.dashboard.modules.infra.convert.logger; +package cn.iocoder.yudao.adminserver.modules.infra.convert.logger; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.logger.apilog.core.service.dto.ApiAccessLogCreateDTO; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogExcelVO; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogRespVO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.logger.InfApiAccessLogDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiAccessLogCreateDTO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogExcelVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogRespVO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.logger.InfApiAccessLogDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/convert/logger/InfApiErrorLogConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/logger/InfApiErrorLogConvert.java similarity index 53% rename from src/main/java/cn/iocoder/dashboard/modules/infra/convert/logger/InfApiErrorLogConvert.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/logger/InfApiErrorLogConvert.java index f949da21e..359ffafc0 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/convert/logger/InfApiErrorLogConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/logger/InfApiErrorLogConvert.java @@ -1,10 +1,10 @@ -package cn.iocoder.dashboard.modules.infra.convert.logger; +package cn.iocoder.yudao.adminserver.modules.infra.convert.logger; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.logger.apilog.core.service.dto.ApiErrorLogCreateDTO; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogExcelVO; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogRespVO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.logger.InfApiErrorLogDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiErrorLogCreateDTO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogExcelVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogRespVO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.logger.InfApiErrorLogDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/convert/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/package-info.java similarity index 56% rename from src/main/java/cn/iocoder/dashboard/modules/infra/convert/package-info.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/package-info.java index 6be625219..3c74fe7ad 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/convert/package-info.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/package-info.java @@ -3,4 +3,4 @@ * * 目前使用 MapStruct 框架 */ -package cn.iocoder.dashboard.modules.infra.convert; +package cn.iocoder.yudao.adminserver.modules.infra.convert; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/convert/redis/RedisConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/redis/RedisConvert.java similarity index 78% rename from src/main/java/cn/iocoder/dashboard/modules/infra/convert/redis/RedisConvert.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/redis/RedisConvert.java index b4ae4e20f..3cfa92af9 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/convert/redis/RedisConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/redis/RedisConvert.java @@ -1,9 +1,9 @@ -package cn.iocoder.dashboard.modules.infra.convert.redis; +package cn.iocoder.yudao.adminserver.modules.infra.convert.redis; import cn.hutool.core.util.StrUtil; -import cn.iocoder.dashboard.framework.redis.core.RedisKeyDefine; -import cn.iocoder.dashboard.modules.infra.controller.redis.vo.InfRedisKeyRespVO; -import cn.iocoder.dashboard.modules.infra.controller.redis.vo.InfRedisMonitorRespVO; +import cn.iocoder.yudao.framework.redis.core.RedisKeyDefine; +import cn.iocoder.yudao.adminserver.modules.infra.controller.redis.vo.InfRedisKeyRespVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.redis.vo.InfRedisMonitorRespVO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/convert/《芋道 Spring Boot 对象转换 MapStruct 入门》.md b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/《芋道 Spring Boot 对象转换 MapStruct 入门》.md similarity index 100% rename from src/main/java/cn/iocoder/dashboard/modules/infra/convert/《芋道 Spring Boot 对象转换 MapStruct 入门》.md rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/convert/《芋道 Spring Boot 对象转换 MapStruct 入门》.md diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/dataobject/config/InfConfigDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/dataobject/config/InfConfigDO.java similarity index 83% rename from src/main/java/cn/iocoder/dashboard/modules/infra/dal/dataobject/config/InfConfigDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/dataobject/config/InfConfigDO.java index a090e40cd..119d069d9 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/dataobject/config/InfConfigDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/dataobject/config/InfConfigDO.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.infra.dal.dataobject.config; +package cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.config; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.modules.infra.enums.config.InfConfigTypeEnum; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.adminserver.modules.infra.enums.config.InfConfigTypeEnum; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/dataobject/file/InfFileDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/dataobject/file/InfFileDO.java similarity index 85% rename from src/main/java/cn/iocoder/dashboard/modules/infra/dal/dataobject/file/InfFileDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/dataobject/file/InfFileDO.java index 12600ff7f..594ae4541 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/dataobject/file/InfFileDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/dataobject/file/InfFileDO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.infra.dal.dataobject.file; +package cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.file; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/dataobject/job/InfJobDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/dataobject/job/InfJobDO.java similarity index 86% rename from src/main/java/cn/iocoder/dashboard/modules/infra/dal/dataobject/job/InfJobDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/dataobject/job/InfJobDO.java index 44caaad69..4eb95ca20 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/dataobject/job/InfJobDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/dataobject/job/InfJobDO.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.infra.dal.dataobject.job; +package cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.modules.infra.enums.job.InfJobStatusEnum; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.adminserver.modules.infra.enums.job.InfJobStatusEnum; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/dataobject/job/InfJobLogDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/dataobject/job/InfJobLogDO.java similarity index 84% rename from src/main/java/cn/iocoder/dashboard/modules/infra/dal/dataobject/job/InfJobLogDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/dataobject/job/InfJobLogDO.java index 08fe7f58c..49916802c 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/dataobject/job/InfJobLogDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/dataobject/job/InfJobLogDO.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.infra.dal.dataobject.job; +package cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.framework.quartz.core.handler.JobHandler; -import cn.iocoder.dashboard.modules.infra.enums.job.InfJobLogStatusEnum; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler; +import cn.iocoder.yudao.adminserver.modules.infra.enums.job.InfJobLogStatusEnum; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/dataobject/logger/InfApiAccessLogDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/dataobject/logger/InfApiAccessLogDO.java similarity index 88% rename from src/main/java/cn/iocoder/dashboard/modules/infra/dal/dataobject/logger/InfApiAccessLogDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/dataobject/logger/InfApiAccessLogDO.java index ff32cea16..229219e04 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/dataobject/logger/InfApiAccessLogDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/dataobject/logger/InfApiAccessLogDO.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.infra.dal.dataobject.logger; +package cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.logger; -import cn.iocoder.dashboard.common.enums.UserTypeEnum; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/dataobject/logger/InfApiErrorLogDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/dataobject/logger/InfApiErrorLogDO.java similarity index 89% rename from src/main/java/cn/iocoder/dashboard/modules/infra/dal/dataobject/logger/InfApiErrorLogDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/dataobject/logger/InfApiErrorLogDO.java index dbe326cb7..7f19defca 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/dataobject/logger/InfApiErrorLogDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/dataobject/logger/InfApiErrorLogDO.java @@ -1,9 +1,9 @@ -package cn.iocoder.dashboard.modules.infra.dal.dataobject.logger; +package cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.logger; -import cn.iocoder.dashboard.common.enums.UserTypeEnum; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.modules.infra.enums.logger.InfApiErrorLogProcessStatusEnum; -import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO; +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.adminserver.modules.infra.enums.logger.InfApiErrorLogProcessStatusEnum; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.user.SysUserDO; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/mysql/config/InfConfigDAOImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/mysql/config/InfConfigDAOImpl.java similarity index 74% rename from src/main/java/cn/iocoder/dashboard/modules/infra/dal/mysql/config/InfConfigDAOImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/mysql/config/InfConfigDAOImpl.java index 58a4f1e98..a2e7b6f8a 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/mysql/config/InfConfigDAOImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/mysql/config/InfConfigDAOImpl.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.infra.dal.mysql.config; +package cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.config; -import cn.iocoder.dashboard.framework.apollo.internals.ConfigFrameworkDAO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.config.InfConfigDO; +import cn.iocoder.yudao.framework.apollo.internals.ConfigFrameworkDAO; +import cn.iocoder.yudao.framework.apollo.internals.dto.ConfigRespDTO; import org.springframework.jdbc.core.BeanPropertyRowMapper; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.datasource.DriverManagerDataSource; @@ -32,8 +32,8 @@ public class InfConfigDAOImpl implements ConfigFrameworkDAO { } @Override - public List selectList() { - return jdbcTemplate.query("SELECT `key`, `value`, update_time, deleted FROM inf_config", new BeanPropertyRowMapper<>(InfConfigDO.class)); + public List selectList() { + return jdbcTemplate.query("SELECT `key`, `value`, update_time, deleted FROM inf_config", new BeanPropertyRowMapper<>(ConfigRespDTO.class)); } } diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/mysql/config/InfConfigMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/mysql/config/InfConfigMapper.java similarity index 68% rename from src/main/java/cn/iocoder/dashboard/modules/infra/dal/mysql/config/InfConfigMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/mysql/config/InfConfigMapper.java index 9357f9cce..546ef843a 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/mysql/config/InfConfigMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/mysql/config/InfConfigMapper.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.infra.dal.mysql.config; +package cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.config; -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.modules.infra.controller.config.vo.InfConfigExportReqVO; -import cn.iocoder.dashboard.modules.infra.controller.config.vo.InfConfigPageReqVO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.config.InfConfigDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigExportReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigPageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.config.InfConfigDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/mysql/file/InfFileMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/mysql/file/InfFileMapper.java similarity index 58% rename from src/main/java/cn/iocoder/dashboard/modules/infra/dal/mysql/file/InfFileMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/mysql/file/InfFileMapper.java index 351d12cad..0a487e025 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/mysql/file/InfFileMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/mysql/file/InfFileMapper.java @@ -1,10 +1,10 @@ -package cn.iocoder.dashboard.modules.infra.dal.mysql.file; +package cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.file; -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.modules.infra.controller.file.vo.InfFilePageReqVO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.file.InfFileDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.adminserver.modules.infra.controller.file.vo.InfFilePageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.file.InfFileDO; import org.apache.ibatis.annotations.Mapper; @Mapper diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/mysql/job/InfJobLogMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/mysql/job/InfJobLogMapper.java similarity index 70% rename from src/main/java/cn/iocoder/dashboard/modules/infra/dal/mysql/job/InfJobLogMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/mysql/job/InfJobLogMapper.java index 956f073ab..4b1b920be 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/mysql/job/InfJobLogMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/mysql/job/InfJobLogMapper.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.infra.dal.mysql.job; +package cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.job; -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.modules.infra.controller.job.vo.log.InfJobLogExportReqVO; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.log.InfJobLogPageReqVO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.job.InfJobLogDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job.InfJobLogDO; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/mysql/job/InfJobMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/mysql/job/InfJobMapper.java similarity index 65% rename from src/main/java/cn/iocoder/dashboard/modules/infra/dal/mysql/job/InfJobMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/mysql/job/InfJobMapper.java index de41aa3b8..a57ba0f39 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/mysql/job/InfJobMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/mysql/job/InfJobMapper.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.infra.dal.mysql.job; +package cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.job; -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.modules.infra.controller.job.vo.job.InfJobExportReqVO; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.job.InfJobPageReqVO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.job.InfJobDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobExportReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobPageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job.InfJobDO; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/mysql/logger/InfApiAccessLogMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/mysql/logger/InfApiAccessLogMapper.java similarity index 73% rename from src/main/java/cn/iocoder/dashboard/modules/infra/dal/mysql/logger/InfApiAccessLogMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/mysql/logger/InfApiAccessLogMapper.java index 740bfeb7b..85d04a3b5 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/mysql/logger/InfApiAccessLogMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/mysql/logger/InfApiAccessLogMapper.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.infra.dal.mysql.logger; +package cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.logger; -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.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogExportReqVO; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogPageReqVO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.logger.InfApiAccessLogDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.logger.InfApiAccessLogDO; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/mysql/logger/InfApiErrorLogMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/mysql/logger/InfApiErrorLogMapper.java similarity index 72% rename from src/main/java/cn/iocoder/dashboard/modules/infra/dal/mysql/logger/InfApiErrorLogMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/mysql/logger/InfApiErrorLogMapper.java index a9267d7f1..4e7481d11 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/dal/mysql/logger/InfApiErrorLogMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/dal/mysql/logger/InfApiErrorLogMapper.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.infra.dal.mysql.logger; +package cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.logger; -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.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogExportReqVO; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogPageReqVO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.logger.InfApiErrorLogDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.logger.InfApiErrorLogDO; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/enums/InfDictTypeConstants.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/enums/InfDictTypeConstants.java new file mode 100644 index 000000000..aabbae4f1 --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/enums/InfDictTypeConstants.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.adminserver.modules.infra.enums; + +/** + * Infra 字典类型的枚举类 + * + * @author 芋道源码 + */ +public interface InfDictTypeConstants { + + String REDIS_TIMEOUT_TYPE = "inf_redis_timeout_type"; // Redis 超时类型 + + String JOB_STATUS = "inf_job_status"; // 定时任务状态的枚举 + String JOB_LOG_STATUS = "inf_job_log_status"; // 定时任务日志状态的枚举 + + String API_ERROR_LOG_PROCESS_STATUS = "inf_api_error_log_process_status"; // API 错误日志的处理状态的枚举 + + String ERROR_CODE_TYPE = "inf_error_code_type"; // 错误码的类型枚举 + +} diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/enums/InfErrorCodeConstants.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/enums/InfErrorCodeConstants.java similarity index 93% rename from src/main/java/cn/iocoder/dashboard/modules/infra/enums/InfErrorCodeConstants.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/enums/InfErrorCodeConstants.java index e02119b6c..b53ff8c1d 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/enums/InfErrorCodeConstants.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/enums/InfErrorCodeConstants.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.infra.enums; +package cn.iocoder.yudao.adminserver.modules.infra.enums; -import cn.iocoder.dashboard.common.exception.ErrorCode; +import cn.iocoder.yudao.framework.common.exception.ErrorCode; /** * Infra 错误码枚举类 diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/enums/config/InfConfigTypeEnum.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/enums/config/InfConfigTypeEnum.java similarity index 80% rename from src/main/java/cn/iocoder/dashboard/modules/infra/enums/config/InfConfigTypeEnum.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/enums/config/InfConfigTypeEnum.java index 315da6f56..6e9fd4d35 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/enums/config/InfConfigTypeEnum.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/enums/config/InfConfigTypeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.infra.enums.config; +package cn.iocoder.yudao.adminserver.modules.infra.enums.config; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/enums/job/InfJobLogStatusEnum.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/enums/job/InfJobLogStatusEnum.java similarity index 84% rename from src/main/java/cn/iocoder/dashboard/modules/infra/enums/job/InfJobLogStatusEnum.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/enums/job/InfJobLogStatusEnum.java index fe0339fdc..e904e674f 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/enums/job/InfJobLogStatusEnum.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/enums/job/InfJobLogStatusEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.infra.enums.job; +package cn.iocoder.yudao.adminserver.modules.infra.enums.job; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/enums/job/InfJobStatusEnum.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/enums/job/InfJobStatusEnum.java similarity index 92% rename from src/main/java/cn/iocoder/dashboard/modules/infra/enums/job/InfJobStatusEnum.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/enums/job/InfJobStatusEnum.java index 0fb1a39db..1a7c984bb 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/enums/job/InfJobStatusEnum.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/enums/job/InfJobStatusEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.infra.enums.job; +package cn.iocoder.yudao.adminserver.modules.infra.enums.job; import com.google.common.collect.Sets; import lombok.AllArgsConstructor; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/enums/logger/InfApiErrorLogProcessStatusEnum.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/enums/logger/InfApiErrorLogProcessStatusEnum.java similarity index 86% rename from src/main/java/cn/iocoder/dashboard/modules/infra/enums/logger/InfApiErrorLogProcessStatusEnum.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/enums/logger/InfApiErrorLogProcessStatusEnum.java index 45258742d..106e16218 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/enums/logger/InfApiErrorLogProcessStatusEnum.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/enums/logger/InfApiErrorLogProcessStatusEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.infra.enums.logger; +package cn.iocoder.yudao.adminserver.modules.infra.enums.logger; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/cn/iocoder/dashboard/framework/file/config/FileConfiguration.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/framework/file/config/FileConfiguration.java similarity index 78% rename from src/main/java/cn/iocoder/dashboard/framework/file/config/FileConfiguration.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/framework/file/config/FileConfiguration.java index 673c3d283..e71377e3f 100644 --- a/src/main/java/cn/iocoder/dashboard/framework/file/config/FileConfiguration.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/framework/file/config/FileConfiguration.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.file.config; +package cn.iocoder.yudao.adminserver.modules.infra.framework.file.config; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Configuration; diff --git a/src/main/java/cn/iocoder/dashboard/framework/file/config/FileProperties.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/framework/file/config/FileProperties.java similarity index 71% rename from src/main/java/cn/iocoder/dashboard/framework/file/config/FileProperties.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/framework/file/config/FileProperties.java index 4018f4437..db1a6b71f 100644 --- a/src/main/java/cn/iocoder/dashboard/framework/file/config/FileProperties.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/framework/file/config/FileProperties.java @@ -1,6 +1,5 @@ -package cn.iocoder.dashboard.framework.file.config; +package cn.iocoder.yudao.adminserver.modules.infra.framework.file.config; -import cn.iocoder.dashboard.modules.infra.controller.file.InfFileController; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.validation.annotation.Validated; @@ -13,7 +12,7 @@ import javax.validation.constraints.NotNull; public class FileProperties { /** - * 对应 {@link InfFileController#} + * 对应 InfFileController 的 getFile 方法 */ @NotNull(message = "基础文件路径不能为空") private String basePath; diff --git a/src/main/java/cn/iocoder/dashboard/framework/file/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/framework/file/package-info.java similarity index 92% rename from src/main/java/cn/iocoder/dashboard/framework/file/package-info.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/framework/file/package-info.java index 1c2900fab..a69b53eb5 100644 --- a/src/main/java/cn/iocoder/dashboard/framework/file/package-info.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/framework/file/package-info.java @@ -13,4 +13,4 @@ * 综合考虑,暂时使用方案 3 的方式,比较适合这样一个 all in one 的项目。 * 随着文件的量级大了之后,还是推荐采用云服务。 */ -package cn.iocoder.dashboard.framework.file; +package cn.iocoder.yudao.adminserver.modules.infra.framework.file; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/framework/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/framework/package-info.java new file mode 100644 index 000000000..c04bc96df --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/framework/package-info.java @@ -0,0 +1,6 @@ +/** + * 属于 infra 模块的 framework 封装 + * + * @author 芋道源码 + */ +package cn.iocoder.yudao.adminserver.modules.infra.framework; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/mq/consumer/config/InfConfigRefreshConsumer.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/mq/consumer/config/InfConfigRefreshConsumer.java similarity index 60% rename from src/main/java/cn/iocoder/dashboard/modules/infra/mq/consumer/config/InfConfigRefreshConsumer.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/mq/consumer/config/InfConfigRefreshConsumer.java index 064fb3182..35d3f791b 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/mq/consumer/config/InfConfigRefreshConsumer.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/mq/consumer/config/InfConfigRefreshConsumer.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.infra.mq.consumer.config; +package cn.iocoder.yudao.adminserver.modules.infra.mq.consumer.config; -import cn.iocoder.dashboard.framework.apollo.internals.DBConfigRepository; -import cn.iocoder.dashboard.framework.redis.core.pubsub.AbstractChannelMessageListener; -import cn.iocoder.dashboard.modules.infra.mq.message.config.InfConfigRefreshMessage; +import cn.iocoder.yudao.framework.apollo.internals.DBConfigRepository; +import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessageListener; +import cn.iocoder.yudao.adminserver.modules.infra.mq.message.config.InfConfigRefreshMessage; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/mq/consumer/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/mq/consumer/package-info.java new file mode 100644 index 000000000..f73455a30 --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/mq/consumer/package-info.java @@ -0,0 +1 @@ +package cn.iocoder.yudao.adminserver.modules.infra.mq.consumer; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/mq/message/config/InfConfigRefreshMessage.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/mq/message/config/InfConfigRefreshMessage.java similarity index 62% rename from src/main/java/cn/iocoder/dashboard/modules/infra/mq/message/config/InfConfigRefreshMessage.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/mq/message/config/InfConfigRefreshMessage.java index 9250f33f8..433048143 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/mq/message/config/InfConfigRefreshMessage.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/mq/message/config/InfConfigRefreshMessage.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.infra.mq.message.config; +package cn.iocoder.yudao.adminserver.modules.infra.mq.message.config; -import cn.iocoder.dashboard.framework.redis.core.pubsub.ChannelMessage; +import cn.iocoder.yudao.framework.mq.core.pubsub.ChannelMessage; import lombok.Data; /** diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/mq/message/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/mq/message/package-info.java new file mode 100644 index 000000000..9db385643 --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/mq/message/package-info.java @@ -0,0 +1 @@ +package cn.iocoder.yudao.adminserver.modules.infra.mq.message; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/mq/producer/config/InfConfigProducer.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/mq/producer/config/InfConfigProducer.java similarity index 71% rename from src/main/java/cn/iocoder/dashboard/modules/infra/mq/producer/config/InfConfigProducer.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/mq/producer/config/InfConfigProducer.java index 1cb240db6..39a8e76b3 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/mq/producer/config/InfConfigProducer.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/mq/producer/config/InfConfigProducer.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.infra.mq.producer.config; +package cn.iocoder.yudao.adminserver.modules.infra.mq.producer.config; -import cn.iocoder.dashboard.framework.redis.core.util.RedisMessageUtils; -import cn.iocoder.dashboard.modules.infra.mq.message.config.InfConfigRefreshMessage; +import cn.iocoder.yudao.adminserver.modules.infra.mq.message.config.InfConfigRefreshMessage; +import cn.iocoder.yudao.framework.mq.core.util.RedisMessageUtils; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Component; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/mq/producer/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/mq/producer/package-info.java new file mode 100644 index 000000000..0112c3485 --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/mq/producer/package-info.java @@ -0,0 +1 @@ +package cn.iocoder.yudao.adminserver.modules.infra.mq.producer; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/package-info.java similarity index 78% rename from src/main/java/cn/iocoder/dashboard/modules/infra/package-info.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/package-info.java index 341d2bea3..b97607f35 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/package-info.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/package-info.java @@ -4,4 +4,4 @@ * * 缩写:inf */ -package cn.iocoder.dashboard.modules.infra; +package cn.iocoder.yudao.adminserver.modules.infra; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/service/config/InfConfigService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/config/InfConfigService.java similarity index 68% rename from src/main/java/cn/iocoder/dashboard/modules/infra/service/config/InfConfigService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/config/InfConfigService.java index d7d120c19..2430c329b 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/service/config/InfConfigService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/config/InfConfigService.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.infra.service.config; +package cn.iocoder.yudao.adminserver.modules.infra.service.config; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.infra.controller.config.vo.InfConfigCreateReqVO; -import cn.iocoder.dashboard.modules.infra.controller.config.vo.InfConfigExportReqVO; -import cn.iocoder.dashboard.modules.infra.controller.config.vo.InfConfigPageReqVO; -import cn.iocoder.dashboard.modules.infra.controller.config.vo.InfConfigUpdateReqVO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.config.InfConfigDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigExportReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigPageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.config.InfConfigDO; import javax.validation.Valid; import java.util.List; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/service/config/impl/InfConfigServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/config/impl/InfConfigServiceImpl.java similarity index 74% rename from src/main/java/cn/iocoder/dashboard/modules/infra/service/config/impl/InfConfigServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/config/impl/InfConfigServiceImpl.java index 211ec52d2..13bc2aafc 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/service/config/impl/InfConfigServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/config/impl/InfConfigServiceImpl.java @@ -1,17 +1,17 @@ -package cn.iocoder.dashboard.modules.infra.service.config.impl; +package cn.iocoder.yudao.adminserver.modules.infra.service.config.impl; -import cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.infra.controller.config.vo.InfConfigCreateReqVO; -import cn.iocoder.dashboard.modules.infra.controller.config.vo.InfConfigExportReqVO; -import cn.iocoder.dashboard.modules.infra.controller.config.vo.InfConfigPageReqVO; -import cn.iocoder.dashboard.modules.infra.controller.config.vo.InfConfigUpdateReqVO; -import cn.iocoder.dashboard.modules.infra.convert.config.InfConfigConvert; -import cn.iocoder.dashboard.modules.infra.dal.mysql.config.InfConfigMapper; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.config.InfConfigDO; -import cn.iocoder.dashboard.modules.infra.enums.config.InfConfigTypeEnum; -import cn.iocoder.dashboard.modules.infra.mq.producer.config.InfConfigProducer; -import cn.iocoder.dashboard.modules.infra.service.config.InfConfigService; +import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigExportReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigPageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.convert.config.InfConfigConvert; +import cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.config.InfConfigMapper; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.config.InfConfigDO; +import cn.iocoder.yudao.adminserver.modules.infra.enums.config.InfConfigTypeEnum; +import cn.iocoder.yudao.adminserver.modules.infra.mq.producer.config.InfConfigProducer; +import cn.iocoder.yudao.adminserver.modules.infra.service.config.InfConfigService; import com.google.common.annotations.VisibleForTesting; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; @@ -21,7 +21,7 @@ import javax.annotation.Resource; import java.util.List; -import static cn.iocoder.dashboard.modules.infra.enums.InfErrorCodeConstants.*; +import static cn.iocoder.yudao.adminserver.modules.infra.enums.InfErrorCodeConstants.*; /** * 参数配置 Service 实现类 diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/service/file/InfFileService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/file/InfFileService.java similarity index 71% rename from src/main/java/cn/iocoder/dashboard/modules/infra/service/file/InfFileService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/file/InfFileService.java index 771828266..0a1193365 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/service/file/InfFileService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/file/InfFileService.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.infra.service.file; +package cn.iocoder.yudao.adminserver.modules.infra.service.file; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.infra.controller.file.vo.InfFilePageReqVO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.file.InfFileDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.infra.controller.file.vo.InfFilePageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.file.InfFileDO; /** * 文件 Service 接口 diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/service/file/impl/InfFileServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/file/impl/InfFileServiceImpl.java similarity index 64% rename from src/main/java/cn/iocoder/dashboard/modules/infra/service/file/impl/InfFileServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/file/impl/InfFileServiceImpl.java index 9a697f3d2..a574147f0 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/service/file/impl/InfFileServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/file/impl/InfFileServiceImpl.java @@ -1,20 +1,20 @@ -package cn.iocoder.dashboard.modules.infra.service.file.impl; +package cn.iocoder.yudao.adminserver.modules.infra.service.file.impl; import cn.hutool.core.io.FileTypeUtil; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.file.config.FileProperties; -import cn.iocoder.dashboard.modules.infra.controller.file.vo.InfFilePageReqVO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.file.InfFileDO; -import cn.iocoder.dashboard.modules.infra.dal.mysql.file.InfFileMapper; -import cn.iocoder.dashboard.modules.infra.service.file.InfFileService; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.infra.framework.file.config.FileProperties; +import cn.iocoder.yudao.adminserver.modules.infra.controller.file.vo.InfFilePageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.file.InfFileDO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.file.InfFileMapper; +import cn.iocoder.yudao.adminserver.modules.infra.service.file.InfFileService; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.io.ByteArrayInputStream; -import static cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.dashboard.modules.infra.enums.InfErrorCodeConstants.FILE_NOT_EXISTS; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.FILE_PATH_EXISTS; +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.adminserver.modules.infra.enums.InfErrorCodeConstants.FILE_NOT_EXISTS; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.FILE_PATH_EXISTS; /** * 文件 Service 实现类 diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/service/job/InfJobLogService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/job/InfJobLogService.java similarity index 66% rename from src/main/java/cn/iocoder/dashboard/modules/infra/service/job/InfJobLogService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/job/InfJobLogService.java index dd9edeb9a..e4b93d261 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/service/job/InfJobLogService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/job/InfJobLogService.java @@ -1,10 +1,10 @@ -package cn.iocoder.dashboard.modules.infra.service.job; +package cn.iocoder.yudao.adminserver.modules.infra.service.job; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.quartz.core.service.JobLogFrameworkService; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.log.InfJobLogExportReqVO; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.log.InfJobLogPageReqVO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.job.InfJobLogDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.quartz.core.service.JobLogFrameworkService; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job.InfJobLogDO; import java.util.Collection; import java.util.List; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/service/job/InfJobService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/job/InfJobService.java similarity index 75% rename from src/main/java/cn/iocoder/dashboard/modules/infra/service/job/InfJobService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/job/InfJobService.java index 9f2e638ce..ba90a3b6a 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/service/job/InfJobService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/job/InfJobService.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.infra.service.job; +package cn.iocoder.yudao.adminserver.modules.infra.service.job; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.job.InfJobCreateReqVO; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.job.InfJobExportReqVO; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.job.InfJobPageReqVO; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.job.InfJobUpdateReqVO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.job.InfJobDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobExportReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobPageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job.InfJobDO; import org.quartz.SchedulerException; import javax.validation.Valid; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/service/job/impl/InfJobLogServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/job/impl/InfJobLogServiceImpl.java similarity index 77% rename from src/main/java/cn/iocoder/dashboard/modules/infra/service/job/impl/InfJobLogServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/job/impl/InfJobLogServiceImpl.java index 99c028651..e055c6158 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/service/job/impl/InfJobLogServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/job/impl/InfJobLogServiceImpl.java @@ -1,12 +1,12 @@ -package cn.iocoder.dashboard.modules.infra.service.job.impl; +package cn.iocoder.yudao.adminserver.modules.infra.service.job.impl; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.log.InfJobLogExportReqVO; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.log.InfJobLogPageReqVO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.job.InfJobLogDO; -import cn.iocoder.dashboard.modules.infra.dal.mysql.job.InfJobLogMapper; -import cn.iocoder.dashboard.modules.infra.enums.job.InfJobLogStatusEnum; -import cn.iocoder.dashboard.modules.infra.service.job.InfJobLogService; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job.InfJobLogDO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.job.InfJobLogMapper; +import cn.iocoder.yudao.adminserver.modules.infra.enums.job.InfJobLogStatusEnum; +import cn.iocoder.yudao.adminserver.modules.infra.service.job.InfJobLogService; import lombok.extern.slf4j.Slf4j; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/service/job/impl/InfJobServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/job/impl/InfJobServiceImpl.java similarity index 80% rename from src/main/java/cn/iocoder/dashboard/modules/infra/service/job/impl/InfJobServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/job/impl/InfJobServiceImpl.java index 156c423c6..359772757 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/service/job/impl/InfJobServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/job/impl/InfJobServiceImpl.java @@ -1,17 +1,17 @@ -package cn.iocoder.dashboard.modules.infra.service.job.impl; +package cn.iocoder.yudao.adminserver.modules.infra.service.job.impl; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.quartz.core.scheduler.SchedulerManager; -import cn.iocoder.dashboard.framework.quartz.core.util.CronUtils; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.job.InfJobCreateReqVO; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.job.InfJobExportReqVO; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.job.InfJobPageReqVO; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.job.InfJobUpdateReqVO; -import cn.iocoder.dashboard.modules.infra.convert.job.InfJobConvert; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.job.InfJobDO; -import cn.iocoder.dashboard.modules.infra.dal.mysql.job.InfJobMapper; -import cn.iocoder.dashboard.modules.infra.enums.job.InfJobStatusEnum; -import cn.iocoder.dashboard.modules.infra.service.job.InfJobService; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.quartz.core.scheduler.SchedulerManager; +import cn.iocoder.yudao.framework.quartz.core.util.CronUtils; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobExportReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobPageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.convert.job.InfJobConvert; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job.InfJobDO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.job.InfJobMapper; +import cn.iocoder.yudao.adminserver.modules.infra.enums.job.InfJobStatusEnum; +import cn.iocoder.yudao.adminserver.modules.infra.service.job.InfJobService; import org.quartz.SchedulerException; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -21,9 +21,9 @@ import javax.annotation.Resource; import java.util.Collection; import java.util.List; -import static cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.dashboard.modules.infra.enums.InfErrorCodeConstants.*; -import static cn.iocoder.dashboard.util.collection.CollectionUtils.containsAny; +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.adminserver.modules.infra.enums.InfErrorCodeConstants.*; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.containsAny; /** * 定时任务 Service 实现类 diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiAccessLogService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/logger/InfApiAccessLogService.java similarity index 55% rename from src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiAccessLogService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/logger/InfApiAccessLogService.java index c04e69cb9..f4eb6bd43 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiAccessLogService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/logger/InfApiAccessLogService.java @@ -1,10 +1,10 @@ -package cn.iocoder.dashboard.modules.infra.service.logger; +package cn.iocoder.yudao.adminserver.modules.infra.service.logger; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.logger.apilog.core.service.ApiAccessLogFrameworkService; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogExportReqVO; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogPageReqVO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.logger.InfApiAccessLogDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.apilog.core.service.ApiAccessLogFrameworkService; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.logger.InfApiAccessLogDO; import java.util.List; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiErrorLogService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/logger/InfApiErrorLogService.java similarity index 63% rename from src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiErrorLogService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/logger/InfApiErrorLogService.java index 0da7bb892..f5e41a57b 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiErrorLogService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/logger/InfApiErrorLogService.java @@ -1,10 +1,10 @@ -package cn.iocoder.dashboard.modules.infra.service.logger; +package cn.iocoder.yudao.adminserver.modules.infra.service.logger; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.logger.apilog.core.service.ApiErrorLogFrameworkService; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogExportReqVO; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogPageReqVO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.logger.InfApiErrorLogDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.apilog.core.service.ApiErrorLogFrameworkService; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.logger.InfApiErrorLogDO; import java.util.List; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/impl/InfApiAccessLogServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/logger/impl/InfApiAccessLogServiceImpl.java similarity index 61% rename from src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/impl/InfApiAccessLogServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/logger/impl/InfApiAccessLogServiceImpl.java index 7ed83d9e1..8fae484ac 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/impl/InfApiAccessLogServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/logger/impl/InfApiAccessLogServiceImpl.java @@ -1,13 +1,13 @@ -package cn.iocoder.dashboard.modules.infra.service.logger.impl; +package cn.iocoder.yudao.adminserver.modules.infra.service.logger.impl; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.logger.apilog.core.service.dto.ApiAccessLogCreateDTO; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogExportReqVO; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogPageReqVO; -import cn.iocoder.dashboard.modules.infra.convert.logger.InfApiAccessLogConvert; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.logger.InfApiAccessLogDO; -import cn.iocoder.dashboard.modules.infra.dal.mysql.logger.InfApiAccessLogMapper; -import cn.iocoder.dashboard.modules.infra.service.logger.InfApiAccessLogService; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiAccessLogCreateDTO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.convert.logger.InfApiAccessLogConvert; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.logger.InfApiAccessLogDO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.logger.InfApiAccessLogMapper; +import cn.iocoder.yudao.adminserver.modules.infra.service.logger.InfApiAccessLogService; import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.AsyncResult; import org.springframework.stereotype.Service; diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/impl/InfApiErrorLogServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/logger/impl/InfApiErrorLogServiceImpl.java similarity index 62% rename from src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/impl/InfApiErrorLogServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/logger/impl/InfApiErrorLogServiceImpl.java index 647c0621b..aa0fe1fed 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/infra/service/logger/impl/InfApiErrorLogServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/logger/impl/InfApiErrorLogServiceImpl.java @@ -1,14 +1,14 @@ -package cn.iocoder.dashboard.modules.infra.service.logger.impl; +package cn.iocoder.yudao.adminserver.modules.infra.service.logger.impl; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.logger.apilog.core.service.dto.ApiErrorLogCreateDTO; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogExportReqVO; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogPageReqVO; -import cn.iocoder.dashboard.modules.infra.convert.logger.InfApiErrorLogConvert; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.logger.InfApiErrorLogDO; -import cn.iocoder.dashboard.modules.infra.dal.mysql.logger.InfApiErrorLogMapper; -import cn.iocoder.dashboard.modules.infra.enums.logger.InfApiErrorLogProcessStatusEnum; -import cn.iocoder.dashboard.modules.infra.service.logger.InfApiErrorLogService; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiErrorLogCreateDTO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.convert.logger.InfApiErrorLogConvert; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.logger.InfApiErrorLogDO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.logger.InfApiErrorLogMapper; +import cn.iocoder.yudao.adminserver.modules.infra.enums.logger.InfApiErrorLogProcessStatusEnum; +import cn.iocoder.yudao.adminserver.modules.infra.service.logger.InfApiErrorLogService; import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.AsyncResult; import org.springframework.stereotype.Service; @@ -19,9 +19,9 @@ import java.util.Date; import java.util.List; import java.util.concurrent.Future; -import static cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.dashboard.modules.infra.enums.InfErrorCodeConstants.API_ERROR_LOG_NOT_FOUND; -import static cn.iocoder.dashboard.modules.infra.enums.InfErrorCodeConstants.API_ERROR_LOG_PROCESSED; +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.adminserver.modules.infra.enums.InfErrorCodeConstants.API_ERROR_LOG_NOT_FOUND; +import static cn.iocoder.yudao.adminserver.modules.infra.enums.InfErrorCodeConstants.API_ERROR_LOG_PROCESSED; /** * API 错误日志 Service 实现类 diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/SysAuthController.http b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/SysAuthController.http similarity index 100% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/SysAuthController.http rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/SysAuthController.http diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/SysAuthController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/SysAuthController.java similarity index 58% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/SysAuthController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/SysAuthController.java index e3a100073..059e37c15 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/SysAuthController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/SysAuthController.java @@ -1,23 +1,22 @@ -package cn.iocoder.dashboard.modules.system.controller.auth; +package cn.iocoder.yudao.adminserver.modules.system.controller.auth; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; -import cn.iocoder.dashboard.framework.tracer.core.annotation.BizTrace; -import cn.iocoder.dashboard.modules.system.controller.auth.vo.auth.SysAuthLoginReqVO; -import cn.iocoder.dashboard.modules.system.controller.auth.vo.auth.SysAuthLoginRespVO; -import cn.iocoder.dashboard.modules.system.controller.auth.vo.auth.SysAuthMenuRespVO; -import cn.iocoder.dashboard.modules.system.controller.auth.vo.auth.SysAuthPermissionInfoRespVO; -import cn.iocoder.dashboard.modules.system.convert.auth.SysAuthConvert; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysMenuDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysRoleDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO; -import cn.iocoder.dashboard.modules.system.enums.permission.MenuTypeEnum; -import cn.iocoder.dashboard.modules.system.service.auth.SysAuthService; -import cn.iocoder.dashboard.modules.system.service.permission.SysPermissionService; -import cn.iocoder.dashboard.modules.system.service.permission.SysRoleService; -import cn.iocoder.dashboard.modules.system.service.user.SysUserService; -import cn.iocoder.dashboard.util.collection.SetUtils; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.adminserver.modules.system.controller.auth.vo.auth.SysAuthLoginReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.auth.vo.auth.SysAuthLoginRespVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.auth.vo.auth.SysAuthMenuRespVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.auth.vo.auth.SysAuthPermissionInfoRespVO; +import cn.iocoder.yudao.adminserver.modules.system.convert.auth.SysAuthConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysMenuDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysRoleDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.user.SysUserDO; +import cn.iocoder.yudao.adminserver.modules.system.enums.permission.MenuTypeEnum; +import cn.iocoder.yudao.adminserver.modules.system.service.auth.SysAuthService; +import cn.iocoder.yudao.adminserver.modules.system.service.permission.SysPermissionService; +import cn.iocoder.yudao.adminserver.modules.system.service.permission.SysRoleService; +import cn.iocoder.yudao.adminserver.modules.system.service.user.SysUserService; +import cn.iocoder.yudao.framework.common.util.collection.SetUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.validation.annotation.Validated; @@ -27,11 +26,11 @@ import javax.annotation.Resource; import javax.validation.Valid; import java.util.List; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; -import static cn.iocoder.dashboard.framework.security.core.util.SecurityFrameworkUtils.getLoginUserRoleIds; -import static cn.iocoder.dashboard.util.servlet.ServletUtils.getClientIP; -import static cn.iocoder.dashboard.util.servlet.ServletUtils.getUserAgent; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserRoleIds; +import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getClientIP; +import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getUserAgent; @Api(tags = "认证") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/SysUserSessionController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/SysUserSessionController.java similarity index 68% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/SysUserSessionController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/SysUserSessionController.java index 7ffd6318a..253b25126 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/SysUserSessionController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/SysUserSessionController.java @@ -1,17 +1,17 @@ -package cn.iocoder.dashboard.modules.system.controller.auth; +package cn.iocoder.yudao.adminserver.modules.system.controller.auth; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.auth.vo.session.SysUserSessionPageItemRespVO; -import cn.iocoder.dashboard.modules.system.controller.auth.vo.session.SysUserSessionPageReqVO; -import cn.iocoder.dashboard.modules.system.convert.auth.SysUserSessionConvert; -import cn.iocoder.dashboard.modules.system.dal.dataobject.auth.SysUserSessionDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysDeptDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO; -import cn.iocoder.dashboard.modules.system.service.auth.SysUserSessionService; -import cn.iocoder.dashboard.modules.system.service.dept.SysDeptService; -import cn.iocoder.dashboard.modules.system.service.user.SysUserService; -import cn.iocoder.dashboard.util.collection.MapUtils; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.auth.vo.session.SysUserSessionPageItemRespVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.auth.vo.session.SysUserSessionPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.convert.auth.SysUserSessionConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.auth.SysUserSessionDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dept.SysDeptDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.user.SysUserDO; +import cn.iocoder.yudao.adminserver.modules.system.service.auth.SysUserSessionService; +import cn.iocoder.yudao.adminserver.modules.system.service.dept.SysDeptService; +import cn.iocoder.yudao.adminserver.modules.system.service.user.SysUserService; +import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -24,8 +24,8 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.util.collection.CollectionUtils.convertList; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; @Api(tags = "用户 Session") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/vo/auth/SysAuthLoginReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/vo/auth/SysAuthLoginReqVO.java similarity index 94% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/vo/auth/SysAuthLoginReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/vo/auth/SysAuthLoginReqVO.java index e3842acd7..43df52c7f 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/vo/auth/SysAuthLoginReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/vo/auth/SysAuthLoginReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.auth.vo.auth; +package cn.iocoder.yudao.adminserver.modules.system.controller.auth.vo.auth; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/vo/auth/SysAuthLoginRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/vo/auth/SysAuthLoginRespVO.java similarity index 85% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/vo/auth/SysAuthLoginRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/vo/auth/SysAuthLoginRespVO.java index 47e0872aa..c09bd03c3 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/vo/auth/SysAuthLoginRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/vo/auth/SysAuthLoginRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.auth.vo.auth; +package cn.iocoder.yudao.adminserver.modules.system.controller.auth.vo.auth; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/vo/auth/SysAuthMenuRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/vo/auth/SysAuthMenuRespVO.java similarity index 94% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/vo/auth/SysAuthMenuRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/vo/auth/SysAuthMenuRespVO.java index 28eadb40c..3329c80d2 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/vo/auth/SysAuthMenuRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/vo/auth/SysAuthMenuRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.auth.vo.auth; +package cn.iocoder.yudao.adminserver.modules.system.controller.auth.vo.auth; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/vo/auth/SysAuthPermissionInfoRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/vo/auth/SysAuthPermissionInfoRespVO.java similarity index 93% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/vo/auth/SysAuthPermissionInfoRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/vo/auth/SysAuthPermissionInfoRespVO.java index c4cfa8bb0..102c3c939 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/vo/auth/SysAuthPermissionInfoRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/vo/auth/SysAuthPermissionInfoRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.auth.vo.auth; +package cn.iocoder.yudao.adminserver.modules.system.controller.auth.vo.auth; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/vo/session/SysUserSessionPageItemRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/vo/session/SysUserSessionPageItemRespVO.java similarity index 89% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/vo/session/SysUserSessionPageItemRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/vo/session/SysUserSessionPageItemRespVO.java index 3cc1e09af..1cb9a5af0 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/vo/session/SysUserSessionPageItemRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/vo/session/SysUserSessionPageItemRespVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.controller.auth.vo.session; +package cn.iocoder.yudao.adminserver.modules.system.controller.auth.vo.session; -import cn.iocoder.dashboard.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/vo/session/SysUserSessionPageReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/vo/session/SysUserSessionPageReqVO.java similarity index 75% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/vo/session/SysUserSessionPageReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/vo/session/SysUserSessionPageReqVO.java index 3a2fca733..fb8f4f2b6 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/vo/session/SysUserSessionPageReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/auth/vo/session/SysUserSessionPageReqVO.java @@ -1,13 +1,11 @@ -package cn.iocoder.dashboard.modules.system.controller.auth.vo.session; +package cn.iocoder.yudao.adminserver.modules.system.controller.auth.vo.session; -import cn.iocoder.dashboard.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; -import javax.validation.constraints.NotEmpty; - @ApiModel("在线用户 Session 分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/common/SysCaptchaController.http b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/common/SysCaptchaController.http similarity index 100% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/common/SysCaptchaController.http rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/common/SysCaptchaController.http diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/common/SysCaptchaController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/common/SysCaptchaController.java similarity index 63% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/common/SysCaptchaController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/common/SysCaptchaController.java index 487389331..94e3c9d0d 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/common/SysCaptchaController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/common/SysCaptchaController.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.system.controller.common; +package cn.iocoder.yudao.adminserver.modules.system.controller.common; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.modules.system.controller.common.vo.SysCaptchaImageRespVO; -import cn.iocoder.dashboard.modules.system.service.common.SysCaptchaService; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.common.vo.SysCaptchaImageRespVO; +import cn.iocoder.yudao.adminserver.modules.system.service.common.SysCaptchaService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.GetMapping; @@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @Api(tags = "验证码") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/common/vo/SysCaptchaImageRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/common/vo/SysCaptchaImageRespVO.java similarity index 89% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/common/vo/SysCaptchaImageRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/common/vo/SysCaptchaImageRespVO.java index 3af4e410c..b3e9f2c24 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/common/vo/SysCaptchaImageRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/common/vo/SysCaptchaImageRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.common.vo; +package cn.iocoder.yudao.adminserver.modules.system.controller.common.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/SysDeptController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/SysDeptController.java similarity index 83% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/SysDeptController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/SysDeptController.java index 9651275c1..1bae57f32 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/SysDeptController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/SysDeptController.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.system.controller.dept; +package cn.iocoder.yudao.adminserver.modules.system.controller.dept; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.modules.system.controller.dept.vo.dept.*; -import cn.iocoder.dashboard.modules.system.convert.dept.SysDeptConvert; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysDeptDO; -import cn.iocoder.dashboard.modules.system.service.dept.SysDeptService; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.dept.*; +import cn.iocoder.yudao.adminserver.modules.system.convert.dept.SysDeptConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dept.SysDeptDO; +import cn.iocoder.yudao.adminserver.modules.system.service.dept.SysDeptService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -18,7 +18,7 @@ import javax.validation.Valid; import java.util.Comparator; import java.util.List; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @Api(tags = "部门") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/SysPostController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/SysPostController.java similarity index 79% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/SysPostController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/SysPostController.java index 125cd5d61..c27dc1c95 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/SysPostController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/SysPostController.java @@ -1,14 +1,14 @@ -package cn.iocoder.dashboard.modules.system.controller.dept; +package cn.iocoder.yudao.adminserver.modules.system.controller.dept; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; -import cn.iocoder.dashboard.modules.system.controller.dept.vo.post.*; -import cn.iocoder.dashboard.modules.system.convert.dept.SysPostConvert; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysPostDO; -import cn.iocoder.dashboard.modules.system.service.dept.SysPostService; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.post.*; +import cn.iocoder.yudao.adminserver.modules.system.convert.dept.SysPostConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dept.SysPostDO; +import cn.iocoder.yudao.adminserver.modules.system.service.dept.SysPostService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -24,8 +24,8 @@ import java.util.Collections; import java.util.Comparator; import java.util.List; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "岗位") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/dept/SysDeptBaseVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/dept/SysDeptBaseVO.java similarity index 95% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/dept/SysDeptBaseVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/dept/SysDeptBaseVO.java index 9c54c163f..f3e667a9d 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/dept/SysDeptBaseVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/dept/SysDeptBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.dept.vo.dept; +package cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.dept; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/dept/SysDeptCreateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/dept/SysDeptCreateReqVO.java similarity index 78% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/dept/SysDeptCreateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/dept/SysDeptCreateReqVO.java index 6ea550c76..c5c5aac56 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/dept/SysDeptCreateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/dept/SysDeptCreateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.dept.vo.dept; +package cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.dept; import io.swagger.annotations.ApiModel; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/dept/SysDeptListReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/dept/SysDeptListReqVO.java similarity index 85% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/dept/SysDeptListReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/dept/SysDeptListReqVO.java index c4d1b175a..b47bc53be 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/dept/SysDeptListReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/dept/SysDeptListReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.dept.vo.dept; +package cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.dept; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/dept/SysDeptRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/dept/SysDeptRespVO.java similarity index 89% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/dept/SysDeptRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/dept/SysDeptRespVO.java index f5fa1b2e4..325cce6b1 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/dept/SysDeptRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/dept/SysDeptRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.dept.vo.dept; +package cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.dept; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/dept/SysDeptSimpleRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/dept/SysDeptSimpleRespVO.java similarity index 89% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/dept/SysDeptSimpleRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/dept/SysDeptSimpleRespVO.java index fb6f47fef..bf9c8bdc5 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/dept/SysDeptSimpleRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/dept/SysDeptSimpleRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.dept.vo.dept; +package cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.dept; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/dept/SysDeptUpdateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/dept/SysDeptUpdateReqVO.java similarity index 86% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/dept/SysDeptUpdateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/dept/SysDeptUpdateReqVO.java index e64b42172..5838d1dd1 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/dept/SysDeptUpdateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/dept/SysDeptUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.dept.vo.dept; +package cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.dept; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostBaseVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostBaseVO.java similarity index 94% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostBaseVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostBaseVO.java index 2b90c1024..c6ed5c82a 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostBaseVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.dept.vo.post; +package cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.post; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostCreateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostCreateReqVO.java similarity index 75% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostCreateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostCreateReqVO.java index a4bd9006b..72be88dd5 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostCreateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostCreateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.dept.vo.post; +package cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.post; import io.swagger.annotations.ApiModel; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostExcelVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostExcelVO.java similarity index 58% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostExcelVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostExcelVO.java index 74afa919e..acc23c3f8 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostExcelVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostExcelVO.java @@ -1,12 +1,11 @@ -package cn.iocoder.dashboard.modules.system.controller.dept.vo.post; +package cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.post; -import cn.iocoder.dashboard.framework.excel.core.annotations.DictFormat; -import cn.iocoder.dashboard.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.adminserver.modules.system.enums.SysDictTypeConstants; import com.alibaba.excel.annotation.ExcelProperty; import lombok.Data; -import static cn.iocoder.dashboard.modules.system.enums.dict.SysDictTypeEnum.SYS_COMMON_STATUS; - /** * 岗位 Excel 导出响应 VO */ @@ -26,7 +25,7 @@ public class SysPostExcelVO { private Integer sort; @ExcelProperty(value = "状态", converter = DictConvert.class) - @DictFormat(SYS_COMMON_STATUS) + @DictFormat(SysDictTypeConstants.COMMON_STATUS) private String status; } diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostExportReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostExportReqVO.java similarity index 88% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostExportReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostExportReqVO.java index 8e66825dd..465639236 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostExportReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.dept.vo.post; +package cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.post; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostListReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostListReqVO.java similarity index 87% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostListReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostListReqVO.java index 223fa2021..0e700a9c5 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostListReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostListReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.dept.vo.post; +package cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.post; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostPageReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostPageReqVO.java similarity index 82% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostPageReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostPageReqVO.java index 777edcb42..432e16039 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostPageReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostPageReqVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.controller.dept.vo.post; +package cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.post; -import cn.iocoder.dashboard.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostRespVO.java similarity index 87% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostRespVO.java index fb180681b..cfd42a204 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.dept.vo.post; +package cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.post; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostSimpleRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostSimpleRespVO.java similarity index 87% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostSimpleRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostSimpleRespVO.java index 312d1b9ec..244667f06 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostSimpleRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostSimpleRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.dept.vo.post; +package cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.post; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostUpdateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostUpdateReqVO.java similarity index 86% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostUpdateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostUpdateReqVO.java index 50562baee..cc95c9cd3 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostUpdateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dept/vo/post/SysPostUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.dept.vo.post; +package cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.post; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/SysDictDataController.http b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/SysDictDataController.http similarity index 100% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/SysDictDataController.http rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/SysDictDataController.http diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/SysDictDataController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/SysDictDataController.java similarity index 81% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/SysDictDataController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/SysDictDataController.java index 6eda1162d..6f45fc3b6 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/SysDictDataController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/SysDictDataController.java @@ -1,13 +1,13 @@ -package cn.iocoder.dashboard.modules.system.controller.dict; +package cn.iocoder.yudao.adminserver.modules.system.controller.dict; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; -import cn.iocoder.dashboard.modules.system.controller.dict.vo.data.*; -import cn.iocoder.dashboard.modules.system.convert.dict.SysDictDataConvert; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dict.SysDictDataDO; -import cn.iocoder.dashboard.modules.system.service.dict.SysDictDataService; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.data.*; +import cn.iocoder.yudao.adminserver.modules.system.convert.dict.SysDictDataConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dict.SysDictDataDO; +import cn.iocoder.yudao.adminserver.modules.system.service.dict.SysDictDataService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -21,8 +21,8 @@ import javax.validation.Valid; import java.io.IOException; import java.util.List; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "字典数据") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/SysDictTypeController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/SysDictTypeController.java similarity index 81% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/SysDictTypeController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/SysDictTypeController.java index 9e6ce7edb..9ab36610d 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/SysDictTypeController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/SysDictTypeController.java @@ -1,13 +1,13 @@ -package cn.iocoder.dashboard.modules.system.controller.dict; +package cn.iocoder.yudao.adminserver.modules.system.controller.dict; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; -import cn.iocoder.dashboard.modules.system.controller.dict.vo.type.*; -import cn.iocoder.dashboard.modules.system.convert.dict.SysDictTypeConvert; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dict.SysDictTypeDO; -import cn.iocoder.dashboard.modules.system.service.dict.SysDictTypeService; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.type.*; +import cn.iocoder.yudao.adminserver.modules.system.convert.dict.SysDictTypeConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dict.SysDictTypeDO; +import cn.iocoder.yudao.adminserver.modules.system.service.dict.SysDictTypeService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -21,8 +21,8 @@ import javax.validation.Valid; import java.io.IOException; import java.util.List; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "字典类型") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/data/SysDictDataBaseVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/data/SysDictDataBaseVO.java similarity index 95% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/data/SysDictDataBaseVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/data/SysDictDataBaseVO.java index b034d9540..adb4bb2f1 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/data/SysDictDataBaseVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/data/SysDictDataBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.dict.vo.data; +package cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.data; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/data/SysDictDataCreateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/data/SysDictDataCreateReqVO.java similarity index 76% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/data/SysDictDataCreateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/data/SysDictDataCreateReqVO.java index abae7dcff..5c964991c 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/data/SysDictDataCreateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/data/SysDictDataCreateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.dict.vo.data; +package cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.data; import io.swagger.annotations.ApiModel; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/data/SysDictDataExcelVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/data/SysDictDataExcelVO.java similarity index 62% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/data/SysDictDataExcelVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/data/SysDictDataExcelVO.java index 3266d39cf..23174a087 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/data/SysDictDataExcelVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/data/SysDictDataExcelVO.java @@ -1,12 +1,11 @@ -package cn.iocoder.dashboard.modules.system.controller.dict.vo.data; +package cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.data; -import cn.iocoder.dashboard.framework.excel.core.annotations.DictFormat; -import cn.iocoder.dashboard.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.adminserver.modules.system.enums.SysDictTypeConstants; import com.alibaba.excel.annotation.ExcelProperty; import lombok.Data; -import static cn.iocoder.dashboard.modules.system.enums.dict.SysDictTypeEnum.SYS_COMMON_STATUS; - /** * 字典数据 Excel 导出响应 VO */ @@ -29,7 +28,7 @@ public class SysDictDataExcelVO { private String dictType; @ExcelProperty(value = "状态", converter = DictConvert.class) - @DictFormat(SYS_COMMON_STATUS) + @DictFormat(SysDictTypeConstants.COMMON_STATUS) private Integer status; } diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/data/SysDictDataExportReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/data/SysDictDataExportReqVO.java similarity index 90% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/data/SysDictDataExportReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/data/SysDictDataExportReqVO.java index f05c12407..43e8884f2 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/data/SysDictDataExportReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/data/SysDictDataExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.dict.vo.data; +package cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.data; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/data/SysDictDataPageReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/data/SysDictDataPageReqVO.java similarity index 86% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/data/SysDictDataPageReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/data/SysDictDataPageReqVO.java index ad5a07536..0cd2a488d 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/data/SysDictDataPageReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/data/SysDictDataPageReqVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.controller.dict.vo.data; +package cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.data; -import cn.iocoder.dashboard.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/data/SysDictDataRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/data/SysDictDataRespVO.java similarity index 89% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/data/SysDictDataRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/data/SysDictDataRespVO.java index cb2595c8c..fa6f77fca 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/data/SysDictDataRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/data/SysDictDataRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.dict.vo.data; +package cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.data; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/data/SysDictDataSimpleRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/data/SysDictDataSimpleRespVO.java similarity index 87% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/data/SysDictDataSimpleRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/data/SysDictDataSimpleRespVO.java index a9e5aae8a..e4a09e695 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/data/SysDictDataSimpleRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/data/SysDictDataSimpleRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.dict.vo.data; +package cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.data; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/data/SysDictDataUpdateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/data/SysDictDataUpdateReqVO.java similarity index 86% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/data/SysDictDataUpdateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/data/SysDictDataUpdateReqVO.java index 1d79f19ec..ccbd45584 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/data/SysDictDataUpdateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/data/SysDictDataUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.dict.vo.data; +package cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.data; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/type/SysDictTypeBaseVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/type/SysDictTypeBaseVO.java similarity index 92% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/type/SysDictTypeBaseVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/type/SysDictTypeBaseVO.java index 306ede795..c4458cd26 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/type/SysDictTypeBaseVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/type/SysDictTypeBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.dict.vo.type; +package cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.type; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/type/SysDictTypeCreateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/type/SysDictTypeCreateReqVO.java similarity index 89% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/type/SysDictTypeCreateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/type/SysDictTypeCreateReqVO.java index 747ad1902..6f84ecfd7 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/type/SysDictTypeCreateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/type/SysDictTypeCreateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.dict.vo.type; +package cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.type; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/type/SysDictTypeExcelVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/type/SysDictTypeExcelVO.java similarity index 56% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/type/SysDictTypeExcelVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/type/SysDictTypeExcelVO.java index b8a9d3d4e..fbb4da367 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/type/SysDictTypeExcelVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/type/SysDictTypeExcelVO.java @@ -1,12 +1,11 @@ -package cn.iocoder.dashboard.modules.system.controller.dict.vo.type; +package cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.type; -import cn.iocoder.dashboard.framework.excel.core.annotations.DictFormat; -import cn.iocoder.dashboard.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.adminserver.modules.system.enums.SysDictTypeConstants; import com.alibaba.excel.annotation.ExcelProperty; import lombok.Data; -import static cn.iocoder.dashboard.modules.system.enums.dict.SysDictTypeEnum.SYS_COMMON_STATUS; - /** * 字典类型 Excel 导出响应 VO */ @@ -23,7 +22,7 @@ public class SysDictTypeExcelVO { private String type; @ExcelProperty(value = "状态", converter = DictConvert.class) - @DictFormat(SYS_COMMON_STATUS) + @DictFormat(SysDictTypeConstants.COMMON_STATUS) private Integer status; } diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/type/SysDictTypeExportReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/type/SysDictTypeExportReqVO.java similarity index 84% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/type/SysDictTypeExportReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/type/SysDictTypeExportReqVO.java index 19730c7c4..cfe54e563 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/type/SysDictTypeExportReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/type/SysDictTypeExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.dict.vo.type; +package cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.type; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,7 +7,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel("字典类型分页列表 Request VO") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/type/SysDictTypePageReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/type/SysDictTypePageReqVO.java similarity index 83% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/type/SysDictTypePageReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/type/SysDictTypePageReqVO.java index 32c6d42df..434ca272d 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/type/SysDictTypePageReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/type/SysDictTypePageReqVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.controller.dict.vo.type; +package cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.type; -import cn.iocoder.dashboard.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -10,7 +10,7 @@ import org.springframework.format.annotation.DateTimeFormat; import javax.validation.constraints.Size; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel("字典类型分页列表 Request VO") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/type/SysDictTypeRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/type/SysDictTypeRespVO.java similarity index 90% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/type/SysDictTypeRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/type/SysDictTypeRespVO.java index d9a5f806b..fd216bc8f 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/type/SysDictTypeRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/type/SysDictTypeRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.dict.vo.type; +package cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.type; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/type/SysDictTypeSimpleRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/type/SysDictTypeSimpleRespVO.java similarity index 89% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/type/SysDictTypeSimpleRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/type/SysDictTypeSimpleRespVO.java index 382544b7f..7d0ef04dc 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/type/SysDictTypeSimpleRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/type/SysDictTypeSimpleRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.dict.vo.type; +package cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.type; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/type/SysDictTypeUpdateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/type/SysDictTypeUpdateReqVO.java similarity index 86% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/type/SysDictTypeUpdateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/type/SysDictTypeUpdateReqVO.java index d77995220..9b887bd5d 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/type/SysDictTypeUpdateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/dict/vo/type/SysDictTypeUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.dict.vo.type; +package cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.type; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/SysErrorCodeController.http b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/SysErrorCodeController.http similarity index 100% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/SysErrorCodeController.http rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/SysErrorCodeController.http diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/SysErrorCodeController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/SysErrorCodeController.java similarity index 79% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/SysErrorCodeController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/SysErrorCodeController.java index 93d5bdffc..04c88ebf3 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/SysErrorCodeController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/SysErrorCodeController.java @@ -1,13 +1,13 @@ -package cn.iocoder.dashboard.modules.system.controller.errorcode; +package cn.iocoder.yudao.adminserver.modules.system.controller.errorcode; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; -import cn.iocoder.dashboard.modules.system.convert.errorcode.SysErrorCodeConvert; -import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.*; -import cn.iocoder.dashboard.modules.system.dal.dataobject.errorcode.SysErrorCodeDO; -import cn.iocoder.dashboard.modules.system.service.errorcode.SysErrorCodeService; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.adminserver.modules.system.convert.errorcode.SysErrorCodeConvert; +import cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo.*; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.errorcode.SysErrorCodeDO; +import cn.iocoder.yudao.adminserver.modules.system.service.errorcode.SysErrorCodeService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -21,8 +21,8 @@ import javax.validation.Valid; import java.io.IOException; import java.util.List; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "错误码") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/vo/SysErrorCodeBaseVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/vo/SysErrorCodeBaseVO.java similarity index 92% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/vo/SysErrorCodeBaseVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/vo/SysErrorCodeBaseVO.java index 235ba8880..118c38b25 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/vo/SysErrorCodeBaseVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/vo/SysErrorCodeBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.errorcode.vo; +package cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/vo/SysErrorCodeCreateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/vo/SysErrorCodeCreateReqVO.java similarity index 79% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/vo/SysErrorCodeCreateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/vo/SysErrorCodeCreateReqVO.java index 7daedf7d3..15190abfe 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/vo/SysErrorCodeCreateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/vo/SysErrorCodeCreateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.errorcode.vo; +package cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo; import io.swagger.annotations.ApiModel; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/vo/SysErrorCodeExcelVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/vo/SysErrorCodeExcelVO.java similarity index 66% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/vo/SysErrorCodeExcelVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/vo/SysErrorCodeExcelVO.java index 81461103e..8e20b6e4a 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/vo/SysErrorCodeExcelVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/vo/SysErrorCodeExcelVO.java @@ -1,14 +1,13 @@ -package cn.iocoder.dashboard.modules.system.controller.errorcode.vo; +package cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo; -import cn.iocoder.dashboard.framework.excel.core.annotations.DictFormat; -import cn.iocoder.dashboard.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.adminserver.modules.infra.enums.InfDictTypeConstants; import com.alibaba.excel.annotation.ExcelProperty; import lombok.Data; import java.util.Date; -import static cn.iocoder.dashboard.modules.system.enums.dict.SysDictTypeEnum.SYS_ERROR_CODE_TYPE; - /** * 错误码 Excel VO * @@ -21,7 +20,7 @@ public class SysErrorCodeExcelVO { private Long id; @ExcelProperty(value = "错误码类型", converter = DictConvert.class) - @DictFormat(SYS_ERROR_CODE_TYPE) + @DictFormat(InfDictTypeConstants.ERROR_CODE_TYPE) private Integer type; @ExcelProperty("应用名") diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/vo/SysErrorCodeExportReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/vo/SysErrorCodeExportReqVO.java similarity index 85% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/vo/SysErrorCodeExportReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/vo/SysErrorCodeExportReqVO.java index a9253d4f8..604767994 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/vo/SysErrorCodeExportReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/vo/SysErrorCodeExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.errorcode.vo; +package cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,7 +7,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel(value = "错误码 Excel 导出 Request VO", description = "参数和 InfErrorCodePageReqVO 是一致的") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/vo/SysErrorCodePageReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/vo/SysErrorCodePageReqVO.java similarity index 82% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/vo/SysErrorCodePageReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/vo/SysErrorCodePageReqVO.java index 667110cf2..baf781a59 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/vo/SysErrorCodePageReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/vo/SysErrorCodePageReqVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.controller.errorcode.vo; +package cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo; -import cn.iocoder.dashboard.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -10,7 +10,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel("错误码分页 Request VO") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/vo/SysErrorCodeRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/vo/SysErrorCodeRespVO.java similarity index 90% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/vo/SysErrorCodeRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/vo/SysErrorCodeRespVO.java index ef0e804f1..69798f3f4 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/vo/SysErrorCodeRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/vo/SysErrorCodeRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.errorcode.vo; +package cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/vo/SysErrorCodeUpdateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/vo/SysErrorCodeUpdateReqVO.java similarity index 87% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/vo/SysErrorCodeUpdateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/vo/SysErrorCodeUpdateReqVO.java index 1659b47c4..11f124a9b 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/errorcode/vo/SysErrorCodeUpdateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/errorcode/vo/SysErrorCodeUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.errorcode.vo; +package cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/SysLoginLogController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/SysLoginLogController.java similarity index 62% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/SysLoginLogController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/SysLoginLogController.java index 21159ab74..7af2cafeb 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/SysLoginLogController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/SysLoginLogController.java @@ -1,16 +1,16 @@ -package cn.iocoder.dashboard.modules.system.controller.logger; +package cn.iocoder.yudao.adminserver.modules.system.controller.logger; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogExcelVO; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogExportReqVO; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogPageReqVO; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogRespVO; -import cn.iocoder.dashboard.modules.system.convert.logger.SysLoginLogConvert; -import cn.iocoder.dashboard.modules.system.dal.dataobject.logger.SysLoginLogDO; -import cn.iocoder.dashboard.modules.system.service.logger.SysLoginLogService; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog.SysLoginLogExcelVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog.SysLoginLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog.SysLoginLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog.SysLoginLogRespVO; +import cn.iocoder.yudao.adminserver.modules.system.convert.logger.SysLoginLogConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.logger.SysLoginLogDO; +import cn.iocoder.yudao.adminserver.modules.system.service.logger.SysLoginLogService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; @@ -25,7 +25,7 @@ import javax.validation.Valid; import java.io.IOException; import java.util.List; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "登陆日志") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/SysOperateLogController.http b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/SysOperateLogController.http similarity index 100% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/SysOperateLogController.http rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/SysOperateLogController.http diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/SysOperateLogController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/SysOperateLogController.java similarity index 65% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/SysOperateLogController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/SysOperateLogController.java index 003e9ee0d..042bf933f 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/SysOperateLogController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/SysOperateLogController.java @@ -1,20 +1,20 @@ -package cn.iocoder.dashboard.modules.system.controller.logger; +package cn.iocoder.yudao.adminserver.modules.system.controller.logger; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogExcelVO; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogExportReqVO; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogPageReqVO; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogRespVO; -import cn.iocoder.dashboard.modules.system.convert.logger.SysOperateLogConvert; -import cn.iocoder.dashboard.modules.system.dal.dataobject.logger.SysOperateLogDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO; -import cn.iocoder.dashboard.modules.system.service.logger.SysOperateLogService; -import cn.iocoder.dashboard.modules.system.service.user.SysUserService; -import cn.iocoder.dashboard.util.collection.CollectionUtils; -import cn.iocoder.dashboard.util.collection.MapUtils; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.operatelog.SysOperateLogExcelVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.operatelog.SysOperateLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.operatelog.SysOperateLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.operatelog.SysOperateLogRespVO; +import cn.iocoder.yudao.adminserver.modules.system.convert.logger.SysOperateLogConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.logger.SysOperateLogDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.user.SysUserDO; +import cn.iocoder.yudao.adminserver.modules.system.service.logger.SysOperateLogService; +import cn.iocoder.yudao.adminserver.modules.system.service.user.SysUserService; +import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; +import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; @@ -32,8 +32,8 @@ import java.util.Collection; import java.util.List; import java.util.Map; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "操作日志") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/loginlog/SysLoginLogBaseVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/loginlog/SysLoginLogBaseVO.java similarity index 95% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/loginlog/SysLoginLogBaseVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/loginlog/SysLoginLogBaseVO.java index c5dd34ea9..080f8f9bd 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/loginlog/SysLoginLogBaseVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/loginlog/SysLoginLogBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog; +package cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/loginlog/SysLoginLogCreateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/loginlog/SysLoginLogCreateReqVO.java similarity index 82% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/loginlog/SysLoginLogCreateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/loginlog/SysLoginLogCreateReqVO.java index 78a0c4541..6f915540c 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/loginlog/SysLoginLogCreateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/loginlog/SysLoginLogCreateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog; +package cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog; import io.swagger.annotations.ApiModel; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/loginlog/SysLoginLogExcelVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/loginlog/SysLoginLogExcelVO.java similarity index 63% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/loginlog/SysLoginLogExcelVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/loginlog/SysLoginLogExcelVO.java index 225f91b1f..8857a6b86 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/loginlog/SysLoginLogExcelVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/loginlog/SysLoginLogExcelVO.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog; +package cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog; -import cn.iocoder.dashboard.framework.excel.core.annotations.DictFormat; -import cn.iocoder.dashboard.framework.excel.core.convert.DictConvert; -import cn.iocoder.dashboard.modules.system.enums.dict.SysDictTypeEnum; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.adminserver.modules.system.enums.SysDictTypeConstants; import com.alibaba.excel.annotation.ExcelProperty; import lombok.Data; @@ -21,7 +21,7 @@ public class SysLoginLogExcelVO { private String username; @ExcelProperty(value = "登陆结果", converter = DictConvert.class) - @DictFormat(SysDictTypeEnum.SYS_LOGIN_RESULT) + @DictFormat(SysDictTypeConstants.LOGIN_RESULT) private Integer result; @ExcelProperty("登陆 IP") diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/loginlog/SysLoginLogExportReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/loginlog/SysLoginLogExportReqVO.java similarity index 83% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/loginlog/SysLoginLogExportReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/loginlog/SysLoginLogExportReqVO.java index 478175fbb..1e706ddae 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/loginlog/SysLoginLogExportReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/loginlog/SysLoginLogExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog; +package cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,7 +7,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel("登陆日志分页列表 Request VO") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/loginlog/SysLoginLogPageReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/loginlog/SysLoginLogPageReqVO.java similarity index 80% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/loginlog/SysLoginLogPageReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/loginlog/SysLoginLogPageReqVO.java index c90bfff0b..5b9389b58 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/loginlog/SysLoginLogPageReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/loginlog/SysLoginLogPageReqVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog; +package cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog; -import cn.iocoder.dashboard.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -9,7 +9,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel("登陆日志分页列表 Request VO") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/loginlog/SysLoginLogRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/loginlog/SysLoginLogRespVO.java similarity index 87% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/loginlog/SysLoginLogRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/loginlog/SysLoginLogRespVO.java index f9e2664f8..6d46f8cb0 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/loginlog/SysLoginLogRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/loginlog/SysLoginLogRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog; +package cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/operatelog/SysOperateLogBaseVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/operatelog/SysOperateLogBaseVO.java similarity index 95% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/operatelog/SysOperateLogBaseVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/operatelog/SysOperateLogBaseVO.java index bcdce0fb2..d29a96ce3 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/operatelog/SysOperateLogBaseVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/operatelog/SysOperateLogBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog; +package cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.operatelog; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -57,7 +57,7 @@ public class SysOperateLogBaseVO { @NotEmpty(message = "浏览器 UserAgent 不能为空") private String userAgent; - @ApiModelProperty(value = "Java 方法名", required = true, example = "cn.iocoder.dashboard.UserController.save(...)") + @ApiModelProperty(value = "Java 方法名", required = true, example = "cn.iocoder.yudao.adminserver.UserController.save(...)") @NotEmpty(message = "Java 方法名不能为空") private String javaMethod; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/operatelog/SysOperateLogExcelVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/operatelog/SysOperateLogExcelVO.java similarity index 68% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/operatelog/SysOperateLogExcelVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/operatelog/SysOperateLogExcelVO.java index 475d31338..71959d883 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/operatelog/SysOperateLogExcelVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/operatelog/SysOperateLogExcelVO.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog; +package cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.operatelog; -import cn.iocoder.dashboard.framework.excel.core.annotations.DictFormat; -import cn.iocoder.dashboard.framework.excel.core.convert.DictConvert; -import cn.iocoder.dashboard.modules.system.enums.dict.SysDictTypeEnum; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.adminserver.modules.system.enums.SysDictTypeConstants; import com.alibaba.excel.annotation.ExcelProperty; import lombok.Data; @@ -24,7 +24,7 @@ public class SysOperateLogExcelVO { private String name; @ExcelProperty(value = "操作类型", converter = DictConvert.class) - @DictFormat(SysDictTypeEnum.SYS_OPERATE_TYPE) + @DictFormat(SysDictTypeConstants.OPERATE_TYPE) private String type; @ExcelProperty("操作人") diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/operatelog/SysOperateLogExportReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/operatelog/SysOperateLogExportReqVO.java similarity index 85% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/operatelog/SysOperateLogExportReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/operatelog/SysOperateLogExportReqVO.java index c1f23b2e4..2c500e12b 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/operatelog/SysOperateLogExportReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/operatelog/SysOperateLogExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog; +package cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.operatelog; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,7 +7,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel("操作日志分页列表 Request VO") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/operatelog/SysOperateLogPageReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/operatelog/SysOperateLogPageReqVO.java similarity index 81% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/operatelog/SysOperateLogPageReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/operatelog/SysOperateLogPageReqVO.java index b5b05e7fe..2a0378a59 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/operatelog/SysOperateLogPageReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/operatelog/SysOperateLogPageReqVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog; +package cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.operatelog; -import cn.iocoder.dashboard.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -8,7 +8,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel("操作日志分页列表 Request VO") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/operatelog/SysOperateLogRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/operatelog/SysOperateLogRespVO.java similarity index 86% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/operatelog/SysOperateLogRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/operatelog/SysOperateLogRespVO.java index 2ebdfeff0..1ac82a91e 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/vo/operatelog/SysOperateLogRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/logger/vo/operatelog/SysOperateLogRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog; +package cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.operatelog; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/notice/SysNoticeController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/notice/SysNoticeController.java similarity index 74% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/notice/SysNoticeController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/notice/SysNoticeController.java index 8a3f17032..f004c953e 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/notice/SysNoticeController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/notice/SysNoticeController.java @@ -1,13 +1,13 @@ -package cn.iocoder.dashboard.modules.system.controller.notice; +package cn.iocoder.yudao.adminserver.modules.system.controller.notice; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.notice.vo.SysNoticeCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.notice.vo.SysNoticePageReqVO; -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.convert.notice.SysNoticeConvert; -import cn.iocoder.dashboard.modules.system.service.notice.SysNoticeService; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.notice.vo.SysNoticeCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.notice.vo.SysNoticePageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.notice.vo.SysNoticeRespVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.notice.vo.SysNoticeUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.convert.notice.SysNoticeConvert; +import cn.iocoder.yudao.adminserver.modules.system.service.notice.SysNoticeService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.validation.Valid; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @Api(tags = "通知公告") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/notice/vo/SysNoticeBaseVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/notice/vo/SysNoticeBaseVO.java similarity index 93% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/notice/vo/SysNoticeBaseVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/notice/vo/SysNoticeBaseVO.java index 5fc4f9017..9bd228ed5 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/notice/vo/SysNoticeBaseVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/notice/vo/SysNoticeBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.notice.vo; +package cn.iocoder.yudao.adminserver.modules.system.controller.notice.vo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/notice/vo/SysNoticeCreateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/notice/vo/SysNoticeCreateReqVO.java similarity index 76% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/notice/vo/SysNoticeCreateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/notice/vo/SysNoticeCreateReqVO.java index 1a1811447..cf86f2164 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/notice/vo/SysNoticeCreateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/notice/vo/SysNoticeCreateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.notice.vo; +package cn.iocoder.yudao.adminserver.modules.system.controller.notice.vo; import io.swagger.annotations.ApiModel; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/notice/vo/SysNoticePageReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/notice/vo/SysNoticePageReqVO.java similarity index 80% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/notice/vo/SysNoticePageReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/notice/vo/SysNoticePageReqVO.java index a463bfc0a..b347ab936 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/notice/vo/SysNoticePageReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/notice/vo/SysNoticePageReqVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.controller.notice.vo; +package cn.iocoder.yudao.adminserver.modules.system.controller.notice.vo; -import cn.iocoder.dashboard.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/notice/vo/SysNoticeRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/notice/vo/SysNoticeRespVO.java similarity index 88% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/notice/vo/SysNoticeRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/notice/vo/SysNoticeRespVO.java index afca87f79..8145e85b2 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/notice/vo/SysNoticeRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/notice/vo/SysNoticeRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.notice.vo; +package cn.iocoder.yudao.adminserver.modules.system.controller.notice.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/notice/vo/SysNoticeUpdateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/notice/vo/SysNoticeUpdateReqVO.java similarity index 87% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/notice/vo/SysNoticeUpdateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/notice/vo/SysNoticeUpdateReqVO.java index fffe4b84c..2c02d5aae 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/notice/vo/SysNoticeUpdateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/notice/vo/SysNoticeUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.notice.vo; +package cn.iocoder.yudao.adminserver.modules.system.controller.notice.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/SysMenuController.http b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/SysMenuController.http similarity index 100% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/SysMenuController.http rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/SysMenuController.http diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/SysMenuController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/SysMenuController.java similarity index 82% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/SysMenuController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/SysMenuController.java index 120949252..ddf388dd4 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/SysMenuController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/SysMenuController.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.system.controller.permission; +package cn.iocoder.yudao.adminserver.modules.system.controller.permission; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.modules.system.controller.permission.vo.menu.*; -import cn.iocoder.dashboard.modules.system.convert.permission.SysMenuConvert; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysMenuDO; -import cn.iocoder.dashboard.modules.system.service.permission.SysMenuService; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.menu.*; +import cn.iocoder.yudao.adminserver.modules.system.convert.permission.SysMenuConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysMenuDO; +import cn.iocoder.yudao.adminserver.modules.system.service.permission.SysMenuService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -18,7 +18,7 @@ import javax.validation.Valid; import java.util.Comparator; import java.util.List; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @Api(tags = "菜单") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/SysPermissionController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/SysPermissionController.java similarity index 79% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/SysPermissionController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/SysPermissionController.java index 2de34ff8a..ea04c89fd 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/SysPermissionController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/SysPermissionController.java @@ -1,10 +1,10 @@ -package cn.iocoder.dashboard.modules.system.controller.permission; +package cn.iocoder.yudao.adminserver.modules.system.controller.permission; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.modules.system.controller.permission.vo.permission.SysPermissionAssignRoleDataScopeReqVO; -import cn.iocoder.dashboard.modules.system.controller.permission.vo.permission.SysPermissionAssignRoleMenuReqVO; -import cn.iocoder.dashboard.modules.system.controller.permission.vo.permission.SysPermissionAssignUserRoleReqVO; -import cn.iocoder.dashboard.modules.system.service.permission.SysPermissionService; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.permission.SysPermissionAssignRoleDataScopeReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.permission.SysPermissionAssignRoleMenuReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.permission.SysPermissionAssignUserRoleReqVO; +import cn.iocoder.yudao.adminserver.modules.system.service.permission.SysPermissionService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.util.Set; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; /** * 权限 Controller,提供赋予用户、角色的权限的 API 接口 diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/SysRoleController.http b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/SysRoleController.http similarity index 100% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/SysRoleController.http rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/SysRoleController.http diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/SysRoleController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/SysRoleController.java similarity index 80% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/SysRoleController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/SysRoleController.java index eb12d2a78..0fb7d45d9 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/SysRoleController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/SysRoleController.java @@ -1,14 +1,14 @@ -package cn.iocoder.dashboard.modules.system.controller.permission; +package cn.iocoder.yudao.adminserver.modules.system.controller.permission; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; -import cn.iocoder.dashboard.modules.system.controller.permission.vo.role.*; -import cn.iocoder.dashboard.modules.system.convert.permission.SysRoleConvert; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysRoleDO; -import cn.iocoder.dashboard.modules.system.service.permission.SysRoleService; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.role.*; +import cn.iocoder.yudao.adminserver.modules.system.convert.permission.SysRoleConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysRoleDO; +import cn.iocoder.yudao.adminserver.modules.system.service.permission.SysRoleService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -24,8 +24,8 @@ import java.util.Collections; import java.util.Comparator; import java.util.List; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "角色") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/menu/SysMenuBaseVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/menu/SysMenuBaseVO.java similarity index 96% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/menu/SysMenuBaseVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/menu/SysMenuBaseVO.java index c69cec51b..66b62d03b 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/menu/SysMenuBaseVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/menu/SysMenuBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.permission.vo.menu; +package cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.menu; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/menu/SysMenuCreateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/menu/SysMenuCreateReqVO.java similarity index 70% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/menu/SysMenuCreateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/menu/SysMenuCreateReqVO.java index 8fba89a93..e50c73f2f 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/menu/SysMenuCreateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/menu/SysMenuCreateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.permission.vo.menu; +package cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.menu; import io.swagger.annotations.ApiModel; import lombok.*; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/menu/SysMenuListReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/menu/SysMenuListReqVO.java similarity index 84% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/menu/SysMenuListReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/menu/SysMenuListReqVO.java index 3990a9cd9..5600a132c 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/menu/SysMenuListReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/menu/SysMenuListReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.permission.vo.menu; +package cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.menu; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/menu/SysMenuRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/menu/SysMenuRespVO.java similarity index 90% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/menu/SysMenuRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/menu/SysMenuRespVO.java index ef1e7acad..6175a8ca3 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/menu/SysMenuRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/menu/SysMenuRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.permission.vo.menu; +package cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.menu; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/menu/SysMenuSimpleRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/menu/SysMenuSimpleRespVO.java similarity index 88% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/menu/SysMenuSimpleRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/menu/SysMenuSimpleRespVO.java index 121afe5d2..689d705d4 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/menu/SysMenuSimpleRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/menu/SysMenuSimpleRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.permission.vo.menu; +package cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.menu; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/menu/SysMenuUpdateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/menu/SysMenuUpdateReqVO.java similarity index 84% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/menu/SysMenuUpdateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/menu/SysMenuUpdateReqVO.java index 44f181ea3..736d58073 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/menu/SysMenuUpdateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/menu/SysMenuUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.permission.vo.menu; +package cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.menu; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/permission/SysPermissionAssignRoleDataScopeReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/permission/SysPermissionAssignRoleDataScopeReqVO.java similarity index 91% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/permission/SysPermissionAssignRoleDataScopeReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/permission/SysPermissionAssignRoleDataScopeReqVO.java index c71304318..8050e8143 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/permission/SysPermissionAssignRoleDataScopeReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/permission/SysPermissionAssignRoleDataScopeReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.permission.vo.permission; +package cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.permission; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/permission/SysPermissionAssignRoleMenuReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/permission/SysPermissionAssignRoleMenuReqVO.java similarity index 87% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/permission/SysPermissionAssignRoleMenuReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/permission/SysPermissionAssignRoleMenuReqVO.java index 4d5057244..47ffae928 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/permission/SysPermissionAssignRoleMenuReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/permission/SysPermissionAssignRoleMenuReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.permission.vo.permission; +package cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.permission; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/permission/SysPermissionAssignUserRoleReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/permission/SysPermissionAssignUserRoleReqVO.java similarity index 87% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/permission/SysPermissionAssignUserRoleReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/permission/SysPermissionAssignUserRoleReqVO.java index 259336b90..1a3e03415 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/permission/SysPermissionAssignUserRoleReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/permission/SysPermissionAssignUserRoleReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.permission.vo.permission; +package cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.permission; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleBaseVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRoleBaseVO.java similarity index 94% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleBaseVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRoleBaseVO.java index ade6991fc..a07e20c4a 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleBaseVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRoleBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.permission.vo.role; +package cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.role; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleCreateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRoleCreateReqVO.java similarity index 73% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleCreateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRoleCreateReqVO.java index 870dcce4c..f16c3adf9 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleCreateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRoleCreateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.permission.vo.role; +package cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.role; import io.swagger.annotations.ApiModel; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleExcelVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRoleExcelVO.java similarity index 61% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleExcelVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRoleExcelVO.java index 44d92a156..c8c130537 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleExcelVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRoleExcelVO.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.system.controller.permission.vo.role; +package cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.role; -import cn.iocoder.dashboard.framework.excel.core.annotations.DictFormat; -import cn.iocoder.dashboard.framework.excel.core.convert.DictConvert; -import cn.iocoder.dashboard.modules.system.enums.dict.SysDictTypeEnum; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.adminserver.modules.system.enums.SysDictTypeConstants; import com.alibaba.excel.annotation.ExcelProperty; import lombok.Data; @@ -28,7 +28,7 @@ public class SysRoleExcelVO { private Integer dataScope; @ExcelProperty(value = "角色状态", converter = DictConvert.class) - @DictFormat(SysDictTypeEnum.SYS_COMMON_STATUS) + @DictFormat(SysDictTypeConstants.COMMON_STATUS) private String status; } diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleExportReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRoleExportReqVO.java similarity index 82% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleExportReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRoleExportReqVO.java index 129fd103d..656f136d0 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleExportReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRoleExportReqVO.java @@ -1,14 +1,13 @@ -package cn.iocoder.dashboard.modules.system.controller.permission.vo.role; +package cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.role; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -import lombok.EqualsAndHashCode; import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel("角色分页 Request VO") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRolePageReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRolePageReqVO.java similarity index 81% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRolePageReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRolePageReqVO.java index 3dddb4354..6983176fa 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRolePageReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRolePageReqVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.controller.permission.vo.role; +package cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.role; -import cn.iocoder.dashboard.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -9,7 +9,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel("角色分页 Request VO") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRoleRespVO.java similarity index 93% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRoleRespVO.java index bb5e3cc0f..f3a565d71 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRoleRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.permission.vo.role; +package cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.role; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleSimpleRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRoleSimpleRespVO.java similarity index 86% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleSimpleRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRoleSimpleRespVO.java index 6ac990c4b..c1b973ff7 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleSimpleRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRoleSimpleRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.permission.vo.role; +package cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.role; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleUpdateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRoleUpdateReqVO.java similarity index 85% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleUpdateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRoleUpdateReqVO.java index d35f930ab..dcf994f8d 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleUpdateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRoleUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.permission.vo.role; +package cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.role; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleUpdateStatusReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRoleUpdateStatusReqVO.java similarity index 89% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleUpdateStatusReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRoleUpdateStatusReqVO.java index 8783015a7..1741881dd 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleUpdateStatusReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/permission/vo/role/SysRoleUpdateStatusReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.permission.vo.role; +package cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.role; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SmsCallbackController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/SmsCallbackController.java similarity index 81% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SmsCallbackController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/SmsCallbackController.java index 30d75bca5..ec3287f63 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SmsCallbackController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/SmsCallbackController.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.system.controller.sms; +package cn.iocoder.yudao.adminserver.modules.system.controller.sms; import cn.hutool.core.util.URLUtil; import cn.hutool.extra.servlet.ServletUtil; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; -import cn.iocoder.dashboard.framework.sms.core.enums.SmsChannelEnum; -import cn.iocoder.dashboard.modules.system.service.sms.SysSmsService; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.sms.core.enums.SmsChannelEnum; +import cn.iocoder.yudao.adminserver.modules.system.service.sms.SysSmsService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @Api(tags = "短信回调") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SysSmsChannelController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/SysSmsChannelController.java similarity index 83% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SysSmsChannelController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/SysSmsChannelController.java index 1e1a916c1..5a05a2e6b 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SysSmsChannelController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/SysSmsChannelController.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.system.controller.sms; +package cn.iocoder.yudao.adminserver.modules.system.controller.sms; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.channel.*; -import cn.iocoder.dashboard.modules.system.convert.sms.SysSmsChannelConvert; -import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsChannelDO; -import cn.iocoder.dashboard.modules.system.service.sms.SysSmsChannelService; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.channel.*; +import cn.iocoder.yudao.adminserver.modules.system.convert.sms.SysSmsChannelConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms.SysSmsChannelDO; +import cn.iocoder.yudao.adminserver.modules.system.service.sms.SysSmsChannelService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -17,7 +17,7 @@ import javax.validation.Valid; import java.util.Comparator; import java.util.List; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @Api(tags = "短信渠道") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SysSmsLogController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/SysSmsLogController.java similarity index 61% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SysSmsLogController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/SysSmsLogController.java index 1d0a2fed0..a39f0a77b 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SysSmsLogController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/SysSmsLogController.java @@ -1,16 +1,16 @@ -package cn.iocoder.dashboard.modules.system.controller.sms; +package cn.iocoder.yudao.adminserver.modules.system.controller.sms; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.log.SysSmsLogExcelVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.log.SysSmsLogExportReqVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.log.SysSmsLogPageReqVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.log.SysSmsLogRespVO; -import cn.iocoder.dashboard.modules.system.convert.sms.SysSmsLogConvert; -import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsLogDO; -import cn.iocoder.dashboard.modules.system.service.sms.SysSmsLogService; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.log.SysSmsLogExcelVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.log.SysSmsLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.log.SysSmsLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.log.SysSmsLogRespVO; +import cn.iocoder.yudao.adminserver.modules.system.convert.sms.SysSmsLogConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms.SysSmsLogDO; +import cn.iocoder.yudao.adminserver.modules.system.service.sms.SysSmsLogService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; @@ -25,8 +25,8 @@ import javax.validation.Valid; import java.io.IOException; import java.util.List; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "短信日志") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SysSmsTemplateController.http b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/SysSmsTemplateController.http similarity index 100% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SysSmsTemplateController.http rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/SysSmsTemplateController.http diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SysSmsTemplateController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/SysSmsTemplateController.java similarity index 80% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SysSmsTemplateController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/SysSmsTemplateController.java index 1c442b71c..b57beb255 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/SysSmsTemplateController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/SysSmsTemplateController.java @@ -1,14 +1,14 @@ -package cn.iocoder.dashboard.modules.system.controller.sms; +package cn.iocoder.yudao.adminserver.modules.system.controller.sms; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.template.*; -import cn.iocoder.dashboard.modules.system.convert.sms.SysSmsTemplateConvert; -import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsTemplateDO; -import cn.iocoder.dashboard.modules.system.service.sms.SysSmsService; -import cn.iocoder.dashboard.modules.system.service.sms.SysSmsTemplateService; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template.*; +import cn.iocoder.yudao.adminserver.modules.system.convert.sms.SysSmsTemplateConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms.SysSmsTemplateDO; +import cn.iocoder.yudao.adminserver.modules.system.service.sms.SysSmsService; +import cn.iocoder.yudao.adminserver.modules.system.service.sms.SysSmsTemplateService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -21,8 +21,8 @@ import javax.validation.Valid; import java.io.IOException; import java.util.List; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api("短信模板") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/channel/SysSmsChannelBaseVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/channel/SysSmsChannelBaseVO.java similarity index 94% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/channel/SysSmsChannelBaseVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/channel/SysSmsChannelBaseVO.java index 9959b8af0..fd475bdcf 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/channel/SysSmsChannelBaseVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/channel/SysSmsChannelBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.sms.vo.channel; +package cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.channel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/channel/SysSmsChannelCreateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/channel/SysSmsChannelCreateReqVO.java similarity index 88% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/channel/SysSmsChannelCreateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/channel/SysSmsChannelCreateReqVO.java index a21cbb71d..e9466a7b6 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/channel/SysSmsChannelCreateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/channel/SysSmsChannelCreateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.sms.vo.channel; +package cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.channel; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/channel/SysSmsChannelPageReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/channel/SysSmsChannelPageReqVO.java similarity index 79% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/channel/SysSmsChannelPageReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/channel/SysSmsChannelPageReqVO.java index 523a6c375..e30bc3d48 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/channel/SysSmsChannelPageReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/channel/SysSmsChannelPageReqVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.controller.sms.vo.channel; +package cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.channel; -import cn.iocoder.dashboard.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -10,7 +10,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel("短信渠道分页 Request VO") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/channel/SysSmsChannelRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/channel/SysSmsChannelRespVO.java similarity index 89% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/channel/SysSmsChannelRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/channel/SysSmsChannelRespVO.java index 20770689a..8e7d111a3 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/channel/SysSmsChannelRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/channel/SysSmsChannelRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.sms.vo.channel; +package cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.channel; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/channel/SysSmsChannelSimpleRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/channel/SysSmsChannelSimpleRespVO.java similarity index 90% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/channel/SysSmsChannelSimpleRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/channel/SysSmsChannelSimpleRespVO.java index b7d84165c..451a943eb 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/channel/SysSmsChannelSimpleRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/channel/SysSmsChannelSimpleRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.sms.vo.channel; +package cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.channel; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/channel/SysSmsChannelUpdateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/channel/SysSmsChannelUpdateReqVO.java similarity index 87% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/channel/SysSmsChannelUpdateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/channel/SysSmsChannelUpdateReqVO.java index 66ab79412..816e5c219 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/channel/SysSmsChannelUpdateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/channel/SysSmsChannelUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.sms.vo.channel; +package cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.channel; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/log/SysSmsLogExcelVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/log/SysSmsLogExcelVO.java similarity index 79% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/log/SysSmsLogExcelVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/log/SysSmsLogExcelVO.java index 6a385feba..837693980 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/log/SysSmsLogExcelVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/log/SysSmsLogExcelVO.java @@ -1,16 +1,15 @@ -package cn.iocoder.dashboard.modules.system.controller.sms.vo.log; +package cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.log; -import cn.iocoder.dashboard.framework.excel.core.annotations.DictFormat; -import cn.iocoder.dashboard.framework.excel.core.convert.DictConvert; -import cn.iocoder.dashboard.framework.excel.core.convert.JsonConvert; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.framework.excel.core.convert.JsonConvert; +import cn.iocoder.yudao.adminserver.modules.system.enums.SysDictTypeConstants; import com.alibaba.excel.annotation.ExcelProperty; import lombok.Data; import java.util.Date; import java.util.Map; -import static cn.iocoder.dashboard.modules.system.enums.dict.SysDictTypeEnum.*; - /** * 短信日志 Excel VO * @@ -35,7 +34,7 @@ public class SysSmsLogExcelVO { private String templateCode; @ExcelProperty(value = "短信类型", converter = DictConvert.class) - @DictFormat(SYS_SMS_TEMPLATE_TYPE) + @DictFormat(SysDictTypeConstants.SMS_TEMPLATE_TYPE) private Integer templateType; @ExcelProperty("短信内容") @@ -54,11 +53,11 @@ public class SysSmsLogExcelVO { private Long userId; @ExcelProperty(value = "用户类型", converter = DictConvert.class) - @DictFormat(USER_TYPE) + @DictFormat(SysDictTypeConstants.USER_TYPE) private Integer userType; @ExcelProperty(value = "发送状态", converter = DictConvert.class) - @DictFormat(SYS_SMS_SEND_STATUS) + @DictFormat(SysDictTypeConstants.SMS_SEND_STATUS) private Integer sendStatus; @ExcelProperty("发送时间") @@ -83,7 +82,7 @@ public class SysSmsLogExcelVO { private String apiSerialNo; @ExcelProperty(value = "接收状态", converter = DictConvert.class) - @DictFormat(SYS_SMS_RECEIVE_STATUS) + @DictFormat(SysDictTypeConstants.SMS_RECEIVE_STATUS) private Integer receiveStatus; @ExcelProperty("接收时间") diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/log/SysSmsLogExportReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/log/SysSmsLogExportReqVO.java similarity index 88% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/log/SysSmsLogExportReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/log/SysSmsLogExportReqVO.java index 89add180a..94be2d84e 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/log/SysSmsLogExportReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/log/SysSmsLogExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.sms.vo.log; +package cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.log; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,7 +7,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel(value = "短信日志 Excel 导出 Request VO", description = "参数和 SysSmsLogPageReqVO 是一致的") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/log/SysSmsLogPageReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/log/SysSmsLogPageReqVO.java similarity index 87% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/log/SysSmsLogPageReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/log/SysSmsLogPageReqVO.java index 6573e15a7..1ea8a1fa7 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/log/SysSmsLogPageReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/log/SysSmsLogPageReqVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.controller.sms.vo.log; +package cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.log; -import cn.iocoder.dashboard.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -10,7 +10,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel("短信日志分页 Request VO") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/log/SysSmsLogRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/log/SysSmsLogRespVO.java similarity index 97% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/log/SysSmsLogRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/log/SysSmsLogRespVO.java index 423a57919..10ff01a3d 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/log/SysSmsLogRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/log/SysSmsLogRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.sms.vo.log; +package cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.log; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplateBaseVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/template/SysSmsTemplateBaseVO.java similarity index 95% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplateBaseVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/template/SysSmsTemplateBaseVO.java index 584050d55..cc587872e 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplateBaseVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/template/SysSmsTemplateBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.sms.vo.template; +package cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplateCreateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/template/SysSmsTemplateCreateReqVO.java similarity index 79% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplateCreateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/template/SysSmsTemplateCreateReqVO.java index 8f847556d..6d5931565 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplateCreateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/template/SysSmsTemplateCreateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.sms.vo.template; +package cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template; import io.swagger.annotations.ApiModel; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplateExcelVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/template/SysSmsTemplateExcelVO.java similarity index 69% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplateExcelVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/template/SysSmsTemplateExcelVO.java index 3eef8133b..a3215414c 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplateExcelVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/template/SysSmsTemplateExcelVO.java @@ -1,14 +1,13 @@ -package cn.iocoder.dashboard.modules.system.controller.sms.vo.template; +package cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template; -import cn.iocoder.dashboard.framework.excel.core.annotations.DictFormat; -import cn.iocoder.dashboard.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.adminserver.modules.system.enums.SysDictTypeConstants; import com.alibaba.excel.annotation.ExcelProperty; import lombok.Data; import java.util.Date; -import static cn.iocoder.dashboard.modules.system.enums.dict.SysDictTypeEnum.*; - /** * 短信模板 Excel VO * @@ -21,11 +20,11 @@ public class SysSmsTemplateExcelVO { private Long id; @ExcelProperty(value = "短信签名", converter = DictConvert.class) - @DictFormat(SYS_SMS_TEMPLATE_TYPE) + @DictFormat(SysDictTypeConstants.SMS_TEMPLATE_TYPE) private Integer type; @ExcelProperty(value = "开启状态", converter = DictConvert.class) - @DictFormat(SYS_COMMON_STATUS) + @DictFormat(SysDictTypeConstants.COMMON_STATUS) private Integer status; @ExcelProperty("模板编码") @@ -47,7 +46,7 @@ public class SysSmsTemplateExcelVO { private Long channelId; @ExcelProperty(value = "短信渠道编码", converter = DictConvert.class) - @DictFormat(SYS_SMS_CHANNEL_CODE) + @DictFormat(SysDictTypeConstants.SMS_CHANNEL_CODE) private String channelCode; @ExcelProperty("创建时间") diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplateExportReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/template/SysSmsTemplateExportReqVO.java similarity index 87% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplateExportReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/template/SysSmsTemplateExportReqVO.java index 34f940253..66efb4df6 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplateExportReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/template/SysSmsTemplateExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.sms.vo.template; +package cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,7 +7,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel(value = "短信模板 Excel 导出 Request VO", description = "参数和 SysSmsTemplatePageReqVO 是一致的") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplatePageReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/template/SysSmsTemplatePageReqVO.java similarity index 85% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplatePageReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/template/SysSmsTemplatePageReqVO.java index b5f1e5bfb..fc8bd80b1 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplatePageReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/template/SysSmsTemplatePageReqVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.controller.sms.vo.template; +package cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template; -import cn.iocoder.dashboard.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -10,7 +10,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel("短信模板分页 Request VO") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplateRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/template/SysSmsTemplateRespVO.java similarity index 90% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplateRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/template/SysSmsTemplateRespVO.java index fda58486f..c26d3804d 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplateRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/template/SysSmsTemplateRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.sms.vo.template; +package cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplateSendReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/template/SysSmsTemplateSendReqVO.java similarity index 89% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplateSendReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/template/SysSmsTemplateSendReqVO.java index 2857ee5d0..34a773e03 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplateSendReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/template/SysSmsTemplateSendReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.sms.vo.template; +package cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplateUpdateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/template/SysSmsTemplateUpdateReqVO.java similarity index 87% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplateUpdateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/template/SysSmsTemplateUpdateReqVO.java index 9b3aba840..223aa0cae 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/sms/vo/template/SysSmsTemplateUpdateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/sms/vo/template/SysSmsTemplateUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.sms.vo.template; +package cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/SysUserController.http b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/SysUserController.http similarity index 100% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/user/SysUserController.http rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/SysUserController.http diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/SysUserController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/SysUserController.java similarity index 84% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/user/SysUserController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/SysUserController.java index dcfce4d5b..df54e7980 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/SysUserController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/SysUserController.java @@ -1,20 +1,20 @@ -package cn.iocoder.dashboard.modules.system.controller.user; +package cn.iocoder.yudao.adminserver.modules.system.controller.user; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; -import cn.iocoder.dashboard.modules.system.controller.user.vo.user.*; -import cn.iocoder.dashboard.modules.system.convert.user.SysUserConvert; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysDeptDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO; -import cn.iocoder.dashboard.modules.system.enums.common.SysSexEnum; -import cn.iocoder.dashboard.modules.system.service.dept.SysDeptService; -import cn.iocoder.dashboard.modules.system.service.user.SysUserService; -import cn.iocoder.dashboard.util.collection.CollectionUtils; -import cn.iocoder.dashboard.util.collection.MapUtils; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user.*; +import cn.iocoder.yudao.adminserver.modules.system.convert.user.SysUserConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dept.SysDeptDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.user.SysUserDO; +import cn.iocoder.yudao.adminserver.modules.system.enums.common.SysSexEnum; +import cn.iocoder.yudao.adminserver.modules.system.service.dept.SysDeptService; +import cn.iocoder.yudao.adminserver.modules.system.service.user.SysUserService; +import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; +import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -30,8 +30,8 @@ import javax.validation.Valid; import java.io.IOException; import java.util.*; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "用户") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/SysUserProfileController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/SysUserProfileController.java similarity index 64% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/user/SysUserProfileController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/SysUserProfileController.java index a1b8b0cb9..8fb29bbed 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/SysUserProfileController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/SysUserProfileController.java @@ -1,21 +1,21 @@ -package cn.iocoder.dashboard.modules.system.controller.user; +package cn.iocoder.yudao.adminserver.modules.system.controller.user; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.modules.system.controller.user.vo.profile.SysUserProfileRespVO; -import cn.iocoder.dashboard.modules.system.controller.user.vo.profile.SysUserProfileUpdatePasswordReqVO; -import cn.iocoder.dashboard.modules.system.controller.user.vo.profile.SysUserProfileUpdateReqVO; -import cn.iocoder.dashboard.modules.system.convert.user.SysUserConvert; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysDeptDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysPostDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysRoleDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO; -import cn.iocoder.dashboard.modules.system.service.dept.SysDeptService; -import cn.iocoder.dashboard.modules.system.service.dept.SysPostService; -import cn.iocoder.dashboard.modules.system.service.permission.SysPermissionService; -import cn.iocoder.dashboard.modules.system.service.permission.SysRoleService; -import cn.iocoder.dashboard.modules.system.service.user.SysUserService; +import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.profile.SysUserProfileRespVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.profile.SysUserProfileUpdatePasswordReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.profile.SysUserProfileUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.convert.user.SysUserConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dept.SysDeptDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dept.SysPostDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysRoleDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.user.SysUserDO; +import cn.iocoder.yudao.adminserver.modules.system.service.dept.SysDeptService; +import cn.iocoder.yudao.adminserver.modules.system.service.dept.SysPostService; +import cn.iocoder.yudao.adminserver.modules.system.service.permission.SysPermissionService; +import cn.iocoder.yudao.adminserver.modules.system.service.permission.SysRoleService; +import cn.iocoder.yudao.adminserver.modules.system.service.user.SysUserService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; @@ -28,9 +28,9 @@ import javax.validation.Valid; import java.io.IOException; import java.util.List; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.FILE_IS_EMPTY; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.FILE_IS_EMPTY; /** * @author niudehua diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/profile/SysUserProfileRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/profile/SysUserProfileRespVO.java similarity index 92% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/profile/SysUserProfileRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/profile/SysUserProfileRespVO.java index de264b105..fddc09bdd 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/profile/SysUserProfileRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/profile/SysUserProfileRespVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.controller.user.vo.profile; +package cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.profile; -import cn.iocoder.dashboard.modules.system.controller.user.vo.user.SysUserBaseVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user.SysUserBaseVO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/profile/SysUserProfileUpdatePasswordReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/profile/SysUserProfileUpdatePasswordReqVO.java similarity index 90% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/profile/SysUserProfileUpdatePasswordReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/profile/SysUserProfileUpdatePasswordReqVO.java index 6ff56487a..340d2e407 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/profile/SysUserProfileUpdatePasswordReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/profile/SysUserProfileUpdatePasswordReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.user.vo.profile; +package cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.profile; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/profile/SysUserProfileUpdateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/profile/SysUserProfileUpdateReqVO.java similarity index 92% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/profile/SysUserProfileUpdateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/profile/SysUserProfileUpdateReqVO.java index 95051f0a1..e77bcd7f6 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/profile/SysUserProfileUpdateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/profile/SysUserProfileUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.user.vo.profile; +package cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.profile; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserBaseVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserBaseVO.java similarity index 96% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserBaseVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserBaseVO.java index 4fe0f9b15..1f41be3db 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserBaseVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.user.vo.user; +package cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserCreateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserCreateReqVO.java similarity index 88% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserCreateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserCreateReqVO.java index 76be8ff85..89f2e1798 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserCreateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserCreateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.user.vo.user; +package cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user; import io.swagger.annotations.ApiModel; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserExcelVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserExcelVO.java similarity index 67% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserExcelVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserExcelVO.java index 37253ac4a..d7013fa40 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserExcelVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserExcelVO.java @@ -1,15 +1,13 @@ -package cn.iocoder.dashboard.modules.system.controller.user.vo.user; +package cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user; -import cn.iocoder.dashboard.framework.excel.core.annotations.DictFormat; -import cn.iocoder.dashboard.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.adminserver.modules.system.enums.SysDictTypeConstants; import com.alibaba.excel.annotation.ExcelProperty; import lombok.Data; import java.util.Date; -import static cn.iocoder.dashboard.modules.system.enums.dict.SysDictTypeEnum.SYS_COMMON_STATUS; -import static cn.iocoder.dashboard.modules.system.enums.dict.SysDictTypeEnum.SYS_USER_SEX; - /** * 用户 Excel 导出 VO */ @@ -32,11 +30,11 @@ public class SysUserExcelVO { private String mobile; @ExcelProperty(value = "用户性别", converter = DictConvert.class) - @DictFormat(SYS_USER_SEX) + @DictFormat(SysDictTypeConstants.USER_SEX) private Integer sex; @ExcelProperty(value = "帐号状态", converter = DictConvert.class) - @DictFormat(SYS_COMMON_STATUS) + @DictFormat(SysDictTypeConstants.COMMON_STATUS) private Integer status; @ExcelProperty("最后登录IP") diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserExportReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserExportReqVO.java similarity index 87% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserExportReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserExportReqVO.java index 8076c4748..24d8d00c3 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserExportReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.user.vo.user; +package cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -9,7 +9,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel(value = "用户导出 Request VO", description = "参数和 SysUserPageReqVO 是一致的") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserImportExcelVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserImportExcelVO.java similarity index 67% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserImportExcelVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserImportExcelVO.java index b50b8942d..bef545178 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserImportExcelVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserImportExcelVO.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.system.controller.user.vo.user; +package cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user; -import cn.iocoder.dashboard.framework.excel.core.annotations.DictFormat; -import cn.iocoder.dashboard.framework.excel.core.convert.DictConvert; -import cn.iocoder.dashboard.modules.system.enums.dict.SysDictTypeEnum; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.adminserver.modules.system.enums.SysDictTypeConstants; import com.alibaba.excel.annotation.ExcelProperty; import lombok.AllArgsConstructor; import lombok.Builder; @@ -34,11 +34,11 @@ public class SysUserImportExcelVO { private String mobile; @ExcelProperty(value = "用户性别", converter = DictConvert.class) - @DictFormat(SysDictTypeEnum.SYS_USER_SEX) + @DictFormat(SysDictTypeConstants.USER_SEX) private Integer sex; @ExcelProperty(value = "账号状态", converter = DictConvert.class) - @DictFormat(SysDictTypeEnum.SYS_COMMON_STATUS) + @DictFormat(SysDictTypeConstants.COMMON_STATUS) private Integer status; } diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserImportRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserImportRespVO.java similarity index 90% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserImportRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserImportRespVO.java index 551eeb150..bb4359eed 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserImportRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserImportRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.user.vo.user; +package cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserPageItemRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserPageItemRespVO.java similarity index 91% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserPageItemRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserPageItemRespVO.java index dc6963c58..58959a533 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserPageItemRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserPageItemRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.user.vo.user; +package cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserPageReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserPageReqVO.java similarity index 84% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserPageReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserPageReqVO.java index 03efb8ceb..ca1e597f9 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserPageReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserPageReqVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.controller.user.vo.user; +package cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user; -import cn.iocoder.dashboard.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; @@ -11,7 +11,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel("用户分页 Request VO") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserRespVO.java similarity index 92% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserRespVO.java index fa2335139..8b68dbc8d 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.user.vo.user; +package cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserUpdatePasswordReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserUpdatePasswordReqVO.java similarity index 90% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserUpdatePasswordReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserUpdatePasswordReqVO.java index 10fa4a033..9364c57aa 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserUpdatePasswordReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserUpdatePasswordReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.user.vo.user; +package cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserUpdateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserUpdateReqVO.java similarity index 86% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserUpdateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserUpdateReqVO.java index 8c2bb9a24..7fc8ffbb9 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserUpdateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.user.vo.user; +package cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserUpdateStatusReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserUpdateStatusReqVO.java similarity index 89% rename from src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserUpdateStatusReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserUpdateStatusReqVO.java index bd4e1bb68..dd1baa4fa 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserUpdateStatusReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/controller/user/vo/user/SysUserUpdateStatusReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.controller.user.vo.user; +package cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/auth/SysAuthConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/auth/SysAuthConvert.java similarity index 74% rename from src/main/java/cn/iocoder/dashboard/modules/system/convert/auth/SysAuthConvert.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/auth/SysAuthConvert.java index 48c909534..84a56ac17 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/auth/SysAuthConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/auth/SysAuthConvert.java @@ -1,15 +1,15 @@ -package cn.iocoder.dashboard.modules.system.convert.auth; +package cn.iocoder.yudao.adminserver.modules.system.convert.auth; -import cn.iocoder.dashboard.framework.security.core.LoginUser; -import cn.iocoder.dashboard.modules.system.controller.auth.vo.auth.SysAuthMenuRespVO; -import cn.iocoder.dashboard.modules.system.controller.auth.vo.auth.SysAuthPermissionInfoRespVO; -import cn.iocoder.dashboard.modules.system.controller.user.vo.profile.SysUserProfileUpdatePasswordReqVO; -import cn.iocoder.dashboard.modules.system.controller.user.vo.profile.SysUserProfileUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysMenuDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysRoleDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO; -import cn.iocoder.dashboard.modules.system.enums.permission.MenuIdEnum; -import cn.iocoder.dashboard.util.collection.CollectionUtils; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.adminserver.modules.system.controller.auth.vo.auth.SysAuthMenuRespVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.auth.vo.auth.SysAuthPermissionInfoRespVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.profile.SysUserProfileUpdatePasswordReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.profile.SysUserProfileUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysMenuDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysRoleDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.user.SysUserDO; +import cn.iocoder.yudao.adminserver.modules.system.enums.permission.MenuIdEnum; +import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import org.mapstruct.Mapper; import org.mapstruct.Mapping; import org.mapstruct.factory.Mappers; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/auth/SysUserSessionConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/auth/SysUserSessionConvert.java similarity index 51% rename from src/main/java/cn/iocoder/dashboard/modules/system/convert/auth/SysUserSessionConvert.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/auth/SysUserSessionConvert.java index 3b3eae3d9..473fa911c 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/auth/SysUserSessionConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/auth/SysUserSessionConvert.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.system.convert.auth; +package cn.iocoder.yudao.adminserver.modules.system.convert.auth; -import cn.iocoder.dashboard.modules.system.controller.auth.vo.session.SysUserSessionPageItemRespVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.auth.SysUserSessionDO; +import cn.iocoder.yudao.adminserver.modules.system.controller.auth.vo.session.SysUserSessionPageItemRespVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.auth.SysUserSessionDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/common/SysCaptchaConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/common/SysCaptchaConvert.java similarity index 73% rename from src/main/java/cn/iocoder/dashboard/modules/system/convert/common/SysCaptchaConvert.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/common/SysCaptchaConvert.java index 992c9c9f1..0931a54de 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/common/SysCaptchaConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/common/SysCaptchaConvert.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.system.convert.common; +package cn.iocoder.yudao.adminserver.modules.system.convert.common; import cn.hutool.captcha.AbstractCaptcha; import cn.hutool.captcha.ICaptcha; -import cn.iocoder.dashboard.modules.system.controller.common.vo.SysCaptchaImageRespVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.common.vo.SysCaptchaImageRespVO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/dept/SysDeptConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/dept/SysDeptConvert.java new file mode 100644 index 000000000..364b034af --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/dept/SysDeptConvert.java @@ -0,0 +1,28 @@ +package cn.iocoder.yudao.adminserver.modules.system.convert.dept; + +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.dept.SysDeptCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.dept.SysDeptRespVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.dept.SysDeptSimpleRespVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.dept.SysDeptUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dept.SysDeptDO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +import java.util.List; + +@Mapper +public interface SysDeptConvert { + + SysDeptConvert INSTANCE = Mappers.getMapper(SysDeptConvert.class); + + List convertList(List list); + + List convertList02(List list); + + SysDeptRespVO convert(SysDeptDO bean); + + SysDeptDO convert(SysDeptCreateReqVO bean); + + SysDeptDO convert(SysDeptUpdateReqVO bean); + +} diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/dept/SysPostConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/dept/SysPostConvert.java similarity index 66% rename from src/main/java/cn/iocoder/dashboard/modules/system/convert/dept/SysPostConvert.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/dept/SysPostConvert.java index 62b254ff4..934a31dba 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/dept/SysPostConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/dept/SysPostConvert.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.system.convert.dept; +package cn.iocoder.yudao.adminserver.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.dataobject.dept.SysPostDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.post.*; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dept.SysPostDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/dict/SysDictDataConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/dict/SysDictDataConvert.java similarity index 54% rename from src/main/java/cn/iocoder/dashboard/modules/system/convert/dict/SysDictDataConvert.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/dict/SysDictDataConvert.java index af8fda25e..d8e54bc8b 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/dict/SysDictDataConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/dict/SysDictDataConvert.java @@ -1,11 +1,13 @@ -package cn.iocoder.dashboard.modules.system.convert.dict; +package cn.iocoder.yudao.adminserver.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.dataobject.dict.SysDictDataDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.dict.core.dto.DictDataRespDTO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.data.*; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dict.SysDictDataDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; +import java.util.Collection; import java.util.List; @Mapper @@ -25,4 +27,8 @@ public interface SysDictDataConvert { List convertList02(List bean); + DictDataRespDTO convert02(SysDictDataDO bean); + + List convertList03(Collection list); + } diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/dict/SysDictTypeConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/dict/SysDictTypeConvert.java similarity index 68% rename from src/main/java/cn/iocoder/dashboard/modules/system/convert/dict/SysDictTypeConvert.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/dict/SysDictTypeConvert.java index d0ae1a3d1..e20451c25 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/dict/SysDictTypeConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/dict/SysDictTypeConvert.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.system.convert.dict; +package cn.iocoder.yudao.adminserver.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.dataobject.dict.SysDictTypeDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.type.*; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dict.SysDictTypeDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/errorcode/SysErrorCodeConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/errorcode/SysErrorCodeConvert.java new file mode 100644 index 000000000..a7b8eade2 --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/errorcode/SysErrorCodeConvert.java @@ -0,0 +1,42 @@ +package cn.iocoder.yudao.adminserver.modules.system.convert.errorcode; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.core.dto.ErrorCodeAutoGenerateReqDTO; +import cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.core.dto.ErrorCodeRespDTO; +import cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo.SysErrorCodeCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo.SysErrorCodeExcelVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo.SysErrorCodeRespVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo.SysErrorCodeUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.errorcode.SysErrorCodeDO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +import java.util.List; + +/** + * 错误码 Convert + * + * @author 芋道源码 + */ +@Mapper +public interface SysErrorCodeConvert { + + SysErrorCodeConvert INSTANCE = Mappers.getMapper(SysErrorCodeConvert.class); + + SysErrorCodeDO convert(SysErrorCodeCreateReqVO bean); + + SysErrorCodeDO convert(SysErrorCodeUpdateReqVO bean); + + SysErrorCodeRespVO convert(SysErrorCodeDO bean); + + List convertList(List list); + + PageResult convertPage(PageResult page); + + List convertList02(List list); + + SysErrorCodeDO convert(ErrorCodeAutoGenerateReqDTO bean); + + List convertList03(List list); + +} diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/logger/SysLoginLogConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/logger/SysLoginLogConvert.java new file mode 100644 index 000000000..7c31fe3ae --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/logger/SysLoginLogConvert.java @@ -0,0 +1,24 @@ +package cn.iocoder.yudao.adminserver.modules.system.convert.logger; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog.SysLoginLogCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog.SysLoginLogExcelVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog.SysLoginLogRespVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.logger.SysLoginLogDO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +import java.util.List; + +@Mapper +public interface SysLoginLogConvert { + + SysLoginLogConvert INSTANCE = Mappers.getMapper(SysLoginLogConvert.class); + + SysLoginLogDO convert(SysLoginLogCreateReqVO bean); + + PageResult convertPage(PageResult page); + + List convertList(List list); + +} diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/logger/SysOperateLogConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/logger/SysOperateLogConvert.java similarity index 55% rename from src/main/java/cn/iocoder/dashboard/modules/system/convert/logger/SysOperateLogConvert.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/logger/SysOperateLogConvert.java index 92a83adf3..dc31e078a 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/logger/SysOperateLogConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/logger/SysOperateLogConvert.java @@ -1,12 +1,12 @@ -package cn.iocoder.dashboard.modules.system.convert.logger; +package cn.iocoder.yudao.adminserver.modules.system.convert.logger; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogExcelVO; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogRespVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.logger.SysOperateLogDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO; -import cn.iocoder.dashboard.util.collection.MapUtils; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.operatelog.core.dto.OperateLogCreateReqDTO; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.operatelog.SysOperateLogExcelVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.operatelog.SysOperateLogRespVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.logger.SysOperateLogDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.user.SysUserDO; +import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; @@ -14,14 +14,14 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; -import static cn.iocoder.dashboard.common.exception.enums.GlobalErrorCodeConstants.SUCCESS; +import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants.SUCCESS; @Mapper public interface SysOperateLogConvert { SysOperateLogConvert INSTANCE = Mappers.getMapper(SysOperateLogConvert.class); - SysOperateLogDO convert(SysOperateLogCreateReqVO bean); + SysOperateLogDO convert(OperateLogCreateReqDTO bean); PageResult convertPage(PageResult page); diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/notice/SysNoticeConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/notice/SysNoticeConvert.java new file mode 100644 index 000000000..ccba20e77 --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/notice/SysNoticeConvert.java @@ -0,0 +1,24 @@ +package cn.iocoder.yudao.adminserver.modules.system.convert.notice; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.notice.vo.SysNoticeCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.notice.vo.SysNoticeRespVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.notice.vo.SysNoticeUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.notice.SysNoticeDO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +@Mapper +public interface SysNoticeConvert { + + SysNoticeConvert INSTANCE = Mappers.getMapper(SysNoticeConvert.class); + + PageResult convertPage(PageResult page); + + SysNoticeRespVO convert(SysNoticeDO bean); + + SysNoticeDO convert(SysNoticeUpdateReqVO bean); + + SysNoticeDO convert(SysNoticeCreateReqVO bean); + +} diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/package-info.java similarity index 56% rename from src/main/java/cn/iocoder/dashboard/modules/system/convert/package-info.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/package-info.java index 89deac94a..d4052eb09 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/package-info.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/package-info.java @@ -3,4 +3,4 @@ * * 目前使用 MapStruct 框架 */ -package cn.iocoder.dashboard.modules.system.convert; +package cn.iocoder.yudao.adminserver.modules.system.convert; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/permission/SysMenuConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/permission/SysMenuConvert.java new file mode 100644 index 000000000..c8ef1496b --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/permission/SysMenuConvert.java @@ -0,0 +1,28 @@ +package cn.iocoder.yudao.adminserver.modules.system.convert.permission; + +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.menu.SysMenuCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.menu.SysMenuRespVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.menu.SysMenuSimpleRespVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.menu.SysMenuUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysMenuDO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +import java.util.List; + +@Mapper +public interface SysMenuConvert { + + SysMenuConvert INSTANCE = Mappers.getMapper(SysMenuConvert.class); + + List convertList(List list); + + SysMenuDO convert(SysMenuCreateReqVO bean); + + SysMenuDO convert(SysMenuUpdateReqVO bean); + + SysMenuRespVO convert(SysMenuDO bean); + + List convertList02(List list); + +} diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/permission/SysRoleConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/permission/SysRoleConvert.java similarity index 66% rename from src/main/java/cn/iocoder/dashboard/modules/system/convert/permission/SysRoleConvert.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/permission/SysRoleConvert.java index 0201ae680..59e4d59b4 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/permission/SysRoleConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/permission/SysRoleConvert.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.system.convert.permission; +package cn.iocoder.yudao.adminserver.modules.system.convert.permission; -import cn.iocoder.dashboard.modules.system.controller.permission.vo.role.*; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysRoleDO; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.role.*; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysRoleDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/sms/SysSmsChannelConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/sms/SysSmsChannelConvert.java similarity index 52% rename from src/main/java/cn/iocoder/dashboard/modules/system/convert/sms/SysSmsChannelConvert.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/sms/SysSmsChannelConvert.java index f8a0e71e2..8d8304d37 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/sms/SysSmsChannelConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/sms/SysSmsChannelConvert.java @@ -1,12 +1,12 @@ -package cn.iocoder.dashboard.modules.system.convert.sms; +package cn.iocoder.yudao.adminserver.modules.system.convert.sms; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.sms.core.property.SmsChannelProperties; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.channel.SysSmsChannelCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.channel.SysSmsChannelRespVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.channel.SysSmsChannelSimpleRespVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.channel.SysSmsChannelUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsChannelDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.sms.core.property.SmsChannelProperties; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.channel.SysSmsChannelCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.channel.SysSmsChannelRespVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.channel.SysSmsChannelSimpleRespVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.channel.SysSmsChannelUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms.SysSmsChannelDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/sms/SysSmsLogConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/sms/SysSmsLogConvert.java similarity index 57% rename from src/main/java/cn/iocoder/dashboard/modules/system/convert/sms/SysSmsLogConvert.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/sms/SysSmsLogConvert.java index 6cb1f650a..792d3290a 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/sms/SysSmsLogConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/sms/SysSmsLogConvert.java @@ -1,9 +1,9 @@ -package cn.iocoder.dashboard.modules.system.convert.sms; +package cn.iocoder.yudao.adminserver.modules.system.convert.sms; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.log.SysSmsLogExcelVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.log.SysSmsLogRespVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsLogDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.log.SysSmsLogExcelVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.log.SysSmsLogRespVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms.SysSmsLogDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/sms/SysSmsTemplateConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/sms/SysSmsTemplateConvert.java similarity index 51% rename from src/main/java/cn/iocoder/dashboard/modules/system/convert/sms/SysSmsTemplateConvert.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/sms/SysSmsTemplateConvert.java index 5d73771eb..f7ffeb6eb 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/sms/SysSmsTemplateConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/sms/SysSmsTemplateConvert.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.system.convert.sms; +package cn.iocoder.yudao.adminserver.modules.system.convert.sms; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.template.SysSmsTemplateCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.template.SysSmsTemplateExcelVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.template.SysSmsTemplateRespVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.template.SysSmsTemplateUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsTemplateDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template.SysSmsTemplateCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template.SysSmsTemplateExcelVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template.SysSmsTemplateRespVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template.SysSmsTemplateUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms.SysSmsTemplateDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/user/SysUserConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/user/SysUserConvert.java similarity index 52% rename from src/main/java/cn/iocoder/dashboard/modules/system/convert/user/SysUserConvert.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/user/SysUserConvert.java index fd4a8b9d3..7fddda876 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/user/SysUserConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/user/SysUserConvert.java @@ -1,13 +1,13 @@ -package cn.iocoder.dashboard.modules.system.convert.user; +package cn.iocoder.yudao.adminserver.modules.system.convert.user; -import cn.iocoder.dashboard.modules.system.controller.user.vo.profile.SysUserProfileRespVO; -import cn.iocoder.dashboard.modules.system.controller.user.vo.profile.SysUserProfileUpdatePasswordReqVO; -import cn.iocoder.dashboard.modules.system.controller.user.vo.profile.SysUserProfileUpdateReqVO; -import cn.iocoder.dashboard.modules.system.controller.user.vo.user.*; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysDeptDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysPostDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysRoleDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.profile.SysUserProfileRespVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.profile.SysUserProfileUpdatePasswordReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.profile.SysUserProfileUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user.*; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dept.SysDeptDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dept.SysPostDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysRoleDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.user.SysUserDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/《芋道 Spring Boot 对象转换 MapStruct 入门》.md b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/《芋道 Spring Boot 对象转换 MapStruct 入门》.md similarity index 100% rename from src/main/java/cn/iocoder/dashboard/modules/system/convert/《芋道 Spring Boot 对象转换 MapStruct 入门》.md rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/convert/《芋道 Spring Boot 对象转换 MapStruct 入门》.md diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/auth/SysUserSessionDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/auth/SysUserSessionDO.java similarity index 82% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/auth/SysUserSessionDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/auth/SysUserSessionDO.java index 13b718030..8aa25a5b3 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/auth/SysUserSessionDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/auth/SysUserSessionDO.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.system.dal.dataobject.auth; +package cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.auth; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.framework.security.core.LoginUser; -import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.user.SysUserDO; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/dept/SysDeptDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/dept/SysDeptDO.java similarity index 81% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/dept/SysDeptDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/dept/SysDeptDO.java index e116bd3b0..46d7b9818 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/dept/SysDeptDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/dept/SysDeptDO.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.system.dal.dataobject.dept; +package cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dept; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/dept/SysPostDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/dept/SysPostDO.java similarity index 78% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/dept/SysPostDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/dept/SysPostDO.java index ba5f3e0ad..52b19c7ea 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/dept/SysPostDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/dept/SysPostDO.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.system.dal.dataobject.dept; +package cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dept; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/dict/SysDictDataDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/dict/SysDictDataDO.java similarity index 81% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/dict/SysDictDataDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/dict/SysDictDataDO.java index ae9ff6e75..22b072213 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/dict/SysDictDataDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/dict/SysDictDataDO.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.system.dal.dataobject.dict; +package cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dict; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/dict/SysDictTypeDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/dict/SysDictTypeDO.java similarity index 79% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/dict/SysDictTypeDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/dict/SysDictTypeDO.java index 164bb7120..548ee6fe9 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/dict/SysDictTypeDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/dict/SysDictTypeDO.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.system.dal.dataobject.dict; +package cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dict; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/errorcode/SysErrorCodeDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/errorcode/SysErrorCodeDO.java similarity index 78% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/errorcode/SysErrorCodeDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/errorcode/SysErrorCodeDO.java index 75c541791..d2fdb182e 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/errorcode/SysErrorCodeDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/errorcode/SysErrorCodeDO.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.system.dal.dataobject.errorcode; +package cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.errorcode; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.modules.system.enums.errorcode.SysErrorCodeTypeEnum; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.adminserver.modules.system.enums.errorcode.SysErrorCodeTypeEnum; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/logger/SysLoginLogDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/logger/SysLoginLogDO.java similarity index 75% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/logger/SysLoginLogDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/logger/SysLoginLogDO.java index ce046f945..c61ee7c7b 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/logger/SysLoginLogDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/logger/SysLoginLogDO.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.system.dal.dataobject.logger; +package cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.logger; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.modules.system.enums.logger.SysLoginLogTypeEnum; -import cn.iocoder.dashboard.modules.system.enums.logger.SysLoginResultEnum; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.adminserver.modules.system.enums.logger.SysLoginLogTypeEnum; +import cn.iocoder.yudao.adminserver.modules.system.enums.logger.SysLoginResultEnum; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import lombok.EqualsAndHashCode; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/logger/SysOperateLogDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/logger/SysOperateLogDO.java similarity index 89% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/logger/SysOperateLogDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/logger/SysOperateLogDO.java index 4c7bc431b..1983518fc 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/logger/SysOperateLogDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/logger/SysOperateLogDO.java @@ -1,9 +1,9 @@ -package cn.iocoder.dashboard.modules.system.dal.dataobject.logger; +package cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.logger; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.user.SysUserDO; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/notice/SysNoticeDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/notice/SysNoticeDO.java similarity index 72% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/notice/SysNoticeDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/notice/SysNoticeDO.java index dc89207a7..1ddff6537 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/notice/SysNoticeDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/notice/SysNoticeDO.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.system.dal.dataobject.notice; +package cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.notice; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.modules.system.enums.notice.SysNoticeTypeEnum; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.adminserver.modules.system.enums.notice.SysNoticeTypeEnum; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/permission/SysMenuDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/permission/SysMenuDO.java similarity index 84% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/permission/SysMenuDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/permission/SysMenuDO.java index 82956e9f9..043f2e93d 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/permission/SysMenuDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/permission/SysMenuDO.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.system.dal.dataobject.permission; +package cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.modules.system.enums.permission.MenuTypeEnum; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.adminserver.modules.system.enums.permission.MenuTypeEnum; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/permission/SysRoleDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/permission/SysRoleDO.java similarity index 72% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/permission/SysRoleDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/permission/SysRoleDO.java index 5b891f12d..72ebedbfd 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/permission/SysRoleDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/permission/SysRoleDO.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.system.dal.dataobject.permission; +package cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.framework.mybatis.core.type.JsonLongSetTypeHandler; -import cn.iocoder.dashboard.framework.security.core.enums.DataScopeEnum; -import cn.iocoder.dashboard.modules.system.enums.permission.RoleCodeEnum; -import cn.iocoder.dashboard.modules.system.enums.permission.SysRoleTypeEnum; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.framework.mybatis.core.type.JsonLongSetTypeHandler; +import cn.iocoder.yudao.framework.security.core.enums.DataScopeEnum; +import cn.iocoder.yudao.adminserver.modules.system.enums.permission.RoleCodeEnum; +import cn.iocoder.yudao.adminserver.modules.system.enums.permission.SysRoleTypeEnum; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/permission/SysRoleMenuDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/permission/SysRoleMenuDO.java similarity index 78% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/permission/SysRoleMenuDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/permission/SysRoleMenuDO.java index ed75d244d..5cb6c1a17 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/permission/SysRoleMenuDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/permission/SysRoleMenuDO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.dal.dataobject.permission; +package cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/permission/SysUserRoleDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/permission/SysUserRoleDO.java similarity index 78% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/permission/SysUserRoleDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/permission/SysUserRoleDO.java index 5dd50ec82..6792f5608 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/permission/SysUserRoleDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/permission/SysUserRoleDO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.dal.dataobject.permission; +package cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/sms/SysSmsChannelDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/sms/SysSmsChannelDO.java similarity index 78% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/sms/SysSmsChannelDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/sms/SysSmsChannelDO.java index 7b0b3f072..3a3b879b5 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/sms/SysSmsChannelDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/sms/SysSmsChannelDO.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.system.dal.dataobject.sms; +package cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.framework.sms.core.enums.SmsChannelEnum; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.framework.sms.core.enums.SmsChannelEnum; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import lombok.EqualsAndHashCode; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/sms/SysSmsLogDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/sms/SysSmsLogDO.java similarity index 88% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/sms/SysSmsLogDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/sms/SysSmsLogDO.java index 076e18f39..3ac39b040 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/sms/SysSmsLogDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/sms/SysSmsLogDO.java @@ -1,10 +1,10 @@ -package cn.iocoder.dashboard.modules.system.dal.dataobject.sms; +package cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms; -import cn.iocoder.dashboard.common.enums.UserTypeEnum; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.framework.sms.core.enums.SmsFrameworkErrorCodeConstants; -import cn.iocoder.dashboard.modules.system.enums.sms.SysSmsReceiveStatusEnum; -import cn.iocoder.dashboard.modules.system.enums.sms.SysSmsSendStatusEnum; +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.framework.sms.core.enums.SmsFrameworkErrorCodeConstants; +import cn.iocoder.yudao.adminserver.modules.system.enums.sms.SysSmsReceiveStatusEnum; +import cn.iocoder.yudao.adminserver.modules.system.enums.sms.SysSmsSendStatusEnum; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/sms/SysSmsTemplateDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/sms/SysSmsTemplateDO.java similarity index 85% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/sms/SysSmsTemplateDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/sms/SysSmsTemplateDO.java index 9316358df..e40976059 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/sms/SysSmsTemplateDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/sms/SysSmsTemplateDO.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.system.dal.dataobject.sms; +package cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.modules.system.enums.sms.SysSmsTemplateTypeEnum; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.adminserver.modules.system.enums.sms.SysSmsTemplateTypeEnum; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/user/SysUserDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/user/SysUserDO.java similarity index 82% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/user/SysUserDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/user/SysUserDO.java index 6eab991c1..2346ee9f1 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/user/SysUserDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/dataobject/user/SysUserDO.java @@ -1,9 +1,9 @@ -package cn.iocoder.dashboard.modules.system.dal.dataobject.user; +package cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.user; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.framework.mybatis.core.type.JsonLongSetTypeHandler; -import cn.iocoder.dashboard.modules.system.enums.common.SysSexEnum; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.framework.mybatis.core.type.JsonLongSetTypeHandler; +import cn.iocoder.yudao.adminserver.modules.system.enums.common.SysSexEnum; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/auth/SysUserSessionMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/auth/SysUserSessionMapper.java similarity index 60% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/auth/SysUserSessionMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/auth/SysUserSessionMapper.java index bb311312d..bc6e31c83 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/auth/SysUserSessionMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/auth/SysUserSessionMapper.java @@ -1,10 +1,10 @@ -package cn.iocoder.dashboard.modules.system.dal.mysql.auth; +package cn.iocoder.yudao.adminserver.modules.system.dal.mysql.auth; -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.modules.system.controller.auth.vo.session.SysUserSessionPageReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.auth.SysUserSessionDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.adminserver.modules.system.controller.auth.vo.session.SysUserSessionPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.auth.SysUserSessionDO; import org.apache.ibatis.annotations.Mapper; import java.util.Collection; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dept/SysDeptMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/dept/SysDeptMapper.java similarity index 73% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dept/SysDeptMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/dept/SysDeptMapper.java index 3e23afbd6..9b3cb176f 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dept/SysDeptMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/dept/SysDeptMapper.java @@ -1,9 +1,9 @@ -package cn.iocoder.dashboard.modules.system.dal.mysql.dept; +package cn.iocoder.yudao.adminserver.modules.system.dal.mysql.dept; -import cn.iocoder.dashboard.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.dashboard.framework.mybatis.core.query.QueryWrapperX; -import cn.iocoder.dashboard.modules.system.controller.dept.vo.dept.SysDeptListReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysDeptDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.dept.SysDeptListReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dept.SysDeptDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dept/SysPostMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/dept/SysPostMapper.java similarity index 71% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dept/SysPostMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/dept/SysPostMapper.java index 39716e09c..457b4a990 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dept/SysPostMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/dept/SysPostMapper.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.system.dal.mysql.dept; +package cn.iocoder.yudao.adminserver.modules.system.dal.mysql.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.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.dataobject.dept.SysPostDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.post.SysPostExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.post.SysPostPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dept.SysPostDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dict/SysDictDataMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/dict/SysDictDataMapper.java similarity index 73% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dict/SysDictDataMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/dict/SysDictDataMapper.java index 78a410563..dba4b5503 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dict/SysDictDataMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/dict/SysDictDataMapper.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.system.dal.mysql.dict; +package cn.iocoder.yudao.adminserver.modules.system.dal.mysql.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.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.dataobject.dict.SysDictDataDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.data.SysDictDataExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.data.SysDictDataPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dict.SysDictDataDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dict/SysDictTypeMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/dict/SysDictTypeMapper.java similarity index 70% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dict/SysDictTypeMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/dict/SysDictTypeMapper.java index 0320457c4..90b125690 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dict/SysDictTypeMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/dict/SysDictTypeMapper.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.system.dal.mysql.dict; +package cn.iocoder.yudao.adminserver.modules.system.dal.mysql.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.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.dataobject.dict.SysDictTypeDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.type.SysDictTypeExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.type.SysDictTypePageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dict.SysDictTypeDO; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/errorcode/SysErrorCodeMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/errorcode/SysErrorCodeMapper.java similarity index 78% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/errorcode/SysErrorCodeMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/errorcode/SysErrorCodeMapper.java index 63be95295..7760f8058 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/errorcode/SysErrorCodeMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/errorcode/SysErrorCodeMapper.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.system.dal.mysql.errorcode; +package cn.iocoder.yudao.adminserver.modules.system.dal.mysql.errorcode; -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.modules.system.controller.errorcode.vo.SysErrorCodeExportReqVO; -import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodePageReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.errorcode.SysErrorCodeDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo.SysErrorCodeExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo.SysErrorCodePageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.errorcode.SysErrorCodeDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/logger/SysLoginLogMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/logger/SysLoginLogMapper.java similarity index 71% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/logger/SysLoginLogMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/logger/SysLoginLogMapper.java index 63ae620ac..62a70f046 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/logger/SysLoginLogMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/logger/SysLoginLogMapper.java @@ -1,12 +1,12 @@ -package cn.iocoder.dashboard.modules.system.dal.mysql.logger; +package cn.iocoder.yudao.adminserver.modules.system.dal.mysql.logger; -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.modules.system.controller.logger.vo.loginlog.SysLoginLogExportReqVO; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogPageReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.logger.SysLoginLogDO; -import cn.iocoder.dashboard.modules.system.enums.logger.SysLoginResultEnum; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog.SysLoginLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog.SysLoginLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.logger.SysLoginLogDO; +import cn.iocoder.yudao.adminserver.modules.system.enums.logger.SysLoginResultEnum; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/logger/SysOperateLogMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/logger/SysOperateLogMapper.java similarity index 73% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/logger/SysOperateLogMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/logger/SysOperateLogMapper.java index c61e85ef6..c588867cd 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/logger/SysOperateLogMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/logger/SysOperateLogMapper.java @@ -1,12 +1,12 @@ -package cn.iocoder.dashboard.modules.system.dal.mysql.logger; +package cn.iocoder.yudao.adminserver.modules.system.dal.mysql.logger; -import cn.iocoder.dashboard.common.exception.enums.GlobalErrorCodeConstants; -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.modules.system.controller.logger.vo.operatelog.SysOperateLogExportReqVO; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogPageReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.logger.SysOperateLogDO; +import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.operatelog.SysOperateLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.operatelog.SysOperateLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.logger.SysOperateLogDO; import org.apache.ibatis.annotations.Mapper; import java.util.Collection; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/notice/SysNoticeMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/notice/SysNoticeMapper.java new file mode 100644 index 000000000..52a484a1e --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/notice/SysNoticeMapper.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.adminserver.modules.system.dal.mysql.notice; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.adminserver.modules.system.controller.notice.vo.SysNoticePageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.notice.SysNoticeDO; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface SysNoticeMapper extends BaseMapperX { + + 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/permission/SysMenuMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/permission/SysMenuMapper.java similarity index 72% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/permission/SysMenuMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/permission/SysMenuMapper.java index 8525e3ffb..58913f420 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/permission/SysMenuMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/permission/SysMenuMapper.java @@ -1,9 +1,9 @@ -package cn.iocoder.dashboard.modules.system.dal.mysql.permission; +package cn.iocoder.yudao.adminserver.modules.system.dal.mysql.permission; -import cn.iocoder.dashboard.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.dashboard.framework.mybatis.core.query.QueryWrapperX; -import cn.iocoder.dashboard.modules.system.controller.permission.vo.menu.SysMenuListReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysMenuDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.menu.SysMenuListReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysMenuDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/permission/SysRoleMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/permission/SysRoleMapper.java similarity index 75% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/permission/SysRoleMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/permission/SysRoleMapper.java index effab1628..7d3ab59de 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/permission/SysRoleMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/permission/SysRoleMapper.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.system.dal.mysql.permission; +package cn.iocoder.yudao.adminserver.modules.system.dal.mysql.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.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.dataobject.permission.SysRoleDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.role.SysRoleExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.role.SysRolePageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysRoleDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; import org.springframework.lang.Nullable; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/permission/SysRoleMenuMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/permission/SysRoleMenuMapper.java similarity index 87% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/permission/SysRoleMenuMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/permission/SysRoleMenuMapper.java index 4a7dcda70..698ca7319 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/permission/SysRoleMenuMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/permission/SysRoleMenuMapper.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.system.dal.mysql.permission; +package cn.iocoder.yudao.adminserver.modules.system.dal.mysql.permission; -import cn.iocoder.dashboard.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysRoleMenuDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysRoleMenuDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Select; @@ -33,7 +33,7 @@ public interface SysRoleMenuMapper extends BaseMapperX { delete(new QueryWrapper().eq("role_id", roleId) .in("menu_id", menuIds)); } - + default void deleteListByMenuId(Long menuId) { delete(new QueryWrapper().eq("menu_id", menuId)); } diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/permission/SysUserRoleMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/permission/SysUserRoleMapper.java similarity index 85% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/permission/SysUserRoleMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/permission/SysUserRoleMapper.java index f40db1432..f6f5f383d 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/permission/SysUserRoleMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/permission/SysUserRoleMapper.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.system.dal.mysql.permission; +package cn.iocoder.yudao.adminserver.modules.system.dal.mysql.permission; -import cn.iocoder.dashboard.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysUserRoleDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysUserRoleDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/sms/SysSmsChannelMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/sms/SysSmsChannelMapper.java similarity index 59% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/sms/SysSmsChannelMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/sms/SysSmsChannelMapper.java index 69e329b90..bc48f2b85 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/sms/SysSmsChannelMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/sms/SysSmsChannelMapper.java @@ -1,16 +1,14 @@ -package cn.iocoder.dashboard.modules.system.dal.mysql.sms; +package cn.iocoder.yudao.adminserver.modules.system.dal.mysql.sms; -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.modules.system.controller.sms.vo.channel.SysSmsChannelPageReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsChannelDO; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.channel.SysSmsChannelPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms.SysSmsChannelDO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Select; import java.util.Date; -import java.util.List; @Mapper public interface SysSmsChannelMapper extends BaseMapperX { diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/sms/SysSmsLogMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/sms/SysSmsLogMapper.java similarity index 74% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/sms/SysSmsLogMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/sms/SysSmsLogMapper.java index e3345c835..663b00af0 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/sms/SysSmsLogMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/sms/SysSmsLogMapper.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.system.dal.mysql.sms; +package cn.iocoder.yudao.adminserver.modules.system.dal.mysql.sms; -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.modules.system.controller.sms.vo.log.SysSmsLogExportReqVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.log.SysSmsLogPageReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsLogDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.log.SysSmsLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.log.SysSmsLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms.SysSmsLogDO; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/sms/SysSmsTemplateMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/sms/SysSmsTemplateMapper.java similarity index 77% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/sms/SysSmsTemplateMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/sms/SysSmsTemplateMapper.java index a41e38b2d..04465fe41 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/sms/SysSmsTemplateMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/sms/SysSmsTemplateMapper.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.system.dal.mysql.sms; +package cn.iocoder.yudao.adminserver.modules.system.dal.mysql.sms; -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.modules.system.controller.sms.vo.template.SysSmsTemplateExportReqVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.template.SysSmsTemplatePageReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsTemplateDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template.SysSmsTemplateExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template.SysSmsTemplatePageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms.SysSmsTemplateDO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Select; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/user/SysUserMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/user/SysUserMapper.java similarity index 78% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/user/SysUserMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/user/SysUserMapper.java index e93a0e1f9..e36727ebe 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/user/SysUserMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/mysql/user/SysUserMapper.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.system.dal.mysql.user; +package cn.iocoder.yudao.adminserver.modules.system.dal.mysql.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.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.dataobject.user.SysUserDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user.SysUserExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user.SysUserPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.user.SysUserDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/redis/RedisKeyConstants.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/redis/RedisKeyConstants.java similarity index 100% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/redis/RedisKeyConstants.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/redis/RedisKeyConstants.java diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/redis/SysRedisKeyConstants.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/redis/SysRedisKeyConstants.java similarity index 63% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/redis/SysRedisKeyConstants.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/redis/SysRedisKeyConstants.java index 070f65c90..525b084bd 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/redis/SysRedisKeyConstants.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/redis/SysRedisKeyConstants.java @@ -1,11 +1,9 @@ -package cn.iocoder.dashboard.modules.system.dal.redis; +package cn.iocoder.yudao.adminserver.modules.system.dal.redis; -import cn.iocoder.dashboard.framework.redis.core.RedisKeyDefine; -import cn.iocoder.dashboard.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.redis.core.RedisKeyDefine; +import cn.iocoder.yudao.framework.security.core.LoginUser; -import java.time.Duration; - -import static cn.iocoder.dashboard.framework.redis.core.RedisKeyDefine.KeyTypeEnum.STRING; +import static cn.iocoder.yudao.framework.redis.core.RedisKeyDefine.KeyTypeEnum.STRING; /** * System Redis Key 枚举类 diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/redis/auth/SysLoginUserRedisDAO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/redis/auth/SysLoginUserRedisDAO.java similarity index 76% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/redis/auth/SysLoginUserRedisDAO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/redis/auth/SysLoginUserRedisDAO.java index 02489e81a..d62bbb059 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/redis/auth/SysLoginUserRedisDAO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/redis/auth/SysLoginUserRedisDAO.java @@ -1,15 +1,15 @@ -package cn.iocoder.dashboard.modules.system.dal.redis.auth; +package cn.iocoder.yudao.adminserver.modules.system.dal.redis.auth; -import cn.iocoder.dashboard.framework.security.core.LoginUser; -import cn.iocoder.dashboard.modules.system.service.auth.SysUserSessionService; -import cn.iocoder.dashboard.util.json.JsonUtils; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.adminserver.modules.system.service.auth.SysUserSessionService; +import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Repository; import javax.annotation.Resource; import java.time.Duration; -import static cn.iocoder.dashboard.modules.system.dal.redis.SysRedisKeyConstants.LOGIN_USER; +import static cn.iocoder.yudao.adminserver.modules.system.dal.redis.SysRedisKeyConstants.LOGIN_USER; /** * {@link LoginUser} 的 RedisDAO diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/dal/redis/common/SysCaptchaRedisDAO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/redis/common/SysCaptchaRedisDAO.java similarity index 84% rename from src/main/java/cn/iocoder/dashboard/modules/system/dal/redis/common/SysCaptchaRedisDAO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/redis/common/SysCaptchaRedisDAO.java index 520b4849b..701501c90 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/dal/redis/common/SysCaptchaRedisDAO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/dal/redis/common/SysCaptchaRedisDAO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.dal.redis.common; +package cn.iocoder.yudao.adminserver.modules.system.dal.redis.common; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Repository; @@ -6,7 +6,7 @@ import org.springframework.stereotype.Repository; import javax.annotation.Resource; import java.time.Duration; -import static cn.iocoder.dashboard.modules.system.dal.redis.SysRedisKeyConstants.CAPTCHA_CODE; +import static cn.iocoder.yudao.adminserver.modules.system.dal.redis.SysRedisKeyConstants.CAPTCHA_CODE; /** * 验证码的 Redis DAO diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/SysDictTypeConstants.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/SysDictTypeConstants.java new file mode 100644 index 000000000..cd480fc53 --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/SysDictTypeConstants.java @@ -0,0 +1,25 @@ +package cn.iocoder.yudao.adminserver.modules.system.enums; + +/** + * System 字典类型的枚举类 + * + * @author 芋道源码 + */ +public interface SysDictTypeConstants { + + String USER_TYPE = "user_type"; // 用户类型 + String COMMON_STATUS = "sys_common_status"; // 系统状态 + + String USER_SEX = "sys_user_sex"; // 用户性别 + String OPERATE_TYPE = "sys_operate_type"; // 操作类型 + String LOGIN_RESULT = "sys_login_result"; // 登陆结果 + String CONFIG_TYPE = "sys_config_type"; // 参数配置类型 + String BOOLEAN_STRING = "sys_boolean_string"; // Boolean 是否类型 + + String SMS_CHANNEL_CODE = "sys_sms_channel_code"; // 短信渠道编码 + String SMS_TEMPLATE_TYPE = "sys_sms_template_type"; // 短信模板类型 + String SMS_SEND_STATUS = "sys_sms_send_status"; // 短信发送状态 + String SMS_RECEIVE_STATUS = "sys_sms_receive_status"; // 短信接收状态 + + +} diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/enums/SysErrorCodeConstants.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/SysErrorCodeConstants.java similarity index 98% rename from src/main/java/cn/iocoder/dashboard/modules/system/enums/SysErrorCodeConstants.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/SysErrorCodeConstants.java index 2d6eb305c..378cc55bc 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/enums/SysErrorCodeConstants.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/SysErrorCodeConstants.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.enums; +package cn.iocoder.yudao.adminserver.modules.system.enums; -import cn.iocoder.dashboard.common.exception.ErrorCode; +import cn.iocoder.yudao.framework.common.exception.ErrorCode; /** * System 错误码枚举类 diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/enums/common/SysSexEnum.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/common/SysSexEnum.java similarity index 80% rename from src/main/java/cn/iocoder/dashboard/modules/system/enums/common/SysSexEnum.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/common/SysSexEnum.java index 63dec921c..c764a0f72 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/enums/common/SysSexEnum.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/common/SysSexEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.enums.common; +package cn.iocoder.yudao.adminserver.modules.system.enums.common; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/enums/dept/DeptIdEnum.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/dept/DeptIdEnum.java similarity index 77% rename from src/main/java/cn/iocoder/dashboard/modules/system/enums/dept/DeptIdEnum.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/dept/DeptIdEnum.java index 583ba1a8b..d228a9bbd 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/enums/dept/DeptIdEnum.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/dept/DeptIdEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.enums.dept; +package cn.iocoder.yudao.adminserver.modules.system.enums.dept; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/enums/errorcode/SysErrorCodeTypeEnum.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/errorcode/SysErrorCodeTypeEnum.java similarity index 81% rename from src/main/java/cn/iocoder/dashboard/modules/system/enums/errorcode/SysErrorCodeTypeEnum.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/errorcode/SysErrorCodeTypeEnum.java index be59a23ea..8c0b4c7e0 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/enums/errorcode/SysErrorCodeTypeEnum.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/errorcode/SysErrorCodeTypeEnum.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.enums.errorcode; +package cn.iocoder.yudao.adminserver.modules.system.enums.errorcode; -import cn.iocoder.dashboard.common.core.IntArrayValuable; +import cn.iocoder.yudao.framework.common.core.IntArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/enums/logger/SysLoginLogTypeEnum.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/logger/SysLoginLogTypeEnum.java similarity index 86% rename from src/main/java/cn/iocoder/dashboard/modules/system/enums/logger/SysLoginLogTypeEnum.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/logger/SysLoginLogTypeEnum.java index 81a48e72b..d9aa2eb26 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/enums/logger/SysLoginLogTypeEnum.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/logger/SysLoginLogTypeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.enums.logger; +package cn.iocoder.yudao.adminserver.modules.system.enums.logger; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/enums/logger/SysLoginResultEnum.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/logger/SysLoginResultEnum.java similarity index 88% rename from src/main/java/cn/iocoder/dashboard/modules/system/enums/logger/SysLoginResultEnum.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/logger/SysLoginResultEnum.java index 96887fb7e..b34a9fecc 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/enums/logger/SysLoginResultEnum.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/logger/SysLoginResultEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.enums.logger; +package cn.iocoder.yudao.adminserver.modules.system.enums.logger; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/enums/notice/SysNoticeTypeEnum.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/notice/SysNoticeTypeEnum.java similarity index 80% rename from src/main/java/cn/iocoder/dashboard/modules/system/enums/notice/SysNoticeTypeEnum.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/notice/SysNoticeTypeEnum.java index 86a3fea5f..0c8bff35a 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/enums/notice/SysNoticeTypeEnum.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/notice/SysNoticeTypeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.enums.notice; +package cn.iocoder.yudao.adminserver.modules.system.enums.notice; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/enums/permission/MenuIdEnum.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/permission/MenuIdEnum.java similarity index 75% rename from src/main/java/cn/iocoder/dashboard/modules/system/enums/permission/MenuIdEnum.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/permission/MenuIdEnum.java index 4a1d7c28b..a82ab2513 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/enums/permission/MenuIdEnum.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/permission/MenuIdEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.enums.permission; +package cn.iocoder.yudao.adminserver.modules.system.enums.permission; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/enums/permission/MenuTypeEnum.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/permission/MenuTypeEnum.java similarity index 81% rename from src/main/java/cn/iocoder/dashboard/modules/system/enums/permission/MenuTypeEnum.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/permission/MenuTypeEnum.java index a50f0f12a..213f7992f 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/enums/permission/MenuTypeEnum.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/permission/MenuTypeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.enums.permission; +package cn.iocoder.yudao.adminserver.modules.system.enums.permission; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/enums/permission/RoleCodeEnum.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/permission/RoleCodeEnum.java similarity index 78% rename from src/main/java/cn/iocoder/dashboard/modules/system/enums/permission/RoleCodeEnum.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/permission/RoleCodeEnum.java index 9af951610..ddfdd0534 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/enums/permission/RoleCodeEnum.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/permission/RoleCodeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.enums.permission; +package cn.iocoder.yudao.adminserver.modules.system.enums.permission; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/enums/permission/SysRoleTypeEnum.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/permission/SysRoleTypeEnum.java similarity index 78% rename from src/main/java/cn/iocoder/dashboard/modules/system/enums/permission/SysRoleTypeEnum.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/permission/SysRoleTypeEnum.java index 2a33e2653..61b15b0be 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/enums/permission/SysRoleTypeEnum.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/permission/SysRoleTypeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.enums.permission; +package cn.iocoder.yudao.adminserver.modules.system.enums.permission; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/enums/sms/SysSmsReceiveStatusEnum.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/sms/SysSmsReceiveStatusEnum.java similarity index 84% rename from src/main/java/cn/iocoder/dashboard/modules/system/enums/sms/SysSmsReceiveStatusEnum.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/sms/SysSmsReceiveStatusEnum.java index 880238822..54b6d4d78 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/enums/sms/SysSmsReceiveStatusEnum.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/sms/SysSmsReceiveStatusEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.enums.sms; +package cn.iocoder.yudao.adminserver.modules.system.enums.sms; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/enums/sms/SysSmsSendStatusEnum.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/sms/SysSmsSendStatusEnum.java similarity index 85% rename from src/main/java/cn/iocoder/dashboard/modules/system/enums/sms/SysSmsSendStatusEnum.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/sms/SysSmsSendStatusEnum.java index 1d505ee02..de8ed505c 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/enums/sms/SysSmsSendStatusEnum.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/sms/SysSmsSendStatusEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.enums.sms; +package cn.iocoder.yudao.adminserver.modules.system.enums.sms; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/enums/sms/SysSmsTemplateTypeEnum.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/sms/SysSmsTemplateTypeEnum.java similarity index 84% rename from src/main/java/cn/iocoder/dashboard/modules/system/enums/sms/SysSmsTemplateTypeEnum.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/sms/SysSmsTemplateTypeEnum.java index 8ff9c49b7..779e79950 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/enums/sms/SysSmsTemplateTypeEnum.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/sms/SysSmsTemplateTypeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.system.enums.sms; +package cn.iocoder.yudao.adminserver.modules.system.enums.sms; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/cn/iocoder/dashboard/framework/captcha/config/CaptchaConfig.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/framework/captcha/config/CaptchaConfig.java similarity index 76% rename from src/main/java/cn/iocoder/dashboard/framework/captcha/config/CaptchaConfig.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/framework/captcha/config/CaptchaConfig.java index b1fb8f28c..174efe4ac 100644 --- a/src/main/java/cn/iocoder/dashboard/framework/captcha/config/CaptchaConfig.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/framework/captcha/config/CaptchaConfig.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.captcha.config; +package cn.iocoder.yudao.adminserver.modules.system.framework.captcha.config; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Configuration; diff --git a/src/main/java/cn/iocoder/dashboard/framework/captcha/config/CaptchaProperties.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/framework/captcha/config/CaptchaProperties.java similarity index 90% rename from src/main/java/cn/iocoder/dashboard/framework/captcha/config/CaptchaProperties.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/framework/captcha/config/CaptchaProperties.java index 9530ea1ee..6eadd4d12 100644 --- a/src/main/java/cn/iocoder/dashboard/framework/captcha/config/CaptchaProperties.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/framework/captcha/config/CaptchaProperties.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.captcha.config; +package cn.iocoder.yudao.adminserver.modules.system.framework.captcha.config; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/framework/captcha/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/framework/captcha/package-info.java new file mode 100644 index 000000000..039431db3 --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/framework/captcha/package-info.java @@ -0,0 +1,4 @@ +/** + * 基于 Hutool captcha 库,实现验证码功能 + */ +package cn.iocoder.yudao.adminserver.modules.system.framework.captcha; diff --git a/src/main/java/cn/iocoder/dashboard/framework/codegen/config/CodegenConfiguration.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/framework/codegen/config/CodegenConfiguration.java similarity index 76% rename from src/main/java/cn/iocoder/dashboard/framework/codegen/config/CodegenConfiguration.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/framework/codegen/config/CodegenConfiguration.java index 7e357bc86..9f514eed5 100644 --- a/src/main/java/cn/iocoder/dashboard/framework/codegen/config/CodegenConfiguration.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/framework/codegen/config/CodegenConfiguration.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.codegen.config; +package cn.iocoder.yudao.adminserver.modules.system.framework.codegen.config; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Configuration; diff --git a/src/main/java/cn/iocoder/dashboard/framework/codegen/config/CodegenProperties.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/framework/codegen/config/CodegenProperties.java similarity index 89% rename from src/main/java/cn/iocoder/dashboard/framework/codegen/config/CodegenProperties.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/framework/codegen/config/CodegenProperties.java index 8b77bbfb8..b0f08460e 100644 --- a/src/main/java/cn/iocoder/dashboard/framework/codegen/config/CodegenProperties.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/framework/codegen/config/CodegenProperties.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.codegen.config; +package cn.iocoder.yudao.adminserver.modules.system.framework.codegen.config; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/framework/codegen/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/framework/codegen/package-info.java new file mode 100644 index 000000000..e700260a8 --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/framework/codegen/package-info.java @@ -0,0 +1,4 @@ +/** + * 代码生成器 + */ +package cn.iocoder.yudao.adminserver.modules.system.framework.codegen; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/framework/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/framework/package-info.java new file mode 100644 index 000000000..b745ae838 --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/framework/package-info.java @@ -0,0 +1,6 @@ +/** + * 属于 system 模块的 framework 封装 + * + * @author 芋道源码 + */ +package cn.iocoder.yudao.adminserver.modules.system.framework; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/job/auth/SysUserSessionTimeoutJob.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/job/auth/SysUserSessionTimeoutJob.java similarity index 74% rename from src/main/java/cn/iocoder/dashboard/modules/system/job/auth/SysUserSessionTimeoutJob.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/job/auth/SysUserSessionTimeoutJob.java index 96ec74b62..4614ac619 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/job/auth/SysUserSessionTimeoutJob.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/job/auth/SysUserSessionTimeoutJob.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.system.job.auth; +package cn.iocoder.yudao.adminserver.modules.system.job.auth; -import cn.iocoder.dashboard.framework.quartz.core.handler.JobHandler; -import cn.iocoder.dashboard.modules.system.service.auth.SysUserSessionService; +import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler; +import cn.iocoder.yudao.adminserver.modules.system.service.auth.SysUserSessionService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/job/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/job/package-info.java new file mode 100644 index 000000000..b5c66a51b --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/job/package-info.java @@ -0,0 +1 @@ +package cn.iocoder.yudao.adminserver.modules.system.job; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/dept/SysDeptRefreshConsumer.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/dept/SysDeptRefreshConsumer.java similarity index 63% rename from src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/dept/SysDeptRefreshConsumer.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/dept/SysDeptRefreshConsumer.java index e6fa5a98d..81bed5083 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/dept/SysDeptRefreshConsumer.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/dept/SysDeptRefreshConsumer.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.system.mq.consumer.dept; +package cn.iocoder.yudao.adminserver.modules.system.mq.consumer.dept; -import cn.iocoder.dashboard.framework.redis.core.pubsub.AbstractChannelMessageListener; -import cn.iocoder.dashboard.modules.system.mq.message.dept.SysDeptRefreshMessage; -import cn.iocoder.dashboard.modules.system.service.dept.SysDeptService; +import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessageListener; +import cn.iocoder.yudao.adminserver.modules.system.mq.message.dept.SysDeptRefreshMessage; +import cn.iocoder.yudao.adminserver.modules.system.service.dept.SysDeptService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/dict/SysDictDataRefreshConsumer.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/dict/SysDictDataRefreshConsumer.java similarity index 64% rename from src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/dict/SysDictDataRefreshConsumer.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/dict/SysDictDataRefreshConsumer.java index 12bf134a3..08f4b813e 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/dict/SysDictDataRefreshConsumer.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/dict/SysDictDataRefreshConsumer.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.system.mq.consumer.dict; +package cn.iocoder.yudao.adminserver.modules.system.mq.consumer.dict; -import cn.iocoder.dashboard.framework.redis.core.pubsub.AbstractChannelMessageListener; -import cn.iocoder.dashboard.modules.system.mq.message.dict.SysDictDataRefreshMessage; -import cn.iocoder.dashboard.modules.system.service.dict.SysDictDataService; +import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessageListener; +import cn.iocoder.yudao.adminserver.modules.system.mq.message.dict.SysDictDataRefreshMessage; +import cn.iocoder.yudao.adminserver.modules.system.service.dict.SysDictDataService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/mail/SysMailSendConsumer.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/mail/SysMailSendConsumer.java similarity index 58% rename from src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/mail/SysMailSendConsumer.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/mail/SysMailSendConsumer.java index 3a0f22ee6..ff3b017a9 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/mail/SysMailSendConsumer.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/mail/SysMailSendConsumer.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.system.mq.consumer.mail; +package cn.iocoder.yudao.adminserver.modules.system.mq.consumer.mail; -import cn.iocoder.dashboard.framework.redis.core.stream.AbstractStreamMessageListener; -import cn.iocoder.dashboard.modules.system.mq.message.mail.SysMailSendMessage; +import cn.iocoder.yudao.framework.mq.core.stream.AbstractStreamMessageListener; +import cn.iocoder.yudao.adminserver.modules.system.mq.message.mail.SysMailSendMessage; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/permission/SysMenuRefreshConsumer.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/permission/SysMenuRefreshConsumer.java similarity index 62% rename from src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/permission/SysMenuRefreshConsumer.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/permission/SysMenuRefreshConsumer.java index 36152424c..9048e3ccb 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/permission/SysMenuRefreshConsumer.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/permission/SysMenuRefreshConsumer.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.system.mq.consumer.permission; +package cn.iocoder.yudao.adminserver.modules.system.mq.consumer.permission; -import cn.iocoder.dashboard.framework.redis.core.pubsub.AbstractChannelMessageListener; -import cn.iocoder.dashboard.modules.system.mq.message.permission.SysMenuRefreshMessage; -import cn.iocoder.dashboard.modules.system.service.permission.SysMenuService; +import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessageListener; +import cn.iocoder.yudao.adminserver.modules.system.mq.message.permission.SysMenuRefreshMessage; +import cn.iocoder.yudao.adminserver.modules.system.service.permission.SysMenuService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/permission/SysRoleMenuRefreshConsumer.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/permission/SysRoleMenuRefreshConsumer.java similarity index 63% rename from src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/permission/SysRoleMenuRefreshConsumer.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/permission/SysRoleMenuRefreshConsumer.java index 6927e1464..5cdaeef00 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/permission/SysRoleMenuRefreshConsumer.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/permission/SysRoleMenuRefreshConsumer.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.system.mq.consumer.permission; +package cn.iocoder.yudao.adminserver.modules.system.mq.consumer.permission; -import cn.iocoder.dashboard.framework.redis.core.pubsub.AbstractChannelMessageListener; -import cn.iocoder.dashboard.modules.system.mq.message.permission.SysRoleMenuRefreshMessage; -import cn.iocoder.dashboard.modules.system.service.permission.SysPermissionService; +import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessageListener; +import cn.iocoder.yudao.adminserver.modules.system.mq.message.permission.SysRoleMenuRefreshMessage; +import cn.iocoder.yudao.adminserver.modules.system.service.permission.SysPermissionService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/permission/SysRoleRefreshConsumer.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/permission/SysRoleRefreshConsumer.java similarity index 62% rename from src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/permission/SysRoleRefreshConsumer.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/permission/SysRoleRefreshConsumer.java index a5e77f7e5..a2f4cc528 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/permission/SysRoleRefreshConsumer.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/permission/SysRoleRefreshConsumer.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.system.mq.consumer.permission; +package cn.iocoder.yudao.adminserver.modules.system.mq.consumer.permission; -import cn.iocoder.dashboard.framework.redis.core.pubsub.AbstractChannelMessageListener; -import cn.iocoder.dashboard.modules.system.mq.message.permission.SysRoleRefreshMessage; -import cn.iocoder.dashboard.modules.system.service.permission.SysRoleService; +import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessageListener; +import cn.iocoder.yudao.adminserver.modules.system.mq.message.permission.SysRoleRefreshMessage; +import cn.iocoder.yudao.adminserver.modules.system.service.permission.SysRoleService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/sms/SysSmsChannelRefreshConsumer.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/sms/SysSmsChannelRefreshConsumer.java similarity index 64% rename from src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/sms/SysSmsChannelRefreshConsumer.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/sms/SysSmsChannelRefreshConsumer.java index 6105889cb..540ff17e7 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/sms/SysSmsChannelRefreshConsumer.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/sms/SysSmsChannelRefreshConsumer.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.system.mq.consumer.sms; +package cn.iocoder.yudao.adminserver.modules.system.mq.consumer.sms; -import cn.iocoder.dashboard.framework.redis.core.pubsub.AbstractChannelMessageListener; -import cn.iocoder.dashboard.modules.system.mq.message.sms.SysSmsChannelRefreshMessage; -import cn.iocoder.dashboard.modules.system.service.sms.SysSmsChannelService; +import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessageListener; +import cn.iocoder.yudao.adminserver.modules.system.mq.message.sms.SysSmsChannelRefreshMessage; +import cn.iocoder.yudao.adminserver.modules.system.service.sms.SysSmsChannelService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/sms/SysSmsSendConsumer.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/sms/SysSmsSendConsumer.java similarity index 64% rename from src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/sms/SysSmsSendConsumer.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/sms/SysSmsSendConsumer.java index 70b167168..947b23940 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/sms/SysSmsSendConsumer.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/sms/SysSmsSendConsumer.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.system.mq.consumer.sms; +package cn.iocoder.yudao.adminserver.modules.system.mq.consumer.sms; -import cn.iocoder.dashboard.framework.redis.core.stream.AbstractStreamMessageListener; -import cn.iocoder.dashboard.modules.system.mq.message.sms.SysSmsSendMessage; -import cn.iocoder.dashboard.modules.system.service.sms.SysSmsService; +import cn.iocoder.yudao.framework.mq.core.stream.AbstractStreamMessageListener; +import cn.iocoder.yudao.adminserver.modules.system.mq.message.sms.SysSmsSendMessage; +import cn.iocoder.yudao.adminserver.modules.system.service.sms.SysSmsService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/sms/SysSmsTemplateRefreshConsumer.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/sms/SysSmsTemplateRefreshConsumer.java similarity index 65% rename from src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/sms/SysSmsTemplateRefreshConsumer.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/sms/SysSmsTemplateRefreshConsumer.java index c310c48fa..1f4d92ffc 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/mq/consumer/sms/SysSmsTemplateRefreshConsumer.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/consumer/sms/SysSmsTemplateRefreshConsumer.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.system.mq.consumer.sms; +package cn.iocoder.yudao.adminserver.modules.system.mq.consumer.sms; -import cn.iocoder.dashboard.framework.redis.core.pubsub.AbstractChannelMessageListener; -import cn.iocoder.dashboard.modules.system.mq.message.sms.SysSmsTemplateRefreshMessage; -import cn.iocoder.dashboard.modules.system.service.sms.SysSmsTemplateService; +import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessageListener; +import cn.iocoder.yudao.adminserver.modules.system.mq.message.sms.SysSmsTemplateRefreshMessage; +import cn.iocoder.yudao.adminserver.modules.system.service.sms.SysSmsTemplateService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/mq/message/dept/SysDeptRefreshMessage.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/dept/SysDeptRefreshMessage.java similarity index 62% rename from src/main/java/cn/iocoder/dashboard/modules/system/mq/message/dept/SysDeptRefreshMessage.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/dept/SysDeptRefreshMessage.java index a78b1250f..724547d68 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/mq/message/dept/SysDeptRefreshMessage.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/dept/SysDeptRefreshMessage.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.mq.message.dept; +package cn.iocoder.yudao.adminserver.modules.system.mq.message.dept; -import cn.iocoder.dashboard.framework.redis.core.pubsub.ChannelMessage; +import cn.iocoder.yudao.framework.mq.core.pubsub.ChannelMessage; import lombok.Data; /** diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/mq/message/dict/SysDictDataRefreshMessage.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/dict/SysDictDataRefreshMessage.java similarity index 64% rename from src/main/java/cn/iocoder/dashboard/modules/system/mq/message/dict/SysDictDataRefreshMessage.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/dict/SysDictDataRefreshMessage.java index 7fad277c4..7b735deb9 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/mq/message/dict/SysDictDataRefreshMessage.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/dict/SysDictDataRefreshMessage.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.mq.message.dict; +package cn.iocoder.yudao.adminserver.modules.system.mq.message.dict; -import cn.iocoder.dashboard.framework.redis.core.pubsub.ChannelMessage; +import cn.iocoder.yudao.framework.mq.core.pubsub.ChannelMessage; import lombok.Data; /** diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/mq/message/mail/SysMailSendMessage.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/mail/SysMailSendMessage.java similarity index 85% rename from src/main/java/cn/iocoder/dashboard/modules/system/mq/message/mail/SysMailSendMessage.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/mail/SysMailSendMessage.java index c9f5d2aae..bb9f62170 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/mq/message/mail/SysMailSendMessage.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/mail/SysMailSendMessage.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.mq.message.mail; +package cn.iocoder.yudao.adminserver.modules.system.mq.message.mail; -import cn.iocoder.dashboard.framework.redis.core.stream.StreamMessage; +import cn.iocoder.yudao.framework.mq.core.stream.StreamMessage; import lombok.Data; import javax.validation.constraints.NotNull; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/mq/message/permission/SysMenuRefreshMessage.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/permission/SysMenuRefreshMessage.java similarity index 61% rename from src/main/java/cn/iocoder/dashboard/modules/system/mq/message/permission/SysMenuRefreshMessage.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/permission/SysMenuRefreshMessage.java index 159682a98..1fa2a3879 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/mq/message/permission/SysMenuRefreshMessage.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/permission/SysMenuRefreshMessage.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.mq.message.permission; +package cn.iocoder.yudao.adminserver.modules.system.mq.message.permission; -import cn.iocoder.dashboard.framework.redis.core.pubsub.ChannelMessage; +import cn.iocoder.yudao.framework.mq.core.pubsub.ChannelMessage; import lombok.Data; /** diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/mq/message/permission/SysRoleMenuRefreshMessage.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/permission/SysRoleMenuRefreshMessage.java similarity index 63% rename from src/main/java/cn/iocoder/dashboard/modules/system/mq/message/permission/SysRoleMenuRefreshMessage.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/permission/SysRoleMenuRefreshMessage.java index 491c9b0d2..8b9f50c91 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/mq/message/permission/SysRoleMenuRefreshMessage.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/permission/SysRoleMenuRefreshMessage.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.mq.message.permission; +package cn.iocoder.yudao.adminserver.modules.system.mq.message.permission; -import cn.iocoder.dashboard.framework.redis.core.pubsub.ChannelMessage; +import cn.iocoder.yudao.framework.mq.core.pubsub.ChannelMessage; import lombok.Data; /** diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/mq/message/permission/SysRoleRefreshMessage.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/permission/SysRoleRefreshMessage.java similarity index 61% rename from src/main/java/cn/iocoder/dashboard/modules/system/mq/message/permission/SysRoleRefreshMessage.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/permission/SysRoleRefreshMessage.java index b99401021..8d8d1e01a 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/mq/message/permission/SysRoleRefreshMessage.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/permission/SysRoleRefreshMessage.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.mq.message.permission; +package cn.iocoder.yudao.adminserver.modules.system.mq.message.permission; -import cn.iocoder.dashboard.framework.redis.core.pubsub.ChannelMessage; +import cn.iocoder.yudao.framework.mq.core.pubsub.ChannelMessage; import lombok.Data; /** diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/mq/message/sms/SysSmsChannelRefreshMessage.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/sms/SysSmsChannelRefreshMessage.java similarity index 64% rename from src/main/java/cn/iocoder/dashboard/modules/system/mq/message/sms/SysSmsChannelRefreshMessage.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/sms/SysSmsChannelRefreshMessage.java index fa2878720..a37295615 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/mq/message/sms/SysSmsChannelRefreshMessage.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/sms/SysSmsChannelRefreshMessage.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.mq.message.sms; +package cn.iocoder.yudao.adminserver.modules.system.mq.message.sms; -import cn.iocoder.dashboard.framework.redis.core.pubsub.ChannelMessage; +import cn.iocoder.yudao.framework.mq.core.pubsub.ChannelMessage; import lombok.Data; /** diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/mq/message/sms/SysSmsSendMessage.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/sms/SysSmsSendMessage.java similarity index 82% rename from src/main/java/cn/iocoder/dashboard/modules/system/mq/message/sms/SysSmsSendMessage.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/sms/SysSmsSendMessage.java index 9bb30514a..34ebf9101 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/mq/message/sms/SysSmsSendMessage.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/sms/SysSmsSendMessage.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.system.mq.message.sms; +package cn.iocoder.yudao.adminserver.modules.system.mq.message.sms; -import cn.iocoder.dashboard.common.core.KeyValue; -import cn.iocoder.dashboard.framework.redis.core.stream.StreamMessage; +import cn.iocoder.yudao.framework.common.core.KeyValue; +import cn.iocoder.yudao.framework.mq.core.stream.StreamMessage; import lombok.Data; import javax.validation.constraints.NotNull; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/mq/message/sms/SysSmsTemplateRefreshMessage.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/sms/SysSmsTemplateRefreshMessage.java similarity index 65% rename from src/main/java/cn/iocoder/dashboard/modules/system/mq/message/sms/SysSmsTemplateRefreshMessage.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/sms/SysSmsTemplateRefreshMessage.java index 4925b092a..c8bb00af2 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/mq/message/sms/SysSmsTemplateRefreshMessage.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/message/sms/SysSmsTemplateRefreshMessage.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.mq.message.sms; +package cn.iocoder.yudao.adminserver.modules.system.mq.message.sms; -import cn.iocoder.dashboard.framework.redis.core.pubsub.ChannelMessage; +import cn.iocoder.yudao.framework.mq.core.pubsub.ChannelMessage; import lombok.Data; /** diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/mq/producer/dept/SysDeptProducer.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/producer/dept/SysDeptProducer.java similarity index 71% rename from src/main/java/cn/iocoder/dashboard/modules/system/mq/producer/dept/SysDeptProducer.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/producer/dept/SysDeptProducer.java index 4ad7db4b8..948796e22 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/mq/producer/dept/SysDeptProducer.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/producer/dept/SysDeptProducer.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.system.mq.producer.dept; +package cn.iocoder.yudao.adminserver.modules.system.mq.producer.dept; -import cn.iocoder.dashboard.framework.redis.core.util.RedisMessageUtils; -import cn.iocoder.dashboard.modules.system.mq.message.dept.SysDeptRefreshMessage; +import cn.iocoder.yudao.framework.mq.core.util.RedisMessageUtils; +import cn.iocoder.yudao.adminserver.modules.system.mq.message.dept.SysDeptRefreshMessage; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Component; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/mq/producer/dict/SysDictDataProducer.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/producer/dict/SysDictDataProducer.java similarity index 72% rename from src/main/java/cn/iocoder/dashboard/modules/system/mq/producer/dict/SysDictDataProducer.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/producer/dict/SysDictDataProducer.java index 2ccfc51d2..ea0183722 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/mq/producer/dict/SysDictDataProducer.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/producer/dict/SysDictDataProducer.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.system.mq.producer.dict; +package cn.iocoder.yudao.adminserver.modules.system.mq.producer.dict; -import cn.iocoder.dashboard.framework.redis.core.util.RedisMessageUtils; -import cn.iocoder.dashboard.modules.system.mq.message.dict.SysDictDataRefreshMessage; +import cn.iocoder.yudao.framework.mq.core.util.RedisMessageUtils; +import cn.iocoder.yudao.adminserver.modules.system.mq.message.dict.SysDictDataRefreshMessage; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Component; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/mq/producer/permission/SysMenuProducer.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/producer/permission/SysMenuProducer.java similarity index 70% rename from src/main/java/cn/iocoder/dashboard/modules/system/mq/producer/permission/SysMenuProducer.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/producer/permission/SysMenuProducer.java index 6d664c725..6b3493469 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/mq/producer/permission/SysMenuProducer.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/producer/permission/SysMenuProducer.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.system.mq.producer.permission; +package cn.iocoder.yudao.adminserver.modules.system.mq.producer.permission; -import cn.iocoder.dashboard.framework.redis.core.util.RedisMessageUtils; -import cn.iocoder.dashboard.modules.system.mq.message.permission.SysMenuRefreshMessage; +import cn.iocoder.yudao.framework.mq.core.util.RedisMessageUtils; +import cn.iocoder.yudao.adminserver.modules.system.mq.message.permission.SysMenuRefreshMessage; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Component; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/mq/producer/permission/SysPermissionProducer.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/producer/permission/SysPermissionProducer.java similarity index 71% rename from src/main/java/cn/iocoder/dashboard/modules/system/mq/producer/permission/SysPermissionProducer.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/producer/permission/SysPermissionProducer.java index f9eded668..d9a1bfcc2 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/mq/producer/permission/SysPermissionProducer.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/producer/permission/SysPermissionProducer.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.system.mq.producer.permission; +package cn.iocoder.yudao.adminserver.modules.system.mq.producer.permission; -import cn.iocoder.dashboard.framework.redis.core.util.RedisMessageUtils; -import cn.iocoder.dashboard.modules.system.mq.message.permission.SysRoleMenuRefreshMessage; +import cn.iocoder.yudao.framework.mq.core.util.RedisMessageUtils; +import cn.iocoder.yudao.adminserver.modules.system.mq.message.permission.SysRoleMenuRefreshMessage; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Component; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/mq/producer/permission/SysRoleProducer.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/producer/permission/SysRoleProducer.java similarity index 71% rename from src/main/java/cn/iocoder/dashboard/modules/system/mq/producer/permission/SysRoleProducer.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/producer/permission/SysRoleProducer.java index b398a27a1..6888f27bc 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/mq/producer/permission/SysRoleProducer.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/producer/permission/SysRoleProducer.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.system.mq.producer.permission; +package cn.iocoder.yudao.adminserver.modules.system.mq.producer.permission; -import cn.iocoder.dashboard.framework.redis.core.util.RedisMessageUtils; -import cn.iocoder.dashboard.modules.system.mq.message.permission.SysRoleRefreshMessage; +import cn.iocoder.yudao.framework.mq.core.util.RedisMessageUtils; +import cn.iocoder.yudao.adminserver.modules.system.mq.message.permission.SysRoleRefreshMessage; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Component; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/mq/producer/sms/SysSmsProducer.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/producer/sms/SysSmsProducer.java similarity index 78% rename from src/main/java/cn/iocoder/dashboard/modules/system/mq/producer/sms/SysSmsProducer.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/producer/sms/SysSmsProducer.java index d346ef02e..81236287c 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/mq/producer/sms/SysSmsProducer.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/mq/producer/sms/SysSmsProducer.java @@ -1,10 +1,10 @@ -package cn.iocoder.dashboard.modules.system.mq.producer.sms; +package cn.iocoder.yudao.adminserver.modules.system.mq.producer.sms; -import cn.iocoder.dashboard.common.core.KeyValue; -import cn.iocoder.dashboard.framework.redis.core.util.RedisMessageUtils; -import cn.iocoder.dashboard.modules.system.mq.message.sms.SysSmsChannelRefreshMessage; -import cn.iocoder.dashboard.modules.system.mq.message.sms.SysSmsSendMessage; -import cn.iocoder.dashboard.modules.system.mq.message.sms.SysSmsTemplateRefreshMessage; +import cn.iocoder.yudao.framework.common.core.KeyValue; +import cn.iocoder.yudao.framework.mq.core.util.RedisMessageUtils; +import cn.iocoder.yudao.adminserver.modules.system.mq.message.sms.SysSmsChannelRefreshMessage; +import cn.iocoder.yudao.adminserver.modules.system.mq.message.sms.SysSmsSendMessage; +import cn.iocoder.yudao.adminserver.modules.system.mq.message.sms.SysSmsTemplateRefreshMessage; import lombok.extern.slf4j.Slf4j; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Component; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/package-info.java similarity index 75% rename from src/main/java/cn/iocoder/dashboard/modules/system/package-info.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/package-info.java index 54c955b25..f043c0f2a 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/package-info.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/package-info.java @@ -4,4 +4,4 @@ * * 缩写:sys */ -package cn.iocoder.dashboard.modules.system; +package cn.iocoder.yudao.adminserver.modules.system; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/auth/SysAuthService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/auth/SysAuthService.java similarity index 66% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/auth/SysAuthService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/auth/SysAuthService.java index 04eb6d968..1ef1bdf60 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/auth/SysAuthService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/auth/SysAuthService.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.system.service.auth; +package cn.iocoder.yudao.adminserver.modules.system.service.auth; -import cn.iocoder.dashboard.framework.security.core.service.SecurityAuthFrameworkService; -import cn.iocoder.dashboard.modules.system.controller.auth.vo.auth.SysAuthLoginReqVO; +import cn.iocoder.yudao.framework.security.core.service.SecurityAuthFrameworkService; +import cn.iocoder.yudao.adminserver.modules.system.controller.auth.vo.auth.SysAuthLoginReqVO; /** * 认证 Service 接口 diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/auth/SysUserSessionService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/auth/SysUserSessionService.java similarity index 79% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/auth/SysUserSessionService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/auth/SysUserSessionService.java index 9e946d901..11558e956 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/auth/SysUserSessionService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/auth/SysUserSessionService.java @@ -1,9 +1,9 @@ -package cn.iocoder.dashboard.modules.system.service.auth; +package cn.iocoder.yudao.adminserver.modules.system.service.auth; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.security.core.LoginUser; -import cn.iocoder.dashboard.modules.system.controller.auth.vo.session.SysUserSessionPageReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.auth.SysUserSessionDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.adminserver.modules.system.controller.auth.vo.session.SysUserSessionPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.auth.SysUserSessionDO; /** * 在线用户 Session Service 接口 diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/auth/impl/SysAuthServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/auth/impl/SysAuthServiceImpl.java similarity index 81% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/auth/impl/SysAuthServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/auth/impl/SysAuthServiceImpl.java index 768dec9a8..f69c96736 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/auth/impl/SysAuthServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/auth/impl/SysAuthServiceImpl.java @@ -1,23 +1,24 @@ -package cn.iocoder.dashboard.modules.system.service.auth.impl; +package cn.iocoder.yudao.adminserver.modules.system.service.auth.impl; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil; -import cn.iocoder.dashboard.framework.security.core.LoginUser; -import cn.iocoder.dashboard.framework.tracer.core.util.TracerUtils; -import cn.iocoder.dashboard.modules.system.controller.auth.vo.auth.SysAuthLoginReqVO; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogCreateReqVO; -import cn.iocoder.dashboard.modules.system.convert.auth.SysAuthConvert; -import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO; -import cn.iocoder.dashboard.modules.system.enums.logger.SysLoginLogTypeEnum; -import cn.iocoder.dashboard.modules.system.enums.logger.SysLoginResultEnum; -import cn.iocoder.dashboard.modules.system.service.auth.SysAuthService; -import cn.iocoder.dashboard.modules.system.service.auth.SysUserSessionService; -import cn.iocoder.dashboard.modules.system.service.common.SysCaptchaService; -import cn.iocoder.dashboard.modules.system.service.logger.SysLoginLogService; -import cn.iocoder.dashboard.modules.system.service.permission.SysPermissionService; -import cn.iocoder.dashboard.modules.system.service.user.SysUserService; -import cn.iocoder.dashboard.util.servlet.ServletUtils; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.common.util.monitor.TracerUtils; +import cn.iocoder.yudao.adminserver.modules.system.controller.auth.vo.auth.SysAuthLoginReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog.SysLoginLogCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.convert.auth.SysAuthConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.user.SysUserDO; +import cn.iocoder.yudao.adminserver.modules.system.enums.logger.SysLoginLogTypeEnum; +import cn.iocoder.yudao.adminserver.modules.system.enums.logger.SysLoginResultEnum; +import cn.iocoder.yudao.adminserver.modules.system.service.auth.SysAuthService; +import cn.iocoder.yudao.adminserver.modules.system.service.auth.SysUserSessionService; +import cn.iocoder.yudao.adminserver.modules.system.service.common.SysCaptchaService; +import cn.iocoder.yudao.adminserver.modules.system.service.logger.SysLoginLogService; +import cn.iocoder.yudao.adminserver.modules.system.service.permission.SysPermissionService; +import cn.iocoder.yudao.adminserver.modules.system.service.user.SysUserService; +import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; import lombok.extern.slf4j.Slf4j; +import org.springframework.context.annotation.Lazy; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.authentication.BadCredentialsException; import org.springframework.security.authentication.DisabledException; @@ -32,8 +33,8 @@ import org.springframework.util.Assert; import javax.annotation.Resource; import java.util.Set; -import static cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.*; import static java.util.Collections.singleton; /** @@ -46,6 +47,7 @@ import static java.util.Collections.singleton; public class SysAuthServiceImpl implements SysAuthService { @Resource + @Lazy // 延迟加载,因为存在相互依赖的问题 private AuthenticationManager authenticationManager; @Resource private SysUserService userService; @@ -85,7 +87,7 @@ public class SysAuthServiceImpl implements SysAuthService { @Override public String login(SysAuthLoginReqVO reqVO, String userIp, String userAgent) { // 判断验证码是否正确 -// this.verifyCaptcha(reqVO.getUsername(), reqVO.getUuid(), reqVO.getCode()); + this.verifyCaptcha(reqVO.getUsername(), reqVO.getUuid(), reqVO.getCode()); // 使用账号密码,进行登陆。 LoginUser loginUser = this.login0(reqVO.getUsername(), reqVO.getPassword()); diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/auth/impl/SysUserSessionServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/auth/impl/SysUserSessionServiceImpl.java similarity index 77% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/auth/impl/SysUserSessionServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/auth/impl/SysUserSessionServiceImpl.java index e185a1fbb..ca95fe07b 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/auth/impl/SysUserSessionServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/auth/impl/SysUserSessionServiceImpl.java @@ -1,23 +1,23 @@ -package cn.iocoder.dashboard.modules.system.service.auth.impl; +package cn.iocoder.yudao.adminserver.modules.system.service.auth.impl; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.StrUtil; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.security.config.SecurityProperties; -import cn.iocoder.dashboard.framework.security.core.LoginUser; -import cn.iocoder.dashboard.framework.tracer.core.util.TracerUtils; -import cn.iocoder.dashboard.modules.system.controller.auth.vo.session.SysUserSessionPageReqVO; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogCreateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.auth.SysUserSessionDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.auth.SysUserSessionMapper; -import cn.iocoder.dashboard.modules.system.dal.redis.auth.SysLoginUserRedisDAO; -import cn.iocoder.dashboard.modules.system.enums.logger.SysLoginLogTypeEnum; -import cn.iocoder.dashboard.modules.system.enums.logger.SysLoginResultEnum; -import cn.iocoder.dashboard.modules.system.service.auth.SysUserSessionService; -import cn.iocoder.dashboard.modules.system.service.logger.SysLoginLogService; -import cn.iocoder.dashboard.modules.system.service.user.SysUserService; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.security.config.SecurityProperties; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.common.util.monitor.TracerUtils; +import cn.iocoder.yudao.adminserver.modules.system.controller.auth.vo.session.SysUserSessionPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog.SysLoginLogCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.auth.SysUserSessionDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.user.SysUserDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.auth.SysUserSessionMapper; +import cn.iocoder.yudao.adminserver.modules.system.dal.redis.auth.SysLoginUserRedisDAO; +import cn.iocoder.yudao.adminserver.modules.system.enums.logger.SysLoginLogTypeEnum; +import cn.iocoder.yudao.adminserver.modules.system.enums.logger.SysLoginResultEnum; +import cn.iocoder.yudao.adminserver.modules.system.service.auth.SysUserSessionService; +import cn.iocoder.yudao.adminserver.modules.system.service.logger.SysLoginLogService; +import cn.iocoder.yudao.adminserver.modules.system.service.user.SysUserService; import com.google.common.collect.Lists; import org.springframework.stereotype.Service; @@ -26,8 +26,8 @@ import java.time.Duration; import java.util.*; import java.util.stream.Collectors; -import static cn.iocoder.dashboard.util.collection.CollectionUtils.convertSet; -import static cn.iocoder.dashboard.util.date.DateUtils.addTime; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.addTime; /** * 在线用户 Session Service 实现类 diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/common/SysCaptchaService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/common/SysCaptchaService.java similarity index 75% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/common/SysCaptchaService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/common/SysCaptchaService.java index a86b406f8..286a5ef1f 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/common/SysCaptchaService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/common/SysCaptchaService.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.service.common; +package cn.iocoder.yudao.adminserver.modules.system.service.common; -import cn.iocoder.dashboard.modules.system.controller.common.vo.SysCaptchaImageRespVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.common.vo.SysCaptchaImageRespVO; /** * 验证码 Service 接口 diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/common/impl/SysCaptchaServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/common/impl/SysCaptchaServiceImpl.java similarity index 68% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/common/impl/SysCaptchaServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/common/impl/SysCaptchaServiceImpl.java index 7867de18a..44d291ffd 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/common/impl/SysCaptchaServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/common/impl/SysCaptchaServiceImpl.java @@ -1,13 +1,13 @@ -package cn.iocoder.dashboard.modules.system.service.common.impl; +package cn.iocoder.yudao.adminserver.modules.system.service.common.impl; import cn.hutool.captcha.CaptchaUtil; import cn.hutool.captcha.CircleCaptcha; import cn.hutool.core.util.IdUtil; -import cn.iocoder.dashboard.framework.captcha.config.CaptchaProperties; -import cn.iocoder.dashboard.modules.system.controller.common.vo.SysCaptchaImageRespVO; -import cn.iocoder.dashboard.modules.system.convert.common.SysCaptchaConvert; -import cn.iocoder.dashboard.modules.system.dal.redis.common.SysCaptchaRedisDAO; -import cn.iocoder.dashboard.modules.system.service.common.SysCaptchaService; +import cn.iocoder.yudao.adminserver.modules.system.framework.captcha.config.CaptchaProperties; +import cn.iocoder.yudao.adminserver.modules.system.controller.common.vo.SysCaptchaImageRespVO; +import cn.iocoder.yudao.adminserver.modules.system.convert.common.SysCaptchaConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.redis.common.SysCaptchaRedisDAO; +import cn.iocoder.yudao.adminserver.modules.system.service.common.SysCaptchaService; import org.springframework.stereotype.Service; import javax.annotation.Resource; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/dept/SysDeptService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/dept/SysDeptService.java similarity index 78% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/dept/SysDeptService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/dept/SysDeptService.java index b378fd18d..ad57b7352 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/dept/SysDeptService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/dept/SysDeptService.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.system.service.dept; +package cn.iocoder.yudao.adminserver.modules.system.service.dept; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.dashboard.modules.system.controller.dept.vo.dept.SysDeptCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.dept.vo.dept.SysDeptListReqVO; -import cn.iocoder.dashboard.modules.system.controller.dept.vo.dept.SysDeptUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysDeptDO; -import cn.iocoder.dashboard.util.collection.CollectionUtils; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.dept.SysDeptCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.dept.SysDeptListReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.dept.SysDeptUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dept.SysDeptDO; +import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import java.util.Collection; import java.util.Collections; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/dept/SysPostService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/dept/SysPostService.java similarity index 70% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/dept/SysPostService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/dept/SysPostService.java index 78a96ce29..d9a0db748 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/dept/SysPostService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/dept/SysPostService.java @@ -1,18 +1,18 @@ -package cn.iocoder.dashboard.modules.system.service.dept; +package cn.iocoder.yudao.adminserver.modules.system.service.dept; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.dept.vo.post.SysPostCreateReqVO; -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.controller.dept.vo.post.SysPostUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysPostDO; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.post.SysPostCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.post.SysPostExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.post.SysPostPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.post.SysPostUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dept.SysPostDO; import org.springframework.lang.Nullable; import java.util.Collection; import java.util.List; -import static cn.iocoder.dashboard.util.collection.SetUtils.asSet; +import static cn.iocoder.yudao.framework.common.util.collection.SetUtils.asSet; /** * 岗位 Service 接口 diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/dept/impl/SysDeptServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/dept/impl/SysDeptServiceImpl.java similarity index 88% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/dept/impl/SysDeptServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/dept/impl/SysDeptServiceImpl.java index 96e3d1ad0..cac9bf565 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/dept/impl/SysDeptServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/dept/impl/SysDeptServiceImpl.java @@ -1,18 +1,18 @@ -package cn.iocoder.dashboard.modules.system.service.dept.impl; +package cn.iocoder.yudao.adminserver.modules.system.service.dept.impl; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.modules.system.controller.dept.vo.dept.SysDeptCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.dept.vo.dept.SysDeptListReqVO; -import cn.iocoder.dashboard.modules.system.controller.dept.vo.dept.SysDeptUpdateReqVO; -import cn.iocoder.dashboard.modules.system.convert.dept.SysDeptConvert; -import cn.iocoder.dashboard.modules.system.dal.mysql.dept.SysDeptMapper; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysDeptDO; -import cn.iocoder.dashboard.modules.system.enums.dept.DeptIdEnum; -import cn.iocoder.dashboard.modules.system.mq.producer.dept.SysDeptProducer; -import cn.iocoder.dashboard.modules.system.service.dept.SysDeptService; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.dept.SysDeptCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.dept.SysDeptListReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.dept.SysDeptUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.convert.dept.SysDeptConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.dept.SysDeptMapper; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dept.SysDeptDO; +import cn.iocoder.yudao.adminserver.modules.system.enums.dept.DeptIdEnum; +import cn.iocoder.yudao.adminserver.modules.system.mq.producer.dept.SysDeptProducer; +import cn.iocoder.yudao.adminserver.modules.system.service.dept.SysDeptService; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.Multimap; @@ -25,7 +25,7 @@ import javax.annotation.PostConstruct; import javax.annotation.Resource; import java.util.*; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.*; /** * 部门 Service 实现类 diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/dept/impl/SysPostServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/dept/impl/SysPostServiceImpl.java similarity index 76% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/dept/impl/SysPostServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/dept/impl/SysPostServiceImpl.java index 36bb95cb2..032e59ae9 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/dept/impl/SysPostServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/dept/impl/SysPostServiceImpl.java @@ -1,15 +1,15 @@ -package cn.iocoder.dashboard.modules.system.service.dept.impl; +package cn.iocoder.yudao.adminserver.modules.system.service.dept.impl; -import cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.dept.vo.post.SysPostCreateReqVO; -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.controller.dept.vo.post.SysPostUpdateReqVO; -import cn.iocoder.dashboard.modules.system.convert.dept.SysPostConvert; -import cn.iocoder.dashboard.modules.system.dal.mysql.dept.SysPostMapper; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysPostDO; -import cn.iocoder.dashboard.modules.system.service.dept.SysPostService; +import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.post.SysPostCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.post.SysPostExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.post.SysPostPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.post.SysPostUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.convert.dept.SysPostConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.dept.SysPostMapper; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dept.SysPostDO; +import cn.iocoder.yudao.adminserver.modules.system.service.dept.SysPostService; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; @@ -17,7 +17,7 @@ import javax.annotation.Resource; import java.util.Collection; import java.util.List; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.*; /** * 岗位 Service 实现类 diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/dict/SysDictDataService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/dict/SysDictDataService.java similarity index 69% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/dict/SysDictDataService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/dict/SysDictDataService.java index ffbd66d19..20457202d 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/dict/SysDictDataService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/dict/SysDictDataService.java @@ -1,12 +1,12 @@ -package cn.iocoder.dashboard.modules.system.service.dict; +package cn.iocoder.yudao.adminserver.modules.system.service.dict; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.dict.core.service.DictDataFrameworkService; -import cn.iocoder.dashboard.modules.system.controller.dict.vo.data.SysDictDataCreateReqVO; -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.controller.dict.vo.data.SysDictDataUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dict.SysDictDataDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.dict.core.service.DictDataFrameworkService; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.data.SysDictDataCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.data.SysDictDataExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.data.SysDictDataPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.data.SysDictDataUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dict.SysDictDataDO; import java.util.List; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/dict/SysDictTypeService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/dict/SysDictTypeService.java similarity index 70% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/dict/SysDictTypeService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/dict/SysDictTypeService.java index 1d2fbe945..6c3324fb5 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/dict/SysDictTypeService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/dict/SysDictTypeService.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.system.service.dict; +package cn.iocoder.yudao.adminserver.modules.system.service.dict; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.dict.vo.type.SysDictTypeCreateReqVO; -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.controller.dict.vo.type.SysDictTypeUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dict.SysDictTypeDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.type.SysDictTypeCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.type.SysDictTypeExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.type.SysDictTypePageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.type.SysDictTypeUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dict.SysDictTypeDO; import java.util.List; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/dict/impl/SysDictDataServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/dict/impl/SysDictDataServiceImpl.java similarity index 79% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/dict/impl/SysDictDataServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/dict/impl/SysDictDataServiceImpl.java index 7f24cbff4..4f23dac88 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/dict/impl/SysDictDataServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/dict/impl/SysDictDataServiceImpl.java @@ -1,20 +1,21 @@ -package cn.iocoder.dashboard.modules.system.service.dict.impl; +package cn.iocoder.yudao.adminserver.modules.system.service.dict.impl; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.modules.system.controller.dict.vo.data.SysDictDataCreateReqVO; -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.controller.dict.vo.data.SysDictDataUpdateReqVO; -import cn.iocoder.dashboard.modules.system.convert.dict.SysDictDataConvert; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dict.SysDictDataDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dict.SysDictTypeDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.dict.SysDictDataMapper; -import cn.iocoder.dashboard.modules.system.mq.producer.dict.SysDictDataProducer; -import cn.iocoder.dashboard.modules.system.service.dict.SysDictDataService; -import cn.iocoder.dashboard.modules.system.service.dict.SysDictTypeService; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.dict.core.dto.DictDataRespDTO; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.data.SysDictDataCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.data.SysDictDataExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.data.SysDictDataPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.data.SysDictDataUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.convert.dict.SysDictDataConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dict.SysDictDataDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dict.SysDictTypeDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.dict.SysDictDataMapper; +import cn.iocoder.yudao.adminserver.modules.system.mq.producer.dict.SysDictDataProducer; +import cn.iocoder.yudao.adminserver.modules.system.service.dict.SysDictDataService; +import cn.iocoder.yudao.adminserver.modules.system.service.dict.SysDictTypeService; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableTable; import lombok.extern.slf4j.Slf4j; @@ -23,13 +24,12 @@ import org.springframework.stereotype.Service; import javax.annotation.PostConstruct; import javax.annotation.Resource; -import java.util.ArrayList; import java.util.Comparator; import java.util.Date; import java.util.List; -import static cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.*; /** * 字典数据 Service 实现类 @@ -239,18 +239,18 @@ public class SysDictDataServiceImpl implements SysDictDataService { } @Override - public SysDictDataDO getDictDataFromCache(String type, String value) { - return valueDictDataCache.get(type, value); + public DictDataRespDTO getDictDataFromCache(String type, String value) { + return SysDictDataConvert.INSTANCE.convert02(valueDictDataCache.get(type, value)); } @Override - public SysDictDataDO parseDictDataFromCache(String type, String label) { - return labelDictDataCache.get(type, label); + public DictDataRespDTO parseDictDataFromCache(String type, String label) { + return SysDictDataConvert.INSTANCE.convert02(labelDictDataCache.get(type, label)); } @Override - public List listDictDatasFromCache(String type) { - return new ArrayList<>(labelDictDataCache.row(type).values()); + public List listDictDatasFromCache(String type) { + return SysDictDataConvert.INSTANCE.convertList03(labelDictDataCache.row(type).values()); } } diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/dict/impl/SysDictTypeServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/dict/impl/SysDictTypeServiceImpl.java similarity index 77% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/dict/impl/SysDictTypeServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/dict/impl/SysDictTypeServiceImpl.java index c210e8e2b..b05476453 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/dict/impl/SysDictTypeServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/dict/impl/SysDictTypeServiceImpl.java @@ -1,23 +1,23 @@ -package cn.iocoder.dashboard.modules.system.service.dict.impl; +package cn.iocoder.yudao.adminserver.modules.system.service.dict.impl; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.dict.vo.type.SysDictTypeCreateReqVO; -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.controller.dict.vo.type.SysDictTypeUpdateReqVO; -import cn.iocoder.dashboard.modules.system.convert.dict.SysDictTypeConvert; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dict.SysDictTypeDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.dict.SysDictTypeMapper; -import cn.iocoder.dashboard.modules.system.service.dict.SysDictDataService; -import cn.iocoder.dashboard.modules.system.service.dict.SysDictTypeService; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.type.SysDictTypeCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.type.SysDictTypeExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.type.SysDictTypePageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.type.SysDictTypeUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.convert.dict.SysDictTypeConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dict.SysDictTypeDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.dict.SysDictTypeMapper; +import cn.iocoder.yudao.adminserver.modules.system.service.dict.SysDictDataService; +import cn.iocoder.yudao.adminserver.modules.system.service.dict.SysDictTypeService; import com.google.common.annotations.VisibleForTesting; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.List; -import static cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.*; /** * 字典类型 Service 实现类 diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/errorcode/SysErrorCodeService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/errorcode/SysErrorCodeService.java similarity index 62% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/errorcode/SysErrorCodeService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/errorcode/SysErrorCodeService.java index 5d7354e7a..4bcfb9776 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/errorcode/SysErrorCodeService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/errorcode/SysErrorCodeService.java @@ -1,12 +1,12 @@ -package cn.iocoder.dashboard.modules.system.service.errorcode; +package cn.iocoder.yudao.adminserver.modules.system.service.errorcode; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.errorcode.core.service.ErrorCodeFrameworkService; -import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodeCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodeExportReqVO; -import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodePageReqVO; -import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodeUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.errorcode.SysErrorCodeDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.core.service.ErrorCodeFrameworkService; +import cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo.SysErrorCodeCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo.SysErrorCodeExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo.SysErrorCodePageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo.SysErrorCodeUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.errorcode.SysErrorCodeDO; import javax.validation.Valid; import java.util.List; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/errorcode/impl/SysErrorCodeServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/errorcode/impl/SysErrorCodeServiceImpl.java similarity index 78% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/errorcode/impl/SysErrorCodeServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/errorcode/impl/SysErrorCodeServiceImpl.java index 4a73ffe12..178e071dd 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/errorcode/impl/SysErrorCodeServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/errorcode/impl/SysErrorCodeServiceImpl.java @@ -1,18 +1,18 @@ -package cn.iocoder.dashboard.modules.system.service.errorcode.impl; +package cn.iocoder.yudao.adminserver.modules.system.service.errorcode.impl; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.errorcode.core.dto.ErrorCodeAutoGenerateReqDTO; -import cn.iocoder.dashboard.framework.errorcode.core.dto.ErrorCodeRespDTO; -import cn.iocoder.dashboard.modules.system.convert.errorcode.SysErrorCodeConvert; -import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodeCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodeExportReqVO; -import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodePageReqVO; -import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodeUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.errorcode.SysErrorCodeDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.errorcode.SysErrorCodeMapper; -import cn.iocoder.dashboard.modules.system.enums.errorcode.SysErrorCodeTypeEnum; -import cn.iocoder.dashboard.modules.system.service.errorcode.SysErrorCodeService; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.core.dto.ErrorCodeAutoGenerateReqDTO; +import cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.core.dto.ErrorCodeRespDTO; +import cn.iocoder.yudao.adminserver.modules.system.convert.errorcode.SysErrorCodeConvert; +import cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo.SysErrorCodeCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo.SysErrorCodeExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo.SysErrorCodePageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo.SysErrorCodeUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.errorcode.SysErrorCodeDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.errorcode.SysErrorCodeMapper; +import cn.iocoder.yudao.adminserver.modules.system.enums.errorcode.SysErrorCodeTypeEnum; +import cn.iocoder.yudao.adminserver.modules.system.service.errorcode.SysErrorCodeService; import com.google.common.annotations.VisibleForTesting; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; @@ -24,10 +24,10 @@ import java.util.Date; import java.util.List; import java.util.Map; -import static cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*; -import static cn.iocoder.dashboard.util.collection.CollectionUtils.convertMap; -import static cn.iocoder.dashboard.util.collection.CollectionUtils.convertSet; +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; /** * 错误码 Service 实现类 diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/logger/SysLoginLogService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/logger/SysLoginLogService.java similarity index 54% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/logger/SysLoginLogService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/logger/SysLoginLogService.java index ffea8c54f..9da2570fb 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/logger/SysLoginLogService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/logger/SysLoginLogService.java @@ -1,10 +1,10 @@ -package cn.iocoder.dashboard.modules.system.service.logger; +package cn.iocoder.yudao.adminserver.modules.system.service.logger; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogExportReqVO; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogPageReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.logger.SysLoginLogDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog.SysLoginLogCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog.SysLoginLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog.SysLoginLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.logger.SysLoginLogDO; import java.util.List; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/logger/SysOperateLogService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/logger/SysOperateLogService.java similarity index 51% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/logger/SysOperateLogService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/logger/SysOperateLogService.java index 689698e48..cf3379b39 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/logger/SysOperateLogService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/logger/SysOperateLogService.java @@ -1,10 +1,10 @@ -package cn.iocoder.dashboard.modules.system.service.logger; +package cn.iocoder.yudao.adminserver.modules.system.service.logger; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.logger.operatelog.core.service.OperateLogFrameworkService; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogExportReqVO; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogPageReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.logger.SysOperateLogDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.operatelog.core.service.OperateLogFrameworkService; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.operatelog.SysOperateLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.operatelog.SysOperateLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.logger.SysOperateLogDO; import java.util.List; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/logger/impl/SysLoginLogServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/logger/impl/SysLoginLogServiceImpl.java similarity index 50% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/logger/impl/SysLoginLogServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/logger/impl/SysLoginLogServiceImpl.java index ed51a2122..8b28249f0 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/logger/impl/SysLoginLogServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/logger/impl/SysLoginLogServiceImpl.java @@ -1,13 +1,13 @@ -package cn.iocoder.dashboard.modules.system.service.logger.impl; +package cn.iocoder.yudao.adminserver.modules.system.service.logger.impl; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogExportReqVO; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogPageReqVO; -import cn.iocoder.dashboard.modules.system.convert.logger.SysLoginLogConvert; -import cn.iocoder.dashboard.modules.system.dal.dataobject.logger.SysLoginLogDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.logger.SysLoginLogMapper; -import cn.iocoder.dashboard.modules.system.service.logger.SysLoginLogService; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog.SysLoginLogCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog.SysLoginLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog.SysLoginLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.convert.logger.SysLoginLogConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.logger.SysLoginLogDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.logger.SysLoginLogMapper; +import cn.iocoder.yudao.adminserver.modules.system.service.logger.SysLoginLogService; import org.springframework.stereotype.Service; import javax.annotation.Resource; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/logger/impl/SysOperateLogServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/logger/impl/SysOperateLogServiceImpl.java similarity index 63% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/logger/impl/SysOperateLogServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/logger/impl/SysOperateLogServiceImpl.java index 5251dfe05..69c684ebd 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/logger/impl/SysOperateLogServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/logger/impl/SysOperateLogServiceImpl.java @@ -1,18 +1,18 @@ -package cn.iocoder.dashboard.modules.system.service.logger.impl; +package cn.iocoder.yudao.adminserver.modules.system.service.logger.impl; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogExportReqVO; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogPageReqVO; -import cn.iocoder.dashboard.modules.system.convert.logger.SysOperateLogConvert; -import cn.iocoder.dashboard.modules.system.dal.dataobject.logger.SysOperateLogDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.logger.SysOperateLogMapper; -import cn.iocoder.dashboard.modules.system.service.logger.SysOperateLogService; -import cn.iocoder.dashboard.modules.system.service.user.SysUserService; -import cn.iocoder.dashboard.util.string.StrUtils; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.operatelog.core.dto.OperateLogCreateReqDTO; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.operatelog.SysOperateLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.operatelog.SysOperateLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.convert.logger.SysOperateLogConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.logger.SysOperateLogDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.user.SysUserDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.logger.SysOperateLogMapper; +import cn.iocoder.yudao.adminserver.modules.system.service.logger.SysOperateLogService; +import cn.iocoder.yudao.adminserver.modules.system.service.user.SysUserService; +import cn.iocoder.yudao.framework.common.util.string.StrUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.AsyncResult; @@ -24,9 +24,9 @@ import java.util.Collections; import java.util.List; import java.util.concurrent.Future; -import static cn.iocoder.dashboard.modules.system.dal.dataobject.logger.SysOperateLogDO.JAVA_METHOD_ARGS_MAX_LENGTH; -import static cn.iocoder.dashboard.modules.system.dal.dataobject.logger.SysOperateLogDO.RESULT_MAX_LENGTH; -import static cn.iocoder.dashboard.util.collection.CollectionUtils.convertSet; +import static cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.logger.SysOperateLogDO.JAVA_METHOD_ARGS_MAX_LENGTH; +import static cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.logger.SysOperateLogDO.RESULT_MAX_LENGTH; +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; @Service @Slf4j @@ -40,7 +40,7 @@ public class SysOperateLogServiceImpl implements SysOperateLogService { @Override @Async - public Future createOperateLogAsync(SysOperateLogCreateReqVO reqVO) { + public Future createOperateLogAsync(OperateLogCreateReqDTO reqVO) { boolean success = false; try { SysOperateLogDO logDO = SysOperateLogConvert.INSTANCE.convert(reqVO); diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/notice/SysNoticeService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/notice/SysNoticeService.java similarity index 65% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/notice/SysNoticeService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/notice/SysNoticeService.java index 37a92267b..ee4ecddb7 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/notice/SysNoticeService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/notice/SysNoticeService.java @@ -1,10 +1,10 @@ -package cn.iocoder.dashboard.modules.system.service.notice; +package cn.iocoder.yudao.adminserver.modules.system.service.notice; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.notice.vo.SysNoticeCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.notice.vo.SysNoticePageReqVO; -import cn.iocoder.dashboard.modules.system.controller.notice.vo.SysNoticeUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.notice.SysNoticeDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.notice.vo.SysNoticeCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.notice.vo.SysNoticePageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.notice.vo.SysNoticeUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.notice.SysNoticeDO; /** * 通知公告 Service 接口 diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/notice/impl/SysNoticeServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/notice/impl/SysNoticeServiceImpl.java similarity index 63% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/notice/impl/SysNoticeServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/notice/impl/SysNoticeServiceImpl.java index 502f43c3b..2cb770b06 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/notice/impl/SysNoticeServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/notice/impl/SysNoticeServiceImpl.java @@ -1,20 +1,20 @@ -package cn.iocoder.dashboard.modules.system.service.notice.impl; +package cn.iocoder.yudao.adminserver.modules.system.service.notice.impl; -import cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.notice.vo.SysNoticeCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.notice.vo.SysNoticePageReqVO; -import cn.iocoder.dashboard.modules.system.controller.notice.vo.SysNoticeUpdateReqVO; -import cn.iocoder.dashboard.modules.system.convert.notice.SysNoticeConvert; -import cn.iocoder.dashboard.modules.system.dal.mysql.notice.SysNoticeMapper; -import cn.iocoder.dashboard.modules.system.dal.dataobject.notice.SysNoticeDO; -import cn.iocoder.dashboard.modules.system.service.notice.SysNoticeService; +import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.notice.vo.SysNoticeCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.notice.vo.SysNoticePageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.notice.vo.SysNoticeUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.convert.notice.SysNoticeConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.notice.SysNoticeMapper; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.notice.SysNoticeDO; +import cn.iocoder.yudao.adminserver.modules.system.service.notice.SysNoticeService; import com.google.common.annotations.VisibleForTesting; import org.springframework.stereotype.Service; import javax.annotation.Resource; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.NOTICE_NOT_FOUND; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.NOTICE_NOT_FOUND; /** * 通知公告 Service 实现类 diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/permission/SysMenuService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/SysMenuService.java similarity index 81% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/permission/SysMenuService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/SysMenuService.java index 6e84007a4..5979f16d1 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/permission/SysMenuService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/SysMenuService.java @@ -1,9 +1,9 @@ -package cn.iocoder.dashboard.modules.system.service.permission; +package cn.iocoder.yudao.adminserver.modules.system.service.permission; -import cn.iocoder.dashboard.modules.system.controller.permission.vo.menu.SysMenuCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.permission.vo.menu.SysMenuListReqVO; -import cn.iocoder.dashboard.modules.system.controller.permission.vo.menu.SysMenuUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysMenuDO; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.menu.SysMenuCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.menu.SysMenuListReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.menu.SysMenuUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysMenuDO; import java.util.Collection; import java.util.List; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/permission/SysPermissionService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/SysPermissionService.java similarity index 91% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/permission/SysPermissionService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/SysPermissionService.java index 6bb79c446..e159f95be 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/permission/SysPermissionService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/SysPermissionService.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.system.service.permission; +package cn.iocoder.yudao.adminserver.modules.system.service.permission; -import cn.iocoder.dashboard.framework.security.core.service.SecurityPermissionFrameworkService; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysMenuDO; +import cn.iocoder.yudao.framework.security.core.service.SecurityPermissionFrameworkService; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysMenuDO; import org.springframework.lang.Nullable; import java.util.Collection; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/permission/SysRoleService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/SysRoleService.java similarity index 80% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/permission/SysRoleService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/SysRoleService.java index 94506ec61..4f2672118 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/permission/SysRoleService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/SysRoleService.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.system.service.permission; +package cn.iocoder.yudao.adminserver.modules.system.service.permission; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.permission.vo.role.SysRoleCreateReqVO; -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.controller.permission.vo.role.SysRoleUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysRoleDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.role.SysRoleCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.role.SysRoleExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.role.SysRolePageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.role.SysRoleUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysRoleDO; import org.springframework.lang.Nullable; import java.util.Collection; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/permission/impl/SysMenuServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/impl/SysMenuServiceImpl.java similarity index 88% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/permission/impl/SysMenuServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/impl/SysMenuServiceImpl.java index ec4ea5a9b..39200225e 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/permission/impl/SysMenuServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/impl/SysMenuServiceImpl.java @@ -1,20 +1,20 @@ -package cn.iocoder.dashboard.modules.system.service.permission.impl; +package cn.iocoder.yudao.adminserver.modules.system.service.permission.impl; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.modules.system.controller.permission.vo.menu.SysMenuCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.permission.vo.menu.SysMenuListReqVO; -import cn.iocoder.dashboard.modules.system.controller.permission.vo.menu.SysMenuUpdateReqVO; -import cn.iocoder.dashboard.modules.system.convert.permission.SysMenuConvert; -import cn.iocoder.dashboard.modules.system.dal.mysql.permission.SysMenuMapper; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysMenuDO; -import cn.iocoder.dashboard.modules.system.enums.permission.MenuIdEnum; -import cn.iocoder.dashboard.modules.system.enums.permission.MenuTypeEnum; -import cn.iocoder.dashboard.modules.system.mq.producer.permission.SysMenuProducer; -import cn.iocoder.dashboard.modules.system.service.permission.SysMenuService; -import cn.iocoder.dashboard.modules.system.service.permission.SysPermissionService; -import cn.iocoder.dashboard.util.collection.CollectionUtils; +import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.menu.SysMenuCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.menu.SysMenuListReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.menu.SysMenuUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.convert.permission.SysMenuConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.permission.SysMenuMapper; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysMenuDO; +import cn.iocoder.yudao.adminserver.modules.system.enums.permission.MenuIdEnum; +import cn.iocoder.yudao.adminserver.modules.system.enums.permission.MenuTypeEnum; +import cn.iocoder.yudao.adminserver.modules.system.mq.producer.permission.SysMenuProducer; +import cn.iocoder.yudao.adminserver.modules.system.service.permission.SysMenuService; +import cn.iocoder.yudao.adminserver.modules.system.service.permission.SysPermissionService; +import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMultimap; @@ -31,7 +31,7 @@ import javax.annotation.Resource; import java.util.*; import java.util.stream.Collectors; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.*; /** * 菜单 Service 实现 diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/permission/impl/SysPermissionServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/impl/SysPermissionServiceImpl.java similarity index 91% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/permission/impl/SysPermissionServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/impl/SysPermissionServiceImpl.java index 9116d3e55..64bf04f26 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/permission/impl/SysPermissionServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/impl/SysPermissionServiceImpl.java @@ -1,21 +1,21 @@ -package cn.iocoder.dashboard.modules.system.service.permission.impl; +package cn.iocoder.yudao.adminserver.modules.system.service.permission.impl; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.ArrayUtil; -import cn.iocoder.dashboard.framework.security.core.util.SecurityFrameworkUtils; -import cn.iocoder.dashboard.modules.system.dal.mysql.permission.SysRoleMenuMapper; -import cn.iocoder.dashboard.modules.system.dal.mysql.permission.SysUserRoleMapper; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysMenuDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysRoleDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysRoleMenuDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysUserRoleDO; -import cn.iocoder.dashboard.modules.system.mq.producer.permission.SysPermissionProducer; -import cn.iocoder.dashboard.modules.system.service.permission.SysMenuService; -import cn.iocoder.dashboard.modules.system.service.permission.SysPermissionService; -import cn.iocoder.dashboard.modules.system.service.permission.SysRoleService; -import cn.iocoder.dashboard.util.collection.CollectionUtils; -import cn.iocoder.dashboard.util.collection.MapUtils; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.permission.SysRoleMenuMapper; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.permission.SysUserRoleMapper; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysMenuDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysRoleDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysRoleMenuDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysUserRoleDO; +import cn.iocoder.yudao.adminserver.modules.system.mq.producer.permission.SysPermissionProducer; +import cn.iocoder.yudao.adminserver.modules.system.service.permission.SysMenuService; +import cn.iocoder.yudao.adminserver.modules.system.service.permission.SysPermissionService; +import cn.iocoder.yudao.adminserver.modules.system.service.permission.SysRoleService; +import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; +import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.Multimap; import com.google.common.collect.Sets; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/permission/impl/SysRoleServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/impl/SysRoleServiceImpl.java similarity index 85% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/permission/impl/SysRoleServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/impl/SysRoleServiceImpl.java index 89e51ad5e..c233f4f85 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/permission/impl/SysRoleServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/impl/SysRoleServiceImpl.java @@ -1,23 +1,23 @@ -package cn.iocoder.dashboard.modules.system.service.permission.impl; +package cn.iocoder.yudao.adminserver.modules.system.service.permission.impl; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollectionUtil; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.modules.system.controller.permission.vo.role.SysRoleCreateReqVO; -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.controller.permission.vo.role.SysRoleUpdateReqVO; -import cn.iocoder.dashboard.modules.system.convert.permission.SysRoleConvert; -import cn.iocoder.dashboard.modules.system.dal.mysql.permission.SysRoleMapper; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysRoleDO; -import cn.iocoder.dashboard.modules.system.enums.permission.RoleCodeEnum; -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 cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.role.SysRoleCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.role.SysRoleExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.role.SysRolePageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.role.SysRoleUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.convert.permission.SysRoleConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.permission.SysRoleMapper; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysRoleDO; +import cn.iocoder.yudao.adminserver.modules.system.enums.permission.RoleCodeEnum; +import cn.iocoder.yudao.adminserver.modules.system.enums.permission.SysRoleTypeEnum; +import cn.iocoder.yudao.adminserver.modules.system.mq.producer.permission.SysRoleProducer; +import cn.iocoder.yudao.adminserver.modules.system.service.permission.SysPermissionService; +import cn.iocoder.yudao.adminserver.modules.system.service.permission.SysRoleService; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableMap; import lombok.extern.slf4j.Slf4j; @@ -34,7 +34,7 @@ import javax.annotation.Resource; import java.util.*; import java.util.stream.Collectors; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.*; /** * 角色 Service 实现类 diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsChannelService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsChannelService.java similarity index 73% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsChannelService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsChannelService.java index c53d85e05..cd6451482 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsChannelService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsChannelService.java @@ -1,10 +1,10 @@ -package cn.iocoder.dashboard.modules.system.service.sms; +package cn.iocoder.yudao.adminserver.modules.system.service.sms; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.channel.SysSmsChannelCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.channel.SysSmsChannelPageReqVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.channel.SysSmsChannelUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsChannelDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.channel.SysSmsChannelCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.channel.SysSmsChannelPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.channel.SysSmsChannelUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms.SysSmsChannelDO; import javax.validation.Valid; import java.util.Collection; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsLogService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsLogService.java similarity index 81% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsLogService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsLogService.java index 52bb4a624..980cf2864 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsLogService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsLogService.java @@ -1,10 +1,10 @@ -package cn.iocoder.dashboard.modules.system.service.sms; +package cn.iocoder.yudao.adminserver.modules.system.service.sms; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.log.SysSmsLogExportReqVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.log.SysSmsLogPageReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsLogDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsTemplateDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.log.SysSmsLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.log.SysSmsLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms.SysSmsLogDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms.SysSmsTemplateDO; import java.util.Date; import java.util.List; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsService.java similarity index 92% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsService.java index f568b11a8..70d32c127 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsService.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.system.service.sms; +package cn.iocoder.yudao.adminserver.modules.system.service.sms; -import cn.iocoder.dashboard.modules.system.mq.message.sms.SysSmsSendMessage; +import cn.iocoder.yudao.adminserver.modules.system.mq.message.sms.SysSmsSendMessage; import java.util.List; import java.util.Map; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsTemplateService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsTemplateService.java similarity index 78% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsTemplateService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsTemplateService.java index 1af5dae12..40207cf43 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsTemplateService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsTemplateService.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.system.service.sms; +package cn.iocoder.yudao.adminserver.modules.system.service.sms; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.template.SysSmsTemplateCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.template.SysSmsTemplateExportReqVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.template.SysSmsTemplatePageReqVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.template.SysSmsTemplateUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsTemplateDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template.SysSmsTemplateCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template.SysSmsTemplateExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template.SysSmsTemplatePageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template.SysSmsTemplateUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms.SysSmsTemplateDO; import javax.validation.Valid; import java.util.Collection; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/sms/impl/SysSmsChannelServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/impl/SysSmsChannelServiceImpl.java similarity index 77% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/sms/impl/SysSmsChannelServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/impl/SysSmsChannelServiceImpl.java index 16ecdecff..444cae63c 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/sms/impl/SysSmsChannelServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/impl/SysSmsChannelServiceImpl.java @@ -1,19 +1,19 @@ -package cn.iocoder.dashboard.modules.system.service.sms.impl; +package cn.iocoder.yudao.adminserver.modules.system.service.sms.impl; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.framework.sms.core.client.SmsClientFactory; -import cn.iocoder.dashboard.framework.sms.core.property.SmsChannelProperties; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.channel.SysSmsChannelCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.channel.SysSmsChannelPageReqVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.channel.SysSmsChannelUpdateReqVO; -import cn.iocoder.dashboard.modules.system.convert.sms.SysSmsChannelConvert; -import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsChannelDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.sms.SysSmsChannelMapper; -import cn.iocoder.dashboard.modules.system.mq.producer.sms.SysSmsProducer; -import cn.iocoder.dashboard.modules.system.service.sms.SysSmsChannelService; -import cn.iocoder.dashboard.modules.system.service.sms.SysSmsTemplateService; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.framework.sms.core.client.SmsClientFactory; +import cn.iocoder.yudao.framework.sms.core.property.SmsChannelProperties; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.channel.SysSmsChannelCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.channel.SysSmsChannelPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.channel.SysSmsChannelUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.convert.sms.SysSmsChannelConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms.SysSmsChannelDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.sms.SysSmsChannelMapper; +import cn.iocoder.yudao.adminserver.modules.system.mq.producer.sms.SysSmsProducer; +import cn.iocoder.yudao.adminserver.modules.system.service.sms.SysSmsChannelService; +import cn.iocoder.yudao.adminserver.modules.system.service.sms.SysSmsTemplateService; import lombok.extern.slf4j.Slf4j; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Service; @@ -25,9 +25,9 @@ import java.util.Comparator; import java.util.Date; import java.util.List; -import static cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.SMS_CHANNEL_HAS_CHILDREN; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.SMS_CHANNEL_NOT_EXISTS; +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.SMS_CHANNEL_HAS_CHILDREN; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.SMS_CHANNEL_NOT_EXISTS; /** * 短信渠道Service实现类 diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/sms/impl/SysSmsLogServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/impl/SysSmsLogServiceImpl.java similarity index 78% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/sms/impl/SysSmsLogServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/impl/SysSmsLogServiceImpl.java index 3145163c0..4b291d9d5 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/sms/impl/SysSmsLogServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/impl/SysSmsLogServiceImpl.java @@ -1,15 +1,15 @@ -package cn.iocoder.dashboard.modules.system.service.sms.impl; +package cn.iocoder.yudao.adminserver.modules.system.service.sms.impl; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.log.SysSmsLogExportReqVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.log.SysSmsLogPageReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsLogDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsTemplateDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.sms.SysSmsLogMapper; -import cn.iocoder.dashboard.modules.system.enums.sms.SysSmsReceiveStatusEnum; -import cn.iocoder.dashboard.modules.system.enums.sms.SysSmsSendStatusEnum; -import cn.iocoder.dashboard.modules.system.service.sms.SysSmsLogService; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.log.SysSmsLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.log.SysSmsLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms.SysSmsLogDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms.SysSmsTemplateDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.sms.SysSmsLogMapper; +import cn.iocoder.yudao.adminserver.modules.system.enums.sms.SysSmsReceiveStatusEnum; +import cn.iocoder.yudao.adminserver.modules.system.enums.sms.SysSmsSendStatusEnum; +import cn.iocoder.yudao.adminserver.modules.system.service.sms.SysSmsLogService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/sms/impl/SysSmsServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/impl/SysSmsServiceImpl.java similarity index 81% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/sms/impl/SysSmsServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/impl/SysSmsServiceImpl.java index 46534d57f..9fced9b8f 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/sms/impl/SysSmsServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/impl/SysSmsServiceImpl.java @@ -1,23 +1,23 @@ -package cn.iocoder.dashboard.modules.system.service.sms.impl; +package cn.iocoder.yudao.adminserver.modules.system.service.sms.impl; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; -import cn.iocoder.dashboard.common.core.KeyValue; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.common.enums.UserTypeEnum; -import cn.iocoder.dashboard.framework.sms.core.client.SmsClient; -import cn.iocoder.dashboard.framework.sms.core.client.SmsClientFactory; -import cn.iocoder.dashboard.framework.sms.core.client.SmsCommonResult; -import cn.iocoder.dashboard.framework.sms.core.client.dto.SmsReceiveRespDTO; -import cn.iocoder.dashboard.framework.sms.core.client.dto.SmsSendRespDTO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsTemplateDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO; -import cn.iocoder.dashboard.modules.system.mq.message.sms.SysSmsSendMessage; -import cn.iocoder.dashboard.modules.system.mq.producer.sms.SysSmsProducer; -import cn.iocoder.dashboard.modules.system.service.sms.SysSmsLogService; -import cn.iocoder.dashboard.modules.system.service.sms.SysSmsService; -import cn.iocoder.dashboard.modules.system.service.sms.SysSmsTemplateService; -import cn.iocoder.dashboard.modules.system.service.user.SysUserService; +import cn.iocoder.yudao.framework.common.core.KeyValue; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; +import cn.iocoder.yudao.framework.sms.core.client.SmsClient; +import cn.iocoder.yudao.framework.sms.core.client.SmsClientFactory; +import cn.iocoder.yudao.framework.sms.core.client.SmsCommonResult; +import cn.iocoder.yudao.framework.sms.core.client.dto.SmsReceiveRespDTO; +import cn.iocoder.yudao.framework.sms.core.client.dto.SmsSendRespDTO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms.SysSmsTemplateDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.user.SysUserDO; +import cn.iocoder.yudao.adminserver.modules.system.mq.message.sms.SysSmsSendMessage; +import cn.iocoder.yudao.adminserver.modules.system.mq.producer.sms.SysSmsProducer; +import cn.iocoder.yudao.adminserver.modules.system.service.sms.SysSmsLogService; +import cn.iocoder.yudao.adminserver.modules.system.service.sms.SysSmsService; +import cn.iocoder.yudao.adminserver.modules.system.service.sms.SysSmsTemplateService; +import cn.iocoder.yudao.adminserver.modules.system.service.user.SysUserService; import com.google.common.annotations.VisibleForTesting; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; @@ -28,8 +28,8 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; -import static cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.*; /** * 短信日志Service实现类 diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/sms/impl/SysSmsTemplateServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/impl/SysSmsTemplateServiceImpl.java similarity index 83% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/sms/impl/SysSmsTemplateServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/impl/SysSmsTemplateServiceImpl.java index 0a070aefb..9df2592fd 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/sms/impl/SysSmsTemplateServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/impl/SysSmsTemplateServiceImpl.java @@ -1,26 +1,26 @@ -package cn.iocoder.dashboard.modules.system.service.sms.impl; +package cn.iocoder.yudao.adminserver.modules.system.service.sms.impl; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ReUtil; import cn.hutool.core.util.StrUtil; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.framework.sms.core.client.SmsClient; -import cn.iocoder.dashboard.framework.sms.core.client.SmsClientFactory; -import cn.iocoder.dashboard.framework.sms.core.client.SmsCommonResult; -import cn.iocoder.dashboard.framework.sms.core.client.dto.SmsTemplateRespDTO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.template.SysSmsTemplateCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.template.SysSmsTemplateExportReqVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.template.SysSmsTemplatePageReqVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.template.SysSmsTemplateUpdateReqVO; -import cn.iocoder.dashboard.modules.system.convert.sms.SysSmsTemplateConvert; -import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsChannelDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsTemplateDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.sms.SysSmsTemplateMapper; -import cn.iocoder.dashboard.modules.system.mq.producer.sms.SysSmsProducer; -import cn.iocoder.dashboard.modules.system.service.sms.SysSmsChannelService; -import cn.iocoder.dashboard.modules.system.service.sms.SysSmsTemplateService; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.framework.sms.core.client.SmsClient; +import cn.iocoder.yudao.framework.sms.core.client.SmsClientFactory; +import cn.iocoder.yudao.framework.sms.core.client.SmsCommonResult; +import cn.iocoder.yudao.framework.sms.core.client.dto.SmsTemplateRespDTO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template.SysSmsTemplateCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template.SysSmsTemplateExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template.SysSmsTemplatePageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template.SysSmsTemplateUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.convert.sms.SysSmsTemplateConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms.SysSmsChannelDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms.SysSmsTemplateDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.sms.SysSmsTemplateMapper; +import cn.iocoder.yudao.adminserver.modules.system.mq.producer.sms.SysSmsProducer; +import cn.iocoder.yudao.adminserver.modules.system.service.sms.SysSmsChannelService; +import cn.iocoder.yudao.adminserver.modules.system.service.sms.SysSmsTemplateService; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableMap; import lombok.extern.slf4j.Slf4j; @@ -33,8 +33,8 @@ import javax.annotation.Resource; import java.util.*; import java.util.regex.Pattern; -import static cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.*; /** * 短信模板Service实现类 diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/user/SysUserService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/user/SysUserService.java similarity index 76% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/user/SysUserService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/user/SysUserService.java index 5ef26ebc5..16c815ace 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/user/SysUserService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/user/SysUserService.java @@ -1,17 +1,17 @@ -package cn.iocoder.dashboard.modules.system.service.user; +package cn.iocoder.yudao.adminserver.modules.system.service.user; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.user.vo.profile.SysUserProfileUpdatePasswordReqVO; -import cn.iocoder.dashboard.modules.system.controller.user.vo.profile.SysUserProfileUpdateReqVO; -import cn.iocoder.dashboard.modules.system.controller.user.vo.user.SysUserCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.user.vo.user.SysUserExportReqVO; -import cn.iocoder.dashboard.modules.system.controller.user.vo.user.SysUserImportExcelVO; -import cn.iocoder.dashboard.modules.system.controller.user.vo.user.SysUserImportRespVO; -import cn.iocoder.dashboard.modules.system.controller.user.vo.user.SysUserPageReqVO; -import cn.iocoder.dashboard.modules.system.controller.user.vo.user.SysUserUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO; -import cn.iocoder.dashboard.util.collection.CollectionUtils; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.profile.SysUserProfileUpdatePasswordReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.profile.SysUserProfileUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user.SysUserCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user.SysUserExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user.SysUserImportExcelVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user.SysUserImportRespVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user.SysUserPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user.SysUserUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.user.SysUserDO; +import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import java.io.InputStream; import java.util.Collection; diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/service/user/SysUserServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/user/SysUserServiceImpl.java similarity index 88% rename from src/main/java/cn/iocoder/dashboard/modules/system/service/user/SysUserServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/user/SysUserServiceImpl.java index 4e882794a..9c344e92d 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/service/user/SysUserServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/service/user/SysUserServiceImpl.java @@ -1,25 +1,25 @@ -package cn.iocoder.dashboard.modules.system.service.user; +package cn.iocoder.yudao.adminserver.modules.system.service.user; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.io.IoUtil; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.StrUtil; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.common.exception.ServiceException; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.infra.service.file.InfFileService; -import cn.iocoder.dashboard.modules.system.controller.user.vo.profile.SysUserProfileUpdatePasswordReqVO; -import cn.iocoder.dashboard.modules.system.controller.user.vo.profile.SysUserProfileUpdateReqVO; -import cn.iocoder.dashboard.modules.system.controller.user.vo.user.*; -import cn.iocoder.dashboard.modules.system.convert.user.SysUserConvert; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysDeptDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysPostDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.user.SysUserMapper; -import cn.iocoder.dashboard.modules.system.service.dept.SysDeptService; -import cn.iocoder.dashboard.modules.system.service.dept.SysPostService; -import cn.iocoder.dashboard.modules.system.service.permission.SysPermissionService; -import cn.iocoder.dashboard.util.collection.CollectionUtils; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.exception.ServiceException; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.infra.service.file.InfFileService; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.profile.SysUserProfileUpdatePasswordReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.profile.SysUserProfileUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user.*; +import cn.iocoder.yudao.adminserver.modules.system.convert.user.SysUserConvert; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dept.SysDeptDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dept.SysPostDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.user.SysUserDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.user.SysUserMapper; +import cn.iocoder.yudao.adminserver.modules.system.service.dept.SysDeptService; +import cn.iocoder.yudao.adminserver.modules.system.service.dept.SysPostService; +import cn.iocoder.yudao.adminserver.modules.system.service.permission.SysPermissionService; +import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import com.google.common.annotations.VisibleForTesting; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; @@ -31,8 +31,8 @@ import javax.annotation.Resource; import java.io.InputStream; import java.util.*; -import static cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.*; /** diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/ToolCodegenController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/ToolCodegenController.java similarity index 84% rename from src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/ToolCodegenController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/ToolCodegenController.java index a4946cd67..a6bd6a64b 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/ToolCodegenController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/ToolCodegenController.java @@ -1,22 +1,22 @@ -package cn.iocoder.dashboard.modules.tool.controller.codegen; +package cn.iocoder.yudao.adminserver.modules.tool.controller.codegen; import cn.hutool.core.io.IoUtil; import cn.hutool.core.util.ZipUtil; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.tool.controller.codegen.vo.ToolCodegenDetailRespVO; -import cn.iocoder.dashboard.modules.tool.controller.codegen.vo.ToolCodegenPreviewRespVO; -import cn.iocoder.dashboard.modules.tool.controller.codegen.vo.ToolCodegenUpdateReqVO; -import cn.iocoder.dashboard.modules.tool.controller.codegen.vo.table.ToolCodegenTablePageReqVO; -import cn.iocoder.dashboard.modules.tool.controller.codegen.vo.table.ToolCodegenTableRespVO; -import cn.iocoder.dashboard.modules.tool.controller.codegen.vo.table.ToolSchemaTableRespVO; -import cn.iocoder.dashboard.modules.tool.convert.codegen.ToolCodegenConvert; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolCodegenColumnDO; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolCodegenTableDO; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolSchemaTableDO; -import cn.iocoder.dashboard.modules.tool.service.codegen.ToolCodegenService; -import cn.iocoder.dashboard.util.collection.CollectionUtils; -import cn.iocoder.dashboard.util.servlet.ServletUtils; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.ToolCodegenDetailRespVO; +import cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.ToolCodegenPreviewRespVO; +import cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.ToolCodegenUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.table.ToolCodegenTablePageReqVO; +import cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.table.ToolCodegenTableRespVO; +import cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.table.ToolSchemaTableRespVO; +import cn.iocoder.yudao.adminserver.modules.tool.convert.codegen.ToolCodegenConvert; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolCodegenColumnDO; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolCodegenTableDO; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolSchemaTableDO; +import cn.iocoder.yudao.adminserver.modules.tool.service.codegen.ToolCodegenService; +import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; +import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -35,7 +35,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @Api(tags = "代码生成器") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/ToolCodegenDetailRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/ToolCodegenDetailRespVO.java similarity index 59% rename from src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/ToolCodegenDetailRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/ToolCodegenDetailRespVO.java index 503ac8b97..4a1b10c51 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/ToolCodegenDetailRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/ToolCodegenDetailRespVO.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.tool.controller.codegen.vo; +package cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo; -import cn.iocoder.dashboard.modules.tool.controller.codegen.vo.column.ToolCodegenColumnRespVO; -import cn.iocoder.dashboard.modules.tool.controller.codegen.vo.table.ToolCodegenTableRespVO; +import cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.column.ToolCodegenColumnRespVO; +import cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.table.ToolCodegenTableRespVO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/ToolCodegenPreviewRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/ToolCodegenPreviewRespVO.java similarity index 72% rename from src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/ToolCodegenPreviewRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/ToolCodegenPreviewRespVO.java index 3f41a7d29..3a532708a 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/ToolCodegenPreviewRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/ToolCodegenPreviewRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.tool.controller.codegen.vo; +package cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,7 +8,7 @@ import lombok.Data; @Data public class ToolCodegenPreviewRespVO { - @ApiModelProperty(value = "文件路径", required = true, example = "java/cn/iocoder/dashboard/modules/system/controller/test/SysTestDemoController.java") + @ApiModelProperty(value = "文件路径", required = true, example = "java/cn/iocoder/yudao/adminserver/modules/system/controller/test/SysTestDemoController.java") private String filePath; @ApiModelProperty(value = "代码", required = true, example = "Hello World") diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/ToolCodegenUpdateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/ToolCodegenUpdateReqVO.java similarity index 81% rename from src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/ToolCodegenUpdateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/ToolCodegenUpdateReqVO.java index 72d430e31..b82064ecc 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/ToolCodegenUpdateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/ToolCodegenUpdateReqVO.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.tool.controller.codegen.vo; +package cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo; -import cn.iocoder.dashboard.modules.tool.controller.codegen.vo.column.ToolCodegenColumnBaseVO; -import cn.iocoder.dashboard.modules.tool.controller.codegen.vo.table.ToolCodegenTableBaseVO; +import cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.column.ToolCodegenColumnBaseVO; +import cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.table.ToolCodegenTableBaseVO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/column/ToolCodegenColumnBaseVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/column/ToolCodegenColumnBaseVO.java similarity index 97% rename from src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/column/ToolCodegenColumnBaseVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/column/ToolCodegenColumnBaseVO.java index 04a828f39..bd899712f 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/column/ToolCodegenColumnBaseVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/column/ToolCodegenColumnBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.tool.controller.codegen.vo.column; +package cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.column; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/column/ToolCodegenColumnRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/column/ToolCodegenColumnRespVO.java similarity index 87% rename from src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/column/ToolCodegenColumnRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/column/ToolCodegenColumnRespVO.java index 12251e21d..c7d556427 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/column/ToolCodegenColumnRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/column/ToolCodegenColumnRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.tool.controller.codegen.vo.column; +package cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.column; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/table/ToolCodegenTableBaseVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/table/ToolCodegenTableBaseVO.java similarity index 96% rename from src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/table/ToolCodegenTableBaseVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/table/ToolCodegenTableBaseVO.java index 6d5690284..e4fa2ab74 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/table/ToolCodegenTableBaseVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/table/ToolCodegenTableBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.tool.controller.codegen.vo.table; +package cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.table; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/table/ToolCodegenTablePageReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/table/ToolCodegenTablePageReqVO.java similarity index 80% rename from src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/table/ToolCodegenTablePageReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/table/ToolCodegenTablePageReqVO.java index 4b263a598..b09238b06 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/table/ToolCodegenTablePageReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/table/ToolCodegenTablePageReqVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.tool.controller.codegen.vo.table; +package cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.table; -import cn.iocoder.dashboard.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -10,7 +10,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel("表定义分页 Request VO") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/table/ToolCodegenTableRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/table/ToolCodegenTableRespVO.java similarity index 89% rename from src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/table/ToolCodegenTableRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/table/ToolCodegenTableRespVO.java index a214df92f..73ec3f880 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/table/ToolCodegenTableRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/table/ToolCodegenTableRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.tool.controller.codegen.vo.table; +package cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.table; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/table/ToolSchemaTableRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/table/ToolSchemaTableRespVO.java similarity index 89% rename from src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/table/ToolSchemaTableRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/table/ToolSchemaTableRespVO.java index 4b724a1f3..284856f29 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/vo/table/ToolSchemaTableRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/codegen/vo/table/ToolSchemaTableRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.tool.controller.codegen.vo.table; +package cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.table; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/ToolTestDemoController.http b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/ToolTestDemoController.http similarity index 100% rename from src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/ToolTestDemoController.http rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/ToolTestDemoController.http diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/ToolTestDemoController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/ToolTestDemoController.java similarity index 82% rename from src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/ToolTestDemoController.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/ToolTestDemoController.java index 80384c8b0..2249af538 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/ToolTestDemoController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/ToolTestDemoController.java @@ -1,15 +1,15 @@ -package cn.iocoder.dashboard.modules.tool.controller.test; +package cn.iocoder.yudao.adminserver.modules.tool.controller.test; import cn.hutool.core.thread.ThreadUtil; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; -import cn.iocoder.dashboard.framework.tracer.core.annotation.BizTrace; -import cn.iocoder.dashboard.modules.tool.controller.test.vo.*; -import cn.iocoder.dashboard.modules.tool.convert.test.ToolTestDemoConvert; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.test.ToolTestDemoDO; -import cn.iocoder.dashboard.modules.tool.service.test.ToolTestDemoService; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.tracer.core.annotation.BizTrace; +import cn.iocoder.yudao.adminserver.modules.tool.controller.test.vo.*; +import cn.iocoder.yudao.adminserver.modules.tool.convert.test.ToolTestDemoConvert; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.test.ToolTestDemoDO; +import cn.iocoder.yudao.adminserver.modules.tool.service.test.ToolTestDemoService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -25,8 +25,8 @@ import java.util.Collection; import java.util.List; import java.util.concurrent.TimeUnit; -import static cn.iocoder.dashboard.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Api(tags = "测试示例") @RestController diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/vo/ToolTestDemoBaseVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/vo/ToolTestDemoBaseVO.java similarity index 93% rename from src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/vo/ToolTestDemoBaseVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/vo/ToolTestDemoBaseVO.java index f10fdb251..0e1af3c28 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/vo/ToolTestDemoBaseVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/vo/ToolTestDemoBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.tool.controller.test.vo; +package cn.iocoder.yudao.adminserver.modules.tool.controller.test.vo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/vo/ToolTestDemoCreateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/vo/ToolTestDemoCreateReqVO.java similarity index 81% rename from src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/vo/ToolTestDemoCreateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/vo/ToolTestDemoCreateReqVO.java index 5b267fe35..b1866f780 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/vo/ToolTestDemoCreateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/vo/ToolTestDemoCreateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.tool.controller.test.vo; +package cn.iocoder.yudao.adminserver.modules.tool.controller.test.vo; import io.swagger.annotations.ApiModel; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/vo/ToolTestDemoExcelVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/vo/ToolTestDemoExcelVO.java similarity index 57% rename from src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/vo/ToolTestDemoExcelVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/vo/ToolTestDemoExcelVO.java index 5bd575299..bfb917020 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/vo/ToolTestDemoExcelVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/vo/ToolTestDemoExcelVO.java @@ -1,14 +1,14 @@ -package cn.iocoder.dashboard.modules.tool.controller.test.vo; +package cn.iocoder.yudao.adminserver.modules.tool.controller.test.vo; -import cn.iocoder.dashboard.framework.excel.core.annotations.DictFormat; -import cn.iocoder.dashboard.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.adminserver.modules.infra.enums.InfDictTypeConstants; +import cn.iocoder.yudao.adminserver.modules.system.enums.SysDictTypeConstants; import com.alibaba.excel.annotation.ExcelProperty; import lombok.Data; import java.util.Date; -import static cn.iocoder.dashboard.modules.system.enums.dict.SysDictTypeEnum.*; - /** * 测试示例 Excel VO * @@ -24,15 +24,15 @@ public class ToolTestDemoExcelVO { private String name; @ExcelProperty(value = "状态", converter = DictConvert.class) - @DictFormat(SYS_COMMON_STATUS) + @DictFormat(SysDictTypeConstants.COMMON_STATUS) private Integer status; @ExcelProperty(value = "类型", converter = DictConvert.class) - @DictFormat(SYS_OPERATE_TYPE) + @DictFormat(SysDictTypeConstants.OPERATE_TYPE) private Integer type; @ExcelProperty(value = "分类", converter = DictConvert.class) - @DictFormat(INF_REDIS_TIMEOUT_TYPE) + @DictFormat(InfDictTypeConstants.REDIS_TIMEOUT_TYPE) private Integer category; @ExcelProperty("备注") diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/vo/ToolTestDemoExportReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/vo/ToolTestDemoExportReqVO.java similarity index 86% rename from src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/vo/ToolTestDemoExportReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/vo/ToolTestDemoExportReqVO.java index 37933cf3f..84bce9e94 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/vo/ToolTestDemoExportReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/vo/ToolTestDemoExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.tool.controller.test.vo; +package cn.iocoder.yudao.adminserver.modules.tool.controller.test.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -7,7 +7,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel(value = "字典类型 Excel 导出 Request VO", description = "参数和 ToolTestDemoPageReqVO 是一致的") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/vo/ToolTestDemoPageReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/vo/ToolTestDemoPageReqVO.java similarity index 83% rename from src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/vo/ToolTestDemoPageReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/vo/ToolTestDemoPageReqVO.java index 5a0d5a408..05fa1573e 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/vo/ToolTestDemoPageReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/vo/ToolTestDemoPageReqVO.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.tool.controller.test.vo; +package cn.iocoder.yudao.adminserver.modules.tool.controller.test.vo; -import cn.iocoder.dashboard.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -10,7 +10,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel("字典类型分页 Request VO") @Data diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/vo/ToolTestDemoRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/vo/ToolTestDemoRespVO.java similarity index 88% rename from src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/vo/ToolTestDemoRespVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/vo/ToolTestDemoRespVO.java index cc22897fd..e679fd4b0 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/vo/ToolTestDemoRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/vo/ToolTestDemoRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.tool.controller.test.vo; +package cn.iocoder.yudao.adminserver.modules.tool.controller.test.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/vo/ToolTestDemoUpdateReqVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/vo/ToolTestDemoUpdateReqVO.java similarity index 88% rename from src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/vo/ToolTestDemoUpdateReqVO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/vo/ToolTestDemoUpdateReqVO.java index d4bb3830d..ef05d44c6 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/controller/test/vo/ToolTestDemoUpdateReqVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/controller/test/vo/ToolTestDemoUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.tool.controller.test.vo; +package cn.iocoder.yudao.adminserver.modules.tool.controller.test.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/convert/codegen/ToolCodegenConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/convert/codegen/ToolCodegenConvert.java similarity index 64% rename from src/main/java/cn/iocoder/dashboard/modules/tool/convert/codegen/ToolCodegenConvert.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/convert/codegen/ToolCodegenConvert.java index b3d154232..65bf46100 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/convert/codegen/ToolCodegenConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/convert/codegen/ToolCodegenConvert.java @@ -1,16 +1,16 @@ -package cn.iocoder.dashboard.modules.tool.convert.codegen; +package cn.iocoder.yudao.adminserver.modules.tool.convert.codegen; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.tool.controller.codegen.vo.ToolCodegenDetailRespVO; -import cn.iocoder.dashboard.modules.tool.controller.codegen.vo.ToolCodegenPreviewRespVO; -import cn.iocoder.dashboard.modules.tool.controller.codegen.vo.ToolCodegenUpdateReqVO; -import cn.iocoder.dashboard.modules.tool.controller.codegen.vo.column.ToolCodegenColumnRespVO; -import cn.iocoder.dashboard.modules.tool.controller.codegen.vo.table.ToolCodegenTableRespVO; -import cn.iocoder.dashboard.modules.tool.controller.codegen.vo.table.ToolSchemaTableRespVO; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolCodegenColumnDO; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolCodegenTableDO; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolSchemaColumnDO; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolSchemaTableDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.ToolCodegenDetailRespVO; +import cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.ToolCodegenPreviewRespVO; +import cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.ToolCodegenUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.column.ToolCodegenColumnRespVO; +import cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.table.ToolCodegenTableRespVO; +import cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.table.ToolSchemaTableRespVO; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolCodegenColumnDO; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolCodegenTableDO; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolSchemaColumnDO; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolSchemaTableDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/convert/test/ToolTestDemoConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/convert/test/ToolTestDemoConvert.java similarity index 50% rename from src/main/java/cn/iocoder/dashboard/modules/tool/convert/test/ToolTestDemoConvert.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/convert/test/ToolTestDemoConvert.java index 7e2b28a05..8e88c59f4 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/convert/test/ToolTestDemoConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/convert/test/ToolTestDemoConvert.java @@ -1,21 +1,19 @@ -package cn.iocoder.dashboard.modules.tool.convert.test; +package cn.iocoder.yudao.adminserver.modules.tool.convert.test; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.tool.controller.test.vo.ToolTestDemoCreateReqVO; -import cn.iocoder.dashboard.modules.tool.controller.test.vo.ToolTestDemoExcelVO; -import cn.iocoder.dashboard.modules.tool.controller.test.vo.ToolTestDemoRespVO; -import cn.iocoder.dashboard.modules.tool.controller.test.vo.ToolTestDemoUpdateReqVO; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.test.ToolTestDemoDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; - -import java.util.List; +import cn.iocoder.yudao.adminserver.modules.tool.controller.test.vo.*; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.test.ToolTestDemoDO; /** -* 字典类型 Convert -* -* @author 芋艿 -*/ + * 字典类型 Convert + * + * @author 芋艿 + */ @Mapper public interface ToolTestDemoConvert { diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/dataobject/codegen/ToolCodegenColumnDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/dataobject/codegen/ToolCodegenColumnDO.java similarity index 85% rename from src/main/java/cn/iocoder/dashboard/modules/tool/dal/dataobject/codegen/ToolCodegenColumnDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/dataobject/codegen/ToolCodegenColumnDO.java index f4482e3c0..7d0d950c0 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/dataobject/codegen/ToolCodegenColumnDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/dataobject/codegen/ToolCodegenColumnDO.java @@ -1,12 +1,11 @@ -package cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen; +package cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dict.SysDictTypeDO; -import cn.iocoder.dashboard.modules.tool.enums.codegen.ToolCodegenColumnHtmlTypeEnum; -import cn.iocoder.dashboard.modules.tool.enums.codegen.ToolCodegenColumnListConditionEnum; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dict.SysDictTypeDO; +import cn.iocoder.yudao.adminserver.modules.tool.enums.codegen.ToolCodegenColumnHtmlTypeEnum; +import cn.iocoder.yudao.adminserver.modules.tool.enums.codegen.ToolCodegenColumnListConditionEnum; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/dataobject/codegen/ToolCodegenTableDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/dataobject/codegen/ToolCodegenTableDO.java similarity index 84% rename from src/main/java/cn/iocoder/dashboard/modules/tool/dal/dataobject/codegen/ToolCodegenTableDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/dataobject/codegen/ToolCodegenTableDO.java index 2ce0fac22..4ed11b2be 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/dataobject/codegen/ToolCodegenTableDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/dataobject/codegen/ToolCodegenTableDO.java @@ -1,10 +1,9 @@ -package cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen; +package cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysMenuDO; -import cn.iocoder.dashboard.modules.tool.enums.codegen.ToolCodegenTemplateTypeEnum; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysMenuDO; +import cn.iocoder.yudao.adminserver.modules.tool.enums.codegen.ToolCodegenTemplateTypeEnum; import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/dataobject/codegen/ToolSchemaColumnDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/dataobject/codegen/ToolSchemaColumnDO.java similarity index 93% rename from src/main/java/cn/iocoder/dashboard/modules/tool/dal/dataobject/codegen/ToolSchemaColumnDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/dataobject/codegen/ToolSchemaColumnDO.java index d20a9c86b..e78e16f53 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/dataobject/codegen/ToolSchemaColumnDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/dataobject/codegen/ToolSchemaColumnDO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen; +package cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/dataobject/codegen/ToolSchemaTableDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/dataobject/codegen/ToolSchemaTableDO.java similarity index 88% rename from src/main/java/cn/iocoder/dashboard/modules/tool/dal/dataobject/codegen/ToolSchemaTableDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/dataobject/codegen/ToolSchemaTableDO.java index e16d91396..e3e70352d 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/dataobject/codegen/ToolSchemaTableDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/dataobject/codegen/ToolSchemaTableDO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen; +package cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Builder; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/dataobject/test/ToolTestDemoDO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/dataobject/test/ToolTestDemoDO.java similarity index 50% rename from src/main/java/cn/iocoder/dashboard/modules/tool/dal/dataobject/test/ToolTestDemoDO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/dataobject/test/ToolTestDemoDO.java index 9d598ea11..0af46d798 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/dataobject/test/ToolTestDemoDO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/dataobject/test/ToolTestDemoDO.java @@ -1,15 +1,15 @@ -package cn.iocoder.dashboard.modules.tool.dal.dataobject.test; +package cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.test; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; +import java.util.*; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; /** -* 字典类型 DO -* -* @author 芋艿 -*/ + * 字典类型 DO + * + * @author 芋艿 + */ @TableName("tool_test_demo") @Data @EqualsAndHashCode(callSuper = true) @@ -30,20 +30,14 @@ public class ToolTestDemoDO extends BaseDO { private String name; /** * 状态 - * - * 枚举 {@link cn.iocoder.dashboard.common.enums.CommonStatusEnum} */ private Integer status; /** * 类型 - * - * 枚举 {@link cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum} */ private Integer type; /** * 分类 - * - * 枚举 {@link cn.iocoder.dashboard.framework.redis.core.RedisKeyDefine.TimeoutTypeEnum} */ private Integer category; /** diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolCodegenColumnMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/mysql/codegen/ToolCodegenColumnMapper.java similarity index 72% rename from src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolCodegenColumnMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/mysql/codegen/ToolCodegenColumnMapper.java index e7fa43317..2fae42691 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolCodegenColumnMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/mysql/codegen/ToolCodegenColumnMapper.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.tool.dal.mysql.codegen; +package cn.iocoder.yudao.adminserver.modules.tool.dal.mysql.codegen; -import cn.iocoder.dashboard.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolCodegenColumnDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolCodegenColumnDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolCodegenTableMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/mysql/codegen/ToolCodegenTableMapper.java similarity index 64% rename from src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolCodegenTableMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/mysql/codegen/ToolCodegenTableMapper.java index 52ce76f2b..31ce16f7b 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolCodegenTableMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/mysql/codegen/ToolCodegenTableMapper.java @@ -1,10 +1,10 @@ -package cn.iocoder.dashboard.modules.tool.dal.mysql.codegen; +package cn.iocoder.yudao.adminserver.modules.tool.dal.mysql.codegen; -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.modules.tool.controller.codegen.vo.table.ToolCodegenTablePageReqVO; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolCodegenTableDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.table.ToolCodegenTablePageReqVO; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolCodegenTableDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolSchemaColumnMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/mysql/codegen/ToolSchemaColumnMapper.java similarity index 69% rename from src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolSchemaColumnMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/mysql/codegen/ToolSchemaColumnMapper.java index 14a0302da..4778da065 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolSchemaColumnMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/mysql/codegen/ToolSchemaColumnMapper.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.tool.dal.mysql.codegen; +package cn.iocoder.yudao.adminserver.modules.tool.dal.mysql.codegen; -import cn.iocoder.dashboard.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolSchemaColumnDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolSchemaColumnDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolSchemaTableMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/mysql/codegen/ToolSchemaTableMapper.java similarity index 74% rename from src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolSchemaTableMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/mysql/codegen/ToolSchemaTableMapper.java index fcc625c0d..7430ef69e 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolSchemaTableMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/mysql/codegen/ToolSchemaTableMapper.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.tool.dal.mysql.codegen; +package cn.iocoder.yudao.adminserver.modules.tool.dal.mysql.codegen; -import cn.iocoder.dashboard.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.dashboard.framework.mybatis.core.query.QueryWrapperX; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolSchemaTableDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolSchemaTableDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/test/ToolTestDemoMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/mysql/test/ToolTestDemoMapper.java similarity index 70% rename from src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/test/ToolTestDemoMapper.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/mysql/test/ToolTestDemoMapper.java index ff0b5670e..4bee17eb1 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/test/ToolTestDemoMapper.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/dal/mysql/test/ToolTestDemoMapper.java @@ -1,14 +1,13 @@ -package cn.iocoder.dashboard.modules.tool.dal.mysql.test; +package cn.iocoder.yudao.adminserver.modules.tool.dal.mysql.test; -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.modules.tool.controller.test.vo.ToolTestDemoExportReqVO; -import cn.iocoder.dashboard.modules.tool.controller.test.vo.ToolTestDemoPageReqVO; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.test.ToolTestDemoDO; +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.test.ToolTestDemoDO; import org.apache.ibatis.annotations.Mapper; - -import java.util.List; +import cn.iocoder.yudao.adminserver.modules.tool.controller.test.vo.*; /** * 字典类型 Mapper @@ -26,7 +25,7 @@ public interface ToolTestDemoMapper extends BaseMapperX { .eqIfPresent("category", reqVO.getCategory()) .eqIfPresent("remark", reqVO.getRemark()) .betweenIfPresent("create_time", reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) - ); + .orderByDesc("id")); } default List selectList(ToolTestDemoExportReqVO reqVO) { @@ -37,7 +36,7 @@ public interface ToolTestDemoMapper extends BaseMapperX { .eqIfPresent("category", reqVO.getCategory()) .eqIfPresent("remark", reqVO.getRemark()) .betweenIfPresent("create_time", reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) - ); + .orderByDesc("id")); } } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/enums/ToolDictTypeConstants.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/enums/ToolDictTypeConstants.java new file mode 100644 index 000000000..1bf2b7a1d --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/enums/ToolDictTypeConstants.java @@ -0,0 +1,12 @@ +package cn.iocoder.yudao.adminserver.modules.tool.enums; + +/** + * Tool 字典类型的枚举类 + * + * @author 芋道源码 + */ +public interface ToolDictTypeConstants { + + String TEST_DEMO_TYPE = "tool_test_demo_type"; + +} diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/enums/ToolErrorCodeConstants.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/enums/ToolErrorCodeConstants.java similarity index 90% rename from src/main/java/cn/iocoder/dashboard/modules/tool/enums/ToolErrorCodeConstants.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/enums/ToolErrorCodeConstants.java index b614b0ace..cdf341d74 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/enums/ToolErrorCodeConstants.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/enums/ToolErrorCodeConstants.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.tool.enums; +package cn.iocoder.yudao.adminserver.modules.tool.enums; -import cn.iocoder.dashboard.common.exception.ErrorCode; +import cn.iocoder.yudao.framework.common.exception.ErrorCode; /** * Tool 错误码枚举类 diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/enums/codegen/ToolCodegenColumnHtmlTypeEnum.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/enums/codegen/ToolCodegenColumnHtmlTypeEnum.java similarity index 90% rename from src/main/java/cn/iocoder/dashboard/modules/tool/enums/codegen/ToolCodegenColumnHtmlTypeEnum.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/enums/codegen/ToolCodegenColumnHtmlTypeEnum.java index 8eec060df..22dbdd2b7 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/enums/codegen/ToolCodegenColumnHtmlTypeEnum.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/enums/codegen/ToolCodegenColumnHtmlTypeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.tool.enums.codegen; +package cn.iocoder.yudao.adminserver.modules.tool.enums.codegen; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/enums/codegen/ToolCodegenColumnListConditionEnum.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/enums/codegen/ToolCodegenColumnListConditionEnum.java similarity index 85% rename from src/main/java/cn/iocoder/dashboard/modules/tool/enums/codegen/ToolCodegenColumnListConditionEnum.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/enums/codegen/ToolCodegenColumnListConditionEnum.java index bfa76a84b..0783c9869 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/enums/codegen/ToolCodegenColumnListConditionEnum.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/enums/codegen/ToolCodegenColumnListConditionEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.tool.enums.codegen; +package cn.iocoder.yudao.adminserver.modules.tool.enums.codegen; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/enums/codegen/ToolCodegenImportTypeEnum.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/enums/codegen/ToolCodegenImportTypeEnum.java similarity index 85% rename from src/main/java/cn/iocoder/dashboard/modules/tool/enums/codegen/ToolCodegenImportTypeEnum.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/enums/codegen/ToolCodegenImportTypeEnum.java index 0e598c03d..746cb7181 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/enums/codegen/ToolCodegenImportTypeEnum.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/enums/codegen/ToolCodegenImportTypeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.tool.enums.codegen; +package cn.iocoder.yudao.adminserver.modules.tool.enums.codegen; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/enums/codegen/ToolCodegenTemplateTypeEnum.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/enums/codegen/ToolCodegenTemplateTypeEnum.java similarity index 84% rename from src/main/java/cn/iocoder/dashboard/modules/tool/enums/codegen/ToolCodegenTemplateTypeEnum.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/enums/codegen/ToolCodegenTemplateTypeEnum.java index d24cd2fea..b192c3173 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/enums/codegen/ToolCodegenTemplateTypeEnum.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/enums/codegen/ToolCodegenTemplateTypeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.modules.tool.enums.codegen; +package cn.iocoder.yudao.adminserver.modules.tool.enums.codegen; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/cn/iocoder/dashboard/framework/errorcode/config/ErrorCodeConfiguration.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/config/ErrorCodeConfiguration.java similarity index 69% rename from src/main/java/cn/iocoder/dashboard/framework/errorcode/config/ErrorCodeConfiguration.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/config/ErrorCodeConfiguration.java index 21e967e18..9a2789ec3 100644 --- a/src/main/java/cn/iocoder/dashboard/framework/errorcode/config/ErrorCodeConfiguration.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/config/ErrorCodeConfiguration.java @@ -1,10 +1,10 @@ -package cn.iocoder.dashboard.framework.errorcode.config; +package cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.config; -import cn.iocoder.dashboard.framework.errorcode.core.generator.ErrorCodeAutoGenerator; -import cn.iocoder.dashboard.framework.errorcode.core.loader.ErrorCodeLoader; -import cn.iocoder.dashboard.framework.errorcode.core.service.ErrorCodeFrameworkService; -import cn.iocoder.dashboard.framework.errorcode.core.loader.ErrorCodeLoaderImpl; -import cn.iocoder.dashboard.framework.errorcode.core.generator.ErrorCodeAutoGeneratorImpl; +import cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.core.generator.ErrorCodeAutoGenerator; +import cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.core.loader.ErrorCodeLoader; +import cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.core.service.ErrorCodeFrameworkService; +import cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.core.loader.ErrorCodeLoaderImpl; +import cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.core.generator.ErrorCodeAutoGeneratorImpl; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; diff --git a/src/main/java/cn/iocoder/dashboard/framework/errorcode/config/ErrorCodeProperties.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/config/ErrorCodeProperties.java similarity index 87% rename from src/main/java/cn/iocoder/dashboard/framework/errorcode/config/ErrorCodeProperties.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/config/ErrorCodeProperties.java index 2f629a297..f652a6a89 100644 --- a/src/main/java/cn/iocoder/dashboard/framework/errorcode/config/ErrorCodeProperties.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/config/ErrorCodeProperties.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.errorcode.config; +package cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.config; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; diff --git a/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/dto/ErrorCodeAutoGenerateReqDTO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/core/dto/ErrorCodeAutoGenerateReqDTO.java similarity index 89% rename from src/main/java/cn/iocoder/dashboard/framework/errorcode/core/dto/ErrorCodeAutoGenerateReqDTO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/core/dto/ErrorCodeAutoGenerateReqDTO.java index c89744dd2..098f0438c 100644 --- a/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/dto/ErrorCodeAutoGenerateReqDTO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/core/dto/ErrorCodeAutoGenerateReqDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.errorcode.core.dto; +package cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.core.dto; import lombok.Data; import lombok.experimental.Accessors; diff --git a/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/dto/ErrorCodeRespDTO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/core/dto/ErrorCodeRespDTO.java similarity index 81% rename from src/main/java/cn/iocoder/dashboard/framework/errorcode/core/dto/ErrorCodeRespDTO.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/core/dto/ErrorCodeRespDTO.java index d54064bf0..7e2bb2a39 100644 --- a/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/dto/ErrorCodeRespDTO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/core/dto/ErrorCodeRespDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.errorcode.core.dto; +package cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.core.dto; import lombok.Data; diff --git a/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/generator/ErrorCodeAutoGenerator.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/core/generator/ErrorCodeAutoGenerator.java similarity index 68% rename from src/main/java/cn/iocoder/dashboard/framework/errorcode/core/generator/ErrorCodeAutoGenerator.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/core/generator/ErrorCodeAutoGenerator.java index 530ff9c93..60689af96 100644 --- a/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/generator/ErrorCodeAutoGenerator.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/core/generator/ErrorCodeAutoGenerator.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.framework.errorcode.core.generator; +package cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.core.generator; /** * 错误码的自动生成器 diff --git a/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/generator/ErrorCodeAutoGeneratorImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/core/generator/ErrorCodeAutoGeneratorImpl.java similarity index 90% rename from src/main/java/cn/iocoder/dashboard/framework/errorcode/core/generator/ErrorCodeAutoGeneratorImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/core/generator/ErrorCodeAutoGeneratorImpl.java index 2d54fabdb..bedbcdc19 100644 --- a/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/generator/ErrorCodeAutoGeneratorImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/core/generator/ErrorCodeAutoGeneratorImpl.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.framework.errorcode.core.generator; +package cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.core.generator; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ClassUtil; import cn.hutool.core.util.ReflectUtil; -import cn.iocoder.dashboard.common.exception.ErrorCode; -import cn.iocoder.dashboard.framework.errorcode.core.dto.ErrorCodeAutoGenerateReqDTO; -import cn.iocoder.dashboard.framework.errorcode.core.service.ErrorCodeFrameworkService; +import cn.iocoder.yudao.framework.common.exception.ErrorCode; +import cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.core.dto.ErrorCodeAutoGenerateReqDTO; +import cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.core.service.ErrorCodeFrameworkService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.boot.context.event.ApplicationReadyEvent; diff --git a/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/loader/ErrorCodeLoader.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/core/loader/ErrorCodeLoader.java similarity index 54% rename from src/main/java/cn/iocoder/dashboard/framework/errorcode/core/loader/ErrorCodeLoader.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/core/loader/ErrorCodeLoader.java index 805e0802f..d35767fd3 100644 --- a/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/loader/ErrorCodeLoader.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/core/loader/ErrorCodeLoader.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.framework.errorcode.core.loader; +package cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.core.loader; -import cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil; +import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; /** * 错误码加载器 * - * 注意,错误码最终加载到 {@link cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil} 的 MESSAGES 变量中! + * 注意,错误码最终加载到 {@link ServiceExceptionUtil} 的 MESSAGES 变量中! * * @author dlyan */ diff --git a/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/loader/ErrorCodeLoaderImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/core/loader/ErrorCodeLoaderImpl.java similarity index 86% rename from src/main/java/cn/iocoder/dashboard/framework/errorcode/core/loader/ErrorCodeLoaderImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/core/loader/ErrorCodeLoaderImpl.java index 2f1c9b9d8..234d30dcc 100644 --- a/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/loader/ErrorCodeLoaderImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/core/loader/ErrorCodeLoaderImpl.java @@ -1,9 +1,9 @@ -package cn.iocoder.dashboard.framework.errorcode.core.loader; +package cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.core.loader; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.dashboard.framework.errorcode.core.dto.ErrorCodeRespDTO; -import cn.iocoder.dashboard.framework.errorcode.core.service.ErrorCodeFrameworkService; -import cn.iocoder.dashboard.util.date.DateUtils; +import cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.core.dto.ErrorCodeRespDTO; +import cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.core.service.ErrorCodeFrameworkService; +import cn.iocoder.yudao.framework.common.util.date.DateUtils; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.boot.context.event.ApplicationReadyEvent; diff --git a/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/service/ErrorCodeFrameworkService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/core/service/ErrorCodeFrameworkService.java similarity index 71% rename from src/main/java/cn/iocoder/dashboard/framework/errorcode/core/service/ErrorCodeFrameworkService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/core/service/ErrorCodeFrameworkService.java index 53f3f2c42..e3f5e91cc 100644 --- a/src/main/java/cn/iocoder/dashboard/framework/errorcode/core/service/ErrorCodeFrameworkService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/core/service/ErrorCodeFrameworkService.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.framework.errorcode.core.service; +package cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.core.service; -import cn.iocoder.dashboard.framework.errorcode.core.dto.ErrorCodeAutoGenerateReqDTO; -import cn.iocoder.dashboard.framework.errorcode.core.dto.ErrorCodeRespDTO; +import cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.core.dto.ErrorCodeAutoGenerateReqDTO; +import cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.core.dto.ErrorCodeRespDTO; import javax.validation.Valid; import java.util.Date; diff --git a/src/main/java/cn/iocoder/dashboard/framework/errorcode/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/package-info.java similarity index 59% rename from src/main/java/cn/iocoder/dashboard/framework/errorcode/package-info.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/package-info.java index 18ec4ebd1..343ccaeb3 100644 --- a/src/main/java/cn/iocoder/dashboard/framework/errorcode/package-info.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/errorcode/package-info.java @@ -3,4 +3,4 @@ * * 将错误码缓存在内存中,同时通过定时器每 n 分钟更新 */ -package cn.iocoder.dashboard.framework.errorcode; +package cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/package-info.java new file mode 100644 index 000000000..f9a66d364 --- /dev/null +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/framework/package-info.java @@ -0,0 +1,6 @@ +/** + * 属于 tool 模块的 framework 封装 + * + * @author 芋道源码 + */ +package cn.iocoder.yudao.adminserver.modules.tool.framework; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/package-info.java similarity index 74% rename from src/main/java/cn/iocoder/dashboard/modules/tool/package-info.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/package-info.java index d161f55db..f1e361d13 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/package-info.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/package-info.java @@ -4,4 +4,4 @@ * * 缩写:tool */ -package cn.iocoder.dashboard.modules.tool; +package cn.iocoder.yudao.adminserver.modules.tool; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/ToolCodegenService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/service/codegen/ToolCodegenService.java similarity index 81% rename from src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/ToolCodegenService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/service/codegen/ToolCodegenService.java index a398bb43e..fbe61c4b1 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/ToolCodegenService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/service/codegen/ToolCodegenService.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.tool.service.codegen; +package cn.iocoder.yudao.adminserver.modules.tool.service.codegen; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.tool.controller.codegen.vo.ToolCodegenUpdateReqVO; -import cn.iocoder.dashboard.modules.tool.controller.codegen.vo.table.ToolCodegenTablePageReqVO; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolCodegenColumnDO; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolCodegenTableDO; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolSchemaTableDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.ToolCodegenUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.table.ToolCodegenTablePageReqVO; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolCodegenColumnDO; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolCodegenTableDO; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolSchemaTableDO; import java.util.List; import java.util.Map; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenBuilder.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/service/codegen/impl/ToolCodegenBuilder.java similarity index 92% rename from src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenBuilder.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/service/codegen/impl/ToolCodegenBuilder.java index 8858cfb04..87e6ab6bd 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenBuilder.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/service/codegen/impl/ToolCodegenBuilder.java @@ -1,16 +1,16 @@ -package cn.iocoder.dashboard.modules.tool.service.codegen.impl; +package cn.iocoder.yudao.adminserver.modules.tool.service.codegen.impl; import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.StrUtil; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.modules.tool.convert.codegen.ToolCodegenConvert; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolCodegenColumnDO; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolCodegenTableDO; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolSchemaColumnDO; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolSchemaTableDO; -import cn.iocoder.dashboard.modules.tool.enums.codegen.ToolCodegenColumnHtmlTypeEnum; -import cn.iocoder.dashboard.modules.tool.enums.codegen.ToolCodegenColumnListConditionEnum; -import cn.iocoder.dashboard.modules.tool.enums.codegen.ToolCodegenTemplateTypeEnum; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.adminserver.modules.tool.convert.codegen.ToolCodegenConvert; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolCodegenColumnDO; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolCodegenTableDO; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolSchemaColumnDO; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolSchemaTableDO; +import cn.iocoder.yudao.adminserver.modules.tool.enums.codegen.ToolCodegenColumnHtmlTypeEnum; +import cn.iocoder.yudao.adminserver.modules.tool.enums.codegen.ToolCodegenColumnListConditionEnum; +import cn.iocoder.yudao.adminserver.modules.tool.enums.codegen.ToolCodegenTemplateTypeEnum; import com.google.common.collect.Sets; import org.springframework.stereotype.Component; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenEngine.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/service/codegen/impl/ToolCodegenEngine.java similarity index 87% rename from src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenEngine.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/service/codegen/impl/ToolCodegenEngine.java index 7ccf26001..5a75b9914 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenEngine.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/service/codegen/impl/ToolCodegenEngine.java @@ -1,28 +1,27 @@ -package cn.iocoder.dashboard.modules.tool.service.codegen.impl; +package cn.iocoder.yudao.adminserver.modules.tool.service.codegen.impl; import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.extra.template.TemplateConfig; import cn.hutool.extra.template.TemplateEngine; import cn.hutool.extra.template.engine.velocity.VelocityEngine; -import cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.common.pojo.PageParam; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.codegen.config.CodegenProperties; -import cn.iocoder.dashboard.framework.excel.core.annotations.DictFormat; -import cn.iocoder.dashboard.framework.excel.core.convert.DictConvert; -import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils; -import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog; -import cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.dashboard.framework.mybatis.core.query.QueryWrapperX; -import cn.iocoder.dashboard.modules.system.enums.dict.SysDictTypeEnum; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolCodegenColumnDO; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolCodegenTableDO; -import cn.iocoder.dashboard.util.collection.CollectionUtils; -import cn.iocoder.dashboard.util.date.DateUtils; +import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.framework.codegen.config.CodegenProperties; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolCodegenColumnDO; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolCodegenTableDO; +import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; +import cn.iocoder.yudao.framework.common.util.date.DateUtils; import com.google.common.collect.Maps; import org.springframework.stereotype.Component; @@ -126,7 +125,6 @@ public class ToolCodegenEngine { // VO 类,独有字段 globalBindingMap.put("PageParamClassName", PageParam.class.getName()); globalBindingMap.put("DictFormatClassName", DictFormat.class.getName()); - globalBindingMap.put("SysDictTypeEnumClassName", SysDictTypeEnum.class.getName()); // DO 类,独有字段 globalBindingMap.put("baseDOFields", ToolCodegenBuilder.BASE_DO_FIELDS); globalBindingMap.put("BaseDOClassName", BaseDO.class.getName()); diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenSQLParser.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/service/codegen/impl/ToolCodegenSQLParser.java similarity index 94% rename from src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenSQLParser.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/service/codegen/impl/ToolCodegenSQLParser.java index d653ab639..7a79f05d2 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenSQLParser.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/service/codegen/impl/ToolCodegenSQLParser.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard.modules.tool.service.codegen.impl; +package cn.iocoder.yudao.adminserver.modules.tool.service.codegen.impl; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolSchemaColumnDO; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolSchemaTableDO; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolSchemaColumnDO; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolSchemaTableDO; import com.alibaba.druid.DbType; import com.alibaba.druid.sql.ast.expr.SQLCharExpr; import com.alibaba.druid.sql.ast.statement.SQLColumnDefinition; diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/service/codegen/impl/ToolCodegenServiceImpl.java similarity index 86% rename from src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/service/codegen/impl/ToolCodegenServiceImpl.java index 0b35e0579..f897b666a 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/service/codegen/impl/ToolCodegenServiceImpl.java @@ -1,22 +1,22 @@ -package cn.iocoder.dashboard.modules.tool.service.codegen.impl; +package cn.iocoder.yudao.adminserver.modules.tool.service.codegen.impl; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.codegen.config.CodegenProperties; -import cn.iocoder.dashboard.modules.tool.controller.codegen.vo.ToolCodegenUpdateReqVO; -import cn.iocoder.dashboard.modules.tool.controller.codegen.vo.table.ToolCodegenTablePageReqVO; -import cn.iocoder.dashboard.modules.tool.convert.codegen.ToolCodegenConvert; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolCodegenColumnDO; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolCodegenTableDO; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolSchemaColumnDO; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolSchemaTableDO; -import cn.iocoder.dashboard.modules.tool.dal.mysql.codegen.ToolCodegenColumnMapper; -import cn.iocoder.dashboard.modules.tool.dal.mysql.codegen.ToolCodegenTableMapper; -import cn.iocoder.dashboard.modules.tool.dal.mysql.codegen.ToolSchemaColumnMapper; -import cn.iocoder.dashboard.modules.tool.dal.mysql.codegen.ToolSchemaTableMapper; -import cn.iocoder.dashboard.modules.tool.enums.codegen.ToolCodegenImportTypeEnum; -import cn.iocoder.dashboard.modules.tool.service.codegen.ToolCodegenService; -import cn.iocoder.dashboard.util.collection.CollectionUtils; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.framework.codegen.config.CodegenProperties; +import cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.ToolCodegenUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.tool.controller.codegen.vo.table.ToolCodegenTablePageReqVO; +import cn.iocoder.yudao.adminserver.modules.tool.convert.codegen.ToolCodegenConvert; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolCodegenColumnDO; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolCodegenTableDO; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolSchemaColumnDO; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolSchemaTableDO; +import cn.iocoder.yudao.adminserver.modules.tool.dal.mysql.codegen.ToolCodegenColumnMapper; +import cn.iocoder.yudao.adminserver.modules.tool.dal.mysql.codegen.ToolCodegenTableMapper; +import cn.iocoder.yudao.adminserver.modules.tool.dal.mysql.codegen.ToolSchemaColumnMapper; +import cn.iocoder.yudao.adminserver.modules.tool.dal.mysql.codegen.ToolSchemaTableMapper; +import cn.iocoder.yudao.adminserver.modules.tool.enums.codegen.ToolCodegenImportTypeEnum; +import cn.iocoder.yudao.adminserver.modules.tool.service.codegen.ToolCodegenService; +import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import org.apache.commons.collections4.KeyValue; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -28,8 +28,8 @@ import java.util.Map; import java.util.Set; import java.util.stream.Collectors; -import static cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.dashboard.modules.tool.enums.ToolErrorCodeConstants.*; +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.adminserver.modules.tool.enums.ToolErrorCodeConstants.*; /** * 代码生成 Service 实现类 diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/service/test/ToolTestDemoService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/service/test/ToolTestDemoService.java similarity index 66% rename from src/main/java/cn/iocoder/dashboard/modules/tool/service/test/ToolTestDemoService.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/service/test/ToolTestDemoService.java index 377eb0de4..7fff9185d 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/service/test/ToolTestDemoService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/service/test/ToolTestDemoService.java @@ -1,15 +1,10 @@ -package cn.iocoder.dashboard.modules.tool.service.test; +package cn.iocoder.yudao.adminserver.modules.tool.service.test; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.tool.controller.test.vo.ToolTestDemoCreateReqVO; -import cn.iocoder.dashboard.modules.tool.controller.test.vo.ToolTestDemoExportReqVO; -import cn.iocoder.dashboard.modules.tool.controller.test.vo.ToolTestDemoPageReqVO; -import cn.iocoder.dashboard.modules.tool.controller.test.vo.ToolTestDemoUpdateReqVO; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.test.ToolTestDemoDO; - -import javax.validation.Valid; -import java.util.Collection; -import java.util.List; +import java.util.*; +import javax.validation.*; +import cn.iocoder.yudao.adminserver.modules.tool.controller.test.vo.*; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.test.ToolTestDemoDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; /** * 字典类型 Service 接口 @@ -68,7 +63,7 @@ public interface ToolTestDemoService { * 获得字典类型列表, 用于 Excel 导出 * * @param exportReqVO 查询条件 - * @return 字典类型分页 + * @return 字典类型列表 */ List getTestDemoList(ToolTestDemoExportReqVO exportReqVO); diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/service/test/impl/ToolTestDemoServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/service/test/impl/ToolTestDemoServiceImpl.java similarity index 59% rename from src/main/java/cn/iocoder/dashboard/modules/tool/service/test/impl/ToolTestDemoServiceImpl.java rename to yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/service/test/impl/ToolTestDemoServiceImpl.java index 5483bab0e..ad8fd1e81 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/tool/service/test/impl/ToolTestDemoServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/tool/service/test/impl/ToolTestDemoServiceImpl.java @@ -1,23 +1,20 @@ -package cn.iocoder.dashboard.modules.tool.service.test.impl; +package cn.iocoder.yudao.adminserver.modules.tool.service.test.impl; -import cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.tool.controller.test.vo.ToolTestDemoCreateReqVO; -import cn.iocoder.dashboard.modules.tool.controller.test.vo.ToolTestDemoExportReqVO; -import cn.iocoder.dashboard.modules.tool.controller.test.vo.ToolTestDemoPageReqVO; -import cn.iocoder.dashboard.modules.tool.controller.test.vo.ToolTestDemoUpdateReqVO; -import cn.iocoder.dashboard.modules.tool.convert.test.ToolTestDemoConvert; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.test.ToolTestDemoDO; -import cn.iocoder.dashboard.modules.tool.dal.mysql.test.ToolTestDemoMapper; -import cn.iocoder.dashboard.modules.tool.service.test.ToolTestDemoService; import org.springframework.stereotype.Service; +import javax.annotation.Resource; import org.springframework.validation.annotation.Validated; -import javax.annotation.Resource; -import java.util.Collection; -import java.util.List; +import java.util.*; +import cn.iocoder.yudao.adminserver.modules.tool.controller.test.vo.*; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.test.ToolTestDemoDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; -import static cn.iocoder.dashboard.modules.tool.enums.ToolErrorCodeConstants.TEST_DEMO_NOT_EXISTS; +import cn.iocoder.yudao.adminserver.modules.tool.convert.test.ToolTestDemoConvert; +import cn.iocoder.yudao.adminserver.modules.tool.dal.mysql.test.ToolTestDemoMapper; +import cn.iocoder.yudao.adminserver.modules.tool.service.test.ToolTestDemoService; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.adminserver.modules.tool.enums.ToolErrorCodeConstants.*; /** * 字典类型 Service 实现类 @@ -53,13 +50,13 @@ public class ToolTestDemoServiceImpl implements ToolTestDemoService { public void deleteTestDemo(Long id) { // 校验存在 this.validateTestDemoExists(id); - // 更新 + // 删除 testDemoMapper.deleteById(id); } private void validateTestDemoExists(Long id) { if (testDemoMapper.selectById(id) == null) { - throw ServiceExceptionUtil.exception(TEST_DEMO_NOT_EXISTS); + throw exception(TEST_DEMO_NOT_EXISTS); } } @@ -75,12 +72,12 @@ public class ToolTestDemoServiceImpl implements ToolTestDemoService { @Override public PageResult getTestDemoPage(ToolTestDemoPageReqVO pageReqVO) { - return testDemoMapper.selectPage(pageReqVO); + return testDemoMapper.selectPage(pageReqVO); } @Override public List getTestDemoList(ToolTestDemoExportReqVO exportReqVO) { - return testDemoMapper.selectList(exportReqVO); + return testDemoMapper.selectList(exportReqVO); } } diff --git a/src/main/resources/application-dev.yaml b/yudao-admin-server/src/main/resources/application-dev.yaml similarity index 93% rename from src/main/resources/application-dev.yaml rename to yudao-admin-server/src/main/resources/application-dev.yaml index 526bf3d51..5e71e2322 100644 --- a/src/main/resources/application-dev.yaml +++ b/yudao-admin-server/src/main/resources/application-dev.yaml @@ -99,6 +99,7 @@ apollo: eagerLoad: enabled: true # 设置 Apollo 在日志初始化前生效,可以实现日志的动态级别配置 jdbc: # 自定义的 JDBC 配置项,用于数据库的地址 + dao: cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.config.InfConfigDAOImpl url: ${spring.datasource.dynamic.datasource.master.url} username: ${spring.datasource.dynamic.datasource.master.username} password: ${spring.datasource.dynamic.datasource.master.password} @@ -151,12 +152,6 @@ logging: # 芋道配置项,设置当前项目所有自定义的配置 yudao: - info: - version: 1.0.0 - base-package: cn.iocoder.dashboard - web: - api-prefix: /api - controller-package: ${yudao.info.base-package} security: token-header: Authorization token-secret: abcdefghijklmnopqrstuvwxyz @@ -164,20 +159,8 @@ yudao: session-timeout: 30m mock-enable: true mock-secret: test - swagger: - title: 管理后台 - description: 提供管理员管理的所有功能 - version: ${yudao.info.version} - base-package: ${yudao.info.base-package}.modules - captcha: - timeout: 5m - width: 160 - height: 60 file: base-path: http://127.0.0.1:${server.port}${yudao.web.api-prefix}/system/file/get/ - codegen: - base-package: ${yudao.info.base-package} - db-schemas: ${spring.datasource.dynamic.datasource.master.name} xss: enable: false exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系 diff --git a/src/main/resources/application-local.yaml b/yudao-admin-server/src/main/resources/application-local.yaml similarity index 93% rename from src/main/resources/application-local.yaml rename to yudao-admin-server/src/main/resources/application-local.yaml index 8761a78a8..da750e747 100644 --- a/src/main/resources/application-local.yaml +++ b/yudao-admin-server/src/main/resources/application-local.yaml @@ -99,6 +99,7 @@ apollo: eagerLoad: enabled: true # 设置 Apollo 在日志初始化前生效,可以实现日志的动态级别配置 jdbc: # 自定义的 JDBC 配置项,用于数据库的地址 + dao: cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.config.InfConfigDAOImpl url: ${spring.datasource.dynamic.datasource.master.url} username: ${spring.datasource.dynamic.datasource.master.username} password: ${spring.datasource.dynamic.datasource.master.password} @@ -151,12 +152,6 @@ logging: # 芋道配置项,设置当前项目所有自定义的配置 yudao: - info: - version: 1.0.0 - base-package: cn.iocoder.dashboard - web: - api-prefix: /api - controller-package: ${yudao.info.base-package} security: token-header: Authorization token-secret: abcdefghijklmnopqrstuvwxyz @@ -164,20 +159,8 @@ yudao: session-timeout: 30m mock-enable: true mock-secret: test - swagger: - title: 管理后台 - description: 提供管理员管理的所有功能 - version: ${yudao.info.version} - base-package: ${yudao.info.base-package}.modules - captcha: - timeout: 5m - width: 160 - height: 60 file: base-path: http://127.0.0.1:${server.port}${yudao.web.api-prefix}/system/file/get/ - codegen: - base-package: ${yudao.info.base-package} - db-schemas: ${spring.datasource.dynamic.datasource.master.name} xss: enable: false exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系 diff --git a/src/main/resources/application.yaml b/yudao-admin-server/src/main/resources/application.yaml similarity index 65% rename from src/main/resources/application.yaml rename to yudao-admin-server/src/main/resources/application.yaml index 9e9f9400b..486d4a487 100644 --- a/src/main/resources/application.yaml +++ b/yudao-admin-server/src/main/resources/application.yaml @@ -1,6 +1,6 @@ spring: application: - name: dashboard + name: yudao-admin-server profiles: active: local @@ -36,7 +36,27 @@ mybatis-plus: --- #################### 芋道相关配置 #################### yudao: + info: + version: 1.0.0 + base-package: cn.iocoder.yudao.adminserver + web: + api-prefix: /api + controller-package: ${yudao.info.base-package} + swagger: + title: 管理后台 + description: 提供管理员管理的所有功能 + version: ${yudao.info.version} + base-package: ${yudao.info.base-package}.modules + captcha: + timeout: 5m + width: 160 + height: 60 + codegen: + base-package: ${yudao.info.base-package} + db-schemas: ${spring.datasource.dynamic.datasource.master.name} error-code: # 错误码相关配置项 constants-class-list: - - cn.iocoder.dashboard.modules.infra.enums.InfErrorCodeConstants - - cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants + - cn.iocoder.yudao.adminserver.modules.infra.enums.InfErrorCodeConstants + - cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants + +debug: false diff --git a/src/main/resources/banner.txt b/yudao-admin-server/src/main/resources/banner.txt similarity index 100% rename from src/main/resources/banner.txt rename to yudao-admin-server/src/main/resources/banner.txt diff --git a/src/main/resources/codegen/java/controller/controller.vm b/yudao-admin-server/src/main/resources/codegen/java/controller/controller.vm similarity index 100% rename from src/main/resources/codegen/java/controller/controller.vm rename to yudao-admin-server/src/main/resources/codegen/java/controller/controller.vm diff --git a/src/main/resources/codegen/java/controller/vo/_column.vm b/yudao-admin-server/src/main/resources/codegen/java/controller/vo/_column.vm similarity index 100% rename from src/main/resources/codegen/java/controller/vo/_column.vm rename to yudao-admin-server/src/main/resources/codegen/java/controller/vo/_column.vm diff --git a/src/main/resources/codegen/java/controller/vo/baseVO.vm b/yudao-admin-server/src/main/resources/codegen/java/controller/vo/baseVO.vm similarity index 100% rename from src/main/resources/codegen/java/controller/vo/baseVO.vm rename to yudao-admin-server/src/main/resources/codegen/java/controller/vo/baseVO.vm diff --git a/src/main/resources/codegen/java/controller/vo/createReqVO.vm b/yudao-admin-server/src/main/resources/codegen/java/controller/vo/createReqVO.vm similarity index 100% rename from src/main/resources/codegen/java/controller/vo/createReqVO.vm rename to yudao-admin-server/src/main/resources/codegen/java/controller/vo/createReqVO.vm diff --git a/src/main/resources/codegen/java/controller/vo/excelVO.vm b/yudao-admin-server/src/main/resources/codegen/java/controller/vo/excelVO.vm similarity index 87% rename from src/main/resources/codegen/java/controller/vo/excelVO.vm rename to yudao-admin-server/src/main/resources/codegen/java/controller/vo/excelVO.vm index 29f777190..b91e4e178 100644 --- a/src/main/resources/codegen/java/controller/vo/excelVO.vm +++ b/yudao-admin-server/src/main/resources/codegen/java/controller/vo/excelVO.vm @@ -10,7 +10,6 @@ import com.alibaba.excel.annotation.ExcelProperty; import ${DictFormatClassName}; import ${DictConvertClassName}; -import static ${SysDictTypeEnumClassName}.*; #break #end #end @@ -27,7 +26,7 @@ public class ${table.className}ExcelVO { #if (${column.listOperationResult})##返回字段 #if ("$!column.dictType" != "")##处理枚举值 @ExcelProperty(value = "${column.columnComment}", converter = DictConvert.class) - @DictFormat(${column.dictType.toUpperCase()}) + @DictFormat("${column.dictType}") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中 #else @ExcelProperty("${column.columnComment}") #end diff --git a/src/main/resources/codegen/java/controller/vo/exportReqVO.vm b/yudao-admin-server/src/main/resources/codegen/java/controller/vo/exportReqVO.vm similarity index 100% rename from src/main/resources/codegen/java/controller/vo/exportReqVO.vm rename to yudao-admin-server/src/main/resources/codegen/java/controller/vo/exportReqVO.vm diff --git a/src/main/resources/codegen/java/controller/vo/pageReqVO.vm b/yudao-admin-server/src/main/resources/codegen/java/controller/vo/pageReqVO.vm similarity index 100% rename from src/main/resources/codegen/java/controller/vo/pageReqVO.vm rename to yudao-admin-server/src/main/resources/codegen/java/controller/vo/pageReqVO.vm diff --git a/src/main/resources/codegen/java/controller/vo/respVO.vm b/yudao-admin-server/src/main/resources/codegen/java/controller/vo/respVO.vm similarity index 100% rename from src/main/resources/codegen/java/controller/vo/respVO.vm rename to yudao-admin-server/src/main/resources/codegen/java/controller/vo/respVO.vm diff --git a/src/main/resources/codegen/java/controller/vo/updateReqVO.vm b/yudao-admin-server/src/main/resources/codegen/java/controller/vo/updateReqVO.vm similarity index 100% rename from src/main/resources/codegen/java/controller/vo/updateReqVO.vm rename to yudao-admin-server/src/main/resources/codegen/java/controller/vo/updateReqVO.vm diff --git a/src/main/resources/codegen/java/convert/convert.vm b/yudao-admin-server/src/main/resources/codegen/java/convert/convert.vm similarity index 100% rename from src/main/resources/codegen/java/convert/convert.vm rename to yudao-admin-server/src/main/resources/codegen/java/convert/convert.vm diff --git a/src/main/resources/codegen/java/dal/do.vm b/yudao-admin-server/src/main/resources/codegen/java/dal/do.vm similarity index 100% rename from src/main/resources/codegen/java/dal/do.vm rename to yudao-admin-server/src/main/resources/codegen/java/dal/do.vm diff --git a/src/main/resources/codegen/java/dal/mapper.vm b/yudao-admin-server/src/main/resources/codegen/java/dal/mapper.vm similarity index 100% rename from src/main/resources/codegen/java/dal/mapper.vm rename to yudao-admin-server/src/main/resources/codegen/java/dal/mapper.vm diff --git a/src/main/resources/codegen/java/enums/errorcode.vm b/yudao-admin-server/src/main/resources/codegen/java/enums/errorcode.vm similarity index 100% rename from src/main/resources/codegen/java/enums/errorcode.vm rename to yudao-admin-server/src/main/resources/codegen/java/enums/errorcode.vm diff --git a/src/main/resources/codegen/java/service/service.vm b/yudao-admin-server/src/main/resources/codegen/java/service/service.vm similarity index 100% rename from src/main/resources/codegen/java/service/service.vm rename to yudao-admin-server/src/main/resources/codegen/java/service/service.vm diff --git a/src/main/resources/codegen/java/service/serviceImpl.vm b/yudao-admin-server/src/main/resources/codegen/java/service/serviceImpl.vm similarity index 94% rename from src/main/resources/codegen/java/service/serviceImpl.vm rename to yudao-admin-server/src/main/resources/codegen/java/service/serviceImpl.vm index 9da0f0e19..33201a6d8 100644 --- a/src/main/resources/codegen/java/service/serviceImpl.vm +++ b/yudao-admin-server/src/main/resources/codegen/java/service/serviceImpl.vm @@ -1,6 +1,5 @@ package ${basePackage}.modules.${table.moduleName}.service.${table.businessName}.impl; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.annotation.Resource; import org.springframework.validation.annotation.Validated; @@ -14,9 +13,7 @@ import ${basePackage}.modules.${table.moduleName}.convert.${table.businessName}. import ${basePackage}.modules.${table.moduleName}.dal.mysql.${table.businessName}.${table.className}Mapper; import ${basePackage}.modules.${table.moduleName}.service.${table.businessName}.${table.className}Service; -import ${ServiceExceptionUtilClassName}; - -import static cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil.exception; +import static ${ServiceExceptionUtilClassName}.exception; import static ${basePackage}.modules.${table.moduleName}.enums.${simpleModuleName_upperFirst}ErrorCodeConstants.*; /** diff --git a/src/main/resources/codegen/java/test/serviceTest.vm b/yudao-admin-server/src/main/resources/codegen/java/test/serviceTest.vm similarity index 100% rename from src/main/resources/codegen/java/test/serviceTest.vm rename to yudao-admin-server/src/main/resources/codegen/java/test/serviceTest.vm diff --git a/src/main/resources/codegen/sql/sql.vm b/yudao-admin-server/src/main/resources/codegen/sql/sql.vm similarity index 100% rename from src/main/resources/codegen/sql/sql.vm rename to yudao-admin-server/src/main/resources/codegen/sql/sql.vm diff --git a/src/main/resources/codegen/vue/api/api.js.vm b/yudao-admin-server/src/main/resources/codegen/vue/api/api.js.vm similarity index 100% rename from src/main/resources/codegen/vue/api/api.js.vm rename to yudao-admin-server/src/main/resources/codegen/vue/api/api.js.vm diff --git a/src/main/resources/codegen/vue/views/index.vue.vm b/yudao-admin-server/src/main/resources/codegen/vue/views/index.vue.vm similarity index 100% rename from src/main/resources/codegen/vue/views/index.vue.vm rename to yudao-admin-server/src/main/resources/codegen/vue/views/index.vue.vm diff --git a/src/main/resources/logback-spring.xml b/yudao-admin-server/src/main/resources/logback-spring.xml similarity index 95% rename from src/main/resources/logback-spring.xml rename to yudao-admin-server/src/main/resources/logback-spring.xml index 1d9bec6dc..5bc181fd2 100644 --- a/src/main/resources/logback-spring.xml +++ b/yudao-admin-server/src/main/resources/logback-spring.xml @@ -58,19 +58,19 @@ - + - + - + - + diff --git a/src/test-integration/java/cn/iocoder/dashboard/BaseDbAndRedisIntegrationTest.java b/yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/BaseDbAndRedisIntegrationTest.java similarity index 75% rename from src/test-integration/java/cn/iocoder/dashboard/BaseDbAndRedisIntegrationTest.java rename to yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/BaseDbAndRedisIntegrationTest.java index bb0b4a219..915715c33 100644 --- a/src/test-integration/java/cn/iocoder/dashboard/BaseDbAndRedisIntegrationTest.java +++ b/yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/BaseDbAndRedisIntegrationTest.java @@ -1,8 +1,8 @@ -package cn.iocoder.dashboard; +package cn.iocoder.yudao.adminserver; -import cn.iocoder.dashboard.framework.datasource.config.DataSourceConfiguration; -import cn.iocoder.dashboard.framework.mybatis.config.MybatisConfiguration; -import cn.iocoder.dashboard.framework.redis.config.RedisConfig; +import cn.iocoder.yudao.framework.datasource.config.YudaoDataSourceAutoConfiguration; +import cn.iocoder.yudao.framework.mybatis.config.YudaoMybatisAutoConfiguration; +import cn.iocoder.yudao.framework.redis.config.YudaoRedisAutoConfiguration; import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAutoConfiguration; import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration; import org.redisson.spring.starter.RedissonAutoConfiguration; @@ -20,16 +20,16 @@ public class BaseDbAndRedisIntegrationTest { @Import({ // DB 配置类 DynamicDataSourceAutoConfiguration.class, // Dynamic Datasource 配置类 - DataSourceConfiguration.class, // 自己的 DB 配置类 + YudaoDataSourceAutoConfiguration.class, // 自己的 DB 配置类 DataSourceAutoConfiguration.class, // Spring DB 自动配置类 DataSourceTransactionManagerAutoConfiguration.class, // Spring 事务自动配置类 // MyBatis 配置类 - MybatisConfiguration.class, // 自己的 MyBatis 配置类 + YudaoMybatisAutoConfiguration.class, // 自己的 MyBatis 配置类 MybatisPlusAutoConfiguration.class, // MyBatis 的自动配置类 // Redis 配置类 RedisAutoConfiguration.class, // Spring Redis 自动配置类 - RedisConfig.class, // 自己的 Redis 配置类 + YudaoRedisAutoConfiguration.class, // 自己的 Redis 配置类 RedissonAutoConfiguration.class, // Redisson 自动高配置类 }) public static class Application { diff --git a/src/test-integration/java/cn/iocoder/dashboard/BaseRedisIntegrationTest.java b/yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/BaseRedisIntegrationTest.java similarity index 81% rename from src/test-integration/java/cn/iocoder/dashboard/BaseRedisIntegrationTest.java rename to yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/BaseRedisIntegrationTest.java index e32eb249e..78857e01f 100644 --- a/src/test-integration/java/cn/iocoder/dashboard/BaseRedisIntegrationTest.java +++ b/yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/BaseRedisIntegrationTest.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard; +package cn.iocoder.yudao.adminserver; -import cn.iocoder.dashboard.framework.redis.config.RedisConfig; +import cn.iocoder.yudao.framework.redis.config.YudaoRedisAutoConfiguration; import org.redisson.spring.starter.RedissonAutoConfiguration; import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; import org.springframework.boot.test.context.SpringBootTest; @@ -14,7 +14,7 @@ public class BaseRedisIntegrationTest { @Import({ // Redis 配置类 RedisAutoConfiguration.class, // Spring Redis 自动配置类 - RedisConfig.class, // 自己的 Redis 配置类 + YudaoRedisAutoConfiguration.class, // 自己的 Redis 配置类 RedissonAutoConfiguration.class, // Redisson 自动高配置类 }) public static class Application { diff --git a/src/test-integration/java/cn/iocoder/dashboard/framework/quartz/core/SchedulerManagerTest.java b/yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/framework/quartz/core/SchedulerManagerTest.java similarity index 86% rename from src/test-integration/java/cn/iocoder/dashboard/framework/quartz/core/SchedulerManagerTest.java rename to yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/framework/quartz/core/SchedulerManagerTest.java index 296383a89..efa95928b 100644 --- a/src/test-integration/java/cn/iocoder/dashboard/framework/quartz/core/SchedulerManagerTest.java +++ b/yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/framework/quartz/core/SchedulerManagerTest.java @@ -1,9 +1,9 @@ -package cn.iocoder.dashboard.framework.quartz.core; +package cn.iocoder.yudao.adminserver.framework.quartz.core; import cn.hutool.core.util.StrUtil; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.framework.quartz.core.scheduler.SchedulerManager; -import cn.iocoder.dashboard.modules.system.job.auth.SysUserSessionTimeoutJob; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.adminserver.modules.system.job.auth.SysUserSessionTimeoutJob; +import cn.iocoder.yudao.framework.quartz.core.scheduler.SchedulerManager; import org.junit.jupiter.api.Test; import org.quartz.SchedulerException; diff --git a/src/test-integration/java/cn/iocoder/dashboard/framework/redis/core/stream/RedisStreamTest.java b/yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/framework/redis/core/stream/RedisStreamTest.java similarity index 75% rename from src/test-integration/java/cn/iocoder/dashboard/framework/redis/core/stream/RedisStreamTest.java rename to yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/framework/redis/core/stream/RedisStreamTest.java index 888357570..727b25750 100644 --- a/src/test-integration/java/cn/iocoder/dashboard/framework/redis/core/stream/RedisStreamTest.java +++ b/yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/framework/redis/core/stream/RedisStreamTest.java @@ -1,12 +1,12 @@ -package cn.iocoder.dashboard.framework.redis.core.stream; +package cn.iocoder.yudao.adminserver.framework.redis.core.stream; import cn.hutool.core.thread.ThreadUtil; -import cn.iocoder.dashboard.BaseRedisIntegrationTest; -import cn.iocoder.dashboard.framework.redis.core.util.RedisMessageUtils; -import cn.iocoder.dashboard.modules.system.mq.consumer.mail.SysMailSendConsumer; -import cn.iocoder.dashboard.modules.system.mq.consumer.sms.SysSmsSendConsumer; -import cn.iocoder.dashboard.modules.system.mq.message.mail.SysMailSendMessage; -import cn.iocoder.dashboard.modules.system.mq.message.sms.SysSmsSendMessage; +import cn.iocoder.yudao.adminserver.BaseRedisIntegrationTest; +import cn.iocoder.yudao.adminserver.modules.system.mq.consumer.mail.SysMailSendConsumer; +import cn.iocoder.yudao.adminserver.modules.system.mq.consumer.sms.SysSmsSendConsumer; +import cn.iocoder.yudao.adminserver.modules.system.mq.message.mail.SysMailSendMessage; +import cn.iocoder.yudao.adminserver.modules.system.mq.message.sms.SysSmsSendMessage; +import cn.iocoder.yudao.framework.mq.core.util.RedisMessageUtils; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Import; diff --git a/yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/modules/system/service/package-info.java b/yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/modules/system/service/package-info.java new file mode 100644 index 000000000..b6bd21477 --- /dev/null +++ b/yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/modules/system/service/package-info.java @@ -0,0 +1 @@ +package cn.iocoder.yudao.adminserver.modules.system.service; diff --git a/src/test-integration/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsServiceIntegrationTest.java b/yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsServiceIntegrationTest.java similarity index 69% rename from src/test-integration/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsServiceIntegrationTest.java rename to yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsServiceIntegrationTest.java index 7ec704b5d..bb43560d2 100644 --- a/src/test-integration/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsServiceIntegrationTest.java +++ b/yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsServiceIntegrationTest.java @@ -1,17 +1,17 @@ -package cn.iocoder.dashboard.modules.system.service.sms; +package cn.iocoder.yudao.adminserver.modules.system.service.sms; import cn.hutool.core.map.MapUtil; import cn.hutool.core.thread.ThreadUtil; -import cn.iocoder.dashboard.BaseDbAndRedisIntegrationTest; -import cn.iocoder.dashboard.common.enums.UserTypeEnum; -import cn.iocoder.dashboard.framework.sms.config.SmsConfiguration; -import cn.iocoder.dashboard.modules.system.mq.consumer.sms.SysSmsSendConsumer; -import cn.iocoder.dashboard.modules.system.mq.producer.sms.SysSmsProducer; -import cn.iocoder.dashboard.modules.system.service.sms.impl.SysSmsChannelServiceImpl; -import cn.iocoder.dashboard.modules.system.service.sms.impl.SysSmsLogServiceImpl; -import cn.iocoder.dashboard.modules.system.service.sms.impl.SysSmsServiceImpl; -import cn.iocoder.dashboard.modules.system.service.sms.impl.SysSmsTemplateServiceImpl; -import cn.iocoder.dashboard.modules.system.service.user.SysUserService; +import cn.iocoder.yudao.adminserver.BaseDbAndRedisIntegrationTest; +import cn.iocoder.yudao.adminserver.modules.system.mq.consumer.sms.SysSmsSendConsumer; +import cn.iocoder.yudao.adminserver.modules.system.mq.producer.sms.SysSmsProducer; +import cn.iocoder.yudao.adminserver.modules.system.service.sms.impl.SysSmsChannelServiceImpl; +import cn.iocoder.yudao.adminserver.modules.system.service.sms.impl.SysSmsLogServiceImpl; +import cn.iocoder.yudao.adminserver.modules.system.service.sms.impl.SysSmsServiceImpl; +import cn.iocoder.yudao.adminserver.modules.system.service.sms.impl.SysSmsTemplateServiceImpl; +import cn.iocoder.yudao.adminserver.modules.system.service.user.SysUserService; +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; +import cn.iocoder.yudao.framework.sms.config.YudaoSmsAutoConfiguration; import org.junit.jupiter.api.Test; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.annotation.Import; @@ -20,7 +20,7 @@ import javax.annotation.Resource; import java.util.Map; import java.util.concurrent.TimeUnit; -@Import({SmsConfiguration.class, +@Import({YudaoSmsAutoConfiguration.class, SysSmsChannelServiceImpl.class, SysSmsServiceImpl.class, SysSmsTemplateServiceImpl.class, SysSmsLogServiceImpl.class, SysSmsProducer.class, SysSmsSendConsumer.class}) public class SysSmsServiceIntegrationTest extends BaseDbAndRedisIntegrationTest { diff --git a/src/test-integration/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolInformationSchemaColumnMapperTest.java b/yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/modules/tool/dal/mysql/codegen/ToolInformationSchemaColumnMapperTest.java similarity index 72% rename from src/test-integration/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolInformationSchemaColumnMapperTest.java rename to yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/modules/tool/dal/mysql/codegen/ToolInformationSchemaColumnMapperTest.java index af2fc6847..1e86eb5d8 100644 --- a/src/test-integration/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolInformationSchemaColumnMapperTest.java +++ b/yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/modules/tool/dal/mysql/codegen/ToolInformationSchemaColumnMapperTest.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.tool.dal.mysql.codegen; +package cn.iocoder.yudao.adminserver.modules.tool.dal.mysql.codegen; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolSchemaColumnDO; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolSchemaColumnDO; import org.junit.jupiter.api.Test; import javax.annotation.Resource; diff --git a/src/test-integration/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolInformationSchemaTableMapperTest.java b/yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/modules/tool/dal/mysql/codegen/ToolInformationSchemaTableMapperTest.java similarity index 61% rename from src/test-integration/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolInformationSchemaTableMapperTest.java rename to yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/modules/tool/dal/mysql/codegen/ToolInformationSchemaTableMapperTest.java index a0004f3d4..35d91b8c4 100644 --- a/src/test-integration/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolInformationSchemaTableMapperTest.java +++ b/yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/modules/tool/dal/mysql/codegen/ToolInformationSchemaTableMapperTest.java @@ -1,6 +1,6 @@ -package cn.iocoder.dashboard.modules.tool.dal.mysql.codegen; +package cn.iocoder.yudao.adminserver.modules.tool.dal.mysql.codegen; -import cn.iocoder.dashboard.BaseDbUnitTest; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; import javax.annotation.Resource; diff --git a/src/test-integration/java/cn/iocoder/dashboard/modules/tool/service/codegen/ToolCodegenEngineTest.java b/yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/modules/tool/service/codegen/ToolCodegenEngineTest.java similarity index 58% rename from src/test-integration/java/cn/iocoder/dashboard/modules/tool/service/codegen/ToolCodegenEngineTest.java rename to yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/modules/tool/service/codegen/ToolCodegenEngineTest.java index e3cf73933..a8a7857e9 100644 --- a/src/test-integration/java/cn/iocoder/dashboard/modules/tool/service/codegen/ToolCodegenEngineTest.java +++ b/yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/modules/tool/service/codegen/ToolCodegenEngineTest.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.tool.service.codegen; +package cn.iocoder.yudao.adminserver.modules.tool.service.codegen; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolCodegenColumnDO; -import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolCodegenTableDO; -import cn.iocoder.dashboard.modules.tool.dal.mysql.codegen.ToolCodegenColumnMapper; -import cn.iocoder.dashboard.modules.tool.dal.mysql.codegen.ToolCodegenTableMapper; -import cn.iocoder.dashboard.modules.tool.service.codegen.impl.ToolCodegenEngine; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolCodegenColumnDO; +import cn.iocoder.yudao.adminserver.modules.tool.dal.dataobject.codegen.ToolCodegenTableDO; +import cn.iocoder.yudao.adminserver.modules.tool.dal.mysql.codegen.ToolCodegenColumnMapper; +import cn.iocoder.yudao.adminserver.modules.tool.dal.mysql.codegen.ToolCodegenTableMapper; +import cn.iocoder.yudao.adminserver.modules.tool.service.codegen.impl.ToolCodegenEngine; import org.junit.jupiter.api.Test; import javax.annotation.Resource; diff --git a/src/test-integration/java/cn/iocoder/dashboard/modules/tool/service/codegen/ToolCodegenSQLParserTest.java b/yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/modules/tool/service/codegen/ToolCodegenSQLParserTest.java similarity index 86% rename from src/test-integration/java/cn/iocoder/dashboard/modules/tool/service/codegen/ToolCodegenSQLParserTest.java rename to yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/modules/tool/service/codegen/ToolCodegenSQLParserTest.java index 45c4238e5..44c909118 100644 --- a/src/test-integration/java/cn/iocoder/dashboard/modules/tool/service/codegen/ToolCodegenSQLParserTest.java +++ b/yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/modules/tool/service/codegen/ToolCodegenSQLParserTest.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.tool.service.codegen; +package cn.iocoder.yudao.adminserver.modules.tool.service.codegen; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.modules.tool.service.codegen.impl.ToolCodegenSQLParser; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.adminserver.modules.tool.service.codegen.impl.ToolCodegenSQLParser; import org.junit.jupiter.api.Test; public class ToolCodegenSQLParserTest extends BaseDbUnitTest { diff --git a/src/test-integration/java/cn/iocoder/dashboard/modules/tool/service/codegen/ToolCodegenServiceImplTest.java b/yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/modules/tool/service/codegen/ToolCodegenServiceImplTest.java similarity index 68% rename from src/test-integration/java/cn/iocoder/dashboard/modules/tool/service/codegen/ToolCodegenServiceImplTest.java rename to yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/modules/tool/service/codegen/ToolCodegenServiceImplTest.java index 4bb2cc6d7..87661a3cd 100644 --- a/src/test-integration/java/cn/iocoder/dashboard/modules/tool/service/codegen/ToolCodegenServiceImplTest.java +++ b/yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/modules/tool/service/codegen/ToolCodegenServiceImplTest.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard.modules.tool.service.codegen; +package cn.iocoder.yudao.adminserver.modules.tool.service.codegen; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.modules.tool.service.codegen.impl.ToolCodegenServiceImpl; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.adminserver.modules.tool.service.codegen.impl.ToolCodegenServiceImpl; import org.junit.jupiter.api.Test; import javax.annotation.Resource; diff --git a/src/test-integration/resources/application-integration-test.yaml b/yudao-admin-server/src/test-integration/resources/application-integration-test.yaml similarity index 92% rename from src/test-integration/resources/application-integration-test.yaml rename to yudao-admin-server/src/test-integration/resources/application-integration-test.yaml index a248134d2..d9612eee7 100644 --- a/src/test-integration/resources/application-integration-test.yaml +++ b/yudao-admin-server/src/test-integration/resources/application-integration-test.yaml @@ -90,12 +90,6 @@ resilience4j: # 芋道配置项,设置当前项目所有自定义的配置 yudao: - info: - version: 1.0.0 - base-package: cn.iocoder.dashboard - web: - api-prefix: /api - controller-package: ${yudao.info.base-package} security: token-header: Authorization token-secret: abcdefghijklmnopqrstuvwxyz @@ -105,15 +99,8 @@ yudao: mock-secret: test swagger: enable: false # 单元测试,禁用 Swagger - captcha: - timeout: 5m - width: 160 - height: 60 file: base-path: http://127.0.0.1:${server.port}/${yudao.web.api-prefix}/file/get/ - codegen: - base-package: ${yudao.info.base-package}.modules - db-schemas: ${spring.datasource.dynamic.datasource.master.name} xss: enable: false exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系 diff --git a/src/test/java/cn/iocoder/dashboard/BaseDbAndRedisUnitTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/BaseDbAndRedisUnitTest.java similarity index 77% rename from src/test/java/cn/iocoder/dashboard/BaseDbAndRedisUnitTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/BaseDbAndRedisUnitTest.java index f1e2dddd4..2cc60cc30 100644 --- a/src/test/java/cn/iocoder/dashboard/BaseDbAndRedisUnitTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/BaseDbAndRedisUnitTest.java @@ -1,9 +1,9 @@ -package cn.iocoder.dashboard; +package cn.iocoder.yudao.adminserver; -import cn.iocoder.dashboard.config.RedisTestConfiguration; -import cn.iocoder.dashboard.framework.datasource.config.DataSourceConfiguration; -import cn.iocoder.dashboard.framework.mybatis.config.MybatisConfiguration; -import cn.iocoder.dashboard.framework.redis.config.RedisConfig; +import cn.iocoder.yudao.adminserver.config.RedisTestConfiguration; +import cn.iocoder.yudao.framework.redis.config.YudaoRedisAutoConfiguration; +import cn.iocoder.yudao.framework.datasource.config.YudaoDataSourceAutoConfiguration; +import cn.iocoder.yudao.framework.mybatis.config.YudaoMybatisAutoConfiguration; import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure; import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration; import org.redisson.spring.starter.RedissonAutoConfiguration; @@ -29,17 +29,17 @@ public class BaseDbAndRedisUnitTest { @Import({ // DB 配置类 - DataSourceConfiguration.class, // 自己的 DB 配置类 + YudaoDataSourceAutoConfiguration.class, // 自己的 DB 配置类 DataSourceAutoConfiguration.class, // Spring DB 自动配置类 DataSourceTransactionManagerAutoConfiguration.class, // Spring 事务自动配置类 DruidDataSourceAutoConfigure.class, // Druid 自动配置类 // MyBatis 配置类 - MybatisConfiguration.class, // 自己的 MyBatis 配置类 + YudaoMybatisAutoConfiguration.class, // 自己的 MyBatis 配置类 MybatisPlusAutoConfiguration.class, // MyBatis 的自动配置类 // Redis 配置类 RedisTestConfiguration.class, // Redis 测试配置类,用于启动 RedisServer RedisAutoConfiguration.class, // Spring Redis 自动配置类 - RedisConfig.class, // 自己的 Redis 配置类 + YudaoRedisAutoConfiguration.class, // 自己的 Redis 配置类 RedissonAutoConfiguration.class, // Redisson 自动高配置类 }) public static class Application { diff --git a/src/test/java/cn/iocoder/dashboard/BaseDbUnitTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/BaseDbUnitTest.java similarity index 81% rename from src/test/java/cn/iocoder/dashboard/BaseDbUnitTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/BaseDbUnitTest.java index 19e930f1a..5f7daeded 100644 --- a/src/test/java/cn/iocoder/dashboard/BaseDbUnitTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/BaseDbUnitTest.java @@ -1,7 +1,7 @@ -package cn.iocoder.dashboard; +package cn.iocoder.yudao.adminserver; -import cn.iocoder.dashboard.framework.datasource.config.DataSourceConfiguration; -import cn.iocoder.dashboard.framework.mybatis.config.MybatisConfiguration; +import cn.iocoder.yudao.framework.datasource.config.YudaoDataSourceAutoConfiguration; +import cn.iocoder.yudao.framework.mybatis.config.YudaoMybatisAutoConfiguration; import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure; import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; @@ -25,12 +25,12 @@ public class BaseDbUnitTest { @Import({ // DB 配置类 - DataSourceConfiguration.class, // 自己的 DB 配置类 + YudaoDataSourceAutoConfiguration.class, // 自己的 DB 配置类 DataSourceAutoConfiguration.class, // Spring DB 自动配置类 DataSourceTransactionManagerAutoConfiguration.class, // Spring 事务自动配置类 DruidDataSourceAutoConfigure.class, // Druid 自动配置类 // MyBatis 配置类 - MybatisConfiguration.class, // 自己的 MyBatis 配置类 + YudaoMybatisAutoConfiguration.class, // 自己的 MyBatis 配置类 MybatisPlusAutoConfiguration.class, // MyBatis 的自动配置类 }) public static class Application { diff --git a/src/test/java/cn/iocoder/dashboard/BaseMockitoUnitTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/BaseMockitoUnitTest.java similarity index 86% rename from src/test/java/cn/iocoder/dashboard/BaseMockitoUnitTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/BaseMockitoUnitTest.java index 4a595b24e..74e9d7fbe 100644 --- a/src/test/java/cn/iocoder/dashboard/BaseMockitoUnitTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/BaseMockitoUnitTest.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard; +package cn.iocoder.yudao.adminserver; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.junit.jupiter.MockitoExtension; diff --git a/src/test/java/cn/iocoder/dashboard/BaseRedisUnitTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/BaseRedisUnitTest.java similarity index 75% rename from src/test/java/cn/iocoder/dashboard/BaseRedisUnitTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/BaseRedisUnitTest.java index a806e4670..fa6bd636b 100644 --- a/src/test/java/cn/iocoder/dashboard/BaseRedisUnitTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/BaseRedisUnitTest.java @@ -1,7 +1,8 @@ -package cn.iocoder.dashboard; +package cn.iocoder.yudao.adminserver; -import cn.iocoder.dashboard.config.RedisTestConfiguration; -import cn.iocoder.dashboard.framework.redis.config.RedisConfig; +import cn.iocoder.yudao.adminserver.config.RedisTestConfiguration; +import cn.iocoder.yudao.framework.redis.config.YudaoRedisAutoConfiguration; +import cn.iocoder.yudao.framework.tracer.config.YudaoTracerAutoConfiguration; import org.redisson.spring.starter.RedissonAutoConfiguration; import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; import org.springframework.boot.test.context.SpringBootTest; @@ -23,7 +24,7 @@ public class BaseRedisUnitTest { // Redis 配置类 RedisTestConfiguration.class, // Redis 测试配置类,用于启动 RedisServer RedisAutoConfiguration.class, // Spring Redis 自动配置类 - RedisConfig.class, // 自己的 Redis 配置类 + YudaoTracerAutoConfiguration.class, // 自己的 Redis 配置类 RedissonAutoConfiguration.class, // Redisson 自动高配置类 }) public static class Application { diff --git a/src/test/java/cn/iocoder/dashboard/config/QuartzTestConfiguration.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/config/QuartzTestConfiguration.java similarity index 87% rename from src/test/java/cn/iocoder/dashboard/config/QuartzTestConfiguration.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/config/QuartzTestConfiguration.java index 124aaea3d..0bbce1908 100644 --- a/src/test/java/cn/iocoder/dashboard/config/QuartzTestConfiguration.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/config/QuartzTestConfiguration.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.config; +package cn.iocoder.yudao.adminserver.config; import org.mockito.Mockito; import org.quartz.Scheduler; diff --git a/src/test/java/cn/iocoder/dashboard/config/RedisTestConfiguration.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/config/RedisTestConfiguration.java similarity index 96% rename from src/test/java/cn/iocoder/dashboard/config/RedisTestConfiguration.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/config/RedisTestConfiguration.java index 299d9f401..15a39f757 100644 --- a/src/test/java/cn/iocoder/dashboard/config/RedisTestConfiguration.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/config/RedisTestConfiguration.java @@ -1,4 +1,4 @@ -package cn.iocoder.dashboard.config; +package cn.iocoder.yudao.adminserver.config; import com.github.fppt.jedismock.RedisServer; import org.springframework.boot.autoconfigure.data.redis.RedisProperties; diff --git a/src/test/java/cn/iocoder/dashboard/modules/infra/service/config/InfConfigServiceTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/infra/service/config/InfConfigServiceTest.java similarity index 84% rename from src/test/java/cn/iocoder/dashboard/modules/infra/service/config/InfConfigServiceTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/infra/service/config/InfConfigServiceTest.java index 12bcce62e..4ef105df3 100644 --- a/src/test/java/cn/iocoder/dashboard/modules/infra/service/config/InfConfigServiceTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/infra/service/config/InfConfigServiceTest.java @@ -1,18 +1,18 @@ -package cn.iocoder.dashboard.modules.infra.service.config; +package cn.iocoder.yudao.adminserver.modules.infra.service.config; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.infra.controller.config.vo.InfConfigCreateReqVO; -import cn.iocoder.dashboard.modules.infra.controller.config.vo.InfConfigExportReqVO; -import cn.iocoder.dashboard.modules.infra.controller.config.vo.InfConfigPageReqVO; -import cn.iocoder.dashboard.modules.infra.controller.config.vo.InfConfigUpdateReqVO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.config.InfConfigDO; -import cn.iocoder.dashboard.modules.infra.dal.mysql.config.InfConfigMapper; -import cn.iocoder.dashboard.modules.infra.enums.config.InfConfigTypeEnum; -import cn.iocoder.dashboard.modules.infra.mq.producer.config.InfConfigProducer; -import cn.iocoder.dashboard.modules.infra.service.config.impl.InfConfigServiceImpl; -import cn.iocoder.dashboard.util.collection.ArrayUtils; -import cn.iocoder.dashboard.util.object.ObjectUtils; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigExportReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigPageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.config.vo.InfConfigUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.config.InfConfigDO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.config.InfConfigMapper; +import cn.iocoder.yudao.adminserver.modules.infra.enums.config.InfConfigTypeEnum; +import cn.iocoder.yudao.adminserver.modules.infra.mq.producer.config.InfConfigProducer; +import cn.iocoder.yudao.adminserver.modules.infra.service.config.impl.InfConfigServiceImpl; +import cn.iocoder.yudao.framework.common.util.collection.ArrayUtils; +import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import org.junit.jupiter.api.Test; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.annotation.Import; @@ -22,11 +22,11 @@ import java.util.List; import java.util.function.Consumer; import static cn.hutool.core.util.RandomUtil.randomEle; -import static cn.iocoder.dashboard.modules.infra.enums.InfErrorCodeConstants.*; -import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals; -import static cn.iocoder.dashboard.util.AssertUtils.assertServiceException; -import static cn.iocoder.dashboard.util.RandomUtils.*; -import static cn.iocoder.dashboard.util.date.DateUtils.buildTime; +import static cn.iocoder.yudao.adminserver.modules.infra.enums.InfErrorCodeConstants.*; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; diff --git a/src/test/java/cn/iocoder/dashboard/modules/infra/service/file/InfFileServiceTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/infra/service/file/InfFileServiceTest.java similarity index 73% rename from src/test/java/cn/iocoder/dashboard/modules/infra/service/file/InfFileServiceTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/infra/service/file/InfFileServiceTest.java index 0445d1cb4..260ae7c60 100644 --- a/src/test/java/cn/iocoder/dashboard/modules/infra/service/file/InfFileServiceTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/infra/service/file/InfFileServiceTest.java @@ -1,26 +1,26 @@ -package cn.iocoder.dashboard.modules.infra.service.file; +package cn.iocoder.yudao.adminserver.modules.infra.service.file; import cn.hutool.core.io.resource.ResourceUtil; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.file.config.FileProperties; -import cn.iocoder.dashboard.modules.infra.controller.file.vo.InfFilePageReqVO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.file.InfFileDO; -import cn.iocoder.dashboard.modules.infra.dal.mysql.file.InfFileMapper; -import cn.iocoder.dashboard.modules.infra.service.file.impl.InfFileServiceImpl; -import cn.iocoder.dashboard.util.object.ObjectUtils; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.infra.framework.file.config.FileProperties; +import cn.iocoder.yudao.adminserver.modules.infra.controller.file.vo.InfFilePageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.file.InfFileDO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.file.InfFileMapper; +import cn.iocoder.yudao.adminserver.modules.infra.service.file.impl.InfFileServiceImpl; +import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Import; import javax.annotation.Resource; -import static cn.iocoder.dashboard.modules.infra.enums.InfErrorCodeConstants.FILE_NOT_EXISTS; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.FILE_PATH_EXISTS; -import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals; -import static cn.iocoder.dashboard.util.AssertUtils.assertServiceException; -import static cn.iocoder.dashboard.util.RandomUtils.randomPojo; -import static cn.iocoder.dashboard.util.RandomUtils.randomString; -import static cn.iocoder.dashboard.util.date.DateUtils.buildTime; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; +import static cn.iocoder.yudao.adminserver.modules.infra.enums.InfErrorCodeConstants.FILE_NOT_EXISTS; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.FILE_PATH_EXISTS; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomString; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; import static org.junit.jupiter.api.Assertions.*; @Import({InfFileServiceImpl.class, FileProperties.class}) diff --git a/src/test/java/cn/iocoder/dashboard/modules/infra/service/job/InfJobLogServiceTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/infra/service/job/InfJobLogServiceTest.java similarity index 85% rename from src/test/java/cn/iocoder/dashboard/modules/infra/service/job/InfJobLogServiceTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/infra/service/job/InfJobLogServiceTest.java index d6caa2a54..4e4f17287 100644 --- a/src/test/java/cn/iocoder/dashboard/modules/infra/service/job/InfJobLogServiceTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/infra/service/job/InfJobLogServiceTest.java @@ -1,11 +1,11 @@ -package cn.iocoder.dashboard.modules.infra.service.job; +package cn.iocoder.yudao.adminserver.modules.infra.service.job; import static cn.hutool.core.util.RandomUtil.randomEle; -import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals; -import static cn.iocoder.dashboard.util.RandomUtils.randomLongId; -import static cn.iocoder.dashboard.util.RandomUtils.randomPojo; -import static cn.iocoder.dashboard.util.RandomUtils.randomString; -import static cn.iocoder.dashboard.util.date.DateUtils.buildTime; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomLongId; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomString; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -17,15 +17,15 @@ import javax.annotation.Resource; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Import; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.log.InfJobLogExportReqVO; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.log.InfJobLogPageReqVO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.job.InfJobLogDO; -import cn.iocoder.dashboard.modules.infra.dal.mysql.job.InfJobLogMapper; -import cn.iocoder.dashboard.modules.infra.enums.job.InfJobLogStatusEnum; -import cn.iocoder.dashboard.modules.infra.service.job.impl.InfJobLogServiceImpl; -import cn.iocoder.dashboard.util.object.ObjectUtils; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.log.InfJobLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job.InfJobLogDO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.job.InfJobLogMapper; +import cn.iocoder.yudao.adminserver.modules.infra.enums.job.InfJobLogStatusEnum; +import cn.iocoder.yudao.adminserver.modules.infra.service.job.impl.InfJobLogServiceImpl; +import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; /** * {@link InfJobLogServiceImpl} 的单元测试 diff --git a/src/test/java/cn/iocoder/dashboard/modules/infra/service/job/InfJobServiceTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/infra/service/job/InfJobServiceTest.java similarity index 85% rename from src/test/java/cn/iocoder/dashboard/modules/infra/service/job/InfJobServiceTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/infra/service/job/InfJobServiceTest.java index 22f4cc14c..a767519b6 100644 --- a/src/test/java/cn/iocoder/dashboard/modules/infra/service/job/InfJobServiceTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/infra/service/job/InfJobServiceTest.java @@ -1,16 +1,16 @@ -package cn.iocoder.dashboard.modules.infra.service.job; +package cn.iocoder.yudao.adminserver.modules.infra.service.job; import static cn.hutool.core.util.RandomUtil.randomEle; -import static cn.iocoder.dashboard.modules.infra.enums.InfErrorCodeConstants.JOB_CHANGE_STATUS_EQUALS; -import static cn.iocoder.dashboard.modules.infra.enums.InfErrorCodeConstants.JOB_CHANGE_STATUS_INVALID; -import static cn.iocoder.dashboard.modules.infra.enums.InfErrorCodeConstants.JOB_CRON_EXPRESSION_VALID; -import static cn.iocoder.dashboard.modules.infra.enums.InfErrorCodeConstants.JOB_HANDLER_EXISTS; -import static cn.iocoder.dashboard.modules.infra.enums.InfErrorCodeConstants.JOB_NOT_EXISTS; -import static cn.iocoder.dashboard.modules.infra.enums.InfErrorCodeConstants.JOB_UPDATE_ONLY_NORMAL_STATUS; -import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals; -import static cn.iocoder.dashboard.util.AssertUtils.assertServiceException; -import static cn.iocoder.dashboard.util.RandomUtils.randomPojo; -import static cn.iocoder.dashboard.util.RandomUtils.randomString; +import static cn.iocoder.yudao.adminserver.modules.infra.enums.InfErrorCodeConstants.JOB_CHANGE_STATUS_EQUALS; +import static cn.iocoder.yudao.adminserver.modules.infra.enums.InfErrorCodeConstants.JOB_CHANGE_STATUS_INVALID; +import static cn.iocoder.yudao.adminserver.modules.infra.enums.InfErrorCodeConstants.JOB_CRON_EXPRESSION_VALID; +import static cn.iocoder.yudao.adminserver.modules.infra.enums.InfErrorCodeConstants.JOB_HANDLER_EXISTS; +import static cn.iocoder.yudao.adminserver.modules.infra.enums.InfErrorCodeConstants.JOB_NOT_EXISTS; +import static cn.iocoder.yudao.adminserver.modules.infra.enums.InfErrorCodeConstants.JOB_UPDATE_ONLY_NORMAL_STATUS; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomString; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; @@ -28,19 +28,19 @@ import org.quartz.SchedulerException; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.annotation.Import; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.quartz.core.scheduler.SchedulerManager; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.job.InfJobCreateReqVO; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.job.InfJobExportReqVO; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.job.InfJobPageReqVO; -import cn.iocoder.dashboard.modules.infra.controller.job.vo.job.InfJobUpdateReqVO; -import cn.iocoder.dashboard.modules.infra.convert.job.InfJobConvert; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.job.InfJobDO; -import cn.iocoder.dashboard.modules.infra.dal.mysql.job.InfJobMapper; -import cn.iocoder.dashboard.modules.infra.enums.job.InfJobStatusEnum; -import cn.iocoder.dashboard.modules.infra.service.job.impl.InfJobServiceImpl; -import cn.iocoder.dashboard.util.object.ObjectUtils; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.quartz.core.scheduler.SchedulerManager; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobExportReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobPageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.job.vo.job.InfJobUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.convert.job.InfJobConvert; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.job.InfJobDO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.job.InfJobMapper; +import cn.iocoder.yudao.adminserver.modules.infra.enums.job.InfJobStatusEnum; +import cn.iocoder.yudao.adminserver.modules.infra.service.job.impl.InfJobServiceImpl; +import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; /** * {@link InfJobServiceImpl} 的单元测试 diff --git a/src/test/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiAccessLogServiceImplTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/infra/service/logger/InfApiAccessLogServiceImplTest.java similarity index 85% rename from src/test/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiAccessLogServiceImplTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/infra/service/logger/InfApiAccessLogServiceImplTest.java index c08fee356..689b88ec2 100644 --- a/src/test/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiAccessLogServiceImplTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/infra/service/logger/InfApiAccessLogServiceImplTest.java @@ -1,18 +1,18 @@ -package cn.iocoder.dashboard.modules.infra.service.logger; +package cn.iocoder.yudao.adminserver.modules.infra.service.logger; import cn.hutool.core.util.RandomUtil; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.common.enums.UserTypeEnum; -import cn.iocoder.dashboard.common.exception.enums.GlobalErrorCodeConstants; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.logger.apilog.core.service.dto.ApiAccessLogCreateDTO; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogExportReqVO; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogPageReqVO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.logger.InfApiAccessLogDO; -import cn.iocoder.dashboard.modules.infra.dal.mysql.logger.InfApiAccessLogMapper; -import cn.iocoder.dashboard.modules.infra.service.logger.impl.InfApiAccessLogServiceImpl; -import cn.iocoder.dashboard.util.RandomUtils; -import cn.iocoder.dashboard.util.object.ObjectUtils; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; +import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiAccessLogCreateDTO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apiaccesslog.InfApiAccessLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.logger.InfApiAccessLogDO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.logger.InfApiAccessLogMapper; +import cn.iocoder.yudao.adminserver.modules.infra.service.logger.impl.InfApiAccessLogServiceImpl; +import cn.iocoder.yudao.framework.test.core.util.RandomUtils; +import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Import; @@ -21,8 +21,8 @@ import java.util.Date; import java.util.List; import java.util.concurrent.Future; -import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals; -import static cn.iocoder.dashboard.util.date.DateUtils.buildTime; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/src/test/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiErrorLogServiceImplTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/infra/service/logger/InfApiErrorLogServiceImplTest.java similarity index 85% rename from src/test/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiErrorLogServiceImplTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/infra/service/logger/InfApiErrorLogServiceImplTest.java index 4b9f46bc6..0a0c26c8a 100644 --- a/src/test/java/cn/iocoder/dashboard/modules/infra/service/logger/InfApiErrorLogServiceImplTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/infra/service/logger/InfApiErrorLogServiceImplTest.java @@ -1,18 +1,18 @@ -package cn.iocoder.dashboard.modules.infra.service.logger; +package cn.iocoder.yudao.adminserver.modules.infra.service.logger; import cn.hutool.core.util.RandomUtil; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.common.enums.UserTypeEnum; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.logger.apilog.core.service.dto.ApiErrorLogCreateDTO; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogExportReqVO; -import cn.iocoder.dashboard.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogPageReqVO; -import cn.iocoder.dashboard.modules.infra.dal.dataobject.logger.InfApiErrorLogDO; -import cn.iocoder.dashboard.modules.infra.dal.mysql.logger.InfApiErrorLogMapper; -import cn.iocoder.dashboard.modules.infra.enums.logger.InfApiErrorLogProcessStatusEnum; -import cn.iocoder.dashboard.modules.infra.service.logger.impl.InfApiErrorLogServiceImpl; -import cn.iocoder.dashboard.util.RandomUtils; -import cn.iocoder.dashboard.util.object.ObjectUtils; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiErrorLogCreateDTO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.controller.logger.vo.apierrorlog.InfApiErrorLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.dataobject.logger.InfApiErrorLogDO; +import cn.iocoder.yudao.adminserver.modules.infra.dal.mysql.logger.InfApiErrorLogMapper; +import cn.iocoder.yudao.adminserver.modules.infra.enums.logger.InfApiErrorLogProcessStatusEnum; +import cn.iocoder.yudao.adminserver.modules.infra.service.logger.impl.InfApiErrorLogServiceImpl; +import cn.iocoder.yudao.framework.test.core.util.RandomUtils; +import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Import; @@ -21,11 +21,11 @@ import java.util.Date; import java.util.List; import java.util.concurrent.Future; -import static cn.iocoder.dashboard.modules.infra.enums.InfErrorCodeConstants.API_ERROR_LOG_NOT_FOUND; -import static cn.iocoder.dashboard.modules.infra.enums.InfErrorCodeConstants.API_ERROR_LOG_PROCESSED; -import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals; -import static cn.iocoder.dashboard.util.AssertUtils.assertServiceException; -import static cn.iocoder.dashboard.util.date.DateUtils.buildTime; +import static cn.iocoder.yudao.adminserver.modules.infra.enums.InfErrorCodeConstants.API_ERROR_LOG_NOT_FOUND; +import static cn.iocoder.yudao.adminserver.modules.infra.enums.InfErrorCodeConstants.API_ERROR_LOG_PROCESSED; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/src/test/java/cn/iocoder/dashboard/modules/system/service/auth/SysAuthServiceImplTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/auth/SysAuthServiceImplTest.java similarity index 87% rename from src/test/java/cn/iocoder/dashboard/modules/system/service/auth/SysAuthServiceImplTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/auth/SysAuthServiceImplTest.java index 7f923677e..092d72fe7 100644 --- a/src/test/java/cn/iocoder/dashboard/modules/system/service/auth/SysAuthServiceImplTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/auth/SysAuthServiceImplTest.java @@ -1,269 +1,269 @@ -package cn.iocoder.dashboard.modules.system.service.auth; - -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.framework.security.core.LoginUser; -import cn.iocoder.dashboard.modules.system.controller.auth.vo.auth.SysAuthLoginReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO; -import cn.iocoder.dashboard.modules.system.enums.logger.SysLoginLogTypeEnum; -import cn.iocoder.dashboard.modules.system.enums.logger.SysLoginResultEnum; -import cn.iocoder.dashboard.modules.system.service.auth.impl.SysAuthServiceImpl; -import cn.iocoder.dashboard.modules.system.service.common.SysCaptchaService; -import cn.iocoder.dashboard.modules.system.service.logger.SysLoginLogService; -import cn.iocoder.dashboard.modules.system.service.permission.SysPermissionService; -import cn.iocoder.dashboard.modules.system.service.user.SysUserService; -import cn.iocoder.dashboard.util.AssertUtils; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.mock.mockito.MockBean; -import org.springframework.context.annotation.Import; -import org.springframework.security.authentication.AuthenticationManager; -import org.springframework.security.authentication.BadCredentialsException; -import org.springframework.security.authentication.DisabledException; -import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; -import org.springframework.security.core.Authentication; -import org.springframework.security.core.AuthenticationException; -import org.springframework.security.core.userdetails.UsernameNotFoundException; - -import javax.annotation.Resource; -import java.util.Set; - -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*; -import static cn.iocoder.dashboard.util.AssertUtils.assertServiceException; -import static cn.iocoder.dashboard.util.RandomUtils.*; -import static java.util.Collections.singleton; -import static org.junit.jupiter.api.Assertions.*; -import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.*; - -/** - * {@link SysAuthServiceImpl} 的单元测试 - * - * @author 芋道源码 - */ -@Import(SysAuthServiceImpl.class) -public class SysAuthServiceImplTest extends BaseDbUnitTest { - - @Resource - private SysAuthServiceImpl authService; - - @MockBean - private SysUserService userService; - @MockBean - private SysPermissionService permissionService; - @MockBean - private AuthenticationManager authenticationManager; - @MockBean - private Authentication authentication; - @MockBean - private SysCaptchaService captchaService; - @MockBean - private SysLoginLogService loginLogService; - @MockBean - private SysUserSessionService userSessionService; - - @Test - public void testLoadUserByUsername_success() { - // 准备参数 - String username = randomString(); - // mock 方法 - SysUserDO user = randomUserDO(o -> o.setUsername(username)); - when(userService.getUserByUsername(eq(username))).thenReturn(user); - - // 调用 - LoginUser loginUser = (LoginUser) authService.loadUserByUsername(username); - // 校验 - AssertUtils.assertPojoEquals(user, loginUser, "updateTime"); - assertNull(loginUser.getRoleIds()); // 此时不会加载角色,所以是空的 - } - - @Test - public void testLoadUserByUsername_userNotFound() { - // 准备参数 - String username = randomString(); - // mock 方法 - - // 调用, 并断言异常 - assertThrows(UsernameNotFoundException.class, // 抛出 UsernameNotFoundException 异常 - () -> authService.loadUserByUsername(username), - username); // 异常提示为 username - } - - @Test - public void testMockLogin_success() { - // 准备参数 - Long userId = randomLongId(); - // mock 方法 01 - SysUserDO user = randomUserDO(o -> o.setId(userId)); - when(userService.getUser(eq(userId))).thenReturn(user); - // mock 方法 02 - Set roleIds = randomSet(Long.class); - when(permissionService.getUserRoleIds(eq(userId), eq(singleton(CommonStatusEnum.ENABLE.getStatus())))) - .thenReturn(roleIds); - - // 调用 - LoginUser loginUser = authService.mockLogin(userId); - // 断言 - AssertUtils.assertPojoEquals(user, loginUser, "updateTime"); - assertEquals(roleIds, loginUser.getRoleIds()); - } - - @Test - public void testMockLogin_userNotFound() { - // 准备参数 - Long userId = randomLongId(); - // mock 方法 - - // 调用, 并断言异常 - assertThrows(UsernameNotFoundException.class, // 抛出 UsernameNotFoundException 异常 - () -> authService.mockLogin(userId), - String.valueOf(userId)); // 异常提示为 userId - } - - @Test - public void testLogin_captchaNotFound() { - // 准备参数 - SysAuthLoginReqVO reqVO = randomPojo(SysAuthLoginReqVO.class); - String userIp = randomString(); - String userAgent = randomString(); - // 调用, 并断言异常 - assertServiceException(() -> authService.login(reqVO, userIp, userAgent), AUTH_LOGIN_CAPTCHA_NOT_FOUND); - // 校验调用参数 - verify(loginLogService, times(1)).createLoginLog( - argThat(o -> o.getLogType().equals(SysLoginLogTypeEnum.LOGIN_USERNAME.getType()) - && o.getResult().equals(SysLoginResultEnum.CAPTCHA_NOT_FOUND.getResult())) - ); - } - - @Test - public void testLogin_captchaCodeError() { - // 准备参数 - String userIp = randomString(); - String userAgent = randomString(); - String code = randomString(); - SysAuthLoginReqVO reqVO = randomPojo(SysAuthLoginReqVO.class); - // mock 验证码不正确 - when(captchaService.getCaptchaCode(reqVO.getUuid())).thenReturn(code); - // 调用, 并断言异常 - assertServiceException(() -> authService.login(reqVO, userIp, userAgent), AUTH_LOGIN_CAPTCHA_CODE_ERROR); - // 校验调用参数 - verify(loginLogService, times(1)).createLoginLog( - argThat(o -> o.getLogType().equals(SysLoginLogTypeEnum.LOGIN_USERNAME.getType()) - && o.getResult().equals(SysLoginResultEnum.CAPTCHA_CODE_ERROR.getResult())) - ); - } - - @Test - public void testLogin_badCredentials() { - // 准备参数 - String userIp = randomString(); - String userAgent = randomString(); - SysAuthLoginReqVO reqVO = randomPojo(SysAuthLoginReqVO.class); - // mock 验证码正确 - when(captchaService.getCaptchaCode(reqVO.getUuid())).thenReturn(reqVO.getCode()); - // mock 抛出异常 - when(authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(reqVO.getUsername(), reqVO.getPassword()))) - .thenThrow(new BadCredentialsException("测试账号或密码不正确")); - // 调用, 并断言异常 - assertServiceException(() -> authService.login(reqVO, userIp, userAgent), AUTH_LOGIN_BAD_CREDENTIALS); - // 校验调用参数 - verify(captchaService, times(1)).deleteCaptchaCode(reqVO.getUuid()); - verify(loginLogService, times(1)).createLoginLog( - argThat(o -> o.getLogType().equals(SysLoginLogTypeEnum.LOGIN_USERNAME.getType()) - && o.getResult().equals(SysLoginResultEnum.BAD_CREDENTIALS.getResult())) - ); - } - - @Test - public void testLogin_userDisabled() { - // 准备参数 - String userIp = randomString(); - String userAgent = randomString(); - SysAuthLoginReqVO reqVO = randomPojo(SysAuthLoginReqVO.class); - // mock 验证码正确 - when(captchaService.getCaptchaCode(reqVO.getUuid())).thenReturn(reqVO.getCode()); - // mock 抛出异常 - when(authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(reqVO.getUsername(), reqVO.getPassword()))) - .thenThrow(new DisabledException("测试用户被禁用")); - // 调用, 并断言异常 - assertServiceException(() -> authService.login(reqVO, userIp, userAgent), AUTH_LOGIN_USER_DISABLED); - // 校验调用参数 - verify(captchaService, times(1)).deleteCaptchaCode(reqVO.getUuid()); - verify(loginLogService, times(1)).createLoginLog( - argThat(o -> o.getLogType().equals(SysLoginLogTypeEnum.LOGIN_USERNAME.getType()) - && o.getResult().equals(SysLoginResultEnum.USER_DISABLED.getResult())) - ); - } - - @Test - public void testLogin_unknownError() { - // 准备参数 - String userIp = randomString(); - String userAgent = randomString(); - SysAuthLoginReqVO reqVO = randomPojo(SysAuthLoginReqVO.class); - // mock 验证码正确 - when(captchaService.getCaptchaCode(reqVO.getUuid())).thenReturn(reqVO.getCode()); - // mock 抛出异常 - when(authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(reqVO.getUsername(), reqVO.getPassword()))) - .thenThrow(new AuthenticationException("测试未知异常") {}); - // 调用, 并断言异常 - assertServiceException(() -> authService.login(reqVO, userIp, userAgent), AUTH_LOGIN_FAIL_UNKNOWN); - // 校验调用参数 - verify(captchaService, times(1)).deleteCaptchaCode(reqVO.getUuid()); - verify(loginLogService, times(1)).createLoginLog( - argThat(o -> o.getLogType().equals(SysLoginLogTypeEnum.LOGIN_USERNAME.getType()) - && o.getResult().equals(SysLoginResultEnum.UNKNOWN_ERROR.getResult())) - ); - } - - @Test - public void testLogin_success() { - // 准备参数 - String userIp = randomString(); - String userAgent = randomString(); - Long userId = randomLongId(); - Set userRoleIds = randomSet(Long.class); - String sessionId = randomString(); - SysAuthLoginReqVO reqVO = randomPojo(SysAuthLoginReqVO.class); - LoginUser loginUser = randomPojo(LoginUser.class, o -> { - o.setId(userId); - o.setRoleIds(userRoleIds); - }); - // mock 验证码正确 - when(captchaService.getCaptchaCode(reqVO.getUuid())).thenReturn(reqVO.getCode()); - // mock authentication - when(authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(reqVO.getUsername(), reqVO.getPassword()))) - .thenReturn(authentication); - when(authentication.getPrincipal()).thenReturn(loginUser); - // mock 获得 User 拥有的角色编号数组 - when(permissionService.getUserRoleIds(userId, singleton(CommonStatusEnum.ENABLE.getStatus()))).thenReturn(userRoleIds); - // mock 缓存登陆用户到 Redis - when(userSessionService.createUserSession(loginUser, userIp, userAgent)).thenReturn(sessionId); - // 调用, 并断言异常 - String login = authService.login(reqVO, userIp, userAgent); - assertEquals(sessionId, login); - // 校验调用参数 - verify(captchaService, times(1)).deleteCaptchaCode(reqVO.getUuid()); - verify(loginLogService, times(1)).createLoginLog( - argThat(o -> o.getLogType().equals(SysLoginLogTypeEnum.LOGIN_USERNAME.getType()) - && o.getResult().equals(SysLoginResultEnum.SUCCESS.getResult())) - ); - } - - @Test - public void testLogout_success() { - // 准备参数 - String token = randomString(); - LoginUser loginUser = randomPojo(LoginUser.class); - // mock - when(userSessionService.getLoginUser(token)).thenReturn(loginUser); - // 调用 - authService.logout(token); - // 校验调用参数 - verify(userSessionService, times(1)).deleteUserSession(token); - verify(loginLogService, times(1)).createLoginLog( - argThat(o -> o.getLogType().equals(SysLoginLogTypeEnum.LOGOUT_SELF.getType()) - && o.getResult().equals(SysLoginResultEnum.SUCCESS.getResult())) - ); - } - -} +package cn.iocoder.yudao.adminserver.modules.system.service.auth; + +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.adminserver.modules.system.controller.auth.vo.auth.SysAuthLoginReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.user.SysUserDO; +import cn.iocoder.yudao.adminserver.modules.system.enums.logger.SysLoginLogTypeEnum; +import cn.iocoder.yudao.adminserver.modules.system.enums.logger.SysLoginResultEnum; +import cn.iocoder.yudao.adminserver.modules.system.service.auth.impl.SysAuthServiceImpl; +import cn.iocoder.yudao.adminserver.modules.system.service.common.SysCaptchaService; +import cn.iocoder.yudao.adminserver.modules.system.service.logger.SysLoginLogService; +import cn.iocoder.yudao.adminserver.modules.system.service.permission.SysPermissionService; +import cn.iocoder.yudao.adminserver.modules.system.service.user.SysUserService; +import cn.iocoder.yudao.framework.test.core.util.AssertUtils; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.context.annotation.Import; +import org.springframework.security.authentication.AuthenticationManager; +import org.springframework.security.authentication.BadCredentialsException; +import org.springframework.security.authentication.DisabledException; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.core.userdetails.UsernameNotFoundException; + +import javax.annotation.Resource; +import java.util.Set; + +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; +import static java.util.Collections.singleton; +import static org.junit.jupiter.api.Assertions.*; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.*; + +/** + * {@link SysAuthServiceImpl} 的单元测试 + * + * @author 芋道源码 + */ +@Import(SysAuthServiceImpl.class) +public class SysAuthServiceImplTest extends BaseDbUnitTest { + + @Resource + private SysAuthServiceImpl authService; + + @MockBean + private SysUserService userService; + @MockBean + private SysPermissionService permissionService; + @MockBean + private AuthenticationManager authenticationManager; + @MockBean + private Authentication authentication; + @MockBean + private SysCaptchaService captchaService; + @MockBean + private SysLoginLogService loginLogService; + @MockBean + private SysUserSessionService userSessionService; + + @Test + public void testLoadUserByUsername_success() { + // 准备参数 + String username = randomString(); + // mock 方法 + SysUserDO user = randomPojo(SysUserDO.class, o -> o.setUsername(username)); + when(userService.getUserByUsername(eq(username))).thenReturn(user); + + // 调用 + LoginUser loginUser = (LoginUser) authService.loadUserByUsername(username); + // 校验 + AssertUtils.assertPojoEquals(user, loginUser, "updateTime"); + assertNull(loginUser.getRoleIds()); // 此时不会加载角色,所以是空的 + } + + @Test + public void testLoadUserByUsername_userNotFound() { + // 准备参数 + String username = randomString(); + // mock 方法 + + // 调用, 并断言异常 + assertThrows(UsernameNotFoundException.class, // 抛出 UsernameNotFoundException 异常 + () -> authService.loadUserByUsername(username), + username); // 异常提示为 username + } + + @Test + public void testMockLogin_success() { + // 准备参数 + Long userId = randomLongId(); + // mock 方法 01 + SysUserDO user = randomPojo(SysUserDO.class, o -> o.setId(userId)); + when(userService.getUser(eq(userId))).thenReturn(user); + // mock 方法 02 + Set roleIds = randomSet(Long.class); + when(permissionService.getUserRoleIds(eq(userId), eq(singleton(CommonStatusEnum.ENABLE.getStatus())))) + .thenReturn(roleIds); + + // 调用 + LoginUser loginUser = authService.mockLogin(userId); + // 断言 + AssertUtils.assertPojoEquals(user, loginUser, "updateTime"); + assertEquals(roleIds, loginUser.getRoleIds()); + } + + @Test + public void testMockLogin_userNotFound() { + // 准备参数 + Long userId = randomLongId(); + // mock 方法 + + // 调用, 并断言异常 + assertThrows(UsernameNotFoundException.class, // 抛出 UsernameNotFoundException 异常 + () -> authService.mockLogin(userId), + String.valueOf(userId)); // 异常提示为 userId + } + + @Test + public void testLogin_captchaNotFound() { + // 准备参数 + SysAuthLoginReqVO reqVO = randomPojo(SysAuthLoginReqVO.class); + String userIp = randomString(); + String userAgent = randomString(); + // 调用, 并断言异常 + assertServiceException(() -> authService.login(reqVO, userIp, userAgent), AUTH_LOGIN_CAPTCHA_NOT_FOUND); + // 校验调用参数 + verify(loginLogService, times(1)).createLoginLog( + argThat(o -> o.getLogType().equals(SysLoginLogTypeEnum.LOGIN_USERNAME.getType()) + && o.getResult().equals(SysLoginResultEnum.CAPTCHA_NOT_FOUND.getResult())) + ); + } + + @Test + public void testLogin_captchaCodeError() { + // 准备参数 + String userIp = randomString(); + String userAgent = randomString(); + String code = randomString(); + SysAuthLoginReqVO reqVO = randomPojo(SysAuthLoginReqVO.class); + // mock 验证码不正确 + when(captchaService.getCaptchaCode(reqVO.getUuid())).thenReturn(code); + // 调用, 并断言异常 + assertServiceException(() -> authService.login(reqVO, userIp, userAgent), AUTH_LOGIN_CAPTCHA_CODE_ERROR); + // 校验调用参数 + verify(loginLogService, times(1)).createLoginLog( + argThat(o -> o.getLogType().equals(SysLoginLogTypeEnum.LOGIN_USERNAME.getType()) + && o.getResult().equals(SysLoginResultEnum.CAPTCHA_CODE_ERROR.getResult())) + ); + } + + @Test + public void testLogin_badCredentials() { + // 准备参数 + String userIp = randomString(); + String userAgent = randomString(); + SysAuthLoginReqVO reqVO = randomPojo(SysAuthLoginReqVO.class); + // mock 验证码正确 + when(captchaService.getCaptchaCode(reqVO.getUuid())).thenReturn(reqVO.getCode()); + // mock 抛出异常 + when(authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(reqVO.getUsername(), reqVO.getPassword()))) + .thenThrow(new BadCredentialsException("测试账号或密码不正确")); + // 调用, 并断言异常 + assertServiceException(() -> authService.login(reqVO, userIp, userAgent), AUTH_LOGIN_BAD_CREDENTIALS); + // 校验调用参数 + verify(captchaService, times(1)).deleteCaptchaCode(reqVO.getUuid()); + verify(loginLogService, times(1)).createLoginLog( + argThat(o -> o.getLogType().equals(SysLoginLogTypeEnum.LOGIN_USERNAME.getType()) + && o.getResult().equals(SysLoginResultEnum.BAD_CREDENTIALS.getResult())) + ); + } + + @Test + public void testLogin_userDisabled() { + // 准备参数 + String userIp = randomString(); + String userAgent = randomString(); + SysAuthLoginReqVO reqVO = randomPojo(SysAuthLoginReqVO.class); + // mock 验证码正确 + when(captchaService.getCaptchaCode(reqVO.getUuid())).thenReturn(reqVO.getCode()); + // mock 抛出异常 + when(authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(reqVO.getUsername(), reqVO.getPassword()))) + .thenThrow(new DisabledException("测试用户被禁用")); + // 调用, 并断言异常 + assertServiceException(() -> authService.login(reqVO, userIp, userAgent), AUTH_LOGIN_USER_DISABLED); + // 校验调用参数 + verify(captchaService, times(1)).deleteCaptchaCode(reqVO.getUuid()); + verify(loginLogService, times(1)).createLoginLog( + argThat(o -> o.getLogType().equals(SysLoginLogTypeEnum.LOGIN_USERNAME.getType()) + && o.getResult().equals(SysLoginResultEnum.USER_DISABLED.getResult())) + ); + } + + @Test + public void testLogin_unknownError() { + // 准备参数 + String userIp = randomString(); + String userAgent = randomString(); + SysAuthLoginReqVO reqVO = randomPojo(SysAuthLoginReqVO.class); + // mock 验证码正确 + when(captchaService.getCaptchaCode(reqVO.getUuid())).thenReturn(reqVO.getCode()); + // mock 抛出异常 + when(authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(reqVO.getUsername(), reqVO.getPassword()))) + .thenThrow(new AuthenticationException("测试未知异常") {}); + // 调用, 并断言异常 + assertServiceException(() -> authService.login(reqVO, userIp, userAgent), AUTH_LOGIN_FAIL_UNKNOWN); + // 校验调用参数 + verify(captchaService, times(1)).deleteCaptchaCode(reqVO.getUuid()); + verify(loginLogService, times(1)).createLoginLog( + argThat(o -> o.getLogType().equals(SysLoginLogTypeEnum.LOGIN_USERNAME.getType()) + && o.getResult().equals(SysLoginResultEnum.UNKNOWN_ERROR.getResult())) + ); + } + + @Test + public void testLogin_success() { + // 准备参数 + String userIp = randomString(); + String userAgent = randomString(); + Long userId = randomLongId(); + Set userRoleIds = randomSet(Long.class); + String sessionId = randomString(); + SysAuthLoginReqVO reqVO = randomPojo(SysAuthLoginReqVO.class); + LoginUser loginUser = randomPojo(LoginUser.class, o -> { + o.setId(userId); + o.setRoleIds(userRoleIds); + }); + // mock 验证码正确 + when(captchaService.getCaptchaCode(reqVO.getUuid())).thenReturn(reqVO.getCode()); + // mock authentication + when(authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(reqVO.getUsername(), reqVO.getPassword()))) + .thenReturn(authentication); + when(authentication.getPrincipal()).thenReturn(loginUser); + // mock 获得 User 拥有的角色编号数组 + when(permissionService.getUserRoleIds(userId, singleton(CommonStatusEnum.ENABLE.getStatus()))).thenReturn(userRoleIds); + // mock 缓存登陆用户到 Redis + when(userSessionService.createUserSession(loginUser, userIp, userAgent)).thenReturn(sessionId); + // 调用, 并断言异常 + String login = authService.login(reqVO, userIp, userAgent); + assertEquals(sessionId, login); + // 校验调用参数 + verify(captchaService, times(1)).deleteCaptchaCode(reqVO.getUuid()); + verify(loginLogService, times(1)).createLoginLog( + argThat(o -> o.getLogType().equals(SysLoginLogTypeEnum.LOGIN_USERNAME.getType()) + && o.getResult().equals(SysLoginResultEnum.SUCCESS.getResult())) + ); + } + + @Test + public void testLogout_success() { + // 准备参数 + String token = randomString(); + LoginUser loginUser = randomPojo(LoginUser.class); + // mock + when(userSessionService.getLoginUser(token)).thenReturn(loginUser); + // 调用 + authService.logout(token); + // 校验调用参数 + verify(userSessionService, times(1)).deleteUserSession(token); + verify(loginLogService, times(1)).createLoginLog( + argThat(o -> o.getLogType().equals(SysLoginLogTypeEnum.LOGOUT_SELF.getType()) + && o.getResult().equals(SysLoginResultEnum.SUCCESS.getResult())) + ); + } + +} diff --git a/src/test/java/cn/iocoder/dashboard/modules/system/service/auth/SysUserSessionServiceImplTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/auth/SysUserSessionServiceImplTest.java similarity index 80% rename from src/test/java/cn/iocoder/dashboard/modules/system/service/auth/SysUserSessionServiceImplTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/auth/SysUserSessionServiceImplTest.java index 740519430..026b23d67 100644 --- a/src/test/java/cn/iocoder/dashboard/modules/system/service/auth/SysUserSessionServiceImplTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/auth/SysUserSessionServiceImplTest.java @@ -1,12 +1,12 @@ -package cn.iocoder.dashboard.modules.system.service.auth; +package cn.iocoder.yudao.adminserver.modules.system.service.auth; import static cn.hutool.core.util.RandomUtil.randomEle; -import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals; -import static cn.iocoder.dashboard.util.RandomUtils.randomDate; -import static cn.iocoder.dashboard.util.RandomUtils.randomLongId; -import static cn.iocoder.dashboard.util.RandomUtils.randomPojo; -import static cn.iocoder.dashboard.util.RandomUtils.randomString; -import static cn.iocoder.dashboard.util.date.DateUtils.addTime; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomDate; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomLongId; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomString; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.addTime; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -26,25 +26,25 @@ import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.annotation.Import; import cn.hutool.core.date.DateUtil; -import cn.iocoder.dashboard.BaseDbAndRedisUnitTest; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.security.config.SecurityProperties; -import cn.iocoder.dashboard.framework.security.core.LoginUser; -import cn.iocoder.dashboard.modules.system.controller.auth.vo.session.SysUserSessionPageReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.auth.SysUserSessionDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.auth.SysUserSessionMapper; -import cn.iocoder.dashboard.modules.system.dal.mysql.user.SysUserMapper; -import cn.iocoder.dashboard.modules.system.dal.redis.auth.SysLoginUserRedisDAO; -import cn.iocoder.dashboard.modules.system.enums.common.SysSexEnum; -import cn.iocoder.dashboard.modules.system.service.auth.impl.SysUserSessionServiceImpl; -import cn.iocoder.dashboard.modules.system.service.dept.impl.SysDeptServiceImpl; -import cn.iocoder.dashboard.modules.system.service.logger.impl.SysLoginLogServiceImpl; -import cn.iocoder.dashboard.modules.system.service.user.SysUserServiceImpl; -import cn.iocoder.dashboard.util.AssertUtils; -import cn.iocoder.dashboard.util.RandomUtils; -import cn.iocoder.dashboard.util.object.ObjectUtils; +import cn.iocoder.yudao.adminserver.BaseDbAndRedisUnitTest; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.security.config.SecurityProperties; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.adminserver.modules.system.controller.auth.vo.session.SysUserSessionPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.auth.SysUserSessionDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.user.SysUserDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.auth.SysUserSessionMapper; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.user.SysUserMapper; +import cn.iocoder.yudao.adminserver.modules.system.dal.redis.auth.SysLoginUserRedisDAO; +import cn.iocoder.yudao.adminserver.modules.system.enums.common.SysSexEnum; +import cn.iocoder.yudao.adminserver.modules.system.service.auth.impl.SysUserSessionServiceImpl; +import cn.iocoder.yudao.adminserver.modules.system.service.dept.impl.SysDeptServiceImpl; +import cn.iocoder.yudao.adminserver.modules.system.service.logger.impl.SysLoginLogServiceImpl; +import cn.iocoder.yudao.adminserver.modules.system.service.user.SysUserServiceImpl; +import cn.iocoder.yudao.framework.test.core.util.AssertUtils; +import cn.iocoder.yudao.framework.test.core.util.RandomUtils; +import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; /** * SysUserSessionServiceImpl Tester. diff --git a/src/test/java/cn/iocoder/dashboard/modules/system/service/common/SysCaptchaServiceTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/common/SysCaptchaServiceTest.java similarity index 74% rename from src/test/java/cn/iocoder/dashboard/modules/system/service/common/SysCaptchaServiceTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/common/SysCaptchaServiceTest.java index ed127442d..c45ed4cbf 100644 --- a/src/test/java/cn/iocoder/dashboard/modules/system/service/common/SysCaptchaServiceTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/common/SysCaptchaServiceTest.java @@ -1,16 +1,16 @@ -package cn.iocoder.dashboard.modules.system.service.common; +package cn.iocoder.yudao.adminserver.modules.system.service.common; -import cn.iocoder.dashboard.BaseRedisUnitTest; -import cn.iocoder.dashboard.framework.captcha.config.CaptchaProperties; -import cn.iocoder.dashboard.modules.system.controller.common.vo.SysCaptchaImageRespVO; -import cn.iocoder.dashboard.modules.system.dal.redis.common.SysCaptchaRedisDAO; -import cn.iocoder.dashboard.modules.system.service.common.impl.SysCaptchaServiceImpl; +import cn.iocoder.yudao.adminserver.BaseRedisUnitTest; +import cn.iocoder.yudao.adminserver.modules.system.framework.captcha.config.CaptchaProperties; +import cn.iocoder.yudao.adminserver.modules.system.controller.common.vo.SysCaptchaImageRespVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.redis.common.SysCaptchaRedisDAO; +import cn.iocoder.yudao.adminserver.modules.system.service.common.impl.SysCaptchaServiceImpl; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Import; import javax.annotation.Resource; -import static cn.iocoder.dashboard.util.RandomUtils.randomString; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomString; import static org.junit.jupiter.api.Assertions.*; @Import({SysCaptchaServiceImpl.class, CaptchaProperties.class, SysCaptchaRedisDAO.class}) diff --git a/src/test/java/cn/iocoder/dashboard/modules/system/service/dept/SysDeptServiceTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/dept/SysDeptServiceTest.java similarity index 87% rename from src/test/java/cn/iocoder/dashboard/modules/system/service/dept/SysDeptServiceTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/dept/SysDeptServiceTest.java index 48a80056e..076a5aaf5 100644 --- a/src/test/java/cn/iocoder/dashboard/modules/system/service/dept/SysDeptServiceTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/dept/SysDeptServiceTest.java @@ -1,17 +1,17 @@ -package cn.iocoder.dashboard.modules.system.service.dept; +package cn.iocoder.yudao.adminserver.modules.system.service.dept; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.modules.system.controller.dept.vo.dept.SysDeptCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.dept.vo.dept.SysDeptListReqVO; -import cn.iocoder.dashboard.modules.system.controller.dept.vo.dept.SysDeptUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysDeptDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.dept.SysDeptMapper; -import cn.iocoder.dashboard.modules.system.enums.dept.DeptIdEnum; -import cn.iocoder.dashboard.modules.system.mq.producer.dept.SysDeptProducer; -import cn.iocoder.dashboard.modules.system.service.dept.impl.SysDeptServiceImpl; -import cn.iocoder.dashboard.util.collection.ArrayUtils; -import cn.iocoder.dashboard.util.object.ObjectUtils; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.dept.SysDeptCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.dept.SysDeptListReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.dept.SysDeptUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dept.SysDeptDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.dept.SysDeptMapper; +import cn.iocoder.yudao.adminserver.modules.system.enums.dept.DeptIdEnum; +import cn.iocoder.yudao.adminserver.modules.system.mq.producer.dept.SysDeptProducer; +import cn.iocoder.yudao.adminserver.modules.system.service.dept.impl.SysDeptServiceImpl; +import cn.iocoder.yudao.framework.common.util.collection.ArrayUtils; +import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import com.google.common.collect.Multimap; import org.junit.jupiter.api.Test; import org.springframework.boot.test.mock.mockito.MockBean; @@ -25,10 +25,10 @@ import java.util.function.Consumer; import static cn.hutool.core.bean.BeanUtil.getFieldValue; import static cn.hutool.core.util.RandomUtil.randomEle; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*; -import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals; -import static cn.iocoder.dashboard.util.AssertUtils.assertServiceException; -import static cn.iocoder.dashboard.util.RandomUtils.*; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; diff --git a/src/test/java/cn/iocoder/dashboard/modules/system/service/dept/SysPostServiceTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/dept/SysPostServiceTest.java similarity index 80% rename from src/test/java/cn/iocoder/dashboard/modules/system/service/dept/SysPostServiceTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/dept/SysPostServiceTest.java index be8b3225d..c036a7ec5 100644 --- a/src/test/java/cn/iocoder/dashboard/modules/system/service/dept/SysPostServiceTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/dept/SysPostServiceTest.java @@ -1,17 +1,17 @@ -package cn.iocoder.dashboard.modules.system.service.dept; +package cn.iocoder.yudao.adminserver.modules.system.service.dept; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.dept.vo.post.SysPostCreateReqVO; -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.controller.dept.vo.post.SysPostUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysPostDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.dept.SysPostMapper; -import cn.iocoder.dashboard.modules.system.service.dept.impl.SysPostServiceImpl; -import cn.iocoder.dashboard.util.collection.ArrayUtils; -import cn.iocoder.dashboard.util.object.ObjectUtils; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.post.SysPostCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.post.SysPostExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.post.SysPostPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dept.vo.post.SysPostUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dept.SysPostDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.dept.SysPostMapper; +import cn.iocoder.yudao.adminserver.modules.system.service.dept.impl.SysPostServiceImpl; +import cn.iocoder.yudao.framework.common.util.collection.ArrayUtils; +import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Import; @@ -20,11 +20,11 @@ import java.util.List; import java.util.function.Consumer; import static cn.hutool.core.util.RandomUtil.randomEle; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*; -import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals; -import static cn.iocoder.dashboard.util.AssertUtils.assertServiceException; -import static cn.iocoder.dashboard.util.RandomUtils.randomLongId; -import static cn.iocoder.dashboard.util.RandomUtils.randomPojo; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomLongId; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; import static org.junit.jupiter.api.Assertions.*; /** diff --git a/src/test/java/cn/iocoder/dashboard/modules/system/service/dict/SysDictDataServiceTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/dict/SysDictDataServiceTest.java similarity index 87% rename from src/test/java/cn/iocoder/dashboard/modules/system/service/dict/SysDictDataServiceTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/dict/SysDictDataServiceTest.java index 2874285e4..ecb009335 100644 --- a/src/test/java/cn/iocoder/dashboard/modules/system/service/dict/SysDictDataServiceTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/dict/SysDictDataServiceTest.java @@ -1,19 +1,19 @@ -package cn.iocoder.dashboard.modules.system.service.dict; +package cn.iocoder.yudao.adminserver.modules.system.service.dict; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.dict.vo.data.SysDictDataCreateReqVO; -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.controller.dict.vo.data.SysDictDataUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dict.SysDictDataDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dict.SysDictTypeDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.dict.SysDictDataMapper; -import cn.iocoder.dashboard.modules.system.mq.producer.dict.SysDictDataProducer; -import cn.iocoder.dashboard.modules.system.service.dict.impl.SysDictDataServiceImpl; -import cn.iocoder.dashboard.util.collection.ArrayUtils; -import cn.iocoder.dashboard.util.object.ObjectUtils; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.data.SysDictDataCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.data.SysDictDataExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.data.SysDictDataPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.data.SysDictDataUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dict.SysDictDataDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dict.SysDictTypeDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.dict.SysDictDataMapper; +import cn.iocoder.yudao.adminserver.modules.system.mq.producer.dict.SysDictDataProducer; +import cn.iocoder.yudao.adminserver.modules.system.service.dict.impl.SysDictDataServiceImpl; +import cn.iocoder.yudao.framework.common.util.collection.ArrayUtils; +import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import com.google.common.collect.ImmutableTable; import org.junit.jupiter.api.Test; import org.springframework.boot.test.mock.mockito.MockBean; @@ -25,10 +25,10 @@ import java.util.List; import java.util.function.Consumer; import static cn.hutool.core.bean.BeanUtil.getFieldValue; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*; -import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals; -import static cn.iocoder.dashboard.util.AssertUtils.assertServiceException; -import static cn.iocoder.dashboard.util.RandomUtils.*; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.*; diff --git a/src/test/java/cn/iocoder/dashboard/modules/system/service/dict/SysDictTypeServiceTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/dict/SysDictTypeServiceTest.java similarity index 86% rename from src/test/java/cn/iocoder/dashboard/modules/system/service/dict/SysDictTypeServiceTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/dict/SysDictTypeServiceTest.java index 9dd072733..212701d63 100644 --- a/src/test/java/cn/iocoder/dashboard/modules/system/service/dict/SysDictTypeServiceTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/dict/SysDictTypeServiceTest.java @@ -1,17 +1,17 @@ -package cn.iocoder.dashboard.modules.system.service.dict; +package cn.iocoder.yudao.adminserver.modules.system.service.dict; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.dict.vo.type.SysDictTypeCreateReqVO; -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.controller.dict.vo.type.SysDictTypeUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dict.SysDictTypeDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.dict.SysDictTypeMapper; -import cn.iocoder.dashboard.modules.system.service.dict.impl.SysDictTypeServiceImpl; -import cn.iocoder.dashboard.util.collection.ArrayUtils; -import cn.iocoder.dashboard.util.object.ObjectUtils; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.type.SysDictTypeCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.type.SysDictTypeExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.type.SysDictTypePageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.dict.vo.type.SysDictTypeUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dict.SysDictTypeDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.dict.SysDictTypeMapper; +import cn.iocoder.yudao.adminserver.modules.system.service.dict.impl.SysDictTypeServiceImpl; +import cn.iocoder.yudao.framework.common.util.collection.ArrayUtils; +import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import org.junit.jupiter.api.Test; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.annotation.Import; @@ -21,11 +21,11 @@ import java.util.List; import java.util.function.Consumer; import static cn.hutool.core.util.RandomUtil.randomEle; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*; -import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals; -import static cn.iocoder.dashboard.util.AssertUtils.assertServiceException; -import static cn.iocoder.dashboard.util.RandomUtils.*; -import static cn.iocoder.dashboard.util.date.DateUtils.buildTime; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; diff --git a/src/test/java/cn/iocoder/dashboard/modules/system/service/errorcode/SysErrorCodeServiceTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/errorcode/SysErrorCodeServiceTest.java similarity index 85% rename from src/test/java/cn/iocoder/dashboard/modules/system/service/errorcode/SysErrorCodeServiceTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/errorcode/SysErrorCodeServiceTest.java index c704dd6a0..f5dbc7108 100644 --- a/src/test/java/cn/iocoder/dashboard/modules/system/service/errorcode/SysErrorCodeServiceTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/errorcode/SysErrorCodeServiceTest.java @@ -1,19 +1,19 @@ -package cn.iocoder.dashboard.modules.system.service.errorcode; +package cn.iocoder.yudao.adminserver.modules.system.service.errorcode; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.errorcode.core.dto.ErrorCodeAutoGenerateReqDTO; -import cn.iocoder.dashboard.modules.infra.enums.config.InfConfigTypeEnum; -import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodeCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodeExportReqVO; -import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodePageReqVO; -import cn.iocoder.dashboard.modules.system.controller.errorcode.vo.SysErrorCodeUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.errorcode.SysErrorCodeDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.errorcode.SysErrorCodeMapper; -import cn.iocoder.dashboard.modules.system.enums.errorcode.SysErrorCodeTypeEnum; -import cn.iocoder.dashboard.modules.system.service.errorcode.impl.SysErrorCodeServiceImpl; -import cn.iocoder.dashboard.util.collection.ArrayUtils; -import cn.iocoder.dashboard.util.object.ObjectUtils; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.tool.framework.errorcode.core.dto.ErrorCodeAutoGenerateReqDTO; +import cn.iocoder.yudao.adminserver.modules.infra.enums.config.InfConfigTypeEnum; +import cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo.SysErrorCodeCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo.SysErrorCodeExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo.SysErrorCodePageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.errorcode.vo.SysErrorCodeUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.errorcode.SysErrorCodeDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.errorcode.SysErrorCodeMapper; +import cn.iocoder.yudao.adminserver.modules.system.enums.errorcode.SysErrorCodeTypeEnum; +import cn.iocoder.yudao.adminserver.modules.system.service.errorcode.impl.SysErrorCodeServiceImpl; +import cn.iocoder.yudao.framework.common.util.collection.ArrayUtils; +import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import org.assertj.core.util.Lists; import org.junit.jupiter.api.Test; import org.mockito.Mock; @@ -25,12 +25,12 @@ import java.util.List; import java.util.function.Consumer; import static cn.hutool.core.util.RandomUtil.randomEle; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.ERROR_CODE_DUPLICATE; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.ERROR_CODE_NOT_EXISTS; -import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals; -import static cn.iocoder.dashboard.util.AssertUtils.assertServiceException; -import static cn.iocoder.dashboard.util.RandomUtils.*; -import static cn.iocoder.dashboard.util.date.DateUtils.buildTime; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.ERROR_CODE_DUPLICATE; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.ERROR_CODE_NOT_EXISTS; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; import static org.junit.jupiter.api.Assertions.*; /** diff --git a/src/test/java/cn/iocoder/dashboard/modules/system/service/logger/SysLoginLogServiceImplTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/logger/SysLoginLogServiceImplTest.java similarity index 78% rename from src/test/java/cn/iocoder/dashboard/modules/system/service/logger/SysLoginLogServiceImplTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/logger/SysLoginLogServiceImplTest.java index 95f2d1985..d6a921fe1 100644 --- a/src/test/java/cn/iocoder/dashboard/modules/system/service/logger/SysLoginLogServiceImplTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/logger/SysLoginLogServiceImplTest.java @@ -1,33 +1,27 @@ -package cn.iocoder.dashboard.modules.system.service.logger; +package cn.iocoder.yudao.adminserver.modules.system.service.logger; -import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.RandomUtil; -import cn.hutool.core.util.ReflectUtil; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.dashboard.framework.tracer.core.util.TracerUtils; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogExportReqVO; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogPageReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.logger.SysLoginLogDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.logger.SysLoginLogMapper; -import cn.iocoder.dashboard.modules.system.enums.logger.SysLoginLogTypeEnum; -import cn.iocoder.dashboard.modules.system.enums.logger.SysLoginResultEnum; -import cn.iocoder.dashboard.modules.system.service.logger.impl.SysLoginLogServiceImpl; -import cn.iocoder.dashboard.util.RandomUtils; -import cn.iocoder.dashboard.util.object.ObjectUtils; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.monitor.TracerUtils; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog.SysLoginLogCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog.SysLoginLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.loginlog.SysLoginLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.logger.SysLoginLogDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.logger.SysLoginLogMapper; +import cn.iocoder.yudao.adminserver.modules.system.enums.logger.SysLoginLogTypeEnum; +import cn.iocoder.yudao.adminserver.modules.system.enums.logger.SysLoginResultEnum; +import cn.iocoder.yudao.adminserver.modules.system.service.logger.impl.SysLoginLogServiceImpl; +import cn.iocoder.yudao.framework.test.core.util.RandomUtils; +import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Import; import javax.annotation.Resource; -import java.lang.reflect.Field; -import java.util.Arrays; import java.util.List; -import java.util.stream.Collectors; -import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals; -import static cn.iocoder.dashboard.util.date.DateUtils.buildTime; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; import static org.junit.jupiter.api.Assertions.assertEquals; @Import(SysLoginLogServiceImpl.class) diff --git a/src/test/java/cn/iocoder/dashboard/modules/system/service/logger/SysOperateLogServiceImplTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/logger/SysOperateLogServiceImplTest.java similarity index 78% rename from src/test/java/cn/iocoder/dashboard/modules/system/service/logger/SysOperateLogServiceImplTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/logger/SysOperateLogServiceImplTest.java index 67f99e35f..48cc4c5cc 100644 --- a/src/test/java/cn/iocoder/dashboard/modules/system/service/logger/SysOperateLogServiceImplTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/logger/SysOperateLogServiceImplTest.java @@ -1,23 +1,23 @@ -package cn.iocoder.dashboard.modules.system.service.logger; +package cn.iocoder.yudao.adminserver.modules.system.service.logger; import cn.hutool.core.map.MapUtil; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.common.exception.enums.GlobalErrorCodeConstants; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum; -import cn.iocoder.dashboard.framework.tracer.core.util.TracerUtils; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogExportReqVO; -import cn.iocoder.dashboard.modules.system.controller.logger.vo.operatelog.SysOperateLogPageReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.logger.SysOperateLogDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.logger.SysOperateLogMapper; -import cn.iocoder.dashboard.modules.system.enums.common.SysSexEnum; -import cn.iocoder.dashboard.modules.system.service.logger.impl.SysOperateLogServiceImpl; -import cn.iocoder.dashboard.modules.system.service.user.SysUserService; -import cn.iocoder.dashboard.util.RandomUtils; -import cn.iocoder.dashboard.util.object.ObjectUtils; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum; +import cn.iocoder.yudao.framework.common.util.monitor.TracerUtils; +import cn.iocoder.yudao.framework.operatelog.core.dto.OperateLogCreateReqDTO; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.operatelog.SysOperateLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.logger.vo.operatelog.SysOperateLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.logger.SysOperateLogDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.user.SysUserDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.logger.SysOperateLogMapper; +import cn.iocoder.yudao.adminserver.modules.system.enums.common.SysSexEnum; +import cn.iocoder.yudao.adminserver.modules.system.service.logger.impl.SysOperateLogServiceImpl; +import cn.iocoder.yudao.adminserver.modules.system.service.user.SysUserService; +import cn.iocoder.yudao.framework.test.core.util.RandomUtils; +import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import org.junit.jupiter.api.Test; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.annotation.Import; @@ -27,9 +27,9 @@ import java.util.*; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; -import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals; -import static cn.iocoder.dashboard.util.RandomUtils.randomLongId; -import static cn.iocoder.dashboard.util.date.DateUtils.buildTime; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomLongId; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.when; @@ -48,7 +48,7 @@ public class SysOperateLogServiceImplTest extends BaseDbUnitTest { @Test public void testCreateOperateLogAsync() throws InterruptedException, ExecutionException { String traceId = TracerUtils.getTraceId(); - SysOperateLogCreateReqVO reqVO = RandomUtils.randomPojo(SysOperateLogCreateReqVO.class, o -> { + OperateLogCreateReqDTO reqVO = RandomUtils.randomPojo(OperateLogCreateReqDTO.class, o -> { o.setTraceId(traceId); o.setUserId(randomLongId()); o.setExts(MapUtil.builder("orderId", randomLongId()).build()); diff --git a/src/test/java/cn/iocoder/dashboard/modules/system/service/notice/SysNoticeServiceImplTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/notice/SysNoticeServiceImplTest.java similarity index 78% rename from src/test/java/cn/iocoder/dashboard/modules/system/service/notice/SysNoticeServiceImplTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/notice/SysNoticeServiceImplTest.java index 801ecea8c..9b6626261 100644 --- a/src/test/java/cn/iocoder/dashboard/modules/system/service/notice/SysNoticeServiceImplTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/notice/SysNoticeServiceImplTest.java @@ -1,16 +1,16 @@ -package cn.iocoder.dashboard.modules.system.service.notice; +package cn.iocoder.yudao.adminserver.modules.system.service.notice; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.notice.vo.SysNoticeCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.notice.vo.SysNoticePageReqVO; -import cn.iocoder.dashboard.modules.system.controller.notice.vo.SysNoticeUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.notice.SysNoticeDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.notice.SysNoticeMapper; -import cn.iocoder.dashboard.modules.system.enums.notice.SysNoticeTypeEnum; -import cn.iocoder.dashboard.modules.system.service.notice.impl.SysNoticeServiceImpl; -import cn.iocoder.dashboard.util.object.ObjectUtils; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.notice.vo.SysNoticeCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.notice.vo.SysNoticePageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.notice.vo.SysNoticeUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.notice.SysNoticeDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.notice.SysNoticeMapper; +import cn.iocoder.yudao.adminserver.modules.system.enums.notice.SysNoticeTypeEnum; +import cn.iocoder.yudao.adminserver.modules.system.service.notice.impl.SysNoticeServiceImpl; +import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Import; @@ -19,11 +19,11 @@ import javax.annotation.Resource; import java.util.function.Consumer; import static cn.hutool.core.util.RandomUtil.randomEle; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.NOTICE_NOT_FOUND; -import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals; -import static cn.iocoder.dashboard.util.AssertUtils.assertServiceException; -import static cn.iocoder.dashboard.util.RandomUtils.randomLongId; -import static cn.iocoder.dashboard.util.RandomUtils.randomPojo; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.NOTICE_NOT_FOUND; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomLongId; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; import static org.junit.jupiter.api.Assertions.*; @Import(SysNoticeServiceImpl.class) @@ -161,4 +161,4 @@ class SysNoticeServiceImplTest extends BaseDbUnitTest { } -} \ No newline at end of file +} diff --git a/src/test/java/cn/iocoder/dashboard/modules/system/service/permission/SysMenuServiceTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/SysMenuServiceTest.java similarity index 87% rename from src/test/java/cn/iocoder/dashboard/modules/system/service/permission/SysMenuServiceTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/SysMenuServiceTest.java index c120fd870..81dcfd71d 100644 --- a/src/test/java/cn/iocoder/dashboard/modules/system/service/permission/SysMenuServiceTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/SysMenuServiceTest.java @@ -1,366 +1,366 @@ -package cn.iocoder.dashboard.modules.system.service.permission; - -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.lang.Assert; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.modules.system.controller.permission.vo.menu.SysMenuCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.permission.vo.menu.SysMenuListReqVO; -import cn.iocoder.dashboard.modules.system.controller.permission.vo.menu.SysMenuUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysMenuDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.permission.SysMenuMapper; -import cn.iocoder.dashboard.modules.system.enums.permission.MenuTypeEnum; -import cn.iocoder.dashboard.modules.system.mq.producer.permission.SysMenuProducer; -import cn.iocoder.dashboard.modules.system.service.permission.impl.SysMenuServiceImpl; -import cn.iocoder.dashboard.util.sping.SpringAopUtils; -import cn.iocoder.dashboard.util.RandomUtils; -import cn.iocoder.dashboard.util.object.ObjectUtils; -import com.google.common.collect.Multimap; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.mock.mockito.MockBean; -import org.springframework.context.annotation.Import; - -import javax.annotation.Resource; -import java.util.*; - -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*; -import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals; -import static cn.iocoder.dashboard.util.AssertUtils.assertServiceException; -import static cn.iocoder.dashboard.util.RandomUtils.*; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.mockito.Mockito.verify; - -@Import(SysMenuServiceImpl.class) -public class SysMenuServiceTest extends BaseDbUnitTest { - - @Resource - private SysMenuServiceImpl sysMenuService; - - @MockBean - private SysPermissionService sysPermissionService; - - @MockBean - private SysMenuProducer sysMenuProducer; - - @Resource - private SysMenuMapper menuMapper; - - @Test - public void testInitLocalCache_success() throws Exception { - SysMenuDO menuDO1 = createMenuDO(MenuTypeEnum.MENU, "xxxx", 0L); - menuMapper.insert(menuDO1); - SysMenuDO menuDO2 = createMenuDO(MenuTypeEnum.MENU, "xxxx", 0L); - menuMapper.insert(menuDO2); - - // 调用 - sysMenuService.initLocalCache(); - - // 获取代理对象 - SysMenuServiceImpl target = (SysMenuServiceImpl) SpringAopUtils.getTarget(sysMenuService); - - Map menuCache = - (Map) BeanUtil.getFieldValue(target, "menuCache"); - Assert.isTrue(menuCache.size() == 2); - assertPojoEquals(menuDO1, menuCache.get(menuDO1.getId())); - assertPojoEquals(menuDO2, menuCache.get(menuDO2.getId())); - - Multimap permissionMenuCache = - (Multimap) BeanUtil.getFieldValue(target, "permissionMenuCache"); - Assert.isTrue(permissionMenuCache.size() == 2); - assertPojoEquals(menuDO1, permissionMenuCache.get(menuDO1.getPermission())); - assertPojoEquals(menuDO2, permissionMenuCache.get(menuDO2.getPermission())); - - Date maxUpdateTime = (Date) BeanUtil.getFieldValue(target, "maxUpdateTime"); - assertEquals(ObjectUtils.max(menuDO1.getUpdateTime(), menuDO2.getUpdateTime()), maxUpdateTime); - } - - @Test - public void testCreateMenu_success() { - //构造父目录 - SysMenuDO menuDO = createMenuDO(MenuTypeEnum.MENU, "parent", 0L); - menuMapper.insert(menuDO); - Long parentId = menuDO.getId(); - - //调用 - SysMenuCreateReqVO vo = randomPojo(SysMenuCreateReqVO.class, o -> { - o.setParentId(parentId); - o.setName("testSonName"); - o.setType(MenuTypeEnum.MENU.getType()); - o.setStatus(RandomUtils.randomCommonStatus()); - }); - Long menuId = sysMenuService.createMenu(vo); - - //断言 - Assertions.assertNotNull(menuId); - // 校验记录的属性是否正确 - SysMenuDO ret = menuMapper.selectById(menuId); - assertPojoEquals(vo, ret); - // 校验调用 - verify(sysMenuProducer).sendMenuRefreshMessage(); - } - - @Test - public void testUpdateMenu_success() { - //构造父子目录 - SysMenuDO sonMenuDO = initParentAndSonMenuDO(); - Long sonId = sonMenuDO.getId(); - Long parentId = sonMenuDO.getParentId(); - - //调用 - SysMenuUpdateReqVO vo = RandomUtils.randomPojo(SysMenuUpdateReqVO.class, o -> { - o.setId(sonId); - o.setParentId(parentId); - o.setType(MenuTypeEnum.MENU.getType()); - o.setStatus(RandomUtils.randomCommonStatus()); - o.setName("pppppp"); //修改名字 - }); - sysMenuService.updateMenu(vo); - - //断言 - // 校验记录的属性是否正确 - SysMenuDO ret = menuMapper.selectById(sonId); - assertPojoEquals(vo, ret); - // 校验调用 - verify(sysMenuProducer).sendMenuRefreshMessage(); - } - - @Test - public void testUpdateMenu_sonIdNotExist() { - Long sonId = 99999L; - Long parentId = 10000L; - - //调用 - SysMenuUpdateReqVO vo = RandomUtils.randomPojo(SysMenuUpdateReqVO.class, o -> { - o.setId(sonId); - o.setParentId(parentId); - o.setType(MenuTypeEnum.MENU.getType()); - o.setStatus(RandomUtils.randomCommonStatus()); - }); - //断言 - assertServiceException(() -> sysMenuService.updateMenu(vo), MENU_NOT_EXISTS); - } - - @Test - public void testDeleteMenu_success() { - SysMenuDO sonMenuDO = initParentAndSonMenuDO(); - Long sonId = sonMenuDO.getId(); - - //调用 - sysMenuService.deleteMenu(sonId); - - //断言 - SysMenuDO menuDO = menuMapper.selectById(sonId); - Assert.isNull(menuDO); - verify(sysPermissionService).processMenuDeleted(sonId); - verify(sysMenuProducer).sendMenuRefreshMessage(); - } - - @Test - public void testDeleteMenu_menuNotExist() { - Long sonId = 99999L; - - assertServiceException(() -> sysMenuService.deleteMenu(sonId), MENU_NOT_EXISTS); - } - - @Test - public void testDeleteMenu_existChildren() { - SysMenuDO sonMenu = initParentAndSonMenuDO(); - Long parentId = sonMenu.getParentId(); - - assertServiceException(() -> sysMenuService.deleteMenu(parentId), MENU_EXISTS_CHILDREN); - } - - @Test - public void testGetMenus_success() { - Map idMenuMap = new HashMap<>(); - SysMenuDO menuDO = createMenuDO(MenuTypeEnum.MENU, "parent", 0L); - menuMapper.insert(menuDO); - idMenuMap.put(menuDO.getId(), menuDO); - - SysMenuDO sonMenu = createMenuDO(MenuTypeEnum.MENU, "son", menuDO.getId()); - menuMapper.insert(sonMenu); - idMenuMap.put(sonMenu.getId(), sonMenu); - - //调用 - List menuDOS = sysMenuService.getMenus(); - - //断言 - Assert.isTrue(menuDOS.size() == idMenuMap.size()); - menuDOS.forEach(m -> assertPojoEquals(idMenuMap.get(m.getId()), m)); - } - - @Test - public void testGetMenusReqVo_success() { - Map idMenuMap = new HashMap<>(); - //用于验证可以模糊搜索名称包含"name",状态为1的menu - SysMenuDO menu = createMenuDO(MenuTypeEnum.MENU, "name2", 0L, 1); - menuMapper.insert(menu); - idMenuMap.put(menu.getId(), menu); - - menu = createMenuDO(MenuTypeEnum.MENU, "11name111", 0L, 1); - menuMapper.insert(menu); - idMenuMap.put(menu.getId(), menu); - - menu = createMenuDO(MenuTypeEnum.MENU, "name", 0L, 1); - menuMapper.insert(menu); - idMenuMap.put(menu.getId(), menu); - - //以下是不符合搜索条件的的menu - menu = createMenuDO(MenuTypeEnum.MENU, "xxxxxx", 0L, 1); - menuMapper.insert(menu); - menu = createMenuDO(MenuTypeEnum.MENU, "name", 0L, 2); - menuMapper.insert(menu); - - //调用 - SysMenuListReqVO reqVO = new SysMenuListReqVO(); - reqVO.setStatus(1); - reqVO.setName("name"); - List menuDOS = sysMenuService.getMenus(reqVO); - - //断言 - Assert.isTrue(menuDOS.size() == idMenuMap.size()); - menuDOS.forEach(m -> assertPojoEquals(idMenuMap.get(m.getId()), m)); - } - - @Test - public void testListMenusFromCache_success() throws Exception { - Map mockCacheMap = new HashMap<>(); - //获取代理对象 - SysMenuServiceImpl target = (SysMenuServiceImpl) SpringAopUtils.getTarget(sysMenuService); - BeanUtil.setFieldValue(target, "menuCache", mockCacheMap); - - Map idMenuMap = new HashMap<>(); - //用于验证搜索类型为MENU,状态为1的menu - SysMenuDO menuDO = createMenuDO(1L, MenuTypeEnum.MENU, "name", 0L, 1); - mockCacheMap.put(menuDO.getId(), menuDO); - idMenuMap.put(menuDO.getId(), menuDO); - - menuDO = createMenuDO(2L, MenuTypeEnum.MENU, "name", 0L, 1); - mockCacheMap.put(menuDO.getId(), menuDO); - idMenuMap.put(menuDO.getId(), menuDO); - - //以下是不符合搜索条件的menu - menuDO = createMenuDO(3L, MenuTypeEnum.BUTTON, "name", 0L, 1); - mockCacheMap.put(menuDO.getId(), menuDO); - menuDO = createMenuDO(4L, MenuTypeEnum.MENU, "name", 0L, 2); - mockCacheMap.put(menuDO.getId(), menuDO); - - List menuDOS = sysMenuService.listMenusFromCache(Collections.singletonList(MenuTypeEnum.MENU.getType()), - Collections.singletonList(CommonStatusEnum.DISABLE.getStatus())); - Assert.isTrue(menuDOS.size() == idMenuMap.size()); - menuDOS.forEach(m -> assertPojoEquals(idMenuMap.get(m.getId()), m)); - } - - @Test - public void testListMenusFromCache2_success() throws Exception { - Map mockCacheMap = new HashMap<>(); - //获取代理对象 - SysMenuServiceImpl target = (SysMenuServiceImpl) SpringAopUtils.getTarget(sysMenuService); - BeanUtil.setFieldValue(target, "menuCache", mockCacheMap); - - Map idMenuMap = new HashMap<>(); - //验证搜索id为1, 类型为MENU, 状态为1 的menu - SysMenuDO menuDO = createMenuDO(1L, MenuTypeEnum.MENU, "name", 0L, 1); - mockCacheMap.put(menuDO.getId(), menuDO); - idMenuMap.put(menuDO.getId(), menuDO); - - //以下是不符合搜索条件的menu - menuDO = createMenuDO(2L, MenuTypeEnum.MENU, "name", 0L, 1); - mockCacheMap.put(menuDO.getId(), menuDO); - menuDO = createMenuDO(3L, MenuTypeEnum.BUTTON, "name", 0L, 1); - mockCacheMap.put(menuDO.getId(), menuDO); - menuDO = createMenuDO(4L, MenuTypeEnum.MENU, "name", 0L, 2); - mockCacheMap.put(menuDO.getId(), menuDO); - - List menuDOS = sysMenuService.listMenusFromCache(Collections.singletonList(1L), - Collections.singletonList(MenuTypeEnum.MENU.getType()), Collections.singletonList(1)); - Assert.isTrue(menuDOS.size() == idMenuMap.size()); - menuDOS.forEach(menu -> assertPojoEquals(idMenuMap.get(menu.getId()), menu)); - } - - @Test - public void testCheckParentResource_success() { - SysMenuDO menuDO = createMenuDO(MenuTypeEnum.MENU, "parent", 0L); - menuMapper.insert(menuDO); - Long parentId = menuDO.getId(); - - sysMenuService.checkParentResource(parentId, null); - } - - @Test - public void testCheckParentResource_canNotSetSelfToBeParent() { - assertServiceException(() -> sysMenuService.checkParentResource(1L, 1L), MENU_PARENT_ERROR); - } - - @Test - public void testCheckParentResource_parentNotExist() { - assertServiceException(() -> sysMenuService.checkParentResource(randomLongId(), null), MENU_PARENT_NOT_EXISTS); - } - - @Test - public void testCheckParentResource_parentTypeError() { - SysMenuDO menuDO = createMenuDO(MenuTypeEnum.BUTTON, "parent", 0L); - menuMapper.insert(menuDO); - Long parentId = menuDO.getId(); - - assertServiceException(() -> sysMenuService.checkParentResource(parentId, null), MENU_PARENT_NOT_DIR_OR_MENU); - } - - @Test - public void testCheckResource_success() { - SysMenuDO sonMenu = initParentAndSonMenuDO(); - Long parentId = sonMenu.getParentId(); - - Long otherSonMenuId = randomLongId(); - String otherSonMenuName = randomString(); - - sysMenuService.checkResource(parentId, otherSonMenuName, otherSonMenuId); - } - - @Test - public void testCheckResource_sonMenuNameDuplicate(){ - SysMenuDO sonMenu=initParentAndSonMenuDO(); - Long parentId=sonMenu.getParentId(); - - Long otherSonMenuId=randomLongId(); - String otherSonMenuName=sonMenu.getName(); //相同名称 - - assertServiceException(() -> sysMenuService.checkResource(parentId, otherSonMenuName, otherSonMenuId), MENU_NAME_DUPLICATE); - } - - /** - * 构造父子目录,返回子目录 - * - * @return - */ - private SysMenuDO initParentAndSonMenuDO() { - //构造父子目录 - SysMenuDO menuDO = createMenuDO(MenuTypeEnum.MENU, "parent", 0L); - menuMapper.insert(menuDO); - Long parentId = menuDO.getId(); - - SysMenuDO sonMenuDO = createMenuDO(MenuTypeEnum.MENU, "testSonName", parentId); - menuMapper.insert(sonMenuDO); - return sonMenuDO; - } - - private SysMenuDO createMenuDO(MenuTypeEnum typeEnum, String menuName, Long parentId) { - return createMenuDO(typeEnum, menuName, parentId, RandomUtils.randomCommonStatus()); - } - - private SysMenuDO createMenuDO(MenuTypeEnum typeEnum, String menuName, Long parentId, Integer status) { - return createMenuDO(null, typeEnum, menuName, parentId, status); - } - - private SysMenuDO createMenuDO(Long id, MenuTypeEnum typeEnum, String menuName, Long parentId, Integer status) { - return RandomUtils.randomPojo(SysMenuDO.class, o -> { - o.setId(id); - o.setParentId(parentId); - o.setType(typeEnum.getType()); - o.setStatus(status); - o.setName(menuName); - }); - } - -} +package cn.iocoder.yudao.adminserver.modules.system.service.permission; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.lang.Assert; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.menu.SysMenuCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.menu.SysMenuListReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.menu.SysMenuUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysMenuDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.permission.SysMenuMapper; +import cn.iocoder.yudao.adminserver.modules.system.enums.permission.MenuTypeEnum; +import cn.iocoder.yudao.adminserver.modules.system.mq.producer.permission.SysMenuProducer; +import cn.iocoder.yudao.adminserver.modules.system.service.permission.impl.SysMenuServiceImpl; +import cn.iocoder.yudao.framework.common.util.sping.SpringAopUtils; +import cn.iocoder.yudao.framework.test.core.util.RandomUtils; +import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; +import com.google.common.collect.Multimap; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.context.annotation.Import; + +import javax.annotation.Resource; +import java.util.*; + +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.Mockito.verify; + +@Import(SysMenuServiceImpl.class) +public class SysMenuServiceTest extends BaseDbUnitTest { + + @Resource + private SysMenuServiceImpl sysMenuService; + + @MockBean + private SysPermissionService sysPermissionService; + + @MockBean + private SysMenuProducer sysMenuProducer; + + @Resource + private SysMenuMapper menuMapper; + + @Test + public void testInitLocalCache_success() throws Exception { + SysMenuDO menuDO1 = createMenuDO(MenuTypeEnum.MENU, "xxxx", 0L); + menuMapper.insert(menuDO1); + SysMenuDO menuDO2 = createMenuDO(MenuTypeEnum.MENU, "xxxx", 0L); + menuMapper.insert(menuDO2); + + // 调用 + sysMenuService.initLocalCache(); + + // 获取代理对象 + SysMenuServiceImpl target = (SysMenuServiceImpl) SpringAopUtils.getTarget(sysMenuService); + + Map menuCache = + (Map) BeanUtil.getFieldValue(target, "menuCache"); + Assert.isTrue(menuCache.size() == 2); + assertPojoEquals(menuDO1, menuCache.get(menuDO1.getId())); + assertPojoEquals(menuDO2, menuCache.get(menuDO2.getId())); + + Multimap permissionMenuCache = + (Multimap) BeanUtil.getFieldValue(target, "permissionMenuCache"); + Assert.isTrue(permissionMenuCache.size() == 2); + assertPojoEquals(menuDO1, permissionMenuCache.get(menuDO1.getPermission())); + assertPojoEquals(menuDO2, permissionMenuCache.get(menuDO2.getPermission())); + + Date maxUpdateTime = (Date) BeanUtil.getFieldValue(target, "maxUpdateTime"); + assertEquals(ObjectUtils.max(menuDO1.getUpdateTime(), menuDO2.getUpdateTime()), maxUpdateTime); + } + + @Test + public void testCreateMenu_success() { + //构造父目录 + SysMenuDO menuDO = createMenuDO(MenuTypeEnum.MENU, "parent", 0L); + menuMapper.insert(menuDO); + Long parentId = menuDO.getId(); + + //调用 + SysMenuCreateReqVO vo = randomPojo(SysMenuCreateReqVO.class, o -> { + o.setParentId(parentId); + o.setName("testSonName"); + o.setType(MenuTypeEnum.MENU.getType()); + o.setStatus(RandomUtils.randomCommonStatus()); + }); + Long menuId = sysMenuService.createMenu(vo); + + //断言 + Assertions.assertNotNull(menuId); + // 校验记录的属性是否正确 + SysMenuDO ret = menuMapper.selectById(menuId); + assertPojoEquals(vo, ret); + // 校验调用 + verify(sysMenuProducer).sendMenuRefreshMessage(); + } + + @Test + public void testUpdateMenu_success() { + //构造父子目录 + SysMenuDO sonMenuDO = initParentAndSonMenuDO(); + Long sonId = sonMenuDO.getId(); + Long parentId = sonMenuDO.getParentId(); + + //调用 + SysMenuUpdateReqVO vo = randomPojo(SysMenuUpdateReqVO.class, o -> { + o.setId(sonId); + o.setParentId(parentId); + o.setType(MenuTypeEnum.MENU.getType()); + o.setStatus(RandomUtils.randomCommonStatus()); + o.setName("pppppp"); //修改名字 + }); + sysMenuService.updateMenu(vo); + + //断言 + // 校验记录的属性是否正确 + SysMenuDO ret = menuMapper.selectById(sonId); + assertPojoEquals(vo, ret); + // 校验调用 + verify(sysMenuProducer).sendMenuRefreshMessage(); + } + + @Test + public void testUpdateMenu_sonIdNotExist() { + Long sonId = 99999L; + Long parentId = 10000L; + + //调用 + SysMenuUpdateReqVO vo = randomPojo(SysMenuUpdateReqVO.class, o -> { + o.setId(sonId); + o.setParentId(parentId); + o.setType(MenuTypeEnum.MENU.getType()); + o.setStatus(RandomUtils.randomCommonStatus()); + }); + //断言 + assertServiceException(() -> sysMenuService.updateMenu(vo), MENU_NOT_EXISTS); + } + + @Test + public void testDeleteMenu_success() { + SysMenuDO sonMenuDO = initParentAndSonMenuDO(); + Long sonId = sonMenuDO.getId(); + + //调用 + sysMenuService.deleteMenu(sonId); + + //断言 + SysMenuDO menuDO = menuMapper.selectById(sonId); + Assert.isNull(menuDO); + verify(sysPermissionService).processMenuDeleted(sonId); + verify(sysMenuProducer).sendMenuRefreshMessage(); + } + + @Test + public void testDeleteMenu_menuNotExist() { + Long sonId = 99999L; + + assertServiceException(() -> sysMenuService.deleteMenu(sonId), MENU_NOT_EXISTS); + } + + @Test + public void testDeleteMenu_existChildren() { + SysMenuDO sonMenu = initParentAndSonMenuDO(); + Long parentId = sonMenu.getParentId(); + + assertServiceException(() -> sysMenuService.deleteMenu(parentId), MENU_EXISTS_CHILDREN); + } + + @Test + public void testGetMenus_success() { + Map idMenuMap = new HashMap<>(); + SysMenuDO menuDO = createMenuDO(MenuTypeEnum.MENU, "parent", 0L); + menuMapper.insert(menuDO); + idMenuMap.put(menuDO.getId(), menuDO); + + SysMenuDO sonMenu = createMenuDO(MenuTypeEnum.MENU, "son", menuDO.getId()); + menuMapper.insert(sonMenu); + idMenuMap.put(sonMenu.getId(), sonMenu); + + //调用 + List menuDOS = sysMenuService.getMenus(); + + //断言 + Assert.isTrue(menuDOS.size() == idMenuMap.size()); + menuDOS.forEach(m -> assertPojoEquals(idMenuMap.get(m.getId()), m)); + } + + @Test + public void testGetMenusReqVo_success() { + Map idMenuMap = new HashMap<>(); + //用于验证可以模糊搜索名称包含"name",状态为1的menu + SysMenuDO menu = createMenuDO(MenuTypeEnum.MENU, "name2", 0L, 1); + menuMapper.insert(menu); + idMenuMap.put(menu.getId(), menu); + + menu = createMenuDO(MenuTypeEnum.MENU, "11name111", 0L, 1); + menuMapper.insert(menu); + idMenuMap.put(menu.getId(), menu); + + menu = createMenuDO(MenuTypeEnum.MENU, "name", 0L, 1); + menuMapper.insert(menu); + idMenuMap.put(menu.getId(), menu); + + //以下是不符合搜索条件的的menu + menu = createMenuDO(MenuTypeEnum.MENU, "xxxxxx", 0L, 1); + menuMapper.insert(menu); + menu = createMenuDO(MenuTypeEnum.MENU, "name", 0L, 2); + menuMapper.insert(menu); + + //调用 + SysMenuListReqVO reqVO = new SysMenuListReqVO(); + reqVO.setStatus(1); + reqVO.setName("name"); + List menuDOS = sysMenuService.getMenus(reqVO); + + //断言 + Assert.isTrue(menuDOS.size() == idMenuMap.size()); + menuDOS.forEach(m -> assertPojoEquals(idMenuMap.get(m.getId()), m)); + } + + @Test + public void testListMenusFromCache_success() throws Exception { + Map mockCacheMap = new HashMap<>(); + //获取代理对象 + SysMenuServiceImpl target = (SysMenuServiceImpl) SpringAopUtils.getTarget(sysMenuService); + BeanUtil.setFieldValue(target, "menuCache", mockCacheMap); + + Map idMenuMap = new HashMap<>(); + //用于验证搜索类型为MENU,状态为1的menu + SysMenuDO menuDO = createMenuDO(1L, MenuTypeEnum.MENU, "name", 0L, 1); + mockCacheMap.put(menuDO.getId(), menuDO); + idMenuMap.put(menuDO.getId(), menuDO); + + menuDO = createMenuDO(2L, MenuTypeEnum.MENU, "name", 0L, 1); + mockCacheMap.put(menuDO.getId(), menuDO); + idMenuMap.put(menuDO.getId(), menuDO); + + //以下是不符合搜索条件的menu + menuDO = createMenuDO(3L, MenuTypeEnum.BUTTON, "name", 0L, 1); + mockCacheMap.put(menuDO.getId(), menuDO); + menuDO = createMenuDO(4L, MenuTypeEnum.MENU, "name", 0L, 2); + mockCacheMap.put(menuDO.getId(), menuDO); + + List menuDOS = sysMenuService.listMenusFromCache(Collections.singletonList(MenuTypeEnum.MENU.getType()), + Collections.singletonList(CommonStatusEnum.DISABLE.getStatus())); + Assert.isTrue(menuDOS.size() == idMenuMap.size()); + menuDOS.forEach(m -> assertPojoEquals(idMenuMap.get(m.getId()), m)); + } + + @Test + public void testListMenusFromCache2_success() throws Exception { + Map mockCacheMap = new HashMap<>(); + //获取代理对象 + SysMenuServiceImpl target = (SysMenuServiceImpl) SpringAopUtils.getTarget(sysMenuService); + BeanUtil.setFieldValue(target, "menuCache", mockCacheMap); + + Map idMenuMap = new HashMap<>(); + //验证搜索id为1, 类型为MENU, 状态为1 的menu + SysMenuDO menuDO = createMenuDO(1L, MenuTypeEnum.MENU, "name", 0L, 1); + mockCacheMap.put(menuDO.getId(), menuDO); + idMenuMap.put(menuDO.getId(), menuDO); + + //以下是不符合搜索条件的menu + menuDO = createMenuDO(2L, MenuTypeEnum.MENU, "name", 0L, 1); + mockCacheMap.put(menuDO.getId(), menuDO); + menuDO = createMenuDO(3L, MenuTypeEnum.BUTTON, "name", 0L, 1); + mockCacheMap.put(menuDO.getId(), menuDO); + menuDO = createMenuDO(4L, MenuTypeEnum.MENU, "name", 0L, 2); + mockCacheMap.put(menuDO.getId(), menuDO); + + List menuDOS = sysMenuService.listMenusFromCache(Collections.singletonList(1L), + Collections.singletonList(MenuTypeEnum.MENU.getType()), Collections.singletonList(1)); + Assert.isTrue(menuDOS.size() == idMenuMap.size()); + menuDOS.forEach(menu -> assertPojoEquals(idMenuMap.get(menu.getId()), menu)); + } + + @Test + public void testCheckParentResource_success() { + SysMenuDO menuDO = createMenuDO(MenuTypeEnum.MENU, "parent", 0L); + menuMapper.insert(menuDO); + Long parentId = menuDO.getId(); + + sysMenuService.checkParentResource(parentId, null); + } + + @Test + public void testCheckParentResource_canNotSetSelfToBeParent() { + assertServiceException(() -> sysMenuService.checkParentResource(1L, 1L), MENU_PARENT_ERROR); + } + + @Test + public void testCheckParentResource_parentNotExist() { + assertServiceException(() -> sysMenuService.checkParentResource(randomLongId(), null), MENU_PARENT_NOT_EXISTS); + } + + @Test + public void testCheckParentResource_parentTypeError() { + SysMenuDO menuDO = createMenuDO(MenuTypeEnum.BUTTON, "parent", 0L); + menuMapper.insert(menuDO); + Long parentId = menuDO.getId(); + + assertServiceException(() -> sysMenuService.checkParentResource(parentId, null), MENU_PARENT_NOT_DIR_OR_MENU); + } + + @Test + public void testCheckResource_success() { + SysMenuDO sonMenu = initParentAndSonMenuDO(); + Long parentId = sonMenu.getParentId(); + + Long otherSonMenuId = randomLongId(); + String otherSonMenuName = randomString(); + + sysMenuService.checkResource(parentId, otherSonMenuName, otherSonMenuId); + } + + @Test + public void testCheckResource_sonMenuNameDuplicate(){ + SysMenuDO sonMenu=initParentAndSonMenuDO(); + Long parentId=sonMenu.getParentId(); + + Long otherSonMenuId=randomLongId(); + String otherSonMenuName=sonMenu.getName(); //相同名称 + + assertServiceException(() -> sysMenuService.checkResource(parentId, otherSonMenuName, otherSonMenuId), MENU_NAME_DUPLICATE); + } + + /** + * 构造父子目录,返回子目录 + * + * @return + */ + private SysMenuDO initParentAndSonMenuDO() { + //构造父子目录 + SysMenuDO menuDO = createMenuDO(MenuTypeEnum.MENU, "parent", 0L); + menuMapper.insert(menuDO); + Long parentId = menuDO.getId(); + + SysMenuDO sonMenuDO = createMenuDO(MenuTypeEnum.MENU, "testSonName", parentId); + menuMapper.insert(sonMenuDO); + return sonMenuDO; + } + + private SysMenuDO createMenuDO(MenuTypeEnum typeEnum, String menuName, Long parentId) { + return createMenuDO(typeEnum, menuName, parentId, RandomUtils.randomCommonStatus()); + } + + private SysMenuDO createMenuDO(MenuTypeEnum typeEnum, String menuName, Long parentId, Integer status) { + return createMenuDO(null, typeEnum, menuName, parentId, status); + } + + private SysMenuDO createMenuDO(Long id, MenuTypeEnum typeEnum, String menuName, Long parentId, Integer status) { + return randomPojo(SysMenuDO.class, o -> { + o.setId(id); + o.setParentId(parentId); + o.setType(typeEnum.getType()); + o.setStatus(status); + o.setName(menuName); + }); + } + +} diff --git a/src/test/java/cn/iocoder/dashboard/modules/system/service/permission/SysPermissionServiceTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/SysPermissionServiceTest.java similarity index 79% rename from src/test/java/cn/iocoder/dashboard/modules/system/service/permission/SysPermissionServiceTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/SysPermissionServiceTest.java index a4b5fa71e..f00e16217 100644 --- a/src/test/java/cn/iocoder/dashboard/modules/system/service/permission/SysPermissionServiceTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/SysPermissionServiceTest.java @@ -1,12 +1,12 @@ -package cn.iocoder.dashboard.modules.system.service.permission; +package cn.iocoder.yudao.adminserver.modules.system.service.permission; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysRoleMenuDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysUserRoleDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.permission.SysRoleMenuMapper; -import cn.iocoder.dashboard.modules.system.dal.mysql.permission.SysUserRoleMapper; -import cn.iocoder.dashboard.modules.system.mq.producer.permission.SysPermissionProducer; -import cn.iocoder.dashboard.modules.system.service.permission.impl.SysPermissionServiceImpl; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysRoleMenuDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysUserRoleDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.permission.SysRoleMenuMapper; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.permission.SysUserRoleMapper; +import cn.iocoder.yudao.adminserver.modules.system.mq.producer.permission.SysPermissionProducer; +import cn.iocoder.yudao.adminserver.modules.system.service.permission.impl.SysPermissionServiceImpl; import org.junit.jupiter.api.Test; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.annotation.Import; @@ -14,9 +14,9 @@ import org.springframework.context.annotation.Import; import javax.annotation.Resource; import java.util.List; -import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals; -import static cn.iocoder.dashboard.util.RandomUtils.randomLongId; -import static cn.iocoder.dashboard.util.RandomUtils.randomPojo; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomLongId; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.verify; diff --git a/src/test/java/cn/iocoder/dashboard/modules/system/service/permission/SysRoleServiceTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/SysRoleServiceTest.java similarity index 86% rename from src/test/java/cn/iocoder/dashboard/modules/system/service/permission/SysRoleServiceTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/SysRoleServiceTest.java index 34784fe11..3943268bd 100644 --- a/src/test/java/cn/iocoder/dashboard/modules/system/service/permission/SysRoleServiceTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/permission/SysRoleServiceTest.java @@ -1,302 +1,302 @@ -package cn.iocoder.dashboard.modules.system.service.permission; - -import cn.hutool.core.bean.BeanUtil; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.security.core.enums.DataScopeEnum; -import cn.iocoder.dashboard.modules.system.controller.permission.vo.role.SysRoleCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.permission.vo.role.SysRolePageReqVO; -import cn.iocoder.dashboard.modules.system.controller.permission.vo.role.SysRoleUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysRoleDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.permission.SysRoleMapper; -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.impl.SysRoleServiceImpl; -import cn.iocoder.dashboard.util.sping.SpringAopUtils; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.mock.mockito.MockBean; -import org.springframework.context.annotation.Import; - -import javax.annotation.Resource; -import java.util.*; -import java.util.stream.Collectors; - -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*; -import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals; -import static cn.iocoder.dashboard.util.AssertUtils.assertServiceException; -import static cn.iocoder.dashboard.util.RandomUtils.*; -import static cn.iocoder.dashboard.util.object.ObjectUtils.max; -import static org.junit.jupiter.api.Assertions.*; -import static org.mockito.Mockito.verify; - -@Import(SysRoleServiceImpl.class) -public class SysRoleServiceTest extends BaseDbUnitTest { - - @Resource - private SysRoleServiceImpl sysRoleService; - - @Resource - private SysRoleMapper roleMapper; - - @MockBean - private SysPermissionService sysPermissionService; - - @MockBean - private SysRoleProducer sysRoleProducer; - - @Test - public void testInitLocalCache_success() throws Exception { - SysRoleDO roleDO1 = createRoleDO("role1", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL); - roleMapper.insert(roleDO1); - SysRoleDO roleDO2 = createRoleDO("role2", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL); - roleMapper.insert(roleDO2); - - //调用 - sysRoleService.initLocalCache(); - - //断言 - //获取代理对象 - SysRoleServiceImpl target = (SysRoleServiceImpl) SpringAopUtils.getTarget(sysRoleService); - - Map roleCache = (Map) BeanUtil.getFieldValue(target, "roleCache"); - assertPojoEquals(roleDO1, roleCache.get(roleDO1.getId())); - assertPojoEquals(roleDO2, roleCache.get(roleDO2.getId())); - - Date maxUpdateTime = (Date) BeanUtil.getFieldValue(target, "maxUpdateTime"); - assertEquals(max(roleDO1.getUpdateTime(), roleDO2.getUpdateTime()), maxUpdateTime); - } - - @Test - public void testCreateRole_success() { - SysRoleCreateReqVO reqVO = randomPojo(SysRoleCreateReqVO.class, o -> { - o.setCode("role_code"); - o.setName("role_name"); - o.setRemark("remark"); - o.setType(SysRoleTypeEnum.CUSTOM.getType()); - o.setSort(1); - }); - Long roleId = sysRoleService.createRole(reqVO); - - //断言 - assertNotNull(roleId); - SysRoleDO roleDO = roleMapper.selectById(roleId); - assertPojoEquals(reqVO, roleDO); - - verify(sysRoleProducer).sendRoleRefreshMessage(); - } - - @Test - public void testUpdateRole_success() { - SysRoleDO roleDO = createRoleDO("role_name", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL); - roleMapper.insert(roleDO); - Long roleId = roleDO.getId(); - - //调用 - SysRoleUpdateReqVO reqVO = randomPojo(SysRoleUpdateReqVO.class, o -> { - o.setId(roleId); - o.setCode("role_code"); - o.setName("update_name"); - o.setType(SysRoleTypeEnum.SYSTEM.getType()); - o.setSort(999); - }); - sysRoleService.updateRole(reqVO); - - //断言 - SysRoleDO newRoleDO = roleMapper.selectById(roleId); - assertPojoEquals(reqVO, newRoleDO); - - verify(sysRoleProducer).sendRoleRefreshMessage(); - } - - @Test - public void testUpdateRoleStatus_success() { - SysRoleDO roleDO = createRoleDO("role_name", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL, CommonStatusEnum.ENABLE.getStatus()); - roleMapper.insert(roleDO); - Long roleId = roleDO.getId(); - - //调用 - sysRoleService.updateRoleStatus(roleId, CommonStatusEnum.DISABLE.getStatus()); - - //断言 - SysRoleDO newRoleDO = roleMapper.selectById(roleId); - assertEquals(CommonStatusEnum.DISABLE.getStatus(), newRoleDO.getStatus()); - - verify(sysRoleProducer).sendRoleRefreshMessage(); - } - - @Test - public void testUpdateRoleDataScope_success() { - SysRoleDO roleDO = createRoleDO("role_name", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL); - roleMapper.insert(roleDO); - Long roleId = roleDO.getId(); - - //调用 - Set deptIdSet = Arrays.asList(1L, 2L, 3L, 4L, 5L).stream().collect(Collectors.toSet()); - sysRoleService.updateRoleDataScope(roleId, DataScopeEnum.DEPT_CUSTOM.getScore(), deptIdSet); - - //断言 - SysRoleDO newRoleDO = roleMapper.selectById(roleId); - assertEquals(DataScopeEnum.DEPT_CUSTOM.getScore(), newRoleDO.getDataScope()); - - Set newDeptIdSet = newRoleDO.getDataScopeDeptIds(); - assertTrue(deptIdSet.size() == newDeptIdSet.size()); - deptIdSet.stream().forEach(d -> assertTrue(newDeptIdSet.contains(d))); - - verify(sysRoleProducer).sendRoleRefreshMessage(); - } - - @Test - public void testDeleteRole_success() { - SysRoleDO roleDO = createRoleDO("role_name", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL); - roleMapper.insert(roleDO); - Long roleId = roleDO.getId(); - - //调用 - sysRoleService.deleteRole(roleId); - - //断言 - SysRoleDO newRoleDO = roleMapper.selectById(roleId); - assertNull(newRoleDO); - - verify(sysRoleProducer).sendRoleRefreshMessage(); - } - - @Test - public void testGetRoles_success() { - Map idRoleMap = new HashMap<>(); - // 验证查询状态为1的角色 - SysRoleDO roleDO1 = createRoleDO("role1", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 1); - roleMapper.insert(roleDO1); - idRoleMap.put(roleDO1.getId(), roleDO1); - - SysRoleDO roleDO2 = createRoleDO("role2", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 1); - roleMapper.insert(roleDO2); - idRoleMap.put(roleDO2.getId(), roleDO2); - - // 以下是排除的角色 - SysRoleDO roleDO3 = createRoleDO("role3", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 2); - roleMapper.insert(roleDO3); - - //调用 - List roles = sysRoleService.getRoles(Arrays.asList(1)); - - //断言 - assertEquals(2, roles.size()); - roles.stream().forEach(r -> assertPojoEquals(idRoleMap.get(r.getId()), r)); - - } - - @Test - public void testGetRolePage_success() { - Map idRoleMap = new HashMap<>(); - // 验证名称包含"role", 状态为1,code为"code"的角色 - // 第一页 - SysRoleDO roleDO = createRoleDO("role1", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 1, "code"); - roleMapper.insert(roleDO); - idRoleMap.put(roleDO.getId(), roleDO); - // 第二页 - roleDO = createRoleDO("role2", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 1, "code"); - roleMapper.insert(roleDO); - - // 以下是排除的角色 - roleDO = createRoleDO("role3", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 2, "code"); - roleMapper.insert(roleDO); - roleDO = createRoleDO("role4", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 1, "xxxxx"); - roleMapper.insert(roleDO); - - //调用 - SysRolePageReqVO reqVO = randomPojo(SysRolePageReqVO.class, o -> { - o.setName("role"); - o.setCode("code"); - o.setStatus(1); - o.setPageNo(1); - o.setPageSize(1); - o.setBeginTime(null); - o.setEndTime(null); - }); - PageResult result = sysRoleService.getRolePage(reqVO); - assertEquals(2, result.getTotal()); - result.getList().stream().forEach(r -> assertPojoEquals(idRoleMap.get(r.getId()), r)); - } - - @Test - public void testCheckDuplicateRole_success() { - sysRoleService.checkDuplicateRole(randomString(), randomString(), null); - } - - @Test - public void testCheckDuplicateRole_nameDuplicate() { - SysRoleDO roleDO = createRoleDO("role_name", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL); - roleMapper.insert(roleDO); - - String duplicateName = "role_name"; - - assertServiceException(() -> sysRoleService.checkDuplicateRole(duplicateName, randomString(), null), ROLE_NAME_DUPLICATE, duplicateName); - } - - @Test - public void testCheckDuplicateRole_codeDuplicate() { - SysRoleDO roleDO = randomPojo(SysRoleDO.class, o -> { - o.setName("role_999"); - o.setCode("code"); - o.setType(SysRoleTypeEnum.CUSTOM.getType()); - o.setStatus(1); - o.setDataScope(DataScopeEnum.ALL.getScore()); - }); - roleMapper.insert(roleDO); - - String randomName = randomString(); - String duplicateCode = "code"; - - assertServiceException(() -> sysRoleService.checkDuplicateRole(randomName, duplicateCode, null), ROLE_CODE_DUPLICATE, duplicateCode); - } - - @Test - public void testCheckUpdateRole_success() { - SysRoleDO roleDO = createRoleDO("role_name", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL); - roleMapper.insert(roleDO); - Long roleId = roleDO.getId(); - - sysRoleService.checkUpdateRole(roleId); - } - - @Test - public void testCheckUpdateRole_roleIdNotExist() { - assertServiceException(() -> sysRoleService.checkUpdateRole(randomLongId()), ROLE_NOT_EXISTS); - } - - @Test - public void testCheckUpdateRole_systemRoleCanNotBeUpdate() { - SysRoleDO roleDO = createRoleDO("role_name", SysRoleTypeEnum.SYSTEM, DataScopeEnum.ALL); - roleMapper.insert(roleDO); - Long roleId = roleDO.getId(); - - assertServiceException(() -> sysRoleService.checkUpdateRole(roleId), ROLE_CAN_NOT_UPDATE_SYSTEM_TYPE_ROLE); - } - - private SysRoleDO createRoleDO(String name, SysRoleTypeEnum typeEnum, DataScopeEnum scopeEnum, Integer status) { - return createRoleDO( name, typeEnum, scopeEnum, status, randomString()); - } - - private SysRoleDO createRoleDO(String name, SysRoleTypeEnum typeEnum, DataScopeEnum scopeEnum, Integer status, String code) { - return createRoleDO(null, name, typeEnum, scopeEnum, status, code); - } - - private SysRoleDO createRoleDO(String name, SysRoleTypeEnum typeEnum, DataScopeEnum scopeEnum) { - return createRoleDO(null, name, typeEnum, scopeEnum, randomCommonStatus(), randomString()); - } - - private SysRoleDO createRoleDO(Long id, String name, SysRoleTypeEnum typeEnum, DataScopeEnum scopeEnum, Integer status, String code) { - SysRoleDO roleDO = randomPojo(SysRoleDO.class, o -> { - o.setId(id); - o.setName(name); - o.setType(typeEnum.getType()); - o.setStatus(status); - o.setDataScope(scopeEnum.getScore()); - o.setCode(code); - }); - return roleDO; - } - -} +package cn.iocoder.yudao.adminserver.modules.system.service.permission; + +import cn.hutool.core.bean.BeanUtil; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.security.core.enums.DataScopeEnum; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.role.SysRoleCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.role.SysRolePageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.permission.vo.role.SysRoleUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.permission.SysRoleDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.permission.SysRoleMapper; +import cn.iocoder.yudao.adminserver.modules.system.enums.permission.SysRoleTypeEnum; +import cn.iocoder.yudao.adminserver.modules.system.mq.producer.permission.SysRoleProducer; +import cn.iocoder.yudao.adminserver.modules.system.service.permission.impl.SysRoleServiceImpl; +import cn.iocoder.yudao.framework.common.util.sping.SpringAopUtils; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.context.annotation.Import; + +import javax.annotation.Resource; +import java.util.*; +import java.util.stream.Collectors; + +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; +import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.max; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; +import static org.junit.jupiter.api.Assertions.*; +import static org.mockito.Mockito.verify; + +@Import(SysRoleServiceImpl.class) +public class SysRoleServiceTest extends BaseDbUnitTest { + + @Resource + private SysRoleServiceImpl sysRoleService; + + @Resource + private SysRoleMapper roleMapper; + + @MockBean + private SysPermissionService sysPermissionService; + + @MockBean + private SysRoleProducer sysRoleProducer; + + @Test + public void testInitLocalCache_success() throws Exception { + SysRoleDO roleDO1 = createRoleDO("role1", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL); + roleMapper.insert(roleDO1); + SysRoleDO roleDO2 = createRoleDO("role2", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL); + roleMapper.insert(roleDO2); + + //调用 + sysRoleService.initLocalCache(); + + //断言 + //获取代理对象 + SysRoleServiceImpl target = (SysRoleServiceImpl) SpringAopUtils.getTarget(sysRoleService); + + Map roleCache = (Map) BeanUtil.getFieldValue(target, "roleCache"); + assertPojoEquals(roleDO1, roleCache.get(roleDO1.getId())); + assertPojoEquals(roleDO2, roleCache.get(roleDO2.getId())); + + Date maxUpdateTime = (Date) BeanUtil.getFieldValue(target, "maxUpdateTime"); + assertEquals(max(roleDO1.getUpdateTime(), roleDO2.getUpdateTime()), maxUpdateTime); + } + + @Test + public void testCreateRole_success() { + SysRoleCreateReqVO reqVO = randomPojo(SysRoleCreateReqVO.class, o -> { + o.setCode("role_code"); + o.setName("role_name"); + o.setRemark("remark"); + o.setType(SysRoleTypeEnum.CUSTOM.getType()); + o.setSort(1); + }); + Long roleId = sysRoleService.createRole(reqVO); + + //断言 + assertNotNull(roleId); + SysRoleDO roleDO = roleMapper.selectById(roleId); + assertPojoEquals(reqVO, roleDO); + + verify(sysRoleProducer).sendRoleRefreshMessage(); + } + + @Test + public void testUpdateRole_success() { + SysRoleDO roleDO = createRoleDO("role_name", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL); + roleMapper.insert(roleDO); + Long roleId = roleDO.getId(); + + //调用 + SysRoleUpdateReqVO reqVO = randomPojo(SysRoleUpdateReqVO.class, o -> { + o.setId(roleId); + o.setCode("role_code"); + o.setName("update_name"); + o.setType(SysRoleTypeEnum.SYSTEM.getType()); + o.setSort(999); + }); + sysRoleService.updateRole(reqVO); + + //断言 + SysRoleDO newRoleDO = roleMapper.selectById(roleId); + assertPojoEquals(reqVO, newRoleDO); + + verify(sysRoleProducer).sendRoleRefreshMessage(); + } + + @Test + public void testUpdateRoleStatus_success() { + SysRoleDO roleDO = createRoleDO("role_name", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL, CommonStatusEnum.ENABLE.getStatus()); + roleMapper.insert(roleDO); + Long roleId = roleDO.getId(); + + //调用 + sysRoleService.updateRoleStatus(roleId, CommonStatusEnum.DISABLE.getStatus()); + + //断言 + SysRoleDO newRoleDO = roleMapper.selectById(roleId); + assertEquals(CommonStatusEnum.DISABLE.getStatus(), newRoleDO.getStatus()); + + verify(sysRoleProducer).sendRoleRefreshMessage(); + } + + @Test + public void testUpdateRoleDataScope_success() { + SysRoleDO roleDO = createRoleDO("role_name", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL); + roleMapper.insert(roleDO); + Long roleId = roleDO.getId(); + + //调用 + Set deptIdSet = Arrays.asList(1L, 2L, 3L, 4L, 5L).stream().collect(Collectors.toSet()); + sysRoleService.updateRoleDataScope(roleId, DataScopeEnum.DEPT_CUSTOM.getScore(), deptIdSet); + + //断言 + SysRoleDO newRoleDO = roleMapper.selectById(roleId); + assertEquals(DataScopeEnum.DEPT_CUSTOM.getScore(), newRoleDO.getDataScope()); + + Set newDeptIdSet = newRoleDO.getDataScopeDeptIds(); + assertTrue(deptIdSet.size() == newDeptIdSet.size()); + deptIdSet.stream().forEach(d -> assertTrue(newDeptIdSet.contains(d))); + + verify(sysRoleProducer).sendRoleRefreshMessage(); + } + + @Test + public void testDeleteRole_success() { + SysRoleDO roleDO = createRoleDO("role_name", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL); + roleMapper.insert(roleDO); + Long roleId = roleDO.getId(); + + //调用 + sysRoleService.deleteRole(roleId); + + //断言 + SysRoleDO newRoleDO = roleMapper.selectById(roleId); + assertNull(newRoleDO); + + verify(sysRoleProducer).sendRoleRefreshMessage(); + } + + @Test + public void testGetRoles_success() { + Map idRoleMap = new HashMap<>(); + // 验证查询状态为1的角色 + SysRoleDO roleDO1 = createRoleDO("role1", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 1); + roleMapper.insert(roleDO1); + idRoleMap.put(roleDO1.getId(), roleDO1); + + SysRoleDO roleDO2 = createRoleDO("role2", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 1); + roleMapper.insert(roleDO2); + idRoleMap.put(roleDO2.getId(), roleDO2); + + // 以下是排除的角色 + SysRoleDO roleDO3 = createRoleDO("role3", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 2); + roleMapper.insert(roleDO3); + + //调用 + List roles = sysRoleService.getRoles(Arrays.asList(1)); + + //断言 + assertEquals(2, roles.size()); + roles.stream().forEach(r -> assertPojoEquals(idRoleMap.get(r.getId()), r)); + + } + + @Test + public void testGetRolePage_success() { + Map idRoleMap = new HashMap<>(); + // 验证名称包含"role", 状态为1,code为"code"的角色 + // 第一页 + SysRoleDO roleDO = createRoleDO("role1", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 1, "code"); + roleMapper.insert(roleDO); + idRoleMap.put(roleDO.getId(), roleDO); + // 第二页 + roleDO = createRoleDO("role2", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 1, "code"); + roleMapper.insert(roleDO); + + // 以下是排除的角色 + roleDO = createRoleDO("role3", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 2, "code"); + roleMapper.insert(roleDO); + roleDO = createRoleDO("role4", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL, 1, "xxxxx"); + roleMapper.insert(roleDO); + + //调用 + SysRolePageReqVO reqVO = randomPojo(SysRolePageReqVO.class, o -> { + o.setName("role"); + o.setCode("code"); + o.setStatus(1); + o.setPageNo(1); + o.setPageSize(1); + o.setBeginTime(null); + o.setEndTime(null); + }); + PageResult result = sysRoleService.getRolePage(reqVO); + assertEquals(2, result.getTotal()); + result.getList().stream().forEach(r -> assertPojoEquals(idRoleMap.get(r.getId()), r)); + } + + @Test + public void testCheckDuplicateRole_success() { + sysRoleService.checkDuplicateRole(randomString(), randomString(), null); + } + + @Test + public void testCheckDuplicateRole_nameDuplicate() { + SysRoleDO roleDO = createRoleDO("role_name", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL); + roleMapper.insert(roleDO); + + String duplicateName = "role_name"; + + assertServiceException(() -> sysRoleService.checkDuplicateRole(duplicateName, randomString(), null), ROLE_NAME_DUPLICATE, duplicateName); + } + + @Test + public void testCheckDuplicateRole_codeDuplicate() { + SysRoleDO roleDO = randomPojo(SysRoleDO.class, o -> { + o.setName("role_999"); + o.setCode("code"); + o.setType(SysRoleTypeEnum.CUSTOM.getType()); + o.setStatus(1); + o.setDataScope(DataScopeEnum.ALL.getScore()); + }); + roleMapper.insert(roleDO); + + String randomName = randomString(); + String duplicateCode = "code"; + + assertServiceException(() -> sysRoleService.checkDuplicateRole(randomName, duplicateCode, null), ROLE_CODE_DUPLICATE, duplicateCode); + } + + @Test + public void testCheckUpdateRole_success() { + SysRoleDO roleDO = createRoleDO("role_name", SysRoleTypeEnum.CUSTOM, DataScopeEnum.ALL); + roleMapper.insert(roleDO); + Long roleId = roleDO.getId(); + + sysRoleService.checkUpdateRole(roleId); + } + + @Test + public void testCheckUpdateRole_roleIdNotExist() { + assertServiceException(() -> sysRoleService.checkUpdateRole(randomLongId()), ROLE_NOT_EXISTS); + } + + @Test + public void testCheckUpdateRole_systemRoleCanNotBeUpdate() { + SysRoleDO roleDO = createRoleDO("role_name", SysRoleTypeEnum.SYSTEM, DataScopeEnum.ALL); + roleMapper.insert(roleDO); + Long roleId = roleDO.getId(); + + assertServiceException(() -> sysRoleService.checkUpdateRole(roleId), ROLE_CAN_NOT_UPDATE_SYSTEM_TYPE_ROLE); + } + + private SysRoleDO createRoleDO(String name, SysRoleTypeEnum typeEnum, DataScopeEnum scopeEnum, Integer status) { + return createRoleDO( name, typeEnum, scopeEnum, status, randomString()); + } + + private SysRoleDO createRoleDO(String name, SysRoleTypeEnum typeEnum, DataScopeEnum scopeEnum, Integer status, String code) { + return createRoleDO(null, name, typeEnum, scopeEnum, status, code); + } + + private SysRoleDO createRoleDO(String name, SysRoleTypeEnum typeEnum, DataScopeEnum scopeEnum) { + return createRoleDO(null, name, typeEnum, scopeEnum, randomCommonStatus(), randomString()); + } + + private SysRoleDO createRoleDO(Long id, String name, SysRoleTypeEnum typeEnum, DataScopeEnum scopeEnum, Integer status, String code) { + SysRoleDO roleDO = randomPojo(SysRoleDO.class, o -> { + o.setId(id); + o.setName(name); + o.setType(typeEnum.getType()); + o.setStatus(status); + o.setDataScope(scopeEnum.getScore()); + o.setCode(code); + }); + return roleDO; + } + +} diff --git a/src/test/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsChannelServiceTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsChannelServiceTest.java similarity index 81% rename from src/test/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsChannelServiceTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsChannelServiceTest.java index e1b7b145c..76337aa5d 100644 --- a/src/test/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsChannelServiceTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsChannelServiceTest.java @@ -1,19 +1,19 @@ -package cn.iocoder.dashboard.modules.system.service.sms; +package cn.iocoder.yudao.adminserver.modules.system.service.sms; import cn.hutool.core.bean.BeanUtil; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.sms.core.client.SmsClientFactory; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.channel.SysSmsChannelCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.channel.SysSmsChannelPageReqVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.channel.SysSmsChannelUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsChannelDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.sms.SysSmsChannelMapper; -import cn.iocoder.dashboard.modules.system.mq.producer.sms.SysSmsProducer; -import cn.iocoder.dashboard.modules.system.service.sms.impl.SysSmsChannelServiceImpl; -import cn.iocoder.dashboard.util.collection.ArrayUtils; -import cn.iocoder.dashboard.util.object.ObjectUtils; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.sms.core.client.SmsClientFactory; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.channel.SysSmsChannelCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.channel.SysSmsChannelPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.channel.SysSmsChannelUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms.SysSmsChannelDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.sms.SysSmsChannelMapper; +import cn.iocoder.yudao.adminserver.modules.system.mq.producer.sms.SysSmsProducer; +import cn.iocoder.yudao.adminserver.modules.system.service.sms.impl.SysSmsChannelServiceImpl; +import cn.iocoder.yudao.framework.common.util.collection.ArrayUtils; +import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import org.junit.jupiter.api.Test; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.annotation.Import; @@ -23,12 +23,12 @@ import java.util.Date; import java.util.function.Consumer; import static cn.hutool.core.util.RandomUtil.randomEle; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.SMS_CHANNEL_HAS_CHILDREN; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.SMS_CHANNEL_NOT_EXISTS; -import static cn.iocoder.dashboard.util.AssertUtils.*; -import static cn.iocoder.dashboard.util.RandomUtils.*; -import static cn.iocoder.dashboard.util.date.DateUtils.buildTime; -import static cn.iocoder.dashboard.util.object.ObjectUtils.max; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.SMS_CHANNEL_HAS_CHILDREN; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.SMS_CHANNEL_NOT_EXISTS; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; +import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.max; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.*; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.*; diff --git a/src/test/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsLogServiceTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsLogServiceTest.java similarity index 87% rename from src/test/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsLogServiceTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsLogServiceTest.java index b7152d1ba..4ea3745df 100644 --- a/src/test/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsLogServiceTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsLogServiceTest.java @@ -1,21 +1,21 @@ -package cn.iocoder.dashboard.modules.system.service.sms; +package cn.iocoder.yudao.adminserver.modules.system.service.sms; import cn.hutool.core.map.MapUtil; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.common.enums.UserTypeEnum; -import cn.iocoder.dashboard.common.pojo.CommonResult; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.log.SysSmsLogExportReqVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.log.SysSmsLogPageReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsLogDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsTemplateDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.sms.SysSmsLogMapper; -import cn.iocoder.dashboard.modules.system.enums.sms.SysSmsReceiveStatusEnum; -import cn.iocoder.dashboard.modules.system.enums.sms.SysSmsSendStatusEnum; -import cn.iocoder.dashboard.modules.system.enums.sms.SysSmsTemplateTypeEnum; -import cn.iocoder.dashboard.modules.system.service.sms.impl.SysSmsLogServiceImpl; -import cn.iocoder.dashboard.util.collection.ArrayUtils; -import cn.iocoder.dashboard.util.object.ObjectUtils; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.log.SysSmsLogExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.log.SysSmsLogPageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms.SysSmsLogDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms.SysSmsTemplateDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.sms.SysSmsLogMapper; +import cn.iocoder.yudao.adminserver.modules.system.enums.sms.SysSmsReceiveStatusEnum; +import cn.iocoder.yudao.adminserver.modules.system.enums.sms.SysSmsSendStatusEnum; +import cn.iocoder.yudao.adminserver.modules.system.enums.sms.SysSmsTemplateTypeEnum; +import cn.iocoder.yudao.adminserver.modules.system.service.sms.impl.SysSmsLogServiceImpl; +import cn.iocoder.yudao.framework.common.util.collection.ArrayUtils; +import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Import; @@ -27,9 +27,9 @@ import java.util.function.Consumer; import static cn.hutool.core.util.RandomUtil.randomBoolean; import static cn.hutool.core.util.RandomUtil.randomEle; -import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals; -import static cn.iocoder.dashboard.util.RandomUtils.*; -import static cn.iocoder.dashboard.util.date.DateUtils.buildTime; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; import static org.junit.jupiter.api.Assertions.*; /** diff --git a/src/test/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsServiceTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsServiceTest.java similarity index 85% rename from src/test/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsServiceTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsServiceTest.java index f84e8753f..2a25125b9 100644 --- a/src/test/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsServiceTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsServiceTest.java @@ -1,19 +1,19 @@ -package cn.iocoder.dashboard.modules.system.service.sms; +package cn.iocoder.yudao.adminserver.modules.system.service.sms; import cn.hutool.core.map.MapUtil; -import cn.iocoder.dashboard.BaseMockitoUnitTest; -import cn.iocoder.dashboard.common.core.KeyValue; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.common.enums.UserTypeEnum; -import cn.iocoder.dashboard.framework.sms.core.client.SmsClient; -import cn.iocoder.dashboard.framework.sms.core.client.SmsClientFactory; -import cn.iocoder.dashboard.framework.sms.core.client.SmsCommonResult; -import cn.iocoder.dashboard.framework.sms.core.client.dto.SmsReceiveRespDTO; -import cn.iocoder.dashboard.framework.sms.core.client.dto.SmsSendRespDTO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsTemplateDO; -import cn.iocoder.dashboard.modules.system.mq.message.sms.SysSmsSendMessage; -import cn.iocoder.dashboard.modules.system.mq.producer.sms.SysSmsProducer; -import cn.iocoder.dashboard.modules.system.service.sms.impl.SysSmsServiceImpl; +import cn.iocoder.yudao.adminserver.BaseMockitoUnitTest; +import cn.iocoder.yudao.framework.common.core.KeyValue; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; +import cn.iocoder.yudao.framework.sms.core.client.SmsClient; +import cn.iocoder.yudao.framework.sms.core.client.SmsClientFactory; +import cn.iocoder.yudao.framework.sms.core.client.SmsCommonResult; +import cn.iocoder.yudao.framework.sms.core.client.dto.SmsReceiveRespDTO; +import cn.iocoder.yudao.framework.sms.core.client.dto.SmsSendRespDTO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms.SysSmsTemplateDO; +import cn.iocoder.yudao.adminserver.modules.system.mq.message.sms.SysSmsSendMessage; +import cn.iocoder.yudao.adminserver.modules.system.mq.producer.sms.SysSmsProducer; +import cn.iocoder.yudao.adminserver.modules.system.service.sms.impl.SysSmsServiceImpl; import org.assertj.core.util.Lists; import org.junit.jupiter.api.Test; import org.mockito.InjectMocks; @@ -24,9 +24,9 @@ import java.util.List; import java.util.Map; import static cn.hutool.core.util.RandomUtil.randomEle; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*; -import static cn.iocoder.dashboard.util.AssertUtils.assertServiceException; -import static cn.iocoder.dashboard.util.RandomUtils.*; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.*; diff --git a/src/test/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsTemplateServiceTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsTemplateServiceTest.java similarity index 87% rename from src/test/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsTemplateServiceTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsTemplateServiceTest.java index f4bd9efa6..4707b9102 100644 --- a/src/test/java/cn/iocoder/dashboard/modules/system/service/sms/SysSmsTemplateServiceTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsTemplateServiceTest.java @@ -1,25 +1,25 @@ -package cn.iocoder.dashboard.modules.system.service.sms; +package cn.iocoder.yudao.adminserver.modules.system.service.sms; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.common.exception.enums.GlobalErrorCodeConstants; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.framework.sms.core.client.SmsClient; -import cn.iocoder.dashboard.framework.sms.core.client.SmsClientFactory; -import cn.iocoder.dashboard.framework.sms.core.client.SmsCommonResult; -import cn.iocoder.dashboard.framework.sms.core.client.dto.SmsTemplateRespDTO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.template.SysSmsTemplateCreateReqVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.template.SysSmsTemplateExportReqVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.template.SysSmsTemplatePageReqVO; -import cn.iocoder.dashboard.modules.system.controller.sms.vo.template.SysSmsTemplateUpdateReqVO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsChannelDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.sms.SysSmsTemplateDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.sms.SysSmsTemplateMapper; -import cn.iocoder.dashboard.modules.system.enums.sms.SysSmsTemplateTypeEnum; -import cn.iocoder.dashboard.modules.system.mq.producer.sms.SysSmsProducer; -import cn.iocoder.dashboard.modules.system.service.sms.impl.SysSmsTemplateServiceImpl; -import cn.iocoder.dashboard.util.collection.ArrayUtils; -import cn.iocoder.dashboard.util.object.ObjectUtils; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.sms.core.client.SmsClient; +import cn.iocoder.yudao.framework.sms.core.client.SmsClientFactory; +import cn.iocoder.yudao.framework.sms.core.client.SmsCommonResult; +import cn.iocoder.yudao.framework.sms.core.client.dto.SmsTemplateRespDTO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template.SysSmsTemplateCreateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template.SysSmsTemplateExportReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template.SysSmsTemplatePageReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.sms.vo.template.SysSmsTemplateUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms.SysSmsChannelDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.sms.SysSmsTemplateDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.sms.SysSmsTemplateMapper; +import cn.iocoder.yudao.adminserver.modules.system.enums.sms.SysSmsTemplateTypeEnum; +import cn.iocoder.yudao.adminserver.modules.system.mq.producer.sms.SysSmsProducer; +import cn.iocoder.yudao.adminserver.modules.system.service.sms.impl.SysSmsTemplateServiceImpl; +import cn.iocoder.yudao.framework.common.util.collection.ArrayUtils; +import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import com.google.common.collect.Lists; import org.junit.jupiter.api.Test; import org.springframework.boot.test.mock.mockito.MockBean; @@ -33,12 +33,12 @@ import java.util.function.Consumer; import static cn.hutool.core.bean.BeanUtil.getFieldValue; import static cn.hutool.core.util.RandomUtil.randomEle; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*; -import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals; -import static cn.iocoder.dashboard.util.AssertUtils.assertServiceException; -import static cn.iocoder.dashboard.util.RandomUtils.*; -import static cn.iocoder.dashboard.util.date.DateUtils.buildTime; -import static cn.iocoder.dashboard.util.object.ObjectUtils.max; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; +import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.max; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.*; diff --git a/src/test/java/cn/iocoder/dashboard/modules/system/service/user/SysUserServiceImplTest.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/user/SysUserServiceImplTest.java similarity index 91% rename from src/test/java/cn/iocoder/dashboard/modules/system/service/user/SysUserServiceImplTest.java rename to yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/user/SysUserServiceImplTest.java index bdb663f82..95833e076 100644 --- a/src/test/java/cn/iocoder/dashboard/modules/system/service/user/SysUserServiceImplTest.java +++ b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/system/service/user/SysUserServiceImplTest.java @@ -1,25 +1,25 @@ -package cn.iocoder.dashboard.modules.system.service.user; +package cn.iocoder.yudao.adminserver.modules.system.service.user; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.RandomUtil; -import cn.iocoder.dashboard.BaseDbUnitTest; -import cn.iocoder.dashboard.common.enums.CommonStatusEnum; -import cn.iocoder.dashboard.common.pojo.PageResult; -import cn.iocoder.dashboard.modules.infra.service.file.InfFileService; -import cn.iocoder.dashboard.modules.system.controller.user.vo.profile.SysUserProfileUpdatePasswordReqVO; -import cn.iocoder.dashboard.modules.system.controller.user.vo.profile.SysUserProfileUpdateReqVO; -import cn.iocoder.dashboard.modules.system.controller.user.vo.user.*; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysDeptDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysPostDO; -import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO; -import cn.iocoder.dashboard.modules.system.dal.mysql.user.SysUserMapper; -import cn.iocoder.dashboard.modules.system.enums.common.SysSexEnum; -import cn.iocoder.dashboard.modules.system.service.dept.SysDeptService; -import cn.iocoder.dashboard.modules.system.service.dept.SysPostService; -import cn.iocoder.dashboard.modules.system.service.permission.SysPermissionService; -import cn.iocoder.dashboard.util.collection.ArrayUtils; -import cn.iocoder.dashboard.util.collection.CollectionUtils; -import cn.iocoder.dashboard.util.object.ObjectUtils; +import cn.iocoder.yudao.adminserver.BaseDbUnitTest; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.adminserver.modules.infra.service.file.InfFileService; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.profile.SysUserProfileUpdatePasswordReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.profile.SysUserProfileUpdateReqVO; +import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user.*; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dept.SysDeptDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.dept.SysPostDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.dataobject.user.SysUserDO; +import cn.iocoder.yudao.adminserver.modules.system.dal.mysql.user.SysUserMapper; +import cn.iocoder.yudao.adminserver.modules.system.enums.common.SysSexEnum; +import cn.iocoder.yudao.adminserver.modules.system.service.dept.SysDeptService; +import cn.iocoder.yudao.adminserver.modules.system.service.dept.SysPostService; +import cn.iocoder.yudao.adminserver.modules.system.service.permission.SysPermissionService; +import cn.iocoder.yudao.framework.common.util.collection.ArrayUtils; +import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; +import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import org.junit.jupiter.api.Test; import org.mockito.stubbing.Answer; import org.springframework.boot.test.mock.mockito.MockBean; @@ -34,11 +34,11 @@ import java.util.function.Consumer; import static cn.hutool.core.util.RandomUtil.randomBytes; import static cn.hutool.core.util.RandomUtil.randomEle; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*; -import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals; -import static cn.iocoder.dashboard.util.AssertUtils.assertServiceException; -import static cn.iocoder.dashboard.util.RandomUtils.*; -import static cn.iocoder.dashboard.util.date.DateUtils.buildTime; +import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.*; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; +import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; +import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; import static org.assertj.core.util.Lists.newArrayList; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; diff --git a/src/test/resources/application-unit-test.yaml b/yudao-admin-server/src/test/resources/application-unit-test.yaml similarity index 89% rename from src/test/resources/application-unit-test.yaml rename to yudao-admin-server/src/test/resources/application-unit-test.yaml index 70cecc4c3..5b1461447 100644 --- a/src/test/resources/application-unit-test.yaml +++ b/yudao-admin-server/src/test/resources/application-unit-test.yaml @@ -51,12 +51,6 @@ resilience4j: # 芋道配置项,设置当前项目所有自定义的配置 yudao: - info: - version: 1.0.0 - base-package: cn.iocoder.dashboard - web: - api-prefix: /api - controller-package: ${yudao.info.base-package} security: token-header: Authorization token-secret: abcdefghijklmnopqrstuvwxyz @@ -66,15 +60,8 @@ yudao: mock-secret: test swagger: enable: false # 单元测试,禁用 Swagger - captcha: - timeout: 5m - width: 160 - height: 60 file: base-path: http://127.0.0.1:${server.port}/${yudao.web.api-prefix}/file/get/ - codegen: - base-package: ${yudao.info.base-package}.modules - db-schemas: ${spring.datasource.name} xss: enable: false exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系 diff --git a/src/test/resources/file/erweima.jpg b/yudao-admin-server/src/test/resources/file/erweima.jpg similarity index 100% rename from src/test/resources/file/erweima.jpg rename to yudao-admin-server/src/test/resources/file/erweima.jpg diff --git a/yudao-admin-server/src/test/resources/logback-spring.xml b/yudao-admin-server/src/test/resources/logback-spring.xml new file mode 100644 index 000000000..daf756bff --- /dev/null +++ b/yudao-admin-server/src/test/resources/logback-spring.xml @@ -0,0 +1,4 @@ + + + + diff --git a/src/test/resources/sql/clean.sql b/yudao-admin-server/src/test/resources/sql/clean.sql similarity index 100% rename from src/test/resources/sql/clean.sql rename to yudao-admin-server/src/test/resources/sql/clean.sql diff --git a/src/test/resources/sql/create_tables.sql b/yudao-admin-server/src/test/resources/sql/create_tables.sql similarity index 100% rename from src/test/resources/sql/create_tables.sql rename to yudao-admin-server/src/test/resources/sql/create_tables.sql diff --git a/ruoyi-ui/.editorconfig b/yudao-admin-ui/.editorconfig similarity index 95% rename from ruoyi-ui/.editorconfig rename to yudao-admin-ui/.editorconfig index 22d302ecd..7034f9bf3 100644 --- a/ruoyi-ui/.editorconfig +++ b/yudao-admin-ui/.editorconfig @@ -1,22 +1,22 @@ -# 告诉EditorConfig插件,这是根文件,不用继续往上查找 -root = true - -# 匹配全部文件 -[*] -# 设置字符集 -charset = utf-8 -# 缩进风格,可选space、tab -indent_style = space -# 缩进的空格数 -indent_size = 2 -# 结尾换行符,可选lf、cr、crlf -end_of_line = lf -# 在文件结尾插入新行 -insert_final_newline = true -# 删除一行中的前后空格 -trim_trailing_whitespace = true - -# 匹配md结尾的文件 -[*.md] -insert_final_newline = false -trim_trailing_whitespace = false +# 告诉EditorConfig插件,这是根文件,不用继续往上查找 +root = true + +# 匹配全部文件 +[*] +# 设置字符集 +charset = utf-8 +# 缩进风格,可选space、tab +indent_style = space +# 缩进的空格数 +indent_size = 2 +# 结尾换行符,可选lf、cr、crlf +end_of_line = lf +# 在文件结尾插入新行 +insert_final_newline = true +# 删除一行中的前后空格 +trim_trailing_whitespace = true + +# 匹配md结尾的文件 +[*.md] +insert_final_newline = false +trim_trailing_whitespace = false diff --git a/ruoyi-ui/.env.demo1024 b/yudao-admin-ui/.env.demo1024 similarity index 100% rename from ruoyi-ui/.env.demo1024 rename to yudao-admin-ui/.env.demo1024 diff --git a/ruoyi-ui/.env.development b/yudao-admin-ui/.env.development similarity index 95% rename from ruoyi-ui/.env.development rename to yudao-admin-ui/.env.development index cbe5fa5a8..8c1875f52 100644 --- a/ruoyi-ui/.env.development +++ b/yudao-admin-ui/.env.development @@ -1,9 +1,9 @@ -# 开发环境配置 -ENV = 'development' - -# 芋道管理系统/开发环境 -VUE_APP_BASE_API = '/dev-api' -# VUE_APP_BASE_API = '/api' - -# 路由懒加载 -VUE_CLI_BABEL_TRANSPILE_MODULES = true +# 开发环境配置 +ENV = 'development' + +# 芋道管理系统/开发环境 +VUE_APP_BASE_API = '/dev-api' +# VUE_APP_BASE_API = '/api' + +# 路由懒加载 +VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/ruoyi-ui/.env.production b/yudao-admin-ui/.env.production similarity index 95% rename from ruoyi-ui/.env.production rename to yudao-admin-ui/.env.production index fbae57919..e00052eb6 100644 --- a/ruoyi-ui/.env.production +++ b/yudao-admin-ui/.env.production @@ -1,5 +1,5 @@ -# 生产环境配置 -ENV = 'production' - -# 芋道管理系统/生产环境 -VUE_APP_BASE_API = '/prod-api' +# 生产环境配置 +ENV = 'production' + +# 芋道管理系统/生产环境 +VUE_APP_BASE_API = '/prod-api' diff --git a/ruoyi-ui/.env.staging b/yudao-admin-ui/.env.staging similarity index 95% rename from ruoyi-ui/.env.staging rename to yudao-admin-ui/.env.staging index c475bc491..2e83e2225 100644 --- a/ruoyi-ui/.env.staging +++ b/yudao-admin-ui/.env.staging @@ -1,10 +1,10 @@ -NODE_ENV = production - -# 测试环境配置 -ENV = 'staging' - -# 芋道管理系统/测试环境 -VUE_APP_BASE_API = 'http://api-dashboard.yudao.iocoder.cn' - -# 静态资源地址 -PUBLIC_PATH = 'http://static.yudao.iocoder.cn/' +NODE_ENV = production + +# 测试环境配置 +ENV = 'staging' + +# 芋道管理系统/测试环境 +VUE_APP_BASE_API = 'http://api-dashboard.yudao.iocoder.cn' + +# 静态资源地址 +PUBLIC_PATH = 'http://static.yudao.iocoder.cn/' diff --git a/ruoyi-ui/.eslintignore b/yudao-admin-ui/.eslintignore similarity index 95% rename from ruoyi-ui/.eslintignore rename to yudao-admin-ui/.eslintignore index 7dd2c2a85..89be6f659 100644 --- a/ruoyi-ui/.eslintignore +++ b/yudao-admin-ui/.eslintignore @@ -1,10 +1,10 @@ -# 忽略build目录下类型为js的文件的语法检查 -build/*.js -# 忽略src/assets目录下文件的语法检查 -src/assets -# 忽略public目录下文件的语法检查 -public -# 忽略当前目录下为js的文件的语法检查 -*.js -# 忽略当前目录下为vue的文件的语法检查 +# 忽略build目录下类型为js的文件的语法检查 +build/*.js +# 忽略src/assets目录下文件的语法检查 +src/assets +# 忽略public目录下文件的语法检查 +public +# 忽略当前目录下为js的文件的语法检查 +*.js +# 忽略当前目录下为vue的文件的语法检查 *.vue \ No newline at end of file diff --git a/ruoyi-ui/.eslintrc.js b/yudao-admin-ui/.eslintrc.js similarity index 96% rename from ruoyi-ui/.eslintrc.js rename to yudao-admin-ui/.eslintrc.js index b321fbe4f..82bbdeea6 100644 --- a/ruoyi-ui/.eslintrc.js +++ b/yudao-admin-ui/.eslintrc.js @@ -1,199 +1,199 @@ -// ESlint 检查配置 -module.exports = { - root: true, - parserOptions: { - parser: 'babel-eslint', - sourceType: 'module' - }, - env: { - browser: true, - node: true, - es6: true, - }, - extends: ['plugin:vue/recommended', 'eslint:recommended'], - - // add your custom rules here - //it is base on https://github.com/vuejs/eslint-config-vue - rules: { - "vue/max-attributes-per-line": [2, { - "singleline": 10, - "multiline": { - "max": 1, - "allowFirstLine": false - } - }], - "vue/singleline-html-element-content-newline": "off", - "vue/multiline-html-element-content-newline":"off", - "vue/name-property-casing": ["error", "PascalCase"], - "vue/no-v-html": "off", - 'accessor-pairs': 2, - 'arrow-spacing': [2, { - 'before': true, - 'after': true - }], - 'block-spacing': [2, 'always'], - 'brace-style': [2, '1tbs', { - 'allowSingleLine': true - }], - 'camelcase': [0, { - 'properties': 'always' - }], - 'comma-dangle': [2, 'never'], - 'comma-spacing': [2, { - 'before': false, - 'after': true - }], - 'comma-style': [2, 'last'], - 'constructor-super': 2, - 'curly': [2, 'multi-line'], - 'dot-location': [2, 'property'], - 'eol-last': 2, - 'eqeqeq': ["error", "always", {"null": "ignore"}], - 'generator-star-spacing': [2, { - 'before': true, - 'after': true - }], - 'handle-callback-err': [2, '^(err|error)$'], - 'indent': [2, 2, { - 'SwitchCase': 1 - }], - 'jsx-quotes': [2, 'prefer-single'], - 'key-spacing': [2, { - 'beforeColon': false, - 'afterColon': true - }], - 'keyword-spacing': [2, { - 'before': true, - 'after': true - }], - 'new-cap': [2, { - 'newIsCap': true, - 'capIsNew': false - }], - 'new-parens': 2, - 'no-array-constructor': 2, - 'no-caller': 2, - 'no-console': 'off', - 'no-class-assign': 2, - 'no-cond-assign': 2, - 'no-const-assign': 2, - 'no-control-regex': 0, - 'no-delete-var': 2, - 'no-dupe-args': 2, - 'no-dupe-class-members': 2, - 'no-dupe-keys': 2, - 'no-duplicate-case': 2, - 'no-empty-character-class': 2, - 'no-empty-pattern': 2, - 'no-eval': 2, - 'no-ex-assign': 2, - 'no-extend-native': 2, - 'no-extra-bind': 2, - 'no-extra-boolean-cast': 2, - 'no-extra-parens': [2, 'functions'], - 'no-fallthrough': 2, - 'no-floating-decimal': 2, - 'no-func-assign': 2, - 'no-implied-eval': 2, - 'no-inner-declarations': [2, 'functions'], - 'no-invalid-regexp': 2, - 'no-irregular-whitespace': 2, - 'no-iterator': 2, - 'no-label-var': 2, - 'no-labels': [2, { - 'allowLoop': false, - 'allowSwitch': false - }], - 'no-lone-blocks': 2, - 'no-mixed-spaces-and-tabs': 2, - 'no-multi-spaces': 2, - 'no-multi-str': 2, - 'no-multiple-empty-lines': [2, { - 'max': 1 - }], - 'no-native-reassign': 2, - 'no-negated-in-lhs': 2, - 'no-new-object': 2, - 'no-new-require': 2, - 'no-new-symbol': 2, - 'no-new-wrappers': 2, - 'no-obj-calls': 2, - 'no-octal': 2, - 'no-octal-escape': 2, - 'no-path-concat': 2, - 'no-proto': 2, - 'no-redeclare': 2, - 'no-regex-spaces': 2, - 'no-return-assign': [2, 'except-parens'], - 'no-self-assign': 2, - 'no-self-compare': 2, - 'no-sequences': 2, - 'no-shadow-restricted-names': 2, - 'no-spaced-func': 2, - 'no-sparse-arrays': 2, - 'no-this-before-super': 2, - 'no-throw-literal': 2, - 'no-trailing-spaces': 2, - 'no-undef': 2, - 'no-undef-init': 2, - 'no-unexpected-multiline': 2, - 'no-unmodified-loop-condition': 2, - 'no-unneeded-ternary': [2, { - 'defaultAssignment': false - }], - 'no-unreachable': 2, - 'no-unsafe-finally': 2, - 'no-unused-vars': [2, { - 'vars': 'all', - 'args': 'none' - }], - 'no-useless-call': 2, - 'no-useless-computed-key': 2, - 'no-useless-constructor': 2, - 'no-useless-escape': 0, - 'no-whitespace-before-property': 2, - 'no-with': 2, - 'one-var': [2, { - 'initialized': 'never' - }], - 'operator-linebreak': [2, 'after', { - 'overrides': { - '?': 'before', - ':': 'before' - } - }], - 'padded-blocks': [2, 'never'], - 'quotes': [2, 'single', { - 'avoidEscape': true, - 'allowTemplateLiterals': true - }], - 'semi': [2, 'never'], - 'semi-spacing': [2, { - 'before': false, - 'after': true - }], - 'space-before-blocks': [2, 'always'], - 'space-before-function-paren': [2, 'never'], - 'space-in-parens': [2, 'never'], - 'space-infix-ops': 2, - 'space-unary-ops': [2, { - 'words': true, - 'nonwords': false - }], - 'spaced-comment': [2, 'always', { - 'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ','] - }], - 'template-curly-spacing': [2, 'never'], - 'use-isnan': 2, - 'valid-typeof': 2, - 'wrap-iife': [2, 'any'], - 'yield-star-spacing': [2, 'both'], - 'yoda': [2, 'never'], - 'prefer-const': 2, - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - 'object-curly-spacing': [2, 'always', { - objectsInObjects: false - }], - 'array-bracket-spacing': [2, 'never'] - } -} +// ESlint 检查配置 +module.exports = { + root: true, + parserOptions: { + parser: 'babel-eslint', + sourceType: 'module' + }, + env: { + browser: true, + node: true, + es6: true, + }, + extends: ['plugin:vue/recommended', 'eslint:recommended'], + + // add your custom rules here + //it is base on https://github.com/vuejs/eslint-config-vue + rules: { + "vue/max-attributes-per-line": [2, { + "singleline": 10, + "multiline": { + "max": 1, + "allowFirstLine": false + } + }], + "vue/singleline-html-element-content-newline": "off", + "vue/multiline-html-element-content-newline":"off", + "vue/name-property-casing": ["error", "PascalCase"], + "vue/no-v-html": "off", + 'accessor-pairs': 2, + 'arrow-spacing': [2, { + 'before': true, + 'after': true + }], + 'block-spacing': [2, 'always'], + 'brace-style': [2, '1tbs', { + 'allowSingleLine': true + }], + 'camelcase': [0, { + 'properties': 'always' + }], + 'comma-dangle': [2, 'never'], + 'comma-spacing': [2, { + 'before': false, + 'after': true + }], + 'comma-style': [2, 'last'], + 'constructor-super': 2, + 'curly': [2, 'multi-line'], + 'dot-location': [2, 'property'], + 'eol-last': 2, + 'eqeqeq': ["error", "always", {"null": "ignore"}], + 'generator-star-spacing': [2, { + 'before': true, + 'after': true + }], + 'handle-callback-err': [2, '^(err|error)$'], + 'indent': [2, 2, { + 'SwitchCase': 1 + }], + 'jsx-quotes': [2, 'prefer-single'], + 'key-spacing': [2, { + 'beforeColon': false, + 'afterColon': true + }], + 'keyword-spacing': [2, { + 'before': true, + 'after': true + }], + 'new-cap': [2, { + 'newIsCap': true, + 'capIsNew': false + }], + 'new-parens': 2, + 'no-array-constructor': 2, + 'no-caller': 2, + 'no-console': 'off', + 'no-class-assign': 2, + 'no-cond-assign': 2, + 'no-const-assign': 2, + 'no-control-regex': 0, + 'no-delete-var': 2, + 'no-dupe-args': 2, + 'no-dupe-class-members': 2, + 'no-dupe-keys': 2, + 'no-duplicate-case': 2, + 'no-empty-character-class': 2, + 'no-empty-pattern': 2, + 'no-eval': 2, + 'no-ex-assign': 2, + 'no-extend-native': 2, + 'no-extra-bind': 2, + 'no-extra-boolean-cast': 2, + 'no-extra-parens': [2, 'functions'], + 'no-fallthrough': 2, + 'no-floating-decimal': 2, + 'no-func-assign': 2, + 'no-implied-eval': 2, + 'no-inner-declarations': [2, 'functions'], + 'no-invalid-regexp': 2, + 'no-irregular-whitespace': 2, + 'no-iterator': 2, + 'no-label-var': 2, + 'no-labels': [2, { + 'allowLoop': false, + 'allowSwitch': false + }], + 'no-lone-blocks': 2, + 'no-mixed-spaces-and-tabs': 2, + 'no-multi-spaces': 2, + 'no-multi-str': 2, + 'no-multiple-empty-lines': [2, { + 'max': 1 + }], + 'no-native-reassign': 2, + 'no-negated-in-lhs': 2, + 'no-new-object': 2, + 'no-new-require': 2, + 'no-new-symbol': 2, + 'no-new-wrappers': 2, + 'no-obj-calls': 2, + 'no-octal': 2, + 'no-octal-escape': 2, + 'no-path-concat': 2, + 'no-proto': 2, + 'no-redeclare': 2, + 'no-regex-spaces': 2, + 'no-return-assign': [2, 'except-parens'], + 'no-self-assign': 2, + 'no-self-compare': 2, + 'no-sequences': 2, + 'no-shadow-restricted-names': 2, + 'no-spaced-func': 2, + 'no-sparse-arrays': 2, + 'no-this-before-super': 2, + 'no-throw-literal': 2, + 'no-trailing-spaces': 2, + 'no-undef': 2, + 'no-undef-init': 2, + 'no-unexpected-multiline': 2, + 'no-unmodified-loop-condition': 2, + 'no-unneeded-ternary': [2, { + 'defaultAssignment': false + }], + 'no-unreachable': 2, + 'no-unsafe-finally': 2, + 'no-unused-vars': [2, { + 'vars': 'all', + 'args': 'none' + }], + 'no-useless-call': 2, + 'no-useless-computed-key': 2, + 'no-useless-constructor': 2, + 'no-useless-escape': 0, + 'no-whitespace-before-property': 2, + 'no-with': 2, + 'one-var': [2, { + 'initialized': 'never' + }], + 'operator-linebreak': [2, 'after', { + 'overrides': { + '?': 'before', + ':': 'before' + } + }], + 'padded-blocks': [2, 'never'], + 'quotes': [2, 'single', { + 'avoidEscape': true, + 'allowTemplateLiterals': true + }], + 'semi': [2, 'never'], + 'semi-spacing': [2, { + 'before': false, + 'after': true + }], + 'space-before-blocks': [2, 'always'], + 'space-before-function-paren': [2, 'never'], + 'space-in-parens': [2, 'never'], + 'space-infix-ops': 2, + 'space-unary-ops': [2, { + 'words': true, + 'nonwords': false + }], + 'spaced-comment': [2, 'always', { + 'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ','] + }], + 'template-curly-spacing': [2, 'never'], + 'use-isnan': 2, + 'valid-typeof': 2, + 'wrap-iife': [2, 'any'], + 'yield-star-spacing': [2, 'both'], + 'yoda': [2, 'never'], + 'prefer-const': 2, + 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, + 'object-curly-spacing': [2, 'always', { + objectsInObjects: false + }], + 'array-bracket-spacing': [2, 'never'] + } +} diff --git a/ruoyi-ui/.gitignore b/yudao-admin-ui/.gitignore similarity index 91% rename from ruoyi-ui/.gitignore rename to yudao-admin-ui/.gitignore index 2c9b3a73f..78a752d87 100644 --- a/ruoyi-ui/.gitignore +++ b/yudao-admin-ui/.gitignore @@ -1,23 +1,23 @@ -.DS_Store -node_modules/ -dist/ -npm-debug.log* -yarn-debug.log* -yarn-error.log* -**/*.log - -tests/**/coverage/ -tests/e2e/reports -selenium-debug.log - -# Editor directories and files -.idea -.vscode -*.suo -*.ntvs* -*.njsproj -*.sln -*.local - -package-lock.json -yarn.lock +.DS_Store +node_modules/ +dist/ +npm-debug.log* +yarn-debug.log* +yarn-error.log* +**/*.log + +tests/**/coverage/ +tests/e2e/reports +selenium-debug.log + +# Editor directories and files +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln +*.local + +package-lock.json +yarn.lock diff --git a/ruoyi-ui/babel.config.js b/yudao-admin-ui/babel.config.js similarity index 97% rename from ruoyi-ui/babel.config.js rename to yudao-admin-ui/babel.config.js index b732c91fc..b99f00148 100644 --- a/ruoyi-ui/babel.config.js +++ b/yudao-admin-ui/babel.config.js @@ -1,13 +1,13 @@ -module.exports = { - presets: [ - // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app - '@vue/cli-plugin-babel/preset' - ], - 'env': { - 'development': { - // babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require(). - // This plugin can significantly increase the speed of hot updates, when you have a large number of pages. - 'plugins': ['dynamic-import-node'] - } - } -} +module.exports = { + presets: [ + // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app + '@vue/cli-plugin-babel/preset' + ], + 'env': { + 'development': { + // babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require(). + // This plugin can significantly increase the speed of hot updates, when you have a large number of pages. + 'plugins': ['dynamic-import-node'] + } + } +} diff --git a/ruoyi-ui/bin/build.bat b/yudao-admin-ui/bin/build.bat similarity index 100% rename from ruoyi-ui/bin/build.bat rename to yudao-admin-ui/bin/build.bat diff --git a/ruoyi-ui/bin/package.bat b/yudao-admin-ui/bin/package.bat similarity index 90% rename from ruoyi-ui/bin/package.bat rename to yudao-admin-ui/bin/package.bat index 5d9fca586..82817497e 100644 --- a/ruoyi-ui/bin/package.bat +++ b/yudao-admin-ui/bin/package.bat @@ -1,12 +1,12 @@ -@echo off -echo. -echo [Ϣ] װWeḅnode_modulesļ -echo. - -%~d0 -cd %~dp0 - -cd .. -npm install --registry=https://registry.npm.taobao.org - +@echo off +echo. +echo [Ϣ] װWeḅnode_modulesļ +echo. + +%~d0 +cd %~dp0 + +cd .. +npm install --registry=https://registry.npm.taobao.org + pause \ No newline at end of file diff --git a/ruoyi-ui/bin/run-web.bat b/yudao-admin-ui/bin/run-web.bat similarity index 85% rename from ruoyi-ui/bin/run-web.bat rename to yudao-admin-ui/bin/run-web.bat index a69628096..a938e8921 100644 --- a/ruoyi-ui/bin/run-web.bat +++ b/yudao-admin-ui/bin/run-web.bat @@ -1,12 +1,12 @@ -@echo off -echo. -echo [Ϣ] ʹ Vue Web ̡ -echo. - -%~d0 -cd %~dp0 - -cd .. -npm run dev - +@echo off +echo. +echo [Ϣ] ʹ Vue Web ̡ +echo. + +%~d0 +cd %~dp0 + +cd .. +npm run dev + pause \ No newline at end of file diff --git a/ruoyi-ui/build/index.js b/yudao-admin-ui/build/index.js similarity index 96% rename from ruoyi-ui/build/index.js rename to yudao-admin-ui/build/index.js index 385da08e5..0c57de2aa 100644 --- a/ruoyi-ui/build/index.js +++ b/yudao-admin-ui/build/index.js @@ -1,35 +1,35 @@ -const { run } = require('runjs') -const chalk = require('chalk') -const config = require('../vue.config.js') -const rawArgv = process.argv.slice(2) -const args = rawArgv.join(' ') - -if (process.env.npm_config_preview || rawArgv.includes('--preview')) { - const report = rawArgv.includes('--report') - - run(`vue-cli-service build ${args}`) - - const port = 9526 - const publicPath = config.publicPath - - var connect = require('connect') - var serveStatic = require('serve-static') - const app = connect() - - app.use( - publicPath, - serveStatic('./dist', { - index: ['index.html', '/'] - }) - ) - - app.listen(port, function () { - console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`)) - if (report) { - console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`)) - } - - }) -} else { - run(`vue-cli-service build ${args}`) -} +const { run } = require('runjs') +const chalk = require('chalk') +const config = require('../vue.config.js') +const rawArgv = process.argv.slice(2) +const args = rawArgv.join(' ') + +if (process.env.npm_config_preview || rawArgv.includes('--preview')) { + const report = rawArgv.includes('--report') + + run(`vue-cli-service build ${args}`) + + const port = 9526 + const publicPath = config.publicPath + + var connect = require('connect') + var serveStatic = require('serve-static') + const app = connect() + + app.use( + publicPath, + serveStatic('./dist', { + index: ['index.html', '/'] + }) + ) + + app.listen(port, function () { + console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`)) + if (report) { + console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`)) + } + + }) +} else { + run(`vue-cli-service build ${args}`) +} diff --git a/ruoyi-ui/package.json b/yudao-admin-ui/package.json similarity index 95% rename from ruoyi-ui/package.json rename to yudao-admin-ui/package.json index 1249d16b3..3acd6dbaf 100644 --- a/ruoyi-ui/package.json +++ b/yudao-admin-ui/package.json @@ -1,88 +1,88 @@ -{ - "name": "ruoyi", - "version": "3.3.0", - "description": "芋道管理系统", - "author": "芋道", - "license": "MIT", - "scripts": { - "dev": "vue-cli-service serve", - "build:prod": "vue-cli-service build", - "build:stage": "vue-cli-service build --mode staging", - "build:demo1024": "vue-cli-service build --mode demo1024", - "preview": "node build/index.js --preview", - "lint": "eslint --ext .js,.vue src" - }, - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, - "lint-staged": { - "src/**/*.{js,vue}": [ - "eslint --fix", - "git add" - ] - }, - "keywords": [ - "vue", - "admin", - "dashboard", - "element-ui", - "boilerplate", - "admin-template", - "management-system" - ], - "repository": { - "type": "git", - "url": "https://github.com/YunaiV/ruoyi-vue-pro" - }, - "dependencies": { - "@riophae/vue-treeselect": "0.4.0", - "axios": "0.21.0", - "clipboard": "2.0.6", - "core-js": "3.8.1", - "echarts": "4.9.0", - "element-ui": "2.15.0", - "file-saver": "2.0.4", - "fuse.js": "6.4.3", - "highlight.js": "9.18.5", - "js-beautify": "1.13.0", - "js-cookie": "2.2.1", - "jsencrypt": "3.0.0-rc.1", - "nprogress": "0.2.0", - "quill": "1.3.7", - "screenfull": "5.0.2", - "sortablejs": "1.10.2", - "vue": "2.6.12", - "vue-count-to": "1.0.13", - "vue-cropper": "0.5.5", - "vue-router": "3.4.9", - "vuedraggable": "2.24.3", - "vuex": "3.6.0" - }, - "devDependencies": { - "@vue/cli-plugin-babel": "4.4.6", - "@vue/cli-plugin-eslint": "4.4.6", - "@vue/cli-service": "4.4.6", - "babel-eslint": "10.1.0", - "chalk": "4.1.0", - "connect": "3.6.6", - "eslint": "7.15.0", - "eslint-plugin-vue": "7.2.0", - "lint-staged": "10.5.3", - "sass": "1.30.0", - "runjs": "4.4.2", - "sass-loader": "10.1.0", - "script-ext-html-webpack-plugin": "2.1.5", - "svg-sprite-loader": "5.1.1", - "vue-template-compiler": "2.6.12" - }, - "engines": { - "node": ">=8.9", - "npm": ">= 3.0.0" - }, - "browserslist": [ - "> 1%", - "last 2 versions" - ] -} +{ + "name": "ruoyi", + "version": "3.3.0", + "description": "芋道管理系统", + "author": "芋道", + "license": "MIT", + "scripts": { + "dev": "vue-cli-service serve", + "build:prod": "vue-cli-service build", + "build:stage": "vue-cli-service build --mode staging", + "build:demo1024": "vue-cli-service build --mode demo1024", + "preview": "node build/index.js --preview", + "lint": "eslint --ext .js,.vue src" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "src/**/*.{js,vue}": [ + "eslint --fix", + "git add" + ] + }, + "keywords": [ + "vue", + "admin", + "dashboard", + "element-ui", + "boilerplate", + "admin-template", + "management-system" + ], + "repository": { + "type": "git", + "url": "https://github.com/YunaiV/ruoyi-vue-pro" + }, + "dependencies": { + "@riophae/vue-treeselect": "0.4.0", + "axios": "0.21.0", + "clipboard": "2.0.6", + "core-js": "3.8.1", + "echarts": "4.9.0", + "element-ui": "2.15.0", + "file-saver": "2.0.4", + "fuse.js": "6.4.3", + "highlight.js": "9.18.5", + "js-beautify": "1.13.0", + "js-cookie": "2.2.1", + "jsencrypt": "3.0.0-rc.1", + "nprogress": "0.2.0", + "quill": "1.3.7", + "screenfull": "5.0.2", + "sortablejs": "1.10.2", + "vue": "2.6.12", + "vue-count-to": "1.0.13", + "vue-cropper": "0.5.5", + "vue-router": "3.4.9", + "vuedraggable": "2.24.3", + "vuex": "3.6.0" + }, + "devDependencies": { + "@vue/cli-plugin-babel": "4.4.6", + "@vue/cli-plugin-eslint": "4.4.6", + "@vue/cli-service": "4.4.6", + "babel-eslint": "10.1.0", + "chalk": "4.1.0", + "connect": "3.6.6", + "eslint": "7.15.0", + "eslint-plugin-vue": "7.2.0", + "lint-staged": "10.5.3", + "sass": "1.30.0", + "runjs": "4.4.2", + "sass-loader": "10.1.0", + "script-ext-html-webpack-plugin": "2.1.5", + "svg-sprite-loader": "5.1.1", + "vue-template-compiler": "2.6.12" + }, + "engines": { + "node": ">=8.9", + "npm": ">= 3.0.0" + }, + "browserslist": [ + "> 1%", + "last 2 versions" + ] +} diff --git a/ruoyi-ui/public/favicon.ico b/yudao-admin-ui/public/favicon.ico similarity index 100% rename from ruoyi-ui/public/favicon.ico rename to yudao-admin-ui/public/favicon.ico diff --git a/ruoyi-ui/public/index.html b/yudao-admin-ui/public/index.html similarity index 96% rename from ruoyi-ui/public/index.html rename to yudao-admin-ui/public/index.html index 525e2acd6..6d64bf957 100644 --- a/ruoyi-ui/public/index.html +++ b/yudao-admin-ui/public/index.html @@ -1,207 +1,207 @@ - - - - - - - - - <%= webpackConfig.name %> - - - -
-
-
-
-
-
正在加载系统资源,请耐心等待
-
-
- - + + + + + + + + + <%= webpackConfig.name %> + + + +
+
+
+
+
+
正在加载系统资源,请耐心等待
+
+
+ + diff --git a/ruoyi-ui/public/robots.txt b/yudao-admin-ui/public/robots.txt similarity index 53% rename from ruoyi-ui/public/robots.txt rename to yudao-admin-ui/public/robots.txt index c2aab7e03..77470cb39 100644 --- a/ruoyi-ui/public/robots.txt +++ b/yudao-admin-ui/public/robots.txt @@ -1,2 +1,2 @@ -User-agent: * +User-agent: * Disallow: / \ No newline at end of file diff --git a/ruoyi-ui/src/App.vue b/yudao-admin-ui/src/App.vue similarity index 91% rename from ruoyi-ui/src/App.vue rename to yudao-admin-ui/src/App.vue index 1d0634c32..e448b1130 100644 --- a/ruoyi-ui/src/App.vue +++ b/yudao-admin-ui/src/App.vue @@ -1,11 +1,11 @@ - - - + + + diff --git a/ruoyi-ui/src/api/infra/apiAccessLog.js b/yudao-admin-ui/src/api/infra/apiAccessLog.js similarity index 100% rename from ruoyi-ui/src/api/infra/apiAccessLog.js rename to yudao-admin-ui/src/api/infra/apiAccessLog.js diff --git a/ruoyi-ui/src/api/infra/apiErrorLog.js b/yudao-admin-ui/src/api/infra/apiErrorLog.js similarity index 100% rename from ruoyi-ui/src/api/infra/apiErrorLog.js rename to yudao-admin-ui/src/api/infra/apiErrorLog.js diff --git a/ruoyi-ui/src/api/infra/config.js b/yudao-admin-ui/src/api/infra/config.js similarity index 100% rename from ruoyi-ui/src/api/infra/config.js rename to yudao-admin-ui/src/api/infra/config.js diff --git a/ruoyi-ui/src/api/infra/dbDoc.js b/yudao-admin-ui/src/api/infra/dbDoc.js similarity index 100% rename from ruoyi-ui/src/api/infra/dbDoc.js rename to yudao-admin-ui/src/api/infra/dbDoc.js diff --git a/ruoyi-ui/src/api/infra/file.js b/yudao-admin-ui/src/api/infra/file.js similarity index 100% rename from ruoyi-ui/src/api/infra/file.js rename to yudao-admin-ui/src/api/infra/file.js diff --git a/ruoyi-ui/src/api/infra/job.js b/yudao-admin-ui/src/api/infra/job.js similarity index 100% rename from ruoyi-ui/src/api/infra/job.js rename to yudao-admin-ui/src/api/infra/job.js diff --git a/ruoyi-ui/src/api/infra/jobLog.js b/yudao-admin-ui/src/api/infra/jobLog.js similarity index 100% rename from ruoyi-ui/src/api/infra/jobLog.js rename to yudao-admin-ui/src/api/infra/jobLog.js diff --git a/ruoyi-ui/src/api/infra/redis.js b/yudao-admin-ui/src/api/infra/redis.js similarity index 100% rename from ruoyi-ui/src/api/infra/redis.js rename to yudao-admin-ui/src/api/infra/redis.js diff --git a/ruoyi-ui/src/api/login.js b/yudao-admin-ui/src/api/login.js similarity index 94% rename from ruoyi-ui/src/api/login.js rename to yudao-admin-ui/src/api/login.js index 274cc2726..cda0d9d23 100644 --- a/ruoyi-ui/src/api/login.js +++ b/yudao-admin-ui/src/api/login.js @@ -1,40 +1,40 @@ -import request from '@/utils/request' - -// 登录方法 -export function login(username, password, code, uuid) { - const data = { - username, - password, - code, - uuid - } - return request({ - url: '/login', - method: 'post', - data: data - }) -} - -// 获取用户详细信息 -export function getInfo() { - return request({ - url: '/get-permission-info', - method: 'get' - }) -} - -// 退出方法 -export function logout() { - return request({ - url: '/logout', - method: 'post' - }) -} - -// 获取验证码 -export function getCodeImg() { - return request({ - url: '/system/captcha/get-image', - method: 'get' - }) -} +import request from '@/utils/request' + +// 登录方法 +export function login(username, password, code, uuid) { + const data = { + username, + password, + code, + uuid + } + return request({ + url: '/login', + method: 'post', + data: data + }) +} + +// 获取用户详细信息 +export function getInfo() { + return request({ + url: '/get-permission-info', + method: 'get' + }) +} + +// 退出方法 +export function logout() { + return request({ + url: '/logout', + method: 'post' + }) +} + +// 获取验证码 +export function getCodeImg() { + return request({ + url: '/system/captcha/get-image', + method: 'get' + }) +} diff --git a/ruoyi-ui/src/api/menu.js b/yudao-admin-ui/src/api/menu.js similarity index 94% rename from ruoyi-ui/src/api/menu.js rename to yudao-admin-ui/src/api/menu.js index 5dae14e7a..01fbbc9f4 100644 --- a/ruoyi-ui/src/api/menu.js +++ b/yudao-admin-ui/src/api/menu.js @@ -1,9 +1,9 @@ -import request from '@/utils/request' - -// 获取路由 -export const getRouters = () => { - return request({ - url: '/list-menus', - method: 'get' - }) -} +import request from '@/utils/request' + +// 获取路由 +export const getRouters = () => { + return request({ + url: '/list-menus', + method: 'get' + }) +} diff --git a/ruoyi-ui/src/api/system/dept.js b/yudao-admin-ui/src/api/system/dept.js similarity index 94% rename from ruoyi-ui/src/api/system/dept.js rename to yudao-admin-ui/src/api/system/dept.js index d8c59cf9a..4ca13e36b 100644 --- a/ruoyi-ui/src/api/system/dept.js +++ b/yudao-admin-ui/src/api/system/dept.js @@ -1,60 +1,60 @@ -import request from '@/utils/request' - -// 查询部门列表 -export function listDept(query) { - return request({ - url: '/system/dept/list', - method: 'get', - params: query - }) -} - -// 查询部门列表(排除节点) -export function listDeptExcludeChild(deptId) { - return request({ - url: '/system/dept/list/exclude/' + deptId, - method: 'get' - }) -} - -// 查询部门详细 -export function getDept(deptId) { - return request({ - url: '/system/dept/get?id=' + deptId, - method: 'get' - }) -} - -// 获取部门精简信息列表 -export function listSimpleDepts() { - return request({ - url: '/system/dept/list-all-simple', - method: 'get' - }) -} - -// 新增部门 -export function addDept(data) { - return request({ - url: '/system/dept/create', - method: 'post', - data: data - }) -} - -// 修改部门 -export function updateDept(data) { - return request({ - url: '/system/dept/update', - method: 'put', - data: data - }) -} - -// 删除部门 -export function delDept(id) { - return request({ - url: '/system/dept/delete?id=' + id, - method: 'delete' - }) -} +import request from '@/utils/request' + +// 查询部门列表 +export function listDept(query) { + return request({ + url: '/system/dept/list', + method: 'get', + params: query + }) +} + +// 查询部门列表(排除节点) +export function listDeptExcludeChild(deptId) { + return request({ + url: '/system/dept/list/exclude/' + deptId, + method: 'get' + }) +} + +// 查询部门详细 +export function getDept(deptId) { + return request({ + url: '/system/dept/get?id=' + deptId, + method: 'get' + }) +} + +// 获取部门精简信息列表 +export function listSimpleDepts() { + return request({ + url: '/system/dept/list-all-simple', + method: 'get' + }) +} + +// 新增部门 +export function addDept(data) { + return request({ + url: '/system/dept/create', + method: 'post', + data: data + }) +} + +// 修改部门 +export function updateDept(data) { + return request({ + url: '/system/dept/update', + method: 'put', + data: data + }) +} + +// 删除部门 +export function delDept(id) { + return request({ + url: '/system/dept/delete?id=' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/system/dict/data.js b/yudao-admin-ui/src/api/system/dict/data.js similarity index 95% rename from ruoyi-ui/src/api/system/dict/data.js rename to yudao-admin-ui/src/api/system/dict/data.js index 00e614b15..396ea759a 100644 --- a/ruoyi-ui/src/api/system/dict/data.js +++ b/yudao-admin-ui/src/api/system/dict/data.js @@ -1,70 +1,70 @@ -import request from '@/utils/request' - -// 查询字典数据列表 -export function listData(query) { - return request({ - url: '/system/dict-data/page', - method: 'get', - params: query - }) -} - -// 查询字典数据详细 -export function getData(dictCode) { - return request({ - url: '/system/dict-data/get?id=' + dictCode, - method: 'get' - }) -} - -// 根据字典类型查询字典数据信息 -export function getDicts(dictType) { - return request({ - url: '/system/dict-data/type/' + dictType, - method: 'get' - }) -} - -// 新增字典数据 -export function addData(data) { - return request({ - url: '/system/dict-data/create', - method: 'post', - data: data - }) -} - -// 修改字典数据 -export function updateData(data) { - return request({ - url: '/system/dict-data/update', - method: 'put', - data: data - }) -} - -// 删除字典数据 -export function delData(dictCode) { - return request({ - url: '/system/dict-data/delete?id=' + dictCode, - method: 'delete' - }) -} - -// 导出字典数据 -export function exportData(query) { - return request({ - url: '/system/dict-data/export', - method: 'get', - params: query, - responseType: 'blob' - }) -} - -// 查询全部字典数据列表 -export function listSimpleDictDatas() { - return request({ - url: '/system/dict-data/list-all-simple', - method: 'get', - }) -} +import request from '@/utils/request' + +// 查询字典数据列表 +export function listData(query) { + return request({ + url: '/system/dict-data/page', + method: 'get', + params: query + }) +} + +// 查询字典数据详细 +export function getData(dictCode) { + return request({ + url: '/system/dict-data/get?id=' + dictCode, + method: 'get' + }) +} + +// 根据字典类型查询字典数据信息 +export function getDicts(dictType) { + return request({ + url: '/system/dict-data/type/' + dictType, + method: 'get' + }) +} + +// 新增字典数据 +export function addData(data) { + return request({ + url: '/system/dict-data/create', + method: 'post', + data: data + }) +} + +// 修改字典数据 +export function updateData(data) { + return request({ + url: '/system/dict-data/update', + method: 'put', + data: data + }) +} + +// 删除字典数据 +export function delData(dictCode) { + return request({ + url: '/system/dict-data/delete?id=' + dictCode, + method: 'delete' + }) +} + +// 导出字典数据 +export function exportData(query) { + return request({ + url: '/system/dict-data/export', + method: 'get', + params: query, + responseType: 'blob' + }) +} + +// 查询全部字典数据列表 +export function listSimpleDictDatas() { + return request({ + url: '/system/dict-data/list-all-simple', + method: 'get', + }) +} diff --git a/ruoyi-ui/src/api/system/dict/type.js b/yudao-admin-ui/src/api/system/dict/type.js similarity index 94% rename from ruoyi-ui/src/api/system/dict/type.js rename to yudao-admin-ui/src/api/system/dict/type.js index 9fe10d418..659f70239 100644 --- a/ruoyi-ui/src/api/system/dict/type.js +++ b/yudao-admin-ui/src/api/system/dict/type.js @@ -1,62 +1,62 @@ -import request from '@/utils/request' - -// 查询字典类型列表 -export function listType(query) { - return request({ - url: '/system/dict-type/page', - method: 'get', - params: query - }) -} - -// 查询字典类型详细 -export function getType(dictId) { - return request({ - url: '/system/dict-type/get?id=' + dictId, - method: 'get' - }) -} - -// 新增字典类型 -export function addType(data) { - return request({ - url: '/system/dict-type/create', - method: 'post', - data: data - }) -} - -// 修改字典类型 -export function updateType(data) { - return request({ - url: '/system/dict-type/update', - method: 'put', - data: data - }) -} - -// 删除字典类型 -export function delType(dictId) { - return request({ - url: '/system/dict-type/delete?id=' + dictId, - method: 'delete' - }) -} - -// 导出字典类型 -export function exportType(query) { - return request({ - url: '/system/dict-type/export', - method: 'get', - params: query, - responseType: 'blob' - }) -} - -// 获取字典选择框列表 -export function listAllSimple() { - return request({ - url: '/system/dict-type/list-all-simple', - method: 'get' - }) -} +import request from '@/utils/request' + +// 查询字典类型列表 +export function listType(query) { + return request({ + url: '/system/dict-type/page', + method: 'get', + params: query + }) +} + +// 查询字典类型详细 +export function getType(dictId) { + return request({ + url: '/system/dict-type/get?id=' + dictId, + method: 'get' + }) +} + +// 新增字典类型 +export function addType(data) { + return request({ + url: '/system/dict-type/create', + method: 'post', + data: data + }) +} + +// 修改字典类型 +export function updateType(data) { + return request({ + url: '/system/dict-type/update', + method: 'put', + data: data + }) +} + +// 删除字典类型 +export function delType(dictId) { + return request({ + url: '/system/dict-type/delete?id=' + dictId, + method: 'delete' + }) +} + +// 导出字典类型 +export function exportType(query) { + return request({ + url: '/system/dict-type/export', + method: 'get', + params: query, + responseType: 'blob' + }) +} + +// 获取字典选择框列表 +export function listAllSimple() { + return request({ + url: '/system/dict-type/list-all-simple', + method: 'get' + }) +} diff --git a/ruoyi-ui/src/api/system/errorCode.js b/yudao-admin-ui/src/api/system/errorCode.js similarity index 100% rename from ruoyi-ui/src/api/system/errorCode.js rename to yudao-admin-ui/src/api/system/errorCode.js diff --git a/ruoyi-ui/src/api/system/loginlog.js b/yudao-admin-ui/src/api/system/loginlog.js similarity index 100% rename from ruoyi-ui/src/api/system/loginlog.js rename to yudao-admin-ui/src/api/system/loginlog.js diff --git a/ruoyi-ui/src/api/system/menu.js b/yudao-admin-ui/src/api/system/menu.js similarity index 100% rename from ruoyi-ui/src/api/system/menu.js rename to yudao-admin-ui/src/api/system/menu.js diff --git a/ruoyi-ui/src/api/system/notice.js b/yudao-admin-ui/src/api/system/notice.js similarity index 94% rename from ruoyi-ui/src/api/system/notice.js rename to yudao-admin-ui/src/api/system/notice.js index b8c7cf709..2e0c05dcb 100644 --- a/ruoyi-ui/src/api/system/notice.js +++ b/yudao-admin-ui/src/api/system/notice.js @@ -1,44 +1,44 @@ -import request from '@/utils/request' - -// 查询公告列表 -export function listNotice(query) { - return request({ - url: '/system/notice/page', - method: 'get', - params: query - }) -} - -// 查询公告详细 -export function getNotice(noticeId) { - return request({ - url: '/system/notice/get?id=' + noticeId, - method: 'get' - }) -} - -// 新增公告 -export function addNotice(data) { - return request({ - url: '/system/notice/create', - method: 'post', - data: data - }) -} - -// 修改公告 -export function updateNotice(data) { - return request({ - url: '/system/notice/update', - method: 'put', - data: data - }) -} - -// 删除公告 -export function delNotice(noticeId) { - return request({ - url: '/system/notice/delete?id=' + noticeId, - method: 'delete' - }) -} +import request from '@/utils/request' + +// 查询公告列表 +export function listNotice(query) { + return request({ + url: '/system/notice/page', + method: 'get', + params: query + }) +} + +// 查询公告详细 +export function getNotice(noticeId) { + return request({ + url: '/system/notice/get?id=' + noticeId, + method: 'get' + }) +} + +// 新增公告 +export function addNotice(data) { + return request({ + url: '/system/notice/create', + method: 'post', + data: data + }) +} + +// 修改公告 +export function updateNotice(data) { + return request({ + url: '/system/notice/update', + method: 'put', + data: data + }) +} + +// 删除公告 +export function delNotice(noticeId) { + return request({ + url: '/system/notice/delete?id=' + noticeId, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/system/operatelog.js b/yudao-admin-ui/src/api/system/operatelog.js similarity index 100% rename from ruoyi-ui/src/api/system/operatelog.js rename to yudao-admin-ui/src/api/system/operatelog.js diff --git a/ruoyi-ui/src/api/system/permission.js b/yudao-admin-ui/src/api/system/permission.js similarity index 100% rename from ruoyi-ui/src/api/system/permission.js rename to yudao-admin-ui/src/api/system/permission.js diff --git a/ruoyi-ui/src/api/system/post.js b/yudao-admin-ui/src/api/system/post.js similarity index 94% rename from ruoyi-ui/src/api/system/post.js rename to yudao-admin-ui/src/api/system/post.js index 3ef4a9906..df74d3fed 100644 --- a/ruoyi-ui/src/api/system/post.js +++ b/yudao-admin-ui/src/api/system/post.js @@ -1,62 +1,62 @@ -import request from '@/utils/request' - -// 查询岗位列表 -export function listPost(query) { - return request({ - url: '/system/post/page', - method: 'get', - params: query - }) -} - -// 获取岗位精简信息列表 -export function listSimplePosts() { - return request({ - url: '/system/post/list-all-simple', - method: 'get' - }) -} - -// 查询岗位详细 -export function getPost(postId) { - return request({ - url: '/system/post/get?id=' + postId, - method: 'get' - }) -} - -// 新增岗位 -export function addPost(data) { - return request({ - url: '/system/post/create', - method: 'post', - data: data - }) -} - -// 修改岗位 -export function updatePost(data) { - return request({ - url: '/system/post/update', - method: 'put', - data: data - }) -} - -// 删除岗位 -export function delPost(postId) { - return request({ - url: '/system/post/delete?id=' + postId, - method: 'delete' - }) -} - -// 导出岗位 -export function exportPost(query) { - return request({ - url: '/system/post/export', - method: 'get', - params: query, - responseType: 'blob' - }) -} +import request from '@/utils/request' + +// 查询岗位列表 +export function listPost(query) { + return request({ + url: '/system/post/page', + method: 'get', + params: query + }) +} + +// 获取岗位精简信息列表 +export function listSimplePosts() { + return request({ + url: '/system/post/list-all-simple', + method: 'get' + }) +} + +// 查询岗位详细 +export function getPost(postId) { + return request({ + url: '/system/post/get?id=' + postId, + method: 'get' + }) +} + +// 新增岗位 +export function addPost(data) { + return request({ + url: '/system/post/create', + method: 'post', + data: data + }) +} + +// 修改岗位 +export function updatePost(data) { + return request({ + url: '/system/post/update', + method: 'put', + data: data + }) +} + +// 删除岗位 +export function delPost(postId) { + return request({ + url: '/system/post/delete?id=' + postId, + method: 'delete' + }) +} + +// 导出岗位 +export function exportPost(query) { + return request({ + url: '/system/post/export', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/ruoyi-ui/src/api/system/role.js b/yudao-admin-ui/src/api/system/role.js similarity index 94% rename from ruoyi-ui/src/api/system/role.js rename to yudao-admin-ui/src/api/system/role.js index 27bb0500b..05d2a59fb 100644 --- a/ruoyi-ui/src/api/system/role.js +++ b/yudao-admin-ui/src/api/system/role.js @@ -1,75 +1,75 @@ -import request from '@/utils/request' - -// 查询角色列表 -export function listRole(query) { - return request({ - url: '/system/role/page', - method: 'get', - params: query - }) -} - -// 查询角色(精简)列表 -export function listSimpleRoles() { - return request({ - url: '/system/role/list-all-simple', - method: 'get' - }) -} - -// 查询角色详细 -export function getRole(roleId) { - return request({ - url: '/system/role/get?id=' + roleId, - method: 'get' - }) -} - -// 新增角色 -export function addRole(data) { - return request({ - url: '/system/role/create', - method: 'post', - data: data - }) -} - -// 修改角色 -export function updateRole(data) { - return request({ - url: '/system/role/update', - method: 'put', - data: data - }) -} - -// 角色状态修改 -export function changeRoleStatus(id, status) { - const data = { - id, - status - } - return request({ - url: '/system/role/update-status', - method: 'put', - data: data - }) -} - -// 删除角色 -export function delRole(roleId) { - return request({ - url: '/system/role/delete?id=' + roleId, - method: 'delete' - }) -} - -// 导出角色 -export function exportRole(query) { - return request({ - url: '/system/role/export', - method: 'get', - params: query, - responseType: 'blob' - }) -} +import request from '@/utils/request' + +// 查询角色列表 +export function listRole(query) { + return request({ + url: '/system/role/page', + method: 'get', + params: query + }) +} + +// 查询角色(精简)列表 +export function listSimpleRoles() { + return request({ + url: '/system/role/list-all-simple', + method: 'get' + }) +} + +// 查询角色详细 +export function getRole(roleId) { + return request({ + url: '/system/role/get?id=' + roleId, + method: 'get' + }) +} + +// 新增角色 +export function addRole(data) { + return request({ + url: '/system/role/create', + method: 'post', + data: data + }) +} + +// 修改角色 +export function updateRole(data) { + return request({ + url: '/system/role/update', + method: 'put', + data: data + }) +} + +// 角色状态修改 +export function changeRoleStatus(id, status) { + const data = { + id, + status + } + return request({ + url: '/system/role/update-status', + method: 'put', + data: data + }) +} + +// 删除角色 +export function delRole(roleId) { + return request({ + url: '/system/role/delete?id=' + roleId, + method: 'delete' + }) +} + +// 导出角色 +export function exportRole(query) { + return request({ + url: '/system/role/export', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/ruoyi-ui/src/api/system/session.js b/yudao-admin-ui/src/api/system/session.js similarity index 100% rename from ruoyi-ui/src/api/system/session.js rename to yudao-admin-ui/src/api/system/session.js diff --git a/ruoyi-ui/src/api/system/sms/smsChannel.js b/yudao-admin-ui/src/api/system/sms/smsChannel.js similarity index 100% rename from ruoyi-ui/src/api/system/sms/smsChannel.js rename to yudao-admin-ui/src/api/system/sms/smsChannel.js diff --git a/ruoyi-ui/src/api/system/sms/smsLog.js b/yudao-admin-ui/src/api/system/sms/smsLog.js similarity index 100% rename from ruoyi-ui/src/api/system/sms/smsLog.js rename to yudao-admin-ui/src/api/system/sms/smsLog.js diff --git a/ruoyi-ui/src/api/system/sms/smsTemplate.js b/yudao-admin-ui/src/api/system/sms/smsTemplate.js similarity index 100% rename from ruoyi-ui/src/api/system/sms/smsTemplate.js rename to yudao-admin-ui/src/api/system/sms/smsTemplate.js diff --git a/ruoyi-ui/src/api/system/user.js b/yudao-admin-ui/src/api/system/user.js similarity index 94% rename from ruoyi-ui/src/api/system/user.js rename to yudao-admin-ui/src/api/system/user.js index cf0f007d5..e06530c92 100644 --- a/ruoyi-ui/src/api/system/user.js +++ b/yudao-admin-ui/src/api/system/user.js @@ -1,129 +1,129 @@ -import request from '@/utils/request' -import { praseStrEmpty } from "@/utils/ruoyi"; - -// 查询用户列表 -export function listUser(query) { - return request({ - url: '/system/user/page', - method: 'get', - params: query - }) -} - -// 查询用户详细 -export function getUser(userId) { - return request({ - url: '/system/user/get?id=' + praseStrEmpty(userId), - method: 'get' - }) -} - -// 新增用户 -export function addUser(data) { - return request({ - url: '/system/user/create', - method: 'post', - data: data - }) -} - -// 修改用户 -export function updateUser(data) { - return request({ - url: '/system/user/update', - method: 'put', - data: data - }) -} - -// 删除用户 -export function delUser(userId) { - return request({ - url: '/system/user/delete?id=' + userId, - method: 'delete' - }) -} - -// 导出用户 -export function exportUser(query) { - return request({ - url: '/system/user/export', - method: 'get', - params: query, - responseType: 'blob' - }) -} - -// 用户密码重置 -export function resetUserPwd(id, password) { - const data = { - id, - password - } - return request({ - url: '/system/user/update-password', - method: 'put', - data: data - }) -} - -// 用户状态修改 -export function changeUserStatus(id, status) { - const data = { - id, - status - } - return request({ - url: '/system/user/update-status', - method: 'put', - data: data - }) -} - -// 查询用户个人信息 -export function getUserProfile() { - return request({ - url: '/system/user/profile/get', - method: 'get' - }) -} - -// 修改用户个人信息 -export function updateUserProfile(data) { - return request({ - url: '/system/user/profile/update', - method: 'put', - data: data - }) -} - -// 用户密码重置 -export function updateUserPwd(oldPassword, newPassword) { - const data = { - oldPassword, - newPassword - } - return request({ - url: '/system/user/profile/update-password', - method: 'put', - data: data - }) -} - -// 用户头像上传 -export function uploadAvatar(data) { - return request({ - url: '/system/user/profile/avatar', - method: 'put', - data: data - }) -} - -// 下载用户导入模板 -export function importTemplate() { - return request({ - url: '/system/user/get-import-template', - method: 'get', - responseType: 'blob' - }) -} +import request from '@/utils/request' +import { praseStrEmpty } from "@/utils/ruoyi"; + +// 查询用户列表 +export function listUser(query) { + return request({ + url: '/system/user/page', + method: 'get', + params: query + }) +} + +// 查询用户详细 +export function getUser(userId) { + return request({ + url: '/system/user/get?id=' + praseStrEmpty(userId), + method: 'get' + }) +} + +// 新增用户 +export function addUser(data) { + return request({ + url: '/system/user/create', + method: 'post', + data: data + }) +} + +// 修改用户 +export function updateUser(data) { + return request({ + url: '/system/user/update', + method: 'put', + data: data + }) +} + +// 删除用户 +export function delUser(userId) { + return request({ + url: '/system/user/delete?id=' + userId, + method: 'delete' + }) +} + +// 导出用户 +export function exportUser(query) { + return request({ + url: '/system/user/export', + method: 'get', + params: query, + responseType: 'blob' + }) +} + +// 用户密码重置 +export function resetUserPwd(id, password) { + const data = { + id, + password + } + return request({ + url: '/system/user/update-password', + method: 'put', + data: data + }) +} + +// 用户状态修改 +export function changeUserStatus(id, status) { + const data = { + id, + status + } + return request({ + url: '/system/user/update-status', + method: 'put', + data: data + }) +} + +// 查询用户个人信息 +export function getUserProfile() { + return request({ + url: '/system/user/profile/get', + method: 'get' + }) +} + +// 修改用户个人信息 +export function updateUserProfile(data) { + return request({ + url: '/system/user/profile/update', + method: 'put', + data: data + }) +} + +// 用户密码重置 +export function updateUserPwd(oldPassword, newPassword) { + const data = { + oldPassword, + newPassword + } + return request({ + url: '/system/user/profile/update-password', + method: 'put', + data: data + }) +} + +// 用户头像上传 +export function uploadAvatar(data) { + return request({ + url: '/system/user/profile/avatar', + method: 'put', + data: data + }) +} + +// 下载用户导入模板 +export function importTemplate() { + return request({ + url: '/system/user/get-import-template', + method: 'get', + responseType: 'blob' + }) +} diff --git a/ruoyi-ui/src/api/tool/codegen.js b/yudao-admin-ui/src/api/tool/codegen.js similarity index 100% rename from ruoyi-ui/src/api/tool/codegen.js rename to yudao-admin-ui/src/api/tool/codegen.js diff --git a/ruoyi-ui/src/api/tool/testDemo.js b/yudao-admin-ui/src/api/tool/testDemo.js similarity index 100% rename from ruoyi-ui/src/api/tool/testDemo.js rename to yudao-admin-ui/src/api/tool/testDemo.js diff --git a/ruoyi-ui/src/assets/401_images/401.gif b/yudao-admin-ui/src/assets/401_images/401.gif similarity index 100% rename from ruoyi-ui/src/assets/401_images/401.gif rename to yudao-admin-ui/src/assets/401_images/401.gif diff --git a/ruoyi-ui/src/assets/404_images/404.png b/yudao-admin-ui/src/assets/404_images/404.png similarity index 100% rename from ruoyi-ui/src/assets/404_images/404.png rename to yudao-admin-ui/src/assets/404_images/404.png diff --git a/ruoyi-ui/src/assets/404_images/404_cloud.png b/yudao-admin-ui/src/assets/404_images/404_cloud.png similarity index 100% rename from ruoyi-ui/src/assets/404_images/404_cloud.png rename to yudao-admin-ui/src/assets/404_images/404_cloud.png diff --git a/ruoyi-ui/src/assets/icons/index.js b/yudao-admin-ui/src/assets/icons/index.js similarity index 96% rename from ruoyi-ui/src/assets/icons/index.js rename to yudao-admin-ui/src/assets/icons/index.js index d79e16464..2c6b309c9 100644 --- a/ruoyi-ui/src/assets/icons/index.js +++ b/yudao-admin-ui/src/assets/icons/index.js @@ -1,9 +1,9 @@ -import Vue from 'vue' -import SvgIcon from '@/components/SvgIcon'// svg component - -// register globally -Vue.component('svg-icon', SvgIcon) - -const req = require.context('./svg', false, /\.svg$/) -const requireAll = requireContext => requireContext.keys().map(requireContext) -requireAll(req) +import Vue from 'vue' +import SvgIcon from '@/components/SvgIcon'// svg component + +// register globally +Vue.component('svg-icon', SvgIcon) + +const req = require.context('./svg', false, /\.svg$/) +const requireAll = requireContext => requireContext.keys().map(requireContext) +requireAll(req) diff --git a/ruoyi-ui/src/assets/icons/svg/404.svg b/yudao-admin-ui/src/assets/icons/svg/404.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/404.svg rename to yudao-admin-ui/src/assets/icons/svg/404.svg diff --git a/ruoyi-ui/src/assets/icons/svg/bug.svg b/yudao-admin-ui/src/assets/icons/svg/bug.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/bug.svg rename to yudao-admin-ui/src/assets/icons/svg/bug.svg diff --git a/ruoyi-ui/src/assets/icons/svg/build.svg b/yudao-admin-ui/src/assets/icons/svg/build.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/build.svg rename to yudao-admin-ui/src/assets/icons/svg/build.svg diff --git a/ruoyi-ui/src/assets/icons/svg/button.svg b/yudao-admin-ui/src/assets/icons/svg/button.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/button.svg rename to yudao-admin-ui/src/assets/icons/svg/button.svg diff --git a/ruoyi-ui/src/assets/icons/svg/cascader.svg b/yudao-admin-ui/src/assets/icons/svg/cascader.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/cascader.svg rename to yudao-admin-ui/src/assets/icons/svg/cascader.svg diff --git a/ruoyi-ui/src/assets/icons/svg/chart.svg b/yudao-admin-ui/src/assets/icons/svg/chart.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/chart.svg rename to yudao-admin-ui/src/assets/icons/svg/chart.svg diff --git a/ruoyi-ui/src/assets/icons/svg/checkbox.svg b/yudao-admin-ui/src/assets/icons/svg/checkbox.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/checkbox.svg rename to yudao-admin-ui/src/assets/icons/svg/checkbox.svg diff --git a/ruoyi-ui/src/assets/icons/svg/clipboard.svg b/yudao-admin-ui/src/assets/icons/svg/clipboard.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/clipboard.svg rename to yudao-admin-ui/src/assets/icons/svg/clipboard.svg diff --git a/ruoyi-ui/src/assets/icons/svg/code.svg b/yudao-admin-ui/src/assets/icons/svg/code.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/code.svg rename to yudao-admin-ui/src/assets/icons/svg/code.svg diff --git a/ruoyi-ui/src/assets/icons/svg/color.svg b/yudao-admin-ui/src/assets/icons/svg/color.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/color.svg rename to yudao-admin-ui/src/assets/icons/svg/color.svg diff --git a/ruoyi-ui/src/assets/icons/svg/component.svg b/yudao-admin-ui/src/assets/icons/svg/component.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/component.svg rename to yudao-admin-ui/src/assets/icons/svg/component.svg diff --git a/ruoyi-ui/src/assets/icons/svg/dashboard.svg b/yudao-admin-ui/src/assets/icons/svg/dashboard.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/dashboard.svg rename to yudao-admin-ui/src/assets/icons/svg/dashboard.svg diff --git a/ruoyi-ui/src/assets/icons/svg/date-range.svg b/yudao-admin-ui/src/assets/icons/svg/date-range.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/date-range.svg rename to yudao-admin-ui/src/assets/icons/svg/date-range.svg diff --git a/ruoyi-ui/src/assets/icons/svg/date.svg b/yudao-admin-ui/src/assets/icons/svg/date.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/date.svg rename to yudao-admin-ui/src/assets/icons/svg/date.svg diff --git a/ruoyi-ui/src/assets/icons/svg/dict.svg b/yudao-admin-ui/src/assets/icons/svg/dict.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/dict.svg rename to yudao-admin-ui/src/assets/icons/svg/dict.svg diff --git a/ruoyi-ui/src/assets/icons/svg/documentation.svg b/yudao-admin-ui/src/assets/icons/svg/documentation.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/documentation.svg rename to yudao-admin-ui/src/assets/icons/svg/documentation.svg diff --git a/ruoyi-ui/src/assets/icons/svg/download.svg b/yudao-admin-ui/src/assets/icons/svg/download.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/download.svg rename to yudao-admin-ui/src/assets/icons/svg/download.svg diff --git a/ruoyi-ui/src/assets/icons/svg/drag.svg b/yudao-admin-ui/src/assets/icons/svg/drag.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/drag.svg rename to yudao-admin-ui/src/assets/icons/svg/drag.svg diff --git a/ruoyi-ui/src/assets/icons/svg/druid.svg b/yudao-admin-ui/src/assets/icons/svg/druid.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/druid.svg rename to yudao-admin-ui/src/assets/icons/svg/druid.svg diff --git a/ruoyi-ui/src/assets/icons/svg/edit.svg b/yudao-admin-ui/src/assets/icons/svg/edit.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/edit.svg rename to yudao-admin-ui/src/assets/icons/svg/edit.svg diff --git a/ruoyi-ui/src/assets/icons/svg/education.svg b/yudao-admin-ui/src/assets/icons/svg/education.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/education.svg rename to yudao-admin-ui/src/assets/icons/svg/education.svg diff --git a/ruoyi-ui/src/assets/icons/svg/email.svg b/yudao-admin-ui/src/assets/icons/svg/email.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/email.svg rename to yudao-admin-ui/src/assets/icons/svg/email.svg diff --git a/ruoyi-ui/src/assets/icons/svg/example.svg b/yudao-admin-ui/src/assets/icons/svg/example.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/example.svg rename to yudao-admin-ui/src/assets/icons/svg/example.svg diff --git a/ruoyi-ui/src/assets/icons/svg/excel.svg b/yudao-admin-ui/src/assets/icons/svg/excel.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/excel.svg rename to yudao-admin-ui/src/assets/icons/svg/excel.svg diff --git a/ruoyi-ui/src/assets/icons/svg/exit-fullscreen.svg b/yudao-admin-ui/src/assets/icons/svg/exit-fullscreen.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/exit-fullscreen.svg rename to yudao-admin-ui/src/assets/icons/svg/exit-fullscreen.svg diff --git a/ruoyi-ui/src/assets/icons/svg/eye-open.svg b/yudao-admin-ui/src/assets/icons/svg/eye-open.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/eye-open.svg rename to yudao-admin-ui/src/assets/icons/svg/eye-open.svg diff --git a/ruoyi-ui/src/assets/icons/svg/eye.svg b/yudao-admin-ui/src/assets/icons/svg/eye.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/eye.svg rename to yudao-admin-ui/src/assets/icons/svg/eye.svg diff --git a/ruoyi-ui/src/assets/icons/svg/form.svg b/yudao-admin-ui/src/assets/icons/svg/form.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/form.svg rename to yudao-admin-ui/src/assets/icons/svg/form.svg diff --git a/ruoyi-ui/src/assets/icons/svg/fullscreen.svg b/yudao-admin-ui/src/assets/icons/svg/fullscreen.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/fullscreen.svg rename to yudao-admin-ui/src/assets/icons/svg/fullscreen.svg diff --git a/ruoyi-ui/src/assets/icons/svg/github.svg b/yudao-admin-ui/src/assets/icons/svg/github.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/github.svg rename to yudao-admin-ui/src/assets/icons/svg/github.svg diff --git a/ruoyi-ui/src/assets/icons/svg/guide.svg b/yudao-admin-ui/src/assets/icons/svg/guide.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/guide.svg rename to yudao-admin-ui/src/assets/icons/svg/guide.svg diff --git a/ruoyi-ui/src/assets/icons/svg/icon.svg b/yudao-admin-ui/src/assets/icons/svg/icon.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/icon.svg rename to yudao-admin-ui/src/assets/icons/svg/icon.svg diff --git a/ruoyi-ui/src/assets/icons/svg/input.svg b/yudao-admin-ui/src/assets/icons/svg/input.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/input.svg rename to yudao-admin-ui/src/assets/icons/svg/input.svg diff --git a/ruoyi-ui/src/assets/icons/svg/international.svg b/yudao-admin-ui/src/assets/icons/svg/international.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/international.svg rename to yudao-admin-ui/src/assets/icons/svg/international.svg diff --git a/ruoyi-ui/src/assets/icons/svg/job.svg b/yudao-admin-ui/src/assets/icons/svg/job.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/job.svg rename to yudao-admin-ui/src/assets/icons/svg/job.svg diff --git a/ruoyi-ui/src/assets/icons/svg/language.svg b/yudao-admin-ui/src/assets/icons/svg/language.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/language.svg rename to yudao-admin-ui/src/assets/icons/svg/language.svg diff --git a/ruoyi-ui/src/assets/icons/svg/link.svg b/yudao-admin-ui/src/assets/icons/svg/link.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/link.svg rename to yudao-admin-ui/src/assets/icons/svg/link.svg diff --git a/ruoyi-ui/src/assets/icons/svg/list.svg b/yudao-admin-ui/src/assets/icons/svg/list.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/list.svg rename to yudao-admin-ui/src/assets/icons/svg/list.svg diff --git a/ruoyi-ui/src/assets/icons/svg/lock.svg b/yudao-admin-ui/src/assets/icons/svg/lock.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/lock.svg rename to yudao-admin-ui/src/assets/icons/svg/lock.svg diff --git a/ruoyi-ui/src/assets/icons/svg/log.svg b/yudao-admin-ui/src/assets/icons/svg/log.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/log.svg rename to yudao-admin-ui/src/assets/icons/svg/log.svg diff --git a/ruoyi-ui/src/assets/icons/svg/logininfor.svg b/yudao-admin-ui/src/assets/icons/svg/logininfor.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/logininfor.svg rename to yudao-admin-ui/src/assets/icons/svg/logininfor.svg diff --git a/ruoyi-ui/src/assets/icons/svg/message.svg b/yudao-admin-ui/src/assets/icons/svg/message.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/message.svg rename to yudao-admin-ui/src/assets/icons/svg/message.svg diff --git a/ruoyi-ui/src/assets/icons/svg/money.svg b/yudao-admin-ui/src/assets/icons/svg/money.svg similarity index 100% rename from ruoyi-ui/src/assets/icons/svg/money.svg rename to yudao-admin-ui/src/assets/icons/svg/money.svg diff --git a/ruoyi-ui/src/assets/icons/svg/monitor.svg b/yudao-admin-ui/src/assets/icons/svg/monitor.svg similarity index 97% rename from ruoyi-ui/src/assets/icons/svg/monitor.svg rename to yudao-admin-ui/src/assets/icons/svg/monitor.svg index 70db62b45..bc308cb0f 100644 --- a/ruoyi-ui/src/assets/icons/svg/monitor.svg +++ b/yudao-admin-ui/src/assets/icons/svg/monitor.svg @@ -1,2 +1,2 @@ -{{ item.meta.title }} - {{ item.meta.title }} - - - - - - - - + + + + + diff --git a/ruoyi-ui/src/components/Editor/index.vue b/yudao-admin-ui/src/components/Editor/index.vue similarity index 96% rename from ruoyi-ui/src/components/Editor/index.vue rename to yudao-admin-ui/src/components/Editor/index.vue index 905499536..ad35bbf5d 100644 --- a/ruoyi-ui/src/components/Editor/index.vue +++ b/yudao-admin-ui/src/components/Editor/index.vue @@ -1,195 +1,195 @@ - - - - - \ No newline at end of file diff --git a/ruoyi-ui/src/components/FileUpload/index.vue b/yudao-admin-ui/src/components/FileUpload/index.vue similarity index 100% rename from ruoyi-ui/src/components/FileUpload/index.vue rename to yudao-admin-ui/src/components/FileUpload/index.vue diff --git a/ruoyi-ui/src/components/Hamburger/index.vue b/yudao-admin-ui/src/components/Hamburger/index.vue similarity index 96% rename from ruoyi-ui/src/components/Hamburger/index.vue rename to yudao-admin-ui/src/components/Hamburger/index.vue index c6a4359be..368b00215 100644 --- a/ruoyi-ui/src/components/Hamburger/index.vue +++ b/yudao-admin-ui/src/components/Hamburger/index.vue @@ -1,44 +1,44 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/components/HeaderSearch/index.vue b/yudao-admin-ui/src/components/HeaderSearch/index.vue similarity index 95% rename from ruoyi-ui/src/components/HeaderSearch/index.vue rename to yudao-admin-ui/src/components/HeaderSearch/index.vue index b2533f395..67f6c309a 100644 --- a/ruoyi-ui/src/components/HeaderSearch/index.vue +++ b/yudao-admin-ui/src/components/HeaderSearch/index.vue @@ -1,188 +1,188 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/components/IconSelect/index.vue b/yudao-admin-ui/src/components/IconSelect/index.vue similarity index 95% rename from ruoyi-ui/src/components/IconSelect/index.vue rename to yudao-admin-ui/src/components/IconSelect/index.vue index a7512b2d6..b0ec9fa1a 100644 --- a/ruoyi-ui/src/components/IconSelect/index.vue +++ b/yudao-admin-ui/src/components/IconSelect/index.vue @@ -1,68 +1,68 @@ - - - - - - + + + + + + diff --git a/ruoyi-ui/src/components/IconSelect/requireIcons.js b/yudao-admin-ui/src/components/IconSelect/requireIcons.js similarity index 95% rename from ruoyi-ui/src/components/IconSelect/requireIcons.js rename to yudao-admin-ui/src/components/IconSelect/requireIcons.js index 5d3005df5..99e5c54cc 100644 --- a/ruoyi-ui/src/components/IconSelect/requireIcons.js +++ b/yudao-admin-ui/src/components/IconSelect/requireIcons.js @@ -1,11 +1,11 @@ - -const req = require.context('../../assets/icons/svg', false, /\.svg$/) -const requireAll = requireContext => requireContext.keys() - -const re = /\.\/(.*)\.svg/ - -const icons = requireAll(req).map(i => { - return i.match(re)[1] -}) - -export default icons + +const req = require.context('../../assets/icons/svg', false, /\.svg$/) +const requireAll = requireContext => requireContext.keys() + +const re = /\.\/(.*)\.svg/ + +const icons = requireAll(req).map(i => { + return i.match(re)[1] +}) + +export default icons diff --git a/ruoyi-ui/src/components/ImageUpload/index.vue b/yudao-admin-ui/src/components/ImageUpload/index.vue similarity index 100% rename from ruoyi-ui/src/components/ImageUpload/index.vue rename to yudao-admin-ui/src/components/ImageUpload/index.vue diff --git a/ruoyi-ui/src/components/Pagination/index.vue b/yudao-admin-ui/src/components/Pagination/index.vue similarity index 94% rename from ruoyi-ui/src/components/Pagination/index.vue rename to yudao-admin-ui/src/components/Pagination/index.vue index 08ff09046..c815e132c 100644 --- a/ruoyi-ui/src/components/Pagination/index.vue +++ b/yudao-admin-ui/src/components/Pagination/index.vue @@ -1,101 +1,101 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/components/PanThumb/index.vue b/yudao-admin-ui/src/components/PanThumb/index.vue similarity index 95% rename from ruoyi-ui/src/components/PanThumb/index.vue rename to yudao-admin-ui/src/components/PanThumb/index.vue index 796b01b89..1bcf41709 100644 --- a/ruoyi-ui/src/components/PanThumb/index.vue +++ b/yudao-admin-ui/src/components/PanThumb/index.vue @@ -1,142 +1,142 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/components/ParentView/index.vue b/yudao-admin-ui/src/components/ParentView/index.vue similarity index 100% rename from ruoyi-ui/src/components/ParentView/index.vue rename to yudao-admin-ui/src/components/ParentView/index.vue diff --git a/ruoyi-ui/src/components/RightPanel/index.vue b/yudao-admin-ui/src/components/RightPanel/index.vue similarity index 95% rename from ruoyi-ui/src/components/RightPanel/index.vue rename to yudao-admin-ui/src/components/RightPanel/index.vue index 1534b9bee..fbf27eb4f 100644 --- a/ruoyi-ui/src/components/RightPanel/index.vue +++ b/yudao-admin-ui/src/components/RightPanel/index.vue @@ -1,149 +1,149 @@ - - - - - - - + + + + + + + diff --git a/ruoyi-ui/src/components/RightToolbar/index.vue b/yudao-admin-ui/src/components/RightToolbar/index.vue similarity index 95% rename from ruoyi-ui/src/components/RightToolbar/index.vue rename to yudao-admin-ui/src/components/RightToolbar/index.vue index 73d2dccea..494c0b85e 100644 --- a/ruoyi-ui/src/components/RightToolbar/index.vue +++ b/yudao-admin-ui/src/components/RightToolbar/index.vue @@ -1,38 +1,38 @@ - - - + + + diff --git a/ruoyi-ui/src/components/RuoYi/Doc/index.vue b/yudao-admin-ui/src/components/RuoYi/Doc/index.vue similarity index 93% rename from ruoyi-ui/src/components/RuoYi/Doc/index.vue rename to yudao-admin-ui/src/components/RuoYi/Doc/index.vue index 1cba295aa..92ee3776c 100644 --- a/ruoyi-ui/src/components/RuoYi/Doc/index.vue +++ b/yudao-admin-ui/src/components/RuoYi/Doc/index.vue @@ -1,21 +1,21 @@ - - - + + + diff --git a/ruoyi-ui/src/components/RuoYi/Git/index.vue b/yudao-admin-ui/src/components/RuoYi/Git/index.vue similarity index 93% rename from ruoyi-ui/src/components/RuoYi/Git/index.vue rename to yudao-admin-ui/src/components/RuoYi/Git/index.vue index 1d1cdfa75..b0d15f01d 100644 --- a/ruoyi-ui/src/components/RuoYi/Git/index.vue +++ b/yudao-admin-ui/src/components/RuoYi/Git/index.vue @@ -1,21 +1,21 @@ - - - + + + diff --git a/ruoyi-ui/src/components/Screenfull/index.vue b/yudao-admin-ui/src/components/Screenfull/index.vue similarity index 94% rename from ruoyi-ui/src/components/Screenfull/index.vue rename to yudao-admin-ui/src/components/Screenfull/index.vue index 85937c9c3..d4e539c26 100644 --- a/ruoyi-ui/src/components/Screenfull/index.vue +++ b/yudao-admin-ui/src/components/Screenfull/index.vue @@ -1,57 +1,57 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/components/SizeSelect/index.vue b/yudao-admin-ui/src/components/SizeSelect/index.vue similarity index 95% rename from ruoyi-ui/src/components/SizeSelect/index.vue rename to yudao-admin-ui/src/components/SizeSelect/index.vue index 5503b9712..e88065b49 100644 --- a/ruoyi-ui/src/components/SizeSelect/index.vue +++ b/yudao-admin-ui/src/components/SizeSelect/index.vue @@ -1,57 +1,57 @@ - - - + + + diff --git a/ruoyi-ui/src/components/SvgIcon/index.vue b/yudao-admin-ui/src/components/SvgIcon/index.vue similarity index 95% rename from ruoyi-ui/src/components/SvgIcon/index.vue rename to yudao-admin-ui/src/components/SvgIcon/index.vue index 340ace45c..e4bf5ade1 100644 --- a/ruoyi-ui/src/components/SvgIcon/index.vue +++ b/yudao-admin-ui/src/components/SvgIcon/index.vue @@ -1,61 +1,61 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/components/ThemePicker/index.vue b/yudao-admin-ui/src/components/ThemePicker/index.vue similarity index 96% rename from ruoyi-ui/src/components/ThemePicker/index.vue rename to yudao-admin-ui/src/components/ThemePicker/index.vue index 9a77cd343..3879c5ad0 100644 --- a/ruoyi-ui/src/components/ThemePicker/index.vue +++ b/yudao-admin-ui/src/components/ThemePicker/index.vue @@ -1,175 +1,175 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/components/UploadImage/index.vue b/yudao-admin-ui/src/components/UploadImage/index.vue similarity index 95% rename from ruoyi-ui/src/components/UploadImage/index.vue rename to yudao-admin-ui/src/components/UploadImage/index.vue index 3941006a2..87b3ee94f 100644 --- a/ruoyi-ui/src/components/UploadImage/index.vue +++ b/yudao-admin-ui/src/components/UploadImage/index.vue @@ -1,68 +1,68 @@ - - - - - \ No newline at end of file diff --git a/ruoyi-ui/src/directive/permission/hasPermi.js b/yudao-admin-ui/src/directive/permission/hasPermi.js similarity index 96% rename from ruoyi-ui/src/directive/permission/hasPermi.js rename to yudao-admin-ui/src/directive/permission/hasPermi.js index 74f9d325d..d7107cec0 100644 --- a/ruoyi-ui/src/directive/permission/hasPermi.js +++ b/yudao-admin-ui/src/directive/permission/hasPermi.js @@ -1,28 +1,28 @@ - /** - * 操作权限处理 - * Copyright (c) 2019 ruoyi - */ - -import store from '@/store' - -export default { - inserted(el, binding, vnode) { - const { value } = binding - const all_permission = "*:*:*"; - const permissions = store.getters && store.getters.permissions - - if (value && value instanceof Array && value.length > 0) { - const permissionFlag = value - - const hasPermissions = permissions.some(permission => { - return all_permission === permission || permissionFlag.includes(permission) - }) - - if (!hasPermissions) { - el.parentNode && el.parentNode.removeChild(el) - } - } else { - throw new Error(`请设置操作权限标签值`) - } - } -} + /** + * 操作权限处理 + * Copyright (c) 2019 ruoyi + */ + +import store from '@/store' + +export default { + inserted(el, binding, vnode) { + const { value } = binding + const all_permission = "*:*:*"; + const permissions = store.getters && store.getters.permissions + + if (value && value instanceof Array && value.length > 0) { + const permissionFlag = value + + const hasPermissions = permissions.some(permission => { + return all_permission === permission || permissionFlag.includes(permission) + }) + + if (!hasPermissions) { + el.parentNode && el.parentNode.removeChild(el) + } + } else { + throw new Error(`请设置操作权限标签值`) + } + } +} diff --git a/ruoyi-ui/src/directive/permission/hasRole.js b/yudao-admin-ui/src/directive/permission/hasRole.js similarity index 95% rename from ruoyi-ui/src/directive/permission/hasRole.js rename to yudao-admin-ui/src/directive/permission/hasRole.js index ea966a34a..13038099d 100644 --- a/ruoyi-ui/src/directive/permission/hasRole.js +++ b/yudao-admin-ui/src/directive/permission/hasRole.js @@ -1,28 +1,28 @@ - /** - * 角色权限处理 - * Copyright (c) 2019 ruoyi - */ - -import store from '@/store' - -export default { - inserted(el, binding, vnode) { - const { value } = binding - const super_admin = "admin"; - const roles = store.getters && store.getters.roles - - if (value && value instanceof Array && value.length > 0) { - const roleFlag = value - - const hasRole = roles.some(role => { - return super_admin === role || roleFlag.includes(role) - }) - - if (!hasRole) { - el.parentNode && el.parentNode.removeChild(el) - } - } else { - throw new Error(`请设置角色权限标签值"`) - } - } -} + /** + * 角色权限处理 + * Copyright (c) 2019 ruoyi + */ + +import store from '@/store' + +export default { + inserted(el, binding, vnode) { + const { value } = binding + const super_admin = "admin"; + const roles = store.getters && store.getters.roles + + if (value && value instanceof Array && value.length > 0) { + const roleFlag = value + + const hasRole = roles.some(role => { + return super_admin === role || roleFlag.includes(role) + }) + + if (!hasRole) { + el.parentNode && el.parentNode.removeChild(el) + } + } else { + throw new Error(`请设置角色权限标签值"`) + } + } +} diff --git a/ruoyi-ui/src/directive/permission/index.js b/yudao-admin-ui/src/directive/permission/index.js similarity index 95% rename from ruoyi-ui/src/directive/permission/index.js rename to yudao-admin-ui/src/directive/permission/index.js index d6f530de1..e3d76d387 100644 --- a/ruoyi-ui/src/directive/permission/index.js +++ b/yudao-admin-ui/src/directive/permission/index.js @@ -1,15 +1,15 @@ -import hasRole from './hasRole' -import hasPermi from './hasPermi' - -const install = function(Vue) { - Vue.directive('hasRole', hasRole) - Vue.directive('hasPermi', hasPermi) -} - -if (window.Vue) { - window['hasRole'] = hasRole - window['hasPermi'] = hasPermi - Vue.use(install); // eslint-disable-line -} - -export default install +import hasRole from './hasRole' +import hasPermi from './hasPermi' + +const install = function(Vue) { + Vue.directive('hasRole', hasRole) + Vue.directive('hasPermi', hasPermi) +} + +if (window.Vue) { + window['hasRole'] = hasRole + window['hasPermi'] = hasPermi + Vue.use(install); // eslint-disable-line +} + +export default install diff --git a/ruoyi-ui/src/layout/components/AppMain.vue b/yudao-admin-ui/src/layout/components/AppMain.vue similarity index 94% rename from ruoyi-ui/src/layout/components/AppMain.vue rename to yudao-admin-ui/src/layout/components/AppMain.vue index 423437b72..a89763806 100644 --- a/ruoyi-ui/src/layout/components/AppMain.vue +++ b/yudao-admin-ui/src/layout/components/AppMain.vue @@ -1,57 +1,57 @@ - - - - - - - + + + + + + + diff --git a/ruoyi-ui/src/layout/components/Navbar.vue b/yudao-admin-ui/src/layout/components/Navbar.vue similarity index 96% rename from ruoyi-ui/src/layout/components/Navbar.vue rename to yudao-admin-ui/src/layout/components/Navbar.vue index db46ec556..b11460a37 100644 --- a/ruoyi-ui/src/layout/components/Navbar.vue +++ b/yudao-admin-ui/src/layout/components/Navbar.vue @@ -1,187 +1,187 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/layout/components/Settings/index.vue b/yudao-admin-ui/src/layout/components/Settings/index.vue similarity index 96% rename from ruoyi-ui/src/layout/components/Settings/index.vue rename to yudao-admin-ui/src/layout/components/Settings/index.vue index 7e495b7b0..9d42790a6 100644 --- a/ruoyi-ui/src/layout/components/Settings/index.vue +++ b/yudao-admin-ui/src/layout/components/Settings/index.vue @@ -1,197 +1,197 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/layout/components/Sidebar/FixiOSBug.js b/yudao-admin-ui/src/layout/components/Sidebar/FixiOSBug.js similarity index 95% rename from ruoyi-ui/src/layout/components/Sidebar/FixiOSBug.js rename to yudao-admin-ui/src/layout/components/Sidebar/FixiOSBug.js index 3d8cc21ed..682372699 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/FixiOSBug.js +++ b/yudao-admin-ui/src/layout/components/Sidebar/FixiOSBug.js @@ -1,25 +1,25 @@ -export default { - computed: { - device() { - return this.$store.state.app.device - } - }, - mounted() { - // In order to fix the click on menu on the ios device will trigger the mouseleave bug - this.fixBugIniOS() - }, - methods: { - fixBugIniOS() { - const $subMenu = this.$refs.subMenu - if ($subMenu) { - const handleMouseleave = $subMenu.handleMouseleave - $subMenu.handleMouseleave = (e) => { - if (this.device === 'mobile') { - return - } - handleMouseleave(e) - } - } - } - } -} +export default { + computed: { + device() { + return this.$store.state.app.device + } + }, + mounted() { + // In order to fix the click on menu on the ios device will trigger the mouseleave bug + this.fixBugIniOS() + }, + methods: { + fixBugIniOS() { + const $subMenu = this.$refs.subMenu + if ($subMenu) { + const handleMouseleave = $subMenu.handleMouseleave + $subMenu.handleMouseleave = (e) => { + if (this.device === 'mobile') { + return + } + handleMouseleave(e) + } + } + } + } +} diff --git a/ruoyi-ui/src/layout/components/Sidebar/Item.vue b/yudao-admin-ui/src/layout/components/Sidebar/Item.vue similarity index 94% rename from ruoyi-ui/src/layout/components/Sidebar/Item.vue rename to yudao-admin-ui/src/layout/components/Sidebar/Item.vue index 1a99d63f9..b515f6159 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/Item.vue +++ b/yudao-admin-ui/src/layout/components/Sidebar/Item.vue @@ -1,29 +1,29 @@ - + diff --git a/ruoyi-ui/src/layout/components/Sidebar/Link.vue b/yudao-admin-ui/src/layout/components/Sidebar/Link.vue similarity index 93% rename from ruoyi-ui/src/layout/components/Sidebar/Link.vue rename to yudao-admin-ui/src/layout/components/Sidebar/Link.vue index d235d10b6..530b3d5b3 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/Link.vue +++ b/yudao-admin-ui/src/layout/components/Sidebar/Link.vue @@ -1,43 +1,43 @@ - - - + + + diff --git a/ruoyi-ui/src/layout/components/Sidebar/Logo.vue b/yudao-admin-ui/src/layout/components/Sidebar/Logo.vue similarity index 95% rename from ruoyi-ui/src/layout/components/Sidebar/Logo.vue rename to yudao-admin-ui/src/layout/components/Sidebar/Logo.vue index 67e69e6e8..2c081d740 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/Logo.vue +++ b/yudao-admin-ui/src/layout/components/Sidebar/Logo.vue @@ -1,93 +1,93 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue b/yudao-admin-ui/src/layout/components/Sidebar/SidebarItem.vue similarity index 96% rename from ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue rename to yudao-admin-ui/src/layout/components/Sidebar/SidebarItem.vue index 21f8f6a10..c4febee2d 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue +++ b/yudao-admin-ui/src/layout/components/Sidebar/SidebarItem.vue @@ -1,96 +1,96 @@ - - - + + + diff --git a/ruoyi-ui/src/layout/components/Sidebar/index.vue b/yudao-admin-ui/src/layout/components/Sidebar/index.vue similarity index 97% rename from ruoyi-ui/src/layout/components/Sidebar/index.vue rename to yudao-admin-ui/src/layout/components/Sidebar/index.vue index 9fb23fb20..9e5d2bb3a 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/index.vue +++ b/yudao-admin-ui/src/layout/components/Sidebar/index.vue @@ -1,57 +1,57 @@ - - - + + + diff --git a/ruoyi-ui/src/layout/components/TagsView/ScrollPane.vue b/yudao-admin-ui/src/layout/components/TagsView/ScrollPane.vue similarity index 96% rename from ruoyi-ui/src/layout/components/TagsView/ScrollPane.vue rename to yudao-admin-ui/src/layout/components/TagsView/ScrollPane.vue index c110bf123..bb753a124 100644 --- a/ruoyi-ui/src/layout/components/TagsView/ScrollPane.vue +++ b/yudao-admin-ui/src/layout/components/TagsView/ScrollPane.vue @@ -1,94 +1,94 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/layout/components/TagsView/index.vue b/yudao-admin-ui/src/layout/components/TagsView/index.vue similarity index 96% rename from ruoyi-ui/src/layout/components/TagsView/index.vue rename to yudao-admin-ui/src/layout/components/TagsView/index.vue index dce967cfb..bc6ce188a 100644 --- a/ruoyi-ui/src/layout/components/TagsView/index.vue +++ b/yudao-admin-ui/src/layout/components/TagsView/index.vue @@ -1,303 +1,303 @@ - - - - - - - + + + + + + + diff --git a/ruoyi-ui/src/layout/components/global.js b/yudao-admin-ui/src/layout/components/global.js similarity index 95% rename from ruoyi-ui/src/layout/components/global.js rename to yudao-admin-ui/src/layout/components/global.js index 5d2b5b3e8..bbef1f20f 100644 --- a/ruoyi-ui/src/layout/components/global.js +++ b/yudao-admin-ui/src/layout/components/global.js @@ -1,3 +1,3 @@ -import Vue from 'vue' -const global = new Vue() -export default global +import Vue from 'vue' +const global = new Vue() +export default global diff --git a/ruoyi-ui/src/layout/components/index.js b/yudao-admin-ui/src/layout/components/index.js similarity index 98% rename from ruoyi-ui/src/layout/components/index.js rename to yudao-admin-ui/src/layout/components/index.js index 7f83004a8..104bd3ac6 100644 --- a/ruoyi-ui/src/layout/components/index.js +++ b/yudao-admin-ui/src/layout/components/index.js @@ -1,5 +1,5 @@ -export { default as AppMain } from './AppMain' -export { default as Navbar } from './Navbar' -export { default as Settings } from './Settings' -export { default as Sidebar } from './Sidebar/index.vue' -export { default as TagsView } from './TagsView/index.vue' +export { default as AppMain } from './AppMain' +export { default as Navbar } from './Navbar' +export { default as Settings } from './Settings' +export { default as Sidebar } from './Sidebar/index.vue' +export { default as TagsView } from './TagsView/index.vue' diff --git a/ruoyi-ui/src/layout/index.vue b/yudao-admin-ui/src/layout/index.vue similarity index 96% rename from ruoyi-ui/src/layout/index.vue rename to yudao-admin-ui/src/layout/index.vue index c6e9b3bc9..d4907719f 100644 --- a/ruoyi-ui/src/layout/index.vue +++ b/yudao-admin-ui/src/layout/index.vue @@ -1,108 +1,108 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/layout/mixin/ResizeHandler.js b/yudao-admin-ui/src/layout/mixin/ResizeHandler.js similarity index 96% rename from ruoyi-ui/src/layout/mixin/ResizeHandler.js rename to yudao-admin-ui/src/layout/mixin/ResizeHandler.js index b3fc8b26f..e8d0df8c2 100644 --- a/ruoyi-ui/src/layout/mixin/ResizeHandler.js +++ b/yudao-admin-ui/src/layout/mixin/ResizeHandler.js @@ -1,45 +1,45 @@ -import store from '@/store' - -const { body } = document -const WIDTH = 992 // refer to Bootstrap's responsive design - -export default { - watch: { - $route(route) { - if (this.device === 'mobile' && this.sidebar.opened) { - store.dispatch('app/closeSideBar', { withoutAnimation: false }) - } - } - }, - beforeMount() { - window.addEventListener('resize', this.$_resizeHandler) - }, - beforeDestroy() { - window.removeEventListener('resize', this.$_resizeHandler) - }, - mounted() { - const isMobile = this.$_isMobile() - if (isMobile) { - store.dispatch('app/toggleDevice', 'mobile') - store.dispatch('app/closeSideBar', { withoutAnimation: true }) - } - }, - methods: { - // use $_ for mixins properties - // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential - $_isMobile() { - const rect = body.getBoundingClientRect() - return rect.width - 1 < WIDTH - }, - $_resizeHandler() { - if (!document.hidden) { - const isMobile = this.$_isMobile() - store.dispatch('app/toggleDevice', isMobile ? 'mobile' : 'desktop') - - if (isMobile) { - store.dispatch('app/closeSideBar', { withoutAnimation: true }) - } - } - } - } -} +import store from '@/store' + +const { body } = document +const WIDTH = 992 // refer to Bootstrap's responsive design + +export default { + watch: { + $route(route) { + if (this.device === 'mobile' && this.sidebar.opened) { + store.dispatch('app/closeSideBar', { withoutAnimation: false }) + } + } + }, + beforeMount() { + window.addEventListener('resize', this.$_resizeHandler) + }, + beforeDestroy() { + window.removeEventListener('resize', this.$_resizeHandler) + }, + mounted() { + const isMobile = this.$_isMobile() + if (isMobile) { + store.dispatch('app/toggleDevice', 'mobile') + store.dispatch('app/closeSideBar', { withoutAnimation: true }) + } + }, + methods: { + // use $_ for mixins properties + // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential + $_isMobile() { + const rect = body.getBoundingClientRect() + return rect.width - 1 < WIDTH + }, + $_resizeHandler() { + if (!document.hidden) { + const isMobile = this.$_isMobile() + store.dispatch('app/toggleDevice', isMobile ? 'mobile' : 'desktop') + + if (isMobile) { + store.dispatch('app/closeSideBar', { withoutAnimation: true }) + } + } + } + } +} diff --git a/ruoyi-ui/src/main.js b/yudao-admin-ui/src/main.js similarity index 96% rename from ruoyi-ui/src/main.js rename to yudao-admin-ui/src/main.js index e1f067fa1..d9978300c 100644 --- a/ruoyi-ui/src/main.js +++ b/yudao-admin-ui/src/main.js @@ -1,99 +1,99 @@ -import Vue from 'vue' - -import Cookies from 'js-cookie' - -import Element from 'element-ui' -import './assets/styles/element-variables.scss' - -import '@/assets/styles/index.scss' // global css -import '@/assets/styles/ruoyi.scss' // ruoyi css -import App from './App' -import store from './store' -import router from './router' -import permission from './directive/permission' - -import './assets/icons' // icon -import './permission' // permission control -import { getDicts } from "@/api/system/dict/data"; -import { getConfigKey } from "@/api/infra/config"; -import { - parseTime, - resetForm, - addDateRange, - addBeginAndEndTime, - selectDictLabel, - download, - handleTree, - downloadExcel, - downloadWord, - downloadZip, - downloadHtml, - downloadMarkdown, -} from "@/utils/ruoyi"; -import Pagination from "@/components/Pagination"; -// 自定义表格工具扩展 -import RightToolbar from "@/components/RightToolbar" -// 代码高亮插件 -// import hljs from 'highlight.js' -// import 'highlight.js/styles/github-gist.css' -import {DICT_TYPE, getDictDataLabel, getDictDatas} from "@/utils/dict"; - -// 全局方法挂载 -Vue.prototype.getDicts = getDicts -Vue.prototype.getConfigKey = getConfigKey -Vue.prototype.parseTime = parseTime -Vue.prototype.resetForm = resetForm -Vue.prototype.addDateRange = addDateRange -Vue.prototype.addBeginAndEndTime = addBeginAndEndTime -Vue.prototype.selectDictLabel = selectDictLabel -Vue.prototype.getDictDatas = getDictDatas -Vue.prototype.getDictDataLabel = getDictDataLabel -Vue.prototype.DICT_TYPE = DICT_TYPE -Vue.prototype.download = download -Vue.prototype.downloadExcel = downloadExcel -Vue.prototype.downloadWord = downloadWord -Vue.prototype.downloadHtml = downloadHtml -Vue.prototype.downloadMarkdown = downloadMarkdown -Vue.prototype.downloadZip = downloadZip -Vue.prototype.handleTree = handleTree - -Vue.prototype.msgSuccess = function (msg) { - this.$message({ showClose: true, message: msg, type: "success" }); -} - -Vue.prototype.msgError = function (msg) { - this.$message({ showClose: true, message: msg, type: "error" }); -} - -Vue.prototype.msgInfo = function (msg) { - this.$message.info(msg); -} - -// 全局组件挂载 -Vue.component('Pagination', Pagination) -Vue.component('RightToolbar', RightToolbar) - -Vue.use(permission) -// Vue.use(hljs.vuePlugin); - -/** - * If you don't want to use mock-server - * you want to use MockJs for mock api - * you can execute: mockXHR() - * - * Currently MockJs will be used in the production environment, - * please remove it before going online! ! ! - */ - -Vue.use(Element, { - size: Cookies.get('size') || 'medium' // set element-ui default size -}) - -Vue.config.productionTip = false - -new Vue({ - el: '#app', - router, - store, - render: h => h(App) -}) +import Vue from 'vue' + +import Cookies from 'js-cookie' + +import Element from 'element-ui' +import './assets/styles/element-variables.scss' + +import '@/assets/styles/index.scss' // global css +import '@/assets/styles/ruoyi.scss' // ruoyi css +import App from './App' +import store from './store' +import router from './router' +import permission from './directive/permission' + +import './assets/icons' // icon +import './permission' // permission control +import { getDicts } from "@/api/system/dict/data"; +import { getConfigKey } from "@/api/infra/config"; +import { + parseTime, + resetForm, + addDateRange, + addBeginAndEndTime, + selectDictLabel, + download, + handleTree, + downloadExcel, + downloadWord, + downloadZip, + downloadHtml, + downloadMarkdown, +} from "@/utils/ruoyi"; +import Pagination from "@/components/Pagination"; +// 自定义表格工具扩展 +import RightToolbar from "@/components/RightToolbar" +// 代码高亮插件 +// import hljs from 'highlight.js' +// import 'highlight.js/styles/github-gist.css' +import {DICT_TYPE, getDictDataLabel, getDictDatas} from "@/utils/dict"; + +// 全局方法挂载 +Vue.prototype.getDicts = getDicts +Vue.prototype.getConfigKey = getConfigKey +Vue.prototype.parseTime = parseTime +Vue.prototype.resetForm = resetForm +Vue.prototype.addDateRange = addDateRange +Vue.prototype.addBeginAndEndTime = addBeginAndEndTime +Vue.prototype.selectDictLabel = selectDictLabel +Vue.prototype.getDictDatas = getDictDatas +Vue.prototype.getDictDataLabel = getDictDataLabel +Vue.prototype.DICT_TYPE = DICT_TYPE +Vue.prototype.download = download +Vue.prototype.downloadExcel = downloadExcel +Vue.prototype.downloadWord = downloadWord +Vue.prototype.downloadHtml = downloadHtml +Vue.prototype.downloadMarkdown = downloadMarkdown +Vue.prototype.downloadZip = downloadZip +Vue.prototype.handleTree = handleTree + +Vue.prototype.msgSuccess = function (msg) { + this.$message({ showClose: true, message: msg, type: "success" }); +} + +Vue.prototype.msgError = function (msg) { + this.$message({ showClose: true, message: msg, type: "error" }); +} + +Vue.prototype.msgInfo = function (msg) { + this.$message.info(msg); +} + +// 全局组件挂载 +Vue.component('Pagination', Pagination) +Vue.component('RightToolbar', RightToolbar) + +Vue.use(permission) +// Vue.use(hljs.vuePlugin); + +/** + * If you don't want to use mock-server + * you want to use MockJs for mock api + * you can execute: mockXHR() + * + * Currently MockJs will be used in the production environment, + * please remove it before going online! ! ! + */ + +Vue.use(Element, { + size: Cookies.get('size') || 'medium' // set element-ui default size +}) + +Vue.config.productionTip = false + +new Vue({ + el: '#app', + router, + store, + render: h => h(App) +}) diff --git a/ruoyi-ui/src/permission.js b/yudao-admin-ui/src/permission.js similarity index 96% rename from ruoyi-ui/src/permission.js rename to yudao-admin-ui/src/permission.js index ccb20eb78..dbca87b28 100644 --- a/ruoyi-ui/src/permission.js +++ b/yudao-admin-ui/src/permission.js @@ -1,56 +1,56 @@ -import router from './router' -import store from './store' -import { Message } from 'element-ui' -import NProgress from 'nprogress' -import 'nprogress/nprogress.css' -import { getToken } from '@/utils/auth' - -NProgress.configure({ showSpinner: false }) - -const whiteList = ['/login', '/auth-redirect', '/bind', '/register'] - -router.beforeEach((to, from, next) => { - NProgress.start() - if (getToken()) { - /* has token*/ - if (to.path === '/login') { - next({ path: '/' }) - NProgress.done() - } else { - if (store.getters.roles.length === 0) { - // 获取字典数据 - store.dispatch('dict/loadDictDatas') - // 判断当前用户是否已拉取完user_info信息 - store.dispatch('GetInfo').then(res => { - // 拉取user_info - const roles = res.roles - store.dispatch('GenerateRoutes', { roles }).then(accessRoutes => { - // 根据roles权限生成可访问的路由表 - router.addRoutes(accessRoutes) // 动态添加可访问路由表 - next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 - }) - }).catch(err => { - store.dispatch('LogOut').then(() => { - Message.error(err) - next({ path: '/' }) - }) - }) - } else { - next() - } - } - } else { - // 没有token - if (whiteList.indexOf(to.path) !== -1) { - // 在免登录白名单,直接进入 - next() - } else { - next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页 - NProgress.done() - } - } -}) - -router.afterEach(() => { - NProgress.done() -}) +import router from './router' +import store from './store' +import { Message } from 'element-ui' +import NProgress from 'nprogress' +import 'nprogress/nprogress.css' +import { getToken } from '@/utils/auth' + +NProgress.configure({ showSpinner: false }) + +const whiteList = ['/login', '/auth-redirect', '/bind', '/register'] + +router.beforeEach((to, from, next) => { + NProgress.start() + if (getToken()) { + /* has token*/ + if (to.path === '/login') { + next({ path: '/' }) + NProgress.done() + } else { + if (store.getters.roles.length === 0) { + // 获取字典数据 + store.dispatch('dict/loadDictDatas') + // 判断当前用户是否已拉取完user_info信息 + store.dispatch('GetInfo').then(res => { + // 拉取user_info + const roles = res.roles + store.dispatch('GenerateRoutes', { roles }).then(accessRoutes => { + // 根据roles权限生成可访问的路由表 + router.addRoutes(accessRoutes) // 动态添加可访问路由表 + next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 + }) + }).catch(err => { + store.dispatch('LogOut').then(() => { + Message.error(err) + next({ path: '/' }) + }) + }) + } else { + next() + } + } + } else { + // 没有token + if (whiteList.indexOf(to.path) !== -1) { + // 在免登录白名单,直接进入 + next() + } else { + next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页 + NProgress.done() + } + } +}) + +router.afterEach(() => { + NProgress.done() +}) diff --git a/ruoyi-ui/src/router/index.js b/yudao-admin-ui/src/router/index.js similarity index 96% rename from ruoyi-ui/src/router/index.js rename to yudao-admin-ui/src/router/index.js index b4216c0db..a4f676306 100644 --- a/ruoyi-ui/src/router/index.js +++ b/yudao-admin-ui/src/router/index.js @@ -1,128 +1,128 @@ -import Vue from 'vue' -import Router from 'vue-router' - -Vue.use(Router) - -/* Layout */ -import Layout from '@/layout' -import ParentView from '@/components/ParentView'; - -/** - * Note: 路由配置项 - * - * hidden: true // 当设置 true 的时候该路由不会再侧边栏出现 如401,login等页面,或者如一些编辑页面/edit/1 - * alwaysShow: true // 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式--如组件页面 - * // 只有一个时,会将那个子路由当做根路由显示在侧边栏--如引导页面 - * // 若你想不管路由下面的 children 声明的个数都显示你的根路由 - * // 你可以设置 alwaysShow: true,这样它就会忽略之前定义的规则,一直显示根路由 - * redirect: noRedirect // 当设置 noRedirect 的时候该路由在面包屑导航中不可被点击 - * name:'router-name' // 设定路由的名字,一定要填写不然使用时会出现各种问题 - * meta : { - noCache: true // 如果设置为true,则不会被 缓存(默认 false) - title: 'title' // 设置该路由在侧边栏和面包屑中展示的名字 - icon: 'svg-name' // 设置该路由的图标,对应路径src/assets/icons/svg - breadcrumb: false // 如果设置为false,则不会在breadcrumb面包屑中显示 - } - */ - -// 公共路由 -export const constantRoutes = [ - { - path: '/redirect', - component: Layout, - hidden: true, - children: [ - { - path: '/redirect/:path(.*)', - component: (resolve) => require(['@/views/redirect'], resolve) - } - ] - }, - { - path: '/login', - component: (resolve) => require(['@/views/login'], resolve), - hidden: true - }, - { - path: '/404', - component: (resolve) => require(['@/views/error/404'], resolve), - hidden: true - }, - { - path: '/401', - component: (resolve) => require(['@/views/error/401'], resolve), - hidden: true - }, - { - path: '', - component: Layout, - redirect: 'index', - children: [ - { - path: 'index', - component: (resolve) => require(['@/views/index'], resolve), - name: '首页', - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } - } - ] - }, - { - path: '/user', - component: Layout, - hidden: true, - redirect: 'noredirect', - children: [ - { - path: 'profile', - component: (resolve) => require(['@/views/system/user/profile/index'], resolve), - name: 'Profile', - meta: { title: '个人中心', icon: 'user' } - } - ] - }, - { - path: '/dict', - component: Layout, - hidden: true, - children: [ - { - path: 'type/data/:dictId(\\d+)', - component: (resolve) => require(['@/views/system/dict/data'], resolve), - name: 'Data', - meta: { title: '字典数据', icon: '' } - } - ] - }, - { - path: '/job', - component: Layout, - hidden: true, - children: [ - { - path: 'log', - component: (resolve) => require(['@/views/infra/job/log'], resolve), - name: 'JobLog', - meta: { title: '调度日志' } - } - ] - }, - { - path: '/codegen', - component: Layout, - hidden: true, - children: [ - { - path: 'edit/:tableId(\\d+)', - component: (resolve) => require(['@/views/tool/codegen/editTable'], resolve), - name: 'GenEdit', - meta: { title: '修改生成配置' } - } - ] - } -] - -export default new Router({ - mode: 'history', // 去掉url中的# - scrollBehavior: () => ({ y: 0 }), - routes: constantRoutes -}) +import Vue from 'vue' +import Router from 'vue-router' + +Vue.use(Router) + +/* Layout */ +import Layout from '@/layout' +import ParentView from '@/components/ParentView'; + +/** + * Note: 路由配置项 + * + * hidden: true // 当设置 true 的时候该路由不会再侧边栏出现 如401,login等页面,或者如一些编辑页面/edit/1 + * alwaysShow: true // 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式--如组件页面 + * // 只有一个时,会将那个子路由当做根路由显示在侧边栏--如引导页面 + * // 若你想不管路由下面的 children 声明的个数都显示你的根路由 + * // 你可以设置 alwaysShow: true,这样它就会忽略之前定义的规则,一直显示根路由 + * redirect: noRedirect // 当设置 noRedirect 的时候该路由在面包屑导航中不可被点击 + * name:'router-name' // 设定路由的名字,一定要填写不然使用时会出现各种问题 + * meta : { + noCache: true // 如果设置为true,则不会被 缓存(默认 false) + title: 'title' // 设置该路由在侧边栏和面包屑中展示的名字 + icon: 'svg-name' // 设置该路由的图标,对应路径src/assets/icons/svg + breadcrumb: false // 如果设置为false,则不会在breadcrumb面包屑中显示 + } + */ + +// 公共路由 +export const constantRoutes = [ + { + path: '/redirect', + component: Layout, + hidden: true, + children: [ + { + path: '/redirect/:path(.*)', + component: (resolve) => require(['@/views/redirect'], resolve) + } + ] + }, + { + path: '/login', + component: (resolve) => require(['@/views/login'], resolve), + hidden: true + }, + { + path: '/404', + component: (resolve) => require(['@/views/error/404'], resolve), + hidden: true + }, + { + path: '/401', + component: (resolve) => require(['@/views/error/401'], resolve), + hidden: true + }, + { + path: '', + component: Layout, + redirect: 'index', + children: [ + { + path: 'index', + component: (resolve) => require(['@/views/index'], resolve), + name: '首页', + meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + } + ] + }, + { + path: '/user', + component: Layout, + hidden: true, + redirect: 'noredirect', + children: [ + { + path: 'profile', + component: (resolve) => require(['@/views/system/user/profile/index'], resolve), + name: 'Profile', + meta: { title: '个人中心', icon: 'user' } + } + ] + }, + { + path: '/dict', + component: Layout, + hidden: true, + children: [ + { + path: 'type/data/:dictId(\\d+)', + component: (resolve) => require(['@/views/system/dict/data'], resolve), + name: 'Data', + meta: { title: '字典数据', icon: '' } + } + ] + }, + { + path: '/job', + component: Layout, + hidden: true, + children: [ + { + path: 'log', + component: (resolve) => require(['@/views/infra/job/log'], resolve), + name: 'JobLog', + meta: { title: '调度日志' } + } + ] + }, + { + path: '/codegen', + component: Layout, + hidden: true, + children: [ + { + path: 'edit/:tableId(\\d+)', + component: (resolve) => require(['@/views/tool/codegen/editTable'], resolve), + name: 'GenEdit', + meta: { title: '修改生成配置' } + } + ] + } +] + +export default new Router({ + mode: 'history', // 去掉url中的# + scrollBehavior: () => ({ y: 0 }), + routes: constantRoutes +}) diff --git a/ruoyi-ui/src/settings.js b/yudao-admin-ui/src/settings.js similarity index 95% rename from ruoyi-ui/src/settings.js rename to yudao-admin-ui/src/settings.js index 9e76ba6a9..fc172cbcd 100644 --- a/ruoyi-ui/src/settings.js +++ b/yudao-admin-ui/src/settings.js @@ -1,36 +1,36 @@ -module.exports = { - title: '芋道管理系统', - - /** - * 侧边栏主题 深色主题theme-dark,浅色主题theme-light - */ - sideTheme: 'theme-dark', - - /** - * 是否系统布局配置 - */ - showSettings: false, - - /** - * 是否显示 tagsView - */ - tagsView: true, - - /** - * 是否固定头部 - */ - fixedHeader: false, - - /** - * 是否显示logo - */ - sidebarLogo: true, - - /** - * @type {string | array} 'production' | ['production', 'development'] - * @description Need show err logs component. - * The default is only used in the production env - * If you want to also use it in dev, you can pass ['production', 'development'] - */ - errorLog: 'production' -} +module.exports = { + title: '芋道管理系统', + + /** + * 侧边栏主题 深色主题theme-dark,浅色主题theme-light + */ + sideTheme: 'theme-dark', + + /** + * 是否系统布局配置 + */ + showSettings: false, + + /** + * 是否显示 tagsView + */ + tagsView: true, + + /** + * 是否固定头部 + */ + fixedHeader: false, + + /** + * 是否显示logo + */ + sidebarLogo: true, + + /** + * @type {string | array} 'production' | ['production', 'development'] + * @description Need show err logs component. + * The default is only used in the production env + * If you want to also use it in dev, you can pass ['production', 'development'] + */ + errorLog: 'production' +} diff --git a/ruoyi-ui/src/store/getters.js b/yudao-admin-ui/src/store/getters.js similarity index 97% rename from ruoyi-ui/src/store/getters.js rename to yudao-admin-ui/src/store/getters.js index 813d838a6..4d17d51ad 100644 --- a/ruoyi-ui/src/store/getters.js +++ b/yudao-admin-ui/src/store/getters.js @@ -1,18 +1,18 @@ -const getters = { - sidebar: state => state.app.sidebar, - size: state => state.app.size, - device: state => state.app.device, - visitedViews: state => state.tagsView.visitedViews, - cachedViews: state => state.tagsView.cachedViews, - token: state => state.user.token, - avatar: state => state.user.avatar, - name: state => state.user.name, - introduction: state => state.user.introduction, - roles: state => state.user.roles, - permissions: state => state.user.permissions, - permission_routes: state => state.permission.routes, - sidebarRouters:state => state.permission.sidebarRouters, - // 数据字典 - dict_datas: state => state.dict.dictDatas -} -export default getters +const getters = { + sidebar: state => state.app.sidebar, + size: state => state.app.size, + device: state => state.app.device, + visitedViews: state => state.tagsView.visitedViews, + cachedViews: state => state.tagsView.cachedViews, + token: state => state.user.token, + avatar: state => state.user.avatar, + name: state => state.user.name, + introduction: state => state.user.introduction, + roles: state => state.user.roles, + permissions: state => state.user.permissions, + permission_routes: state => state.permission.routes, + sidebarRouters:state => state.permission.sidebarRouters, + // 数据字典 + dict_datas: state => state.dict.dictDatas +} +export default getters diff --git a/ruoyi-ui/src/store/index.js b/yudao-admin-ui/src/store/index.js similarity index 95% rename from ruoyi-ui/src/store/index.js rename to yudao-admin-ui/src/store/index.js index 7e9db3347..116d6d689 100644 --- a/ruoyi-ui/src/store/index.js +++ b/yudao-admin-ui/src/store/index.js @@ -1,25 +1,25 @@ -import Vue from 'vue' -import Vuex from 'vuex' -import app from './modules/app' -import user from './modules/user' -import tagsView from './modules/tagsView' -import permission from './modules/permission' -import settings from './modules/settings' -import dict from './modules/dict' -import getters from './getters' - -Vue.use(Vuex) - -const store = new Vuex.Store({ - modules: { - app, - user, - tagsView, - permission, - settings, - dict - }, - getters -}) - -export default store +import Vue from 'vue' +import Vuex from 'vuex' +import app from './modules/app' +import user from './modules/user' +import tagsView from './modules/tagsView' +import permission from './modules/permission' +import settings from './modules/settings' +import dict from './modules/dict' +import getters from './getters' + +Vue.use(Vuex) + +const store = new Vuex.Store({ + modules: { + app, + user, + tagsView, + permission, + settings, + dict + }, + getters +}) + +export default store diff --git a/ruoyi-ui/src/store/modules/app.js b/yudao-admin-ui/src/store/modules/app.js similarity index 95% rename from ruoyi-ui/src/store/modules/app.js rename to yudao-admin-ui/src/store/modules/app.js index c8d8ee91e..45d89bb96 100644 --- a/ruoyi-ui/src/store/modules/app.js +++ b/yudao-admin-ui/src/store/modules/app.js @@ -1,56 +1,56 @@ -import Cookies from 'js-cookie' - -const state = { - sidebar: { - opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true, - withoutAnimation: false - }, - device: 'desktop', - size: Cookies.get('size') || 'medium' -} - -const mutations = { - TOGGLE_SIDEBAR: state => { - state.sidebar.opened = !state.sidebar.opened - state.sidebar.withoutAnimation = false - if (state.sidebar.opened) { - Cookies.set('sidebarStatus', 1) - } else { - Cookies.set('sidebarStatus', 0) - } - }, - CLOSE_SIDEBAR: (state, withoutAnimation) => { - Cookies.set('sidebarStatus', 0) - state.sidebar.opened = false - state.sidebar.withoutAnimation = withoutAnimation - }, - TOGGLE_DEVICE: (state, device) => { - state.device = device - }, - SET_SIZE: (state, size) => { - state.size = size - Cookies.set('size', size) - } -} - -const actions = { - toggleSideBar({ commit }) { - commit('TOGGLE_SIDEBAR') - }, - closeSideBar({ commit }, { withoutAnimation }) { - commit('CLOSE_SIDEBAR', withoutAnimation) - }, - toggleDevice({ commit }, device) { - commit('TOGGLE_DEVICE', device) - }, - setSize({ commit }, size) { - commit('SET_SIZE', size) - } -} - -export default { - namespaced: true, - state, - mutations, - actions -} +import Cookies from 'js-cookie' + +const state = { + sidebar: { + opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true, + withoutAnimation: false + }, + device: 'desktop', + size: Cookies.get('size') || 'medium' +} + +const mutations = { + TOGGLE_SIDEBAR: state => { + state.sidebar.opened = !state.sidebar.opened + state.sidebar.withoutAnimation = false + if (state.sidebar.opened) { + Cookies.set('sidebarStatus', 1) + } else { + Cookies.set('sidebarStatus', 0) + } + }, + CLOSE_SIDEBAR: (state, withoutAnimation) => { + Cookies.set('sidebarStatus', 0) + state.sidebar.opened = false + state.sidebar.withoutAnimation = withoutAnimation + }, + TOGGLE_DEVICE: (state, device) => { + state.device = device + }, + SET_SIZE: (state, size) => { + state.size = size + Cookies.set('size', size) + } +} + +const actions = { + toggleSideBar({ commit }) { + commit('TOGGLE_SIDEBAR') + }, + closeSideBar({ commit }, { withoutAnimation }) { + commit('CLOSE_SIDEBAR', withoutAnimation) + }, + toggleDevice({ commit }, device) { + commit('TOGGLE_DEVICE', device) + }, + setSize({ commit }, size) { + commit('SET_SIZE', size) + } +} + +export default { + namespaced: true, + state, + mutations, + actions +} diff --git a/ruoyi-ui/src/store/modules/dict.js b/yudao-admin-ui/src/store/modules/dict.js similarity index 100% rename from ruoyi-ui/src/store/modules/dict.js rename to yudao-admin-ui/src/store/modules/dict.js diff --git a/ruoyi-ui/src/store/modules/permission.js b/yudao-admin-ui/src/store/modules/permission.js similarity index 96% rename from ruoyi-ui/src/store/modules/permission.js rename to yudao-admin-ui/src/store/modules/permission.js index 090b07061..0e071e7eb 100644 --- a/ruoyi-ui/src/store/modules/permission.js +++ b/yudao-admin-ui/src/store/modules/permission.js @@ -1,98 +1,98 @@ -import { constantRoutes } from '@/router' -import { getRouters } from '@/api/menu' -import Layout from '@/layout/index' -import ParentView from '@/components/ParentView'; - -const permission = { - state: { - routes: [], - addRoutes: [], - sidebarRouters: [] - }, - mutations: { - SET_ROUTES: (state, routes) => { - state.addRoutes = routes - state.routes = constantRoutes.concat(routes) - }, - SET_SIDEBAR_ROUTERS: (state, routers) => { - state.sidebarRouters = constantRoutes.concat(routers) - }, - }, - actions: { - // 生成路由 - GenerateRoutes({ commit }) { - return new Promise(resolve => { - // 向后端请求路由数据 - getRouters().then(res => { - const sdata = JSON.parse(JSON.stringify(res.data)) - const rdata = JSON.parse(JSON.stringify(res.data)) - const sidebarRoutes = filterAsyncRouter(sdata) - const rewriteRoutes = filterAsyncRouter(rdata, true) - rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true }) - commit('SET_ROUTES', rewriteRoutes) - commit('SET_SIDEBAR_ROUTERS', sidebarRoutes) - resolve(rewriteRoutes) - }) - }) - } - } -} - -// 遍历后台传来的路由字符串,转换为组件对象 -function filterAsyncRouter(asyncRouterMap, isRewrite = false) { - return asyncRouterMap.filter(route => { - // 将 ruoyi 后端原有耦合前端的逻辑,迁移到此处 - // 处理 meta 属性 - route.meta = { - title: route.name, - icon: route.icon - } - // 处理 component 属性 - if (route.children) { // 父节点 - // debugger - if (route.parentId === 0) { - route.component = Layout - } else { - route.component = ParentView - } - } else { // 根节点 - route.component = loadView(route.component) - } - - // filterChildren - if (isRewrite && route.children) { - route.children = filterChildren(route.children) - } - if (route.children != null && route.children && route.children.length) { - route.children = filterAsyncRouter(route.children, route, isRewrite) - } - return true - }) -} - -function filterChildren(childrenMap) { - var children = [] - childrenMap.forEach((el, index) => { - if (el.children && el.children.length) { - if (el.component === 'ParentView') { - el.children.forEach(c => { - c.path = el.path + '/' + c.path - if (c.children && c.children.length) { - children = children.concat(filterChildren(c.children, c)) - return - } - children.push(c) - }) - return - } - } - children = children.concat(el) - }) - return children -} - -export const loadView = (view) => { // 路由懒加载 - return (resolve) => require([`@/views/${view}`], resolve) -} - -export default permission +import { constantRoutes } from '@/router' +import { getRouters } from '@/api/menu' +import Layout from '@/layout/index' +import ParentView from '@/components/ParentView'; + +const permission = { + state: { + routes: [], + addRoutes: [], + sidebarRouters: [] + }, + mutations: { + SET_ROUTES: (state, routes) => { + state.addRoutes = routes + state.routes = constantRoutes.concat(routes) + }, + SET_SIDEBAR_ROUTERS: (state, routers) => { + state.sidebarRouters = constantRoutes.concat(routers) + }, + }, + actions: { + // 生成路由 + GenerateRoutes({ commit }) { + return new Promise(resolve => { + // 向后端请求路由数据 + getRouters().then(res => { + const sdata = JSON.parse(JSON.stringify(res.data)) + const rdata = JSON.parse(JSON.stringify(res.data)) + const sidebarRoutes = filterAsyncRouter(sdata) + const rewriteRoutes = filterAsyncRouter(rdata, true) + rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true }) + commit('SET_ROUTES', rewriteRoutes) + commit('SET_SIDEBAR_ROUTERS', sidebarRoutes) + resolve(rewriteRoutes) + }) + }) + } + } +} + +// 遍历后台传来的路由字符串,转换为组件对象 +function filterAsyncRouter(asyncRouterMap, isRewrite = false) { + return asyncRouterMap.filter(route => { + // 将 ruoyi 后端原有耦合前端的逻辑,迁移到此处 + // 处理 meta 属性 + route.meta = { + title: route.name, + icon: route.icon + } + // 处理 component 属性 + if (route.children) { // 父节点 + // debugger + if (route.parentId === 0) { + route.component = Layout + } else { + route.component = ParentView + } + } else { // 根节点 + route.component = loadView(route.component) + } + + // filterChildren + if (isRewrite && route.children) { + route.children = filterChildren(route.children) + } + if (route.children != null && route.children && route.children.length) { + route.children = filterAsyncRouter(route.children, route, isRewrite) + } + return true + }) +} + +function filterChildren(childrenMap) { + var children = [] + childrenMap.forEach((el, index) => { + if (el.children && el.children.length) { + if (el.component === 'ParentView') { + el.children.forEach(c => { + c.path = el.path + '/' + c.path + if (c.children && c.children.length) { + children = children.concat(filterChildren(c.children, c)) + return + } + children.push(c) + }) + return + } + } + children = children.concat(el) + }) + return children +} + +export const loadView = (view) => { // 路由懒加载 + return (resolve) => require([`@/views/${view}`], resolve) +} + +export default permission diff --git a/ruoyi-ui/src/store/modules/settings.js b/yudao-admin-ui/src/store/modules/settings.js similarity index 95% rename from ruoyi-ui/src/store/modules/settings.js rename to yudao-admin-ui/src/store/modules/settings.js index a246a3c4a..8bd81a387 100644 --- a/ruoyi-ui/src/store/modules/settings.js +++ b/yudao-admin-ui/src/store/modules/settings.js @@ -1,35 +1,35 @@ -import variables from '@/assets/styles/element-variables.scss' -import defaultSettings from '@/settings' - -const { sideTheme, showSettings, tagsView, fixedHeader, sidebarLogo } = defaultSettings - -const state = { - theme: variables.theme, - sideTheme: sideTheme, - showSettings: showSettings, - tagsView: tagsView, - fixedHeader: fixedHeader, - sidebarLogo: sidebarLogo -} - -const mutations = { - CHANGE_SETTING: (state, { key, value }) => { - if (state.hasOwnProperty(key)) { - state[key] = value - } - } -} - -const actions = { - changeSetting({ commit }, data) { - commit('CHANGE_SETTING', data) - } -} - -export default { - namespaced: true, - state, - mutations, - actions -} - +import variables from '@/assets/styles/element-variables.scss' +import defaultSettings from '@/settings' + +const { sideTheme, showSettings, tagsView, fixedHeader, sidebarLogo } = defaultSettings + +const state = { + theme: variables.theme, + sideTheme: sideTheme, + showSettings: showSettings, + tagsView: tagsView, + fixedHeader: fixedHeader, + sidebarLogo: sidebarLogo +} + +const mutations = { + CHANGE_SETTING: (state, { key, value }) => { + if (state.hasOwnProperty(key)) { + state[key] = value + } + } +} + +const actions = { + changeSetting({ commit }, data) { + commit('CHANGE_SETTING', data) + } +} + +export default { + namespaced: true, + state, + mutations, + actions +} + diff --git a/ruoyi-ui/src/store/modules/tagsView.js b/yudao-admin-ui/src/store/modules/tagsView.js similarity index 96% rename from ruoyi-ui/src/store/modules/tagsView.js rename to yudao-admin-ui/src/store/modules/tagsView.js index abec62289..2e30d1569 100644 --- a/ruoyi-ui/src/store/modules/tagsView.js +++ b/yudao-admin-ui/src/store/modules/tagsView.js @@ -1,159 +1,159 @@ -const state = { - visitedViews: [], - cachedViews: [] -} - -const mutations = { - ADD_VISITED_VIEW: (state, view) => { - if (state.visitedViews.some(v => v.path === view.path)) return - state.visitedViews.push( - Object.assign({}, view, { - title: view.meta.title || 'no-name' - }) - ) - }, - ADD_CACHED_VIEW: (state, view) => { - if (state.cachedViews.includes(view.name)) return - if (!view.meta.noCache) { - state.cachedViews.push(view.name) - } - }, - - DEL_VISITED_VIEW: (state, view) => { - for (const [i, v] of state.visitedViews.entries()) { - if (v.path === view.path) { - state.visitedViews.splice(i, 1) - break - } - } - }, - DEL_CACHED_VIEW: (state, view) => { - const index = state.cachedViews.indexOf(view.name) - index > -1 && state.cachedViews.splice(index, 1) - }, - - DEL_OTHERS_VISITED_VIEWS: (state, view) => { - state.visitedViews = state.visitedViews.filter(v => { - return v.meta.affix || v.path === view.path - }) - }, - DEL_OTHERS_CACHED_VIEWS: (state, view) => { - const index = state.cachedViews.indexOf(view.name) - if (index > -1) { - state.cachedViews = state.cachedViews.slice(index, index + 1) - } else { - state.cachedViews = [] - } - }, - - DEL_ALL_VISITED_VIEWS: state => { - // keep affix tags - const affixTags = state.visitedViews.filter(tag => tag.meta.affix) - state.visitedViews = affixTags - }, - DEL_ALL_CACHED_VIEWS: state => { - state.cachedViews = [] - }, - - UPDATE_VISITED_VIEW: (state, view) => { - for (let v of state.visitedViews) { - if (v.path === view.path) { - v = Object.assign(v, view) - break - } - } - } -} - -const actions = { - addView({ dispatch }, view) { - dispatch('addVisitedView', view) - dispatch('addCachedView', view) - }, - addVisitedView({ commit }, view) { - commit('ADD_VISITED_VIEW', view) - }, - addCachedView({ commit }, view) { - commit('ADD_CACHED_VIEW', view) - }, - - delView({ dispatch, state }, view) { - return new Promise(resolve => { - dispatch('delVisitedView', view) - dispatch('delCachedView', view) - resolve({ - visitedViews: [...state.visitedViews], - cachedViews: [...state.cachedViews] - }) - }) - }, - delVisitedView({ commit, state }, view) { - return new Promise(resolve => { - commit('DEL_VISITED_VIEW', view) - resolve([...state.visitedViews]) - }) - }, - delCachedView({ commit, state }, view) { - return new Promise(resolve => { - commit('DEL_CACHED_VIEW', view) - resolve([...state.cachedViews]) - }) - }, - - delOthersViews({ dispatch, state }, view) { - return new Promise(resolve => { - dispatch('delOthersVisitedViews', view) - dispatch('delOthersCachedViews', view) - resolve({ - visitedViews: [...state.visitedViews], - cachedViews: [...state.cachedViews] - }) - }) - }, - delOthersVisitedViews({ commit, state }, view) { - return new Promise(resolve => { - commit('DEL_OTHERS_VISITED_VIEWS', view) - resolve([...state.visitedViews]) - }) - }, - delOthersCachedViews({ commit, state }, view) { - return new Promise(resolve => { - commit('DEL_OTHERS_CACHED_VIEWS', view) - resolve([...state.cachedViews]) - }) - }, - - delAllViews({ dispatch, state }, view) { - return new Promise(resolve => { - dispatch('delAllVisitedViews', view) - dispatch('delAllCachedViews', view) - resolve({ - visitedViews: [...state.visitedViews], - cachedViews: [...state.cachedViews] - }) - }) - }, - delAllVisitedViews({ commit, state }) { - return new Promise(resolve => { - commit('DEL_ALL_VISITED_VIEWS') - resolve([...state.visitedViews]) - }) - }, - delAllCachedViews({ commit, state }) { - return new Promise(resolve => { - commit('DEL_ALL_CACHED_VIEWS') - resolve([...state.cachedViews]) - }) - }, - - updateVisitedView({ commit }, view) { - commit('UPDATE_VISITED_VIEW', view) - } -} - -export default { - namespaced: true, - state, - mutations, - actions -} +const state = { + visitedViews: [], + cachedViews: [] +} + +const mutations = { + ADD_VISITED_VIEW: (state, view) => { + if (state.visitedViews.some(v => v.path === view.path)) return + state.visitedViews.push( + Object.assign({}, view, { + title: view.meta.title || 'no-name' + }) + ) + }, + ADD_CACHED_VIEW: (state, view) => { + if (state.cachedViews.includes(view.name)) return + if (!view.meta.noCache) { + state.cachedViews.push(view.name) + } + }, + + DEL_VISITED_VIEW: (state, view) => { + for (const [i, v] of state.visitedViews.entries()) { + if (v.path === view.path) { + state.visitedViews.splice(i, 1) + break + } + } + }, + DEL_CACHED_VIEW: (state, view) => { + const index = state.cachedViews.indexOf(view.name) + index > -1 && state.cachedViews.splice(index, 1) + }, + + DEL_OTHERS_VISITED_VIEWS: (state, view) => { + state.visitedViews = state.visitedViews.filter(v => { + return v.meta.affix || v.path === view.path + }) + }, + DEL_OTHERS_CACHED_VIEWS: (state, view) => { + const index = state.cachedViews.indexOf(view.name) + if (index > -1) { + state.cachedViews = state.cachedViews.slice(index, index + 1) + } else { + state.cachedViews = [] + } + }, + + DEL_ALL_VISITED_VIEWS: state => { + // keep affix tags + const affixTags = state.visitedViews.filter(tag => tag.meta.affix) + state.visitedViews = affixTags + }, + DEL_ALL_CACHED_VIEWS: state => { + state.cachedViews = [] + }, + + UPDATE_VISITED_VIEW: (state, view) => { + for (let v of state.visitedViews) { + if (v.path === view.path) { + v = Object.assign(v, view) + break + } + } + } +} + +const actions = { + addView({ dispatch }, view) { + dispatch('addVisitedView', view) + dispatch('addCachedView', view) + }, + addVisitedView({ commit }, view) { + commit('ADD_VISITED_VIEW', view) + }, + addCachedView({ commit }, view) { + commit('ADD_CACHED_VIEW', view) + }, + + delView({ dispatch, state }, view) { + return new Promise(resolve => { + dispatch('delVisitedView', view) + dispatch('delCachedView', view) + resolve({ + visitedViews: [...state.visitedViews], + cachedViews: [...state.cachedViews] + }) + }) + }, + delVisitedView({ commit, state }, view) { + return new Promise(resolve => { + commit('DEL_VISITED_VIEW', view) + resolve([...state.visitedViews]) + }) + }, + delCachedView({ commit, state }, view) { + return new Promise(resolve => { + commit('DEL_CACHED_VIEW', view) + resolve([...state.cachedViews]) + }) + }, + + delOthersViews({ dispatch, state }, view) { + return new Promise(resolve => { + dispatch('delOthersVisitedViews', view) + dispatch('delOthersCachedViews', view) + resolve({ + visitedViews: [...state.visitedViews], + cachedViews: [...state.cachedViews] + }) + }) + }, + delOthersVisitedViews({ commit, state }, view) { + return new Promise(resolve => { + commit('DEL_OTHERS_VISITED_VIEWS', view) + resolve([...state.visitedViews]) + }) + }, + delOthersCachedViews({ commit, state }, view) { + return new Promise(resolve => { + commit('DEL_OTHERS_CACHED_VIEWS', view) + resolve([...state.cachedViews]) + }) + }, + + delAllViews({ dispatch, state }, view) { + return new Promise(resolve => { + dispatch('delAllVisitedViews', view) + dispatch('delAllCachedViews', view) + resolve({ + visitedViews: [...state.visitedViews], + cachedViews: [...state.cachedViews] + }) + }) + }, + delAllVisitedViews({ commit, state }) { + return new Promise(resolve => { + commit('DEL_ALL_VISITED_VIEWS') + resolve([...state.visitedViews]) + }) + }, + delAllCachedViews({ commit, state }) { + return new Promise(resolve => { + commit('DEL_ALL_CACHED_VIEWS') + resolve([...state.cachedViews]) + }) + }, + + updateVisitedView({ commit }, view) { + commit('UPDATE_VISITED_VIEW', view) + } +} + +export default { + namespaced: true, + state, + mutations, + actions +} diff --git a/ruoyi-ui/src/store/modules/user.js b/yudao-admin-ui/src/store/modules/user.js similarity index 96% rename from ruoyi-ui/src/store/modules/user.js rename to yudao-admin-ui/src/store/modules/user.js index f7084c59c..eb8669d3a 100644 --- a/ruoyi-ui/src/store/modules/user.js +++ b/yudao-admin-ui/src/store/modules/user.js @@ -1,98 +1,98 @@ -import { login, logout, getInfo } from '@/api/login' -import { getToken, setToken, removeToken } from '@/utils/auth' - -const user = { - state: { - token: getToken(), - name: '', - avatar: '', - roles: [], - permissions: [] - }, - - mutations: { - SET_TOKEN: (state, token) => { - state.token = token - }, - SET_NAME: (state, name) => { - state.name = name - }, - SET_AVATAR: (state, avatar) => { - state.avatar = avatar - }, - SET_ROLES: (state, roles) => { - state.roles = roles - }, - SET_PERMISSIONS: (state, permissions) => { - state.permissions = permissions - } - }, - - actions: { - // 登录 - Login({ commit }, userInfo) { - const username = userInfo.username.trim() - const password = userInfo.password - const code = userInfo.code - const uuid = userInfo.uuid - return new Promise((resolve, reject) => { - login(username, password, code, uuid).then(res => { - res = res.data; - setToken(res.token) - commit('SET_TOKEN', res.token) - resolve() - }).catch(error => { - reject(error) - }) - }) - }, - - // 获取用户信息 - GetInfo({ commit, state }) { - return new Promise((resolve, reject) => { - getInfo(state.token).then(res => { - res = res.data; // 读取 data 数据 - const user = res.user - const avatar = user.avatar === "" ? require("@/assets/images/profile.jpg") : user.avatar; - if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组 - commit('SET_ROLES', res.roles) - commit('SET_PERMISSIONS', res.permissions) - } else { - commit('SET_ROLES', ['ROLE_DEFAULT']) - } - commit('SET_NAME', user.userName) - commit('SET_AVATAR', avatar) - resolve(res) - }).catch(error => { - reject(error) - }) - }) - }, - - // 退出系统 - LogOut({ commit, state }) { - return new Promise((resolve, reject) => { - logout(state.token).then(() => { - commit('SET_TOKEN', '') - commit('SET_ROLES', []) - commit('SET_PERMISSIONS', []) - removeToken() - resolve() - }).catch(error => { - reject(error) - }) - }) - }, - - // 前端 登出 - FedLogOut({ commit }) { - return new Promise(resolve => { - commit('SET_TOKEN', '') - removeToken() - resolve() - }) - } - } -} - -export default user +import { login, logout, getInfo } from '@/api/login' +import { getToken, setToken, removeToken } from '@/utils/auth' + +const user = { + state: { + token: getToken(), + name: '', + avatar: '', + roles: [], + permissions: [] + }, + + mutations: { + SET_TOKEN: (state, token) => { + state.token = token + }, + SET_NAME: (state, name) => { + state.name = name + }, + SET_AVATAR: (state, avatar) => { + state.avatar = avatar + }, + SET_ROLES: (state, roles) => { + state.roles = roles + }, + SET_PERMISSIONS: (state, permissions) => { + state.permissions = permissions + } + }, + + actions: { + // 登录 + Login({ commit }, userInfo) { + const username = userInfo.username.trim() + const password = userInfo.password + const code = userInfo.code + const uuid = userInfo.uuid + return new Promise((resolve, reject) => { + login(username, password, code, uuid).then(res => { + res = res.data; + setToken(res.token) + commit('SET_TOKEN', res.token) + resolve() + }).catch(error => { + reject(error) + }) + }) + }, + + // 获取用户信息 + GetInfo({ commit, state }) { + return new Promise((resolve, reject) => { + getInfo(state.token).then(res => { + res = res.data; // 读取 data 数据 + const user = res.user + const avatar = user.avatar === "" ? require("@/assets/images/profile.jpg") : user.avatar; + if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组 + commit('SET_ROLES', res.roles) + commit('SET_PERMISSIONS', res.permissions) + } else { + commit('SET_ROLES', ['ROLE_DEFAULT']) + } + commit('SET_NAME', user.userName) + commit('SET_AVATAR', avatar) + resolve(res) + }).catch(error => { + reject(error) + }) + }) + }, + + // 退出系统 + LogOut({ commit, state }) { + return new Promise((resolve, reject) => { + logout(state.token).then(() => { + commit('SET_TOKEN', '') + commit('SET_ROLES', []) + commit('SET_PERMISSIONS', []) + removeToken() + resolve() + }).catch(error => { + reject(error) + }) + }) + }, + + // 前端 登出 + FedLogOut({ commit }) { + return new Promise(resolve => { + commit('SET_TOKEN', '') + removeToken() + resolve() + }) + } + } +} + +export default user diff --git a/ruoyi-ui/src/utils/auth.js b/yudao-admin-ui/src/utils/auth.js similarity index 94% rename from ruoyi-ui/src/utils/auth.js rename to yudao-admin-ui/src/utils/auth.js index 88d7b6ccb..08a43d6e2 100644 --- a/ruoyi-ui/src/utils/auth.js +++ b/yudao-admin-ui/src/utils/auth.js @@ -1,15 +1,15 @@ -import Cookies from 'js-cookie' - -const TokenKey = 'Admin-Token' - -export function getToken() { - return Cookies.get(TokenKey) -} - -export function setToken(token) { - return Cookies.set(TokenKey, token) -} - -export function removeToken() { - return Cookies.remove(TokenKey) -} +import Cookies from 'js-cookie' + +const TokenKey = 'Admin-Token' + +export function getToken() { + return Cookies.get(TokenKey) +} + +export function setToken(token) { + return Cookies.set(TokenKey, token) +} + +export function removeToken() { + return Cookies.remove(TokenKey) +} diff --git a/ruoyi-ui/src/utils/constants.js b/yudao-admin-ui/src/utils/constants.js similarity index 100% rename from ruoyi-ui/src/utils/constants.js rename to yudao-admin-ui/src/utils/constants.js diff --git a/ruoyi-ui/src/utils/dict.js b/yudao-admin-ui/src/utils/dict.js similarity index 100% rename from ruoyi-ui/src/utils/dict.js rename to yudao-admin-ui/src/utils/dict.js diff --git a/ruoyi-ui/src/utils/errorCode.js b/yudao-admin-ui/src/utils/errorCode.js similarity index 100% rename from ruoyi-ui/src/utils/errorCode.js rename to yudao-admin-ui/src/utils/errorCode.js diff --git a/ruoyi-ui/src/utils/generator/config.js b/yudao-admin-ui/src/utils/generator/config.js similarity index 95% rename from ruoyi-ui/src/utils/generator/config.js rename to yudao-admin-ui/src/utils/generator/config.js index 005140a8f..7abf227d5 100644 --- a/ruoyi-ui/src/utils/generator/config.js +++ b/yudao-admin-ui/src/utils/generator/config.js @@ -1,438 +1,438 @@ -export const formConf = { - formRef: 'elForm', - formModel: 'formData', - size: 'medium', - labelPosition: 'right', - labelWidth: 100, - formRules: 'rules', - gutter: 15, - disabled: false, - span: 24, - formBtns: true -} - -export const inputComponents = [ - { - label: '单行文本', - tag: 'el-input', - tagIcon: 'input', - placeholder: '请输入', - defaultValue: undefined, - span: 24, - labelWidth: null, - style: { width: '100%' }, - clearable: true, - prepend: '', - append: '', - 'prefix-icon': '', - 'suffix-icon': '', - maxlength: null, - 'show-word-limit': false, - readonly: false, - disabled: false, - required: true, - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/input' - }, - { - label: '多行文本', - tag: 'el-input', - tagIcon: 'textarea', - type: 'textarea', - placeholder: '请输入', - defaultValue: undefined, - span: 24, - labelWidth: null, - autosize: { - minRows: 4, - maxRows: 4 - }, - style: { width: '100%' }, - maxlength: null, - 'show-word-limit': false, - readonly: false, - disabled: false, - required: true, - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/input' - }, - { - label: '密码', - tag: 'el-input', - tagIcon: 'password', - placeholder: '请输入', - defaultValue: undefined, - span: 24, - 'show-password': true, - labelWidth: null, - style: { width: '100%' }, - clearable: true, - prepend: '', - append: '', - 'prefix-icon': '', - 'suffix-icon': '', - maxlength: null, - 'show-word-limit': false, - readonly: false, - disabled: false, - required: true, - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/input' - }, - { - label: '计数器', - tag: 'el-input-number', - tagIcon: 'number', - placeholder: '', - defaultValue: undefined, - span: 24, - labelWidth: null, - min: undefined, - max: undefined, - step: undefined, - 'step-strictly': false, - precision: undefined, - 'controls-position': '', - disabled: false, - required: true, - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/input-number' - } -] - -export const selectComponents = [ - { - label: '下拉选择', - tag: 'el-select', - tagIcon: 'select', - placeholder: '请选择', - defaultValue: undefined, - span: 24, - labelWidth: null, - style: { width: '100%' }, - clearable: true, - disabled: false, - required: true, - filterable: false, - multiple: false, - options: [{ - label: '选项一', - value: 1 - }, { - label: '选项二', - value: 2 - }], - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/select' - }, - { - label: '级联选择', - tag: 'el-cascader', - tagIcon: 'cascader', - placeholder: '请选择', - defaultValue: [], - span: 24, - labelWidth: null, - style: { width: '100%' }, - props: { - props: { - multiple: false - } - }, - 'show-all-levels': true, - disabled: false, - clearable: true, - filterable: false, - required: true, - options: [{ - id: 1, - value: 1, - label: '选项1', - children: [{ - id: 2, - value: 2, - label: '选项1-1' - }] - }], - dataType: 'dynamic', - labelKey: 'label', - valueKey: 'value', - childrenKey: 'children', - separator: '/', - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/cascader' - }, - { - label: '单选框组', - tag: 'el-radio-group', - tagIcon: 'radio', - defaultValue: undefined, - span: 24, - labelWidth: null, - style: {}, - optionType: 'default', - border: false, - size: 'medium', - disabled: false, - required: true, - options: [{ - label: '选项一', - value: 1 - }, { - label: '选项二', - value: 2 - }], - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/radio' - }, - { - label: '多选框组', - tag: 'el-checkbox-group', - tagIcon: 'checkbox', - defaultValue: [], - span: 24, - labelWidth: null, - style: {}, - optionType: 'default', - border: false, - size: 'medium', - disabled: false, - required: true, - options: [{ - label: '选项一', - value: 1 - }, { - label: '选项二', - value: 2 - }], - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/checkbox' - }, - { - label: '开关', - tag: 'el-switch', - tagIcon: 'switch', - defaultValue: false, - span: 24, - labelWidth: null, - style: {}, - disabled: false, - required: true, - 'active-text': '', - 'inactive-text': '', - 'active-color': null, - 'inactive-color': null, - 'active-value': true, - 'inactive-value': false, - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/switch' - }, - { - label: '滑块', - tag: 'el-slider', - tagIcon: 'slider', - defaultValue: null, - span: 24, - labelWidth: null, - disabled: false, - required: true, - min: 0, - max: 100, - step: 1, - 'show-stops': false, - range: false, - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/slider' - }, - { - label: '时间选择', - tag: 'el-time-picker', - tagIcon: 'time', - placeholder: '请选择', - defaultValue: null, - span: 24, - labelWidth: null, - style: { width: '100%' }, - disabled: false, - clearable: true, - required: true, - 'picker-options': { - selectableRange: '00:00:00-23:59:59' - }, - format: 'HH:mm:ss', - 'value-format': 'HH:mm:ss', - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/time-picker' - }, - { - label: '时间范围', - tag: 'el-time-picker', - tagIcon: 'time-range', - defaultValue: null, - span: 24, - labelWidth: null, - style: { width: '100%' }, - disabled: false, - clearable: true, - required: true, - 'is-range': true, - 'range-separator': '至', - 'start-placeholder': '开始时间', - 'end-placeholder': '结束时间', - format: 'HH:mm:ss', - 'value-format': 'HH:mm:ss', - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/time-picker' - }, - { - label: '日期选择', - tag: 'el-date-picker', - tagIcon: 'date', - placeholder: '请选择', - defaultValue: null, - type: 'date', - span: 24, - labelWidth: null, - style: { width: '100%' }, - disabled: false, - clearable: true, - required: true, - format: 'yyyy-MM-dd', - 'value-format': 'yyyy-MM-dd', - readonly: false, - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/date-picker' - }, - { - label: '日期范围', - tag: 'el-date-picker', - tagIcon: 'date-range', - defaultValue: null, - span: 24, - labelWidth: null, - style: { width: '100%' }, - type: 'daterange', - 'range-separator': '至', - 'start-placeholder': '开始日期', - 'end-placeholder': '结束日期', - disabled: false, - clearable: true, - required: true, - format: 'yyyy-MM-dd', - 'value-format': 'yyyy-MM-dd', - readonly: false, - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/date-picker' - }, - { - label: '评分', - tag: 'el-rate', - tagIcon: 'rate', - defaultValue: 0, - span: 24, - labelWidth: null, - style: {}, - max: 5, - 'allow-half': false, - 'show-text': false, - 'show-score': false, - disabled: false, - required: true, - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/rate' - }, - { - label: '颜色选择', - tag: 'el-color-picker', - tagIcon: 'color', - defaultValue: null, - labelWidth: null, - 'show-alpha': false, - 'color-format': '', - disabled: false, - required: true, - size: 'medium', - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/color-picker' - }, - { - label: '上传', - tag: 'el-upload', - tagIcon: 'upload', - action: 'https://jsonplaceholder.typicode.com/posts/', - defaultValue: null, - labelWidth: null, - disabled: false, - required: true, - accept: '', - name: 'file', - 'auto-upload': true, - showTip: false, - buttonText: '点击上传', - fileSize: 2, - sizeUnit: 'MB', - 'list-type': 'text', - multiple: false, - regList: [], - changeTag: true, - document: 'https://element.eleme.cn/#/zh-CN/component/upload' - } -] - -export const layoutComponents = [ - { - layout: 'rowFormItem', - tagIcon: 'row', - type: 'default', - justify: 'start', - align: 'top', - label: '行容器', - layoutTree: true, - children: [], - document: 'https://element.eleme.cn/#/zh-CN/component/layout' - }, - { - layout: 'colFormItem', - label: '按钮', - changeTag: true, - labelWidth: null, - tag: 'el-button', - tagIcon: 'button', - span: 24, - default: '主要按钮', - type: 'primary', - icon: 'el-icon-search', - size: 'medium', - disabled: false, - document: 'https://element.eleme.cn/#/zh-CN/component/button' - } -] - -// 组件rule的触发方式,无触发方式的组件不生成rule -export const trigger = { - 'el-input': 'blur', - 'el-input-number': 'blur', - 'el-select': 'change', - 'el-radio-group': 'change', - 'el-checkbox-group': 'change', - 'el-cascader': 'change', - 'el-time-picker': 'change', - 'el-date-picker': 'change', - 'el-rate': 'change' -} +export const formConf = { + formRef: 'elForm', + formModel: 'formData', + size: 'medium', + labelPosition: 'right', + labelWidth: 100, + formRules: 'rules', + gutter: 15, + disabled: false, + span: 24, + formBtns: true +} + +export const inputComponents = [ + { + label: '单行文本', + tag: 'el-input', + tagIcon: 'input', + placeholder: '请输入', + defaultValue: undefined, + span: 24, + labelWidth: null, + style: { width: '100%' }, + clearable: true, + prepend: '', + append: '', + 'prefix-icon': '', + 'suffix-icon': '', + maxlength: null, + 'show-word-limit': false, + readonly: false, + disabled: false, + required: true, + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/input' + }, + { + label: '多行文本', + tag: 'el-input', + tagIcon: 'textarea', + type: 'textarea', + placeholder: '请输入', + defaultValue: undefined, + span: 24, + labelWidth: null, + autosize: { + minRows: 4, + maxRows: 4 + }, + style: { width: '100%' }, + maxlength: null, + 'show-word-limit': false, + readonly: false, + disabled: false, + required: true, + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/input' + }, + { + label: '密码', + tag: 'el-input', + tagIcon: 'password', + placeholder: '请输入', + defaultValue: undefined, + span: 24, + 'show-password': true, + labelWidth: null, + style: { width: '100%' }, + clearable: true, + prepend: '', + append: '', + 'prefix-icon': '', + 'suffix-icon': '', + maxlength: null, + 'show-word-limit': false, + readonly: false, + disabled: false, + required: true, + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/input' + }, + { + label: '计数器', + tag: 'el-input-number', + tagIcon: 'number', + placeholder: '', + defaultValue: undefined, + span: 24, + labelWidth: null, + min: undefined, + max: undefined, + step: undefined, + 'step-strictly': false, + precision: undefined, + 'controls-position': '', + disabled: false, + required: true, + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/input-number' + } +] + +export const selectComponents = [ + { + label: '下拉选择', + tag: 'el-select', + tagIcon: 'select', + placeholder: '请选择', + defaultValue: undefined, + span: 24, + labelWidth: null, + style: { width: '100%' }, + clearable: true, + disabled: false, + required: true, + filterable: false, + multiple: false, + options: [{ + label: '选项一', + value: 1 + }, { + label: '选项二', + value: 2 + }], + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/select' + }, + { + label: '级联选择', + tag: 'el-cascader', + tagIcon: 'cascader', + placeholder: '请选择', + defaultValue: [], + span: 24, + labelWidth: null, + style: { width: '100%' }, + props: { + props: { + multiple: false + } + }, + 'show-all-levels': true, + disabled: false, + clearable: true, + filterable: false, + required: true, + options: [{ + id: 1, + value: 1, + label: '选项1', + children: [{ + id: 2, + value: 2, + label: '选项1-1' + }] + }], + dataType: 'dynamic', + labelKey: 'label', + valueKey: 'value', + childrenKey: 'children', + separator: '/', + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/cascader' + }, + { + label: '单选框组', + tag: 'el-radio-group', + tagIcon: 'radio', + defaultValue: undefined, + span: 24, + labelWidth: null, + style: {}, + optionType: 'default', + border: false, + size: 'medium', + disabled: false, + required: true, + options: [{ + label: '选项一', + value: 1 + }, { + label: '选项二', + value: 2 + }], + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/radio' + }, + { + label: '多选框组', + tag: 'el-checkbox-group', + tagIcon: 'checkbox', + defaultValue: [], + span: 24, + labelWidth: null, + style: {}, + optionType: 'default', + border: false, + size: 'medium', + disabled: false, + required: true, + options: [{ + label: '选项一', + value: 1 + }, { + label: '选项二', + value: 2 + }], + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/checkbox' + }, + { + label: '开关', + tag: 'el-switch', + tagIcon: 'switch', + defaultValue: false, + span: 24, + labelWidth: null, + style: {}, + disabled: false, + required: true, + 'active-text': '', + 'inactive-text': '', + 'active-color': null, + 'inactive-color': null, + 'active-value': true, + 'inactive-value': false, + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/switch' + }, + { + label: '滑块', + tag: 'el-slider', + tagIcon: 'slider', + defaultValue: null, + span: 24, + labelWidth: null, + disabled: false, + required: true, + min: 0, + max: 100, + step: 1, + 'show-stops': false, + range: false, + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/slider' + }, + { + label: '时间选择', + tag: 'el-time-picker', + tagIcon: 'time', + placeholder: '请选择', + defaultValue: null, + span: 24, + labelWidth: null, + style: { width: '100%' }, + disabled: false, + clearable: true, + required: true, + 'picker-options': { + selectableRange: '00:00:00-23:59:59' + }, + format: 'HH:mm:ss', + 'value-format': 'HH:mm:ss', + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/time-picker' + }, + { + label: '时间范围', + tag: 'el-time-picker', + tagIcon: 'time-range', + defaultValue: null, + span: 24, + labelWidth: null, + style: { width: '100%' }, + disabled: false, + clearable: true, + required: true, + 'is-range': true, + 'range-separator': '至', + 'start-placeholder': '开始时间', + 'end-placeholder': '结束时间', + format: 'HH:mm:ss', + 'value-format': 'HH:mm:ss', + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/time-picker' + }, + { + label: '日期选择', + tag: 'el-date-picker', + tagIcon: 'date', + placeholder: '请选择', + defaultValue: null, + type: 'date', + span: 24, + labelWidth: null, + style: { width: '100%' }, + disabled: false, + clearable: true, + required: true, + format: 'yyyy-MM-dd', + 'value-format': 'yyyy-MM-dd', + readonly: false, + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/date-picker' + }, + { + label: '日期范围', + tag: 'el-date-picker', + tagIcon: 'date-range', + defaultValue: null, + span: 24, + labelWidth: null, + style: { width: '100%' }, + type: 'daterange', + 'range-separator': '至', + 'start-placeholder': '开始日期', + 'end-placeholder': '结束日期', + disabled: false, + clearable: true, + required: true, + format: 'yyyy-MM-dd', + 'value-format': 'yyyy-MM-dd', + readonly: false, + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/date-picker' + }, + { + label: '评分', + tag: 'el-rate', + tagIcon: 'rate', + defaultValue: 0, + span: 24, + labelWidth: null, + style: {}, + max: 5, + 'allow-half': false, + 'show-text': false, + 'show-score': false, + disabled: false, + required: true, + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/rate' + }, + { + label: '颜色选择', + tag: 'el-color-picker', + tagIcon: 'color', + defaultValue: null, + labelWidth: null, + 'show-alpha': false, + 'color-format': '', + disabled: false, + required: true, + size: 'medium', + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/color-picker' + }, + { + label: '上传', + tag: 'el-upload', + tagIcon: 'upload', + action: 'https://jsonplaceholder.typicode.com/posts/', + defaultValue: null, + labelWidth: null, + disabled: false, + required: true, + accept: '', + name: 'file', + 'auto-upload': true, + showTip: false, + buttonText: '点击上传', + fileSize: 2, + sizeUnit: 'MB', + 'list-type': 'text', + multiple: false, + regList: [], + changeTag: true, + document: 'https://element.eleme.cn/#/zh-CN/component/upload' + } +] + +export const layoutComponents = [ + { + layout: 'rowFormItem', + tagIcon: 'row', + type: 'default', + justify: 'start', + align: 'top', + label: '行容器', + layoutTree: true, + children: [], + document: 'https://element.eleme.cn/#/zh-CN/component/layout' + }, + { + layout: 'colFormItem', + label: '按钮', + changeTag: true, + labelWidth: null, + tag: 'el-button', + tagIcon: 'button', + span: 24, + default: '主要按钮', + type: 'primary', + icon: 'el-icon-search', + size: 'medium', + disabled: false, + document: 'https://element.eleme.cn/#/zh-CN/component/button' + } +] + +// 组件rule的触发方式,无触发方式的组件不生成rule +export const trigger = { + 'el-input': 'blur', + 'el-input-number': 'blur', + 'el-select': 'change', + 'el-radio-group': 'change', + 'el-checkbox-group': 'change', + 'el-cascader': 'change', + 'el-time-picker': 'change', + 'el-date-picker': 'change', + 'el-rate': 'change' +} diff --git a/ruoyi-ui/src/utils/generator/css.js b/yudao-admin-ui/src/utils/generator/css.js similarity index 96% rename from ruoyi-ui/src/utils/generator/css.js rename to yudao-admin-ui/src/utils/generator/css.js index 0d7f07526..c1c62e607 100644 --- a/ruoyi-ui/src/utils/generator/css.js +++ b/yudao-admin-ui/src/utils/generator/css.js @@ -1,18 +1,18 @@ -const styles = { - 'el-rate': '.el-rate{display: inline-block; vertical-align: text-top;}', - 'el-upload': '.el-upload__tip{line-height: 1.2;}' -} - -function addCss(cssList, el) { - const css = styles[el.tag] - css && cssList.indexOf(css) === -1 && cssList.push(css) - if (el.children) { - el.children.forEach(el2 => addCss(cssList, el2)) - } -} - -export function makeUpCss(conf) { - const cssList = [] - conf.fields.forEach(el => addCss(cssList, el)) - return cssList.join('\n') -} +const styles = { + 'el-rate': '.el-rate{display: inline-block; vertical-align: text-top;}', + 'el-upload': '.el-upload__tip{line-height: 1.2;}' +} + +function addCss(cssList, el) { + const css = styles[el.tag] + css && cssList.indexOf(css) === -1 && cssList.push(css) + if (el.children) { + el.children.forEach(el2 => addCss(cssList, el2)) + } +} + +export function makeUpCss(conf) { + const cssList = [] + conf.fields.forEach(el => addCss(cssList, el)) + return cssList.join('\n') +} diff --git a/ruoyi-ui/src/utils/generator/drawingDefalut.js b/yudao-admin-ui/src/utils/generator/drawingDefalut.js similarity index 95% rename from ruoyi-ui/src/utils/generator/drawingDefalut.js rename to yudao-admin-ui/src/utils/generator/drawingDefalut.js index 5f7d1c4ae..09f133ca1 100644 --- a/ruoyi-ui/src/utils/generator/drawingDefalut.js +++ b/yudao-admin-ui/src/utils/generator/drawingDefalut.js @@ -1,29 +1,29 @@ -export default [ - { - layout: 'colFormItem', - tagIcon: 'input', - label: '手机号', - vModel: 'mobile', - formId: 6, - tag: 'el-input', - placeholder: '请输入手机号', - defaultValue: '', - span: 24, - style: { width: '100%' }, - clearable: true, - prepend: '', - append: '', - 'prefix-icon': 'el-icon-mobile', - 'suffix-icon': '', - maxlength: 11, - 'show-word-limit': true, - readonly: false, - disabled: false, - required: true, - changeTag: true, - regList: [{ - pattern: '/^1(3|4|5|7|8|9)\\d{9}$/', - message: '手机号格式错误' - }] - } -] +export default [ + { + layout: 'colFormItem', + tagIcon: 'input', + label: '手机号', + vModel: 'mobile', + formId: 6, + tag: 'el-input', + placeholder: '请输入手机号', + defaultValue: '', + span: 24, + style: { width: '100%' }, + clearable: true, + prepend: '', + append: '', + 'prefix-icon': 'el-icon-mobile', + 'suffix-icon': '', + maxlength: 11, + 'show-word-limit': true, + readonly: false, + disabled: false, + required: true, + changeTag: true, + regList: [{ + pattern: '/^1(3|4|5|7|8|9)\\d{9}$/', + message: '手机号格式错误' + }] + } +] diff --git a/ruoyi-ui/src/utils/generator/html.js b/yudao-admin-ui/src/utils/generator/html.js similarity index 97% rename from ruoyi-ui/src/utils/generator/html.js rename to yudao-admin-ui/src/utils/generator/html.js index 340dfb439..ebf628d2b 100644 --- a/ruoyi-ui/src/utils/generator/html.js +++ b/yudao-admin-ui/src/utils/generator/html.js @@ -1,359 +1,359 @@ -/* eslint-disable max-len */ -import { trigger } from './config' - -let confGlobal -let someSpanIsNot24 - -export function dialogWrapper(str) { - return ` - ${str} -
- 取消 - 确定 -
-
` -} - -export function vueTemplate(str) { - return `` -} - -export function vueScript(str) { - return `` -} - -export function cssStyle(cssStr) { - return `` -} - -function buildFormTemplate(conf, child, type) { - let labelPosition = '' - if (conf.labelPosition !== 'right') { - labelPosition = `label-position="${conf.labelPosition}"` - } - const disabled = conf.disabled ? `:disabled="${conf.disabled}"` : '' - let str = ` - ${child} - ${buildFromBtns(conf, type)} - ` - if (someSpanIsNot24) { - str = ` - ${str} - ` - } - return str -} - -function buildFromBtns(conf, type) { - let str = '' - if (conf.formBtns && type === 'file') { - str = ` - 提交 - 重置 - ` - if (someSpanIsNot24) { - str = ` - ${str} - ` - } - } - return str -} - -// span不为24的用el-col包裹 -function colWrapper(element, str) { - if (someSpanIsNot24 || element.span !== 24) { - return ` - ${str} - ` - } - return str -} - -const layouts = { - colFormItem(element) { - let labelWidth = '' - if (element.labelWidth && element.labelWidth !== confGlobal.labelWidth) { - labelWidth = `label-width="${element.labelWidth}px"` - } - const required = !trigger[element.tag] && element.required ? 'required' : '' - const tagDom = tags[element.tag] ? tags[element.tag](element) : null - let str = ` - ${tagDom} - ` - str = colWrapper(element, str) - return str - }, - rowFormItem(element) { - const type = element.type === 'default' ? '' : `type="${element.type}"` - const justify = element.type === 'default' ? '' : `justify="${element.justify}"` - const align = element.type === 'default' ? '' : `align="${element.align}"` - const gutter = element.gutter ? `gutter="${element.gutter}"` : '' - const children = element.children.map(el => layouts[el.layout](el)) - let str = ` - ${children.join('\n')} - ` - str = colWrapper(element, str) - return str - } -} - -const tags = { - 'el-button': el => { - const { - tag, disabled - } = attrBuilder(el) - const type = el.type ? `type="${el.type}"` : '' - const icon = el.icon ? `icon="${el.icon}"` : '' - const size = el.size ? `size="${el.size}"` : '' - let child = buildElButtonChild(el) - - if (child) child = `\n${child}\n` // 换行 - return `<${el.tag} ${type} ${icon} ${size} ${disabled}>${child}` - }, - 'el-input': el => { - const { - disabled, vModel, clearable, placeholder, width - } = attrBuilder(el) - const maxlength = el.maxlength ? `:maxlength="${el.maxlength}"` : '' - const showWordLimit = el['show-word-limit'] ? 'show-word-limit' : '' - const readonly = el.readonly ? 'readonly' : '' - const prefixIcon = el['prefix-icon'] ? `prefix-icon='${el['prefix-icon']}'` : '' - const suffixIcon = el['suffix-icon'] ? `suffix-icon='${el['suffix-icon']}'` : '' - const showPassword = el['show-password'] ? 'show-password' : '' - const type = el.type ? `type="${el.type}"` : '' - const autosize = el.autosize && el.autosize.minRows - ? `:autosize="{minRows: ${el.autosize.minRows}, maxRows: ${el.autosize.maxRows}}"` - : '' - let child = buildElInputChild(el) - - if (child) child = `\n${child}\n` // 换行 - return `<${el.tag} ${vModel} ${type} ${placeholder} ${maxlength} ${showWordLimit} ${readonly} ${disabled} ${clearable} ${prefixIcon} ${suffixIcon} ${showPassword} ${autosize} ${width}>${child}` - }, - 'el-input-number': el => { - const { disabled, vModel, placeholder } = attrBuilder(el) - const controlsPosition = el['controls-position'] ? `controls-position=${el['controls-position']}` : '' - const min = el.min ? `:min='${el.min}'` : '' - const max = el.max ? `:max='${el.max}'` : '' - const step = el.step ? `:step='${el.step}'` : '' - const stepStrictly = el['step-strictly'] ? 'step-strictly' : '' - const precision = el.precision ? `:precision='${el.precision}'` : '' - - return `<${el.tag} ${vModel} ${placeholder} ${step} ${stepStrictly} ${precision} ${controlsPosition} ${min} ${max} ${disabled}>` - }, - 'el-select': el => { - const { - disabled, vModel, clearable, placeholder, width - } = attrBuilder(el) - const filterable = el.filterable ? 'filterable' : '' - const multiple = el.multiple ? 'multiple' : '' - let child = buildElSelectChild(el) - - if (child) child = `\n${child}\n` // 换行 - return `<${el.tag} ${vModel} ${placeholder} ${disabled} ${multiple} ${filterable} ${clearable} ${width}>${child}` - }, - 'el-radio-group': el => { - const { disabled, vModel } = attrBuilder(el) - const size = `size="${el.size}"` - let child = buildElRadioGroupChild(el) - - if (child) child = `\n${child}\n` // 换行 - return `<${el.tag} ${vModel} ${size} ${disabled}>${child}` - }, - 'el-checkbox-group': el => { - const { disabled, vModel } = attrBuilder(el) - const size = `size="${el.size}"` - const min = el.min ? `:min="${el.min}"` : '' - const max = el.max ? `:max="${el.max}"` : '' - let child = buildElCheckboxGroupChild(el) - - if (child) child = `\n${child}\n` // 换行 - return `<${el.tag} ${vModel} ${min} ${max} ${size} ${disabled}>${child}` - }, - 'el-switch': el => { - const { disabled, vModel } = attrBuilder(el) - const activeText = el['active-text'] ? `active-text="${el['active-text']}"` : '' - const inactiveText = el['inactive-text'] ? `inactive-text="${el['inactive-text']}"` : '' - const activeColor = el['active-color'] ? `active-color="${el['active-color']}"` : '' - const inactiveColor = el['inactive-color'] ? `inactive-color="${el['inactive-color']}"` : '' - const activeValue = el['active-value'] !== true ? `:active-value='${JSON.stringify(el['active-value'])}'` : '' - const inactiveValue = el['inactive-value'] !== false ? `:inactive-value='${JSON.stringify(el['inactive-value'])}'` : '' - - return `<${el.tag} ${vModel} ${activeText} ${inactiveText} ${activeColor} ${inactiveColor} ${activeValue} ${inactiveValue} ${disabled}>` - }, - 'el-cascader': el => { - const { - disabled, vModel, clearable, placeholder, width - } = attrBuilder(el) - const options = el.options ? `:options="${el.vModel}Options"` : '' - const props = el.props ? `:props="${el.vModel}Props"` : '' - const showAllLevels = el['show-all-levels'] ? '' : ':show-all-levels="false"' - const filterable = el.filterable ? 'filterable' : '' - const separator = el.separator === '/' ? '' : `separator="${el.separator}"` - - return `<${el.tag} ${vModel} ${options} ${props} ${width} ${showAllLevels} ${placeholder} ${separator} ${filterable} ${clearable} ${disabled}>` - }, - 'el-slider': el => { - const { disabled, vModel } = attrBuilder(el) - const min = el.min ? `:min='${el.min}'` : '' - const max = el.max ? `:max='${el.max}'` : '' - const step = el.step ? `:step='${el.step}'` : '' - const range = el.range ? 'range' : '' - const showStops = el['show-stops'] ? `:show-stops="${el['show-stops']}"` : '' - - return `<${el.tag} ${min} ${max} ${step} ${vModel} ${range} ${showStops} ${disabled}>` - }, - 'el-time-picker': el => { - const { - disabled, vModel, clearable, placeholder, width - } = attrBuilder(el) - const startPlaceholder = el['start-placeholder'] ? `start-placeholder="${el['start-placeholder']}"` : '' - const endPlaceholder = el['end-placeholder'] ? `end-placeholder="${el['end-placeholder']}"` : '' - const rangeSeparator = el['range-separator'] ? `range-separator="${el['range-separator']}"` : '' - const isRange = el['is-range'] ? 'is-range' : '' - const format = el.format ? `format="${el.format}"` : '' - const valueFormat = el['value-format'] ? `value-format="${el['value-format']}"` : '' - const pickerOptions = el['picker-options'] ? `:picker-options='${JSON.stringify(el['picker-options'])}'` : '' - - return `<${el.tag} ${vModel} ${isRange} ${format} ${valueFormat} ${pickerOptions} ${width} ${placeholder} ${startPlaceholder} ${endPlaceholder} ${rangeSeparator} ${clearable} ${disabled}>` - }, - 'el-date-picker': el => { - const { - disabled, vModel, clearable, placeholder, width - } = attrBuilder(el) - const startPlaceholder = el['start-placeholder'] ? `start-placeholder="${el['start-placeholder']}"` : '' - const endPlaceholder = el['end-placeholder'] ? `end-placeholder="${el['end-placeholder']}"` : '' - const rangeSeparator = el['range-separator'] ? `range-separator="${el['range-separator']}"` : '' - const format = el.format ? `format="${el.format}"` : '' - const valueFormat = el['value-format'] ? `value-format="${el['value-format']}"` : '' - const type = el.type === 'date' ? '' : `type="${el.type}"` - const readonly = el.readonly ? 'readonly' : '' - - return `<${el.tag} ${type} ${vModel} ${format} ${valueFormat} ${width} ${placeholder} ${startPlaceholder} ${endPlaceholder} ${rangeSeparator} ${clearable} ${readonly} ${disabled}>` - }, - 'el-rate': el => { - const { disabled, vModel } = attrBuilder(el) - const max = el.max ? `:max='${el.max}'` : '' - const allowHalf = el['allow-half'] ? 'allow-half' : '' - const showText = el['show-text'] ? 'show-text' : '' - const showScore = el['show-score'] ? 'show-score' : '' - - return `<${el.tag} ${vModel} ${allowHalf} ${showText} ${showScore} ${disabled}>` - }, - 'el-color-picker': el => { - const { disabled, vModel } = attrBuilder(el) - const size = `size="${el.size}"` - const showAlpha = el['show-alpha'] ? 'show-alpha' : '' - const colorFormat = el['color-format'] ? `color-format="${el['color-format']}"` : '' - - return `<${el.tag} ${vModel} ${size} ${showAlpha} ${colorFormat} ${disabled}>` - }, - 'el-upload': el => { - const disabled = el.disabled ? ':disabled=\'true\'' : '' - const action = el.action ? `:action="${el.vModel}Action"` : '' - const multiple = el.multiple ? 'multiple' : '' - const listType = el['list-type'] !== 'text' ? `list-type="${el['list-type']}"` : '' - const accept = el.accept ? `accept="${el.accept}"` : '' - const name = el.name !== 'file' ? `name="${el.name}"` : '' - const autoUpload = el['auto-upload'] === false ? ':auto-upload="false"' : '' - const beforeUpload = `:before-upload="${el.vModel}BeforeUpload"` - const fileList = `:file-list="${el.vModel}fileList"` - const ref = `ref="${el.vModel}"` - let child = buildElUploadChild(el) - - if (child) child = `\n${child}\n` // 换行 - return `<${el.tag} ${ref} ${fileList} ${action} ${autoUpload} ${multiple} ${beforeUpload} ${listType} ${accept} ${name} ${disabled}>${child}` - } -} - -function attrBuilder(el) { - return { - vModel: `v-model="${confGlobal.formModel}.${el.vModel}"`, - clearable: el.clearable ? 'clearable' : '', - placeholder: el.placeholder ? `placeholder="${el.placeholder}"` : '', - width: el.style && el.style.width ? ':style="{width: \'100%\'}"' : '', - disabled: el.disabled ? ':disabled=\'true\'' : '' - } -} - -// el-buttin 子级 -function buildElButtonChild(conf) { - const children = [] - if (conf.default) { - children.push(conf.default) - } - return children.join('\n') -} - -// el-input innerHTML -function buildElInputChild(conf) { - const children = [] - if (conf.prepend) { - children.push(``) - } - if (conf.append) { - children.push(``) - } - return children.join('\n') -} - -function buildElSelectChild(conf) { - const children = [] - if (conf.options && conf.options.length) { - children.push(``) - } - return children.join('\n') -} - -function buildElRadioGroupChild(conf) { - const children = [] - if (conf.options && conf.options.length) { - const tag = conf.optionType === 'button' ? 'el-radio-button' : 'el-radio' - const border = conf.border ? 'border' : '' - children.push(`<${tag} v-for="(item, index) in ${conf.vModel}Options" :key="index" :label="item.value" :disabled="item.disabled" ${border}>{{item.label}}`) - } - return children.join('\n') -} - -function buildElCheckboxGroupChild(conf) { - const children = [] - if (conf.options && conf.options.length) { - const tag = conf.optionType === 'button' ? 'el-checkbox-button' : 'el-checkbox' - const border = conf.border ? 'border' : '' - children.push(`<${tag} v-for="(item, index) in ${conf.vModel}Options" :key="index" :label="item.value" :disabled="item.disabled" ${border}>{{item.label}}`) - } - return children.join('\n') -} - -function buildElUploadChild(conf) { - const list = [] - if (conf['list-type'] === 'picture-card') list.push('') - else list.push(`${conf.buttonText}`) - if (conf.showTip) list.push(`
只能上传不超过 ${conf.fileSize}${conf.sizeUnit} 的${conf.accept}文件
`) - return list.join('\n') -} - -export function makeUpHtml(conf, type) { - const htmlList = [] - confGlobal = conf - someSpanIsNot24 = conf.fields.some(item => item.span !== 24) - conf.fields.forEach(el => { - htmlList.push(layouts[el.layout](el)) - }) - const htmlStr = htmlList.join('\n') - - let temp = buildFormTemplate(conf, htmlStr, type) - if (type === 'dialog') { - temp = dialogWrapper(temp) - } - confGlobal = null - return temp -} +/* eslint-disable max-len */ +import { trigger } from './config' + +let confGlobal +let someSpanIsNot24 + +export function dialogWrapper(str) { + return ` + ${str} +
+ 取消 + 确定 +
+
` +} + +export function vueTemplate(str) { + return `` +} + +export function vueScript(str) { + return `` +} + +export function cssStyle(cssStr) { + return `` +} + +function buildFormTemplate(conf, child, type) { + let labelPosition = '' + if (conf.labelPosition !== 'right') { + labelPosition = `label-position="${conf.labelPosition}"` + } + const disabled = conf.disabled ? `:disabled="${conf.disabled}"` : '' + let str = ` + ${child} + ${buildFromBtns(conf, type)} + ` + if (someSpanIsNot24) { + str = ` + ${str} + ` + } + return str +} + +function buildFromBtns(conf, type) { + let str = '' + if (conf.formBtns && type === 'file') { + str = ` + 提交 + 重置 + ` + if (someSpanIsNot24) { + str = ` + ${str} + ` + } + } + return str +} + +// span不为24的用el-col包裹 +function colWrapper(element, str) { + if (someSpanIsNot24 || element.span !== 24) { + return ` + ${str} + ` + } + return str +} + +const layouts = { + colFormItem(element) { + let labelWidth = '' + if (element.labelWidth && element.labelWidth !== confGlobal.labelWidth) { + labelWidth = `label-width="${element.labelWidth}px"` + } + const required = !trigger[element.tag] && element.required ? 'required' : '' + const tagDom = tags[element.tag] ? tags[element.tag](element) : null + let str = ` + ${tagDom} + ` + str = colWrapper(element, str) + return str + }, + rowFormItem(element) { + const type = element.type === 'default' ? '' : `type="${element.type}"` + const justify = element.type === 'default' ? '' : `justify="${element.justify}"` + const align = element.type === 'default' ? '' : `align="${element.align}"` + const gutter = element.gutter ? `gutter="${element.gutter}"` : '' + const children = element.children.map(el => layouts[el.layout](el)) + let str = ` + ${children.join('\n')} + ` + str = colWrapper(element, str) + return str + } +} + +const tags = { + 'el-button': el => { + const { + tag, disabled + } = attrBuilder(el) + const type = el.type ? `type="${el.type}"` : '' + const icon = el.icon ? `icon="${el.icon}"` : '' + const size = el.size ? `size="${el.size}"` : '' + let child = buildElButtonChild(el) + + if (child) child = `\n${child}\n` // 换行 + return `<${el.tag} ${type} ${icon} ${size} ${disabled}>${child}` + }, + 'el-input': el => { + const { + disabled, vModel, clearable, placeholder, width + } = attrBuilder(el) + const maxlength = el.maxlength ? `:maxlength="${el.maxlength}"` : '' + const showWordLimit = el['show-word-limit'] ? 'show-word-limit' : '' + const readonly = el.readonly ? 'readonly' : '' + const prefixIcon = el['prefix-icon'] ? `prefix-icon='${el['prefix-icon']}'` : '' + const suffixIcon = el['suffix-icon'] ? `suffix-icon='${el['suffix-icon']}'` : '' + const showPassword = el['show-password'] ? 'show-password' : '' + const type = el.type ? `type="${el.type}"` : '' + const autosize = el.autosize && el.autosize.minRows + ? `:autosize="{minRows: ${el.autosize.minRows}, maxRows: ${el.autosize.maxRows}}"` + : '' + let child = buildElInputChild(el) + + if (child) child = `\n${child}\n` // 换行 + return `<${el.tag} ${vModel} ${type} ${placeholder} ${maxlength} ${showWordLimit} ${readonly} ${disabled} ${clearable} ${prefixIcon} ${suffixIcon} ${showPassword} ${autosize} ${width}>${child}` + }, + 'el-input-number': el => { + const { disabled, vModel, placeholder } = attrBuilder(el) + const controlsPosition = el['controls-position'] ? `controls-position=${el['controls-position']}` : '' + const min = el.min ? `:min='${el.min}'` : '' + const max = el.max ? `:max='${el.max}'` : '' + const step = el.step ? `:step='${el.step}'` : '' + const stepStrictly = el['step-strictly'] ? 'step-strictly' : '' + const precision = el.precision ? `:precision='${el.precision}'` : '' + + return `<${el.tag} ${vModel} ${placeholder} ${step} ${stepStrictly} ${precision} ${controlsPosition} ${min} ${max} ${disabled}>` + }, + 'el-select': el => { + const { + disabled, vModel, clearable, placeholder, width + } = attrBuilder(el) + const filterable = el.filterable ? 'filterable' : '' + const multiple = el.multiple ? 'multiple' : '' + let child = buildElSelectChild(el) + + if (child) child = `\n${child}\n` // 换行 + return `<${el.tag} ${vModel} ${placeholder} ${disabled} ${multiple} ${filterable} ${clearable} ${width}>${child}` + }, + 'el-radio-group': el => { + const { disabled, vModel } = attrBuilder(el) + const size = `size="${el.size}"` + let child = buildElRadioGroupChild(el) + + if (child) child = `\n${child}\n` // 换行 + return `<${el.tag} ${vModel} ${size} ${disabled}>${child}` + }, + 'el-checkbox-group': el => { + const { disabled, vModel } = attrBuilder(el) + const size = `size="${el.size}"` + const min = el.min ? `:min="${el.min}"` : '' + const max = el.max ? `:max="${el.max}"` : '' + let child = buildElCheckboxGroupChild(el) + + if (child) child = `\n${child}\n` // 换行 + return `<${el.tag} ${vModel} ${min} ${max} ${size} ${disabled}>${child}` + }, + 'el-switch': el => { + const { disabled, vModel } = attrBuilder(el) + const activeText = el['active-text'] ? `active-text="${el['active-text']}"` : '' + const inactiveText = el['inactive-text'] ? `inactive-text="${el['inactive-text']}"` : '' + const activeColor = el['active-color'] ? `active-color="${el['active-color']}"` : '' + const inactiveColor = el['inactive-color'] ? `inactive-color="${el['inactive-color']}"` : '' + const activeValue = el['active-value'] !== true ? `:active-value='${JSON.stringify(el['active-value'])}'` : '' + const inactiveValue = el['inactive-value'] !== false ? `:inactive-value='${JSON.stringify(el['inactive-value'])}'` : '' + + return `<${el.tag} ${vModel} ${activeText} ${inactiveText} ${activeColor} ${inactiveColor} ${activeValue} ${inactiveValue} ${disabled}>` + }, + 'el-cascader': el => { + const { + disabled, vModel, clearable, placeholder, width + } = attrBuilder(el) + const options = el.options ? `:options="${el.vModel}Options"` : '' + const props = el.props ? `:props="${el.vModel}Props"` : '' + const showAllLevels = el['show-all-levels'] ? '' : ':show-all-levels="false"' + const filterable = el.filterable ? 'filterable' : '' + const separator = el.separator === '/' ? '' : `separator="${el.separator}"` + + return `<${el.tag} ${vModel} ${options} ${props} ${width} ${showAllLevels} ${placeholder} ${separator} ${filterable} ${clearable} ${disabled}>` + }, + 'el-slider': el => { + const { disabled, vModel } = attrBuilder(el) + const min = el.min ? `:min='${el.min}'` : '' + const max = el.max ? `:max='${el.max}'` : '' + const step = el.step ? `:step='${el.step}'` : '' + const range = el.range ? 'range' : '' + const showStops = el['show-stops'] ? `:show-stops="${el['show-stops']}"` : '' + + return `<${el.tag} ${min} ${max} ${step} ${vModel} ${range} ${showStops} ${disabled}>` + }, + 'el-time-picker': el => { + const { + disabled, vModel, clearable, placeholder, width + } = attrBuilder(el) + const startPlaceholder = el['start-placeholder'] ? `start-placeholder="${el['start-placeholder']}"` : '' + const endPlaceholder = el['end-placeholder'] ? `end-placeholder="${el['end-placeholder']}"` : '' + const rangeSeparator = el['range-separator'] ? `range-separator="${el['range-separator']}"` : '' + const isRange = el['is-range'] ? 'is-range' : '' + const format = el.format ? `format="${el.format}"` : '' + const valueFormat = el['value-format'] ? `value-format="${el['value-format']}"` : '' + const pickerOptions = el['picker-options'] ? `:picker-options='${JSON.stringify(el['picker-options'])}'` : '' + + return `<${el.tag} ${vModel} ${isRange} ${format} ${valueFormat} ${pickerOptions} ${width} ${placeholder} ${startPlaceholder} ${endPlaceholder} ${rangeSeparator} ${clearable} ${disabled}>` + }, + 'el-date-picker': el => { + const { + disabled, vModel, clearable, placeholder, width + } = attrBuilder(el) + const startPlaceholder = el['start-placeholder'] ? `start-placeholder="${el['start-placeholder']}"` : '' + const endPlaceholder = el['end-placeholder'] ? `end-placeholder="${el['end-placeholder']}"` : '' + const rangeSeparator = el['range-separator'] ? `range-separator="${el['range-separator']}"` : '' + const format = el.format ? `format="${el.format}"` : '' + const valueFormat = el['value-format'] ? `value-format="${el['value-format']}"` : '' + const type = el.type === 'date' ? '' : `type="${el.type}"` + const readonly = el.readonly ? 'readonly' : '' + + return `<${el.tag} ${type} ${vModel} ${format} ${valueFormat} ${width} ${placeholder} ${startPlaceholder} ${endPlaceholder} ${rangeSeparator} ${clearable} ${readonly} ${disabled}>` + }, + 'el-rate': el => { + const { disabled, vModel } = attrBuilder(el) + const max = el.max ? `:max='${el.max}'` : '' + const allowHalf = el['allow-half'] ? 'allow-half' : '' + const showText = el['show-text'] ? 'show-text' : '' + const showScore = el['show-score'] ? 'show-score' : '' + + return `<${el.tag} ${vModel} ${allowHalf} ${showText} ${showScore} ${disabled}>` + }, + 'el-color-picker': el => { + const { disabled, vModel } = attrBuilder(el) + const size = `size="${el.size}"` + const showAlpha = el['show-alpha'] ? 'show-alpha' : '' + const colorFormat = el['color-format'] ? `color-format="${el['color-format']}"` : '' + + return `<${el.tag} ${vModel} ${size} ${showAlpha} ${colorFormat} ${disabled}>` + }, + 'el-upload': el => { + const disabled = el.disabled ? ':disabled=\'true\'' : '' + const action = el.action ? `:action="${el.vModel}Action"` : '' + const multiple = el.multiple ? 'multiple' : '' + const listType = el['list-type'] !== 'text' ? `list-type="${el['list-type']}"` : '' + const accept = el.accept ? `accept="${el.accept}"` : '' + const name = el.name !== 'file' ? `name="${el.name}"` : '' + const autoUpload = el['auto-upload'] === false ? ':auto-upload="false"' : '' + const beforeUpload = `:before-upload="${el.vModel}BeforeUpload"` + const fileList = `:file-list="${el.vModel}fileList"` + const ref = `ref="${el.vModel}"` + let child = buildElUploadChild(el) + + if (child) child = `\n${child}\n` // 换行 + return `<${el.tag} ${ref} ${fileList} ${action} ${autoUpload} ${multiple} ${beforeUpload} ${listType} ${accept} ${name} ${disabled}>${child}` + } +} + +function attrBuilder(el) { + return { + vModel: `v-model="${confGlobal.formModel}.${el.vModel}"`, + clearable: el.clearable ? 'clearable' : '', + placeholder: el.placeholder ? `placeholder="${el.placeholder}"` : '', + width: el.style && el.style.width ? ':style="{width: \'100%\'}"' : '', + disabled: el.disabled ? ':disabled=\'true\'' : '' + } +} + +// el-buttin 子级 +function buildElButtonChild(conf) { + const children = [] + if (conf.default) { + children.push(conf.default) + } + return children.join('\n') +} + +// el-input innerHTML +function buildElInputChild(conf) { + const children = [] + if (conf.prepend) { + children.push(``) + } + if (conf.append) { + children.push(``) + } + return children.join('\n') +} + +function buildElSelectChild(conf) { + const children = [] + if (conf.options && conf.options.length) { + children.push(``) + } + return children.join('\n') +} + +function buildElRadioGroupChild(conf) { + const children = [] + if (conf.options && conf.options.length) { + const tag = conf.optionType === 'button' ? 'el-radio-button' : 'el-radio' + const border = conf.border ? 'border' : '' + children.push(`<${tag} v-for="(item, index) in ${conf.vModel}Options" :key="index" :label="item.value" :disabled="item.disabled" ${border}>{{item.label}}`) + } + return children.join('\n') +} + +function buildElCheckboxGroupChild(conf) { + const children = [] + if (conf.options && conf.options.length) { + const tag = conf.optionType === 'button' ? 'el-checkbox-button' : 'el-checkbox' + const border = conf.border ? 'border' : '' + children.push(`<${tag} v-for="(item, index) in ${conf.vModel}Options" :key="index" :label="item.value" :disabled="item.disabled" ${border}>{{item.label}}`) + } + return children.join('\n') +} + +function buildElUploadChild(conf) { + const list = [] + if (conf['list-type'] === 'picture-card') list.push('') + else list.push(`${conf.buttonText}`) + if (conf.showTip) list.push(`
只能上传不超过 ${conf.fileSize}${conf.sizeUnit} 的${conf.accept}文件
`) + return list.join('\n') +} + +export function makeUpHtml(conf, type) { + const htmlList = [] + confGlobal = conf + someSpanIsNot24 = conf.fields.some(item => item.span !== 24) + conf.fields.forEach(el => { + htmlList.push(layouts[el.layout](el)) + }) + const htmlStr = htmlList.join('\n') + + let temp = buildFormTemplate(conf, htmlStr, type) + if (type === 'dialog') { + temp = dialogWrapper(temp) + } + confGlobal = null + return temp +} diff --git a/ruoyi-ui/src/utils/generator/icon.json b/yudao-admin-ui/src/utils/generator/icon.json similarity index 100% rename from ruoyi-ui/src/utils/generator/icon.json rename to yudao-admin-ui/src/utils/generator/icon.json diff --git a/ruoyi-ui/src/utils/generator/js.js b/yudao-admin-ui/src/utils/generator/js.js similarity index 96% rename from ruoyi-ui/src/utils/generator/js.js rename to yudao-admin-ui/src/utils/generator/js.js index 81afc7004..c6c06a996 100644 --- a/ruoyi-ui/src/utils/generator/js.js +++ b/yudao-admin-ui/src/utils/generator/js.js @@ -1,236 +1,236 @@ -import { isArray } from 'util' -import { exportDefault, titleCase } from '@/utils/index' -import { trigger } from './config' - -const units = { - KB: '1024', - MB: '1024 / 1024', - GB: '1024 / 1024 / 1024' -} -let confGlobal -const inheritAttrs = { - file: '', - dialog: 'inheritAttrs: false,' -} - - -export function makeUpJs(conf, type) { - confGlobal = conf = JSON.parse(JSON.stringify(conf)) - const dataList = [] - const ruleList = [] - const optionsList = [] - const propsList = [] - const methodList = mixinMethod(type) - const uploadVarList = [] - - conf.fields.forEach(el => { - buildAttributes(el, dataList, ruleList, optionsList, methodList, propsList, uploadVarList) - }) - - const script = buildexport( - conf, - type, - dataList.join('\n'), - ruleList.join('\n'), - optionsList.join('\n'), - uploadVarList.join('\n'), - propsList.join('\n'), - methodList.join('\n') - ) - confGlobal = null - return script -} - -function buildAttributes(el, dataList, ruleList, optionsList, methodList, propsList, uploadVarList) { - buildData(el, dataList) - buildRules(el, ruleList) - - if (el.options && el.options.length) { - buildOptions(el, optionsList) - if (el.dataType === 'dynamic') { - const model = `${el.vModel}Options` - const options = titleCase(model) - buildOptionMethod(`get${options}`, model, methodList) - } - } - - if (el.props && el.props.props) { - buildProps(el, propsList) - } - - if (el.action && el.tag === 'el-upload') { - uploadVarList.push( - `${el.vModel}Action: '${el.action}', - ${el.vModel}fileList: [],` - ) - methodList.push(buildBeforeUpload(el)) - if (!el['auto-upload']) { - methodList.push(buildSubmitUpload(el)) - } - } - - if (el.children) { - el.children.forEach(el2 => { - buildAttributes(el2, dataList, ruleList, optionsList, methodList, propsList, uploadVarList) - }) - } -} - -function mixinMethod(type) { - const list = []; const - minxins = { - file: confGlobal.formBtns ? { - submitForm: `submitForm() { - this.$refs['${confGlobal.formRef}'].validate(valid => { - if(!valid) return - // TODO 提交表单 - }) - },`, - resetForm: `resetForm() { - this.$refs['${confGlobal.formRef}'].resetFields() - },` - } : null, - dialog: { - onOpen: 'onOpen() {},', - onClose: `onClose() { - this.$refs['${confGlobal.formRef}'].resetFields() - },`, - close: `close() { - this.$emit('update:visible', false) - },`, - handelConfirm: `handelConfirm() { - this.$refs['${confGlobal.formRef}'].validate(valid => { - if(!valid) return - this.close() - }) - },` - } - } - - const methods = minxins[type] - if (methods) { - Object.keys(methods).forEach(key => { - list.push(methods[key]) - }) - } - - return list -} - -function buildData(conf, dataList) { - if (conf.vModel === undefined) return - let defaultValue - if (typeof (conf.defaultValue) === 'string' && !conf.multiple) { - defaultValue = `'${conf.defaultValue}'` - } else { - defaultValue = `${JSON.stringify(conf.defaultValue)}` - } - dataList.push(`${conf.vModel}: ${defaultValue},`) -} - -function buildRules(conf, ruleList) { - if (conf.vModel === undefined) return - const rules = [] - if (trigger[conf.tag]) { - if (conf.required) { - const type = isArray(conf.defaultValue) ? 'type: \'array\',' : '' - let message = isArray(conf.defaultValue) ? `请至少选择一个${conf.vModel}` : conf.placeholder - if (message === undefined) message = `${conf.label}不能为空` - rules.push(`{ required: true, ${type} message: '${message}', trigger: '${trigger[conf.tag]}' }`) - } - if (conf.regList && isArray(conf.regList)) { - conf.regList.forEach(item => { - if (item.pattern) { - rules.push(`{ pattern: ${eval(item.pattern)}, message: '${item.message}', trigger: '${trigger[conf.tag]}' }`) - } - }) - } - ruleList.push(`${conf.vModel}: [${rules.join(',')}],`) - } -} - -function buildOptions(conf, optionsList) { - if (conf.vModel === undefined) return - if (conf.dataType === 'dynamic') { conf.options = [] } - const str = `${conf.vModel}Options: ${JSON.stringify(conf.options)},` - optionsList.push(str) -} - -function buildProps(conf, propsList) { - if (conf.dataType === 'dynamic') { - conf.valueKey !== 'value' && (conf.props.props.value = conf.valueKey) - conf.labelKey !== 'label' && (conf.props.props.label = conf.labelKey) - conf.childrenKey !== 'children' && (conf.props.props.children = conf.childrenKey) - } - const str = `${conf.vModel}Props: ${JSON.stringify(conf.props.props)},` - propsList.push(str) -} - -function buildBeforeUpload(conf) { - const unitNum = units[conf.sizeUnit]; let rightSizeCode = ''; let acceptCode = ''; const - returnList = [] - if (conf.fileSize) { - rightSizeCode = `let isRightSize = file.size / ${unitNum} < ${conf.fileSize} - if(!isRightSize){ - this.$message.error('文件大小超过 ${conf.fileSize}${conf.sizeUnit}') - }` - returnList.push('isRightSize') - } - if (conf.accept) { - acceptCode = `let isAccept = new RegExp('${conf.accept}').test(file.type) - if(!isAccept){ - this.$message.error('应该选择${conf.accept}类型的文件') - }` - returnList.push('isAccept') - } - const str = `${conf.vModel}BeforeUpload(file) { - ${rightSizeCode} - ${acceptCode} - return ${returnList.join('&&')} - },` - return returnList.length ? str : '' -} - -function buildSubmitUpload(conf) { - const str = `submitUpload() { - this.$refs['${conf.vModel}'].submit() - },` - return str -} - -function buildOptionMethod(methodName, model, methodList) { - const str = `${methodName}() { - // TODO 发起请求获取数据 - this.${model} - },` - methodList.push(str) -} - -function buildexport(conf, type, data, rules, selectOptions, uploadVar, props, methods) { - const str = `${exportDefault}{ - ${inheritAttrs[type]} - components: {}, - props: [], - data () { - return { - ${conf.formModel}: { - ${data} - }, - ${conf.formRules}: { - ${rules} - }, - ${uploadVar} - ${selectOptions} - ${props} - } - }, - computed: {}, - watch: {}, - created () {}, - mounted () {}, - methods: { - ${methods} - } -}` - return str -} +import { isArray } from 'util' +import { exportDefault, titleCase } from '@/utils/index' +import { trigger } from './config' + +const units = { + KB: '1024', + MB: '1024 / 1024', + GB: '1024 / 1024 / 1024' +} +let confGlobal +const inheritAttrs = { + file: '', + dialog: 'inheritAttrs: false,' +} + + +export function makeUpJs(conf, type) { + confGlobal = conf = JSON.parse(JSON.stringify(conf)) + const dataList = [] + const ruleList = [] + const optionsList = [] + const propsList = [] + const methodList = mixinMethod(type) + const uploadVarList = [] + + conf.fields.forEach(el => { + buildAttributes(el, dataList, ruleList, optionsList, methodList, propsList, uploadVarList) + }) + + const script = buildexport( + conf, + type, + dataList.join('\n'), + ruleList.join('\n'), + optionsList.join('\n'), + uploadVarList.join('\n'), + propsList.join('\n'), + methodList.join('\n') + ) + confGlobal = null + return script +} + +function buildAttributes(el, dataList, ruleList, optionsList, methodList, propsList, uploadVarList) { + buildData(el, dataList) + buildRules(el, ruleList) + + if (el.options && el.options.length) { + buildOptions(el, optionsList) + if (el.dataType === 'dynamic') { + const model = `${el.vModel}Options` + const options = titleCase(model) + buildOptionMethod(`get${options}`, model, methodList) + } + } + + if (el.props && el.props.props) { + buildProps(el, propsList) + } + + if (el.action && el.tag === 'el-upload') { + uploadVarList.push( + `${el.vModel}Action: '${el.action}', + ${el.vModel}fileList: [],` + ) + methodList.push(buildBeforeUpload(el)) + if (!el['auto-upload']) { + methodList.push(buildSubmitUpload(el)) + } + } + + if (el.children) { + el.children.forEach(el2 => { + buildAttributes(el2, dataList, ruleList, optionsList, methodList, propsList, uploadVarList) + }) + } +} + +function mixinMethod(type) { + const list = []; const + minxins = { + file: confGlobal.formBtns ? { + submitForm: `submitForm() { + this.$refs['${confGlobal.formRef}'].validate(valid => { + if(!valid) return + // TODO 提交表单 + }) + },`, + resetForm: `resetForm() { + this.$refs['${confGlobal.formRef}'].resetFields() + },` + } : null, + dialog: { + onOpen: 'onOpen() {},', + onClose: `onClose() { + this.$refs['${confGlobal.formRef}'].resetFields() + },`, + close: `close() { + this.$emit('update:visible', false) + },`, + handelConfirm: `handelConfirm() { + this.$refs['${confGlobal.formRef}'].validate(valid => { + if(!valid) return + this.close() + }) + },` + } + } + + const methods = minxins[type] + if (methods) { + Object.keys(methods).forEach(key => { + list.push(methods[key]) + }) + } + + return list +} + +function buildData(conf, dataList) { + if (conf.vModel === undefined) return + let defaultValue + if (typeof (conf.defaultValue) === 'string' && !conf.multiple) { + defaultValue = `'${conf.defaultValue}'` + } else { + defaultValue = `${JSON.stringify(conf.defaultValue)}` + } + dataList.push(`${conf.vModel}: ${defaultValue},`) +} + +function buildRules(conf, ruleList) { + if (conf.vModel === undefined) return + const rules = [] + if (trigger[conf.tag]) { + if (conf.required) { + const type = isArray(conf.defaultValue) ? 'type: \'array\',' : '' + let message = isArray(conf.defaultValue) ? `请至少选择一个${conf.vModel}` : conf.placeholder + if (message === undefined) message = `${conf.label}不能为空` + rules.push(`{ required: true, ${type} message: '${message}', trigger: '${trigger[conf.tag]}' }`) + } + if (conf.regList && isArray(conf.regList)) { + conf.regList.forEach(item => { + if (item.pattern) { + rules.push(`{ pattern: ${eval(item.pattern)}, message: '${item.message}', trigger: '${trigger[conf.tag]}' }`) + } + }) + } + ruleList.push(`${conf.vModel}: [${rules.join(',')}],`) + } +} + +function buildOptions(conf, optionsList) { + if (conf.vModel === undefined) return + if (conf.dataType === 'dynamic') { conf.options = [] } + const str = `${conf.vModel}Options: ${JSON.stringify(conf.options)},` + optionsList.push(str) +} + +function buildProps(conf, propsList) { + if (conf.dataType === 'dynamic') { + conf.valueKey !== 'value' && (conf.props.props.value = conf.valueKey) + conf.labelKey !== 'label' && (conf.props.props.label = conf.labelKey) + conf.childrenKey !== 'children' && (conf.props.props.children = conf.childrenKey) + } + const str = `${conf.vModel}Props: ${JSON.stringify(conf.props.props)},` + propsList.push(str) +} + +function buildBeforeUpload(conf) { + const unitNum = units[conf.sizeUnit]; let rightSizeCode = ''; let acceptCode = ''; const + returnList = [] + if (conf.fileSize) { + rightSizeCode = `let isRightSize = file.size / ${unitNum} < ${conf.fileSize} + if(!isRightSize){ + this.$message.error('文件大小超过 ${conf.fileSize}${conf.sizeUnit}') + }` + returnList.push('isRightSize') + } + if (conf.accept) { + acceptCode = `let isAccept = new RegExp('${conf.accept}').test(file.type) + if(!isAccept){ + this.$message.error('应该选择${conf.accept}类型的文件') + }` + returnList.push('isAccept') + } + const str = `${conf.vModel}BeforeUpload(file) { + ${rightSizeCode} + ${acceptCode} + return ${returnList.join('&&')} + },` + return returnList.length ? str : '' +} + +function buildSubmitUpload(conf) { + const str = `submitUpload() { + this.$refs['${conf.vModel}'].submit() + },` + return str +} + +function buildOptionMethod(methodName, model, methodList) { + const str = `${methodName}() { + // TODO 发起请求获取数据 + this.${model} + },` + methodList.push(str) +} + +function buildexport(conf, type, data, rules, selectOptions, uploadVar, props, methods) { + const str = `${exportDefault}{ + ${inheritAttrs[type]} + components: {}, + props: [], + data () { + return { + ${conf.formModel}: { + ${data} + }, + ${conf.formRules}: { + ${rules} + }, + ${uploadVar} + ${selectOptions} + ${props} + } + }, + computed: {}, + watch: {}, + created () {}, + mounted () {}, + methods: { + ${methods} + } +}` + return str +} diff --git a/ruoyi-ui/src/utils/generator/render.js b/yudao-admin-ui/src/utils/generator/render.js similarity index 96% rename from ruoyi-ui/src/utils/generator/render.js rename to yudao-admin-ui/src/utils/generator/render.js index f187029d2..e8640f0a2 100644 --- a/ruoyi-ui/src/utils/generator/render.js +++ b/yudao-admin-ui/src/utils/generator/render.js @@ -1,126 +1,126 @@ -import { makeMap } from '@/utils/index' - -// 参考https://github.com/vuejs/vue/blob/v2.6.10/src/platforms/web/server/util.js -const isAttr = makeMap( - 'accept,accept-charset,accesskey,action,align,alt,async,autocomplete,' - + 'autofocus,autoplay,autosave,bgcolor,border,buffered,challenge,charset,' - + 'checked,cite,class,code,codebase,color,cols,colspan,content,http-equiv,' - + 'name,contenteditable,contextmenu,controls,coords,data,datetime,default,' - + 'defer,dir,dirname,disabled,download,draggable,dropzone,enctype,method,for,' - + 'form,formaction,headers,height,hidden,high,href,hreflang,http-equiv,' - + 'icon,id,ismap,itemprop,keytype,kind,label,lang,language,list,loop,low,' - + 'manifest,max,maxlength,media,method,GET,POST,min,multiple,email,file,' - + 'muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,' - + 'preload,radiogroup,readonly,rel,required,reversed,rows,rowspan,sandbox,' - + 'scope,scoped,seamless,selected,shape,size,type,text,password,sizes,span,' - + 'spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,' - + 'target,title,type,usemap,value,width,wrap' -) - -function vModel(self, dataObject, defaultValue) { - dataObject.props.value = defaultValue - - dataObject.on.input = val => { - self.$emit('input', val) - } -} - -const componentChild = { - 'el-button': { - default(h, conf, key) { - return conf[key] - }, - }, - 'el-input': { - prepend(h, conf, key) { - return - }, - append(h, conf, key) { - return - } - }, - 'el-select': { - options(h, conf, key) { - const list = [] - conf.options.forEach(item => { - list.push() - }) - return list - } - }, - 'el-radio-group': { - options(h, conf, key) { - const list = [] - conf.options.forEach(item => { - if (conf.optionType === 'button') list.push({item.label}) - else list.push({item.label}) - }) - return list - } - }, - 'el-checkbox-group': { - options(h, conf, key) { - const list = [] - conf.options.forEach(item => { - if (conf.optionType === 'button') { - list.push({item.label}) - } else { - list.push({item.label}) - } - }) - return list - } - }, - 'el-upload': { - 'list-type': (h, conf, key) => { - const list = [] - if (conf['list-type'] === 'picture-card') { - list.push() - } else { - list.push({conf.buttonText}) - } - if (conf.showTip) { - list.push(
只能上传不超过 {conf.fileSize}{conf.sizeUnit} 的{conf.accept}文件
) - } - return list - } - } -} - -export default { - render(h) { - const dataObject = { - attrs: {}, - props: {}, - on: {}, - style: {} - } - const confClone = JSON.parse(JSON.stringify(this.conf)) - const children = [] - - const childObjs = componentChild[confClone.tag] - if (childObjs) { - Object.keys(childObjs).forEach(key => { - const childFunc = childObjs[key] - if (confClone[key]) { - children.push(childFunc(h, confClone, key)) - } - }) - } - - Object.keys(confClone).forEach(key => { - const val = confClone[key] - if (key === 'vModel') { - vModel(this, dataObject, confClone.defaultValue) - } else if (dataObject[key]) { - dataObject[key] = val - } else if (!isAttr(key)) { - dataObject.props[key] = val - } else { - dataObject.attrs[key] = val - } - }) - return h(this.conf.tag, dataObject, children) - }, - props: ['conf'] -} +import { makeMap } from '@/utils/index' + +// 参考https://github.com/vuejs/vue/blob/v2.6.10/src/platforms/web/server/util.js +const isAttr = makeMap( + 'accept,accept-charset,accesskey,action,align,alt,async,autocomplete,' + + 'autofocus,autoplay,autosave,bgcolor,border,buffered,challenge,charset,' + + 'checked,cite,class,code,codebase,color,cols,colspan,content,http-equiv,' + + 'name,contenteditable,contextmenu,controls,coords,data,datetime,default,' + + 'defer,dir,dirname,disabled,download,draggable,dropzone,enctype,method,for,' + + 'form,formaction,headers,height,hidden,high,href,hreflang,http-equiv,' + + 'icon,id,ismap,itemprop,keytype,kind,label,lang,language,list,loop,low,' + + 'manifest,max,maxlength,media,method,GET,POST,min,multiple,email,file,' + + 'muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,' + + 'preload,radiogroup,readonly,rel,required,reversed,rows,rowspan,sandbox,' + + 'scope,scoped,seamless,selected,shape,size,type,text,password,sizes,span,' + + 'spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,' + + 'target,title,type,usemap,value,width,wrap' +) + +function vModel(self, dataObject, defaultValue) { + dataObject.props.value = defaultValue + + dataObject.on.input = val => { + self.$emit('input', val) + } +} + +const componentChild = { + 'el-button': { + default(h, conf, key) { + return conf[key] + }, + }, + 'el-input': { + prepend(h, conf, key) { + return + }, + append(h, conf, key) { + return + } + }, + 'el-select': { + options(h, conf, key) { + const list = [] + conf.options.forEach(item => { + list.push() + }) + return list + } + }, + 'el-radio-group': { + options(h, conf, key) { + const list = [] + conf.options.forEach(item => { + if (conf.optionType === 'button') list.push({item.label}) + else list.push({item.label}) + }) + return list + } + }, + 'el-checkbox-group': { + options(h, conf, key) { + const list = [] + conf.options.forEach(item => { + if (conf.optionType === 'button') { + list.push({item.label}) + } else { + list.push({item.label}) + } + }) + return list + } + }, + 'el-upload': { + 'list-type': (h, conf, key) => { + const list = [] + if (conf['list-type'] === 'picture-card') { + list.push() + } else { + list.push({conf.buttonText}) + } + if (conf.showTip) { + list.push(
只能上传不超过 {conf.fileSize}{conf.sizeUnit} 的{conf.accept}文件
) + } + return list + } + } +} + +export default { + render(h) { + const dataObject = { + attrs: {}, + props: {}, + on: {}, + style: {} + } + const confClone = JSON.parse(JSON.stringify(this.conf)) + const children = [] + + const childObjs = componentChild[confClone.tag] + if (childObjs) { + Object.keys(childObjs).forEach(key => { + const childFunc = childObjs[key] + if (confClone[key]) { + children.push(childFunc(h, confClone, key)) + } + }) + } + + Object.keys(confClone).forEach(key => { + const val = confClone[key] + if (key === 'vModel') { + vModel(this, dataObject, confClone.defaultValue) + } else if (dataObject[key]) { + dataObject[key] = val + } else if (!isAttr(key)) { + dataObject.props[key] = val + } else { + dataObject.attrs[key] = val + } + }) + return h(this.conf.tag, dataObject, children) + }, + props: ['conf'] +} diff --git a/ruoyi-ui/src/utils/index.js b/yudao-admin-ui/src/utils/index.js similarity index 95% rename from ruoyi-ui/src/utils/index.js rename to yudao-admin-ui/src/utils/index.js index 2893bc83a..918580f7b 100644 --- a/ruoyi-ui/src/utils/index.js +++ b/yudao-admin-ui/src/utils/index.js @@ -1,390 +1,390 @@ -import { parseTime } from './ruoyi' - -/** - * 表格时间格式化 - */ -export function formatDate(cellValue) { - if (cellValue == null || cellValue == "") return ""; - var date = new Date(cellValue) - var year = date.getFullYear() - var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1 - var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() - var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours() - var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes() - var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds() - return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds -} - -/** - * @param {number} time - * @param {string} option - * @returns {string} - */ -export function formatTime(time, option) { - if (('' + time).length === 10) { - time = parseInt(time) * 1000 - } else { - time = +time - } - const d = new Date(time) - const now = Date.now() - - const diff = (now - d) / 1000 - - if (diff < 30) { - return '刚刚' - } else if (diff < 3600) { - // less 1 hour - return Math.ceil(diff / 60) + '分钟前' - } else if (diff < 3600 * 24) { - return Math.ceil(diff / 3600) + '小时前' - } else if (diff < 3600 * 24 * 2) { - return '1天前' - } - if (option) { - return parseTime(time, option) - } else { - return ( - d.getMonth() + - 1 + - '月' + - d.getDate() + - '日' + - d.getHours() + - '时' + - d.getMinutes() + - '分' - ) - } -} - -/** - * @param {string} url - * @returns {Object} - */ -export function getQueryObject(url) { - url = url == null ? window.location.href : url - const search = url.substring(url.lastIndexOf('?') + 1) - const obj = {} - const reg = /([^?&=]+)=([^?&=]*)/g - search.replace(reg, (rs, $1, $2) => { - const name = decodeURIComponent($1) - let val = decodeURIComponent($2) - val = String(val) - obj[name] = val - return rs - }) - return obj -} - -/** - * @param {string} input value - * @returns {number} output value - */ -export function byteLength(str) { - // returns the byte length of an utf8 string - let s = str.length - for (var i = str.length - 1; i >= 0; i--) { - const code = str.charCodeAt(i) - if (code > 0x7f && code <= 0x7ff) s++ - else if (code > 0x7ff && code <= 0xffff) s += 2 - if (code >= 0xDC00 && code <= 0xDFFF) i-- - } - return s -} - -/** - * @param {Array} actual - * @returns {Array} - */ -export function cleanArray(actual) { - const newArray = [] - for (let i = 0; i < actual.length; i++) { - if (actual[i]) { - newArray.push(actual[i]) - } - } - return newArray -} - -/** - * @param {Object} json - * @returns {Array} - */ -export function param(json) { - if (!json) return '' - return cleanArray( - Object.keys(json).map(key => { - if (json[key] === undefined) return '' - return encodeURIComponent(key) + '=' + encodeURIComponent(json[key]) - }) - ).join('&') -} - -/** - * @param {string} url - * @returns {Object} - */ -export function param2Obj(url) { - const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ') - if (!search) { - return {} - } - const obj = {} - const searchArr = search.split('&') - searchArr.forEach(v => { - const index = v.indexOf('=') - if (index !== -1) { - const name = v.substring(0, index) - const val = v.substring(index + 1, v.length) - obj[name] = val - } - }) - return obj -} - -/** - * @param {string} val - * @returns {string} - */ -export function html2Text(val) { - const div = document.createElement('div') - div.innerHTML = val - return div.textContent || div.innerText -} - -/** - * Merges two objects, giving the last one precedence - * @param {Object} target - * @param {(Object|Array)} source - * @returns {Object} - */ -export function objectMerge(target, source) { - if (typeof target !== 'object') { - target = {} - } - if (Array.isArray(source)) { - return source.slice() - } - Object.keys(source).forEach(property => { - const sourceProperty = source[property] - if (typeof sourceProperty === 'object') { - target[property] = objectMerge(target[property], sourceProperty) - } else { - target[property] = sourceProperty - } - }) - return target -} - -/** - * @param {HTMLElement} element - * @param {string} className - */ -export function toggleClass(element, className) { - if (!element || !className) { - return - } - let classString = element.className - const nameIndex = classString.indexOf(className) - if (nameIndex === -1) { - classString += '' + className - } else { - classString = - classString.substr(0, nameIndex) + - classString.substr(nameIndex + className.length) - } - element.className = classString -} - -/** - * @param {string} type - * @returns {Date} - */ -export function getTime(type) { - if (type === 'start') { - return new Date().getTime() - 3600 * 1000 * 24 * 90 - } else { - return new Date(new Date().toDateString()) - } -} - -/** - * @param {Function} func - * @param {number} wait - * @param {boolean} immediate - * @return {*} - */ -export function debounce(func, wait, immediate) { - let timeout, args, context, timestamp, result - - const later = function() { - // 据上一次触发时间间隔 - const last = +new Date() - timestamp - - // 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait - if (last < wait && last > 0) { - timeout = setTimeout(later, wait - last) - } else { - timeout = null - // 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用 - if (!immediate) { - result = func.apply(context, args) - if (!timeout) context = args = null - } - } - } - - return function(...args) { - context = this - timestamp = +new Date() - const callNow = immediate && !timeout - // 如果延时不存在,重新设定延时 - if (!timeout) timeout = setTimeout(later, wait) - if (callNow) { - result = func.apply(context, args) - context = args = null - } - - return result - } -} - -/** - * This is just a simple version of deep copy - * Has a lot of edge cases bug - * If you want to use a perfect deep copy, use lodash's _.cloneDeep - * @param {Object} source - * @returns {Object} - */ -export function deepClone(source) { - if (!source && typeof source !== 'object') { - throw new Error('error arguments', 'deepClone') - } - const targetObj = source.constructor === Array ? [] : {} - Object.keys(source).forEach(keys => { - if (source[keys] && typeof source[keys] === 'object') { - targetObj[keys] = deepClone(source[keys]) - } else { - targetObj[keys] = source[keys] - } - }) - return targetObj -} - -/** - * @param {Array} arr - * @returns {Array} - */ -export function uniqueArr(arr) { - return Array.from(new Set(arr)) -} - -/** - * @returns {string} - */ -export function createUniqueString() { - const timestamp = +new Date() + '' - const randomNum = parseInt((1 + Math.random()) * 65536) + '' - return (+(randomNum + timestamp)).toString(32) -} - -/** - * Check if an element has a class - * @param {HTMLElement} elm - * @param {string} cls - * @returns {boolean} - */ -export function hasClass(ele, cls) { - return !!ele.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)')) -} - -/** - * Add class to element - * @param {HTMLElement} elm - * @param {string} cls - */ -export function addClass(ele, cls) { - if (!hasClass(ele, cls)) ele.className += ' ' + cls -} - -/** - * Remove class from element - * @param {HTMLElement} elm - * @param {string} cls - */ -export function removeClass(ele, cls) { - if (hasClass(ele, cls)) { - const reg = new RegExp('(\\s|^)' + cls + '(\\s|$)') - ele.className = ele.className.replace(reg, ' ') - } -} - -export function makeMap(str, expectsLowerCase) { - const map = Object.create(null) - const list = str.split(',') - for (let i = 0; i < list.length; i++) { - map[list[i]] = true - } - return expectsLowerCase - ? val => map[val.toLowerCase()] - : val => map[val] -} - -export const exportDefault = 'export default ' - -export const beautifierConf = { - html: { - indent_size: '2', - indent_char: ' ', - max_preserve_newlines: '-1', - preserve_newlines: false, - keep_array_indentation: false, - break_chained_methods: false, - indent_scripts: 'separate', - brace_style: 'end-expand', - space_before_conditional: true, - unescape_strings: false, - jslint_happy: false, - end_with_newline: true, - wrap_line_length: '110', - indent_inner_html: true, - comma_first: false, - e4x: true, - indent_empty_lines: true - }, - js: { - indent_size: '2', - indent_char: ' ', - max_preserve_newlines: '-1', - preserve_newlines: false, - keep_array_indentation: false, - break_chained_methods: false, - indent_scripts: 'normal', - brace_style: 'end-expand', - space_before_conditional: true, - unescape_strings: false, - jslint_happy: true, - end_with_newline: true, - wrap_line_length: '110', - indent_inner_html: true, - comma_first: false, - e4x: true, - indent_empty_lines: true - } -} - -// 首字母大小 -export function titleCase(str) { - return str.replace(/( |^)[a-z]/g, L => L.toUpperCase()) -} - -// 下划转驼峰 -export function camelCase(str) { - return str.replace(/-[a-z]/g, str1 => str1.substr(-1).toUpperCase()) -} - -export function isNumberStr(str) { - return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str) -} - +import { parseTime } from './ruoyi' + +/** + * 表格时间格式化 + */ +export function formatDate(cellValue) { + if (cellValue == null || cellValue == "") return ""; + var date = new Date(cellValue) + var year = date.getFullYear() + var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1 + var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() + var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours() + var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes() + var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds() + return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds +} + +/** + * @param {number} time + * @param {string} option + * @returns {string} + */ +export function formatTime(time, option) { + if (('' + time).length === 10) { + time = parseInt(time) * 1000 + } else { + time = +time + } + const d = new Date(time) + const now = Date.now() + + const diff = (now - d) / 1000 + + if (diff < 30) { + return '刚刚' + } else if (diff < 3600) { + // less 1 hour + return Math.ceil(diff / 60) + '分钟前' + } else if (diff < 3600 * 24) { + return Math.ceil(diff / 3600) + '小时前' + } else if (diff < 3600 * 24 * 2) { + return '1天前' + } + if (option) { + return parseTime(time, option) + } else { + return ( + d.getMonth() + + 1 + + '月' + + d.getDate() + + '日' + + d.getHours() + + '时' + + d.getMinutes() + + '分' + ) + } +} + +/** + * @param {string} url + * @returns {Object} + */ +export function getQueryObject(url) { + url = url == null ? window.location.href : url + const search = url.substring(url.lastIndexOf('?') + 1) + const obj = {} + const reg = /([^?&=]+)=([^?&=]*)/g + search.replace(reg, (rs, $1, $2) => { + const name = decodeURIComponent($1) + let val = decodeURIComponent($2) + val = String(val) + obj[name] = val + return rs + }) + return obj +} + +/** + * @param {string} input value + * @returns {number} output value + */ +export function byteLength(str) { + // returns the byte length of an utf8 string + let s = str.length + for (var i = str.length - 1; i >= 0; i--) { + const code = str.charCodeAt(i) + if (code > 0x7f && code <= 0x7ff) s++ + else if (code > 0x7ff && code <= 0xffff) s += 2 + if (code >= 0xDC00 && code <= 0xDFFF) i-- + } + return s +} + +/** + * @param {Array} actual + * @returns {Array} + */ +export function cleanArray(actual) { + const newArray = [] + for (let i = 0; i < actual.length; i++) { + if (actual[i]) { + newArray.push(actual[i]) + } + } + return newArray +} + +/** + * @param {Object} json + * @returns {Array} + */ +export function param(json) { + if (!json) return '' + return cleanArray( + Object.keys(json).map(key => { + if (json[key] === undefined) return '' + return encodeURIComponent(key) + '=' + encodeURIComponent(json[key]) + }) + ).join('&') +} + +/** + * @param {string} url + * @returns {Object} + */ +export function param2Obj(url) { + const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ') + if (!search) { + return {} + } + const obj = {} + const searchArr = search.split('&') + searchArr.forEach(v => { + const index = v.indexOf('=') + if (index !== -1) { + const name = v.substring(0, index) + const val = v.substring(index + 1, v.length) + obj[name] = val + } + }) + return obj +} + +/** + * @param {string} val + * @returns {string} + */ +export function html2Text(val) { + const div = document.createElement('div') + div.innerHTML = val + return div.textContent || div.innerText +} + +/** + * Merges two objects, giving the last one precedence + * @param {Object} target + * @param {(Object|Array)} source + * @returns {Object} + */ +export function objectMerge(target, source) { + if (typeof target !== 'object') { + target = {} + } + if (Array.isArray(source)) { + return source.slice() + } + Object.keys(source).forEach(property => { + const sourceProperty = source[property] + if (typeof sourceProperty === 'object') { + target[property] = objectMerge(target[property], sourceProperty) + } else { + target[property] = sourceProperty + } + }) + return target +} + +/** + * @param {HTMLElement} element + * @param {string} className + */ +export function toggleClass(element, className) { + if (!element || !className) { + return + } + let classString = element.className + const nameIndex = classString.indexOf(className) + if (nameIndex === -1) { + classString += '' + className + } else { + classString = + classString.substr(0, nameIndex) + + classString.substr(nameIndex + className.length) + } + element.className = classString +} + +/** + * @param {string} type + * @returns {Date} + */ +export function getTime(type) { + if (type === 'start') { + return new Date().getTime() - 3600 * 1000 * 24 * 90 + } else { + return new Date(new Date().toDateString()) + } +} + +/** + * @param {Function} func + * @param {number} wait + * @param {boolean} immediate + * @return {*} + */ +export function debounce(func, wait, immediate) { + let timeout, args, context, timestamp, result + + const later = function() { + // 据上一次触发时间间隔 + const last = +new Date() - timestamp + + // 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait + if (last < wait && last > 0) { + timeout = setTimeout(later, wait - last) + } else { + timeout = null + // 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用 + if (!immediate) { + result = func.apply(context, args) + if (!timeout) context = args = null + } + } + } + + return function(...args) { + context = this + timestamp = +new Date() + const callNow = immediate && !timeout + // 如果延时不存在,重新设定延时 + if (!timeout) timeout = setTimeout(later, wait) + if (callNow) { + result = func.apply(context, args) + context = args = null + } + + return result + } +} + +/** + * This is just a simple version of deep copy + * Has a lot of edge cases bug + * If you want to use a perfect deep copy, use lodash's _.cloneDeep + * @param {Object} source + * @returns {Object} + */ +export function deepClone(source) { + if (!source && typeof source !== 'object') { + throw new Error('error arguments', 'deepClone') + } + const targetObj = source.constructor === Array ? [] : {} + Object.keys(source).forEach(keys => { + if (source[keys] && typeof source[keys] === 'object') { + targetObj[keys] = deepClone(source[keys]) + } else { + targetObj[keys] = source[keys] + } + }) + return targetObj +} + +/** + * @param {Array} arr + * @returns {Array} + */ +export function uniqueArr(arr) { + return Array.from(new Set(arr)) +} + +/** + * @returns {string} + */ +export function createUniqueString() { + const timestamp = +new Date() + '' + const randomNum = parseInt((1 + Math.random()) * 65536) + '' + return (+(randomNum + timestamp)).toString(32) +} + +/** + * Check if an element has a class + * @param {HTMLElement} elm + * @param {string} cls + * @returns {boolean} + */ +export function hasClass(ele, cls) { + return !!ele.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)')) +} + +/** + * Add class to element + * @param {HTMLElement} elm + * @param {string} cls + */ +export function addClass(ele, cls) { + if (!hasClass(ele, cls)) ele.className += ' ' + cls +} + +/** + * Remove class from element + * @param {HTMLElement} elm + * @param {string} cls + */ +export function removeClass(ele, cls) { + if (hasClass(ele, cls)) { + const reg = new RegExp('(\\s|^)' + cls + '(\\s|$)') + ele.className = ele.className.replace(reg, ' ') + } +} + +export function makeMap(str, expectsLowerCase) { + const map = Object.create(null) + const list = str.split(',') + for (let i = 0; i < list.length; i++) { + map[list[i]] = true + } + return expectsLowerCase + ? val => map[val.toLowerCase()] + : val => map[val] +} + +export const exportDefault = 'export default ' + +export const beautifierConf = { + html: { + indent_size: '2', + indent_char: ' ', + max_preserve_newlines: '-1', + preserve_newlines: false, + keep_array_indentation: false, + break_chained_methods: false, + indent_scripts: 'separate', + brace_style: 'end-expand', + space_before_conditional: true, + unescape_strings: false, + jslint_happy: false, + end_with_newline: true, + wrap_line_length: '110', + indent_inner_html: true, + comma_first: false, + e4x: true, + indent_empty_lines: true + }, + js: { + indent_size: '2', + indent_char: ' ', + max_preserve_newlines: '-1', + preserve_newlines: false, + keep_array_indentation: false, + break_chained_methods: false, + indent_scripts: 'normal', + brace_style: 'end-expand', + space_before_conditional: true, + unescape_strings: false, + jslint_happy: true, + end_with_newline: true, + wrap_line_length: '110', + indent_inner_html: true, + comma_first: false, + e4x: true, + indent_empty_lines: true + } +} + +// 首字母大小 +export function titleCase(str) { + return str.replace(/( |^)[a-z]/g, L => L.toUpperCase()) +} + +// 下划转驼峰 +export function camelCase(str) { + return str.replace(/-[a-z]/g, str1 => str1.substr(-1).toUpperCase()) +} + +export function isNumberStr(str) { + return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str) +} + diff --git a/ruoyi-ui/src/utils/jsencrypt.js b/yudao-admin-ui/src/utils/jsencrypt.js similarity index 100% rename from ruoyi-ui/src/utils/jsencrypt.js rename to yudao-admin-ui/src/utils/jsencrypt.js diff --git a/ruoyi-ui/src/utils/permission.js b/yudao-admin-ui/src/utils/permission.js similarity index 96% rename from ruoyi-ui/src/utils/permission.js rename to yudao-admin-ui/src/utils/permission.js index 25d1a0293..1730e332c 100644 --- a/ruoyi-ui/src/utils/permission.js +++ b/yudao-admin-ui/src/utils/permission.js @@ -1,51 +1,51 @@ -import store from '@/store' - -/** - * 字符权限校验 - * @param {Array} value 校验值 - * @returns {Boolean} - */ -export function checkPermi(value) { - if (value && value instanceof Array && value.length > 0) { - const permissions = store.getters && store.getters.permissions - const permissionDatas = value - const all_permission = "*:*:*"; - - const hasPermission = permissions.some(permission => { - return all_permission === permission || permissionDatas.includes(permission) - }) - - if (!hasPermission) { - return false - } - return true - } else { - console.error(`need roles! Like checkPermi="['system:user:add','system:user:edit']"`) - return false - } -} - -/** - * 角色权限校验 - * @param {Array} value 校验值 - * @returns {Boolean} - */ -export function checkRole(value) { - if (value && value instanceof Array && value.length > 0) { - const roles = store.getters && store.getters.roles - const permissionRoles = value - const super_admin = "admin"; - - const hasRole = roles.some(role => { - return super_admin === role || permissionRoles.includes(role) - }) - - if (!hasRole) { - return false - } - return true - } else { - console.error(`need roles! Like checkRole="['admin','editor']"`) - return false - } +import store from '@/store' + +/** + * 字符权限校验 + * @param {Array} value 校验值 + * @returns {Boolean} + */ +export function checkPermi(value) { + if (value && value instanceof Array && value.length > 0) { + const permissions = store.getters && store.getters.permissions + const permissionDatas = value + const all_permission = "*:*:*"; + + const hasPermission = permissions.some(permission => { + return all_permission === permission || permissionDatas.includes(permission) + }) + + if (!hasPermission) { + return false + } + return true + } else { + console.error(`need roles! Like checkPermi="['system:user:add','system:user:edit']"`) + return false + } +} + +/** + * 角色权限校验 + * @param {Array} value 校验值 + * @returns {Boolean} + */ +export function checkRole(value) { + if (value && value instanceof Array && value.length > 0) { + const roles = store.getters && store.getters.roles + const permissionRoles = value + const super_admin = "admin"; + + const hasRole = roles.some(role => { + return super_admin === role || permissionRoles.includes(role) + }) + + if (!hasRole) { + return false + } + return true + } else { + console.error(`need roles! Like checkRole="['admin','editor']"`) + return false + } } \ No newline at end of file diff --git a/ruoyi-ui/src/utils/request.js b/yudao-admin-ui/src/utils/request.js similarity index 100% rename from ruoyi-ui/src/utils/request.js rename to yudao-admin-ui/src/utils/request.js diff --git a/ruoyi-ui/src/utils/ruoyi.js b/yudao-admin-ui/src/utils/ruoyi.js similarity index 100% rename from ruoyi-ui/src/utils/ruoyi.js rename to yudao-admin-ui/src/utils/ruoyi.js diff --git a/ruoyi-ui/src/utils/scroll-to.js b/yudao-admin-ui/src/utils/scroll-to.js similarity index 96% rename from ruoyi-ui/src/utils/scroll-to.js rename to yudao-admin-ui/src/utils/scroll-to.js index 709fa5745..c5d8e04e0 100644 --- a/ruoyi-ui/src/utils/scroll-to.js +++ b/yudao-admin-ui/src/utils/scroll-to.js @@ -1,58 +1,58 @@ -Math.easeInOutQuad = function(t, b, c, d) { - t /= d / 2 - if (t < 1) { - return c / 2 * t * t + b - } - t-- - return -c / 2 * (t * (t - 2) - 1) + b -} - -// requestAnimationFrame for Smart Animating http://goo.gl/sx5sts -var requestAnimFrame = (function() { - return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) { window.setTimeout(callback, 1000 / 60) } -})() - -/** - * Because it's so fucking difficult to detect the scrolling element, just move them all - * @param {number} amount - */ -function move(amount) { - document.documentElement.scrollTop = amount - document.body.parentNode.scrollTop = amount - document.body.scrollTop = amount -} - -function position() { - return document.documentElement.scrollTop || document.body.parentNode.scrollTop || document.body.scrollTop -} - -/** - * @param {number} to - * @param {number} duration - * @param {Function} callback - */ -export function scrollTo(to, duration, callback) { - const start = position() - const change = to - start - const increment = 20 - let currentTime = 0 - duration = (typeof (duration) === 'undefined') ? 500 : duration - var animateScroll = function() { - // increment the time - currentTime += increment - // find the value with the quadratic in-out easing function - var val = Math.easeInOutQuad(currentTime, start, change, duration) - // move the document.body - move(val) - // do the animation unless its over - if (currentTime < duration) { - requestAnimFrame(animateScroll) - } else { - if (callback && typeof (callback) === 'function') { - // the animation is done so lets callback - callback() - } - } - } - animateScroll() -} +Math.easeInOutQuad = function(t, b, c, d) { + t /= d / 2 + if (t < 1) { + return c / 2 * t * t + b + } + t-- + return -c / 2 * (t * (t - 2) - 1) + b +} + +// requestAnimationFrame for Smart Animating http://goo.gl/sx5sts +var requestAnimFrame = (function() { + return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) { window.setTimeout(callback, 1000 / 60) } +})() + +/** + * Because it's so fucking difficult to detect the scrolling element, just move them all + * @param {number} amount + */ +function move(amount) { + document.documentElement.scrollTop = amount + document.body.parentNode.scrollTop = amount + document.body.scrollTop = amount +} + +function position() { + return document.documentElement.scrollTop || document.body.parentNode.scrollTop || document.body.scrollTop +} + +/** + * @param {number} to + * @param {number} duration + * @param {Function} callback + */ +export function scrollTo(to, duration, callback) { + const start = position() + const change = to - start + const increment = 20 + let currentTime = 0 + duration = (typeof (duration) === 'undefined') ? 500 : duration + var animateScroll = function() { + // increment the time + currentTime += increment + // find the value with the quadratic in-out easing function + var val = Math.easeInOutQuad(currentTime, start, change, duration) + // move the document.body + move(val) + // do the animation unless its over + if (currentTime < duration) { + requestAnimFrame(animateScroll) + } else { + if (callback && typeof (callback) === 'function') { + // the animation is done so lets callback + callback() + } + } + } + animateScroll() +} diff --git a/ruoyi-ui/src/utils/validate.js b/yudao-admin-ui/src/utils/validate.js similarity index 95% rename from ruoyi-ui/src/utils/validate.js rename to yudao-admin-ui/src/utils/validate.js index 9c00400ee..adfa25425 100644 --- a/ruoyi-ui/src/utils/validate.js +++ b/yudao-admin-ui/src/utils/validate.js @@ -1,83 +1,83 @@ -/** - * @param {string} path - * @returns {Boolean} - */ -export function isExternal(path) { - return /^(https?:|mailto:|tel:)/.test(path) -} - -/** - * @param {string} str - * @returns {Boolean} - */ -export function validUsername(str) { - const valid_map = ['admin', 'editor'] - return valid_map.indexOf(str.trim()) >= 0 -} - -/** - * @param {string} url - * @returns {Boolean} - */ -export function validURL(url) { - const reg = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/ - return reg.test(url) -} - -/** - * @param {string} str - * @returns {Boolean} - */ -export function validLowerCase(str) { - const reg = /^[a-z]+$/ - return reg.test(str) -} - -/** - * @param {string} str - * @returns {Boolean} - */ -export function validUpperCase(str) { - const reg = /^[A-Z]+$/ - return reg.test(str) -} - -/** - * @param {string} str - * @returns {Boolean} - */ -export function validAlphabets(str) { - const reg = /^[A-Za-z]+$/ - return reg.test(str) -} - -/** - * @param {string} email - * @returns {Boolean} - */ -export function validEmail(email) { - const reg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ - return reg.test(email) -} - -/** - * @param {string} str - * @returns {Boolean} - */ -export function isString(str) { - if (typeof str === 'string' || str instanceof String) { - return true - } - return false -} - -/** - * @param {Array} arg - * @returns {Boolean} - */ -export function isArray(arg) { - if (typeof Array.isArray === 'undefined') { - return Object.prototype.toString.call(arg) === '[object Array]' - } - return Array.isArray(arg) -} +/** + * @param {string} path + * @returns {Boolean} + */ +export function isExternal(path) { + return /^(https?:|mailto:|tel:)/.test(path) +} + +/** + * @param {string} str + * @returns {Boolean} + */ +export function validUsername(str) { + const valid_map = ['admin', 'editor'] + return valid_map.indexOf(str.trim()) >= 0 +} + +/** + * @param {string} url + * @returns {Boolean} + */ +export function validURL(url) { + const reg = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/ + return reg.test(url) +} + +/** + * @param {string} str + * @returns {Boolean} + */ +export function validLowerCase(str) { + const reg = /^[a-z]+$/ + return reg.test(str) +} + +/** + * @param {string} str + * @returns {Boolean} + */ +export function validUpperCase(str) { + const reg = /^[A-Z]+$/ + return reg.test(str) +} + +/** + * @param {string} str + * @returns {Boolean} + */ +export function validAlphabets(str) { + const reg = /^[A-Za-z]+$/ + return reg.test(str) +} + +/** + * @param {string} email + * @returns {Boolean} + */ +export function validEmail(email) { + const reg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ + return reg.test(email) +} + +/** + * @param {string} str + * @returns {Boolean} + */ +export function isString(str) { + if (typeof str === 'string' || str instanceof String) { + return true + } + return false +} + +/** + * @param {Array} arg + * @returns {Boolean} + */ +export function isArray(arg) { + if (typeof Array.isArray === 'undefined') { + return Object.prototype.toString.call(arg) === '[object Array]' + } + return Array.isArray(arg) +} diff --git a/ruoyi-ui/src/views/components/icons/element-icons.js b/yudao-admin-ui/src/views/components/icons/element-icons.js similarity index 99% rename from ruoyi-ui/src/views/components/icons/element-icons.js rename to yudao-admin-ui/src/views/components/icons/element-icons.js index ae33ba0e3..9ea4d63fd 100644 --- a/ruoyi-ui/src/views/components/icons/element-icons.js +++ b/yudao-admin-ui/src/views/components/icons/element-icons.js @@ -1,3 +1,3 @@ -const elementIcons = ['platform-eleme', 'eleme', 'delete-solid', 'delete', 's-tools', 'setting', 'user-solid', 'user', 'phone', 'phone-outline', 'more', 'more-outline', 'star-on', 'star-off', 's-goods', 'goods', 'warning', 'warning-outline', 'question', 'info', 'remove', 'circle-plus', 'success', 'error', 'zoom-in', 'zoom-out', 'remove-outline', 'circle-plus-outline', 'circle-check', 'circle-close', 's-help', 'help', 'minus', 'plus', 'check', 'close', 'picture', 'picture-outline', 'picture-outline-round', 'upload', 'upload2', 'download', 'camera-solid', 'camera', 'video-camera-solid', 'video-camera', 'message-solid', 'bell', 's-cooperation', 's-order', 's-platform', 's-fold', 's-unfold', 's-operation', 's-promotion', 's-home', 's-release', 's-ticket', 's-management', 's-open', 's-shop', 's-marketing', 's-flag', 's-comment', 's-finance', 's-claim', 's-custom', 's-opportunity', 's-data', 's-check', 's-grid', 'menu', 'share', 'd-caret', 'caret-left', 'caret-right', 'caret-bottom', 'caret-top', 'bottom-left', 'bottom-right', 'back', 'right', 'bottom', 'top', 'top-left', 'top-right', 'arrow-left', 'arrow-right', 'arrow-down', 'arrow-up', 'd-arrow-left', 'd-arrow-right', 'video-pause', 'video-play', 'refresh', 'refresh-right', 'refresh-left', 'finished', 'sort', 'sort-up', 'sort-down', 'rank', 'loading', 'view', 'c-scale-to-original', 'date', 'edit', 'edit-outline', 'folder', 'folder-opened', 'folder-add', 'folder-remove', 'folder-delete', 'folder-checked', 'tickets', 'document-remove', 'document-delete', 'document-copy', 'document-checked', 'document', 'document-add', 'printer', 'paperclip', 'takeaway-box', 'search', 'monitor', 'attract', 'mobile', 'scissors', 'umbrella', 'headset', 'brush', 'mouse', 'coordinate', 'magic-stick', 'reading', 'data-line', 'data-board', 'pie-chart', 'data-analysis', 'collection-tag', 'film', 'suitcase', 'suitcase-1', 'receiving', 'collection', 'files', 'notebook-1', 'notebook-2', 'toilet-paper', 'office-building', 'school', 'table-lamp', 'house', 'no-smoking', 'smoking', 'shopping-cart-full', 'shopping-cart-1', 'shopping-cart-2', 'shopping-bag-1', 'shopping-bag-2', 'sold-out', 'sell', 'present', 'box', 'bank-card', 'money', 'coin', 'wallet', 'discount', 'price-tag', 'news', 'guide', 'male', 'female', 'thumb', 'cpu', 'link', 'connection', 'open', 'turn-off', 'set-up', 'chat-round', 'chat-line-round', 'chat-square', 'chat-dot-round', 'chat-dot-square', 'chat-line-square', 'message', 'postcard', 'position', 'turn-off-microphone', 'microphone', 'close-notification', 'bangzhu', 'time', 'odometer', 'crop', 'aim', 'switch-button', 'full-screen', 'copy-document', 'mic', 'stopwatch', 'medal-1', 'medal', 'trophy', 'trophy-1', 'first-aid-kit', 'discover', 'place', 'location', 'location-outline', 'location-information', 'add-location', 'delete-location', 'map-location', 'alarm-clock', 'timer', 'watch-1', 'watch', 'lock', 'unlock', 'key', 'service', 'mobile-phone', 'bicycle', 'truck', 'ship', 'basketball', 'football', 'soccer', 'baseball', 'wind-power', 'light-rain', 'lightning', 'heavy-rain', 'sunrise', 'sunrise-1', 'sunset', 'sunny', 'cloudy', 'partly-cloudy', 'cloudy-and-sunny', 'moon', 'moon-night', 'dish', 'dish-1', 'food', 'chicken', 'fork-spoon', 'knife-fork', 'burger', 'tableware', 'sugar', 'dessert', 'ice-cream', 'hot-water', 'water-cup', 'coffee-cup', 'cold-drink', 'goblet', 'goblet-full', 'goblet-square', 'goblet-square-full', 'refrigerator', 'grape', 'watermelon', 'cherry', 'apple', 'pear', 'orange', 'coffee', 'ice-tea', 'ice-drink', 'milk-tea', 'potato-strips', 'lollipop', 'ice-cream-square', 'ice-cream-round'] - -export default elementIcons +const elementIcons = ['platform-eleme', 'eleme', 'delete-solid', 'delete', 's-tools', 'setting', 'user-solid', 'user', 'phone', 'phone-outline', 'more', 'more-outline', 'star-on', 'star-off', 's-goods', 'goods', 'warning', 'warning-outline', 'question', 'info', 'remove', 'circle-plus', 'success', 'error', 'zoom-in', 'zoom-out', 'remove-outline', 'circle-plus-outline', 'circle-check', 'circle-close', 's-help', 'help', 'minus', 'plus', 'check', 'close', 'picture', 'picture-outline', 'picture-outline-round', 'upload', 'upload2', 'download', 'camera-solid', 'camera', 'video-camera-solid', 'video-camera', 'message-solid', 'bell', 's-cooperation', 's-order', 's-platform', 's-fold', 's-unfold', 's-operation', 's-promotion', 's-home', 's-release', 's-ticket', 's-management', 's-open', 's-shop', 's-marketing', 's-flag', 's-comment', 's-finance', 's-claim', 's-custom', 's-opportunity', 's-data', 's-check', 's-grid', 'menu', 'share', 'd-caret', 'caret-left', 'caret-right', 'caret-bottom', 'caret-top', 'bottom-left', 'bottom-right', 'back', 'right', 'bottom', 'top', 'top-left', 'top-right', 'arrow-left', 'arrow-right', 'arrow-down', 'arrow-up', 'd-arrow-left', 'd-arrow-right', 'video-pause', 'video-play', 'refresh', 'refresh-right', 'refresh-left', 'finished', 'sort', 'sort-up', 'sort-down', 'rank', 'loading', 'view', 'c-scale-to-original', 'date', 'edit', 'edit-outline', 'folder', 'folder-opened', 'folder-add', 'folder-remove', 'folder-delete', 'folder-checked', 'tickets', 'document-remove', 'document-delete', 'document-copy', 'document-checked', 'document', 'document-add', 'printer', 'paperclip', 'takeaway-box', 'search', 'monitor', 'attract', 'mobile', 'scissors', 'umbrella', 'headset', 'brush', 'mouse', 'coordinate', 'magic-stick', 'reading', 'data-line', 'data-board', 'pie-chart', 'data-analysis', 'collection-tag', 'film', 'suitcase', 'suitcase-1', 'receiving', 'collection', 'files', 'notebook-1', 'notebook-2', 'toilet-paper', 'office-building', 'school', 'table-lamp', 'house', 'no-smoking', 'smoking', 'shopping-cart-full', 'shopping-cart-1', 'shopping-cart-2', 'shopping-bag-1', 'shopping-bag-2', 'sold-out', 'sell', 'present', 'box', 'bank-card', 'money', 'coin', 'wallet', 'discount', 'price-tag', 'news', 'guide', 'male', 'female', 'thumb', 'cpu', 'link', 'connection', 'open', 'turn-off', 'set-up', 'chat-round', 'chat-line-round', 'chat-square', 'chat-dot-round', 'chat-dot-square', 'chat-line-square', 'message', 'postcard', 'position', 'turn-off-microphone', 'microphone', 'close-notification', 'bangzhu', 'time', 'odometer', 'crop', 'aim', 'switch-button', 'full-screen', 'copy-document', 'mic', 'stopwatch', 'medal-1', 'medal', 'trophy', 'trophy-1', 'first-aid-kit', 'discover', 'place', 'location', 'location-outline', 'location-information', 'add-location', 'delete-location', 'map-location', 'alarm-clock', 'timer', 'watch-1', 'watch', 'lock', 'unlock', 'key', 'service', 'mobile-phone', 'bicycle', 'truck', 'ship', 'basketball', 'football', 'soccer', 'baseball', 'wind-power', 'light-rain', 'lightning', 'heavy-rain', 'sunrise', 'sunrise-1', 'sunset', 'sunny', 'cloudy', 'partly-cloudy', 'cloudy-and-sunny', 'moon', 'moon-night', 'dish', 'dish-1', 'food', 'chicken', 'fork-spoon', 'knife-fork', 'burger', 'tableware', 'sugar', 'dessert', 'ice-cream', 'hot-water', 'water-cup', 'coffee-cup', 'cold-drink', 'goblet', 'goblet-full', 'goblet-square', 'goblet-square-full', 'refrigerator', 'grape', 'watermelon', 'cherry', 'apple', 'pear', 'orange', 'coffee', 'ice-tea', 'ice-drink', 'milk-tea', 'potato-strips', 'lollipop', 'ice-cream-square', 'ice-cream-round'] + +export default elementIcons diff --git a/ruoyi-ui/src/views/components/icons/index.vue b/yudao-admin-ui/src/views/components/icons/index.vue similarity index 95% rename from ruoyi-ui/src/views/components/icons/index.vue rename to yudao-admin-ui/src/views/components/icons/index.vue index f422eee97..d3c9a7190 100644 --- a/ruoyi-ui/src/views/components/icons/index.vue +++ b/yudao-admin-ui/src/views/components/icons/index.vue @@ -1,87 +1,87 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/views/components/icons/svg-icons.js b/yudao-admin-ui/src/views/components/icons/svg-icons.js similarity index 96% rename from ruoyi-ui/src/views/components/icons/svg-icons.js rename to yudao-admin-ui/src/views/components/icons/svg-icons.js index 9713fd8d8..724cd8e9d 100644 --- a/ruoyi-ui/src/views/components/icons/svg-icons.js +++ b/yudao-admin-ui/src/views/components/icons/svg-icons.js @@ -1,10 +1,10 @@ -const req = require.context('../../../assets/icons/svg', false, /\.svg$/) -const requireAll = requireContext => requireContext.keys() - -const re = /\.\/(.*)\.svg/ - -const svgIcons = requireAll(req).map(i => { - return i.match(re)[1] -}) - -export default svgIcons +const req = require.context('../../../assets/icons/svg', false, /\.svg$/) +const requireAll = requireContext => requireContext.keys() + +const re = /\.\/(.*)\.svg/ + +const svgIcons = requireAll(req).map(i => { + return i.match(re)[1] +}) + +export default svgIcons diff --git a/ruoyi-ui/src/views/dashboard/BarChart.vue b/yudao-admin-ui/src/views/dashboard/BarChart.vue similarity index 95% rename from ruoyi-ui/src/views/dashboard/BarChart.vue rename to yudao-admin-ui/src/views/dashboard/BarChart.vue index 6b464e1c4..be0af34f8 100644 --- a/ruoyi-ui/src/views/dashboard/BarChart.vue +++ b/yudao-admin-ui/src/views/dashboard/BarChart.vue @@ -1,102 +1,102 @@ - - - + + + diff --git a/ruoyi-ui/src/views/dashboard/LineChart.vue b/yudao-admin-ui/src/views/dashboard/LineChart.vue similarity index 95% rename from ruoyi-ui/src/views/dashboard/LineChart.vue rename to yudao-admin-ui/src/views/dashboard/LineChart.vue index 4e30a3701..e654168dd 100644 --- a/ruoyi-ui/src/views/dashboard/LineChart.vue +++ b/yudao-admin-ui/src/views/dashboard/LineChart.vue @@ -1,135 +1,135 @@ - - - + + + diff --git a/ruoyi-ui/src/views/dashboard/PanelGroup.vue b/yudao-admin-ui/src/views/dashboard/PanelGroup.vue similarity index 95% rename from ruoyi-ui/src/views/dashboard/PanelGroup.vue rename to yudao-admin-ui/src/views/dashboard/PanelGroup.vue index 8d3a73bca..1a1081fcb 100644 --- a/ruoyi-ui/src/views/dashboard/PanelGroup.vue +++ b/yudao-admin-ui/src/views/dashboard/PanelGroup.vue @@ -1,181 +1,181 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/views/dashboard/PieChart.vue b/yudao-admin-ui/src/views/dashboard/PieChart.vue similarity index 95% rename from ruoyi-ui/src/views/dashboard/PieChart.vue rename to yudao-admin-ui/src/views/dashboard/PieChart.vue index d0e4f5016..4d2ef32a5 100644 --- a/ruoyi-ui/src/views/dashboard/PieChart.vue +++ b/yudao-admin-ui/src/views/dashboard/PieChart.vue @@ -1,79 +1,79 @@ - - - + + + diff --git a/ruoyi-ui/src/views/dashboard/RaddarChart.vue b/yudao-admin-ui/src/views/dashboard/RaddarChart.vue similarity index 95% rename from ruoyi-ui/src/views/dashboard/RaddarChart.vue rename to yudao-admin-ui/src/views/dashboard/RaddarChart.vue index 9831abfec..6823af318 100644 --- a/ruoyi-ui/src/views/dashboard/RaddarChart.vue +++ b/yudao-admin-ui/src/views/dashboard/RaddarChart.vue @@ -1,116 +1,116 @@ - - - + + + diff --git a/ruoyi-ui/src/views/dashboard/mixins/resize.js b/yudao-admin-ui/src/views/dashboard/mixins/resize.js similarity index 96% rename from ruoyi-ui/src/views/dashboard/mixins/resize.js rename to yudao-admin-ui/src/views/dashboard/mixins/resize.js index d26194c6d..b1e76e947 100644 --- a/ruoyi-ui/src/views/dashboard/mixins/resize.js +++ b/yudao-admin-ui/src/views/dashboard/mixins/resize.js @@ -1,56 +1,56 @@ -import { debounce } from '@/utils' - -export default { - data() { - return { - $_sidebarElm: null, - $_resizeHandler: null - } - }, - mounted() { - this.initListener() - }, - activated() { - if (!this.$_resizeHandler) { - // avoid duplication init - this.initListener() - } - - // when keep-alive chart activated, auto resize - this.resize() - }, - beforeDestroy() { - this.destroyListener() - }, - deactivated() { - this.destroyListener() - }, - methods: { - // use $_ for mixins properties - // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential - $_sidebarResizeHandler(e) { - if (e.propertyName === 'width') { - this.$_resizeHandler() - } - }, - initListener() { - this.$_resizeHandler = debounce(() => { - this.resize() - }, 100) - window.addEventListener('resize', this.$_resizeHandler) - - this.$_sidebarElm = document.getElementsByClassName('sidebar-container')[0] - this.$_sidebarElm && this.$_sidebarElm.addEventListener('transitionend', this.$_sidebarResizeHandler) - }, - destroyListener() { - window.removeEventListener('resize', this.$_resizeHandler) - this.$_resizeHandler = null - - this.$_sidebarElm && this.$_sidebarElm.removeEventListener('transitionend', this.$_sidebarResizeHandler) - }, - resize() { - const { chart } = this - chart && chart.resize() - } - } -} +import { debounce } from '@/utils' + +export default { + data() { + return { + $_sidebarElm: null, + $_resizeHandler: null + } + }, + mounted() { + this.initListener() + }, + activated() { + if (!this.$_resizeHandler) { + // avoid duplication init + this.initListener() + } + + // when keep-alive chart activated, auto resize + this.resize() + }, + beforeDestroy() { + this.destroyListener() + }, + deactivated() { + this.destroyListener() + }, + methods: { + // use $_ for mixins properties + // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential + $_sidebarResizeHandler(e) { + if (e.propertyName === 'width') { + this.$_resizeHandler() + } + }, + initListener() { + this.$_resizeHandler = debounce(() => { + this.resize() + }, 100) + window.addEventListener('resize', this.$_resizeHandler) + + this.$_sidebarElm = document.getElementsByClassName('sidebar-container')[0] + this.$_sidebarElm && this.$_sidebarElm.addEventListener('transitionend', this.$_sidebarResizeHandler) + }, + destroyListener() { + window.removeEventListener('resize', this.$_resizeHandler) + this.$_resizeHandler = null + + this.$_sidebarElm && this.$_sidebarElm.removeEventListener('transitionend', this.$_sidebarResizeHandler) + }, + resize() { + const { chart } = this + chart && chart.resize() + } + } +} diff --git a/ruoyi-ui/src/views/error/401.vue b/yudao-admin-ui/src/views/error/401.vue similarity index 95% rename from ruoyi-ui/src/views/error/401.vue rename to yudao-admin-ui/src/views/error/401.vue index 9664fbaf4..448b6ecd6 100644 --- a/ruoyi-ui/src/views/error/401.vue +++ b/yudao-admin-ui/src/views/error/401.vue @@ -1,88 +1,88 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/views/error/404.vue b/yudao-admin-ui/src/views/error/404.vue similarity index 95% rename from ruoyi-ui/src/views/error/404.vue rename to yudao-admin-ui/src/views/error/404.vue index 666d27c87..96f075c17 100644 --- a/ruoyi-ui/src/views/error/404.vue +++ b/yudao-admin-ui/src/views/error/404.vue @@ -1,233 +1,233 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/views/index.vue b/yudao-admin-ui/src/views/index.vue similarity index 100% rename from ruoyi-ui/src/views/index.vue rename to yudao-admin-ui/src/views/index.vue diff --git a/ruoyi-ui/src/views/index_old.vue b/yudao-admin-ui/src/views/index_old.vue similarity index 100% rename from ruoyi-ui/src/views/index_old.vue rename to yudao-admin-ui/src/views/index_old.vue diff --git a/ruoyi-ui/src/views/infra/apiAccessLog/index.vue b/yudao-admin-ui/src/views/infra/apiAccessLog/index.vue similarity index 100% rename from ruoyi-ui/src/views/infra/apiAccessLog/index.vue rename to yudao-admin-ui/src/views/infra/apiAccessLog/index.vue diff --git a/ruoyi-ui/src/views/infra/apiErrorLog/index.vue b/yudao-admin-ui/src/views/infra/apiErrorLog/index.vue similarity index 100% rename from ruoyi-ui/src/views/infra/apiErrorLog/index.vue rename to yudao-admin-ui/src/views/infra/apiErrorLog/index.vue diff --git a/ruoyi-ui/src/views/infra/config/index.vue b/yudao-admin-ui/src/views/infra/config/index.vue similarity index 100% rename from ruoyi-ui/src/views/infra/config/index.vue rename to yudao-admin-ui/src/views/infra/config/index.vue diff --git a/ruoyi-ui/src/views/infra/druid/index.vue b/yudao-admin-ui/src/views/infra/druid/index.vue similarity index 100% rename from ruoyi-ui/src/views/infra/druid/index.vue rename to yudao-admin-ui/src/views/infra/druid/index.vue diff --git a/ruoyi-ui/src/views/infra/file/index.vue b/yudao-admin-ui/src/views/infra/file/index.vue similarity index 100% rename from ruoyi-ui/src/views/infra/file/index.vue rename to yudao-admin-ui/src/views/infra/file/index.vue diff --git a/ruoyi-ui/src/views/infra/job/index.vue b/yudao-admin-ui/src/views/infra/job/index.vue similarity index 100% rename from ruoyi-ui/src/views/infra/job/index.vue rename to yudao-admin-ui/src/views/infra/job/index.vue diff --git a/ruoyi-ui/src/views/infra/job/log.vue b/yudao-admin-ui/src/views/infra/job/log.vue similarity index 100% rename from ruoyi-ui/src/views/infra/job/log.vue rename to yudao-admin-ui/src/views/infra/job/log.vue diff --git a/ruoyi-ui/src/views/infra/redis/index.vue b/yudao-admin-ui/src/views/infra/redis/index.vue similarity index 100% rename from ruoyi-ui/src/views/infra/redis/index.vue rename to yudao-admin-ui/src/views/infra/redis/index.vue diff --git a/ruoyi-ui/src/views/infra/server/index.vue b/yudao-admin-ui/src/views/infra/server/index.vue similarity index 100% rename from ruoyi-ui/src/views/infra/server/index.vue rename to yudao-admin-ui/src/views/infra/server/index.vue diff --git a/ruoyi-ui/src/views/infra/skywalking/index.vue b/yudao-admin-ui/src/views/infra/skywalking/index.vue similarity index 100% rename from ruoyi-ui/src/views/infra/skywalking/index.vue rename to yudao-admin-ui/src/views/infra/skywalking/index.vue diff --git a/ruoyi-ui/src/views/infra/skywalking/log.vue b/yudao-admin-ui/src/views/infra/skywalking/log.vue similarity index 100% rename from ruoyi-ui/src/views/infra/skywalking/log.vue rename to yudao-admin-ui/src/views/infra/skywalking/log.vue diff --git a/ruoyi-ui/src/views/login.vue b/yudao-admin-ui/src/views/login.vue similarity index 96% rename from ruoyi-ui/src/views/login.vue rename to yudao-admin-ui/src/views/login.vue index 1fca6413f..40ef6f799 100644 --- a/ruoyi-ui/src/views/login.vue +++ b/yudao-admin-ui/src/views/login.vue @@ -1,204 +1,204 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/views/redirect.vue b/yudao-admin-ui/src/views/redirect.vue similarity index 100% rename from ruoyi-ui/src/views/redirect.vue rename to yudao-admin-ui/src/views/redirect.vue diff --git a/ruoyi-ui/src/views/system/dept/index.vue b/yudao-admin-ui/src/views/system/dept/index.vue similarity index 97% rename from ruoyi-ui/src/views/system/dept/index.vue rename to yudao-admin-ui/src/views/system/dept/index.vue index 0fc5a8733..8202d2f99 100644 --- a/ruoyi-ui/src/views/system/dept/index.vue +++ b/yudao-admin-ui/src/views/system/dept/index.vue @@ -1,283 +1,283 @@ - - - + + + diff --git a/ruoyi-ui/src/views/system/dict/data.vue b/yudao-admin-ui/src/views/system/dict/data.vue similarity index 97% rename from ruoyi-ui/src/views/system/dict/data.vue rename to yudao-admin-ui/src/views/system/dict/data.vue index 13d262303..fa01ebce5 100644 --- a/ruoyi-ui/src/views/system/dict/data.vue +++ b/yudao-admin-ui/src/views/system/dict/data.vue @@ -1,277 +1,277 @@ - - - + + + diff --git a/ruoyi-ui/src/views/system/dict/index.vue b/yudao-admin-ui/src/views/system/dict/index.vue similarity index 97% rename from ruoyi-ui/src/views/system/dict/index.vue rename to yudao-admin-ui/src/views/system/dict/index.vue index a730e61bf..b93131764 100644 --- a/ruoyi-ui/src/views/system/dict/index.vue +++ b/yudao-admin-ui/src/views/system/dict/index.vue @@ -1,263 +1,263 @@ - - - + + + diff --git a/ruoyi-ui/src/views/system/errorCode/index.vue b/yudao-admin-ui/src/views/system/errorCode/index.vue similarity index 100% rename from ruoyi-ui/src/views/system/errorCode/index.vue rename to yudao-admin-ui/src/views/system/errorCode/index.vue diff --git a/ruoyi-ui/src/views/system/loginlog/index.vue b/yudao-admin-ui/src/views/system/loginlog/index.vue similarity index 100% rename from ruoyi-ui/src/views/system/loginlog/index.vue rename to yudao-admin-ui/src/views/system/loginlog/index.vue diff --git a/ruoyi-ui/src/views/system/menu/index.vue b/yudao-admin-ui/src/views/system/menu/index.vue similarity index 97% rename from ruoyi-ui/src/views/system/menu/index.vue rename to yudao-admin-ui/src/views/system/menu/index.vue index 767878e2e..e46c2664f 100644 --- a/ruoyi-ui/src/views/system/menu/index.vue +++ b/yudao-admin-ui/src/views/system/menu/index.vue @@ -1,327 +1,327 @@ - - - + + + diff --git a/ruoyi-ui/src/views/system/notice/index.vue b/yudao-admin-ui/src/views/system/notice/index.vue similarity index 97% rename from ruoyi-ui/src/views/system/notice/index.vue rename to yudao-admin-ui/src/views/system/notice/index.vue index 30f17bcf2..c50da669a 100644 --- a/ruoyi-ui/src/views/system/notice/index.vue +++ b/yudao-admin-ui/src/views/system/notice/index.vue @@ -1,251 +1,251 @@ - - - + + + diff --git a/ruoyi-ui/src/views/system/operatelog/index.vue b/yudao-admin-ui/src/views/system/operatelog/index.vue similarity index 100% rename from ruoyi-ui/src/views/system/operatelog/index.vue rename to yudao-admin-ui/src/views/system/operatelog/index.vue diff --git a/ruoyi-ui/src/views/system/post/index.vue b/yudao-admin-ui/src/views/system/post/index.vue similarity index 97% rename from ruoyi-ui/src/views/system/post/index.vue rename to yudao-admin-ui/src/views/system/post/index.vue index 80cab5d49..96f955ec4 100644 --- a/ruoyi-ui/src/views/system/post/index.vue +++ b/yudao-admin-ui/src/views/system/post/index.vue @@ -1,249 +1,249 @@ - - - + + + diff --git a/ruoyi-ui/src/views/system/role/index.vue b/yudao-admin-ui/src/views/system/role/index.vue similarity index 97% rename from ruoyi-ui/src/views/system/role/index.vue rename to yudao-admin-ui/src/views/system/role/index.vue index 744f5f90d..0ced5d8df 100644 --- a/ruoyi-ui/src/views/system/role/index.vue +++ b/yudao-admin-ui/src/views/system/role/index.vue @@ -1,514 +1,514 @@ - - - + + + diff --git a/ruoyi-ui/src/views/system/session/index.vue b/yudao-admin-ui/src/views/system/session/index.vue similarity index 100% rename from ruoyi-ui/src/views/system/session/index.vue rename to yudao-admin-ui/src/views/system/session/index.vue diff --git a/ruoyi-ui/src/views/system/sms/smsChannel.vue b/yudao-admin-ui/src/views/system/sms/smsChannel.vue similarity index 100% rename from ruoyi-ui/src/views/system/sms/smsChannel.vue rename to yudao-admin-ui/src/views/system/sms/smsChannel.vue diff --git a/ruoyi-ui/src/views/system/sms/smsLog.vue b/yudao-admin-ui/src/views/system/sms/smsLog.vue similarity index 100% rename from ruoyi-ui/src/views/system/sms/smsLog.vue rename to yudao-admin-ui/src/views/system/sms/smsLog.vue diff --git a/ruoyi-ui/src/views/system/sms/smsTemplate.vue b/yudao-admin-ui/src/views/system/sms/smsTemplate.vue similarity index 100% rename from ruoyi-ui/src/views/system/sms/smsTemplate.vue rename to yudao-admin-ui/src/views/system/sms/smsTemplate.vue diff --git a/ruoyi-ui/src/views/system/user/index.vue b/yudao-admin-ui/src/views/system/user/index.vue similarity index 100% rename from ruoyi-ui/src/views/system/user/index.vue rename to yudao-admin-ui/src/views/system/user/index.vue diff --git a/ruoyi-ui/src/views/system/user/profile/index.vue b/yudao-admin-ui/src/views/system/user/profile/index.vue similarity index 97% rename from ruoyi-ui/src/views/system/user/profile/index.vue rename to yudao-admin-ui/src/views/system/user/profile/index.vue index cae5e2e4b..bb4192857 100644 --- a/ruoyi-ui/src/views/system/user/profile/index.vue +++ b/yudao-admin-ui/src/views/system/user/profile/index.vue @@ -1,93 +1,93 @@ - - - + + + diff --git a/ruoyi-ui/src/views/system/user/profile/resetPwd.vue b/yudao-admin-ui/src/views/system/user/profile/resetPwd.vue similarity index 96% rename from ruoyi-ui/src/views/system/user/profile/resetPwd.vue rename to yudao-admin-ui/src/views/system/user/profile/resetPwd.vue index 135971701..ee6524053 100644 --- a/ruoyi-ui/src/views/system/user/profile/resetPwd.vue +++ b/yudao-admin-ui/src/views/system/user/profile/resetPwd.vue @@ -1,72 +1,72 @@ - - - + + + diff --git a/ruoyi-ui/src/views/system/user/profile/userAvatar.vue b/yudao-admin-ui/src/views/system/user/profile/userAvatar.vue similarity index 96% rename from ruoyi-ui/src/views/system/user/profile/userAvatar.vue rename to yudao-admin-ui/src/views/system/user/profile/userAvatar.vue index aca1990d7..edc15e36e 100644 --- a/ruoyi-ui/src/views/system/user/profile/userAvatar.vue +++ b/yudao-admin-ui/src/views/system/user/profile/userAvatar.vue @@ -1,167 +1,167 @@ - - - - \ No newline at end of file diff --git a/ruoyi-ui/src/views/system/user/profile/userInfo.vue b/yudao-admin-ui/src/views/system/user/profile/userInfo.vue similarity index 96% rename from ruoyi-ui/src/views/system/user/profile/userInfo.vue rename to yudao-admin-ui/src/views/system/user/profile/userInfo.vue index 3aea8bcd5..058a1130f 100644 --- a/ruoyi-ui/src/views/system/user/profile/userInfo.vue +++ b/yudao-admin-ui/src/views/system/user/profile/userInfo.vue @@ -1,76 +1,76 @@ - - - + + + diff --git a/ruoyi-ui/src/views/tool/build/CodeTypeDialog.vue b/yudao-admin-ui/src/views/tool/build/CodeTypeDialog.vue similarity index 95% rename from ruoyi-ui/src/views/tool/build/CodeTypeDialog.vue rename to yudao-admin-ui/src/views/tool/build/CodeTypeDialog.vue index 99f9eb2dc..941ec3625 100644 --- a/ruoyi-ui/src/views/tool/build/CodeTypeDialog.vue +++ b/yudao-admin-ui/src/views/tool/build/CodeTypeDialog.vue @@ -1,106 +1,106 @@ - - + + diff --git a/ruoyi-ui/src/views/tool/build/DraggableItem.vue b/yudao-admin-ui/src/views/tool/build/DraggableItem.vue similarity index 96% rename from ruoyi-ui/src/views/tool/build/DraggableItem.vue rename to yudao-admin-ui/src/views/tool/build/DraggableItem.vue index f669ac0e6..e881778f0 100644 --- a/ruoyi-ui/src/views/tool/build/DraggableItem.vue +++ b/yudao-admin-ui/src/views/tool/build/DraggableItem.vue @@ -1,100 +1,100 @@ - + diff --git a/ruoyi-ui/src/views/tool/build/IconsDialog.vue b/yudao-admin-ui/src/views/tool/build/IconsDialog.vue similarity index 95% rename from ruoyi-ui/src/views/tool/build/IconsDialog.vue rename to yudao-admin-ui/src/views/tool/build/IconsDialog.vue index 0d1277835..958be50c5 100644 --- a/ruoyi-ui/src/views/tool/build/IconsDialog.vue +++ b/yudao-admin-ui/src/views/tool/build/IconsDialog.vue @@ -1,123 +1,123 @@ - - - + + + diff --git a/ruoyi-ui/src/views/tool/build/RightPanel.vue b/yudao-admin-ui/src/views/tool/build/RightPanel.vue similarity index 97% rename from ruoyi-ui/src/views/tool/build/RightPanel.vue rename to yudao-admin-ui/src/views/tool/build/RightPanel.vue index 1acdc5794..abaec431e 100644 --- a/ruoyi-ui/src/views/tool/build/RightPanel.vue +++ b/yudao-admin-ui/src/views/tool/build/RightPanel.vue @@ -1,944 +1,944 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/views/tool/build/TreeNodeDialog.vue b/yudao-admin-ui/src/views/tool/build/TreeNodeDialog.vue similarity index 95% rename from ruoyi-ui/src/views/tool/build/TreeNodeDialog.vue rename to yudao-admin-ui/src/views/tool/build/TreeNodeDialog.vue index 477c010b9..c225c4cc8 100644 --- a/ruoyi-ui/src/views/tool/build/TreeNodeDialog.vue +++ b/yudao-admin-ui/src/views/tool/build/TreeNodeDialog.vue @@ -1,149 +1,149 @@ - - + + diff --git a/ruoyi-ui/src/views/tool/build/index.vue b/yudao-admin-ui/src/views/tool/build/index.vue similarity index 96% rename from ruoyi-ui/src/views/tool/build/index.vue rename to yudao-admin-ui/src/views/tool/build/index.vue index 4548012de..92291e981 100644 --- a/ruoyi-ui/src/views/tool/build/index.vue +++ b/yudao-admin-ui/src/views/tool/build/index.vue @@ -1,789 +1,789 @@ - - - - - + + + + + diff --git a/ruoyi-ui/src/views/tool/codegen/basicInfoForm.vue b/yudao-admin-ui/src/views/tool/codegen/basicInfoForm.vue similarity index 100% rename from ruoyi-ui/src/views/tool/codegen/basicInfoForm.vue rename to yudao-admin-ui/src/views/tool/codegen/basicInfoForm.vue diff --git a/ruoyi-ui/src/views/tool/codegen/editTable.vue b/yudao-admin-ui/src/views/tool/codegen/editTable.vue similarity index 100% rename from ruoyi-ui/src/views/tool/codegen/editTable.vue rename to yudao-admin-ui/src/views/tool/codegen/editTable.vue diff --git a/ruoyi-ui/src/views/tool/codegen/genInfoForm.vue b/yudao-admin-ui/src/views/tool/codegen/genInfoForm.vue similarity index 100% rename from ruoyi-ui/src/views/tool/codegen/genInfoForm.vue rename to yudao-admin-ui/src/views/tool/codegen/genInfoForm.vue diff --git a/ruoyi-ui/src/views/tool/codegen/importTable.vue b/yudao-admin-ui/src/views/tool/codegen/importTable.vue similarity index 100% rename from ruoyi-ui/src/views/tool/codegen/importTable.vue rename to yudao-admin-ui/src/views/tool/codegen/importTable.vue diff --git a/ruoyi-ui/src/views/tool/codegen/index.vue b/yudao-admin-ui/src/views/tool/codegen/index.vue similarity index 100% rename from ruoyi-ui/src/views/tool/codegen/index.vue rename to yudao-admin-ui/src/views/tool/codegen/index.vue diff --git a/ruoyi-ui/src/views/tool/dbDoc/index.vue b/yudao-admin-ui/src/views/tool/dbDoc/index.vue similarity index 100% rename from ruoyi-ui/src/views/tool/dbDoc/index.vue rename to yudao-admin-ui/src/views/tool/dbDoc/index.vue diff --git a/ruoyi-ui/src/views/tool/swagger/index.vue b/yudao-admin-ui/src/views/tool/swagger/index.vue similarity index 96% rename from ruoyi-ui/src/views/tool/swagger/index.vue rename to yudao-admin-ui/src/views/tool/swagger/index.vue index 13daa0911..8504daf31 100644 --- a/ruoyi-ui/src/views/tool/swagger/index.vue +++ b/yudao-admin-ui/src/views/tool/swagger/index.vue @@ -1,26 +1,26 @@ -