diff --git a/.gitignore b/.gitignore index a2a3040a..5b4c80c2 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,15 @@ build/ ### VS Code ### .vscode/ + +/admin-api/java-api/target/ + + +/admin-web/typescript-ant-design-vue/node_modules/ + + + + + + + diff --git a/README.md b/README.md index be05793a..e541689c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ -### SmartAdmin 2.0 (即 vue3 的 js版本和ts版本 )正在火热开发中,欢迎持续关注 ! #### 简介 SmartAdmin由河南·洛阳 [1024创新实验室](https://www.1024lab.net/)团队研发的一套互联网企业级的通用型中后台解决方案!使用最前沿的前后台技术栈SpringBoot和Vue,前后端分离,**我们开源一套漂亮的代码和一套整洁的代码规范**,让大家在这浮躁的代码世界里感受到一股把代码写好的清流!同时又让开发者节省大量的时间,减少加班,快乐工作,热爱生活。SmartAdmin 让你从认识到忘不了,绝对是你最想要的! diff --git a/smart-admin-web/.eslintignore b/admin-api/go-api/readme.md similarity index 100% rename from smart-admin-web/.eslintignore rename to admin-api/go-api/readme.md diff --git a/smart-admin-web/src/filters/index.js b/admin-api/java-api/README.md similarity index 100% rename from smart-admin-web/src/filters/index.js rename to admin-api/java-api/README.md diff --git a/admin-api/java-api/pom.xml b/admin-api/java-api/pom.xml new file mode 100644 index 00000000..a49a58fb --- /dev/null +++ b/admin-api/java-api/pom.xml @@ -0,0 +1,401 @@ + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.4.1 + + + net.1024lab + smart-admin + 2.0.0 + jar + + smart-admin + smart-admin project + + + 1.8 + 4.3.0 + 6.4.3 + 3.4.1 + 3.8.6 + 2.7.0 + 1.2.62 + 1.2.6 + 0.9.1 + 4.2.0 + 4.2.2 + 2.3.2 + 20030203.000550 + 30.1.1-jre + + + + + + org.springframework.boot + spring-boot-starter-aop + + + org.springframework.boot + spring-boot-starter-logging + + + + + + org.springframework.boot + spring-boot-starter-data-redis + + + org.springframework.boot + spring-boot-starter + + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-logging + + + + + + + org.springframework.boot + spring-boot-starter-security + + + + org.springframework.boot + spring-boot-starter-log4j2 + + + + org.springframework.boot + spring-boot-starter-validation + + + + org.springframework.boot + spring-boot-starter-test + test + + + + mysql + mysql-connector-java + + + + com.github.ben-manes.caffeine + caffeine + + + error_prone_annotations + com.google.errorprone + + + + + + org.projectlombok + lombok + + + + org.apache.commons + commons-pool2 + + + + org.springframework + spring-mock + 2.0.8 + + + + com.baomidou + mybatis-plus-boot-starter + ${mybatis-plus.version} + + + org.springframework.boot + spring-boot-starter-logging + + + + + + p6spy + p6spy + ${p6spy.version} + + + + io.springfox + springfox-swagger2 + ${swagger.version} + + + guava + com.google.guava + + + + + + com.squareup.okhttp3 + okhttp + + + + io.springfox + springfox-swagger-ui + ${swagger.version} + + + + com.alibaba + fastjson + ${fast-json.version} + + + + com.alibaba + druid + ${druid.version} + + + + io.jsonwebtoken + jjwt + ${jjwt.version} + + + + com.google.guava + guava + ${google-guava.version} + + + + com.github.penggle + kaptcha + ${kaptcha.version} + + + + commons-io + commons-io + ${commons-io.version} + + + + + cn.afterturn + easypoi-spring-boot-starter + ${easypoi.version} + + + + cn.afterturn + easypoi-base + ${easypoi.version} + + + javassist + org.javassist + + + guava + com.google.guava + + + xmlbeans + org.apache.xmlbeans + + + + + + cn.afterturn + easypoi-web + ${easypoi.version} + + + javassist + org.javassist + + + + + cn.afterturn + easypoi-annotation + ${easypoi.version} + + + + + com.googlecode.concurrentlinkedhashmap + concurrentlinkedhashmap-lru + 1.4.2 + + + + org.reflections + reflections + 0.9.11 + + + guava + com.google.guava + + + + + + + org.apache.commons + commons-collections4 + 4.4 + + + + com.amazonaws + aws-java-sdk-s3 + 1.11.842 + + + commons-logging + commons-logging + + + + + + + xerces + xercesImpl + 2.12.0 + + + org.apache.poi + poi-scratchpad + 4.1.1 + + + + + org.apache.poi + ooxml-schemas + 1.3 + + + + + velocity + org.apache.velocity + 1.7 + + + + org.apache.velocity + velocity-engine-core + 2.0 + + + + + + + ${profiles.active}-${project.name} + + + false + src/main/resources + + dev/* + sit/* + pre/* + prod/* + + + + + src/main/resources/${profiles.active} + true + + *.properties + + + + + src/main/resources/${profiles.active} + false + + *.* + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.2 + + 1.8 + 1.8 + UTF-8 + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + true + + + + + + + + dev + + dev + + + true + + + + sit + + sit + + + + pre + + pre + + + + prod + + prod + + + + + \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/SmartAdminApplication.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/SmartAdminApplication.java similarity index 62% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/SmartAdminApplication.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/SmartAdminApplication.java index b22d0670..ade0246a 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/SmartAdminApplication.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/SmartAdminApplication.java @@ -1,5 +1,7 @@ -package net.lab1024.smartadmin; +package net.lab1024.smartadmin.service; +import org.apache.ibatis.annotations.Mapper; +import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cache.annotation.EnableCaching; @@ -9,21 +11,18 @@ import org.springframework.scheduling.annotation.EnableScheduling; /** * [ admin 项目启动类 ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 + * @author 罗伊 * */ -@SpringBootApplication(scanBasePackages = {"net.lab1024.smartadmin", "cn.afterturn.easypoi"}) +@SpringBootApplication @EnableCaching @EnableScheduling @EnableAspectJAutoProxy(proxyTargetClass = true, exposeProxy = true) +@MapperScan(value = "net.lab1024.smartadmin.service.*",basePackageClasses = Mapper.class) public class SmartAdminApplication { public static void main(String[] args) { SpringApplication.run(SmartAdminApplication.class, args); + System.out.println("####################### smart-admin-service start #######################"); } } diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/annotation/SmartReload.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/anno/NoNeedLogin.java similarity index 60% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/annotation/SmartReload.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/anno/NoNeedLogin.java index eac54afd..ec62643e 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/annotation/SmartReload.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/anno/NoNeedLogin.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.common.reload.annotation; +package net.lab1024.smartadmin.service.common.anno; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -6,13 +6,12 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** - * 定义 SmartReload 注解 + * [ ] * - * @author zhuoda + * @author 罗伊 + * @date 2020/8/21 14:55 */ -@Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) -public @interface SmartReload { - - String value(); +@Target(ElementType.METHOD) +public @interface NoNeedLogin { } diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/anno/NoRepeatSubmit.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/anno/NoRepeatSubmit.java new file mode 100644 index 00000000..7c0916d2 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/anno/NoRepeatSubmit.java @@ -0,0 +1,29 @@ +package net.lab1024.smartadmin.service.common.anno; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * 标记 需要防止重复提交 的注解 + * + * @author listen + * @date 2020年11月25日 10:56:58 + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.METHOD) +public @interface NoRepeatSubmit { + + /** + * 重复提交间隔时间/毫秒 + * + * @return + */ + int value() default 1200; + + /** + * 最长间隔30s + */ + int MAX_INTERVAL = 30000; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/anno/NoValidPrivilege.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/anno/NoValidPrivilege.java new file mode 100644 index 00000000..15e8ade4 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/anno/NoValidPrivilege.java @@ -0,0 +1,14 @@ +package net.lab1024.smartadmin.service.common.anno; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/8/21 15:02 + */ +@Retention(RetentionPolicy.RUNTIME) +public @interface NoValidPrivilege { +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/DepartmentResponseCodeConst.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/DepartmentResponseCodeConst.java similarity index 90% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/DepartmentResponseCodeConst.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/DepartmentResponseCodeConst.java index a7a219e0..e7ce0cb7 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/DepartmentResponseCodeConst.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/DepartmentResponseCodeConst.java @@ -1,6 +1,4 @@ -package net.lab1024.smartadmin.module.system.department; - -import net.lab1024.smartadmin.common.constant.ResponseCodeConst; +package net.lab1024.smartadmin.service.common.codeconst; /** * 部门返回信息常量类 diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/constant/EmployeeResponseCodeConst.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/EmployeeResponseCodeConst.java similarity index 76% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/constant/EmployeeResponseCodeConst.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/EmployeeResponseCodeConst.java index 379b8be7..19648743 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/constant/EmployeeResponseCodeConst.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/EmployeeResponseCodeConst.java @@ -1,12 +1,10 @@ -package net.lab1024.smartadmin.module.system.employee.constant; - -import net.lab1024.smartadmin.common.constant.ResponseCodeConst; +package net.lab1024.smartadmin.service.common.codeconst; /** * 员工常量类 * 3001-3999 * - * @author lidoudou + * @author 开云 * @date 2017年12月19日下午19:04:52 */ public class EmployeeResponseCodeConst extends ResponseCodeConst { @@ -34,16 +32,18 @@ public class EmployeeResponseCodeConst extends ResponseCodeConst { /** * 您的账号已被禁用,不得登录系统 */ - public static final EmployeeResponseCodeConst IS_DISABLED = new EmployeeResponseCodeConst(3005, "您的账号已被禁用,不得登录系统!"); + public static final EmployeeResponseCodeConst IS_DISABLED = new EmployeeResponseCodeConst(3005, "您的账号已被禁用"); /** * 登录名已存在 */ public static final EmployeeResponseCodeConst LOGIN_NAME_EXISTS = new EmployeeResponseCodeConst(3006, "登录名已存在!"); + /** - * 密码输入有误,请重新输入 10115 + * 密码输入有误,请重新输入 */ - public static final EmployeeResponseCodeConst PASSWORD_ERROR = new EmployeeResponseCodeConst(3007, "密码输入有误,请重新输入"); + public static final EmployeeResponseCodeConst PASSWORD_ERROR = new EmployeeResponseCodeConst(3007, "密码错误"); + /** * 手机号已存在 */ @@ -53,7 +53,12 @@ public class EmployeeResponseCodeConst extends ResponseCodeConst { public static final EmployeeResponseCodeConst BIRTHDAY_ERROR = new EmployeeResponseCodeConst(3010, "生日格式不正确"); - public static final EmployeeResponseCodeConst VERIFICATION_CODE_INVALID = new EmployeeResponseCodeConst(3011, "验证码无效"); + public static final EmployeeResponseCodeConst VERIFICATION_CODE_INVALID = new EmployeeResponseCodeConst(3011, "请输入正确的验证码"); + + /** + * 用户名或密码错误 多次错误用于前端判断展示验证码 + */ + public static final EmployeeResponseCodeConst LOGIN_FAILED_REPEATEDLY = new EmployeeResponseCodeConst(3012, "用户名或密码错误!"); public EmployeeResponseCodeConst(int code, String msg) { super(code, msg); diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/FileResponseCodeConst.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/FileResponseCodeConst.java new file mode 100644 index 00000000..bea7e99f --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/FileResponseCodeConst.java @@ -0,0 +1,47 @@ +package net.lab1024.smartadmin.service.common.codeconst; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/8/25 11:57 + */ +public class FileResponseCodeConst extends ResponseCodeConst { + + /** + * 4001 -4999 + */ + public static final FileResponseCodeConst FILE_EMPTY = new FileResponseCodeConst(4001, "上传文件不能为空"); + + public static final FileResponseCodeConst FILE_SIZE_ERROR = new FileResponseCodeConst(4002, "上传文件超过%s,请重新上传!"); + + public static final FileResponseCodeConst UNKNOWN_FILE_TYPE = new FileResponseCodeConst(4003, "未知的文件类型!"); + + public static final FileResponseCodeConst LOCAL_UPDATE_PREFIX_ERROR = new FileResponseCodeConst(4004, "文件本地上传缺少URL前缀配置[local_upload_url_prefix]"); + + public static final FileResponseCodeConst UPLOAD_ERROR = new FileResponseCodeConst(4005, "上传失败"); + + public static final FileResponseCodeConst URL_ERROR = new FileResponseCodeConst(4006, "获取URL失败"); + + public static final FileResponseCodeConst FILE_MODULE_ERROR = new FileResponseCodeConst(4007, "文件目录类型错误"); + + public static final FileResponseCodeConst FILE_NOT_EXIST = new FileResponseCodeConst(4008, "文件不存在"); + + public static final FileResponseCodeConst DOWNLOAD_ERROR = new FileResponseCodeConst(4009, "文件下载失败"); + + public static final FileResponseCodeConst VOD_SERVICE_ERROR = new FileResponseCodeConst(4010, "VOD服务错误:"); + + public static final FileResponseCodeConst VOD_FILE_ERROR = new FileResponseCodeConst(4011, "请上传正确的音/视频格式"); + + public static final FileResponseCodeConst VOD_FILE_NOT_EXIST = new FileResponseCodeConst(4012, "视频文件不存在"); + + public static final FileResponseCodeConst FILE_NAME_ERROR = new FileResponseCodeConst(4013, "文件名称必须1-100个字符"); + + public static final FileResponseCodeConst VOD_TOKEN_ERROR = new FileResponseCodeConst(4014, "视频文件TOKEN失效"); + + public static final FileResponseCodeConst VOD_CIPHER_TEXT_ERROR = new FileResponseCodeConst(4015, "视频文件CIPHER_TEXT无效"); + + public FileResponseCodeConst(int code, String msg) { + super(code, msg); + } +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/LoginResponseCodeConst.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/LoginResponseCodeConst.java similarity index 79% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/LoginResponseCodeConst.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/LoginResponseCodeConst.java index 0cfb8d22..a24b44e9 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/LoginResponseCodeConst.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/LoginResponseCodeConst.java @@ -1,12 +1,10 @@ -package net.lab1024.smartadmin.module.system.login; - -import net.lab1024.smartadmin.common.constant.ResponseCodeConst; +package net.lab1024.smartadmin.service.common.codeconst; /** * 员工常量类 * 1001-1999 * - * @author lidoudou + * @author 开云 * @date 2017年12月19日下午19:04:52 */ public class LoginResponseCodeConst extends ResponseCodeConst { diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/PositionResponseCodeConst.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/PositionResponseCodeConst.java similarity index 70% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/PositionResponseCodeConst.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/PositionResponseCodeConst.java index 43528034..e9011c48 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/PositionResponseCodeConst.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/PositionResponseCodeConst.java @@ -1,9 +1,7 @@ -package net.lab1024.smartadmin.module.system.position; - -import net.lab1024.smartadmin.common.constant.ResponseCodeConst; +package net.lab1024.smartadmin.service.common.codeconst; /** - * @author zzr + * @author */ public class PositionResponseCodeConst extends ResponseCodeConst { diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/constant/PrivilegeResponseCodeConst.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/PrivilegeResponseCodeConst.java similarity index 74% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/constant/PrivilegeResponseCodeConst.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/PrivilegeResponseCodeConst.java index 3efbd9b2..6a8f0c3d 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/constant/PrivilegeResponseCodeConst.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/PrivilegeResponseCodeConst.java @@ -1,16 +1,8 @@ -package net.lab1024.smartadmin.module.system.privilege.constant; - -import net.lab1024.smartadmin.common.constant.ResponseCodeConst; +package net.lab1024.smartadmin.service.common.codeconst; /** - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 + * @author 罗伊 */ public class PrivilegeResponseCodeConst extends ResponseCodeConst { diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/ResponseCodeConst.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/ResponseCodeConst.java new file mode 100644 index 00000000..dae253a7 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/ResponseCodeConst.java @@ -0,0 +1,111 @@ +package net.lab1024.smartadmin.service.common.codeconst; + +import lombok.extern.slf4j.Slf4j; + +/** + * 1 表示成功 + * 10 - 100 表示 系统异常,即java报错了 + * 100 以上, 业务 + *

+ * 根据实际业务,设置范围值 + * 正常100就够了 + * + * @author Administrator + */ +@Slf4j +public class ResponseCodeConst { + + public static final ResponseCodeConst SUCCESS = new ResponseCodeConst(1, "操作成功!", true); + + public static final ResponseCodeConst SYSTEM_ERROR = new ResponseCodeConst(11, "系统繁忙,请稍后重试"); + + public static final ResponseCodeConst ERROR_PARAM = new ResponseCodeConst(101, "参数异常"); + + public static final ResponseCodeConst ERROR_PARAM_ANY = new ResponseCodeConst(102, "%s参数异常!"); + + public static final ResponseCodeConst DEVELOPMENT = new ResponseCodeConst(112, "此功能正在开发中"); + + public static final ResponseCodeConst NOT_EXISTS = new ResponseCodeConst(113, "数据不存在"); + + public static final ResponseCodeConst REQUEST_METHOD_ERROR = new ResponseCodeConst(114, "请求方式错误"); + + public static final ResponseCodeConst JSON_FORMAT_ERROR = new ResponseCodeConst(115, "请求前端参数格式错误"); + + public static final ResponseCodeConst PERMISSION_DENIED = new ResponseCodeConst(116, "您没有权限修改数据"); + + public static final ResponseCodeConst ALREADY_EXIST = new ResponseCodeConst(117, "数据已存在"); + + public static final ResponseCodeConst STATUS_ERROR = new ResponseCodeConst(118, "数据状态异常"); + + public static final ResponseCodeConst AREA_ERROR = new ResponseCodeConst(119, "地区数据错误"); + + public static final ResponseCodeConst REQUEST_ERROR = new ResponseCodeConst(120, "请求异常"); + + public static final ResponseCodeConst TOKEN_ERROR = new ResponseCodeConst(121, "登录失效,请重新登录"); + + public static final ResponseCodeConst BUSINESS_HANDING = new ResponseCodeConst(122, "业务正在繁忙处理中,请稍后再试"); + + public static final ResponseCodeConst NOT_SUPPORT = new ResponseCodeConst(123, "暂不支持"); + + public static final ResponseCodeConst REPEAT_SUBMIT = new ResponseCodeConst(125, "太...太快了,请您稍后重试~"); + + protected int code; + + protected String msg; + + protected boolean success; + + public ResponseCodeConst() { + } + + protected ResponseCodeConst(int code, String msg) { + super(); + this.code = code; + this.msg = msg; + ResponseCodeContainer.put(this); + } + + protected ResponseCodeConst(int code, String msg, boolean success) { + super(); + this.code = code; + this.msg = msg; + this.success = success; + ResponseCodeContainer.put(this); + } + + protected ResponseCodeConst(int code) { + super(); + this.code = code; + ResponseCodeContainer.put(this); + } + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMsg() { + return msg; + } + + public void setMsg(String msg) { + this.msg = msg; + } + + public boolean issucc() { + return success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public static void init() { + log.info("-------------- ResponseCodeConst init -------------"); + } + + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/ResponseCodeContainer.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/ResponseCodeContainer.java new file mode 100644 index 00000000..d5ff7771 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/ResponseCodeContainer.java @@ -0,0 +1,73 @@ +package net.lab1024.smartadmin.service.common.codeconst; + +import lombok.extern.slf4j.Slf4j; + +import java.lang.reflect.Field; +import java.util.HashMap; +import java.util.Map; + +/** + * [ ] + * + * @author 罗伊 + * @date 2021/1/8 11:28 + */ +@Slf4j +public class ResponseCodeContainer { + + private static final Map RESPONSE_CODE_MAP = new HashMap<>(); + + private static final Map, int[]> RESPONSE_CODE_RANGE_MAP = new HashMap<>(); + + /** + * id的范围:[start, end]左闭右闭 + * + * @param clazz + * @param start + * @param end + */ + public static void register(Class clazz, int start, int end) { + if (start > end) { + throw new IllegalArgumentException(" start > end!"); + } + + if (RESPONSE_CODE_RANGE_MAP.containsKey(clazz)) { + throw new IllegalArgumentException(String.format(" Class:%s already exist!", clazz.getSimpleName())); + } + RESPONSE_CODE_RANGE_MAP.forEach((k, v) -> { + if ((start >= v[0] && start <= v[1]) || (end >= v[0] && end <= v[1])) { + throw new IllegalArgumentException(String.format(" Class:%s 's id range[%d,%d] has " + "intersection with " + "class:%s", clazz.getSimpleName(), start, end, + k.getSimpleName())); + } + }); + + RESPONSE_CODE_RANGE_MAP.put(clazz, new int[]{start, end}); + + // 提前初始化static变量,进行范围检测 + Field[] fields = clazz.getFields(); + if (fields.length != 0) { + try { + fields[0].get(clazz); + } catch (IllegalArgumentException | IllegalAccessException e) { + log.error("", e); + } + } + } + + public static void put(ResponseCodeConst codeConst) { + int[] idRange = RESPONSE_CODE_RANGE_MAP.get(codeConst.getClass()); + if (idRange == null) { + throw new IllegalArgumentException(String.format(" Class:%s has not been registered!", codeConst.getClass().getSimpleName())); + } + int code = codeConst.code; + if (code < idRange[0] || code > idRange[1]) { + throw new IllegalArgumentException(String.format(" Id(%d) out of range[%d,%d], " + "class:%s", code, idRange[0], idRange[1], codeConst.getClass().getSimpleName())); + } + if (RESPONSE_CODE_MAP.keySet().contains(code)) { + log.error(String.format(" Id(%d) out of range[%d,%d], " + "class:%s code is repeat!", code, idRange[0], idRange[1], codeConst.getClass().getSimpleName())); + System.exit(0); + } + RESPONSE_CODE_MAP.put(code, codeConst); + } + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/ResponseCodeRegister.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/ResponseCodeRegister.java new file mode 100644 index 00000000..decb66d1 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/ResponseCodeRegister.java @@ -0,0 +1,30 @@ +package net.lab1024.smartadmin.service.common.codeconst; + +import lombok.extern.slf4j.Slf4j; + +/** + * [ ] + * + * @author 罗伊 + * @date 2021/1/8 15:59 + */ +@Slf4j +public class ResponseCodeRegister { + + // 范围声明 + static { + // 系统功能,从0开始,step=1000 + ResponseCodeContainer.register(ResponseCodeConst.class, 0, 1000); + ResponseCodeContainer.register(LoginResponseCodeConst.class, 1001, 1999); + ResponseCodeContainer.register(DepartmentResponseCodeConst.class, 2001, 2999); + ResponseCodeContainer.register(EmployeeResponseCodeConst.class, 3001, 3999); + ResponseCodeContainer.register(FileResponseCodeConst.class, 4001, 5000); + ResponseCodeContainer.register(RoleResponseCodeConst.class, 6001, 6999); + ResponseCodeContainer.register(PrivilegeResponseCodeConst.class, 7001, 7999); + ResponseCodeContainer.register(PositionResponseCodeConst.class, 13000, 13999); + } + + public static void init() { + log.info("-------------- ResponseCodeConst init -------------"); + } +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/RoleResponseCodeConst.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/RoleResponseCodeConst.java similarity index 78% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/RoleResponseCodeConst.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/RoleResponseCodeConst.java index c1818465..e9381db1 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/RoleResponseCodeConst.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/codeconst/RoleResponseCodeConst.java @@ -1,9 +1,7 @@ -package net.lab1024.smartadmin.module.system.role.basic; -import net.lab1024.smartadmin.common.constant.ResponseCodeConst; +package net.lab1024.smartadmin.service.common.codeconst; /** - * - * @author yandanyang + * @author 罗伊 * 角色业务状态码 6001 - 6999 */ public class RoleResponseCodeConst extends ResponseCodeConst { diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/domain/BaseEnum.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/constant/BaseEnum.java similarity index 87% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/domain/BaseEnum.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/constant/BaseEnum.java index 61ef2c66..2d8c41c3 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/domain/BaseEnum.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/constant/BaseEnum.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.common.domain; +package net.lab1024.smartadmin.service.common.constant; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONAware; @@ -10,6 +10,8 @@ import java.util.LinkedHashMap; import java.util.Objects; /** + * 枚举类接口 + * * @author listen * @date 2018-07-17 下午 3:52 */ @@ -18,7 +20,7 @@ public interface BaseEnum { /** * 获取枚举类的值 * - * @return Object + * @return */ Object getValue(); @@ -67,24 +69,21 @@ public interface BaseEnum { String enumJson = JSON.toJSONString(json, true); enumJson = enumJson.replaceAll("\"", ""); - enumJson= enumJson.replaceAll("\t","  "); - enumJson = enumJson.replaceAll("\n","
"); + enumJson = enumJson.replaceAll("\t", "  "); + enumJson = enumJson.replaceAll("\n", "
"); String prefix = "
export const
" + CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, clazz.getSimpleName() + " =
"); return prefix + "" + enumJson + "
"; } - @Data class DeletedQuotationAware implements JSONAware { private String value; public DeletedQuotationAware(Object value) { - if(value == null){ - this.value = ""; - }else if (value instanceof String) { + if (value instanceof String) { this.value = "'" + value + "'"; - }else { + } else { this.value = value.toString(); } } diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/constant/CacheModuleBaseConst.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/constant/CacheModuleBaseConst.java new file mode 100644 index 00000000..a4059513 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/constant/CacheModuleBaseConst.java @@ -0,0 +1,63 @@ +package net.lab1024.smartadmin.service.common.constant; + +/** + * @author 罗伊 + * @date 2021-01-31 0:00 + */ +public class CacheModuleBaseConst { + + public static class Employee { + /** + * 某个部门下的员工缓存 + */ + public static final String DEPARTMENT_EMPLOYEE_CACHE = "department_employee_cache"; + + /** + * 单个员工的缓存 + */ + public static final String SINGLE_EMPLOYEE_CACHE = "single_employee_cache"; + + /** + * 单个员工角色 + */ + public static final String SINGLE_EMPLOYEE_ROLE_CACHE = "single_employee_role_cache"; + } + + public static class Department { + + /** + * 部门树 + */ + public static final String DEPARTMENT_CACHE = "department_cache"; + + /** + * 部门树 + */ + public static final String DEPARTMENT_TREE_CACHE = "department_tree_cache"; + + /** + * 某个部门以及下级的id列表 + */ + public static final String DEPARTMENT_TREE_ID_CACHE = "department_tree_id_cache"; + + } + + public static class Category { + + /** + * 类目 + */ + public static final String CATEGORY = "category_cache"; + + /** + * 类目子级 + */ + public static final String CATEGORY_SUB = "category_sub_cache"; + + /** + * 类目层级树 缓存 + */ + public static final String CATEGORY_TREE = "category_tree_cache"; + + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/constant/CommonConst.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/constant/CommonConst.java new file mode 100644 index 00000000..3c496370 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/constant/CommonConst.java @@ -0,0 +1,150 @@ +package net.lab1024.smartadmin.service.common.constant; + +import com.google.common.collect.ImmutableSet; +import org.springframework.util.CollectionUtils; + +import java.util.*; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/9/14 15:48 + */ +public class CommonConst { + + /** + * 全局通用分隔符 + */ + public static final String SEPARATOR = ","; + + /** + * 全局通用分隔符 逗号 + */ + public static final Character SEPARATOR_CHAR = ','; + + /** + * 全局通用分隔符 斜杠 + */ + public static final String SEPARATOR_SLASH = "/"; + + /** + * 全局通用分隔符 下划线 + */ + public static final String UNDERLINE = "_"; + + /** + * 空字符串 + */ + public static final String EMPTY_STR = ""; + + /** + * 空 MaP + * 注意:放入元素会抛异常 + */ + public static final Map EMPTY_MAP = Collections.unmodifiableMap(new HashMap<>(0)); + + /** + * 空 list + * 注意:放入元素会抛异常 + */ + public static final List EMPTY_LIST = Collections.unmodifiableList(new ArrayList<>(0)); + + /** + * 空字符串 + */ + public static final long DEFAULT_PARENT_ID = 0L; + + /** + * 空字符串 + */ + public static final int ZERO = 0; + + + public static final class Token { + + public static final String DEFAULT_TOKEN = "default-token-"; + + public static final String INNER_TOKEN_NAME = "inner-token"; + + public static final String OUTER_TOKEN_NAME = "x-access-token"; + + } + + public static final class FileFolderConst { + + /** + * 公用读取文件夹 public + */ + public static final String FOLDER_PUBLIC = "pu"; + + /** + * 私有读取文件夹 private + */ + public static final String FOLDER_PRIVATE = "pr"; + + /** + * 文件夹格式 + */ + public static final String FOLDER_FORMAT = "folder"; + + } + + public static final class System { + /** + * oss url redis 过期时间 + */ + public static final int FILE_URL_EXPIRE_SECOND = 3600; + + public static final int FILE_VO_EXPIRE_SECOND = 86400; + + } + + /** + * 长度类常量 + */ + public static final class NumberLimit { + /** + * 文件名称长度 + */ + public static final int FILE_NAME = 100; + + } + + public static final class ApiUrl { + /** + * 基础 api 前缀 + */ + public static final String API_PREFIX_SUPPORT = "/support"; + + /** + * 后管 api 前缀 + */ + public static final String API_PREFIX_ADMIN = "/admin"; + + } + + public static final class Password { + + public static final String DEFAULT = "123456"; + + public static final String SALT_FORMAT = "smart_%s_admin"; + } + + public static final class CommonCollection { + + public static final Set IGNORE_URL = ImmutableSet.of("/swagger", "Excel", "/h5/api"); + + public static Boolean contain(Set ignores, String uri) { + if (CollectionUtils.isEmpty(ignores)) { + return false; + } + for (String ignoreUrl : ignores) { + if (uri.startsWith(ignoreUrl)) { + return true; + } + } + return false; + } + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/constant/GenderEnum.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/constant/GenderEnum.java new file mode 100644 index 00000000..439eb842 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/constant/GenderEnum.java @@ -0,0 +1,52 @@ +package net.lab1024.smartadmin.service.common.constant; + +/** + * 性别枚举类 + * + * @author listen + * @date 2019/09/24 16:50 + */ +public enum GenderEnum implements BaseEnum { + + /** + * 0 未知 + */ + UNKNOWN(0, "未知"), + + /** + * 男 1 奇数为阳 + */ + MAN(1, "男"), + + /** + * 女 2 偶数为阴 + */ + WOMAN(2, "女"); + + private final Integer gender; + + private final String desc; + + GenderEnum(Integer gender, String desc) { + this.gender = gender; + this.desc = desc; + } + /** + * 获取枚举类的值 + * + * @return Integer + */ + @Override + public Integer getValue() { + return gender; + } + /** + * 获取枚举类的说明 + * + * @return String + */ + @Override + public String getDesc() { + return desc; + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/constant/RedisKeyConst.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/constant/RedisKeyConst.java new file mode 100644 index 00000000..5a73ec8f --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/constant/RedisKeyConst.java @@ -0,0 +1,27 @@ +package net.lab1024.smartadmin.service.common.constant; + +/** + * redis key 常量类 + * + * @author listen + * @date 2019/09/23 20:48 + */ +public class RedisKeyConst { + + public class Base { + + private static final String PROJECT = "base:"; + + public static final String FILE_URL = PROJECT + "file:"; + + public static final String FILE_VO = PROJECT + "fileVO:"; + + public static final String LOCK = PROJECT + "lock:"; + + public static final String ID_GENERATOR = LOCK + "id:"; + + public static final String CAPTCHA = PROJECT + "captcha:"; + + } + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/constant/SwaggerTagConst.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/constant/SwaggerTagConst.java new file mode 100644 index 00000000..8fe20ed2 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/constant/SwaggerTagConst.java @@ -0,0 +1,55 @@ +package net.lab1024.smartadmin.service.common.constant; + +/** + * [ ] + * + * @author 罗伊 + * @date 2021/1/9 11:45 + */ +public class SwaggerTagConst { + + public static class Support { + + public static final String FILE = "基础-文件服务"; + + public static final String CACHE = "基础-缓存"; + + public static final String SYSTEM_CONFIG = "基础-系统参数"; + + public static final String ID_GENERATOR = "基础-ID生成器"; + + public static final String SMART_RELOAD = "基础-Reload"; + + public static final String TASK_SCHEDULER = "基础-任务调度"; + + public static final String USER_OPERATE_LOG = "基础-用户操作日志"; + + public static final String HEART_BEAT = "基础-心跳日志"; + + public static final String CAPTCHA = "基础-图形验证码"; + + } + + public static class Admin { + + public static final String MANAGER_EMPLOYEE = "管理端-员工"; + + public static final String MANAGER_EMPLOYEE_LOGIN = "管理端-员工登录"; + + public static final String MANAGER_DEPARTMENT = "管理端-部门"; + + public static final String MANAGER_ROLE = "管理端-角色"; + + public static final String MANAGER_NOTICE = "管理端-系统通知"; + + public static final String MANAGER_MENU = "管理端-菜单"; + + public static final String MANAGER_ROLE_MENU = "管理端-角色-菜单"; + + public static final String MANAGER_DATA_TRACER = "管理端-数据变动跟踪"; + + public static final String MANAGER_CATEGORY = "管理端-分类"; + + public static final String MANAGER_GOODS = "管理端-商品业务"; + } +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/constant/SystemEnvironmentEnum.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/constant/SystemEnvironmentEnum.java similarity index 80% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/constant/SystemEnvironmentEnum.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/constant/SystemEnvironmentEnum.java index e8d0fd75..7e994fec 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/constant/SystemEnvironmentEnum.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/constant/SystemEnvironmentEnum.java @@ -1,6 +1,4 @@ -package net.lab1024.smartadmin.constant; - -import net.lab1024.smartadmin.common.domain.BaseEnum; +package net.lab1024.smartadmin.service.common.constant; /** * 系统环境枚举类 @@ -10,7 +8,6 @@ import net.lab1024.smartadmin.common.domain.BaseEnum; */ public enum SystemEnvironmentEnum implements BaseEnum { - /** * dev */ @@ -31,19 +28,14 @@ public enum SystemEnvironmentEnum implements BaseEnum { */ PROD("prod", "生产环境"); + private final String value; - public static final String DEV_ENV = "dev"; - - - private String value; - - private String desc; + private final String desc; SystemEnvironmentEnum(String value, String desc) { this.value = value; this.desc = desc; } - /** * 获取定义枚举value值 * diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/controller/AdminBaseController.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/controller/AdminBaseController.java new file mode 100644 index 00000000..91b4cf5f --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/controller/AdminBaseController.java @@ -0,0 +1,15 @@ +package net.lab1024.smartadmin.service.common.controller; + +import lombok.extern.slf4j.Slf4j; +import net.lab1024.smartadmin.service.common.constant.CommonConst; +import org.springframework.web.bind.annotation.RequestMapping; + +/** + * @author: 卓大 + * @create: 2020-03-31 08:54 PM from win10 + */ +@Slf4j +@RequestMapping(CommonConst.ApiUrl.API_PREFIX_ADMIN) +public class AdminBaseController { + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/controller/SupportBaseController.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/controller/SupportBaseController.java new file mode 100644 index 00000000..c76d0db1 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/controller/SupportBaseController.java @@ -0,0 +1,14 @@ +package net.lab1024.smartadmin.service.common.controller; + +import net.lab1024.smartadmin.service.common.constant.CommonConst; +import org.springframework.web.bind.annotation.RequestMapping; + +/** + * 通用业务路由基类 + * + * @author 胡克 + * @date 2019/10/18 11:51 + */ +@RequestMapping(CommonConst.ApiUrl.API_PREFIX_SUPPORT) +public class SupportBaseController { +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/domain/PageBaseDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/domain/PageBaseDTO.java new file mode 100644 index 00000000..9fa622aa --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/domain/PageBaseDTO.java @@ -0,0 +1,52 @@ +package net.lab1024.smartadmin.service.common.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.Valid; +import javax.validation.constraints.Max; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; +import java.util.List; + +/** + * 分页基础参数 + * + * @author 善逸 + * @Date Created in 2017/10/28 16:19 + */ +@Data +public class PageBaseDTO { + + @ApiModelProperty(value = "页码(不能为空)", required = true, example = "1") + @NotNull(message = "分页参数不能为空") + private Integer pageNum; + + @ApiModelProperty(value = "每页数量(不能为空)", required = true, example = "10") + @NotNull(message = "每页数量不能为空") + @Max(value = 200, message = "每页最大为200") + private Integer pageSize; + + @ApiModelProperty("排序字段集合") + @Size(max = 10, message = "排序字段最多10") + @Valid + private List sortItemList; + + /** + * 排序DTO类 + */ + @Data + public static class SortItemDTO { + + @ApiModelProperty("true正序|false倒序") + @NotNull(message = "排序规则不能为空") + private Boolean isAsc; + + @ApiModelProperty(value = "排序字段") + @NotBlank(message = "排序字段不能为空") + @Length(max = 30, message = "排序字段最多30") + private String column; + } +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/domain/PageResultDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/domain/PageResultDTO.java similarity index 83% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/domain/PageResultDTO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/domain/PageResultDTO.java index 23995832..fee6c0d8 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/domain/PageResultDTO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/domain/PageResultDTO.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.common.domain; +package net.lab1024.smartadmin.service.common.domain; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -8,7 +8,7 @@ import java.util.List; /** * Page返回对象 * - * @Author lihaifan + * @Author 善逸 * @Date Created in 2017/10/31 15:05 */ @Data @@ -44,4 +44,7 @@ public class PageResultDTO { @ApiModelProperty(value = "结果集") private List list; + @ApiModelProperty("是否为空") + private Boolean emptyFlag; + } diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/domain/ResponseDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/domain/ResponseDTO.java similarity index 67% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/domain/ResponseDTO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/domain/ResponseDTO.java index 92ec781e..b5bafdf8 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/domain/ResponseDTO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/domain/ResponseDTO.java @@ -1,13 +1,13 @@ -package net.lab1024.smartadmin.common.domain; +package net.lab1024.smartadmin.service.common.domain; -import net.lab1024.smartadmin.common.constant.ResponseCodeConst; +import net.lab1024.smartadmin.service.common.codeconst.ResponseCodeConst; /** * 返回类 * * @param - * @author zhuoda + * @author 1024lab */ public class ResponseDTO { @@ -25,7 +25,7 @@ public class ResponseDTO { public ResponseDTO(ResponseCodeConst responseCodeConst, String msg) { this.code = responseCodeConst.getCode(); this.msg = msg; - this.success = responseCodeConst.isSuccess(); + this.success = responseCodeConst.issucc(); } public ResponseDTO(ResponseCodeConst responseCodeConst, T data) { @@ -33,7 +33,7 @@ public class ResponseDTO { this.code = responseCodeConst.getCode(); this.msg = responseCodeConst.getMsg(); this.data = data; - this.success = responseCodeConst.isSuccess(); + this.success = responseCodeConst.issucc(); } public ResponseDTO(ResponseCodeConst responseCodeConst, T data, String msg) { @@ -41,13 +41,13 @@ public class ResponseDTO { this.code = responseCodeConst.getCode(); this.msg = msg; this.data = data; - this.success = responseCodeConst.isSuccess(); + this.success = responseCodeConst.issucc(); } private ResponseDTO(ResponseCodeConst responseCodeConst) { this.code = responseCodeConst.getCode(); this.msg = responseCodeConst.getMsg(); - this.success = responseCodeConst.isSuccess(); + this.success = responseCodeConst.issucc(); } public ResponseDTO(ResponseDTO responseDTO) { @@ -56,6 +56,18 @@ public class ResponseDTO { this.success = responseDTO.isSuccess(); } + public ResponseDTO(ResponseCodeConst codeConst, boolean isSuccess) { + this.code = codeConst.getCode(); + this.msg = codeConst.getMsg(); + this.success = isSuccess; + } + + public ResponseDTO(int code, String msg, boolean isSuccess) { + this.code = code; + this.msg = msg; + this.success = isSuccess; + } + public static ResponseDTO succ() { return new ResponseDTO(ResponseCodeConst.SUCCESS); } @@ -68,27 +80,34 @@ public class ResponseDTO { return new ResponseDTO(ResponseCodeConst.SUCCESS, data); } - public static ResponseDTO succMsg(String msg) { + public static ResponseDTO succMsg(String msg) { return new ResponseDTO(ResponseCodeConst.SUCCESS, msg); } - public static ResponseDTO wrap(ResponseCodeConst codeConst) { return new ResponseDTO<>(codeConst); } - public static ResponseDTO wrap(ResponseCodeConst codeConst, T t) { - return new ResponseDTO(codeConst, t); + public static ResponseDTO wrap(ResponseCodeConst codeConst, boolean isSuccess) { + return new ResponseDTO<>(codeConst, isSuccess); } - public static ResponseDTO wrap(ResponseCodeConst codeConst, String msg) { - return new ResponseDTO(codeConst, msg); + public static ResponseDTO wrap(ResponseDTO responseDTO) { + return new ResponseDTO<>(responseDTO.getCode(), responseDTO.getMsg(), responseDTO.isSuccess()); + } + + public static ResponseDTO wrapData(ResponseCodeConst codeConst, T t) { + return new ResponseDTO(codeConst, t); } public static ResponseDTO wrapMsg(ResponseCodeConst codeConst, String msg) { return new ResponseDTO(codeConst, msg); } + public static ResponseDTO wrapDataMsg(ResponseCodeConst codeConst, T t, String msg) { + return new ResponseDTO(codeConst, t, msg); + } + public String getMsg() { return msg; } @@ -126,7 +145,6 @@ public class ResponseDTO { @Override public String toString() { - return "ResponseDTO{" + "code=" + code + ", msg='" + msg + '\'' + ", success=" + success + ", data=" + data + - '}'; + return "ResponseDTO{" + "code=" + code + ", msg='" + msg + '\'' + ", success=" + success + ", data=" + data + '}'; } } diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/excel/ExcelStyle.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/excel/ExcelStyle.java new file mode 100644 index 00000000..41bdd3d9 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/excel/ExcelStyle.java @@ -0,0 +1,183 @@ +package net.lab1024.smartadmin.service.common.excel; + +import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; +import cn.afterturn.easypoi.excel.entity.params.ExcelForEachParams; +import cn.afterturn.easypoi.excel.export.styler.IExcelExportStyler; +import org.apache.poi.ss.usermodel.*; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/9/25 19:52 + */ +public class ExcelStyle implements IExcelExportStyler { + private static final short STRING_FORMAT = (short) BuiltinFormats.getBuiltinFormat("TEXT"); + private static final short FONT_SIZE_TEN = 10; + private static final short FONT_SIZE_ELEVEN = 11; + private static final short FONT_SIZE_TWELVE = 12; + /** + * 大标题样式 + */ + private CellStyle headerStyle; + /** + * 每列标题样式 + */ + private CellStyle titleStyle; + /** + * 数据行样式 + */ + private CellStyle styles; + + public ExcelStyle(Workbook workbook) { + this.init(workbook); + } + + /** + * 初始化样式 + * + * @param workbook + */ + private void init(Workbook workbook) { + this.headerStyle = initHeaderStyle(workbook); + this.titleStyle = initTitleStyle(workbook); + this.styles = initStyles(workbook); + } + + /** + * 大标题样式 + * + * @param color + * @return + */ + @Override + public CellStyle getHeaderStyle(short color) { + return headerStyle; + } + + /** + * 每列标题样式 + * + * @param color + * @return + */ + @Override + public CellStyle getTitleStyle(short color) { + return titleStyle; + } + + /** + * 数据行样式 + * + * @param parity 可以用来表示奇偶行 + * @param entity 数据内容 + * @return 样式 + */ + @Override + public CellStyle getStyles(boolean parity, ExcelExportEntity entity) { + return styles; + } + + /** + * 获取样式方法 + * + * @param dataRow 数据行 + * @param obj 对象 + * @param data 数据 + */ + @Override + public CellStyle getStyles(Cell cell, int dataRow, ExcelExportEntity entity, Object obj, Object data) { + return getStyles(true, entity); + } + + /** + * 模板使用的样式设置 + */ + @Override + public CellStyle getTemplateStyles(boolean isSingle, ExcelForEachParams excelForEachParams) { + return null; + } + + /** + * 初始化--大标题样式 + * + * @param workbook + * @return + */ + private CellStyle initHeaderStyle(Workbook workbook) { + CellStyle style = getBaseCellStyle(workbook); + style.setFont(getFont(workbook, FONT_SIZE_TWELVE, true)); + return style; + } + + /** + * 初始化--每列标题样式 + * + * @param workbook + * @return + */ + private CellStyle initTitleStyle(Workbook workbook) { + CellStyle style = getBaseCellStyle(workbook); + style.setFont(getFont(workbook, FONT_SIZE_ELEVEN, false)); + //背景色 + style.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex()); + style.setFillPattern(FillPatternType.SOLID_FOREGROUND); + return style; + } + + /** + * 初始化--数据行样式 + * + * @param workbook + * @return + */ + private CellStyle initStyles(Workbook workbook) { + CellStyle style = getBaseCellStyle(workbook); + style.setFont(getFont(workbook, FONT_SIZE_TEN, false)); + style.setDataFormat(STRING_FORMAT); + style.setAlignment(HorizontalAlignment.LEFT); + return style; + } + + /** + * 基础样式 + * + * @return + */ + private CellStyle getBaseCellStyle(Workbook workbook) { + CellStyle style = workbook.createCellStyle(); + //下边框 + style.setBorderBottom(BorderStyle.THIN); + //左边框 + style.setBorderLeft(BorderStyle.THIN); + //上边框 + style.setBorderTop(BorderStyle.THIN); + //右边框 + style.setBorderRight(BorderStyle.THIN); + //水平居中 + style.setAlignment(HorizontalAlignment.CENTER); + //上下居中 + style.setVerticalAlignment(VerticalAlignment.CENTER); + //设置自动换行 + style.setWrapText(true); + return style; + } + + /** + * 字体样式 + * + * @param size 字体大小 + * @param isBold 是否加粗 + * @return + */ + private Font getFont(Workbook workbook, short size, boolean isBold) { + Font font = workbook.createFont(); + //字体样式 + font.setFontName("宋体"); + //是否加粗 + font.setBold(isBold); + //字体大小 + font.setFontHeightInPoints(size); + return font; + } +} \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/exception/SmartBusinessException.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/exception/SmartBusinessException.java similarity index 69% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/exception/SmartBusinessException.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/exception/SmartBusinessException.java index 904f3a7b..e167df92 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/exception/SmartBusinessException.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/exception/SmartBusinessException.java @@ -1,20 +1,22 @@ -package net.lab1024.smartadmin.common.exception; +package net.lab1024.smartadmin.service.common.exception; + +import net.lab1024.smartadmin.service.common.codeconst.ResponseCodeConst; + /** - * * [ 业务逻辑异常,全局异常拦截后统一返回ResponseCodeConst.SYSTEM_ERROR ] - * - * @version 1.0 - * @since JDK1.8 - * @author yandanyang - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date + * + * @author 罗伊 + * @date 2020/8/25 11:57 */ public class SmartBusinessException extends RuntimeException { public SmartBusinessException() { } + public SmartBusinessException(ResponseCodeConst responseCodeConst) { + super(responseCodeConst.getMsg()); + } + public SmartBusinessException(String message) { super(message); } diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/json/BigDecimalNullZeroSerializer.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/json/BigDecimalNullZeroSerializer.java new file mode 100644 index 00000000..532c45b5 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/json/BigDecimalNullZeroSerializer.java @@ -0,0 +1,26 @@ +package net.lab1024.smartadmin.service.common.json; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; + +import java.io.IOException; +import java.math.BigDecimal; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/8/20 16:04 + */ +public class BigDecimalNullZeroSerializer extends JsonSerializer { + + @Override + public void serialize(BigDecimal value, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException { + if (value == null) { + jsonGenerator.writeNumber(BigDecimal.ZERO); + return; + } + jsonGenerator.writeNumber(value); + } +} \ No newline at end of file diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/json/FileKeySerializer.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/json/FileKeySerializer.java new file mode 100644 index 00000000..557d2487 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/json/FileKeySerializer.java @@ -0,0 +1,42 @@ +package net.lab1024.smartadmin.service.common.json; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.support.file.service.FileService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; + +import java.io.IOException; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/8/15 15:06 + */ +public class FileKeySerializer extends JsonSerializer { + + @Autowired + private FileService fileService; + + + @Override + public void serialize(String value, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException { + if (StringUtils.isEmpty(value)) { + jsonGenerator.writeString(value); + return; + } + if(fileService == null){ + jsonGenerator.writeString(value); + return; + } + ResponseDTO responseDTO = fileService.getFileUrl(value); + if(responseDTO.isSuccess()){ + jsonGenerator.writeString(responseDTO.getData()); + return; + } + jsonGenerator.writeString(value); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/json/FileKeyVoSerializer.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/json/FileKeyVoSerializer.java new file mode 100644 index 00000000..a0af56bf --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/json/FileKeyVoSerializer.java @@ -0,0 +1,43 @@ +package net.lab1024.smartadmin.service.common.json; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.google.common.collect.Lists; +import net.lab1024.smartadmin.service.module.support.file.domain.vo.FileVO; +import net.lab1024.smartadmin.service.module.support.file.service.FileService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; + +import java.io.IOException; +import java.util.Arrays; +import java.util.List; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/8/15 15:06 + */ +public class FileKeyVoSerializer extends JsonSerializer { + + @Autowired + private FileService fileService; + + + @Override + public void serialize(String value, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException { + if (StringUtils.isEmpty(value)) { + jsonGenerator.writeObject(Lists.newArrayList()); + return; + } + if(fileService == null){ + jsonGenerator.writeString(value); + return; + } + String[] fileKeyArray = value.split(","); + List fileKeyList = Arrays.asList(fileKeyArray); + List fileKeyVOList = fileService.getFileList(fileKeyList); + jsonGenerator.writeObject(fileKeyVOList); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/security/SmartSecurityMetadataSource.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/security/SmartSecurityMetadataSource.java new file mode 100644 index 00000000..11300478 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/security/SmartSecurityMetadataSource.java @@ -0,0 +1,114 @@ +package net.lab1024.smartadmin.service.common.security; + +import net.lab1024.smartadmin.service.common.anno.NoValidPrivilege; +import net.lab1024.smartadmin.service.util.SmartSecurityUtil; +import org.apache.commons.lang3.StringUtils; +import org.springframework.security.access.ConfigAttribute; +import org.springframework.security.access.prepost.*; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; + +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +/** + * 此类用于默认给所有接口添加权限 @privilegeCheck.checkPermission('%s') + * %s 为类名.方法名 + * 和使用@PreAuthorize("@privilegeCheck.checkPermission('%s')") 效果一致 + * 避免所有接口都添加一遍 减轻工作量 + * + * @author 罗伊 + * @date 2021-08-30 23:08 + */ +public class SmartSecurityMetadataSource extends PrePostAnnotationSecurityMetadataSource { + + public static final String PRIVILEGE_CHECK_NAME = "privilegeCheck"; + + private static String EXPRESSION_FORMAT = "@privilegeCheck.checkPermission('%s')"; + + private final PrePostInvocationAttributeFactory attributeFactory; + + private String projectModule; + + private List ignoreUrlList; + + public SmartSecurityMetadataSource(PrePostInvocationAttributeFactory attributeFactory, List ignoreUrlList, String projectModule) { + super(attributeFactory); + this.attributeFactory = attributeFactory; + this.projectModule = projectModule; + this.ignoreUrlList = ignoreUrlList; + } + + + @Override + public Collection getAttributes(Method method, Class targetClass) { + //只对固定的包的所有接口进行控制 + if (!targetClass.getName().startsWith(projectModule)) { + return super.getAttributes(method, targetClass); + } + //是否需要权限 + NoValidPrivilege methodNoValidPrivilege = method.getAnnotation(NoValidPrivilege.class); + if (methodNoValidPrivilege != null) { + return Collections.emptyList(); + } + NoValidPrivilege classNoValidPrivilege = targetClass.getAnnotation(NoValidPrivilege.class); + if (classNoValidPrivilege != null) { + return Collections.emptyList(); + } + //是否添加security原有注解 + PreAuthorize preAuthorize = method.getAnnotation(PreAuthorize.class); + if (preAuthorize != null) { + return super.getAttributes(method, targetClass); + } + PostAuthorize postAuthorize = method.getAnnotation(PostAuthorize.class); + if (postAuthorize != null) { + return super.getAttributes(method, targetClass); + } + //自己的控制 + GetMapping getMapping = method.getAnnotation(GetMapping.class); + PostMapping postMapping = method.getAnnotation(PostMapping.class); + RequestMapping requestMapping = method.getAnnotation(RequestMapping.class); + if (getMapping == null && postMapping == null && requestMapping == null) { + return super.getAttributes(method, targetClass); + } + //获取注解值 + String uriPrefix = SmartSecurityUtil.getUriPrefix(method); + List annotationValueList = SmartSecurityUtil.getAnnotationValueList(method, uriPrefix); + //判断是否被忽略 + if (this.contain(ignoreUrlList, annotationValueList)) { + return super.getAttributes(method, targetClass); + } + ArrayList configAttributes = new ArrayList(1); + String classFullName = targetClass.getName(); + String methodName = method.getName(); + String[] classNameArray = StringUtils.split(classFullName, "\\."); + String controllerName = classNameArray[classNameArray.length - 1]; + String privilegeName = controllerName + "." + methodName; + String preAuthorizeAttribute = String.format(EXPRESSION_FORMAT, privilegeName); + PreInvocationAttribute pre = this.attributeFactory.createPreInvocationAttribute(null, null, preAuthorizeAttribute); + if (pre != null) { + configAttributes.add(pre); + } + return configAttributes; + } + + public Boolean contain(List ignores, List valueList) { + if (CollectionUtils.isEmpty(ignores)) { + return false; + } + for (String ignoreUrl : ignores) { + for (String uri : valueList) { + if (uri.contains(ignoreUrl)) { + return true; + } + } + } + return false; + } + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/security/SmartSecurityNoLoginUrl.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/security/SmartSecurityNoLoginUrl.java new file mode 100644 index 00000000..4fd8e11c --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/security/SmartSecurityNoLoginUrl.java @@ -0,0 +1,72 @@ +package net.lab1024.smartadmin.service.common.security; + +import com.google.common.collect.Lists; +import net.lab1024.smartadmin.service.common.anno.NoNeedLogin; +import net.lab1024.smartadmin.service.util.SmartSecurityUtil; +import org.apache.commons.collections4.CollectionUtils; +import org.reflections.Reflections; +import org.reflections.scanners.MethodAnnotationsScanner; +import org.reflections.scanners.TypeAnnotationsScanner; +import org.reflections.util.ConfigurationBuilder; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +import java.lang.reflect.Method; +import java.util.List; +import java.util.Set; + +/** + * [ ] + * + * @author 罗伊 + * @date 2021/8/31 10:20 + */ +public class SmartSecurityNoLoginUrl { + + private List noLoginUrlList; + + public SmartSecurityNoLoginUrl(String scanPath){ + this.noLoginUrlList = this.initNoLoginUrlList(scanPath); + } + + + public List getNoLoginUrlList(){ + return noLoginUrlList; + } + + /** + * 获取无需登录的url信息 + * + * @return + */ + private List initNoLoginUrlList(String scanPath) { + List noLoginUrlList = Lists.newArrayList(); + //一些常量uri + noLoginUrlList.add("/swagger-ui.html"); + noLoginUrlList.add("/swagger-resources/**"); + noLoginUrlList.add("/webjars/**"); + noLoginUrlList.add("/*/api-docs"); + //添加无需登录注解的uri + Reflections reflections = new Reflections(new ConfigurationBuilder().forPackages(scanPath).addScanners(new MethodAnnotationsScanner(), new TypeAnnotationsScanner())); + Set methodSet = reflections.getMethodsAnnotatedWith(NoNeedLogin.class); + Set> classSet = reflections.getTypesAnnotatedWith(NoNeedLogin.class); + //方法级别无需登录 + for (Method method : methodSet) { + String uriPrefix = SmartSecurityUtil.getUriPrefix(method); + List valueList = SmartSecurityUtil.getAnnotationValueList(method, uriPrefix); + noLoginUrlList.addAll(valueList); + } + //类级别无需登录 + for (Class clazz : classSet) { + Method[] methods = clazz.getMethods(); + for (Method method : methods) { + String uriPrefix = SmartSecurityUtil.getUriPrefix(method); + List valueList = SmartSecurityUtil.getAnnotationValueList(method, uriPrefix); + noLoginUrlList.addAll(valueList); + } + } + return noLoginUrlList; + } + + +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/anno/ApiModelPropertyEnum.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/swagger/ApiModelPropertyEnum.java similarity index 67% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/anno/ApiModelPropertyEnum.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/swagger/ApiModelPropertyEnum.java index c9babff3..616c3abc 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/anno/ApiModelPropertyEnum.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/swagger/ApiModelPropertyEnum.java @@ -1,6 +1,6 @@ -package net.lab1024.smartadmin.common.anno; +package net.lab1024.smartadmin.service.common.swagger; -import net.lab1024.smartadmin.common.domain.BaseEnum; +import net.lab1024.smartadmin.service.common.constant.BaseEnum; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -8,7 +8,7 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** - * 枚举类字段属性的注解 + * 枚举类字段属性的 自定义 swagger 注解 * * @author listen * @date 2019/05/16 15:18 @@ -26,22 +26,12 @@ public @interface ApiModelPropertyEnum { String example() default ""; - /** - * 是否隐藏 - * - * @return - */ boolean hidden() default false; - /** - * 是否必须 - * - * @return - */ boolean required() default true; String dataType() default ""; - String enumDesc() default ""; + String desc() default ""; } diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/swagger/SmartSwaggerApiModelEnumPlugin.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/swagger/ApiModelPropertyEnumPlugin.java similarity index 55% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/swagger/SmartSwaggerApiModelEnumPlugin.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/swagger/ApiModelPropertyEnumPlugin.java index dbc2d586..f4a8af4b 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/swagger/SmartSwaggerApiModelEnumPlugin.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/swagger/ApiModelPropertyEnumPlugin.java @@ -1,30 +1,12 @@ -/* - * - * Copyright 2015 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * - */ +package net.lab1024.smartadmin.service.common.swagger; -package net.lab1024.smartadmin.common.swagger; - -import net.lab1024.smartadmin.common.anno.ApiModelPropertyEnum; -import net.lab1024.smartadmin.common.domain.BaseEnum; import com.google.common.base.Function; import com.google.common.base.Optional; +import net.lab1024.smartadmin.service.common.constant.BaseEnum; import org.apache.commons.lang3.StringUtils; import org.springframework.core.annotation.AnnotationUtils; +import org.springframework.core.annotation.Order; +import org.springframework.stereotype.Component; import springfox.documentation.spi.DocumentationType; import springfox.documentation.spi.schema.ModelPropertyBuilderPlugin; import springfox.documentation.spi.schema.contexts.ModelPropertyContext; @@ -41,26 +23,28 @@ import static springfox.documentation.schema.Annotations.findPropertyAnnotation; * @author listen * @date 2019年5月16日 15:36:56 */ -public class SmartSwaggerApiModelEnumPlugin implements ModelPropertyBuilderPlugin { +@Component +@Order(SwaggerPluginSupport.SWAGGER_PLUGIN_ORDER + 1) +public class ApiModelPropertyEnumPlugin implements ModelPropertyBuilderPlugin { @Override public void apply(ModelPropertyContext context) { - Optional enumOptional = Optional.absent(); + Optional annotation = Optional.absent(); if (context.getAnnotatedElement().isPresent()) { - enumOptional = enumOptional.or(findApiModePropertyAnnotation(context.getAnnotatedElement().get())); + annotation = annotation.or(findApiModePropertyAnnotation(context.getAnnotatedElement().get())); } if (context.getBeanPropertyDefinition().isPresent()) { - enumOptional = enumOptional.or(findPropertyAnnotation(context.getBeanPropertyDefinition().get(), ApiModelPropertyEnum.class)); + annotation = annotation.or(findPropertyAnnotation(context.getBeanPropertyDefinition().get(), ApiModelPropertyEnum.class)); } - if (enumOptional.isPresent()) { - ApiModelPropertyEnum anEnum = enumOptional.get(); + if (annotation.isPresent()) { + ApiModelPropertyEnum anEnum = annotation.get(); String enumInfo = BaseEnum.getInfo(anEnum.value()); context.getBuilder() - .required(enumOptional.transform(toIsRequired()).or(false)) - .description(anEnum.enumDesc() + ":" + enumInfo) - .example(enumOptional.transform(toExample()).orNull()) + .required(annotation.transform(toIsRequired()).or(false)) + .description(anEnum.desc() + ":" + enumInfo) + .example(annotation.transform(toExample()).orNull()) .isHidden(anEnum.hidden()); } } diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/validator/bigdecimal/ComparisonSymbolEnum.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/validator/BigDecimalSymbolEnum.java similarity index 80% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/validator/bigdecimal/ComparisonSymbolEnum.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/validator/BigDecimalSymbolEnum.java index e59d0bf3..2adcb648 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/validator/bigdecimal/ComparisonSymbolEnum.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/validator/BigDecimalSymbolEnum.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.common.validator.bigdecimal; +package net.lab1024.smartadmin.service.common.validator; /** * 比较符枚举类 @@ -6,7 +6,7 @@ package net.lab1024.smartadmin.common.validator.bigdecimal; * @author listen * @date 2018/03/20 14:01 */ -public enum ComparisonSymbolEnum { +public enum BigDecimalSymbolEnum { /** * 等于 diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/validator/bigdecimal/BigDecimalValidator.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/validator/BigDecimalValidator.java similarity index 92% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/validator/bigdecimal/BigDecimalValidator.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/validator/BigDecimalValidator.java index 5ba85bf7..507c7436 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/validator/bigdecimal/BigDecimalValidator.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/validator/BigDecimalValidator.java @@ -1,6 +1,6 @@ -package net.lab1024.smartadmin.common.validator.bigdecimal; +package net.lab1024.smartadmin.service.common.validator; -import net.lab1024.smartadmin.util.SmartBigDecimalUtil; +import net.lab1024.smartadmin.service.util.SmartBigDecimalUtil; import javax.validation.ConstraintValidator; import javax.validation.ConstraintValidatorContext; @@ -22,7 +22,7 @@ public class BigDecimalValidator implements ConstraintValidator { +public class CheckEnumValidator implements ConstraintValidator { /** * 枚举类实例集合 diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/domain/ValidateList.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/validator/ValidateList.java similarity index 97% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/domain/ValidateList.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/validator/ValidateList.java index c3907e63..c4b82873 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/domain/ValidateList.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/common/validator/ValidateList.java @@ -1,11 +1,11 @@ -package net.lab1024.smartadmin.common.domain; +package net.lab1024.smartadmin.service.common.validator; import javax.validation.Valid; import javax.validation.constraints.NotEmpty; import java.util.*; /** - * @author: zhuoda + * @author: 卓大 * @create: 2020-02-03 17:37 PM from win10 */ public class ValidateList implements List { diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SecurityConfig.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SecurityConfig.java new file mode 100644 index 00000000..40c1538f --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SecurityConfig.java @@ -0,0 +1,113 @@ +package net.lab1024.smartadmin.service.config; + +import net.lab1024.smartadmin.service.common.security.SmartSecurityNoLoginUrl; +import net.lab1024.smartadmin.service.filters.SmartTokenFilter; +import net.lab1024.smartadmin.service.handler.AuthenticationFailHandler; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.builders.WebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.config.http.SessionCreationPolicy; +import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; +import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.cors.UrlBasedCorsConfigurationSource; +import org.springframework.web.filter.CorsFilter; + +import java.util.List; + +/** + * Spring Security + * + * @author 善逸 + * @date 2021/8/3 17:50 + */ +@Configuration +public class SecurityConfig extends WebSecurityConfigurerAdapter { + + @Value("${access-control-allow-origin}") + private String accessControlAllowOrigin; + + /** + * 认证失败处理类 + */ + @Autowired + private AuthenticationFailHandler authenticationFailHandler; + + /** + * 无需登录的url + */ + @Autowired + private SmartSecurityNoLoginUrl smartSecurityNoLoginUrl; + + /** + * token过滤器 + */ + @Autowired + private SmartTokenFilter smartTokenFilter; + + /** + * 跨域配置 + * + * @return + */ + public CorsFilter corsFilter() { + UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); + CorsConfiguration config = new CorsConfiguration(); + config.setAllowCredentials(true); + // 设置访问源地址 + config.addAllowedOriginPattern(accessControlAllowOrigin); + // 设置访问源请求头 + config.addAllowedHeader("*"); + // 设置访问源请求方法 + config.addAllowedMethod("*"); + // 对接口配置跨域设置 + source.registerCorsConfiguration("/**", config); + return new CorsFilter(source); + } + + /** + * anyRequest | 匹配所有请求路径 + * access | SpringEl表达式结果为true时可以访问 + * anonymous | 匿名可以访问 + * denyAll | 用户不能访问 + * fullyAuthenticated | 用户完全认证可以访问(非remember-me下自动登录) + * hasAnyAuthority | 如果有参数,参数表示权限,则其中任何一个权限可以访问 + * hasAnyRole | 如果有参数,参数表示角色,则其中任何一个角色可以访问 + * hasAuthority | 如果有参数,参数表示权限,则其权限可以访问 + * hasIpAddress | 如果有参数,参数表示IP地址,如果用户IP和参数匹配,则可以访问 + * hasRole | 如果有参数,参数表示角色,则其角色可以访问 + * permitAll | 用户可以任意访问 + * rememberMe | 允许通过remember-me登录的用户访问 + * authenticated | 用户登录后可访问 + */ + @Override + protected void configure(HttpSecurity httpSecurity) throws Exception { + httpSecurity + // CSRF禁用,因为不使用session + .csrf().disable() + // 认证失败处理类 + .exceptionHandling().authenticationEntryPoint(authenticationFailHandler).and() + // 基于token,所以不需要session + .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and() + // 过滤请求 + .authorizeRequests() + .antMatchers("/admin/**").authenticated(); + + httpSecurity.addFilterBefore(smartTokenFilter, UsernamePasswordAuthenticationFilter.class); + httpSecurity.addFilterBefore(corsFilter(), SmartTokenFilter.class); + } + + @Override + public void configure(WebSecurity web) { + // 忽略url + WebSecurity.IgnoredRequestConfigurer ignoring = web.ignoring(); + List noLoginUrlList = smartSecurityNoLoginUrl.getNoLoginUrlList(); + for (String url : noLoginUrlList) { + ignoring.antMatchers(url); + } + } + + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SecurityMethodConfig.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SecurityMethodConfig.java new file mode 100644 index 00000000..97796c0e --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SecurityMethodConfig.java @@ -0,0 +1,35 @@ +package net.lab1024.smartadmin.service.config; + +import net.lab1024.smartadmin.service.common.security.SmartSecurityMetadataSource; +import net.lab1024.smartadmin.service.common.security.SmartSecurityNoLoginUrl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.security.access.expression.method.ExpressionBasedAnnotationAttributeFactory; +import org.springframework.security.access.method.MethodSecurityMetadataSource; +import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; +import org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration; + +/** + * 此类用于注入自己的 method校验 + * SmartSecurityMetadataSource + * @author 罗伊 + * @date 2021-08-31 0:01 + */ +@EnableGlobalMethodSecurity(prePostEnabled = true) +public class SecurityMethodConfig extends GlobalMethodSecurityConfiguration { + + @Value("${project.module}") + private String projectModule; + + /** + * 无需登录的url + */ + @Autowired + private SmartSecurityNoLoginUrl smartSecurityNoLoginUrl; + + @Override + public MethodSecurityMetadataSource customMethodSecurityMetadataSource(){ + ExpressionBasedAnnotationAttributeFactory attributeFactory = new ExpressionBasedAnnotationAttributeFactory(this.getExpressionHandler()); + return new SmartSecurityMetadataSource(attributeFactory, smartSecurityNoLoginUrl.getNoLoginUrlList(),projectModule); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SecurityNoLoginUrlConfig.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SecurityNoLoginUrlConfig.java new file mode 100644 index 00000000..d9687c42 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SecurityNoLoginUrlConfig.java @@ -0,0 +1,24 @@ +package net.lab1024.smartadmin.service.config; + +import net.lab1024.smartadmin.service.common.security.SmartSecurityNoLoginUrl; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * [ ] + * + * @author 罗伊 + * @date 2021/9/1 21:40 + */ +@Configuration +public class SecurityNoLoginUrlConfig { + + @Value("${project.module}") + private String projectModule; + + @Bean + public SmartSecurityNoLoginUrl securityNoLoginUrl(){ + return new SmartSecurityNoLoginUrl(projectModule); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartAsyncConfig.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartAsyncConfig.java new file mode 100644 index 00000000..3c52c056 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartAsyncConfig.java @@ -0,0 +1,66 @@ +package net.lab1024.smartadmin.service.config; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.task.AsyncTaskExecutor; +import org.springframework.scheduling.annotation.AsyncConfigurer; +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; + +import java.lang.reflect.Method; +import java.util.Arrays; + +/** + * 异步调用线程配置 + * + * @author 胡克 + * @date 2019/12/26 11:54 + */ +@Slf4j +@Configuration +public class SmartAsyncConfig { + + /** + * 线程池 配置bean名称 + */ + public static final String ASYNC_EXECUTOR = "asyncExecutor"; + + /** + * 配置线程池 + * + * @return + */ + @Bean(name = ASYNC_EXECUTOR) + public AsyncTaskExecutor executor() { + ThreadPoolTaskExecutor taskExecutor = new ThreadPoolTaskExecutor(); + // 核心线程数量 + taskExecutor.setCorePoolSize(Runtime.getRuntime().availableProcessors()); + // 最大线程数量 + taskExecutor.setMaxPoolSize(Runtime.getRuntime().availableProcessors()); + taskExecutor.setThreadNamePrefix(ASYNC_EXECUTOR); + taskExecutor.initialize(); + return taskExecutor; + } + + /** + * spring 异步任务 异常配置 + */ + @Configuration + public static class AsyncExceptionConfig implements AsyncConfigurer { + @Override + public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() { + return new AsyncExceptionHandler(); + } + } + + /** + * 自定义异常处理 + */ + public static class AsyncExceptionHandler implements AsyncUncaughtExceptionHandler { + @Override + public void handleUncaughtException(Throwable throwable, Method method, Object... objects) { + log.error("异步任务发生异常:{}, 参数:{}, ", method.getDeclaringClass().getSimpleName() + "." + method.getName(), Arrays.toString(objects), throwable); + } + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartCacheConfig.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartCacheConfig.java new file mode 100644 index 00000000..0a63ced3 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartCacheConfig.java @@ -0,0 +1,63 @@ +package net.lab1024.smartadmin.service.config; + +import com.github.benmanes.caffeine.cache.LoadingCache; +import com.google.common.collect.Maps; +import net.lab1024.smartadmin.service.module.support.beancache.cache.AbstractCaffeineCache; +import net.lab1024.smartadmin.service.module.support.beancache.cache.AbstractDisableCache; +import net.lab1024.smartadmin.service.module.support.beancache.cache.IBeanCache; +import net.lab1024.smartadmin.service.module.support.beancache.domain.CacheData; +import net.lab1024.smartadmin.service.module.support.beancache.load.CacheLoad; +import net.lab1024.smartadmin.service.module.support.beancache.load.CacheLoadMethod; +import org.reflections.Reflections; +import org.reflections.scanners.MethodAnnotationsScanner; +import org.reflections.util.ConfigurationBuilder; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; + +import java.lang.reflect.Method; +import java.util.Map; +import java.util.Set; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/9/6 16:01 + */ +@Configuration +public class SmartCacheConfig { + + @Value("${cache.maximumSize:5000}") + private Integer cacheMaximumSize; + + @Value("${cache.expireDays:5}") + private Integer expireDays; + + @Value("${cache.scanPath}") + private String scanPath; + + @Bean + @Primary + public IBeanCache beanCache() { + return new AbstractCaffeineCache() { + LoadingCache cache = this.initCache(cacheMaximumSize,expireDays, scanPath); + @Override + public LoadingCache getCache() { + return cache; + } + }; + } + + @Bean + @ConditionalOnMissingBean(IBeanCache.class) + public IBeanCache beanDisableCache() { + return new AbstractDisableCache(scanPath); + } + + + +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartKaptchaConfig.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartCaptchaConfig.java similarity index 51% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartKaptchaConfig.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartCaptchaConfig.java index 06dd1c95..2415bd32 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartKaptchaConfig.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartCaptchaConfig.java @@ -1,9 +1,9 @@ -package net.lab1024.smartadmin.config; +package net.lab1024.smartadmin.service.config; -import net.lab1024.smartadmin.common.kaptcha.KaptchaNoise; -import net.lab1024.smartadmin.common.kaptcha.KaptchaWordRenderer; import com.google.code.kaptcha.impl.DefaultKaptcha; import com.google.code.kaptcha.util.Config; +import net.lab1024.smartadmin.service.module.support.captcha.render.CaptchaNoise; +import net.lab1024.smartadmin.service.module.support.captcha.render.CaptchaWordRenderer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -12,36 +12,38 @@ import java.util.Properties; /** * [ 验证码配置 ] * - * @author yandanyang + * @author 罗伊 * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/7/4 0004 上午 9:40 * @since JDK1.8 */ @Configuration -public class SmartKaptchaConfig { +public class SmartCaptchaConfig { + /** + * 图形验证码配置 + * + * @return + */ @Bean - public DefaultKaptcha getDefaultKaptcha(){ - DefaultKaptcha defaultKaptcha=new DefaultKaptcha(); - Properties properties=new Properties(); - properties.setProperty("kaptcha.border", "no"); - properties.setProperty("kaptcha.border.color", "34,114,200"); - properties.setProperty("kaptcha.image.width", "125"); - properties.setProperty("kaptcha.image.height", "45"); - properties.setProperty("kaptcha.textproducer.char.string", "0123456789"); - properties.setProperty("kaptcha.textproducer.char.length", "4"); - properties.setProperty("kaptcha.textproducer.font.names", "Arial,Arial Narrow,Serif,Helvetica,Tahoma,Times New Roman,Verdana"); - properties.setProperty("kaptcha.textproducer.font.size", "38"); + public DefaultKaptcha getDefaultCaptcha() { + DefaultKaptcha defaultKaptcha = new DefaultKaptcha(); + Properties properties = new Properties(); + properties.setProperty("kaptcha.border", "no" ); + properties.setProperty("kaptcha.border.color", "34,114,200" ); + properties.setProperty("kaptcha.image.width", "125" ); + properties.setProperty("kaptcha.image.height", "45" ); + properties.setProperty("kaptcha.textproducer.char.string", "123456789" ); + properties.setProperty("kaptcha.textproducer.char.length", "4" ); + properties.setProperty("kaptcha.textproducer.font.names", "Arial,Arial Narrow,Serif,Helvetica,Tahoma,Times New Roman,Verdana" ); + properties.setProperty("kaptcha.textproducer.font.size", "38" ); - properties.setProperty("kaptcha.background.clear.from", "white"); - properties.setProperty("kaptcha.background.clear.to", "white"); + properties.setProperty("kaptcha.background.clear.from", "white" ); + properties.setProperty("kaptcha.background.clear.to", "white" ); - properties.setProperty("kaptcha.word.impl", KaptchaWordRenderer.class.getName()); - properties.setProperty("kaptcha.noise.impl", KaptchaNoise.class.getName()); + properties.setProperty("kaptcha.word.impl", CaptchaWordRenderer.class.getName()); + properties.setProperty("kaptcha.noise.impl", CaptchaNoise.class.getName()); - Config config=new Config(properties); + Config config = new Config(properties); defaultKaptcha.setConfig(config); return defaultKaptcha; } diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartConverterStringToLocalDate.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartConverterStringToLocalDate.java new file mode 100644 index 00000000..1eb1a1f1 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartConverterStringToLocalDate.java @@ -0,0 +1,34 @@ +package net.lab1024.smartadmin.service.config; + +import net.lab1024.smartadmin.service.util.date.SmartDateFormatterEnum; +import net.lab1024.smartadmin.service.util.date.SmartLocalDateUtil; +import org.apache.commons.lang3.StringUtils; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.convert.converter.Converter; + +import java.time.LocalDate; +import java.time.format.DateTimeParseException; + +/** + * string 转为 LocalDate 配置类 + * + * @author 胡克 + * @date 2020/3/6 14:34 + */ +@Configuration +public class SmartConverterStringToLocalDate implements Converter { + + @Override + public LocalDate convert(String str) { + if (StringUtils.isBlank(str)) { + return null; + } + LocalDate localDate; + try { + localDate = SmartLocalDateUtil.parseDate(str, SmartDateFormatterEnum.YMD); + } catch (DateTimeParseException e) { + throw new RuntimeException("请输入正确的日期格式:yyyy-MM-dd"); + } + return localDate; + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartConverterStringToLocalDateTime.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartConverterStringToLocalDateTime.java new file mode 100644 index 00000000..4bdbf494 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartConverterStringToLocalDateTime.java @@ -0,0 +1,37 @@ +package net.lab1024.smartadmin.service.config; + +import net.lab1024.smartadmin.service.util.date.SmartDateFormatterEnum; +import net.lab1024.smartadmin.service.util.date.SmartLocalDateUtil; +import org.apache.commons.lang3.StringUtils; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.convert.converter.Converter; + +import java.time.LocalDateTime; +import java.time.format.DateTimeParseException; + +/** + * string 转为 LocalDate 配置类 + * + * @author 胡克 + * @date 2020/3/6 14:34 + */ +@Configuration +public class SmartConverterStringToLocalDateTime implements Converter { + + + @Override + public LocalDateTime convert(String str) { + if (StringUtils.isBlank(str)) { + return null; + } + LocalDateTime localDateTime; + try { + localDateTime = SmartLocalDateUtil.parse(str, SmartDateFormatterEnum.YMD_HMS); + } catch (DateTimeParseException e) { + throw new RuntimeException("请输入正确的日期格式:yyyy-MM-dd HH:mm:ss"); + } + return localDateTime; + } + + +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartDruidDataSourceConfig.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartDruidDataSourceConfig.java similarity index 62% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartDruidDataSourceConfig.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartDruidDataSourceConfig.java index 560bda2a..c476a87b 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartDruidDataSourceConfig.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartDruidDataSourceConfig.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.config; +package net.lab1024.smartadmin.service.config; import com.alibaba.druid.filter.Filter; import com.alibaba.druid.filter.stat.StatFilter; @@ -6,17 +6,25 @@ import com.alibaba.druid.pool.DruidDataSource; import com.alibaba.druid.support.http.StatViewServlet; import com.alibaba.druid.support.http.WebStatFilter; import com.alibaba.druid.support.spring.stat.DruidStatInterceptor; -import com.alibaba.druid.util.JdbcConstants; +import com.baomidou.mybatisplus.annotation.DbType; +import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; +import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean; import lombok.extern.slf4j.Slf4j; +import org.apache.ibatis.plugin.Interceptor; +import org.apache.ibatis.session.SqlSessionFactory; import org.springframework.aop.support.DefaultPointcutAdvisor; import org.springframework.aop.support.JdkRegexpMethodPointcut; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.boot.web.servlet.ServletRegistrationBean; import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Conditional; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; +import org.springframework.core.io.Resource; +import org.springframework.core.io.support.PathMatchingResourcePatternResolver; import javax.sql.DataSource; import java.sql.SQLException; @@ -25,60 +33,59 @@ import java.util.HashMap; import java.util.Map; /** - * [ 数据源配置 ] + * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 + * @author 罗伊 + * @date 2020/8/25 11:57 */ @Slf4j @Configuration public class SmartDruidDataSourceConfig { @Value("${spring.datasource.driver-class-name}") - String driver; + private String driver; @Value("${spring.datasource.url}") - String url; + private String url; @Value("${spring.datasource.username}") - String username; + private String username; @Value("${spring.datasource.password}") - String password; + private String password; @Value("${spring.datasource.initial-size}") - int initialSize; + private int initialSize; @Value("${spring.datasource.min-idle}") - int minIdle; + private int minIdle; @Value("${spring.datasource.max-active}") - int maxActive; + private int maxActive; @Value("${spring.datasource.max-wait}") - long maxWait; + private long maxWait; @Value("${spring.datasource.time-between-eviction-runs-millis}") - long timeBetweenEvictionRunsMillis; + private long timeBetweenEvictionRunsMillis; @Value("${spring.datasource.min-evictable-idle-time-millis}") - long minEvictableIdleTimeMillis; + private long minEvictableIdleTimeMillis; @Value("${spring.datasource.filters}") - String filters; + private String filters; @Value("${spring.datasource.druid.username}") - String druidUserName; + private String druidUserName; @Value("${spring.datasource.druid.password}") - String druidPassword; + private String druidPassword; @Value("${spring.datasource.druid.login.enabled}") - boolean druidLoginEnable; + private boolean druidLoginEnable; + + @Value("${spring.datasource.druid.service.scanner}") + private String serviceScanner; @Autowired private StatFilter logSlowSql; @@ -86,11 +93,14 @@ public class SmartDruidDataSourceConfig { @Autowired private DruidStatInterceptor druidStatInterceptor; + @Autowired + private MybatisPlusInterceptor mybatisPlusInterceptor; + @Bean @Primary public DataSource druidDataSource() { DruidDataSource druidDataSource = new DruidDataSource(); - druidDataSource.setDbType(JdbcConstants.MYSQL); + druidDataSource.setDbType(DbType.MYSQL.getDb()); druidDataSource.setDriverClassName(driver); druidDataSource.setUrl(url); druidDataSource.setUsername(username); @@ -101,6 +111,7 @@ public class SmartDruidDataSourceConfig { druidDataSource.setMaxWait(maxWait); druidDataSource.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis); druidDataSource.setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis); + druidDataSource.setValidationQuery("SELECT 1"); try { druidDataSource.setFilters(filters); ArrayList arrayList = new ArrayList<>(); @@ -115,12 +126,33 @@ public class SmartDruidDataSourceConfig { } @Bean - public ServletRegistrationBean druidServlet() { - ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(); + public SqlSessionFactory sqlSessionFactory() throws Exception { + MybatisSqlSessionFactoryBean factoryBean = new MybatisSqlSessionFactoryBean(); + factoryBean.setDataSource(druidDataSource()); + PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(); + Resource[] resources = resolver.getResources("classpath*:/mapper/**/*.xml"); + factoryBean.setMapperLocations(resources); + + // 设置 MyBatis-Plus 分页插件 + Interceptor[] plugins = {mybatisPlusInterceptor}; + factoryBean.setPlugins(plugins); + + return factoryBean.getObject(); + } + + /** + * 非正式环境 加载 + * + * @return + */ + @Bean + @Conditional(SmartSystemEnvNotProdCondition.class) + public ServletRegistrationBean druidServlet() { + ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(); servletRegistrationBean.setServlet(new StatViewServlet()); servletRegistrationBean.addUrlMappings("/druid/*"); Map initParameters = new HashMap(); - //不设置用户名密码可以直接通过druid/index.html访问 + // 不设置用户名密码可以直接通过druid/index.html访问 if (druidLoginEnable) { initParameters.put("loginUsername", druidUserName); initParameters.put("loginPassword", druidPassword); @@ -131,11 +163,11 @@ public class SmartDruidDataSourceConfig { } @Bean - public FilterRegistrationBean filterRegistrationBean() { - FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(); + public FilterRegistrationBean filterRegistrationBean() { + FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(); filterRegistrationBean.setFilter(new WebStatFilter()); filterRegistrationBean.addUrlPatterns("/*"); - filterRegistrationBean.addInitParameter("exclusions", "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"); + filterRegistrationBean.addInitParameter("exclusions", "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/*"); return filterRegistrationBean; } @@ -143,21 +175,20 @@ public class SmartDruidDataSourceConfig { public StatFilter logSlowSql() { StatFilter statFilter = new StatFilter(); statFilter.setMergeSql(true); - statFilter.setSlowSqlMillis(300); + statFilter.setSlowSqlMillis(500); statFilter.setLogSlowSql(true); return statFilter; } @Bean(name = "druid-stat-interceptor") public DruidStatInterceptor druidStatInterceptor() { - DruidStatInterceptor dsInterceptor = new DruidStatInterceptor(); - return dsInterceptor; + return new DruidStatInterceptor(); } @Bean public JdkRegexpMethodPointcut jdkRegexpMethodPointcut() { JdkRegexpMethodPointcut jdkRegexpMethodPointcut = new JdkRegexpMethodPointcut(); - jdkRegexpMethodPointcut.setPatterns("net.lab1024.smartadmin.module..*Service.*"); + jdkRegexpMethodPointcut.setPatterns(serviceScanner); return jdkRegexpMethodPointcut; } diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartHeartBeatConfig.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartHeartBeatConfig.java new file mode 100644 index 00000000..27b21521 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartHeartBeatConfig.java @@ -0,0 +1,40 @@ +package net.lab1024.smartadmin.service.config; + +import net.lab1024.smartadmin.service.module.support.heartbeat.HeartBeatRecordHandler; +import net.lab1024.smartadmin.service.module.support.heartbeat.core.HeartBeatManager; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * [ 服务心跳配置 ] + * + * @author 罗伊 + * @date 2021/1/9 14:13 + */ +@Configuration +public class SmartHeartBeatConfig { + + /** + * 延迟执行时间 + */ + @Value("${heart-beat.delayHandlerTime}") + private Long delayHandlerTime; + + /** + * 间隔执行时间 + */ + @Value("${heart-beat.intervalTime}") + private Long intervalTime; + + @Autowired + private HeartBeatRecordHandler heartBeatRecordHandler; + + + @Bean + public HeartBeatManager heartBeatManager(){ + return new HeartBeatManager(delayHandlerTime,intervalTime,heartBeatRecordHandler); + } +} \ No newline at end of file diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartMybatisPlusConfig.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartMybatisPlusConfig.java new file mode 100644 index 00000000..a9454bc5 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartMybatisPlusConfig.java @@ -0,0 +1,30 @@ +package net.lab1024.smartadmin.service.config; + +import com.baomidou.mybatisplus.annotation.DbType; +import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; +import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.transaction.annotation.EnableTransactionManagement; + +/** + * MybatisPlus 配置 + * + * @author listen + * @date 2021/06/06 19:30 + */ +@Configuration +@EnableTransactionManagement +public class SmartMybatisPlusConfig { + + /** + * 分页插件 + */ + @Bean + public MybatisPlusInterceptor paginationInterceptor() { + MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); + interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); + return interceptor; + } + +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartRedisConfig.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartRedisConfig.java similarity index 93% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartRedisConfig.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartRedisConfig.java index 829ca01f..1d57b412 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartRedisConfig.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartRedisConfig.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.config; +package net.lab1024.smartadmin.service.config; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.PropertyAccessor; @@ -14,12 +14,8 @@ import org.springframework.data.redis.serializer.StringRedisSerializer; /** * [ redis配置 ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 + * @author 罗伊 + * @date 2020/8/25 11:57 */ @Configuration public class SmartRedisConfig { @@ -70,5 +66,4 @@ public class SmartRedisConfig { return redisTemplate.opsForZSet(); } - } diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartRedisMqConfig.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartRedisMqConfig.java new file mode 100644 index 00000000..f0f8f919 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartRedisMqConfig.java @@ -0,0 +1,68 @@ +package net.lab1024.smartadmin.service.config; + +import lombok.extern.slf4j.Slf4j; +import net.lab1024.smartadmin.service.module.support.redismq.RedisMqTopicEnum; +import net.lab1024.smartadmin.service.module.support.redismq.RedisMsgHandler; +import net.lab1024.smartadmin.service.util.SmartBaseEnumUtil; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.data.redis.connection.RedisConnectionFactory; +import org.springframework.data.redis.listener.PatternTopic; +import org.springframework.data.redis.listener.RedisMessageListenerContainer; +import org.springframework.data.redis.listener.adapter.MessageListenerAdapter; + +/** + * [ ] + * + * @author 罗伊 + * @date + */ +@Slf4j +@Configuration +public class SmartRedisMqConfig { + + @Value("${redis.mq.topic:SmartAdmin}") + private String topic; + @Value("${redis.mq.scanPath:net.lab1024.smartadmin.service}") + private String scanPath; + + /** + * redis topic + * @param connectionFactory + * @param listenerAdapter + * @return + */ + @Bean + public RedisMessageListenerContainer container(RedisConnectionFactory connectionFactory, MessageListenerAdapter listenerAdapter) { + RedisMessageListenerContainer container = new RedisMessageListenerContainer(); + container.setConnectionFactory(connectionFactory); + boolean checkEnum = SmartBaseEnumUtil.checkEnum(topic, RedisMqTopicEnum.class); + if (!checkEnum) { + log.error("topic:{},系统暂未定义", topic); + throw new RuntimeException("无效的redis topic"); + } + container.addMessageListener(listenerAdapter, new PatternTopic(topic)); + return container; + } + + /** + * redis消息处理类 + * @return + */ + @Bean + public RedisMsgHandler redisMsgHandler() { + return new RedisMsgHandler(scanPath); + } + + /** + * redis消息处理方法 + * @param receiver + * @return + */ + @Bean + public MessageListenerAdapter listenerAdapter(RedisMsgHandler receiver) { + return new MessageListenerAdapter(receiver, RedisMsgHandler.METHOD_NAME); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartRepeatSubmitAspectConfig.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartRepeatSubmitAspectConfig.java new file mode 100644 index 00000000..f8d81b85 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartRepeatSubmitAspectConfig.java @@ -0,0 +1,43 @@ +package net.lab1024.smartadmin.service.config; + +import com.alibaba.fastjson.JSON; +import net.lab1024.smartadmin.service.module.support.repeatsubmit.SmartRepeatSubmitAspect; +import net.lab1024.smartadmin.service.module.support.repeatsubmit.SmartRepeatSubmitUserDTO; +import net.lab1024.smartadmin.service.module.system.login.domain.EmployeeLoginInfoDTO; +import net.lab1024.smartadmin.service.util.SmartEmployeeTokenUtil; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import javax.servlet.http.HttpServletRequest; + +/** + * [ 接口重复提交配置 ] + * + * @author 罗伊 + * @date 2021/1/27 11:22 + */ +@Configuration +public class SmartRepeatSubmitAspectConfig { + + @Bean + public SmartRepeatSubmitAspect repeatSubmitAspect() { + return new SmartRepeatSubmitAspect(this::userFunction); + } + + /** + * 请求用户信息 + * + * @return + */ + private SmartRepeatSubmitUserDTO userFunction(HttpServletRequest request) { + EmployeeLoginInfoDTO requestEmployee = SmartEmployeeTokenUtil.getRequestEmployee(); + if(requestEmployee == null){ + return null; + } + SmartRepeatSubmitUserDTO repeatSubmitUserDTO = new SmartRepeatSubmitUserDTO(); + repeatSubmitUserDTO.setUserId(requestEmployee.getEmployeeId()); + repeatSubmitUserDTO.setUserName(requestEmployee.getActualName()); + repeatSubmitUserDTO.setExtData(JSON.toJSONString(requestEmployee)); + return repeatSubmitUserDTO; + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartResponseEncryptAspectConfig.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartResponseEncryptAspectConfig.java new file mode 100644 index 00000000..e203bbdf --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartResponseEncryptAspectConfig.java @@ -0,0 +1,45 @@ +package net.lab1024.smartadmin.service.config; + +import com.alibaba.fastjson.JSON; +import net.lab1024.smartadmin.service.module.support.responseencrypt.ResponseEncryptDecryptAspect; +import net.lab1024.smartadmin.service.module.support.responseencrypt.ResponseEncryptDecryptUserDTO; +import net.lab1024.smartadmin.service.module.system.login.domain.EmployeeLoginInfoDTO; +import net.lab1024.smartadmin.service.util.SmartEmployeeTokenUtil; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import javax.servlet.http.HttpServletRequest; + +/** + * [ 接口加解密配置 ] + * + * @author 罗伊 + * @date 2021/1/27 11:22 + */ +@Configuration +public class SmartResponseEncryptAspectConfig { + + + @Bean + public ResponseEncryptDecryptAspect responseEncryptAspect() { + return new ResponseEncryptDecryptAspect(this::employeeFunction); + } + + /** + * 请求用户信息 + * @param request + * @return + */ + private ResponseEncryptDecryptUserDTO employeeFunction(HttpServletRequest request){ + EmployeeLoginInfoDTO employeeLoginInfoDTO = SmartEmployeeTokenUtil.getRequestEmployee(); + if(employeeLoginInfoDTO == null){ + return null; + } + ResponseEncryptDecryptUserDTO responseEncryptDecryptUserDTO = new ResponseEncryptDecryptUserDTO(); + responseEncryptDecryptUserDTO.setUserId(employeeLoginInfoDTO.getEmployeeId()); + responseEncryptDecryptUserDTO.setUserName(employeeLoginInfoDTO.getActualName()); + responseEncryptDecryptUserDTO.setExtData(JSON.toJSONString(employeeLoginInfoDTO)); + return responseEncryptDecryptUserDTO; + } + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartRestTemplateConfig.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartRestTemplateConfig.java new file mode 100644 index 00000000..bc671e69 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartRestTemplateConfig.java @@ -0,0 +1,126 @@ +package net.lab1024.smartadmin.service.config; + +import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter; +import okhttp3.ConnectionPool; +import okhttp3.OkHttpClient; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.MediaType; +import org.springframework.http.client.OkHttp3ClientHttpRequestFactory; +import org.springframework.http.converter.HttpMessageConverter; +import org.springframework.http.converter.StringHttpMessageConverter; +import org.springframework.web.client.RestTemplate; + +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSocketFactory; +import javax.net.ssl.TrustManager; +import javax.net.ssl.X509TrustManager; +import java.nio.charset.StandardCharsets; +import java.security.KeyManagementException; +import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.TimeUnit; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/8/25 11:57 + */ +@Configuration +public class SmartRestTemplateConfig { + + @Value("${http.pool.max-total}") + private Integer maxTotal; + + @Value("${http.pool.connect-timeout}") + private Integer connectTimeout; + + @Value("${http.pool.read-timeout}") + private Integer readTimeout; + + @Value("${http.pool.write-timeout}") + private Integer writeTimeout; + + @Value("${http.pool.keep-alive}") + private Integer keepAlive; + + @Bean + public RestTemplate restTemplate() { + RestTemplate restTemplate = new RestTemplate(); + restTemplate.setRequestFactory(this.clientHttpRequestFactory()); + List> messageConverterList = restTemplate.getMessageConverters(); + messageConverterList.add(0, new StringHttpMessageConverter(StandardCharsets.UTF_8)); + messageConverterList.addAll(converters()); + return restTemplate; + } + + public List> converters() { + List> converters = new ArrayList<>(); + HttpMessageConverter converter = new StringHttpMessageConverter(StandardCharsets.UTF_8); + FastJsonHttpMessageConverter fastConverter = new FastJsonHttpMessageConverter(); + List fastMediaTypes = new ArrayList<>(); + fastMediaTypes.add(MediaType.APPLICATION_FORM_URLENCODED); + fastMediaTypes.add(MediaType.APPLICATION_JSON); + fastConverter.setSupportedMediaTypes(fastMediaTypes); + converters.add(converter); + converters.add(fastConverter); + return converters; + } + + + public OkHttp3ClientHttpRequestFactory clientHttpRequestFactory() { + return new OkHttp3ClientHttpRequestFactory(httpClientBuilder()); + } + + public OkHttpClient httpClientBuilder() { + return new OkHttpClient.Builder() + .retryOnConnectionFailure(false) + .connectionPool(this.pool()) + .connectTimeout(connectTimeout, TimeUnit.MILLISECONDS) + .readTimeout(readTimeout,TimeUnit.MILLISECONDS) + .writeTimeout(writeTimeout,TimeUnit.MILLISECONDS) + .build(); + } + + public ConnectionPool pool() { + return new ConnectionPool(maxTotal, keepAlive, TimeUnit.MILLISECONDS); + } + + + @Bean + public X509TrustManager x509TrustManager() { + return new X509TrustManager() { + @Override + public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException { + } + @Override + public void checkServerTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException { + } + @Override + public X509Certificate[] getAcceptedIssuers() { + return new X509Certificate[0]; + } + }; + } + + @Bean + public SSLSocketFactory sslSocketFactory() { + try { + //信任任何链接 + SSLContext sslContext = SSLContext.getInstance("TLS"); + sslContext.init(null, new TrustManager[]{x509TrustManager()}, new SecureRandom()); + return sslContext.getSocketFactory(); + } catch (NoSuchAlgorithmException | KeyManagementException e) { + e.printStackTrace(); + } + return null; + } + + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartSchedulingConfig.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartSchedulingConfig.java new file mode 100644 index 00000000..dd7e20c2 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartSchedulingConfig.java @@ -0,0 +1,51 @@ +package net.lab1024.smartadmin.service.config; + +import lombok.extern.slf4j.Slf4j; +import org.apache.logging.log4j.util.Strings; +import org.springframework.context.annotation.Configuration; +import org.springframework.scheduling.annotation.SchedulingConfigurer; +import org.springframework.scheduling.config.ScheduledTaskRegistrar; +import org.springframework.scheduling.config.Task; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +/** + * @author 卓大 + * @Date 2020/5/22 + */ +@Slf4j +@Configuration +public class SmartSchedulingConfig implements SchedulingConfigurer { + + private ScheduledTaskRegistrar taskRegistrar; + + public ScheduledTaskRegistrar getTaskRegistrar() { + return taskRegistrar; + } + + /** + * 结束定时任务 + */ + public void destroy() { + List taskList = new ArrayList<>(); + taskList.addAll(taskRegistrar.getCronTaskList()); + taskList.addAll(taskRegistrar.getTriggerTaskList()); + taskList.addAll(taskRegistrar.getFixedDelayTaskList()); + taskList.addAll(taskRegistrar.getFixedRateTaskList()); + + List taskName = taskList.stream().map(Task::toString).collect(Collectors.toList()); + + taskRegistrar.destroy(); + + log.warn("已结束定时任务:\n{}", Strings.join(taskName, '\n')); + } + + @Override + public void configureTasks(ScheduledTaskRegistrar taskRegistrar) { + this.taskRegistrar = taskRegistrar; + } + + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartSerializerLocalDateTimeConfig.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartSerializerLocalDateTimeConfig.java new file mode 100644 index 00000000..3891eaad --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartSerializerLocalDateTimeConfig.java @@ -0,0 +1,31 @@ +package net.lab1024.smartadmin.service.config; + +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import net.lab1024.smartadmin.service.util.date.SmartDateFormatterEnum; +import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * java8 localDate 时间类格式化配置 + * + * @author listen + * @date 2021年8月31日 21:19 + */ +@Configuration +public class SmartSerializerLocalDateTimeConfig { + + @Bean + public Jackson2ObjectMapperBuilderCustomizer customizer() { + return builder -> { + builder.deserializers(new LocalDateDeserializer(SmartDateFormatterEnum.YMD.getFormatter())); + builder.deserializers(new LocalDateTimeDeserializer(SmartDateFormatterEnum.YMD_HMS.getFormatter())); + builder.serializers(new LocalDateSerializer(SmartDateFormatterEnum.YMD.getFormatter())); + builder.serializers(new LocalDateTimeSerializer(SmartDateFormatterEnum.YMD_HMS.getFormatter())); + }; + } + +} \ No newline at end of file diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartStorageCloudConfig.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartStorageCloudConfig.java new file mode 100644 index 00000000..e76f5e96 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartStorageCloudConfig.java @@ -0,0 +1,64 @@ +package net.lab1024.smartadmin.service.config; + +import com.amazonaws.ClientConfiguration; +import com.amazonaws.Protocol; +import com.amazonaws.auth.AWSStaticCredentialsProvider; +import com.amazonaws.auth.BasicAWSCredentials; +import com.amazonaws.client.builder.AwsClientBuilder; +import com.amazonaws.services.s3.AmazonS3; +import com.amazonaws.services.s3.AmazonS3ClientBuilder; +import lombok.Data; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + + +/** + * @author Administrator + */ +@Data +@Configuration +@ConditionalOnProperty(prefix = "file.storage", name = {"mode"}, havingValue = "cloud") +public class SmartStorageCloudConfig { + + @Value("${file.storage.cloud.region}") + private String region; + + @Value("${file.storage.cloud.endpoint}") + private String endpoint; + + @Value("${file.storage.cloud.bucket-name}") + private String bucketName; + + @Value("${file.storage.cloud.access-key}") + private String accessKey; + + @Value("${file.storage.cloud.secret-key}") + private String secretKey; + + @Value("${file.storage.cloud.url.expire}") + private Long urlExpire; + + @Value("${file.storage.cloud.url.public}") + private String publicUrl; + + /** + * 初始化 云oss client 配置 + * + * @return + */ + @Bean + public AmazonS3 initAmazonS3() { + ClientConfiguration clientConfig = new ClientConfiguration(); + clientConfig.setProtocol(Protocol.HTTPS); + AmazonS3 s3Client = AmazonS3ClientBuilder.standard() + .withCredentials(new AWSStaticCredentialsProvider(new BasicAWSCredentials(accessKey, secretKey))) + .withClientConfiguration(clientConfig) + .withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(endpoint, region)) + .withPathStyleAccessEnabled(false) + .build(); + return s3Client; + } + +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartSwaggerDynamicGroupConfig.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartSwaggerDynamicGroupConfig.java similarity index 56% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartSwaggerDynamicGroupConfig.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartSwaggerDynamicGroupConfig.java index aad7b175..21bc6c1d 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartSwaggerDynamicGroupConfig.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartSwaggerDynamicGroupConfig.java @@ -1,6 +1,5 @@ -package net.lab1024.smartadmin.config; +package net.lab1024.smartadmin.service.config; -import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j; import com.google.common.base.Optional; import com.google.common.base.Predicate; import com.google.common.base.Predicates; @@ -8,8 +7,8 @@ import com.google.common.collect.Lists; import com.google.common.collect.Maps; import io.swagger.annotations.Api; import lombok.extern.slf4j.Slf4j; -import net.lab1024.smartadmin.constant.SwaggerTagConst; -import net.lab1024.smartadmin.interceptor.SmartAuthenticationInterceptor; +import net.lab1024.smartadmin.service.common.constant.CommonConst; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeansException; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; @@ -17,10 +16,10 @@ import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor; import org.springframework.context.EnvironmentAware; +import org.springframework.context.annotation.Conditional; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; import org.springframework.core.env.Environment; -import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; import springfox.documentation.RequestHandler; import springfox.documentation.builders.ApiInfoBuilder; @@ -28,41 +27,29 @@ import springfox.documentation.builders.ParameterBuilder; import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.schema.ModelRef; -import springfox.documentation.service.*; +import springfox.documentation.service.ApiInfo; import springfox.documentation.spi.DocumentationType; -import springfox.documentation.spi.service.contexts.SecurityContext; import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.swagger2.annotations.EnableSwagger2; import java.lang.reflect.Field; import java.lang.reflect.Modifier; -import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; /** - * [ 根据SwaggerTagConst内部类动态生成Swagger group ] + * [ 根据SwaggerTagConst内部类动态生成Swagger ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/8/7 0007 下午 19:20 - * @since JDK1.8 + * @author 罗伊 + * @date 2020/8/25 11:57 */ @Slf4j @EnableSwagger2 -@EnableKnife4j @Configuration -@Profile({"dev", "sit", "pre", "prod"}) +@Conditional(SmartSystemEnvNotProdCondition.class) public class SmartSwaggerDynamicGroupConfig implements EnvironmentAware, BeanDefinitionRegistryPostProcessor { - /** - * 分组名称 - */ - private String apiGroupName; - /** * 文档标题 */ @@ -88,6 +75,16 @@ public class SmartSwaggerDynamicGroupConfig implements EnvironmentAware, BeanDef */ private String packAge; + /** + * host + */ + private String host; + + /** + * 接口Tag类 + */ + private String swaggerTagClass; + private int groupIndex = 0; private String groupName = "default"; @@ -98,12 +95,13 @@ public class SmartSwaggerDynamicGroupConfig implements EnvironmentAware, BeanDef @Override public void setEnvironment(Environment environment) { - this.apiGroupName = environment.getProperty("swagger.apiGroupName"); - this.title = environment.getProperty("swagger.title"); - this.description = environment.getProperty("swagger.description"); - this.version = environment.getProperty("swagger.version"); - this.serviceUrl = environment.getProperty("swagger.serviceUrl"); - this.packAge = environment.getProperty("swagger.packAge"); + this.title = environment.getProperty("swagger.title" ); + this.description = environment.getProperty("swagger.description" ); + this.version = environment.getProperty("swagger.version" ); + this.serviceUrl = environment.getProperty("swagger.serviceUrl" ); + this.packAge = environment.getProperty("swagger.packAge" ); + this.host = environment.getProperty("swagger.host" ); + this.swaggerTagClass = environment.getProperty("swagger.tagClass" ); } @Override @@ -118,8 +116,15 @@ public class SmartSwaggerDynamicGroupConfig implements EnvironmentAware, BeanDef } private void groupBuild() { - Class clazz = SwaggerTagConst.class; - Class[] innerClazz = clazz.getDeclaredClasses(); + Class clazz = null; + try { + clazz = Class.forName(swaggerTagClass); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + log.error("swaggerTagClass unfounded :{}", swaggerTagClass); + return; + } + Class[] innerClazz = clazz.getClasses(); for (Class cls : innerClazz) { String group = cls.getSimpleName(); List apiTags = Lists.newArrayList(); @@ -140,57 +145,33 @@ public class SmartSwaggerDynamicGroupConfig implements EnvironmentAware, BeanDef } private Docket baseDocket() { - // 配置全局参数 token + // 配置全局参数 token header ParameterBuilder tokenPar = new ParameterBuilder(); - Parameter parameter = tokenPar.name(SmartAuthenticationInterceptor.TOKEN_NAME) - .description("token") - .modelRef(new ModelRef("string")) - .parameterType("header") - .defaultValue("") + tokenPar.name(CommonConst.Token.OUTER_TOKEN_NAME) + .description("token" ) + .modelRef(new ModelRef("string" )) + .parameterType("header" ).defaultValue("1" ) .required(false) .build(); - // 请求类型过滤规则 - Predicate controllerPredicate = getControllerPredicate(); - // controller 包路径 - Predicate controllerPackage = RequestHandlerSelectors.basePackage(packAge); - return new Docket(DocumentationType.SWAGGER_2) + // 此行必须放在配置前面执行 因为要初始化groupName + Predicate controllerPredicate = this.getControllerPredicate(); + // swagger配置 + Docket docket = new Docket(DocumentationType.SWAGGER_2) .groupName(groupName) .forCodeGeneration(true) .select() - .apis(controllerPackage) + .apis(RequestHandlerSelectors.basePackage(packAge)) .apis(controllerPredicate) .paths(PathSelectors.any()) - .build() - .apiInfo(this.serviceApiInfo()) - .securitySchemes(securitySchemes()) - .securityContexts(securityContexts()) - .globalOperationParameters(Lists.newArrayList(parameter)); - } + .build().apiInfo(this.serviceApiInfo()) + .globalOperationParameters(Lists.newArrayList(tokenPar.build())); - private List securitySchemes() { - List apiKeyList = new ArrayList<>(); - apiKeyList.add(new ApiKey("x-access-token", "x-access-token", "header")); - return apiKeyList; - } + if (StringUtils.isNotBlank(host)) { + docket = docket.host(host); + } - private List securityContexts() { - List securityContexts = new ArrayList<>(); - securityContexts.add( - SecurityContext.builder() - .securityReferences(defaultAuth()) - .forPaths(PathSelectors.any()) - .build()); - return securityContexts; - } - - List defaultAuth() { - AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything"); - AuthorizationScope[] authorizationScopes = new AuthorizationScope[1]; - authorizationScopes[0] = authorizationScope; - List securityReferences = new ArrayList<>(); - securityReferences.add(new SecurityReference("x-access-token", authorizationScopes)); - return securityReferences; + return docket; } private Predicate getControllerPredicate() { @@ -203,34 +184,18 @@ public class SmartSwaggerDynamicGroupConfig implements EnvironmentAware, BeanDef api = apiOptional.get(); } List tags = Arrays.asList(api.tags()); - if (api != null && apiTags.containsAll(tags)) { - return true; - } - return false; + return apiTags.containsAll(tags); }; groupIndex++; - return Predicates.or( - Predicates.and(RequestHandlerSelectors.withClassAnnotation(RestController.class), methodPredicate), - Predicates.and( - RequestHandlerSelectors.withMethodAnnotation(ResponseBody.class), methodPredicate) - ); + return Predicates.and(RequestHandlerSelectors.withClassAnnotation(RestController.class), methodPredicate); } private ApiInfo serviceApiInfo() { - return new ApiInfoBuilder() - .title(title) - .description(description) - .version(version) - .license("Apache License Version 2.0") - .contact(new Contact("1024创新实验室", "http://www.1024lab.net", "")) - .termsOfServiceUrl(serviceUrl) - .build(); + return new ApiInfoBuilder().title(title).description(description).version(version).termsOfServiceUrl(serviceUrl).build(); } @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory configurableListableBeanFactory) throws BeansException { } - - } diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartSystemEnvNotProdCondition.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartSystemEnvNotProdCondition.java new file mode 100644 index 00000000..46ab0be6 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartSystemEnvNotProdCondition.java @@ -0,0 +1,35 @@ +package net.lab1024.smartadmin.service.config; + +import net.lab1024.smartadmin.service.common.constant.SystemEnvironmentEnum; +import net.lab1024.smartadmin.service.util.SmartBaseEnumUtil; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Condition; +import org.springframework.context.annotation.ConditionContext; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.type.AnnotatedTypeMetadata; + +/** + * 当前系统环境 + * + * @author listen + * @date 2019/08/27 08:56 + */ +@Configuration +public class SmartSystemEnvNotProdCondition implements Condition { + + @Value("${spring.profiles.active}") + private String systemEnvironment; + + @Override + public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) { + String property = conditionContext.getEnvironment().getProperty("spring.profiles.active"); + return StringUtils.isNotBlank(property) && !SystemEnvironmentEnum.PROD.equalsValue(property); + } + + @Bean + public SystemEnvironmentEnum initEnvironment() { + return SmartBaseEnumUtil.getEnumByValue(systemEnvironment, SystemEnvironmentEnum.class); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartWebAppConfig.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartWebAppConfig.java new file mode 100644 index 00000000..358f434e --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/config/SmartWebAppConfig.java @@ -0,0 +1,48 @@ +package net.lab1024.smartadmin.service.config; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.HandlerInterceptor; +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +import java.util.Map; +import java.util.Map.Entry; + +/** + * @Description + * @Author 善逸 + * @Date Created in 2017/10/24 13:48 + */ +@Configuration +public class SmartWebAppConfig implements WebMvcConfigurer { + + @Autowired + private Map interceptorMp; + + @Value("${file.storage.local.path}") + private String localPath; + + @Override + public void addInterceptors(InterceptorRegistry registry) { + for(Entry entry : interceptorMp.entrySet()){ + registry.addInterceptor(entry.getValue()).addPathPatterns(entry.getKey() + "/**"); + } + + } + + @Override + public void addViewControllers(ViewControllerRegistry registry) { + registry.addViewController("/druidMonitor").setViewName("redirect:druid/index.html"); + registry.addViewController("/swaggerApi").setViewName("redirect:swagger-ui.html"); + } + + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + registry.addResourceHandler("/**") + .addResourceLocations("classpath:/META-INF/resources/","classpath:/resources/","classpath:/static/","file:" + localPath); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/filters/SmartTokenFilter.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/filters/SmartTokenFilter.java new file mode 100644 index 00000000..07155043 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/filters/SmartTokenFilter.java @@ -0,0 +1,66 @@ +package net.lab1024.smartadmin.service.filters; + +import net.lab1024.smartadmin.service.common.constant.CommonConst; +import net.lab1024.smartadmin.service.module.system.login.EmployeeLoginTokenService; +import net.lab1024.smartadmin.service.module.system.login.domain.EmployeeLoginBO; +import net.lab1024.smartadmin.service.module.system.login.domain.EmployeeLoginInfoDTO; +import net.lab1024.smartadmin.service.util.SmartBeanUtil; +import net.lab1024.smartadmin.service.util.SmartEmployeeTokenUtil; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.web.authentication.WebAuthenticationDetailsSource; +import org.springframework.stereotype.Component; +import org.springframework.web.filter.OncePerRequestFilter; + +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** + * token过滤器 + */ +@Component +public class SmartTokenFilter extends OncePerRequestFilter { + private static final String TOKEN_NAME = "x-access-token"; + + @Autowired + private EmployeeLoginTokenService loginTokenService; + + @Override + protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) + throws ServletException, IOException { + //需要做token校验, 消息头的token优先于请求query参数的token + String xHeaderToken = request.getHeader(TOKEN_NAME); + String xRequestToken = request.getParameter(TOKEN_NAME); + String xAccessToken = null != xHeaderToken ? xHeaderToken : xRequestToken; + if (StringUtils.isBlank(xAccessToken)) { + // 若未给予spring security上下文用户授权 则会授权失败 进入AuthenticationEntryPointImpl + chain.doFilter(request, response); + return; + } + + // 先清理spring security上下文 + SecurityContextHolder.clearContext(); + + // 判断请求分组 + String requestURI = request.getRequestURI(); + if (StringUtils.startsWithIgnoreCase(requestURI, CommonConst.ApiUrl.API_PREFIX_ADMIN)) { + // 后管 获取用户信息 + EmployeeLoginBO loginBO = loginTokenService.getEmployeeLoginBO(xAccessToken); + // 若获取到了登陆信息 则把用户信息设置到上下文中 + if (null != loginBO) { + SmartEmployeeTokenUtil.setUser(SmartBeanUtil.copy(loginBO, EmployeeLoginInfoDTO.class)); + UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(loginBO, null, loginBO.getAuthorities()); + authenticationToken.setDetails(new WebAuthenticationDetailsSource().buildDetails(request)); + SecurityContextHolder.getContext().setAuthentication(authenticationToken); + } + } + + // 若未给予spring security上下文用户授权 则会授权失败 进入AuthenticationEntryPointImpl + chain.doFilter(request, response); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/handler/AuthenticationFailHandler.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/handler/AuthenticationFailHandler.java new file mode 100644 index 00000000..6ca6e7c1 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/handler/AuthenticationFailHandler.java @@ -0,0 +1,39 @@ +package net.lab1024.smartadmin.service.handler; + +import com.alibaba.fastjson.JSONObject; +import net.lab1024.smartadmin.service.common.codeconst.LoginResponseCodeConst; +import net.lab1024.smartadmin.service.common.codeconst.ResponseCodeConst; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.web.AuthenticationEntryPoint; +import org.springframework.stereotype.Component; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** + * 认证失败处理 + */ +@Component +public class AuthenticationFailHandler implements AuthenticationEntryPoint { + + @Override + public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException e) throws IOException { + this.outputResult(response, LoginResponseCodeConst.LOGIN_ERROR); + } + + /** + * 输出 + * + * @param response + * @param respCode + * @throws IOException + */ + private void outputResult(HttpServletResponse response, ResponseCodeConst respCode) throws IOException { + String msg = JSONObject.toJSONString(ResponseDTO.wrap(respCode)); + response.setContentType("application/json;charset=UTF-8"); + response.getWriter().write(msg); + response.flushBuffer(); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/handler/SmartGlobalExceptionHandler.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/handler/SmartGlobalExceptionHandler.java new file mode 100644 index 00000000..37a80a9b --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/handler/SmartGlobalExceptionHandler.java @@ -0,0 +1,104 @@ +package net.lab1024.smartadmin.service.handler; + +import lombok.extern.slf4j.Slf4j; +import net.lab1024.smartadmin.service.common.codeconst.ResponseCodeConst; +import net.lab1024.smartadmin.service.common.constant.SystemEnvironmentEnum; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.common.exception.SmartBusinessException; +import org.springframework.beans.TypeMismatchException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.converter.HttpMessageNotReadableException; +import org.springframework.security.access.AccessDeniedException; +import org.springframework.validation.BindException; +import org.springframework.validation.FieldError; +import org.springframework.web.HttpRequestMethodNotSupportedException; +import org.springframework.web.bind.MethodArgumentNotValidException; +import org.springframework.web.bind.annotation.ControllerAdvice; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.context.request.RequestAttributes; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * [ 全局异常拦截 ] + * + * @author 罗伊 + * @date 2020/8/25 11:57 + */ +@Slf4j +@ControllerAdvice +public class SmartGlobalExceptionHandler { + + @Autowired + private SystemEnvironmentEnum systemEnvironmentEnum; + + /** + * 添加全局异常处理流程 + * + * @param e + * @return + * @throws Exception + */ + @ResponseBody + @ExceptionHandler(Exception.class) + public ResponseDTO exceptionHandler(Exception e) { + + // json 格式错误 + if (e instanceof HttpMessageNotReadableException) { + return ResponseDTO.wrap(ResponseCodeConst.JSON_FORMAT_ERROR); + } + + String uri = null; + RequestAttributes request = RequestContextHolder.getRequestAttributes(); + if (null != request) { + ServletRequestAttributes servletRequest = (ServletRequestAttributes) request; + uri = servletRequest.getRequest().getRequestURI(); + } + + // http 请求方式错误 + if (e instanceof HttpRequestMethodNotSupportedException) { + return ResponseDTO.wrap(ResponseCodeConst.REQUEST_METHOD_ERROR); + } + + // 参数类型错误 + if (e instanceof TypeMismatchException) { + return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM); + } + + // 参数校验未通过 + if (e instanceof MethodArgumentNotValidException) { + List fieldErrors = ((MethodArgumentNotValidException) e).getBindingResult().getFieldErrors(); + List msgList = fieldErrors.stream().map(FieldError::getDefaultMessage).collect(Collectors.toList()); + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, String.join(",", msgList)); + } + + // 参数绑定错误 + if (e instanceof BindException) { + List fieldErrors = ((BindException) e).getFieldErrors(); + List error = fieldErrors.stream().map(field -> field.getField() + ":" + field.getRejectedValue()).collect(Collectors.toList()); + String errorMsg = ResponseCodeConst.ERROR_PARAM.getMsg() + ":" + error.toString(); + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, errorMsg); + } + + if (e instanceof SmartBusinessException) { + return ResponseDTO.wrapMsg(ResponseCodeConst.SYSTEM_ERROR, e.getMessage()); + } + + if (e instanceof AccessDeniedException) { + return ResponseDTO.wrapMsg(ResponseCodeConst.SYSTEM_ERROR, "您暂无权限"); + } + + log.error("捕获全局异常,URL:{}", uri, e); + + // 正式环境 不返回错误信息 + if (SystemEnvironmentEnum.PROD == systemEnvironmentEnum) { + return ResponseDTO.wrap(ResponseCodeConst.SYSTEM_ERROR); + } + + return ResponseDTO.wrapMsg(ResponseCodeConst.SYSTEM_ERROR, e.toString()); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/interceptor/BusinessAuthorityInterceptor.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/interceptor/BusinessAuthorityInterceptor.java new file mode 100644 index 00000000..390939f5 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/interceptor/BusinessAuthorityInterceptor.java @@ -0,0 +1,60 @@ +package net.lab1024.smartadmin.service.interceptor; + +import net.lab1024.smartadmin.service.common.constant.CommonConst; +import net.lab1024.smartadmin.service.util.SmartEmployeeTokenUtil; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; +import org.springframework.web.servlet.HandlerInterceptor; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * [ 登录拦截器 ] + * + * @author 罗伊 + */ +@Component(CommonConst.ApiUrl.API_PREFIX_ADMIN) +public class BusinessAuthorityInterceptor implements HandlerInterceptor { + + @Value("${access-control-allow-origin}") + private String accessControlAllowOrigin; + + /** + * 拦截服务器端响应处理ajax请求返回结果 + * + * @param request + * @param response + * @param handler + * @return + * @throws Exception + */ + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { + //跨域设置 + this.crossDomainConfig(response); + return true; + } + + @Override + public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) { + SmartEmployeeTokenUtil.remove(); + } + + /** + * 配置跨域 + * + * @param response + */ + private void crossDomainConfig(HttpServletResponse response) { + response.setHeader("Access-Control-Allow-Origin", accessControlAllowOrigin); + response.setHeader("Access-Control-Allow-Credentials", "true"); + response.setHeader("Access-Control-Allow-Methods", "POST, GET, PUT, OPTIONS, DELETE, PATCH"); + response.setHeader("Access-Control-Expose-Headers", "*"); + response.setHeader("Access-Control-Allow-Headers", "Authentication,Origin, X-Requested-With, Content-Type, " + "Accept, x-access-token"); + response.setHeader("Cache-Control", "no-cache"); + response.setHeader("Pragma", "no-cache"); + response.setHeader("Expires ", "-1"); + } + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/interceptor/SupportAuthorityInterceptor.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/interceptor/SupportAuthorityInterceptor.java new file mode 100644 index 00000000..a8056c9d --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/interceptor/SupportAuthorityInterceptor.java @@ -0,0 +1,54 @@ +package net.lab1024.smartadmin.service.interceptor; + +import net.lab1024.smartadmin.service.common.constant.CommonConst; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; +import org.springframework.web.servlet.HandlerInterceptor; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * 公用api 拦截器 + * + * @author Administrator + */ +@Component(CommonConst.ApiUrl.API_PREFIX_SUPPORT) +public class SupportAuthorityInterceptor implements HandlerInterceptor { + + @Value("${access-control-allow-origin}") + private String accessControlAllowOrigin; + + /** + * 拦截服务器端响应处理ajax请求返回结果 + * + * @param request + * @param response + * @param handler + * @return + * @throws Exception + */ + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { + //跨域设置 + this.crossDomainConfig(response); + return true; + } + + /** + * 配置跨域 + * + * @param response + */ + private void crossDomainConfig(HttpServletResponse response) { + response.setHeader("Access-Control-Allow-Origin", accessControlAllowOrigin); + response.setHeader("Access-Control-Allow-Credentials", "true"); + response.setHeader("Access-Control-Allow-Methods", "POST, GET, PUT, OPTIONS, DELETE, PATCH"); + response.setHeader("Access-Control-Expose-Headers", "*"); + response.setHeader("Access-Control-Allow-Headers", "Authentication,Origin, X-Requested-With, Content-Type, " + "Accept, x-access-token"); + response.setHeader("Cache-Control", "no-cache"); + response.setHeader("Pragma", "no-cache"); + response.setHeader("Expires ", "-1"); + } + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/listener/SmartAdminStartupRunner.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/listener/SmartAdminStartupRunner.java new file mode 100644 index 00000000..0a8ddd25 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/listener/SmartAdminStartupRunner.java @@ -0,0 +1,29 @@ +package net.lab1024.smartadmin.service.listener; + +import lombok.extern.slf4j.Slf4j; +import net.lab1024.smartadmin.service.common.codeconst.ResponseCodeRegister; +import org.springframework.boot.CommandLineRunner; +import org.springframework.stereotype.Component; + +/** + * 应用启动加载 + * + * @author zhuo + * @version 1.0 + * @since JDK1.8 + */ +@Slf4j +@Component +public class SmartAdminStartupRunner implements CommandLineRunner { + + @Override + public void run(String... args) { + + log.info("###################### init start ######################"); + + // 初始化状态码 + ResponseCodeRegister.init(); + + log.info("###################### init complete ######################"); + } +} \ No newline at end of file diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/CategoryController.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/CategoryController.java new file mode 100644 index 00000000..c2317d23 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/CategoryController.java @@ -0,0 +1,57 @@ +package net.lab1024.smartadmin.service.module.business.category; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import net.lab1024.smartadmin.service.common.constant.SwaggerTagConst; +import net.lab1024.smartadmin.service.common.controller.AdminBaseController; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.business.category.domain.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; +import java.util.List; + +/** + * 类目 路由 + * + * @author 胡克 + * @date 2021/1/21 9:10 + */ +@Api(tags = SwaggerTagConst.Admin.MANAGER_CATEGORY) +@RestController +public class CategoryController extends AdminBaseController { + + @Autowired + private CategoryService categoryService; + + @ApiOperation("添加类目 by listen") + @PostMapping("/category/add") + public ResponseDTO add(@RequestBody @Valid CategoryAddDTO addDTO) { + return categoryService.add(addDTO); + } + + @ApiOperation("更新类目 by listen") + @PostMapping("/category/update") + public ResponseDTO update(@RequestBody @Valid CategoryUpdateDTO updateDTO) { + return categoryService.update(updateDTO); + } + + @ApiOperation("查询类目详情 by listen") + @GetMapping("/category/{categoryId}") + public ResponseDTO queryDetail(@PathVariable Long categoryId) { + return categoryService.queryDetail(categoryId); + } + + @ApiOperation("查询类目层级树 by listen") + @PostMapping("/category/tree") + public ResponseDTO> queryTree(@RequestBody @Valid CategoryTreeQueryDTO queryDTO) { + return categoryService.queryTree(queryDTO); + } + + @ApiOperation("删除类目 by listen") + @GetMapping("/category/del/{categoryId}") + public ResponseDTO delete(@PathVariable Long categoryId) { + return categoryService.delete(categoryId); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/CategoryDao.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/CategoryDao.java new file mode 100644 index 00000000..9fdd7464 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/CategoryDao.java @@ -0,0 +1,50 @@ +package net.lab1024.smartadmin.service.module.business.category; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import net.lab1024.smartadmin.service.module.business.category.constant.CategoryTypeEnum; +import net.lab1024.smartadmin.service.module.business.category.domain.CategoryEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * 类目 dao + * + * @author 胡克 + * @date 2021/1/20 16:29 + */ +@Component +@Mapper +public interface CategoryDao extends BaseMapper { + + /** + * 根据父级id 类型 查询子类 + * + * @param parentIdList + * @param categoryType {@link CategoryTypeEnum} + * @param deletedFlag + * @return + */ + List queryByParentId(@Param("parentIdList") List parentIdList, + @Param("categoryType") Integer categoryType, + @Param("deletedFlag") Boolean deletedFlag); + + /** + * 根据类型和id查询 + * @param categoryType + * @param categoryId + * @return + */ + CategoryEntity selectByTypeAndId(@Param("categoryType") Integer categoryType, @Param("categoryId") Long categoryId); + + /** + * 查看类目 具体条件 看sql + * + * @param entity + * @return + */ + CategoryEntity selectOne(CategoryEntity entity); + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/CategoryQueryService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/CategoryQueryService.java new file mode 100644 index 00000000..5240c8b7 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/CategoryQueryService.java @@ -0,0 +1,333 @@ +package net.lab1024.smartadmin.service.module.business.category; + +import com.google.common.collect.Lists; +import lombok.extern.slf4j.Slf4j; +import net.lab1024.smartadmin.service.common.constant.CacheModuleBaseConst; +import net.lab1024.smartadmin.service.common.constant.CommonConst; +import net.lab1024.smartadmin.service.module.business.category.domain.CategoryEntity; +import net.lab1024.smartadmin.service.module.business.category.domain.CategorySimpleDTO; +import net.lab1024.smartadmin.service.module.business.category.domain.CategoryTreeQueryDTO; +import net.lab1024.smartadmin.service.module.business.category.domain.CategoryTreeVO; +import net.lab1024.smartadmin.service.module.support.beancache.cache.IBeanCache; +import net.lab1024.smartadmin.service.module.support.beancache.key.CacheKey; +import net.lab1024.smartadmin.service.module.support.beancache.load.CacheLoad; +import net.lab1024.smartadmin.service.util.SmartBeanUtil; +import net.lab1024.smartadmin.service.util.SmartStringUtil; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.collections4.MapUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +/** + * 类目 查询 业务类 + * + * @author 胡克 + * @date 2021/1/20 16:26 + */ +@Service +@Slf4j +public class CategoryQueryService { + + @Autowired + private CategoryDao categoryDao; + + @Autowired + private IBeanCache cache; + + /** + * 查詢类目 + * + * @param cacheKey + * @return + */ + @CacheLoad(CacheModuleBaseConst.Category.CATEGORY) + public CategoryEntity queryCategory(String cacheKey) { + String businessId = CacheKey.getBusinessIdByCacheKey(cacheKey); + return categoryDao.selectById(businessId); + } + + /** + * 查询类目 子级 + * + * @param cacheKey + * @return + */ + @CacheLoad(CacheModuleBaseConst.Category.CATEGORY_SUB) + public List querySubCategory(String cacheKey) { + /** + * 下划线 分隔 key + * 左边 categoryId 右边 type + */ + String businessId = CacheKey.getBusinessIdByCacheKey(cacheKey); + String[] split = businessId.split(CommonConst.UNDERLINE); + Integer categoryType = split.length > 1 ? Integer.valueOf(split[1]) : null; + return categoryDao.queryByParentId(Lists.newArrayList(Long.valueOf(split[0])), categoryType, false); + } + + /** + * 以 类目id+下划线+类型 作为缓存key + * + * @param categoryId + * @param categoryType + * @return + */ + private static String getCacheId(Long categoryId, Integer categoryType) { + return categoryId + CommonConst.UNDERLINE + categoryType; + } + + /** + * 批量查询类目 子级 + * + * @param categoryIdList + * @return + */ + public Map> querySubCategoryFromCache(List categoryIdList) { + return categoryIdList.stream().collect(Collectors.toMap(Function.identity(), e -> { + String cacheKey = CacheKey.cacheKey(CacheModuleBaseConst.Category.CATEGORY_SUB, e.toString()); + return cache.get(cacheKey); + })); + } + + /** + * 根据 id 查询未删除的类目 + * + * @param categoryId + * @return 可能 null + */ + public Optional queryCategory(Long categoryId) { + if (null == categoryId) { + return Optional.empty(); + } + String cacheKey = CacheKey.cacheKey(CacheModuleBaseConst.Category.CATEGORY, categoryId.toString()); + CategoryEntity entity = cache.get(cacheKey); + if (null == entity || entity.getDeletedFlag()) { + return Optional.empty(); + } + return Optional.of(entity); + } + + /** + * 根据 类目id 查询未删除的子类 + * + * @param categoryId + * @return 没有返回空集合 + */ + public List queryCategoryByParent(Long categoryId, Integer categoryType) { + if (null == categoryId) { + return CommonConst.EMPTY_LIST; + } + String cacheKey = CacheKey.cacheKey(CacheModuleBaseConst.Category.CATEGORY_SUB, getCacheId(categoryId, categoryType)); + return cache.get(cacheKey); + } + + /** + * 根据 类目id集合 查询未删除的类目集合 + * + * @param categoryIdList + * @return + */ + public Map queryCategoryList(List categoryIdList) { + if (CollectionUtils.isEmpty(categoryIdList)) { + return CommonConst.EMPTY_MAP; + } + categoryIdList = categoryIdList.stream().distinct().collect(Collectors.toList()); + + return categoryIdList.stream().collect(Collectors.toMap(Function.identity(), e -> { + String cacheKey = CacheKey.cacheKey(CacheModuleBaseConst.Category.CATEGORY, e.toString()); + return cache.get(cacheKey); + })); + } + + /** + * 根据类目id 移除缓存 + */ + public void removeCache() { + cache.removeByModule(CacheModuleBaseConst.Category.CATEGORY); + cache.removeByModule(CacheModuleBaseConst.Category.CATEGORY_SUB); + // 移除整个类目树缓存 + cache.removeByModule(CacheModuleBaseConst.Category.CATEGORY_TREE); + } + + /** + * 根据类目id 递归查询该id的所有子类id 递归查询 + * 同时存入缓存 + * 注意:查询出来的集合 不包含传递的父类参数 + * + * @param categoryIdList + */ + public List queryCategorySubId(List categoryIdList) { + if (CollectionUtils.isEmpty(categoryIdList)) { + return CommonConst.EMPTY_LIST; + } + // 查询所有子类 + Map> subTypeMap = this.querySubCategoryFromCache(categoryIdList); + if (MapUtils.isEmpty(subTypeMap)) { + return Lists.newArrayList(); + } + // 递归查询子类 + categoryIdList = subTypeMap.values().stream().flatMap(Collection::stream).map(CategoryEntity::getCategoryId).distinct().collect(Collectors.toList()); + if (CollectionUtils.isEmpty(categoryIdList)) { + return Lists.newArrayList(); + } + categoryIdList.addAll(this.queryCategorySubId(categoryIdList)); + return categoryIdList; + } + + /** + * 查询自身以及所有子节点 + * @param categoryIdList + * @return + */ + public List queryCategorySelfAndSubId(List categoryIdList) { + List subIdList = this.queryCategorySubId(categoryIdList); + subIdList.addAll(categoryIdList); + return subIdList; + } + + /** + * 查询类目 层级树 + * 优先查询缓存 + * + * @return + */ + public List queryCategoryTree(CategoryTreeQueryDTO queryDTO) { + // 查询缓存 + Long parentId = queryDTO.getParentId(); + Integer categoryType = queryDTO.getCategoryType(); + String cacheKey = CacheKey.cacheKey(CacheModuleBaseConst.Category.CATEGORY_TREE, getCacheId(parentId, categoryType)); + List treeList = cache.get(cacheKey); + if (null != treeList) { + return treeList; + } + // 查询一级类目 + List categoryEntityList = this.queryCategoryByParent(parentId, categoryType); + treeList = SmartBeanUtil.copyList(categoryEntityList, CategoryTreeVO.class); + treeList.forEach(e -> { + e.setLabel(e.getCategoryName()); + e.setValue(e.getCategoryId()); + e.setCategoryFullName(e.getCategoryName()); + }); + // 递归设置子类 + this.queryAndSetSubCategory(treeList); + // 放入缓存 + cache.put(cacheKey, treeList); + return treeList; + } + + /** + * 递归查询设置类目子类 + * 从缓存查询子类 + * + * @param treeList + */ + private void queryAndSetSubCategory(List treeList) { + if (CollectionUtils.isEmpty(treeList)) { + return; + } + List parentIdList = treeList.stream().map(CategoryTreeVO::getValue).collect(Collectors.toList()); + Map> categorySubMap = this.querySubCategoryFromCache(parentIdList); + treeList.forEach(e -> { + List childrenEntityList = categorySubMap.getOrDefault(e.getValue(), Lists.newArrayList()); + List childrenVOList = SmartBeanUtil.copyList(childrenEntityList, CategoryTreeVO.class); + childrenVOList.forEach(item -> { + item.setLabel(item.getCategoryName()); + item.setValue(item.getCategoryId()); + item.setCategoryFullName(e.getCategoryFullName() + CommonConst.SEPARATOR_SLASH + item.getCategoryName()); + }); + // 递归查询 + this.queryAndSetSubCategory(childrenVOList); + e.setChildren(childrenVOList); + }); + } + + /** + * 根据类目id 查询类目详情 包含类目全称 如:医考/医师资格/临床执业 + * + * @param categoryId + * @return + */ + public CategorySimpleDTO queryCategoryInfo(Long categoryId) { + String cacheKey = CacheKey.cacheKey(CacheModuleBaseConst.Category.CATEGORY, categoryId.toString()); + CategoryEntity categoryEntity = cache.get(cacheKey); + if (null == categoryEntity || categoryEntity.getDeletedFlag()) { + return null; + } + + // 递归查询分类和所有父级类目 + List parentCategoryList = this.queryCategoryAndParent(categoryId); + // 拼接父级类目名称 斜杠分隔返回 + List nameList = parentCategoryList.stream().map(CategoryEntity::getCategoryName).collect(Collectors.toList()); + + // 返回DTO + CategorySimpleDTO categoryDTO = new CategorySimpleDTO(); + categoryDTO.setCategoryId(categoryId); + categoryDTO.setCategoryName(categoryEntity.getCategoryName()); + categoryDTO.setCategoryFullName(SmartStringUtil.join(nameList, CommonConst.SEPARATOR_SLASH)); + categoryDTO.setParentId(categoryEntity.getParentId()); + return categoryDTO; + } + + /** + * 递归查询分类和所有父级类目 ps:特别注意返回的集合中 包含自己 + * + * @param categoryId + * @return + */ + public List queryCategoryAndParent(Long categoryId) { + List parentCategoryList = Lists.newArrayList(); + String cacheKey = CacheKey.cacheKey(CacheModuleBaseConst.Category.CATEGORY, categoryId.toString()); + CategoryEntity categoryEntity = cache.get(cacheKey); + if (null == categoryEntity || categoryEntity.getDeletedFlag()) { + return parentCategoryList; + } + + // 父级始终放在第一位 + parentCategoryList.add(0, categoryEntity); + Long parentId = categoryEntity.getParentId(); + if (Objects.equals(CommonConst.DEFAULT_PARENT_ID, parentId)) { + return parentCategoryList; + } + parentCategoryList.addAll(0, this.queryCategoryAndParent(parentId)); + return parentCategoryList; + } + + /** + * 处理类目名称 + * + * @param categoryIdList + */ + public List queryCategoryName(List categoryIdList) { + if (CollectionUtils.isEmpty(categoryIdList)) { + return null; + } + Map categoryMap = this.queryCategoryList(categoryIdList); + List categoryNameList = Lists.newArrayList(); + categoryIdList.forEach(e -> { + CategoryEntity categoryEntity = categoryMap.get(e); + if (categoryEntity != null) { + categoryNameList.add(categoryMap.get(e).getCategoryName()); + } + }); + return categoryNameList; + } + + /** + * 根据类目id 查询类目名称 + * + * @param categoryId + * @return + */ + public String queryCategoryName(Long categoryId) { + String cacheKey = CacheKey.cacheKey(CacheModuleBaseConst.Category.CATEGORY, categoryId.toString()); + CategoryEntity categoryEntity = cache.get(cacheKey); + if (null == categoryEntity || categoryEntity.getDeletedFlag()) { + return null; + } + return categoryEntity.getCategoryName(); + } + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/CategoryService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/CategoryService.java new file mode 100644 index 00000000..234ee049 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/CategoryService.java @@ -0,0 +1,207 @@ +package net.lab1024.smartadmin.service.module.business.category; + +import com.google.common.collect.Lists; +import net.lab1024.smartadmin.service.common.codeconst.ResponseCodeConst; +import net.lab1024.smartadmin.service.common.constant.CommonConst; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.business.category.domain.*; +import net.lab1024.smartadmin.service.util.SmartBeanUtil; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * 类目 业务 + * + * @author 胡克 + * @date 2021/1/20 16:26 + */ +@Service +public class CategoryService { + + @Autowired + private CategoryDao categoryDao; + + @Autowired + private CategoryQueryService categoryQueryService; + + /** + * 添加类目 + * + * @author 胡克 + * @date 2021/1/20 17:17 + */ + public ResponseDTO add(CategoryAddDTO addDTO) { + // 校验类目 + CategoryEntity categoryEntity = SmartBeanUtil.copy(addDTO, CategoryEntity.class); + ResponseDTO res = this.checkCategory(categoryEntity, false); + if (!res.isSuccess()) { + return res; + } + // 没有父类则使用默认父类 + Long parentId = null == addDTO.getParentId() ? CommonConst.DEFAULT_PARENT_ID : addDTO.getParentId(); + categoryEntity.setParentId(parentId); + categoryEntity.setSort(null == addDTO.getSort() ? CommonConst.ZERO : addDTO.getSort()); + categoryEntity.setDeletedFlag(false); + + // 保存数据 + categoryDao.insert(categoryEntity); + + // 更新缓存 + categoryQueryService.removeCache(); + return ResponseDTO.succ(); + } + + /** + * 更新类目 + * 不能更新父级类目 + * + * @author 胡克 + * @date 2021/1/20 17:17 + */ + public ResponseDTO update(CategoryUpdateDTO updateDTO) { + // 校验类目 + Long categoryId = updateDTO.getCategoryId(); + Optional optional = categoryQueryService.queryCategory(categoryId); + if (!optional.isPresent()) { + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); + } + CategoryEntity categoryEntity = SmartBeanUtil.copy(updateDTO, CategoryEntity.class); + + /** + * 不更新类目类型 + * 不更新父类id + */ + Integer categoryType = optional.get().getCategoryType(); + categoryEntity.setCategoryType(categoryType); + categoryEntity.setParentId(optional.get().getParentId()); + + ResponseDTO responseDTO = this.checkCategory(categoryEntity, true); + if (!responseDTO.isSuccess()) { + return responseDTO; + } + categoryDao.updateById(categoryEntity); + + // 更新缓存 + categoryQueryService.removeCache(); + return ResponseDTO.succ(); + } + + /** + * 新增/更新 类目时的 校验 + * + * @param categoryEntity + * @param isUpdate + * @return + */ + private ResponseDTO checkCategory(CategoryEntity categoryEntity, boolean isUpdate) { + // 校验父级是否存在 + Long parentId = categoryEntity.getParentId(); + Integer categoryType = categoryEntity.getCategoryType(); + if (null != parentId) { + if (Objects.equals(categoryEntity.getCategoryId(), parentId)) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "父级类目怎么和自己相同了"); + } + if (!Objects.equals(parentId, CommonConst.DEFAULT_PARENT_ID)) { + Optional optional = categoryQueryService.queryCategory(parentId); + if (!optional.isPresent()) { + return ResponseDTO.wrapMsg(ResponseCodeConst.NOT_EXISTS, "父级类目不存在~"); + } + + CategoryEntity parent = optional.get(); + if (!Objects.equals(categoryType, parent.getCategoryType())) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "与父级类目类型不一致"); + } + } + + } else { + // 如果没有父类 使用默认父类 + parentId = CommonConst.DEFAULT_PARENT_ID; + } + + // 校验同父类下 名称是否重复 + CategoryEntity queryEntity = new CategoryEntity(); + queryEntity.setParentId(parentId); + queryEntity.setCategoryType(categoryType); + queryEntity.setCategoryName(categoryEntity.getCategoryName()); + queryEntity.setDeletedFlag(false); + queryEntity = categoryDao.selectOne(queryEntity); + if (null != queryEntity) { + if (isUpdate) { + if (!Objects.equals(queryEntity.getCategoryId(), categoryEntity.getCategoryId())) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "同级下已存在相同类目~"); + } + } else { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "同级下已存在相同类目~"); + } + } + return ResponseDTO.succ(); + } + + /** + * 查询 类目详情 + * + * @param categoryId + * @return + */ + public ResponseDTO queryDetail(Long categoryId) { + Optional optional = categoryQueryService.queryCategory(categoryId); + if (!optional.isPresent()) { + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); + } + CategoryVO adminVO = SmartBeanUtil.copy(optional.get(), CategoryVO.class); + return ResponseDTO.succData(adminVO); + } + + /** + * 根据父级id 查询所有子类 返回层级树 + * 如果父类id 为空 返回所有类目层级 + * + * @param queryDTO + * @return + */ + public ResponseDTO> queryTree(CategoryTreeQueryDTO queryDTO) { + if (null == queryDTO.getParentId()) { + if (null == queryDTO.getCategoryType()) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "类目类型不能为空"); + } + queryDTO.setParentId(CommonConst.DEFAULT_PARENT_ID); + } + List treeList = categoryQueryService.queryCategoryTree(queryDTO); + return ResponseDTO.succData(treeList); + } + + /** + * 删除类目 + * 如果有未删除的子类 则无法删除 + * + * @param categoryId + * @return + */ + public ResponseDTO delete(Long categoryId) { + Optional optional = categoryQueryService.queryCategory(categoryId); + if (!optional.isPresent()) { + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); + } + + List categorySubId = categoryQueryService.queryCategorySubId(Lists.newArrayList(categoryId)); + if (CollectionUtils.isNotEmpty(categorySubId)) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "请先删除子级类目"); + } + + // 更新数据 + CategoryEntity categoryEntity = new CategoryEntity(); + categoryEntity.setCategoryId(categoryId); + categoryEntity.setDeletedFlag(true); + categoryDao.updateById(categoryEntity); + + // 更新缓存 + categoryQueryService.removeCache(); + return ResponseDTO.succ(); + } + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/constant/CategoryTypeEnum.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/constant/CategoryTypeEnum.java new file mode 100644 index 00000000..b0225030 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/constant/CategoryTypeEnum.java @@ -0,0 +1,54 @@ +package net.lab1024.smartadmin.service.module.business.category.constant; + + +import net.lab1024.smartadmin.service.common.constant.BaseEnum; + +/** + * 分类类型 枚举 + * + * @author listen + * @date 2021/08/05 15:26 + */ +public enum CategoryTypeEnum implements BaseEnum { + + /** + * 1 商品 + */ + GOODS(1, "商品"), + + /** + * 2 测试分类 + */ + DEMO(2, "测试分类"), + + ; + + private final Integer type; + + private final String desc; + + CategoryTypeEnum(Integer type, String desc) { + this.type = type; + this.desc = desc; + } + + /** + * 获取枚举类的值 + * + * @return Integer + */ + @Override + public Integer getValue() { + return type; + } + + /** + * 获取枚举类的说明 + * + * @return String + */ + @Override + public String getDesc() { + return desc; + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/domain/CategoryAddDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/domain/CategoryAddDTO.java new file mode 100644 index 00000000..54b2569c --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/domain/CategoryAddDTO.java @@ -0,0 +1,14 @@ +package net.lab1024.smartadmin.service.module.business.category.domain; + +import lombok.Data; + +/** + * 类目 添加 DTO 类 + * + * @author 胡克 + * @date 2021/1/20 16:24 + */ +@Data +public class CategoryAddDTO extends CategoryBaseDTO { + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/domain/CategoryBaseDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/domain/CategoryBaseDTO.java new file mode 100644 index 00000000..45094438 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/domain/CategoryBaseDTO.java @@ -0,0 +1,44 @@ +package net.lab1024.smartadmin.service.module.business.category.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import net.lab1024.smartadmin.service.common.swagger.ApiModelPropertyEnum; +import net.lab1024.smartadmin.service.common.validator.CheckEnum; +import net.lab1024.smartadmin.service.module.business.category.constant.CategoryTypeEnum; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; + +/** + * 类目 基础属性 DTO 类 + * + * @author 胡克 + * @date 2021/1/20 16:17 + */ +@Data +public class CategoryBaseDTO { + + @ApiModelProperty(value = "类目名称", required = true) + @NotBlank(message = "类目名称不能为空") + @Length(max = 20, message = "类目名称最多20字符") + private String categoryName; + + @ApiModelPropertyEnum(desc = "分类类型", value = CategoryTypeEnum.class) + @CheckEnum(enumClazz = CategoryTypeEnum.class, required = true, message = "分类类型错误") + private Integer categoryType; + + @ApiModelProperty("父级类目id|可选") + private Long parentId; + + @ApiModelProperty("排序|可选") + private Integer sort; + + @ApiModelProperty("备注|可选") + @Length(max = 200, message = "备注最多200字符") + private String remark; + + @ApiModelProperty("禁用状态") + @NotNull(message = "禁用状态不能为空") + private Boolean disabledFlag; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/domain/CategoryEntity.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/domain/CategoryEntity.java new file mode 100644 index 00000000..29f10aa2 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/domain/CategoryEntity.java @@ -0,0 +1,63 @@ +package net.lab1024.smartadmin.service.module.business.category.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * 类目 实体类 + * + * @author 胡克 + * @date 2021/8/6 9:45 + */ +@Data +@TableName("t_category") +public class CategoryEntity { + + @TableId(type = IdType.AUTO) + private Long categoryId; + + /** + * 类目名称 + */ + private String categoryName; + + /** + * 类目 类型 + * + * @see CategoryTypeEnum + */ + private Integer categoryType; + + /** + * 父级类目id + */ + private Long parentId; + + /** + * 是否禁用 + */ + private Boolean disabledFlag; + + /** + * 排序 + */ + private Integer sort; + + /** + * 删除状态 + */ + private Boolean deletedFlag; + + /** + * 备注 + */ + private String remark; + + private LocalDateTime updateTime; + + private LocalDateTime createTime; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/domain/CategorySimpleDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/domain/CategorySimpleDTO.java new file mode 100644 index 00000000..997efece --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/domain/CategorySimpleDTO.java @@ -0,0 +1,26 @@ +package net.lab1024.smartadmin.service.module.business.category.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 类目 基础属性 DTO 类 + * + * @author 胡克 + * @date 2021/1/20 16:17 + */ +@Data +public class CategorySimpleDTO { + + @ApiModelProperty("类目id") + private Long categoryId; + + @ApiModelProperty("类目名称") + private String categoryName; + + @ApiModelProperty("类目层级全称") + private String categoryFullName; + + @ApiModelProperty("父级id") + private Long parentId; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/domain/CategoryTreeQueryDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/domain/CategoryTreeQueryDTO.java new file mode 100644 index 00000000..096079ce --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/domain/CategoryTreeQueryDTO.java @@ -0,0 +1,24 @@ +package net.lab1024.smartadmin.service.module.business.category.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import net.lab1024.smartadmin.service.common.swagger.ApiModelPropertyEnum; +import net.lab1024.smartadmin.service.common.validator.CheckEnum; +import net.lab1024.smartadmin.service.module.business.category.constant.CategoryTypeEnum; + +/** + * 类目 层级树查询 DTO 类 + * + * @author 胡克 + * @date 2021/1/20 16:17 + */ +@Data +public class CategoryTreeQueryDTO { + + @ApiModelPropertyEnum(desc = "分类类型|可选", value = CategoryTypeEnum.class) + @CheckEnum(enumClazz = CategoryTypeEnum.class, message = "分类类型错误") + private Integer categoryType; + + @ApiModelProperty("父级类目id|可选") + private Long parentId; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/domain/CategoryTreeVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/domain/CategoryTreeVO.java new file mode 100644 index 00000000..88171db6 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/domain/CategoryTreeVO.java @@ -0,0 +1,25 @@ +package net.lab1024.smartadmin.service.module.business.category.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * 类目 层级树 vo + * + * @author listen + * @date 2021/01/21 17:03 + */ +@Data +public class CategoryTreeVO extends CategorySimpleDTO { + + @ApiModelProperty("类目id") + private Long value; + + @ApiModelProperty("类目名称") + private String label; + + @ApiModelProperty("子类") + private List children; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/domain/CategoryUpdateDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/domain/CategoryUpdateDTO.java new file mode 100644 index 00000000..fc4cb54c --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/domain/CategoryUpdateDTO.java @@ -0,0 +1,20 @@ +package net.lab1024.smartadmin.service.module.business.category.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotNull; + +/** + * 类目 更新 DTO 类 + * + * @author 胡克 + * @date 2021/1/20 16:24 + */ +@Data +public class CategoryUpdateDTO extends CategoryBaseDTO { + + @ApiModelProperty("类目id") + @NotNull(message = "类目id不能为空") + private Long categoryId; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/domain/CategoryVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/domain/CategoryVO.java new file mode 100644 index 00000000..56c13a5e --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/domain/CategoryVO.java @@ -0,0 +1,23 @@ +package net.lab1024.smartadmin.service.module.business.category.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * 类目 VO 类 + * + * @author 胡克 + * @date 2021/1/20 16:24 + */ +@Data +public class CategoryVO extends CategoryBaseDTO { + + @ApiModelProperty("类目id") + private Long categoryId; + + private LocalDateTime updateTime; + + private LocalDateTime createTime; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/package-info.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/package-info.java new file mode 100644 index 00000000..3d3252b2 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/category/package-info.java @@ -0,0 +1,5 @@ +/** + * 类目 业务 + * 包含 商品 等类型 + */ +package net.lab1024.smartadmin.service.module.business.category; \ No newline at end of file diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/GoodsController.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/GoodsController.java new file mode 100644 index 00000000..b87fda56 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/GoodsController.java @@ -0,0 +1,64 @@ +package net.lab1024.smartadmin.service.module.business.goods; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import net.lab1024.smartadmin.service.common.constant.SwaggerTagConst; +import net.lab1024.smartadmin.service.common.controller.AdminBaseController; +import net.lab1024.smartadmin.service.common.domain.PageResultDTO; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.business.goods.domain.*; +import net.lab1024.smartadmin.service.module.system.login.domain.EmployeeLoginInfoDTO; +import net.lab1024.smartadmin.service.util.SmartEmployeeTokenUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; + +import javax.validation.Valid; + +/** + * 商品业务 路由 + * + * @author 胡克 + * @date 2021/08/21 19:10 + */ +@Api(tags = SwaggerTagConst.Admin.MANAGER_GOODS) +@RestController +public class GoodsController extends AdminBaseController { + + @Autowired + private GoodsService goodsService; + + @ApiOperation("添加商品 by listen") + @PostMapping("/goods/add") + public ResponseDTO add(@RequestBody @Valid GoodsAddDTO addDTO) { + EmployeeLoginInfoDTO employee = SmartEmployeeTokenUtil.getRequestEmployee(); + addDTO.setUpdateId(employee.getEmployeeId()); + addDTO.setUpdateName(employee.getActualName()); + return goodsService.add(addDTO); + } + + @ApiOperation("更新商品 by listen") + @PostMapping("/goods/update") + public ResponseDTO update(@RequestBody @Valid GoodsUpdateDTO updateDTO) { + EmployeeLoginInfoDTO employee = SmartEmployeeTokenUtil.getRequestEmployee(); + updateDTO.setUpdateId(employee.getEmployeeId()); + updateDTO.setUpdateName(employee.getActualName()); + return goodsService.update(updateDTO); + } + + @ApiOperation("删除 by listen") + @PostMapping("/goods/del") + public ResponseDTO del(@RequestBody @Valid GoodsDelDTO delDTO) { + EmployeeLoginInfoDTO employee = SmartEmployeeTokenUtil.getRequestEmployee(); + delDTO.setUpdateId(employee.getEmployeeId()); + delDTO.setUpdateName(employee.getActualName()); + return goodsService.del(delDTO); + } + + @ApiOperation("分页查询 by listen") + @PostMapping("/goods/query") + public ResponseDTO> query(@RequestBody @Valid GoodsQueryDTO queryDTO) { + return goodsService.query(queryDTO); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/GoodsDao.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/GoodsDao.java new file mode 100644 index 00000000..3207255d --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/GoodsDao.java @@ -0,0 +1,39 @@ +package net.lab1024.smartadmin.service.module.business.goods; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import net.lab1024.smartadmin.service.module.business.goods.domain.GoodsAdminVO; +import net.lab1024.smartadmin.service.module.business.goods.domain.GoodsBO; +import net.lab1024.smartadmin.service.module.business.goods.domain.GoodsEntity; +import net.lab1024.smartadmin.service.module.business.goods.domain.GoodsQueryDTO; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * 商品 dao + * + * @author 胡克 + * @date 2021/8/6 15:26 + */ +@Component +public interface GoodsDao extends BaseMapper { + + /** + * 查询1个商品 具体条件看sql + * + * @param goodsBO + * @return + */ + GoodsEntity selectOne(GoodsBO goodsBO); + + /** + * 分页 查询商品 + * + * @param page + * @param queryDTO + * @return + */ + List query(Page page, @Param("query") GoodsQueryDTO queryDTO); +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/GoodsManager.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/GoodsManager.java new file mode 100644 index 00000000..da3844ef --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/GoodsManager.java @@ -0,0 +1,16 @@ +package net.lab1024.smartadmin.service.module.business.goods; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import net.lab1024.smartadmin.service.module.business.goods.domain.GoodsEntity; +import org.springframework.stereotype.Service; + +/** + * 商品 manager + * + * @author 胡克 + * @date 2021/8/6 15:26 + */ +@Service +public class GoodsManager extends ServiceImpl { + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/GoodsService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/GoodsService.java new file mode 100644 index 00000000..98d15a21 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/GoodsService.java @@ -0,0 +1,146 @@ +package net.lab1024.smartadmin.service.module.business.goods; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import net.lab1024.smartadmin.service.common.codeconst.ResponseCodeConst; +import net.lab1024.smartadmin.service.common.domain.PageResultDTO; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.business.category.CategoryQueryService; +import net.lab1024.smartadmin.service.module.business.category.constant.CategoryTypeEnum; +import net.lab1024.smartadmin.service.module.business.category.domain.CategoryEntity; +import net.lab1024.smartadmin.service.module.business.goods.domain.*; +import net.lab1024.smartadmin.service.util.SmartBeanUtil; +import net.lab1024.smartadmin.service.util.SmartPageUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import java.util.stream.Collectors; + +/** + * 商品 业务 + * + * @author 胡克 + * @date 2021/8/6 15:27 + */ +@Service +public class GoodsService { + + @Autowired + private GoodsDao goodsDao; + + @Autowired + private GoodsManager goodsManager; + + @Autowired + private CategoryQueryService categoryQueryService; + + /** + * 添加商品 + * + * @param addDTO + * @return + */ + public ResponseDTO add(GoodsAddDTO addDTO) { + // 商品校验 + ResponseDTO res = this.checkGoods(addDTO, null); + if (!res.isSuccess()) { + return res; + } + + GoodsEntity goodsEntity = SmartBeanUtil.copy(addDTO, GoodsEntity.class); + goodsDao.insert(goodsEntity); + return ResponseDTO.succ(); + } + + /** + * 更新商品 + * + * @param updateDTO + * @return + */ + public ResponseDTO update(GoodsUpdateDTO updateDTO) { + // 商品校验 + ResponseDTO res = this.checkGoods(updateDTO, updateDTO.getGoodsId()); + if (!res.isSuccess()) { + return res; + } + + GoodsEntity goodsEntity = SmartBeanUtil.copy(updateDTO, GoodsEntity.class); + goodsDao.updateById(goodsEntity); + return ResponseDTO.succ(); + } + + /** + * 添加/更新 商品校验 + * + * @param addDTO + * @param goodsId 不为空 代表更新商品 + * @return + */ + private ResponseDTO checkGoods(GoodsAddDTO addDTO, Long goodsId) { + // 校验商品名称重复 + Long categoryId = addDTO.getCategoryId(); + + GoodsBO goodsBO = new GoodsBO(); + goodsBO.setGoodsName(addDTO.getGoodsName()); + goodsBO.setGoodsType(addDTO.getGoodsType()); + goodsBO.setCategoryId(categoryId); + goodsBO.setDeletedFlag(false); + GoodsEntity goodsEntity = goodsDao.selectOne(goodsBO); + if (null != goodsEntity) { + if (null == goodsId || !Objects.equals(goodsEntity.getGoodsId(), goodsId)) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ALREADY_EXIST, "商品名称不能重复~"); + } + } + + // 校验类目id + Optional optional = categoryQueryService.queryCategory(categoryId); + if (!optional.isPresent() || !CategoryTypeEnum.GOODS.equalsValue(optional.get().getCategoryType())) { + return ResponseDTO.wrapMsg(ResponseCodeConst.NOT_EXISTS, "商品类目不存在~"); + } + + return ResponseDTO.succ(); + } + + /** + * 批量删除 + * + * @param delDTO + * @return + */ + public ResponseDTO del(GoodsDelDTO delDTO) { + // 批量更新删除状态 + List goodsList = delDTO.getGoodsIdList().stream().map(id -> { + GoodsEntity goodsEntity = new GoodsEntity(); + goodsEntity.setGoodsId(id); + goodsEntity.setDeletedFlag(true); + return goodsEntity; + }).collect(Collectors.toList()); + goodsManager.updateBatchById(goodsList); + return ResponseDTO.succ(); + } + + /** + * 分页查询 + * + * @param queryDTO + * @return + */ + public ResponseDTO> query(GoodsQueryDTO queryDTO) { + queryDTO.setDeletedFlag(false); + Page page = SmartPageUtil.convert2PageQuery(queryDTO); + List list = goodsDao.query(page, queryDTO); + PageResultDTO pageResult = SmartPageUtil.convert2PageResult(page, list); + if (pageResult.getEmptyFlag()) { + return ResponseDTO.succData(pageResult); + } + // 查询分类名称 + List categoryIdList = list.stream().map(GoodsAdminVO::getCategoryId).distinct().collect(Collectors.toList()); + Map categoryMap = categoryQueryService.queryCategoryList(categoryIdList); + list.forEach(e -> e.setCategoryName(categoryMap.get(e.getCategoryId()).getCategoryName())); + return ResponseDTO.succData(pageResult); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/constant/GoodsTypeEnum.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/constant/GoodsTypeEnum.java new file mode 100644 index 00000000..a4191753 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/constant/GoodsTypeEnum.java @@ -0,0 +1,54 @@ +package net.lab1024.smartadmin.service.module.business.goods.constant; + + +import net.lab1024.smartadmin.service.common.constant.BaseEnum; + +/** + * 商品类型 枚举 + * + * @author listen + * @date 2021/08/05 15:26 + */ +public enum GoodsTypeEnum implements BaseEnum { + + /** + * 1 图书 + */ + BOOK(1, "图书"), + + /** + * 2 课程 + */ + COURSE(2, "课程"), + + ; + + private final Integer type; + + private final String desc; + + GoodsTypeEnum(Integer type, String desc) { + this.type = type; + this.desc = desc; + } + + /** + * 获取枚举类的值 + * + * @return Integer + */ + @Override + public Integer getValue() { + return type; + } + + /** + * 获取枚举类的说明 + * + * @return String + */ + @Override + public String getDesc() { + return desc; + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/domain/GoodsAddDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/domain/GoodsAddDTO.java new file mode 100644 index 00000000..db94372e --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/domain/GoodsAddDTO.java @@ -0,0 +1,20 @@ +package net.lab1024.smartadmin.service.module.business.goods.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 商品 添加 DTO + * + * @author 胡克 + * @date 2021/8/5 14:42 + */ +@Data +public class GoodsAddDTO extends GoodsBaseDTO { + + @ApiModelProperty(hidden = true) + private Long updateId; + + @ApiModelProperty(hidden = true) + private String updateName; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/domain/GoodsAdminVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/domain/GoodsAdminVO.java new file mode 100644 index 00000000..f7ff5271 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/domain/GoodsAdminVO.java @@ -0,0 +1,26 @@ +package net.lab1024.smartadmin.service.module.business.goods.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * 商品 添加 DTO + * + * @author 胡克 + * @date 2021/8/5 14:42 + */ +@Data +public class GoodsAdminVO extends GoodsBaseDTO { + + @ApiModelProperty("商品id") + private Long goodsId; + + @ApiModelProperty("商品分类") + private String categoryName; + + private LocalDateTime updateTime; + + private LocalDateTime createTime; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/domain/GoodsBO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/domain/GoodsBO.java new file mode 100644 index 00000000..625ddf81 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/domain/GoodsBO.java @@ -0,0 +1,36 @@ +package net.lab1024.smartadmin.service.module.business.goods.domain; + +import lombok.Data; +import net.lab1024.smartadmin.service.module.business.goods.constant.GoodsTypeEnum; + +/** + * 商品 + * + * @author 胡克 + * @date 2021/8/5 14:42 + */ +@Data +public class GoodsBO { + + /** + * 商品类型 + * + * @see GoodsTypeEnum + */ + private Integer goodsType; + + /** + * 商品分类 + */ + private Long categoryId; + + /** + * 商品名称 + */ + private String goodsName; + + /** + * 删除状态 + */ + private Boolean deletedFlag; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/domain/GoodsBaseDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/domain/GoodsBaseDTO.java new file mode 100644 index 00000000..a6d1b657 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/domain/GoodsBaseDTO.java @@ -0,0 +1,60 @@ +package net.lab1024.smartadmin.service.module.business.goods.domain; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import net.lab1024.smartadmin.service.common.json.FileKeySerializer; +import net.lab1024.smartadmin.service.common.swagger.ApiModelPropertyEnum; +import net.lab1024.smartadmin.service.common.validator.CheckEnum; +import net.lab1024.smartadmin.service.module.business.goods.constant.GoodsTypeEnum; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.DecimalMin; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.math.BigDecimal; + +/** + * 商品 基础属性 DTO + * + * @author 胡克 + * @date 2021/8/5 14:42 + */ +@Data +public class GoodsBaseDTO { + + @ApiModelPropertyEnum(desc = "商品类型", value = GoodsTypeEnum.class) + @CheckEnum(enumClazz = GoodsTypeEnum.class, message = "商品类型错误") + private Integer goodsType; + + @ApiModelProperty("商品分类") + @NotNull(message = "商品分类不能为空") + private Long categoryId; + + @ApiModelProperty("商品名称") + @NotBlank(message = "商品名称不能为空") + @Length(max = 200, message = "商品名称最多50字符") + private String goodsName; + + @ApiModelProperty("商品简介") + @Length(max = 200, message = "商品简介最多200字符") + private String goodsIntro; + + @ApiModelProperty("商品价格") + @NotNull(message = "商品价格不能为空") + @DecimalMin(value = "0", message = "商品价格最低0") + private BigDecimal price; + + @ApiModelProperty("商品封面") + @Length(max = 250, message = "商品封面最多250字符") + @JsonSerialize(using = FileKeySerializer.class) + private String coverPic; + + @ApiModelProperty("上架状态") + @NotNull(message = "上架状态不能为空") + private Boolean shelvesFlag; + + @ApiModelProperty("备注|可选") + @Length(max = 200, message = "备注最多200字符") + private String remark; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/domain/GoodsDelDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/domain/GoodsDelDTO.java new file mode 100644 index 00000000..c1d86cad --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/domain/GoodsDelDTO.java @@ -0,0 +1,29 @@ +package net.lab1024.smartadmin.service.module.business.goods.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.Size; +import java.util.List; + +/** + * 商品 删除 DTO + * + * @author 胡克 + * @date 2021/8/5 14:42 + */ +@Data +public class GoodsDelDTO { + + @ApiModelProperty("商品id集合") + @NotEmpty(message = "商品id不能为空") + @Size(max = 99, message = "一次最多删除99") + private List goodsIdList; + + @ApiModelProperty(hidden = true) + private Long updateId; + + @ApiModelProperty(hidden = true) + private String updateName; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/domain/GoodsEntity.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/domain/GoodsEntity.java new file mode 100644 index 00000000..319d077c --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/domain/GoodsEntity.java @@ -0,0 +1,77 @@ +package net.lab1024.smartadmin.service.module.business.goods.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import net.lab1024.smartadmin.service.module.business.goods.constant.GoodsTypeEnum; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +/** + * 商品 实体类 + * + * @author 胡克 + * @date 2021/8/5 14:42 + */ +@Data +@TableName("t_goods") +public class GoodsEntity { + + @TableId(type = IdType.AUTO) + private Long goodsId; + + /** + * 商品类型 + * + * @see GoodsTypeEnum + */ + private Integer goodsType; + + /** + * 第三方商品id + */ + private Long thirdGoodsId; + + /** + * 商品分类 + */ + private Long categoryId; + + /** + * 商品名称 + */ + private String goodsName; + + /** + * 商品简介 + */ + private String goodsIntro; + + /** + * 商品价格 + */ + private BigDecimal price; + + /** + * 商品封面 + */ + private String coverPic; + + /** + * 上架状态 + */ + private Boolean shelvesFlag; + + /** + * 删除状态 + */ + private Boolean deletedFlag; + + private String remark; + + private LocalDateTime updateTime; + + private LocalDateTime createTime; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/domain/GoodsQueryDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/domain/GoodsQueryDTO.java new file mode 100644 index 00000000..6f035229 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/domain/GoodsQueryDTO.java @@ -0,0 +1,36 @@ +package net.lab1024.smartadmin.service.module.business.goods.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import net.lab1024.smartadmin.service.common.domain.PageBaseDTO; +import net.lab1024.smartadmin.service.common.swagger.ApiModelPropertyEnum; +import net.lab1024.smartadmin.service.common.validator.CheckEnum; +import net.lab1024.smartadmin.service.module.business.goods.constant.GoodsTypeEnum; +import org.hibernate.validator.constraints.Length; + +/** + * 商品 添加 DTO + * + * @author 胡克 + * @date 2021/8/5 14:42 + */ +@Data +public class GoodsQueryDTO extends PageBaseDTO { + + @ApiModelPropertyEnum(desc = "商品类型|可选", value = GoodsTypeEnum.class) + @CheckEnum(enumClazz = GoodsTypeEnum.class, message = "商品类型错误") + private Integer goodsType; + + @ApiModelProperty("商品分类") + private Integer categoryId; + + @ApiModelProperty("搜索词") + @Length(max = 30, message = "搜索词最多30字符") + private String searchWord; + + @ApiModelProperty("上架状态") + private Boolean shelvesFlag; + + @ApiModelProperty(hidden = true) + private Boolean deletedFlag; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/domain/GoodsUpdateDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/domain/GoodsUpdateDTO.java new file mode 100644 index 00000000..e768fdee --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/goods/domain/GoodsUpdateDTO.java @@ -0,0 +1,20 @@ +package net.lab1024.smartadmin.service.module.business.goods.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotNull; + +/** + * 商品 更新 DTO + * + * @author 胡克 + * @date 2021/8/5 14:42 + */ +@Data +public class GoodsUpdateDTO extends GoodsAddDTO { + + @ApiModelProperty("商品id") + @NotNull(message = "商品id不能为空") + private Long goodsId; +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/NoticeController.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/NoticeController.java similarity index 50% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/NoticeController.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/NoticeController.java index 5d42d5d9..e62fbb6a 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/NoticeController.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/NoticeController.java @@ -1,96 +1,87 @@ -package net.lab1024.smartadmin.module.business.notice; +package net.lab1024.smartadmin.service.module.business.notice; -import net.lab1024.smartadmin.common.anno.NoValidPrivilege; -import net.lab1024.smartadmin.common.domain.PageParamDTO; -import net.lab1024.smartadmin.common.domain.PageResultDTO; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.constant.SwaggerTagConst; -import net.lab1024.smartadmin.module.business.notice.domain.dto.*; -import net.lab1024.smartadmin.util.SmartRequestTokenUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import net.lab1024.smartadmin.service.common.constant.SwaggerTagConst; +import net.lab1024.smartadmin.service.common.controller.AdminBaseController; +import net.lab1024.smartadmin.service.common.domain.PageBaseDTO; +import net.lab1024.smartadmin.service.common.domain.PageResultDTO; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.business.notice.domain.dto.*; +import net.lab1024.smartadmin.service.module.business.notice.domain.vo.NoticeDetailVO; +import net.lab1024.smartadmin.service.module.business.notice.domain.vo.NoticeVO; +import net.lab1024.smartadmin.service.util.SmartEmployeeTokenUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; /** - * [ ] + * [ 通知公告 ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date 2019-07-11 16:19:48 - * @since JDK1.8 + * @author 罗伊 + * @date */ @RestController @Api(tags = {SwaggerTagConst.Admin.MANAGER_NOTICE}) -public class NoticeController { +public class NoticeController extends AdminBaseController { @Autowired private NoticeService noticeService; - @ApiOperation(value = "分页查询全部消息", notes = "@author yandanyang") + @ApiOperation(value = "分页查询全部消息", notes = "@author 罗伊") @PostMapping("/notice/page/query") - @NoValidPrivilege public ResponseDTO> queryByPage(@RequestBody NoticeQueryDTO queryDTO) { return noticeService.queryByPage(queryDTO); } - @ApiOperation(value = "获取已收取的所有消息", notes = "@author yandanyang") + @ApiOperation(value = "获取已收取的所有消息", notes = "@author 罗伊") @PostMapping("/notice/receive/page/query") - @NoValidPrivilege public ResponseDTO> queryReceiveByPage(@RequestBody NoticeReceiveQueryDTO queryDTO) { - return noticeService.queryReceiveByPage(queryDTO, SmartRequestTokenUtil.getRequestUser()); + queryDTO.setEmployeeId(SmartEmployeeTokenUtil.getRequestEmployeeId()); + return noticeService.queryReceiveByPage(queryDTO); } - @ApiOperation(value = "分页查询未读消息", notes = "@author yandanyang") + @ApiOperation(value = "分页查询未读消息", notes = "@author 罗伊") @PostMapping("/notice/unread/page/query") - @NoValidPrivilege - public ResponseDTO> queryUnreadByPage(@RequestBody PageParamDTO queryDTO) { - return noticeService.queryUnreadByPage(queryDTO, SmartRequestTokenUtil.getRequestUser()); + public ResponseDTO> queryUnreadByPage(@RequestBody PageBaseDTO queryDTO) { + return noticeService.queryUnreadByPage(queryDTO, SmartEmployeeTokenUtil.getRequestEmployeeId()); } - @ApiOperation(value = "添加", notes = "@author yandanyang") + @ApiOperation(value = "添加", notes = "@author 罗伊") @PostMapping("/notice/add") - @NoValidPrivilege - public ResponseDTO add(@RequestBody @Valid NoticeAddDTO addTO) { - return noticeService.add(addTO, SmartRequestTokenUtil.getRequestUser()); + public ResponseDTO add(@RequestBody @Valid NoticeAddDTO addDTO) { + addDTO.setCreateId(SmartEmployeeTokenUtil.getRequestEmployeeId()); + return noticeService.add(addDTO); } - @ApiOperation(value = "修改", notes = "@author yandanyang") + @ApiOperation(value = "修改", notes = "@author 罗伊") @PostMapping("/notice/update") - @NoValidPrivilege public ResponseDTO update(@RequestBody @Valid NoticeUpdateDTO updateDTO) { return noticeService.update(updateDTO); } - @ApiOperation(value = "删除", notes = "@author yandanyang") + @ApiOperation(value = "删除", notes = "@author 罗伊") @GetMapping("/notice/delete/{id}") - @NoValidPrivilege public ResponseDTO delete(@PathVariable("id") Long id) { return noticeService.delete(id); } - @ApiOperation(value = "详情", notes = "@author yandanyang") + @ApiOperation(value = "详情", notes = "@author 罗伊") @GetMapping("/notice/detail/{id}") - @NoValidPrivilege public ResponseDTO detail(@PathVariable("id") Long id) { return noticeService.detail(id); } - @ApiOperation(value = "发送", notes = "@author yandanyang") + @ApiOperation(value = "发送", notes = "@author 罗伊") @GetMapping("/notice/send/{id}") - @NoValidPrivilege public ResponseDTO send(@PathVariable("id") Long id) { - return noticeService.send(id, SmartRequestTokenUtil.getRequestUser()); + return noticeService.send(id, SmartEmployeeTokenUtil.getRequestEmployeeId()); } - @ApiOperation(value = "读取消息", notes = "@author yandanyang") + @ApiOperation(value = "读取消息", notes = "@author 罗伊") @GetMapping("/notice/read/{id}") - @NoValidPrivilege public ResponseDTO read(@PathVariable("id") Long id) { - return noticeService.read(id, SmartRequestTokenUtil.getRequestUser()); + return noticeService.read(id, SmartEmployeeTokenUtil.getRequestEmployeeId()); } } diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/NoticeManage.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/NoticeManage.java new file mode 100644 index 00000000..b47991bd --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/NoticeManage.java @@ -0,0 +1,86 @@ +package net.lab1024.smartadmin.service.module.business.notice; + +import net.lab1024.smartadmin.service.module.business.notice.dao.NoticeDao; +import net.lab1024.smartadmin.service.module.business.notice.dao.NoticeReceiveRecordDao; +import net.lab1024.smartadmin.service.module.business.notice.domain.dto.NoticeUpdateDTO; +import net.lab1024.smartadmin.service.module.business.notice.domain.entity.NoticeEntity; +import net.lab1024.smartadmin.service.module.business.notice.domain.entity.NoticeReceiveRecordEntity; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +/** + * [ ] + * + * @author 罗伊 + */ +@Service +public class NoticeManage { + + @Autowired + private NoticeDao noticeDao; + + @Autowired + private NoticeReceiveRecordDao noticeReceiveRecordDao; + + /** + * 发送消息 + * + * @param entity + * @param employeeId + */ + @Transactional(rollbackFor = Exception.class) + public void send(NoticeEntity entity, Long employeeId) { + entity.setSendStatus(true); + noticeDao.updateById(entity); + //默认发件人 已读此消息 + NoticeReceiveRecordEntity recordEntity = new NoticeReceiveRecordEntity(); + recordEntity.setEmployeeId(employeeId); + recordEntity.setNoticeId(entity.getId()); + noticeReceiveRecordDao.insert(recordEntity); + } + + + /** + * 保存读取记录 + * + * @param noticeId + * @param employeeId + */ + public void saveReadRecord(Long noticeId, Long employeeId) { + NoticeReceiveRecordEntity recordEntity = new NoticeReceiveRecordEntity(); + recordEntity.setEmployeeId(employeeId); + recordEntity.setNoticeId(noticeId); + noticeReceiveRecordDao.insert(recordEntity); + } + + + /** + * 消息删除 + * + * @param entity + */ + @Transactional(rollbackFor = Exception.class) + public void delete(NoticeEntity entity) { + if (entity.getSendStatus()) { + //消息已发送 执行逻辑删除 + noticeDao.logicDeleteById(entity.getId(), true); + } else { + //消息未发送 执行真实删除 + noticeDao.deleteById(entity.getId()); + } + } + + /** + * 更新消息 + * + * @param updateDTO + */ + public void update(NoticeUpdateDTO updateDTO) { + NoticeEntity updateEntity = new NoticeEntity(); + updateEntity.setId(updateDTO.getId()); + updateEntity.setTitle(updateDTO.getTitle()); + updateEntity.setContent(updateDTO.getContent()); + noticeDao.updateById(updateEntity); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/NoticeService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/NoticeService.java new file mode 100644 index 00000000..68a0660a --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/NoticeService.java @@ -0,0 +1,215 @@ +package net.lab1024.smartadmin.service.module.business.notice; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import net.lab1024.smartadmin.service.common.codeconst.ResponseCodeConst; +import net.lab1024.smartadmin.service.common.domain.PageBaseDTO; +import net.lab1024.smartadmin.service.common.domain.PageResultDTO; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.business.notice.dao.NoticeDao; +import net.lab1024.smartadmin.service.module.business.notice.dao.NoticeReceiveRecordDao; +import net.lab1024.smartadmin.service.module.business.notice.domain.dto.*; +import net.lab1024.smartadmin.service.module.business.notice.domain.entity.NoticeEntity; +import net.lab1024.smartadmin.service.module.business.notice.domain.entity.NoticeReceiveRecordEntity; +import net.lab1024.smartadmin.service.module.business.notice.domain.vo.NoticeDetailVO; +import net.lab1024.smartadmin.service.module.business.notice.domain.vo.NoticeVO; +import net.lab1024.smartadmin.service.util.SmartBeanUtil; +import net.lab1024.smartadmin.service.util.SmartPageUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + * [ ] + * + * @author 罗伊 + */ +@Service +public class NoticeService { + + @Autowired + private NoticeDao noticeDao; + + @Autowired + private NoticeReceiveRecordDao noticeReceiveRecordDao; + + @Autowired + private NoticeManage noticeManage; + + /** + * @author 罗伊 + * @description 分页查询 + * @date 2019-07-11 16:19:48 + */ + public ResponseDTO> queryByPage(NoticeQueryDTO queryDTO) { + queryDTO.setDeletedFlag(false); + Page page = SmartPageUtil.convert2PageQuery(queryDTO); + List dtoList = noticeDao.queryByPage(page, queryDTO); + PageResultDTO pageResultDTO = SmartPageUtil.convert2PageResult(page, dtoList); + return ResponseDTO.succData(pageResultDTO); + } + + /** + * 获取当前登录人的消息列表 + * + * @param queryDTO + * @return + */ + public ResponseDTO> queryReceiveByPage(NoticeReceiveQueryDTO queryDTO) { + queryDTO.setSendStatus(true); + Page page = SmartPageUtil.convert2PageQuery(queryDTO); + List dtoList = noticeDao.queryReceiveByPage(page, queryDTO); + //根据用户的接收时间设置读取状态,以便前端对其设置 + dtoList.forEach(e -> { + e.setReadStatus(e.getReceiveTime() != null); + }); + PageResultDTO pageResultDTO = SmartPageUtil.convert2PageResult(page, dtoList); + return ResponseDTO.succData(pageResultDTO); + } + + /** + * 获取我的未读消息 + * + * @param queryDTO + * @return + */ + public ResponseDTO> queryUnreadByPage(PageBaseDTO queryDTO, Long employeeId) { + Page page = SmartPageUtil.convert2PageQuery(queryDTO); + List dtoList = noticeDao.queryUnreadByPage(page, employeeId, true); + PageResultDTO pageResultDTO = SmartPageUtil.convert2PageResult(page, dtoList); + return ResponseDTO.succData(pageResultDTO); + } + + /** + * @author 罗伊 + * @description 添加 + * @date 2019-07-11 16:19:48 + */ + public ResponseDTO add(NoticeAddDTO addDTO) { + NoticeEntity entity = SmartBeanUtil.copy(addDTO, NoticeEntity.class); + entity.setCreateUser(addDTO.getCreateId()); + entity.setSendStatus(false); + entity.setDeletedFlag(true); + noticeDao.insert(entity); + return ResponseDTO.succ(); + } + + /** + * @author 罗伊 + * @description 编辑 + * @date 2019-07-11 16:19:48 + */ + @Transactional(rollbackFor = Exception.class) + public ResponseDTO update(NoticeUpdateDTO updateDTO) { + NoticeEntity entity = noticeDao.selectById(updateDTO.getId()); + if (entity == null) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "此系统通知不存在"); + } + if (entity.getDeletedFlag()) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "此系统通知已删除"); + } + if (entity.getSendStatus()) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "此系统通知已发送无法修改"); + } + noticeManage.update(updateDTO); + return ResponseDTO.succ(); + } + + /** + * @author 罗伊 + * @description 删除 + * @date 2019-07-11 16:19:48 + */ + public ResponseDTO delete(Long id) { + NoticeEntity entity = noticeDao.selectById(id); + if (entity == null) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "此系统通知不存在"); + } + noticeManage.delete(entity); + return ResponseDTO.succ(); + } + + /** + * @author 罗伊 + * @description 根据ID查询 + * @date 2019-07-11 16:19:48 + */ + public ResponseDTO detail(Long id) { + NoticeDetailVO noticeDTO = noticeDao.detail(id); + return ResponseDTO.succData(noticeDTO); + } + + /** + * 获取某人的未读消息数 + * + * @param employeeId + * @return + */ + private Integer getUnreadCount(Long employeeId) { + return noticeDao.noticeUnreadCount(employeeId, true); + } + + /** + * 发送给所有在线用户未读消息数 + * + * @param id + * @param employeeId + * @return + */ + public ResponseDTO send(Long id, Long employeeId) { + NoticeEntity entity = noticeDao.selectById(id); + if (entity == null) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "此系统通知不存在"); + } + noticeManage.send(entity, employeeId); + this.sendMessage(employeeId); + return ResponseDTO.succ(); + } + + /** + * 发送系统通知 ,发送人不进行接收,需再事务外调用 以防止数据隔离级别不同造成未读消息数异常 + * + * @param sendEmployeeId + */ + private void sendMessage(Long sendEmployeeId) { +/* List onLineEmployeeIds = WebSocketServer.getOnLineUserList(); + if (CollectionUtils.isEmpty(onLineEmployeeIds)) { + return; + } + //在线用户已读消息数 + Map readCountMap = new HashMap<>(); + List readCountList = noticeDao.readCount(onLineEmployeeIds); + if (CollectionUtils.isNotEmpty(readCountList)) { + readCountMap = readCountList.stream().collect(Collectors.toMap(NoticeReadCountDTO::getEmployeeId, NoticeReadCountDTO::getReadCount)); + } + //已发送消息数 + Integer noticeCount = noticeDao.noticeCount(true); + for (Long employeeId : onLineEmployeeIds) { + if (Objects.equals(employeeId, sendEmployeeId)) { + continue; + } + int readCount = readCountMap.get(employeeId) == null ? 0 : readCountMap.get(employeeId); + WebSocketServer.sendOneOnLineUser(String.valueOf(noticeCount - readCount), employeeId); + }*/ + } + + /** + * 读取消息 + * + * @param id + * @param employeeId + * @return + */ + public ResponseDTO read(Long id, Long employeeId) { + NoticeDetailVO noticeDTO = noticeDao.detail(id); + + NoticeReceiveRecordEntity recordEntity = noticeReceiveRecordDao.selectByEmployeeAndNotice(employeeId, id); + if (recordEntity != null) { + return ResponseDTO.succData(noticeDTO); + } + noticeManage.saveReadRecord(id, employeeId); + this.sendMessage(employeeId); + return ResponseDTO.succData(noticeDTO); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/dao/NoticeDao.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/dao/NoticeDao.java new file mode 100644 index 00000000..b7f2edba --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/dao/NoticeDao.java @@ -0,0 +1,112 @@ +package net.lab1024.smartadmin.service.module.business.notice.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import net.lab1024.smartadmin.service.module.business.notice.domain.dto.NoticeQueryDTO; +import net.lab1024.smartadmin.service.module.business.notice.domain.dto.NoticeReadCountDTO; +import net.lab1024.smartadmin.service.module.business.notice.domain.dto.NoticeReceiveDTO; +import net.lab1024.smartadmin.service.module.business.notice.domain.dto.NoticeReceiveQueryDTO; +import net.lab1024.smartadmin.service.module.business.notice.domain.entity.NoticeEntity; +import net.lab1024.smartadmin.service.module.business.notice.domain.vo.NoticeDetailVO; +import net.lab1024.smartadmin.service.module.business.notice.domain.vo.NoticeVO; +import net.lab1024.smartadmin.service.module.system.datascope.DataScope; +import net.lab1024.smartadmin.service.module.system.datascope.constant.DataScopeTypeEnum; +import net.lab1024.smartadmin.service.module.system.datascope.constant.DataScopeWhereInTypeEnum; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * [ ] + * + * @author 罗伊 + */ +@Mapper +@Component +public interface NoticeDao extends BaseMapper { + + /** + * 分页查询 + * + * @param queryDTO + * @return NoticeEntity + */ + @DataScope(dataScopeType = DataScopeTypeEnum.NOTICE, joinSql = "n.create_user in (#employeeIds)", whereInType = DataScopeWhereInTypeEnum.EMPLOYEE) + List queryByPage(Page page, @Param("queryDTO") NoticeQueryDTO queryDTO); + + + /** + * 获取某人的未读消息 + * + * @param page + * @param employeeId + * @return + */ + @DataScope(dataScopeType = DataScopeTypeEnum.NOTICE, joinSql = "e.department_id in (#departmentIds)", whereInType = DataScopeWhereInTypeEnum.DEPARTMENT) + List queryUnreadByPage(Page page, @Param("employeeId") Long employeeId, @Param("sendStatus") Boolean sendStatus); + + + /** + * 获取 + * + * @param page + * @param queryDTO + * @return + */ + List queryReceiveByPage(Page page, @Param("queryDTO") NoticeReceiveQueryDTO queryDTO); + + /** + * 详情 + * + * @param id + * @return + */ + NoticeDetailVO detail(@Param("id") Long id); + + /** + * 根据id删除 逻辑删除 + * + * @param id + * @param deletedFlag + */ + void logicDeleteById(@Param("id") Long id, @Param("deletedFlag") Boolean deletedFlag); + + + /** + * 批量逻辑删除 + * + * @param idList + * @param deletedFlag + * @return + */ + void logicDeleteByIds(@Param("idList") List idList, @Param("deletedFlag") Boolean deletedFlag); + + /** + * 获取消息总数 + * + * @return + */ + Integer noticeCount(@Param("sendStatus") Boolean sendStatus); + + + /** + * 获取已读消息数 + * + * @param employeeIds + * @return + */ + List readCount(@Param("employeeIds") List employeeIds); + + + /** + * 获取某人的未读消息数 + * + * @param employeeId + * @param sendStatus + * @return + */ + Integer noticeUnreadCount(@Param("employeeId") Long employeeId, @Param("sendStatus") Boolean sendStatus); + +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/dao/NoticeReceiveRecordDao.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/dao/NoticeReceiveRecordDao.java similarity index 73% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/dao/NoticeReceiveRecordDao.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/dao/NoticeReceiveRecordDao.java index 682e0d74..274b51a2 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/dao/NoticeReceiveRecordDao.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/dao/NoticeReceiveRecordDao.java @@ -1,7 +1,7 @@ -package net.lab1024.smartadmin.module.business.notice.dao; +package net.lab1024.smartadmin.service.module.business.notice.dao; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import net.lab1024.smartadmin.module.business.notice.domain.entity.NoticeReceiveRecordEntity; +import net.lab1024.smartadmin.service.module.business.notice.domain.entity.NoticeReceiveRecordEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Component; @@ -11,12 +11,7 @@ import java.util.List; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019-07-11 16:19:48 - * @since JDK1.8 + * @author 罗伊 */ @Mapper @Component diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/dto/NoticeAddDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/dto/NoticeAddDTO.java similarity index 59% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/dto/NoticeAddDTO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/dto/NoticeAddDTO.java index 572817d1..5d5759b2 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/dto/NoticeAddDTO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/dto/NoticeAddDTO.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.module.business.notice.domain.dto; +package net.lab1024.smartadmin.service.module.business.notice.domain.dto; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -7,12 +7,7 @@ import org.hibernate.validator.constraints.Length; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/3/27 0027 下午 12:27 - * @since JDK1.8 + * @author 罗伊 */ @Data public class NoticeAddDTO { @@ -25,4 +20,7 @@ public class NoticeAddDTO { @Length(max = 5000) private String content; + @ApiModelProperty(hidden = true) + private Long createId; + } diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/dto/NoticeQueryDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/dto/NoticeQueryDTO.java new file mode 100644 index 00000000..ceb96edc --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/dto/NoticeQueryDTO.java @@ -0,0 +1,29 @@ +package net.lab1024.smartadmin.service.module.business.notice.domain.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import net.lab1024.smartadmin.service.common.domain.PageBaseDTO; + +/** + * [ ] + * + * @author 罗伊 + */ +@Data +public class NoticeQueryDTO extends PageBaseDTO { + + + @ApiModelProperty("开始日期") + private String startDate; + + @ApiModelProperty("结束日期") + private String endDate; + + + @ApiModelProperty("消息标题") + private String title; + + @ApiModelProperty(value = "是否删除", hidden = true) + private Boolean deletedFlag; + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/dto/NoticeReadCountDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/dto/NoticeReadCountDTO.java new file mode 100644 index 00000000..3d7f33d4 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/dto/NoticeReadCountDTO.java @@ -0,0 +1,21 @@ +package net.lab1024.smartadmin.service.module.business.notice.domain.dto; + +import lombok.Data; + +/** + * [ ] + * + * @author 罗伊 + */ +@Data +public class NoticeReadCountDTO { + /** + * 员工id + */ + private Long employeeId; + /** + * 已读消息数 + */ + private Integer readCount; + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/dto/NoticeReceiveDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/dto/NoticeReceiveDTO.java new file mode 100644 index 00000000..c4ba2f84 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/dto/NoticeReceiveDTO.java @@ -0,0 +1,33 @@ +package net.lab1024.smartadmin.service.module.business.notice.domain.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * [ ] + * + * @author 罗伊 + */ +@Data +public class NoticeReceiveDTO{ + + @ApiModelProperty("id") + private Long id; + + @ApiModelProperty("消息标题") + private String title; + + + @ApiModelProperty("消息创建人") + private Long createUser; + + @ApiModelProperty("消息创建人名称") + private String createUserName; + + @ApiModelProperty("结束时间") + private LocalDateTime receiveTime; + + private Boolean readStatus; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/dto/NoticeReceiveQueryDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/dto/NoticeReceiveQueryDTO.java new file mode 100644 index 00000000..cf07cefe --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/dto/NoticeReceiveQueryDTO.java @@ -0,0 +1,20 @@ +package net.lab1024.smartadmin.service.module.business.notice.domain.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * [ ] + * + * @author 罗伊 + */ +@Data +public class NoticeReceiveQueryDTO extends NoticeQueryDTO { + + @ApiModelProperty(hidden = true) + private Long employeeId; + + @ApiModelProperty(hidden = true) + private Boolean sendStatus; + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/dto/NoticeUpdateDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/dto/NoticeUpdateDTO.java new file mode 100644 index 00000000..4c44c2d2 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/dto/NoticeUpdateDTO.java @@ -0,0 +1,16 @@ +package net.lab1024.smartadmin.service.module.business.notice.domain.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * [ ] + * + * @author 罗伊 + */ +@Data +public class NoticeUpdateDTO extends NoticeAddDTO { + + @ApiModelProperty("id") + private Long id; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/entity/NoticeEntity.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/entity/NoticeEntity.java new file mode 100644 index 00000000..027767dc --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/entity/NoticeEntity.java @@ -0,0 +1,58 @@ +package net.lab1024.smartadmin.service.module.business.notice.domain.entity; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * [ ] + * + * @author 罗伊 + */ +@Data +@TableName("t_notice") +public class NoticeEntity { + /** + * 主键id + */ + @TableId(type = IdType.AUTO) + private Long id; + /** + * 消息标题 + */ + private String title; + + /** + * 消息内容 + */ + private String content; + + /** + * 消息创建人 + */ + private Long createUser; + + /** + * 发送状态 + */ + private Boolean sendStatus; + + /** + * 删除状态 + */ + private Boolean deletedFlag; + + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/entity/NoticeReceiveRecordEntity.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/entity/NoticeReceiveRecordEntity.java new file mode 100644 index 00000000..eac5fdf8 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/entity/NoticeReceiveRecordEntity.java @@ -0,0 +1,45 @@ +package net.lab1024.smartadmin.service.module.business.notice.domain.entity; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * [ ] + * + * @author 罗伊 + */ +@Data +@TableName("t_notice_receive_record") +public class NoticeReceiveRecordEntity{ + + /** + * 主键id + */ + @TableId(type = IdType.AUTO) + private Long id; + /** + * 消息id + */ + private Long noticeId; + + /** + * 消息接收人 + */ + private Long employeeId; + + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/vo/NoticeDetailVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/vo/NoticeDetailVO.java new file mode 100644 index 00000000..8fb3d90f --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/vo/NoticeDetailVO.java @@ -0,0 +1,23 @@ +package net.lab1024.smartadmin.service.module.business.notice.domain.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * [ ] + * + * @author 罗伊 + */ +@Data +public class NoticeDetailVO extends NoticeVO { + + + @ApiModelProperty("消息内容") + private String content; + + @ApiModelProperty("更新时间") + private LocalDateTime updateTime; + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/vo/NoticeVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/vo/NoticeVO.java new file mode 100644 index 00000000..e64d3e19 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/business/notice/domain/vo/NoticeVO.java @@ -0,0 +1,34 @@ +package net.lab1024.smartadmin.service.module.business.notice.domain.vo; +import lombok.Data; + +import java.time.LocalDateTime; + +import io.swagger.annotations.ApiModelProperty; + +/** + * [ ] + * + * @author 罗伊 + */ +@Data +public class NoticeVO { + + @ApiModelProperty("id") + private Long id; + + @ApiModelProperty("消息标题") + private String title; + + + @ApiModelProperty("消息创建人") + private Long createUser; + + private Integer sendStatus; + + @ApiModelProperty("消息创建人名称") + private String createUserName; + + @ApiModelProperty("创建时间") + private LocalDateTime createTime; + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/cache/AbstractCaffeineCache.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/cache/AbstractCaffeineCache.java new file mode 100644 index 00000000..383cf5a6 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/cache/AbstractCaffeineCache.java @@ -0,0 +1,220 @@ +package net.lab1024.smartadmin.service.module.support.beancache.cache; + +import com.alibaba.fastjson.JSON; +import com.github.benmanes.caffeine.cache.Caffeine; +import com.github.benmanes.caffeine.cache.LoadingCache; +import net.lab1024.smartadmin.service.module.support.beancache.domain.CacheData; +import net.lab1024.smartadmin.service.module.support.beancache.key.CacheKey; +import net.lab1024.smartadmin.service.module.support.beancache.key.CacheKeyBuilder; +import net.lab1024.smartadmin.service.module.support.beancache.load.CacheLoadMethod; +import net.lab1024.smartadmin.service.third.SmartApplicationContext; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.compress.utils.Lists; + +import java.lang.reflect.Method; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.TimeUnit; + +/** + * [ ] + * + * @author 罗伊 + * @date 2021/4/14 15:12 + */ +public abstract class AbstractCaffeineCache implements IBeanCache { + + /** + * 获取缓存 + * @return + */ + @Override + public abstract LoadingCache getCache(); + + /** + * 移除某个缓存 + * @param key + */ + @Override + public void remove(String key) { + getCache().invalidate(key); + } + + /** + * 清除所有 + */ + @Override + public void clear() { + getCache().invalidateAll(); + } + + /** + * 获取某个缓存对象 + * @param key + * @return + */ + @Override + public T get(String key) { + LoadingCache cache = getCache(); + CacheData cacheData = cache.get(key); + if(cacheData == null){ + return null; + } + if(cacheData.getExpireTime() == null){ + return (T)cacheData.getData(); + } + long expireTime = cacheData.getExpireTime(); + long current = System.currentTimeMillis(); + if(expireTime > current){ + return (T)cacheData.getData(); + } + //缓存过期 移除key 重新获取 + cache.invalidate(key); + return (T)cache.get(key).getData(); + } + + /** + * 刷新某个缓存key-异步刷新 + * @param key + */ + @Override + public void refresh(String key){ + LoadingCache cache = getCache(); + cache.refresh(key); + } + + /** + * 设置key->value + * @param key + * @param obj + */ + @Override + public void put(String key, Object obj) { + CacheData cacheData = new CacheData(); + cacheData.setData(obj); + getCache().put(key, cacheData); + } + + + @Override + public void put(String key, Object obj, long expireSecond) { + CacheData cacheData = new CacheData(); + long expireTime = System.currentTimeMillis() + expireSecond * 1000; + cacheData.setExpireTime(expireTime); + cacheData.setData(obj); + getCache().put(key, cacheData); + } + + /** + * 判断是否包含某个key + * @param key + * @return + */ + @Override + public boolean containsKey(String key) { + ConcurrentMap concurrentMap = getCache().asMap(); + return concurrentMap.containsKey(key); + } + + /** + * 所有key集合 + * @return + */ + @Override + public Set keySet() { + ConcurrentMap concurrentMap = getCache().asMap(); + return concurrentMap.keySet(); + } + + /** + * 移除某个模块的所有key + * @param module + */ + @Override + public void removeByModule(String module) { + ConcurrentMap concurrentMap = getCache().asMap(); + List removeKeys = Lists.newArrayList(); + Set keySet = concurrentMap.keySet(); + keySet.forEach(e -> { + CacheKeyBuilder cacheKeyBuilder = JSON.parseObject(e, CacheKeyBuilder.class); + if (cacheKeyBuilder.getCacheModule().equals(module)){ + removeKeys.add(e); + } + }); + if (CollectionUtils.isNotEmpty(removeKeys)) { + getCache().invalidateAll(removeKeys); + } + } + + /** + * 移除某个模块 某个分组下的缓存 + * @param module + * @param group + */ + @Override + public void removeByModuleAndGroup(String module, String group){ + ConcurrentMap concurrentMap = getCache().asMap(); + List removeKeys = Lists.newArrayList(); + Set keySet = concurrentMap.keySet(); + keySet.forEach(e -> { + CacheKeyBuilder cacheKeyBuilder = JSON.parseObject(e, CacheKeyBuilder.class); + if (cacheKeyBuilder.getCacheModule().equals(module) && group.equals(cacheKeyBuilder.getGroup())){ + removeKeys.add(e); + } + }); + if (CollectionUtils.isNotEmpty(removeKeys)) { + getCache().invalidateAll(removeKeys); + } + } + + /** + * 根据缓存个数和过期时间初始化缓存的方法 + * @param expireDays + * @param maximumSize + * @param scanPath + * @return + */ + public LoadingCache initCache(Integer expireDays, Integer maximumSize, String scanPath) { + //加载缓存方法 + Map methodMap = cacheLoadFunction(scanPath); + //构建缓存对象 + Caffeine builder = Caffeine.newBuilder(); + if(maximumSize != null){ + builder.maximumSize(maximumSize); + } + if(expireDays != null){ + builder.expireAfterAccess(expireDays, TimeUnit.DAYS); + } + return builder.recordStats() + .build(key -> { + String cacheModule = CacheKey.getCacheModeByCacheKey(key); + CacheLoadMethod loadMethod = methodMap.get(cacheModule); + if (loadMethod == null) { + return null; + } + Method method = loadMethod.getLoadMethod(); + Object object = SmartApplicationContext.getBean(method.getDeclaringClass()); + //方法返回值 + Object result = null; + if (method.getParameterCount() == 0) { + result = method.invoke(object); + }else{ + result = method.invoke(object, key); + } + if(result == null){ + return null; + } + //指定咖啡因缓存返回值 + Long expireTime = null; + if(loadMethod.getExpireSecond()>0){ + expireTime = System.currentTimeMillis() + loadMethod.getExpireSecond() * 1000; + } + CacheData cacheData = new CacheData(); + cacheData.setExpireTime(expireTime); + cacheData.setData(result); + return cacheData; + }); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/cache/AbstractDisableCache.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/cache/AbstractDisableCache.java new file mode 100644 index 00000000..3759a96a --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/cache/AbstractDisableCache.java @@ -0,0 +1,119 @@ +package net.lab1024.smartadmin.service.module.support.beancache.cache; + +import com.google.common.collect.Maps; +import com.google.common.collect.Sets; +import lombok.extern.slf4j.Slf4j; +import net.lab1024.smartadmin.service.module.support.beancache.key.CacheKey; +import net.lab1024.smartadmin.service.module.support.beancache.load.CacheLoadMethod; +import net.lab1024.smartadmin.service.third.SmartApplicationContext; + +import java.lang.reflect.Method; +import java.util.Map; +import java.util.Set; + +/** + * [ ] + * + * @author 罗伊 + * @date 2021/4/14 15:27 + */ +@Slf4j +public class AbstractDisableCache implements IBeanCache { + + private Map methodMap; + + /** + * 构造函数 + * @param scanPath + */ + public AbstractDisableCache(String scanPath) { + //加载缓存方法 + this.methodMap = cacheLoadFunction(scanPath); + } + + @Override + public Map getCache() { + log.warn("Cache is disable!"); + return Maps.newHashMap(); + } + + @Override + public void remove(String key) { + log.warn("Cache is disable!"); + return; + } + + @Override + public void clear() { + log.warn("Cache is disable!"); + return; + } + + @Override + public T get(String key) { + log.warn("Cache is disable!"); + + String cacheModule = CacheKey.getCacheModeByCacheKey(key); + CacheLoadMethod loadMethod = methodMap.get(cacheModule); + if (loadMethod == null) { + throw null; + } + Method method = loadMethod.getLoadMethod(); + Object object = SmartApplicationContext.getBean(method.getDeclaringClass()); + Object result = null; + try { + if (method.getParameterCount() == 0) { + result = method.invoke(object); + }else{ + result = method.invoke(object, key); + } + }catch (Exception e){ + log.error("Cache get exception:{}",e); + } + return (T) result; + + } + + @Override + public void refresh(String key) { + log.warn("Cache is disable!"); + return; + } + + @Override + public void put(String key, Object obj) { + log.warn("Cache is disable!"); + return; + } + + @Override + public void put(String key, Object obj, long expireSecond) { + log.warn("Cache is disable!"); + return; + } + + + @Override + public boolean containsKey(String key) { + log.warn("Cache is disable!"); + return false; + } + + @Override + public Set keySet() { + log.warn("Cache is disable!"); + return Sets.newHashSet(); + } + + @Override + public void removeByModule(String module) { + log.warn("Cache is disable!"); + return; + } + + @Override + public void removeByModuleAndGroup(String module, String group) { + log.warn("Cache is disable!"); + return; + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/cache/IBeanCache.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/cache/IBeanCache.java new file mode 100644 index 00000000..b6157568 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/cache/IBeanCache.java @@ -0,0 +1,128 @@ +package net.lab1024.smartadmin.service.module.support.beancache.cache; + +import com.google.common.collect.Maps; +import net.lab1024.smartadmin.service.module.support.beancache.load.CacheLoad; +import net.lab1024.smartadmin.service.module.support.beancache.load.CacheLoadMethod; +import org.reflections.Reflections; +import org.reflections.scanners.MethodAnnotationsScanner; +import org.reflections.util.ConfigurationBuilder; + +import java.lang.reflect.Method; +import java.util.Map; +import java.util.Set; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/9/6 15:55 + */ +public interface IBeanCache { + + /** + * 获取缓存 + * + * @return + */ + T getCache(); + + /** + * 移除某个缓存 + * + * @param key + */ + void remove(String key); + + /** + * 清除所有 + */ + void clear(); + + /** + * 获取某个缓存对象 + * + * @param key + * @return + */ + T get(String key); + + /** + * 刷新某个缓存key-异步刷新 + * + * @param key + */ + void refresh(String key); + + /** + * 设置key->value + * + * @param key + * @param obj + */ + void put(String key, Object obj); + + /** + * 待过期时间get + * @param key + * @param obj + * @param expireSecond + */ + void put(String key, Object obj, long expireSecond); + + /** + * 判断是否包含某个key + * + * @param key + * @return + */ + boolean containsKey(String key); + + /** + * 所有key集合 + * + * @return + */ + Set keySet(); + + /** + * 移除某个模块的所有key + * + * @param module + */ + void removeByModule(String module); + + /** + * 移除某个模块 某个分组下的缓存 + * + * @param module + * @param group + */ + void removeByModuleAndGroup(String module, String group); + + + /** + * 加载 CacheLoad注解的方法 + * @param scanPath + * @return + */ + default Map cacheLoadFunction(String scanPath) { + Reflections reflections = new Reflections(new ConfigurationBuilder() + .forPackages(scanPath) + .addScanners(new MethodAnnotationsScanner()) + ); + Map methodMap = Maps.newHashMap(); + Set methods = reflections.getMethodsAnnotatedWith(CacheLoad.class); + for (Method method : methods) { + CacheLoad cacheLoad = method.getAnnotation(CacheLoad.class); + if (cacheLoad != null) { + String cacheModule = cacheLoad.value(); + CacheLoadMethod cacheLoadMethod = new CacheLoadMethod(); + cacheLoadMethod.setCacheModule(cacheModule); + cacheLoadMethod.setExpireSecond(cacheLoad.expireSecond()); + cacheLoadMethod.setLoadMethod(method); + methodMap.put(cacheModule, cacheLoadMethod); + } + } + return methodMap; + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/domain/CacheClear.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/domain/CacheClear.java new file mode 100644 index 00000000..e4d4d249 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/domain/CacheClear.java @@ -0,0 +1,18 @@ +package net.lab1024.smartadmin.service.module.support.beancache.domain; + +import lombok.Data; + +/** + * [ ] + * + * @author 罗伊 + * @date 2021/5/10 10:45 + */ +@Data +public class CacheClear { + + private String module; + + private String group; + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/domain/CacheData.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/domain/CacheData.java new file mode 100644 index 00000000..205fcc5a --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/domain/CacheData.java @@ -0,0 +1,23 @@ +package net.lab1024.smartadmin.service.module.support.beancache.domain; + +import lombok.Data; + +/** + * [ ] + * + * @author 罗伊 + * @date 2021/4/22 17:21 + */ +@Data +public class CacheData { + + /** + * 过期时间 + */ + private Long expireTime; + + /** + * 缓存数据 + */ + private T data; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/domain/CacheStatsVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/domain/CacheStatsVO.java new file mode 100644 index 00000000..8731f739 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/domain/CacheStatsVO.java @@ -0,0 +1,56 @@ +package net.lab1024.smartadmin.service.module.support.beancache.domain; + +import lombok.Data; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/9/8 11:14 + */ +@Data +public class CacheStatsVO { + /** + * 记录缓存请求数量 + */ + private long requestCount; + /** + * 记录缓存命中 + */ + private long hitCount; + /** + * 记录缓存未命中 + */ + private long missCount; + /** + * CacheLoader加载成功 + */ + private long loadSuccessCount; + /** + * CacheLoader加载成功加载失败 + */ + private long loadFailureCount; + /** + * 总加载时间 + */ + private long totalLoadTime; + /** + * 缓存失效的数量 + */ + private long evictionCount; + + /** + * 返回缓存命中率 + */ + private double hitRate; + + /** + * 返回缓存命中率 + */ + private double missRate; + + /** + * 加载新值的平均时间 + */ + private double averageLoadPenalty; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/key/CacheKey.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/key/CacheKey.java new file mode 100644 index 00000000..93dd05e0 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/key/CacheKey.java @@ -0,0 +1,94 @@ +package net.lab1024.smartadmin.service.module.support.beancache.key; + +import com.alibaba.fastjson.JSON; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/9/6 17:20 + */ +public class CacheKey { + + /** + * 构建缓存key信息 + * + * @param cacheModule + * @param group + * @param businessId + * @return + */ + public static String cacheKey(String cacheModule, String group, String businessId) { + CacheKeyBuilder cacheKeyBuilder = CacheKeyBuilder.builder() + .cacheModule(cacheModule) + .group(group) + .businessId(businessId).build(); + return cacheKey(cacheKeyBuilder); + } + + public static String cacheKeyGroup(String cacheModule, String group) { + CacheKeyBuilder cacheKeyBuilder = CacheKeyBuilder.builder() + .cacheModule(cacheModule) + .group(group).build(); + return cacheKey(cacheKeyBuilder); + } + + /** + * 构建缓存key信息 + * + * @param cacheModule + * @param businessId + * @return + */ + public static String cacheKey(String cacheModule, String businessId) { + CacheKeyBuilder cacheKeyBuilder = CacheKeyBuilder.builder() + .cacheModule(cacheModule) + .businessId(businessId).build(); + return cacheKey(cacheKeyBuilder); + } + + + public static String cacheKey(String cacheModule) { + CacheKeyBuilder cacheKeyBuilder = CacheKeyBuilder.builder() + .cacheModule(cacheModule).build(); + return cacheKey(cacheKeyBuilder); + } + + /** + * 构建缓存key信息 + * + * @param cacheKeyBuilder + * @return + */ + public static String cacheKey(CacheKeyBuilder cacheKeyBuilder) { + return JSON.toJSONString(cacheKeyBuilder); + } + + /** + * 通过缓存key获取对应的method key + * + * @param cacheKey + * @return + */ + public static String getCacheModeByCacheKey(String cacheKey) { + CacheKeyBuilder cacheKeyBuilder = JSON.parseObject(cacheKey, CacheKeyBuilder.class); + return cacheKeyBuilder.getCacheModule(); + } + + /** + * 通过缓存key获取对应的businessId + * + * @param cacheKey + * @return + */ + public static String getBusinessIdByCacheKey(String cacheKey) { + CacheKeyBuilder cacheKeyBuilder = JSON.parseObject(cacheKey, CacheKeyBuilder.class); + return cacheKeyBuilder.getBusinessId(); + } + + public static String getGroupIdByCacheKey(String cacheKey) { + CacheKeyBuilder cacheKeyBuilder = JSON.parseObject(cacheKey, CacheKeyBuilder.class); + return cacheKeyBuilder.getGroup(); + } + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/key/CacheKeyBuilder.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/key/CacheKeyBuilder.java new file mode 100644 index 00000000..c186af4b --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/key/CacheKeyBuilder.java @@ -0,0 +1,25 @@ +package net.lab1024.smartadmin.service.module.support.beancache.key; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * [ ] + * + * @author 罗伊 + * @date 2021/1/23 17:41 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class CacheKeyBuilder { + + private String cacheModule; + + private String group; + + private String businessId; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/load/CacheLoad.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/load/CacheLoad.java new file mode 100644 index 00000000..e213561d --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/load/CacheLoad.java @@ -0,0 +1,26 @@ +package net.lab1024.smartadmin.service.module.support.beancache.load; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/9/6 15:53 + */ +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +public @interface CacheLoad { + + String value(); + + /** + * 过期时间 默认不过期依据总体过期时间定义 + * @return + */ + long expireSecond() default 0L; + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/load/CacheLoadMethod.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/load/CacheLoadMethod.java new file mode 100644 index 00000000..977952b3 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beancache/load/CacheLoadMethod.java @@ -0,0 +1,29 @@ +package net.lab1024.smartadmin.service.module.support.beancache.load; + +import lombok.Data; + +import java.lang.reflect.Method; + +/** + * [ ] + * + * @author 罗伊 + * @date 2021/4/22 17:28 + */ +@Data +public class CacheLoadMethod { + + /** + * 缓存模块 + */ + private String cacheModule; + /** + * 缓存过期时间 + */ + private long expireSecond; + + /** + * 缓存加载方法 + */ + private Method loadMethod; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beanrecord/BeanRecordService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beanrecord/BeanRecordService.java new file mode 100644 index 00000000..bc90a6d9 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beanrecord/BeanRecordService.java @@ -0,0 +1,460 @@ +package net.lab1024.smartadmin.service.module.support.beanrecord; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.google.common.collect.Lists; +import io.swagger.annotations.ApiModelProperty; +import lombok.extern.slf4j.Slf4j; +import net.lab1024.smartadmin.service.module.support.beanrecord.annotation.FieldBigDecimalValue; +import net.lab1024.smartadmin.service.module.support.beanrecord.annotation.FieldDoc; +import net.lab1024.smartadmin.service.module.support.beanrecord.annotation.FieldEnumValue; +import net.lab1024.smartadmin.service.module.support.beanrecord.annotation.FieldSqlValue; +import net.lab1024.smartadmin.service.third.SmartApplicationContext; +import net.lab1024.smartadmin.service.util.SmartBaseEnumUtil; +import net.lab1024.smartadmin.service.util.SmartBigDecimalUtil; +import net.lab1024.smartadmin.service.util.date.SmartDateFormatterEnum; +import net.lab1024.smartadmin.service.util.date.SmartLocalDateUtil; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import java.beans.PropertyDescriptor; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.*; +import java.util.Map.Entry; +import java.util.concurrent.ConcurrentHashMap; + +/** + * [ ] + * + * @author 罗伊 + */ +@Slf4j +@Service +public class BeanRecordService { + + /** + * 字段描述缓存 + */ + private ConcurrentHashMap fieldDescCacheMap = new ConcurrentHashMap<>(); + + /** + * 类 加注解字段缓存 + */ + private ConcurrentHashMap> fieldMap = new ConcurrentHashMap<>(); + + /** + * 数据批量对比 + * @param oldObjectList + * @param newObjectList + * @param + * @return + */ + public String beanListParse(List oldObjectList, List newObjectList) { + boolean valid = this.valid(oldObjectList, newObjectList); + if (!valid) { + return ""; + } + OperateTypeEnum operateType = this.getOperateType(oldObjectList, newObjectList); + String operateContent = ""; + if (OperateTypeEnum.ADD.equals(operateType) || OperateTypeEnum.DELETE.equals(operateType)) { + operateContent = this.getObjectListContent(newObjectList); + if (StringUtils.isEmpty(operateContent)) { + return ""; + } + return operateType.getDesc() + ":" + operateContent; + } + if (OperateTypeEnum.UPDATE.equals(operateType)) { + return this.getUpdateContentList(oldObjectList, newObjectList); + } + return operateContent; + } + + /** + * 单个对象变动内容 + * @param oldObjectList + * @param newObjectList + * @param + * @return + */ + private String getUpdateContentList(List oldObjectList, List newObjectList) { + String oldContent = this.getObjectListContent(oldObjectList); + String newContent = this.getObjectListContent(newObjectList); + if (oldContent.equals(newContent)) { + return ""; + } + if (StringUtils.isEmpty(oldContent) && StringUtils.isEmpty(newContent)) { + return ""; + } + return "【原数据】:
" + oldContent + "
" + "【新数据】:
" + newContent; + } + + /** + * 获取一个对象的内容信息 + * @param objectList + * @param + * @return + */ + private String getObjectListContent(List objectList) { + if (CollectionUtils.isEmpty(objectList)) { + return ""; + } + List fields = this.getField(objectList.get(0)); + List contentList = Lists.newArrayList(); + for (Object objItem : objectList) { + Map beanParseMap = this.fieldParse(objItem, fields); + contentList.add(this.getAddDeleteContent(beanParseMap)); + } + return StringUtils.join(contentList, "
"); + } + + + /** + * 解析多个对象的变更,删除,新增 + * oldObject 为空 ,newObject 不为空 为新增 + * oldObject 不为空 ,newObject 不空 为删除 + * 都不为空为编辑 + * + * @param oldObject + * @param newObject + * @return + */ + public String beanParse(Object oldObject, Object newObject) { + boolean valid = this.valid(oldObject, newObject); + if (!valid) { + return null; + } + OperateTypeEnum operateType = this.getOperateType(oldObject, newObject); + String operateContent = ""; + if (OperateTypeEnum.ADD.equals(operateType) || OperateTypeEnum.DELETE.equals(operateType)) { + operateContent = this.getAddDeleteContent(newObject); + } + if (OperateTypeEnum.UPDATE.equals(operateType)) { + operateContent = this.getUpdateContent(oldObject, newObject); + } + if (StringUtils.isEmpty(operateContent)) { + return ""; + } + return operateType.getDesc() + ":" + operateContent; + } + + /** + * 解析单个bean的内容 + * + * @param operateDesc + * @param object + * @return + */ + public String beanParse(String operateDesc, Object object) { + String content = this.getAddDeleteContent(object); + if (StringUtils.isEmpty(operateDesc)) { + return content; + } + return operateDesc + ":" + content; + } + + /** + * 获取新增或删除操作内容 + * + * @param object 新增或删除的对象 + * @return + */ + private String getAddDeleteContent(Object object) { + List fields = this.getField(object); + Map beanParseMap = this.fieldParse(object, fields); + return this.getAddDeleteContent(beanParseMap); + } + + private String getAddDeleteContent(Map beanParseMap) { + List contentList = new ArrayList<>(); + for (Entry entry : beanParseMap.entrySet()) { + contentList.add(entry.getKey() + ":" + entry.getValue()); + } + String operateContent = StringUtils.join(contentList, ";"); + if (StringUtils.isEmpty(operateContent)) { + return ""; + } + return operateContent; + } + + + /** + * 获取更新操作内容 + * + * @param oldObject + * @param newObject + * @return + */ + private String getUpdateContent(T oldObject, T newObject) { + List fields = this.getField(oldObject); + List contentList = new ArrayList<>(); + Map oldBeanParseMap = this.fieldParse(oldObject, fields); + Map newBeanParseMap = this.fieldParse(newObject, fields); + //oldBeanParseMap与newBeanParseMap size一定相同 + for (Entry entry : oldBeanParseMap.entrySet()) { + String desc = entry.getKey(); + String oldValue = entry.getValue(); + String newValue = newBeanParseMap.get(desc); + if (oldValue.equals(newValue)) { + continue; + } + String content = desc + ":" + "由【" + oldValue + "】变更为【" + newValue + "】"; + contentList.add(content); + } + if (CollectionUtils.isEmpty(contentList)) { + return ""; + } + String operateContent = StringUtils.join(contentList, ";"); + if (StringUtils.isEmpty(operateContent)) { + return ""; + } + return operateContent; + } + + + /** + * 接bean对象 + * + * @param object + * @param fields + * @return + */ + private Map fieldParse(Object object, List fields) { + if (fields == null || fields.size() == 0) { + return null; + } + //对象解析结果 + Map objectParse = new HashMap<>(16); + for (Field field : fields) { + field.setAccessible(true); + String desc = this.getFieldDesc(field); + if (StringUtils.isEmpty(desc)) { + continue; + } + String fieldValue = this.getFieldValue(field, object); + objectParse.put(desc, fieldValue); + } + return objectParse; + } + + /** + * 获取字段值 + * @param field + * @param object + * @return + */ + private String getFieldValue(Field field, Object object) { + Object fieldValue = ""; + Class clazz = object.getClass(); + try { + PropertyDescriptor pd = new PropertyDescriptor(field.getName(), clazz); + Method get = pd.getReadMethod(); + fieldValue = get.invoke(object); + } catch (Exception e) { + log.error("bean operate log: reflect field value error " + field.getName()); + return ""; + } + if (fieldValue == null) { + return ""; + } + FieldEnumValue fieldEnumValue = field.getAnnotation(FieldEnumValue.class); + FieldSqlValue fieldSqlValue = field.getAnnotation(FieldSqlValue.class); + if (fieldEnumValue != null) { + return SmartBaseEnumUtil.getEnumDescByValue(fieldValue, fieldEnumValue.enumClass()); + } + if (fieldSqlValue != null) { + return this.getRelateDisplayValue(fieldValue, fieldSqlValue); + } + if (fieldValue instanceof Date) { + LocalDateTime localDateTime = SmartLocalDateUtil.toLocalDateTime((Date) fieldValue); + return SmartLocalDateUtil.format(localDateTime, SmartDateFormatterEnum.YMD_HMS); + } + if (fieldValue instanceof LocalDateTime) { + return SmartLocalDateUtil.format((LocalDateTime) fieldValue, SmartDateFormatterEnum.YMD_HMS); + } + if (fieldValue instanceof LocalDate) { + return SmartLocalDateUtil.format((LocalDate) fieldValue, SmartDateFormatterEnum.YMD); + } + if (fieldValue instanceof BigDecimal) { + FieldBigDecimalValue fieldBigDecimalValue = field.getAnnotation(FieldBigDecimalValue.class); + if (fieldBigDecimalValue != null) { + BigDecimal value = SmartBigDecimalUtil.setScale((BigDecimal) fieldValue, fieldBigDecimalValue.scale()); + return value.toString(); + } + } + return fieldValue.toString(); + } + + /** + * 获取关联字段的显示值 + * + * @param fieldValue + * @return + */ + private String getRelateDisplayValue(Object fieldValue, FieldSqlValue fieldSqlValue) { + Class relateMapper = fieldSqlValue.relateMapper(); + BaseMapper mapper = SmartApplicationContext.getBean(relateMapper); + if (mapper == null) { + return ""; + } + String relateFieldValue = fieldValue.toString(); + QueryWrapper qw = new QueryWrapper(); + qw.select(fieldSqlValue.relateDisplayColumn()); + qw.eq(fieldSqlValue.relateColumn(), relateFieldValue); + List displayValue = mapper.selectObjs(qw); + if (CollectionUtils.isEmpty(displayValue)) { + return ""; + } + return displayValue.get(0).toString(); + } + + /** + * 获取字段描述信息 优先 OperateField 没得话swagger判断 + * + * @param field + * @return + */ + private String getFieldDesc(Field field) { + // 根据字段名称 从缓存中查询 + String fieldName = field.toGenericString(); + String desc = fieldDescCacheMap.get(fieldName); + if (null != desc) { + return desc; + } + FieldDoc operateField = field.getAnnotation(FieldDoc.class); + if (operateField != null) { + desc = operateField.value(); + } else { + ApiModelProperty apiModelProperty = field.getAnnotation(ApiModelProperty.class); + desc = null == apiModelProperty ? "" : apiModelProperty.value(); + } + fieldDescCacheMap.put(fieldName, desc); + return desc; + } + + /** + * 获取操作类型 + * + * @param oldObject + * @param newObject + * @return + */ + private OperateTypeEnum getOperateType(Object oldObject, Object newObject) { + if (oldObject == null && newObject != null) { + return OperateTypeEnum.ADD; + } + if (oldObject != null && newObject == null) { + return OperateTypeEnum.DELETE; + } + return OperateTypeEnum.UPDATE; + } + + /** + * 校验是否进行比对 + * + * @param oldObject + * @param newObject + * @return + */ + private boolean valid(Object oldObject, Object newObject) { + if (oldObject == null && newObject == null) { + log.error("bean operate log: oldObject and newObject is null"); + return false; + } + if (oldObject == null && newObject != null) { + log.info("bean operate log: oldObject is null,new:" + newObject.getClass().getName() + " " + OperateTypeEnum.ADD.getDesc()); + return true; + } + if (oldObject != null && newObject == null) { + log.info("bean operate log: newObject is null,old:" + oldObject.getClass().getName() + " " + OperateTypeEnum.DELETE.getDesc()); + return true; + } + if (oldObject != null && newObject != null) { + String oldClass = oldObject.getClass().getName(); + String newClass = newObject.getClass().getName(); + if (oldClass.equals(newClass)) { + log.info("bean operate log: " + oldObject.getClass().getName() + " " + OperateTypeEnum.UPDATE.getDesc()); + return true; + } + log.error("bean operate log: is different class:old:" + oldClass + " new:" + newClass); + return false; + } + return true; + } + + + /** + * 校验 + * @param oldObjectList + * @param newObjectList + * @param + * @return + */ + private boolean valid(List oldObjectList, List newObjectList) { + if (CollectionUtils.isEmpty(oldObjectList) && CollectionUtils.isEmpty(newObjectList)) { + log.error("bean operate log: oldObjectList and newObject is null"); + return false; + } + if (CollectionUtils.isEmpty(oldObjectList) && CollectionUtils.isNotEmpty(newObjectList)) { + log.info("bean operate log: oldObjectList is null,new:" + newObjectList.getClass().getName() + " " + OperateTypeEnum.ADD.getDesc()); + return true; + } + if (CollectionUtils.isNotEmpty(oldObjectList) && CollectionUtils.isEmpty(newObjectList)) { + log.info("bean operate log: newObject is null,old:" + oldObjectList.getClass().getName() + " " + OperateTypeEnum.DELETE.getDesc()); + return true; + } + if (CollectionUtils.isNotEmpty(oldObjectList) && CollectionUtils.isNotEmpty(newObjectList)) { + T oldObject = oldObjectList.get(0); + T newObject = newObjectList.get(0); + String oldClass = oldObject.getClass().getName(); + String newClass = newObject.getClass().getName(); + if (oldClass.equals(newClass)) { + log.info("bean operate log: " + oldObject.getClass().getName() + " " + OperateTypeEnum.UPDATE.getDesc()); + return true; + } + log.error("bean operate log: is different class:old:" + oldClass + " new:" + newClass); + return false; + } + return true; + } + + /** + * 查询 包含 file key 注解的字段 + * 使用缓存 + * + * @param obj + * @return + */ + private List getField(Object obj) { + // 从缓存中查询 + Class tClass = obj.getClass(); + List fieldList = fieldMap.get(tClass); + if (null != fieldList) { + return fieldList; + } + + // 这一段递归代码 是为了 从父类中获取属性 + Class tempClass = tClass; + fieldList = new ArrayList<>(); + while (tempClass != null) { + Field[] declaredFields = tempClass.getDeclaredFields(); + for (Field field : declaredFields) { + // 过虑出有注解字段 + if (!field.isAnnotationPresent(FieldDoc.class)) { + continue; + } + field.setAccessible(true); + fieldList.add(field); + } + tempClass = tempClass.getSuperclass(); + } + fieldMap.put(tClass, fieldList); + return fieldList; + } + + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beanrecord/OperateTypeEnum.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beanrecord/OperateTypeEnum.java new file mode 100644 index 00000000..c3fa5aee --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beanrecord/OperateTypeEnum.java @@ -0,0 +1,32 @@ +package net.lab1024.smartadmin.service.module.support.beanrecord; + +/** + * [ ] + * + * @author 罗伊 + */ +public enum OperateTypeEnum { + + ADD(1, "新增"), + + UPDATE(2, "修改"), + + DELETE(3, "删除"); + + private Integer value; + + private String desc; + + OperateTypeEnum(Integer value, String desc) { + this.value = value; + this.desc = desc; + } + + public Integer getValue() { + return value; + } + + public String getDesc() { + return desc; + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beanrecord/annotation/FieldBigDecimalValue.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beanrecord/annotation/FieldBigDecimalValue.java new file mode 100644 index 00000000..f1966d91 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beanrecord/annotation/FieldBigDecimalValue.java @@ -0,0 +1,17 @@ +package net.lab1024.smartadmin.service.module.support.beanrecord.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * [ ] + * + * @author 罗伊 + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface FieldBigDecimalValue { + int scale() default 2; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beanrecord/annotation/FieldDoc.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beanrecord/annotation/FieldDoc.java new file mode 100644 index 00000000..5c0bfde3 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beanrecord/annotation/FieldDoc.java @@ -0,0 +1,22 @@ +package net.lab1024.smartadmin.service.module.support.beanrecord.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * [ ] + * + * @author 罗伊 + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface FieldDoc { + /** + * 本属性的注释信息 + * @return + */ + String value() default ""; + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beanrecord/annotation/FieldEnumValue.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beanrecord/annotation/FieldEnumValue.java new file mode 100644 index 00000000..6a72a594 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beanrecord/annotation/FieldEnumValue.java @@ -0,0 +1,21 @@ +package net.lab1024.smartadmin.service.module.support.beanrecord.annotation; + +import net.lab1024.smartadmin.service.common.constant.BaseEnum; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * [ ] + * + * @author 罗伊 + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface FieldEnumValue { + + Class enumClass() default BaseEnum.class; + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beanrecord/annotation/FieldSqlValue.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beanrecord/annotation/FieldSqlValue.java new file mode 100644 index 00000000..71c0f27f --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/beanrecord/annotation/FieldSqlValue.java @@ -0,0 +1,36 @@ +package net.lab1024.smartadmin.service.module.support.beanrecord.annotation; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * [ ] + * + * @author 罗伊 + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface FieldSqlValue { + + /** + * 关联字段名称 + * @return + */ + String relateColumn() default "id"; + + /** + * 关联显示的字段 + * @return + */ + String relateDisplayColumn() default ""; + /** + * 是否关联字段查询Mapper + * @return + */ + Class relateMapper() default BaseMapper.class; + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/captcha/CaptchaController.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/captcha/CaptchaController.java new file mode 100644 index 00000000..fed88483 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/captcha/CaptchaController.java @@ -0,0 +1,35 @@ +package net.lab1024.smartadmin.service.module.support.captcha; + + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import net.lab1024.smartadmin.service.common.anno.NoNeedLogin; +import net.lab1024.smartadmin.service.common.constant.SwaggerTagConst; +import net.lab1024.smartadmin.service.common.controller.SupportBaseController; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.support.captcha.domain.CaptchaVO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 图形验证码业务 路由 + * + * @author listen + * @date 2021/08/31 20:00 + */ +@Api(tags = SwaggerTagConst.Support.CAPTCHA) +@RestController +public class CaptchaController extends SupportBaseController { + + @Autowired + private CaptchaService captchaService; + + @NoNeedLogin + @ApiOperation("获取图形验证码 by listen") + @GetMapping("/captcha") + public ResponseDTO generateCaptcha() { + return captchaService.generateCaptcha(); + } + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/captcha/CaptchaService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/captcha/CaptchaService.java new file mode 100644 index 00000000..d2208632 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/captcha/CaptchaService.java @@ -0,0 +1,98 @@ +package net.lab1024.smartadmin.service.module.support.captcha; + +import com.google.code.kaptcha.impl.DefaultKaptcha; +import lombok.extern.slf4j.Slf4j; +import net.lab1024.smartadmin.service.common.codeconst.EmployeeResponseCodeConst; +import net.lab1024.smartadmin.service.common.codeconst.ResponseCodeConst; +import net.lab1024.smartadmin.service.common.constant.CommonConst; +import net.lab1024.smartadmin.service.common.constant.RedisKeyConst; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.support.captcha.domain.CaptchaVO; +import net.lab1024.smartadmin.service.third.SmartRedisService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.Base64Utils; + +import javax.imageio.ImageIO; +import java.awt.image.BufferedImage; +import java.io.ByteArrayOutputStream; +import java.util.Objects; +import java.util.UUID; + +/** + * 图形验证码 服务 + * + * @author 胡克 + * @date 2021/8/31 20:52 + */ +@Slf4j +@Service +public class CaptchaService { + + @Autowired + private DefaultKaptcha defaultKaptcha; + + @Autowired + private SmartRedisService redisService; + + /** + * 获取生成图形验证码 + * 默认 1 分钟有效期 + * + * @return + */ + public ResponseDTO generateCaptcha() { + String base64Code; + String captchaText = defaultKaptcha.createText(); + BufferedImage image = defaultKaptcha.createImage(captchaText); + try (ByteArrayOutputStream os = new ByteArrayOutputStream()) { + ImageIO.write(image, "jpg", os); + base64Code = Base64Utils.encodeToString(os.toByteArray()); + } catch (Exception e) { + log.error("verificationCode exception:", e); + return ResponseDTO.wrapMsg(ResponseCodeConst.SYSTEM_ERROR, "generate captcha error" ); + } + // uuid 唯一标识 + String uuid = UUID.randomUUID().toString().replace("-", CommonConst.EMPTY_STR); + + /** + * 返回验证码对象 + * 图片 base64格式 + * 默认有效时长 80s + */ + CaptchaVO captchaVO = new CaptchaVO(); + captchaVO.setCaptchaId(uuid); + captchaVO.setCaptchaImg("data:image/png;base64," + base64Code); + redisService.set(buildCaptchaRedisKey(uuid), captchaText, 80L); + return ResponseDTO.succData(captchaVO); + } + + /** + * 校验图形验证码 + * + * @param captchaId + * @param captcha + * @return + */ + public ResponseDTO checkCaptcha(String captchaId, String captcha) { + if (StringUtils.isBlank(captchaId) || StringUtils.isBlank(captcha)) { + return ResponseDTO.wrapMsg(EmployeeResponseCodeConst.ERROR_PARAM, "请输入正确验证码" ); + } + String redisKey = buildCaptchaRedisKey(captchaId); + String redisCode = redisService.get(redisKey); + if (StringUtils.isBlank(redisCode)) { + return ResponseDTO.wrapMsg(EmployeeResponseCodeConst.VERIFICATION_CODE_INVALID, "验证码错误或已过期,请刷新重试" ); + } + if (!Objects.equals(redisCode, captcha)) { + return ResponseDTO.wrapMsg(EmployeeResponseCodeConst.VERIFICATION_CODE_INVALID, "验证码错误或已过期,请刷新重试" ); + } + // 校验通过 移除 + redisService.del(redisKey); + return ResponseDTO.succ(); + } + + private String buildCaptchaRedisKey(String codeId) { + return RedisKeyConst.Base.CAPTCHA + codeId; + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/captcha/domain/CaptchaDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/captcha/domain/CaptchaDTO.java new file mode 100644 index 00000000..927126b6 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/captcha/domain/CaptchaDTO.java @@ -0,0 +1,24 @@ +package net.lab1024.smartadmin.service.module.support.captcha.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * 图形验证码 VO + * + * @author 胡克 + * @date 2021/8/31 20:52 + */ +@Data +public class CaptchaDTO { + + @ApiModelProperty + @NotBlank(message = "验证码标识不能为空" ) + private String captchaId; + + @ApiModelProperty + @NotBlank(message = "验证码不能为空" ) + private String captcha; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/captcha/domain/CaptchaVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/captcha/domain/CaptchaVO.java new file mode 100644 index 00000000..8d66edc9 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/captcha/domain/CaptchaVO.java @@ -0,0 +1,20 @@ +package net.lab1024.smartadmin.service.module.support.captcha.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 图形验证码 VO + * + * @author 胡克 + * @date 2021/8/31 20:52 + */ +@Data +public class CaptchaVO { + + @ApiModelProperty("验证码标识" ) + private String captchaId; + + @ApiModelProperty("验证码图片" ) + private String captchaImg; +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/kaptcha/KaptchaColor.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/captcha/render/CaptchaColor.java similarity index 80% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/kaptcha/KaptchaColor.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/captcha/render/CaptchaColor.java index 4baeb2a2..5cc05edb 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/kaptcha/KaptchaColor.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/captcha/render/CaptchaColor.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.common.kaptcha; +package net.lab1024.smartadmin.service.module.support.captcha.render; import com.google.common.collect.Lists; @@ -9,14 +9,12 @@ import java.util.Random; /** * [ 验证码颜色 ] * - * @author yandanyang + * @author 罗伊 * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/7/6 0006 上午 10:51 + * * @since JDK1.8 */ -public class KaptchaColor { +public class CaptchaColor { public static Color getColor() { diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/kaptcha/KaptchaNoise.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/captcha/render/CaptchaNoise.java similarity index 67% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/kaptcha/KaptchaNoise.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/captcha/render/CaptchaNoise.java index 22238a6c..eb429b81 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/kaptcha/KaptchaNoise.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/captcha/render/CaptchaNoise.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.common.kaptcha; +package net.lab1024.smartadmin.service.module.support.captcha.render; import com.google.code.kaptcha.NoiseProducer; import com.google.code.kaptcha.util.Configurable; @@ -10,15 +10,14 @@ import java.util.Random; /** * [ 验证码加噪处理 ] * - * @author yandanyang + * @author 罗伊 * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/7/6 0006 上午 10:47 + * * @since JDK1.8 */ -public class KaptchaNoise extends Configurable implements NoiseProducer { - public KaptchaNoise() { +public class CaptchaNoise extends Configurable implements NoiseProducer { + + public CaptchaNoise() { } @Override @@ -26,16 +25,16 @@ public class KaptchaNoise extends Configurable implements NoiseProducer { int width = image.getWidth(); int height = image.getHeight(); - Graphics2D graph = (Graphics2D)image.getGraphics(); + Graphics2D graph = (Graphics2D) image.getGraphics(); graph.setRenderingHints(new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON)); graph.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL)); Random random = new Random(); int noiseLineNum = random.nextInt(3); - if(noiseLineNum == 0){ + if (noiseLineNum == 0) { noiseLineNum = 1; } - for (int i = 0; i < noiseLineNum; i++){ - graph.setColor(KaptchaColor.getColor()); + for (int i = 0; i < noiseLineNum; i++) { + graph.setColor(CaptchaColor.getColor()); graph.drawLine(random.nextInt(width), random.nextInt(height), 10 + random.nextInt(20), 10 + random.nextInt(20)); } diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/kaptcha/KaptchaWordRenderer.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/captcha/render/CaptchaWordRenderer.java similarity index 79% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/kaptcha/KaptchaWordRenderer.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/captcha/render/CaptchaWordRenderer.java index 38ff1b4c..6ec1b43c 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/kaptcha/KaptchaWordRenderer.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/captcha/render/CaptchaWordRenderer.java @@ -1,5 +1,6 @@ -package net.lab1024.smartadmin.common.kaptcha; +package net.lab1024.smartadmin.service.module.support.captcha.render; +import com.google.code.kaptcha.text.WordRenderer; import com.google.code.kaptcha.util.Configurable; import java.awt.*; @@ -11,16 +12,14 @@ import java.util.Random; /** * [ 验证码字体生成 ] * - * @author yandanyang + * @author 罗伊 * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/7/6 0006 上午 9:43 + * * @since JDK1.8 */ -public class KaptchaWordRenderer extends Configurable implements com.google.code.kaptcha.text.WordRenderer { +public class CaptchaWordRenderer extends Configurable implements WordRenderer { - public KaptchaWordRenderer() { + public CaptchaWordRenderer() { } @Override @@ -46,11 +45,11 @@ public class KaptchaWordRenderer extends Configurable implements com.google.code int widthNeeded = 0; int startPosX; - for(startPosX = 0; startPosX < wordChars.length; ++startPosX) { + for (startPosX = 0; startPosX < wordChars.length; ++ startPosX) { chosenFonts[startPosX] = fonts[random.nextInt(fonts.length)]; char[] charToDraw = new char[]{wordChars[startPosX]}; GlyphVector gv = chosenFonts[startPosX].createGlyphVector(frc, charToDraw); - charWidths[startPosX] = (int)gv.getVisualBounds().getWidth(); + charWidths[startPosX] = (int) gv.getVisualBounds().getWidth(); if (startPosX > 0) { widthNeeded += 2; } @@ -60,8 +59,8 @@ public class KaptchaWordRenderer extends Configurable implements com.google.code startPosX = (width - widthNeeded) / 2; - for(int i = 0; i < wordChars.length; ++i) { - g2D.setColor(KaptchaColor.getColor()); + for (int i = 0; i < wordChars.length; ++ i) { + g2D.setColor(CaptchaColor.getColor()); g2D.setFont(chosenFonts[i].deriveFont(Font.PLAIN)); char[] charToDraw = new char[]{wordChars[i]}; g2D.drawChars(charToDraw, 0, charToDraw.length, startPosX, startPosY); @@ -71,5 +70,4 @@ public class KaptchaWordRenderer extends Configurable implements com.google.code return image; } - } diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/DataTracerController.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/DataTracerController.java new file mode 100644 index 00000000..e2f35514 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/DataTracerController.java @@ -0,0 +1,37 @@ +package net.lab1024.smartadmin.service.module.support.datatracer; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import net.lab1024.smartadmin.service.common.constant.SwaggerTagConst; +import net.lab1024.smartadmin.service.common.controller.AdminBaseController; +import net.lab1024.smartadmin.service.common.domain.PageResultDTO; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.support.datatracer.domain.DataTracerQueryForm; +import net.lab1024.smartadmin.service.module.support.datatracer.domain.DataTracerVO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; + +import javax.validation.Valid; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/8/25 11:00 + */ + +@Api(tags = {SwaggerTagConst.Admin.MANAGER_DATA_TRACER}) +@RestController +public class DataTracerController extends AdminBaseController { + + @Autowired + private DataTracerService dataTracerService; + + @ApiOperation("分页查询业务操作日志 - by listen") + @PostMapping("/data/tracer/log/query") + public ResponseDTO> query(@Valid @RequestBody DataTracerQueryForm queryForm) { + return dataTracerService.query(queryForm); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/DataTracerDao.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/DataTracerDao.java new file mode 100644 index 00000000..d376d1f5 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/DataTracerDao.java @@ -0,0 +1,37 @@ +package net.lab1024.smartadmin.service.module.support.datatracer; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import net.lab1024.smartadmin.service.module.support.datatracer.domain.DataTracerEntity; +import net.lab1024.smartadmin.service.module.support.datatracer.domain.DataTracerQueryForm; +import net.lab1024.smartadmin.service.module.support.datatracer.domain.DataTracerVO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; +import java.util.List; +/** + * [ ] + * + * @author 罗伊 + * @date 2020/8/25 11:57 + */ +@Mapper +@Component +public interface DataTracerDao extends BaseMapper { + + /** + * 操作记录查询 + * @param businessId + * @param businessType + * @return + */ + List selectRecord(@Param("businessId") Long businessId, @Param("businessType") Integer businessType); + + /** + * 分页查询 + * @param page + * @param queryForm + * @return + */ + List query(Page page, @Param("query") DataTracerQueryForm queryForm); +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/DataTracerManger.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/DataTracerManger.java new file mode 100644 index 00000000..c33e3b8c --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/DataTracerManger.java @@ -0,0 +1,15 @@ +package net.lab1024.smartadmin.service.module.support.datatracer; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import net.lab1024.smartadmin.service.module.support.datatracer.domain.DataTracerEntity; +import org.springframework.stereotype.Service; + +/** + * [ ] + * + * @author 罗伊 + * @date 2021/8/23 11:04 + */ +@Service +public class DataTracerManger extends ServiceImpl { +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/DataTracerService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/DataTracerService.java new file mode 100644 index 00000000..c44e1b37 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/DataTracerService.java @@ -0,0 +1,116 @@ +package net.lab1024.smartadmin.service.module.support.datatracer; + +import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.google.common.collect.Lists; +import lombok.extern.slf4j.Slf4j; +import net.lab1024.smartadmin.service.common.domain.PageResultDTO; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.support.datatracer.constant.DataTracerBusinessTypeEnum; +import net.lab1024.smartadmin.service.module.support.datatracer.domain.DataTracerDTO; +import net.lab1024.smartadmin.service.module.support.datatracer.domain.DataTracerEntity; +import net.lab1024.smartadmin.service.module.support.datatracer.domain.DataTracerQueryForm; +import net.lab1024.smartadmin.service.module.support.datatracer.domain.DataTracerVO; +import net.lab1024.smartadmin.service.util.SmartPageUtil; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/8/25 11:00 + */ +@Slf4j +@Service +public class DataTracerService { + + @Autowired + private DataTracerDao dataTracerDao; + @Autowired + private DataTracerManger dataTracerManger; + + /** + * 保存操作日志 + * + * @param dataTracerDTO + * @param operatorId 操作人id + * @param operatorName 操作人名称 + */ + public void saveOperateRecord(DataTracerDTO dataTracerDTO, Long operatorId, String operatorName) { + DataTracerEntity dataTracerEntity = this.convertEntity(dataTracerDTO, operatorId, operatorName); + dataTracerDao.insert(dataTracerEntity); + } + + /** + * 批量保存 + * + * @param dataTracerList + * @param operatorId + * @param operatorName + */ + public void saveBatchOperateRecord(List dataTracerList, Long operatorId, String operatorName) { + if (CollectionUtils.isEmpty(dataTracerList)) { + return; + } + List recordEntityList = Lists.newArrayList(); + for (DataTracerDTO dataTracerDTO : dataTracerList) { + DataTracerEntity dataTracerEntity = this.convertEntity(dataTracerDTO, operatorId, operatorName); + recordEntityList.add(dataTracerEntity); + } + dataTracerManger.saveBatch(recordEntityList); + } + + /** + * dto 转实体对象 + * + * @param dataTracerDTO + * @param operatorId + * @param operatorName + * @return + */ + private DataTracerEntity convertEntity(DataTracerDTO dataTracerDTO, Long operatorId, String operatorName) { + DataTracerEntity recordEntity = new DataTracerEntity(); + recordEntity.setBusinessId(dataTracerDTO.getBusinessId()); + recordEntity.setBusinessType(dataTracerDTO.getBusinessType().getValue()); + recordEntity.setBusinessTypeDesc(dataTracerDTO.getBusinessType().getDesc()); + recordEntity.setOperateType((Integer) dataTracerDTO.getOperateType().getValue()); + recordEntity.setOperateTypeDesc(dataTracerDTO.getOperateType().getDesc()); + recordEntity.setOperateContent(dataTracerDTO.getOperateContent()); + recordEntity.setOperatorId(operatorId); + recordEntity.setOperatorName(operatorName); + if (dataTracerDTO.getExtraData() != null) { + recordEntity.setExtraData(JSON.toJSONString(dataTracerDTO.getExtraData())); + } + recordEntity.setCreateTime(dataTracerDTO.getOperateTime()); + return recordEntity; + } + + + /** + * 查询某个业务的所有的日志信息 + * + * @param businessId + * @param orderType + * @return + */ + public List selectRecord(Long businessId, DataTracerBusinessTypeEnum orderType) { + return dataTracerDao.selectRecord(businessId, orderType.getValue()); + } + + /** + * 分页查询 + * + * @param queryForm + * @return + */ + public ResponseDTO> query(DataTracerQueryForm queryForm) { + Page page = SmartPageUtil.convert2PageQuery(queryForm); + List list = dataTracerDao.query(page, queryForm); + PageResultDTO pageResult = SmartPageUtil.convert2PageResult(page, list); + return ResponseDTO.succData(pageResult); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/constant/DataTracerBusinessTypeEnum.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/constant/DataTracerBusinessTypeEnum.java new file mode 100644 index 00000000..319e7e32 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/constant/DataTracerBusinessTypeEnum.java @@ -0,0 +1,37 @@ +package net.lab1024.smartadmin.service.module.support.datatracer.constant; + + +import net.lab1024.smartadmin.service.common.constant.BaseEnum; + +/** + * [ 数据业务类型 ] + * + * @author 罗伊 + * @date 2020/8/11 15:56 + */ +public enum DataTracerBusinessTypeEnum implements BaseEnum { + + NOTICE(1, "系统通知"), + + ; + + private Integer value; + + private String desc; + + DataTracerBusinessTypeEnum(Integer value, String desc) { + this.value = value; + this.desc = desc; + } + + @Override + public Integer getValue() { + return value; + } + + @Override + public String getDesc() { + return desc; + } + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/constant/DataTracerOperateTypeEnum.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/constant/DataTracerOperateTypeEnum.java new file mode 100644 index 00000000..0a6de70f --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/constant/DataTracerOperateTypeEnum.java @@ -0,0 +1,42 @@ +package net.lab1024.smartadmin.service.module.support.datatracer.constant; + + +import net.lab1024.smartadmin.service.common.constant.BaseEnum; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/8/25 17:04 + */ +public interface DataTracerOperateTypeEnum extends BaseEnum { + + Integer INIT_CODE = 4; + + enum Common implements BaseEnum { + SAVE(0, "保存"), + SAVE_SUBMIT(1, "保存并提交"), + UPDATE(2, "更新"), + UPDATE_SUBMIT(3, "更新并提交"), + DELETE(4, "删除"); + + private Integer value; + private String desc; + + Common(Integer value, String desc) { + this.value = value; + this.desc = desc; + } + + @Override + public Integer getValue() { + return value; + } + + @Override + public String getDesc() { + return desc; + } + } + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/domain/DataTracerDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/domain/DataTracerDTO.java new file mode 100644 index 00000000..920fdb19 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/domain/DataTracerDTO.java @@ -0,0 +1,48 @@ +package net.lab1024.smartadmin.service.module.support.datatracer.domain; + +import lombok.Data; +import net.lab1024.smartadmin.service.common.constant.BaseEnum; +import net.lab1024.smartadmin.service.module.support.datatracer.constant.DataTracerBusinessTypeEnum; + +import java.time.LocalDateTime; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/8/25 16:03 + */ +@Data +public class DataTracerDTO { + + /** + * 业务id + */ + private Long businessId; + + /** + * 业务类型 + */ + private DataTracerBusinessTypeEnum businessType; + + /** + * 操作类型 + */ + private BaseEnum operateType; + + /** + * 操作内容 + */ + private String operateContent; + + /** + * 操作时间 + */ + private LocalDateTime operateTime; + + /** + * 扩展信息 + */ + private DataTracerExtraDataDTO extraData; + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/domain/DataTracerEntity.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/domain/DataTracerEntity.java new file mode 100644 index 00000000..2b2c5609 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/domain/DataTracerEntity.java @@ -0,0 +1,74 @@ +package net.lab1024.smartadmin.service.module.support.datatracer.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import net.lab1024.smartadmin.service.module.support.datatracer.constant.DataTracerBusinessTypeEnum; +import net.lab1024.smartadmin.service.module.support.datatracer.constant.DataTracerOperateTypeEnum; + +import java.time.LocalDateTime; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/8/25 11:01 + */ +@Data +@TableName("t_data_tracer") +public class DataTracerEntity { + + @TableId(type = IdType.AUTO) + private Long id; + /** + * 业务id + */ + private Long businessId; + /** + * 业务类型 + * {@link DataTracerBusinessTypeEnum} + */ + private Integer businessType; + + /** + * 业务类型描述 + * 因是死数据,只做展示使用故直接存类型描述信息 + */ + private String businessTypeDesc; + + /** + * 操作类型 + * {@link DataTracerOperateTypeEnum} + */ + private Integer operateType; + + private String operateTypeDesc; + + /** + * 操作内容 + */ + private String operateContent; + + /** + * 操作人 + */ + private Long operatorId; + + private String operatorName; + + /** + * 扩展数据 + */ + private String extraData; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 更新时间 + */ + private LocalDateTime updateTime; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/domain/DataTracerExtraDataDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/domain/DataTracerExtraDataDTO.java new file mode 100644 index 00000000..9f9e9dbe --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/domain/DataTracerExtraDataDTO.java @@ -0,0 +1,34 @@ +package net.lab1024.smartadmin.service.module.support.datatracer.domain; + +import lombok.Data; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/8/25 17:23 + */ +@Data +public class DataTracerExtraDataDTO { + + /** + * 对象所属类 + */ + private Class clazz; + + /** + * 原对象 + */ + private Object originObj; + + /** + * 新对象 + */ + private Object newObj; + + public DataTracerExtraDataDTO(Class clazz, Object originObj, Object newObj) { + this.clazz = clazz; + this.originObj = originObj; + this.newObj = newObj; + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/domain/DataTracerQueryForm.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/domain/DataTracerQueryForm.java new file mode 100644 index 00000000..c61f5b4c --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/domain/DataTracerQueryForm.java @@ -0,0 +1,28 @@ +package net.lab1024.smartadmin.service.module.support.datatracer.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import net.lab1024.smartadmin.service.common.domain.PageBaseDTO; +import net.lab1024.smartadmin.service.common.swagger.ApiModelPropertyEnum; +import net.lab1024.smartadmin.service.common.validator.CheckEnum; +import net.lab1024.smartadmin.service.module.support.datatracer.constant.DataTracerBusinessTypeEnum; + +import javax.validation.constraints.NotNull; + +/** + * [ ] + * + * @author 罗伊 + * @date 2021/8/17 8:47 + */ +@Data +public class DataTracerQueryForm extends PageBaseDTO { + + @ApiModelPropertyEnum(DataTracerBusinessTypeEnum.class) + @CheckEnum(enumClazz = DataTracerBusinessTypeEnum.class, required = true, message = "业务类型错误") + private Integer businessType; + + @ApiModelProperty("业务id") + @NotNull(message = "业务id不能为空") + private Long businessId; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/domain/DataTracerVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/domain/DataTracerVO.java new file mode 100644 index 00000000..443e8e0a --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/domain/DataTracerVO.java @@ -0,0 +1,46 @@ +package net.lab1024.smartadmin.service.module.support.datatracer.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import net.lab1024.smartadmin.service.common.swagger.ApiModelPropertyEnum; +import net.lab1024.smartadmin.service.module.support.datatracer.constant.DataTracerBusinessTypeEnum; + +import java.time.LocalDateTime; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/8/25 16:03 + */ +@Data +public class DataTracerVO { + + @ApiModelProperty("单据id") + private Long businessId; + + @ApiModelPropertyEnum(value = DataTracerBusinessTypeEnum.class, desc = "业务类型") + private Integer businessType; + + @ApiModelProperty("单据类型描述") + private String businessTypeDesc; + + @ApiModelProperty("操作类型") + private Integer operateType; + + @ApiModelProperty("操作类型描述") + private String operateTypeDesc; + + @ApiModelProperty("操作内容") + private String operateContent; + + @ApiModelProperty("操作人") + private Long operatorId; + + @ApiModelProperty("操作人名称") + private String operatorName; + + @ApiModelProperty("操作时间") + private LocalDateTime createTime; + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/package-info.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/package-info.java new file mode 100644 index 00000000..23a9a288 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/datatracer/package-info.java @@ -0,0 +1,6 @@ +/** + * 数据跟踪(数据变更留痕) + * @author 卓大 + * @Date 2021/8/13 + */ +package net.lab1024.smartadmin.service.module.support.datatracer; \ No newline at end of file diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/FileController.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/FileController.java new file mode 100644 index 00000000..4f7fcc5f --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/FileController.java @@ -0,0 +1,90 @@ +package net.lab1024.smartadmin.service.module.support.file; + +import net.lab1024.smartadmin.service.common.constant.SwaggerTagConst; +import net.lab1024.smartadmin.service.common.domain.PageResultDTO; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.common.controller.SupportBaseController; +import net.lab1024.smartadmin.service.module.support.file.domain.FileFolderTypeEnum; +import net.lab1024.smartadmin.service.module.support.file.domain.dto.*; +import net.lab1024.smartadmin.service.module.support.file.domain.vo.FileUploadVO; +import net.lab1024.smartadmin.service.module.support.file.domain.vo.FileVO; +import net.lab1024.smartadmin.service.module.support.file.service.FileService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletRequest; +import javax.validation.Valid; +import java.io.IOException; +import java.util.List; + +/** + * @Description: 文件服务 + * @Author: 1024lab + */ +@RestController +@Api(tags = {SwaggerTagConst.Support.FILE}) +public class FileController extends SupportBaseController { + + @Autowired + private FileService fileService; + + @ApiOperation(value = "文件上传 by listen", notes = FileFolderTypeEnum.INFO) + @PostMapping("/file/upload/{folder}") + public ResponseDTO upload(MultipartFile file, @PathVariable Integer folder) { + return fileService.fileUpload(file, folder, 0L, null); + } + + @ApiOperation(value = "文件上传,通过url上传 by listen", notes = FileFolderTypeEnum.INFO) + @PostMapping("/file/upload/url") + public ResponseDTO uploadByUrl(@RequestBody @Valid FileUrlUploadDTO urlUploadDTO) { + return fileService.fileUpload(urlUploadDTO); + } + + @ApiOperation("获取文件URL:根据fileKey by listen") + @GetMapping("/file/url") + public ResponseDTO getUrl(@RequestParam String fileKey) { + return fileService.getFileUrl(fileKey); + } + + @ApiOperation("批量获取文件url:根据fileKey by listen") + @PostMapping("/file/url/query") + public ResponseDTO> getBatchFileUrl(@RequestBody @Valid FileUrlQueryDTO queryDTO) { + return fileService.getBatchFileUrl(queryDTO); + } + + @ApiOperation(value = "系统文件查询 by listen") + @PostMapping("/file/query") + public ResponseDTO> queryListByPage(@RequestBody @Valid FileQueryDTO queryDTO) { + return fileService.queryListByPage(queryDTO); + } + + @ApiOperation(value = "下载文件流(根据fileId) by listen") + @GetMapping("/file/downLoad/{id}") + public ResponseEntity downLoadById(@PathVariable Long id, HttpServletRequest request) throws IOException { + String ua = request.getHeader("User-Agent"); + return fileService.downLoadById(id, ua); + } + + @ApiOperation(value = "下载文件流(根据fileKey) by listen") + @GetMapping("/file/downLoad") + public ResponseEntity downLoad(String fileKey, HttpServletRequest request) { + String ua = request.getHeader("User-Agent"); + return fileService.downloadByFileKey(fileKey, ua); + } + + @ApiOperation("删除文件(根据fileKey) by listen") + @GetMapping("/file/delete") + public ResponseDTO deleteByFileKey(@RequestParam String fileKey) { + return fileService.deleteByFileKey(fileKey); + } + + @ApiOperation("根据文件服务和key 查询文件元数据 by listen") + @GetMapping("/file/query/metadata") + public ResponseDTO queryFileMetadata(@RequestParam String fileKey) { + return fileService.queryFileMetadata(fileKey); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/FileDao.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/FileDao.java new file mode 100644 index 00000000..54d74051 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/FileDao.java @@ -0,0 +1,44 @@ +package net.lab1024.smartadmin.service.module.support.file; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import net.lab1024.smartadmin.service.module.support.file.domain.FileEntity; +import net.lab1024.smartadmin.service.module.support.file.domain.dto.FileQueryDTO; +import net.lab1024.smartadmin.service.module.support.file.domain.vo.FileVO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * @author listen + * @date 2018-01-05 上午 9:49 + */ +@Mapper +@Component +public interface FileDao extends BaseMapper { + + /** + * 文件key批量查询 + * @param fileKeyList + * @return + */ + List listByFileKeyList(@Param("fileKeyList") List fileKeyList); + + /** + * 文件key单个查询 + * @param fileKey + * @return + */ + FileVO getByFileKey(@Param("fileKey") String fileKey); + + /** + * 分页查询 + * @param page + * @param queryDTO + * @return + */ + List queryListByPage(Page page, @Param("query") FileQueryDTO queryDTO); + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/FileEntity.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/FileEntity.java new file mode 100644 index 00000000..b993782f --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/FileEntity.java @@ -0,0 +1,65 @@ +package net.lab1024.smartadmin.service.module.support.file.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/8/25 11:57 + */ +@Data +@TableName(value = "t_file") +public class FileEntity { + + /** + * 主键id + */ + @TableId(type = IdType.AUTO) + private Long id; + + /** + * 文件夹类型 + */ + private Integer folderType; + + /** + * 文件名称 + */ + private String fileName; + + /** + * 文件大小 + */ + private Long fileSize; + + /** + * 文件key,用于文件下载 + */ + private String fileKey; + + /** + * 文件类型 + */ + private String fileType; + + /** + * 创建人,即上传人 + */ + private Long creatorId; + + /** + * 创建人 姓名 + */ + private String creatorName; + + private LocalDateTime updateTime; + + private LocalDateTime createTime; +} + diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/FileFolderTypeEnum.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/FileFolderTypeEnum.java new file mode 100644 index 00000000..1e2caa51 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/FileFolderTypeEnum.java @@ -0,0 +1,53 @@ +package net.lab1024.smartadmin.service.module.support.file.domain; + +import net.lab1024.smartadmin.service.common.constant.BaseEnum; +import net.lab1024.smartadmin.service.common.constant.CommonConst; + +/** + * 文件服务 文件夹位置类型枚举类 + * + * @author listen + * @date 2019年10月11日 15:34:47 + */ +public enum FileFolderTypeEnum implements BaseEnum { + + COMMON(1, CommonConst.FileFolderConst.FOLDER_PUBLIC + "/common/", "通用"), + + /** + * folder 后续添加斜杠 + */ + ERP_STOCK(301, CommonConst.FileFolderConst.FOLDER_PUBLIC + "/help/", "erp货物"), + + ERP_CUSTOMER(302, CommonConst.FileFolderConst.FOLDER_PUBLIC + "/news/", "erp客商"), + + ; + + public static final String INFO = "201:erp货物"; + + private Integer value; + + private String folder; + + private String desc; + + FileFolderTypeEnum(Integer value, String folder, String desc) { + this.value = value; + this.folder = folder; + this.desc = desc; + } + + public String getFolder() { + return folder; + } + + @Override + public Integer getValue() { + return this.value; + } + + @Override + public String getDesc() { + return this.desc; + } +} + diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/domain/dto/FileDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/dto/FileDTO.java similarity index 68% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/domain/dto/FileDTO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/dto/FileDTO.java index 16491d85..69b6074c 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/domain/dto/FileDTO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/dto/FileDTO.java @@ -1,7 +1,5 @@ -package net.lab1024.smartadmin.module.support.file.domain.dto; +package net.lab1024.smartadmin.service.module.support.file.domain.dto; -import net.lab1024.smartadmin.common.anno.ApiModelPropertyEnum; -import net.lab1024.smartadmin.module.support.file.constant.FileServiceTypeEnum; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -10,12 +8,8 @@ import java.sql.Date; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 + * @author 罗伊 + * @date 2020/8/25 11:57 */ @Data public class FileDTO { @@ -29,9 +23,6 @@ public class FileDTO { @ApiModelProperty("相关业务类型") private String moduleType; - @ApiModelPropertyEnum(FileServiceTypeEnum.class) - private Integer fileLocationType; - @ApiModelProperty("文件名称") private String fileName; diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/dto/FileDownloadDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/dto/FileDownloadDTO.java new file mode 100644 index 00000000..4930603c --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/dto/FileDownloadDTO.java @@ -0,0 +1,25 @@ +package net.lab1024.smartadmin.service.module.support.file.domain.dto; + +import lombok.Data; + +/** + * 文件下载DTO类 + * + * @author 胡克 + * @date 2020/2/4 15:30 + */ +@Data +public class FileDownloadDTO { + + /** + * 文件字节数据 + */ + private byte[] data; + + /** + * 文件元数据 + */ + private FileMetadataDTO metadata; + + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/dto/FileMetadataDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/dto/FileMetadataDTO.java new file mode 100644 index 00000000..82cdcb73 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/dto/FileMetadataDTO.java @@ -0,0 +1,28 @@ +package net.lab1024.smartadmin.service.module.support.file.domain.dto; + +import lombok.Data; + +/** + * 文件元数据 DTO 类 + * + * @author 胡克 + * @date 2020/1/16 17:35 + */ +@Data +public class FileMetadataDTO { + + /** + * 文件名称 + */ + private String fileName; + + /** + * 文件大小/字节 + */ + private Long fileSize; + + /** + * 文件格式 + */ + private String fileFormat; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/dto/FileQueryDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/dto/FileQueryDTO.java new file mode 100644 index 00000000..dbe227dc --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/dto/FileQueryDTO.java @@ -0,0 +1,27 @@ +package net.lab1024.smartadmin.service.module.support.file.domain.dto; + +import net.lab1024.smartadmin.service.common.domain.PageBaseDTO; +import net.lab1024.smartadmin.service.common.swagger.ApiModelPropertyEnum; +import net.lab1024.smartadmin.service.common.validator.CheckEnum; +import net.lab1024.smartadmin.service.module.support.file.domain.FileFolderTypeEnum; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @Description: 文件信息查询dto + * @Author: sbq + * @CreateDate: 2019/7/3 17:38 + * @Version: 1.0 + */ +@Data +public class FileQueryDTO extends PageBaseDTO { + + @ApiModelProperty(value = "文件名称") + private String fileName; + + @ApiModelProperty(value = "业务类型") + @ApiModelPropertyEnum(FileFolderTypeEnum.class) + @CheckEnum(enumClazz = FileFolderTypeEnum.class, message = "文件业务类型错误") + private Integer folderType; + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/dto/FileUrlQueryDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/dto/FileUrlQueryDTO.java new file mode 100644 index 00000000..07b464ef --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/dto/FileUrlQueryDTO.java @@ -0,0 +1,25 @@ +package net.lab1024.smartadmin.service.module.support.file.domain.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotEmpty; +import java.util.List; + +/** + * 文件 url 查询DTO + * + * @author 胡克 + * @date 2020/5/12 14:51 + */ +@AllArgsConstructor +@NoArgsConstructor +@Data +public class FileUrlQueryDTO { + + @ApiModelProperty("file key") + @NotEmpty(message = "file key not empty") + private List fileKeyList; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/dto/FileUrlResultDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/dto/FileUrlResultDTO.java new file mode 100644 index 00000000..c72c052c --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/dto/FileUrlResultDTO.java @@ -0,0 +1,21 @@ +package net.lab1024.smartadmin.service.module.support.file.domain.dto; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 文件 url 查询DTO + * + * @author 胡克 + * @date 2020/5/12 14:51 + */ +@NoArgsConstructor +@AllArgsConstructor +@Data +public class FileUrlResultDTO { + + private String fileKey; + + private String fileUrl; +} \ No newline at end of file diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/dto/FileUrlUploadDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/dto/FileUrlUploadDTO.java new file mode 100644 index 00000000..be5394ed --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/dto/FileUrlUploadDTO.java @@ -0,0 +1,39 @@ +package net.lab1024.smartadmin.service.module.support.file.domain.dto; + +import net.lab1024.smartadmin.service.common.swagger.ApiModelPropertyEnum; +import net.lab1024.smartadmin.service.common.validator.CheckEnum; +import net.lab1024.smartadmin.service.module.support.file.domain.FileFolderTypeEnum; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; + +/** + * url上传文件 DTO 类 + * + * @author listen + * @date 2020年3月16日 10:14:54 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class FileUrlUploadDTO { + + @ApiModelPropertyEnum(FileFolderTypeEnum.class) + @CheckEnum(enumClazz = FileFolderTypeEnum.class, required = true, message = "文件夹类型错误") + private Integer folder; + + @ApiModelProperty("文件url") + @NotBlank(message = "文件url不能为空") + private String fileUrl; + + @NotNull(message = "userId不能为空") + private Long userId; + + @NotBlank(message = "上传姓名不能为空") + private String userName; + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/vo/FileSimpleVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/vo/FileSimpleVO.java new file mode 100644 index 00000000..7bfa4c79 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/vo/FileSimpleVO.java @@ -0,0 +1,21 @@ +package net.lab1024.smartadmin.service.module.support.file.domain.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 文件简单VO + * + * @author 善逸 + * @date 2019/10/23 11:15 + */ +@Data +public class FileSimpleVO { + + @ApiModelProperty("文件Key") + private String fileKey; + + @ApiModelProperty("文件Url") + private String fileUrl; + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/vo/FileUploadVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/vo/FileUploadVO.java new file mode 100644 index 00000000..f0822832 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/vo/FileUploadVO.java @@ -0,0 +1,32 @@ +package net.lab1024.smartadmin.service.module.support.file.domain.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/8/25 11:57 + */ +@Data +public class FileUploadVO { + + @ApiModelProperty(value = "文件id") + private Long fileId; + + @ApiModelProperty(value = "文件名称") + private String fileName; + + @ApiModelProperty(value = "fileUrl") + private String fileUrl; + + @ApiModelProperty(value = "fileKey") + private String fileKey; + + @ApiModelProperty(value = "文件大小") + private Long fileSize; + + @ApiModelProperty(value = "文件类型") + private String fileType; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/vo/FileVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/vo/FileVO.java new file mode 100644 index 00000000..e7c64cc9 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/domain/vo/FileVO.java @@ -0,0 +1,45 @@ +package net.lab1024.smartadmin.service.module.support.file.domain.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import net.lab1024.smartadmin.service.common.swagger.ApiModelPropertyEnum; +import net.lab1024.smartadmin.service.module.support.file.domain.FileFolderTypeEnum; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/8/25 11:57 + */ +@Data +public class FileVO { + + @ApiModelProperty("主键") + private Long id; + + + @ApiModelProperty("存储文件夹类型") + @ApiModelPropertyEnum(FileFolderTypeEnum.class) + private Integer folderType; + + @ApiModelProperty("文件名称") + private String fileName; + + @ApiModelProperty("文件大小") + private Integer fileSize; + + @ApiModelProperty("文件类型") + private String fileType; + + @ApiModelProperty("文件路径") + private String fileKey; + + @ApiModelProperty("上传人") + private Long creatorId; + + @ApiModelProperty("上传人") + private String creatorName; + + @ApiModelProperty("文件展示url") + private String fileUrl; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/service/FileService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/service/FileService.java new file mode 100644 index 00000000..420107ee --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/service/FileService.java @@ -0,0 +1,334 @@ +package net.lab1024.smartadmin.service.module.support.file.service; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.google.common.collect.Lists; +import net.lab1024.smartadmin.service.common.codeconst.FileResponseCodeConst; +import net.lab1024.smartadmin.service.common.codeconst.ResponseCodeConst; +import net.lab1024.smartadmin.service.common.constant.CommonConst; +import net.lab1024.smartadmin.service.common.constant.RedisKeyConst; +import net.lab1024.smartadmin.service.common.domain.PageResultDTO; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.support.file.FileDao; +import net.lab1024.smartadmin.service.module.support.file.domain.FileEntity; +import net.lab1024.smartadmin.service.module.support.file.domain.FileFolderTypeEnum; +import net.lab1024.smartadmin.service.module.support.file.domain.dto.*; +import net.lab1024.smartadmin.service.module.support.file.domain.vo.FileUploadVO; +import net.lab1024.smartadmin.service.module.support.file.domain.vo.FileVO; +import net.lab1024.smartadmin.service.third.SmartRedisService; +import net.lab1024.smartadmin.service.util.SmartBaseEnumUtil; +import net.lab1024.smartadmin.service.util.SmartBeanUtil; +import net.lab1024.smartadmin.service.util.SmartPageUtil; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.mock.web.MockMultipartFile; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import java.io.IOException; +import java.net.URL; +import java.net.URLConnection; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/8/25 11:57 + */ +@Service +public class FileService { + + @Resource + private IFileStorageService fileStorageService; + + @Autowired + private FileDao fileDao; + + @Autowired + private SmartRedisService redisService; + + @Value("${spring.servlet.multipart.max-file-size}") + private String maxFileSize; + + /** + * 文件上传服务:通过 url 上传 + * + * @param urlUploadDTO + * @return + */ + public ResponseDTO fileUpload(FileUrlUploadDTO urlUploadDTO) { + try { + URL url = new URL(urlUploadDTO.getFileUrl()); + URLConnection urlConnection = url.openConnection(); + // 获取文件格式 + String contentType = urlConnection.getContentType(); + String fileType = fileStorageService.getFileTypeByContentType(contentType); + // 生成文件key + String fileKey = fileStorageService.generateFileNameByType(fileType); + MockMultipartFile file = new MockMultipartFile(fileKey, fileKey, contentType, urlConnection.getInputStream()); + return this.fileUpload(file, urlUploadDTO.getFolder(), urlUploadDTO.getUserId(), urlUploadDTO.getUserName()); + } catch (IOException e) { + return ResponseDTO.wrap(FileResponseCodeConst.UPLOAD_ERROR); + } + } + + /** + * 文件上传服务 + * + * @param file + * @param folderType 文件夹类型 + * @return + */ + public ResponseDTO fileUpload(MultipartFile file, Integer folderType, Long userId, String userName) { + FileFolderTypeEnum folderTypeEnum = SmartBaseEnumUtil.getEnumByValue(folderType, FileFolderTypeEnum.class); + if (null == folderTypeEnum) { + return ResponseDTO.wrap(FileResponseCodeConst.FILE_MODULE_ERROR); + } + if (null == file || file.getSize() == 0) { + return ResponseDTO.wrap(FileResponseCodeConst.FILE_EMPTY); + } + // 校验文件名称 + String originalFilename = file.getOriginalFilename(); + if (StringUtils.isBlank(originalFilename) || originalFilename.length() > CommonConst.NumberLimit.FILE_NAME) { + return ResponseDTO.wrap(FileResponseCodeConst.FILE_NAME_ERROR); + } + // 校验文件大小 + String maxSizeStr = maxFileSize.toLowerCase().replace("mb", ""); + long maxSize = Integer.parseInt(maxSizeStr) * 1024 * 1024L; + if (file.getSize() > maxSize) { + return ResponseDTO.wrapMsg(FileResponseCodeConst.FILE_SIZE_ERROR, String.format(FileResponseCodeConst.FILE_SIZE_ERROR.getMsg(), maxSize)); + } + // 获取文件服务 + ResponseDTO response = fileStorageService.fileUpload(file, folderTypeEnum.getFolder()); + + if (response.isSuccess()) { + // 上传成功 保存记录数据库 + FileUploadVO uploadVO = response.getData(); + + FileEntity fileEntity = new FileEntity(); + fileEntity.setFolderType(folderTypeEnum.getValue()); + fileEntity.setFileName(originalFilename); + fileEntity.setFileSize(file.getSize()); + fileEntity.setFileKey(uploadVO.getFileKey()); + fileEntity.setFileType(uploadVO.getFileType()); + fileEntity.setCreatorId(userId); + fileEntity.setCreatorName(userName); + fileDao.insert(fileEntity); + uploadVO.setFileId(fileEntity.getId()); + //添加缓存 + String redisKey = RedisKeyConst.Base.FILE_URL + uploadVO.getFileKey(); + redisService.set(redisKey, uploadVO.getFileUrl(), CommonConst.System.FILE_URL_EXPIRE_SECOND); + + String fileRedisKey = RedisKeyConst.Base.FILE_VO + uploadVO.getFileKey(); + FileVO fileVO = SmartBeanUtil.copy(fileEntity, FileVO.class); + redisService.set(fileRedisKey, fileVO, CommonConst.System.FILE_VO_EXPIRE_SECOND); + } + + return response; + } + + public List getFileList(List fileKeyList) { + if (CollectionUtils.isEmpty(fileKeyList)) { + return Lists.newArrayList(); + } + List fileVOList = Lists.newArrayList(); + fileKeyList.forEach(e -> { + FileVO fileVO = this.getCacheFileVO(e); + if (fileVO != null) { + fileVOList.add(fileVO); + } + }); + return fileVOList; + } + + private FileVO getCacheFileVO(String fileKey) { + String redisKey = RedisKeyConst.Base.FILE_VO + fileKey; + FileVO fileVO = redisService.getObject(redisKey, FileVO.class); + if (fileVO == null) { + fileVO = fileDao.getByFileKey(fileKey); + if (fileVO != null) { + redisService.set(redisKey, fileVO, CommonConst.System.FILE_VO_EXPIRE_SECOND); + } + } + + fileVO.setFileUrl(this.getCacheUrl(fileKey)); + return fileVO; + } + + /** + * 根据文件绝对路径 获取文件URL + * 支持单个 key 逗号分隔的形式 + * + * @param fileKey + * @return + */ + public ResponseDTO getFileUrl(String fileKey) { + if (StringUtils.isBlank(fileKey)) { + return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM); + } + // 处理逗号分隔的字符串 + List stringList = Arrays.asList(fileKey.split(CommonConst.SEPARATOR)); + stringList = stringList.stream().map(e -> this.getCacheUrl(e)).collect(Collectors.toList()); + String result = StringUtils.join(stringList, CommonConst.SEPARATOR_CHAR); + return ResponseDTO.succData(result); + } + + + private String getCacheUrl(String fileKey) { + String redisKey = RedisKeyConst.Base.FILE_URL + fileKey; + String fileUrl = redisService.get(redisKey); + if (null != fileUrl) { + return fileUrl; + } + ResponseDTO responseDTO = fileStorageService.getFileUrl(fileKey); + if (!responseDTO.isSuccess()) { + return null; + } + fileUrl = responseDTO.getData(); + redisService.set(redisKey, fileUrl, CommonConst.System.FILE_URL_EXPIRE_SECOND); + return fileUrl; + } + + + /** + * 批量获取文件url + * 支持单个 key 逗号分隔的形式 + * + * @param queryDTO + * @return + */ + public ResponseDTO> getBatchFileUrl(FileUrlQueryDTO queryDTO) { + // 获取文件服务 + List fileKeyList = queryDTO.getFileKeyList(); + List resultDTOList = fileKeyList.stream().map(fileKey -> { + // 处理逗号分隔的字符串 + List stringList = Arrays.asList(fileKey.split(CommonConst.SEPARATOR)); + stringList = stringList.stream().map(e -> fileStorageService.getFileUrl(e).getData()).collect(Collectors.toList()); + String result = StringUtils.join(stringList, CommonConst.SEPARATOR_CHAR); + return new FileUrlResultDTO(fileKey, result); + }).collect(Collectors.toList()); + + return ResponseDTO.succData(resultDTOList); + } + + /** + * 分页查询文件列表 + * + * @param queryDTO + * @return + */ + public ResponseDTO> queryListByPage(FileQueryDTO queryDTO) { + Page page = SmartPageUtil.convert2PageQuery(queryDTO); + List fileList = fileDao.queryListByPage(page, queryDTO); + if (CollectionUtils.isNotEmpty(fileList)) { + fileList.forEach(e -> { + // 根据文件服务类 获取对应文件服务 查询 url + e.setFileUrl(fileStorageService.getFileUrl(e.getFileKey()).getData()); + }); + } + PageResultDTO pageResultDTO = SmartPageUtil.convert2PageResult(page, fileList); + return ResponseDTO.succData(pageResultDTO); + } + + /** + * 根据文件服务类型 和 FileKey 下载文件 + * + * @param fileKey + * @return + * @throws IOException + */ + public ResponseEntity downloadByFileKey(String fileKey, String userAgent) { + // 根据文件服务类 获取对应文件服务 查询 url + ResponseDTO responseDTO = fileStorageService.fileDownload(fileKey); + if (!responseDTO.isSuccess()) { + HttpHeaders heads = new HttpHeaders(); + heads.add(HttpHeaders.CONTENT_TYPE, "text/html;charset=UTF-8"); + return new ResponseEntity<>(responseDTO.getMsg() + ":" + fileKey, heads, HttpStatus.OK); + } + // 设置下载头 + HttpHeaders heads = new HttpHeaders(); + heads.add(HttpHeaders.CONTENT_TYPE, "application/octet-stream; charset=utf-8"); + // 设置对应浏览器的文件名称编码 + FileDownloadDTO fileDownloadDTO = responseDTO.getData(); + FileMetadataDTO metadata = fileDownloadDTO.getMetadata(); + String fileName = null != metadata ? metadata.getFileName() : fileKey.substring(fileKey.lastIndexOf("/")); + fileName = fileStorageService.getDownloadFileNameByUA(fileName, userAgent); + heads.add(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + fileName); + ResponseEntity responseEntity = new ResponseEntity<>(fileDownloadDTO.getData(), heads, HttpStatus.OK); + return responseEntity; + } + + /** + * 根据id 下载文件 + * + * @param id + * @return + */ + public ResponseEntity downLoadById(Long id, String userAgent) throws IOException { + FileEntity entity = fileDao.selectById(id); + if (null == entity) { + HttpHeaders heads = new HttpHeaders(); + heads.add(HttpHeaders.CONTENT_TYPE, "text/html;charset=UTF-8"); + return new ResponseEntity<>("文件不存在", heads, HttpStatus.OK); + } + + // 根据文件服务类 获取对应文件服务 查询 url + ResponseEntity responseEntity = this.downloadByFileKey(entity.getFileKey(), userAgent); + return responseEntity; + } + + /** + * 根据文件服务和key 删除 + * + * @param fileKey + * @return + */ + public ResponseDTO deleteByFileKey(String fileKey) { + if (StringUtils.isBlank(fileKey)) { + return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM); + } + FileEntity fileEntity = new FileEntity(); + fileEntity.setFileKey(fileKey); + fileEntity = fileDao.selectOne(new QueryWrapper<>(fileEntity)); + if (null == fileEntity) { + return ResponseDTO.wrap(FileResponseCodeConst.FILE_NOT_EXIST); + } + // 根据文件服务类 获取对应文件服务 删除文件 + return fileStorageService.delete(fileKey); + } + + /** + * 根据文件服务和key 查询文件元数据 + * + * @param fileKey + * @return + */ + public ResponseDTO queryFileMetadata(String fileKey) { + if (StringUtils.isBlank(fileKey)) { + return ResponseDTO.wrap(FileResponseCodeConst.FILE_NOT_EXIST); + } + // 查询数据库文件记录 + FileEntity fileEntity = new FileEntity(); + fileEntity.setFileKey(fileKey); + fileEntity = fileDao.selectOne(new QueryWrapper<>(fileEntity)); + if (null == fileEntity) { + return ResponseDTO.wrap(FileResponseCodeConst.FILE_NOT_EXIST); + } + + // 返回 meta + FileMetadataDTO metadataDTO = new FileMetadataDTO(); + metadataDTO.setFileSize(fileEntity.getFileSize()); + metadataDTO.setFileName(fileEntity.getFileName()); + metadataDTO.setFileFormat(fileEntity.getFileType()); + return ResponseDTO.succData(metadataDTO); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/service/FileStorageCloudServiceImpl.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/service/FileStorageCloudServiceImpl.java new file mode 100644 index 00000000..52901b91 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/service/FileStorageCloudServiceImpl.java @@ -0,0 +1,208 @@ +package net.lab1024.smartadmin.service.module.support.file.service; + +import com.amazonaws.services.s3.AmazonS3; +import com.amazonaws.services.s3.model.CannedAccessControlList; +import com.amazonaws.services.s3.model.ObjectMetadata; +import com.amazonaws.services.s3.model.S3Object; +import lombok.extern.slf4j.Slf4j; +import net.lab1024.smartadmin.service.common.codeconst.FileResponseCodeConst; +import net.lab1024.smartadmin.service.common.codeconst.ResponseCodeConst; +import net.lab1024.smartadmin.service.common.constant.CommonConst; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.config.SmartStorageCloudConfig; +import net.lab1024.smartadmin.service.module.support.file.domain.dto.FileDownloadDTO; +import net.lab1024.smartadmin.service.module.support.file.domain.dto.FileMetadataDTO; +import net.lab1024.smartadmin.service.module.support.file.domain.vo.FileUploadVO; +import org.apache.commons.collections4.MapUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.util.FileCopyUtils; +import org.springframework.web.multipart.MultipartFile; + +import java.io.IOException; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; +import java.net.URL; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/8/25 11:57 + */ +@Slf4j +@ConditionalOnProperty(prefix = "file.storage", name = {"mode"}, havingValue = "cloud") +public class FileStorageCloudServiceImpl implements IFileStorageService { + + @Autowired + private AmazonS3 amazonS3; + + @Autowired + private SmartStorageCloudConfig cloudConfig; + + /** + * 自定义元数据 文件名称 + */ + private static final String USER_METADATA_FILE_NAME = "file-name"; + + /** + * 自定义元数据 文件格式 + */ + private static final String USER_METADATA_FILE_FORMAT = "file-format"; + + /** + * 自定义元数据 文件大小 + */ + private static final String USER_METADATA_FILE_SIZE = "file-size"; + + @Override + public ResponseDTO fileUpload(MultipartFile file, String path) { + // 设置文件 key + String originalFilename = file.getOriginalFilename(); + String fileType = this.getFileType(originalFilename); + String fileKey = path + this.generateFileName(originalFilename); + // 文件名称 URL 编码 + String urlEncoderFilename; + try { + urlEncoderFilename = URLEncoder.encode(originalFilename, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + log.error("阿里云文件上传服务URL ENCODE-发生异常:", e); + return ResponseDTO.wrap(FileResponseCodeConst.UPLOAD_ERROR); + } + ObjectMetadata meta = new ObjectMetadata(); + meta.setContentEncoding(StandardCharsets.UTF_8.name()); + meta.setContentDisposition("attachment;filename=" + urlEncoderFilename); + Map userMetadata = new HashMap(10); + userMetadata.put(USER_METADATA_FILE_NAME, urlEncoderFilename); + userMetadata.put(USER_METADATA_FILE_FORMAT, fileType); + userMetadata.put(USER_METADATA_FILE_SIZE, String.valueOf(file.getSize())); + meta.setUserMetadata(userMetadata); + meta.setContentLength(file.getSize()); + meta.setContentType(this.getContentType(fileType)); + try { + amazonS3.putObject(cloudConfig.getBucketName(), fileKey, file.getInputStream(), meta); + } catch (IOException e) { + log.error("文件上传-发生异常:", e); + return ResponseDTO.wrap(FileResponseCodeConst.UPLOAD_ERROR); + } + // 根据文件路径获取并设置访问权限 + CannedAccessControlList acl = this.getACL(path); + amazonS3.setObjectAcl(cloudConfig.getBucketName(), fileKey, acl); + // 返回上传结果 + FileUploadVO uploadVO = new FileUploadVO(); + uploadVO.setFileName(originalFilename); + uploadVO.setFileType(fileType); + // 根据 访问权限 返回不同的 URL + String url = cloudConfig.getPublicUrl() + fileKey; + if (CannedAccessControlList.Private.equals(acl)) { + // 获取临时访问的URL + url = this.getFileUrl(fileKey).getData(); + } + uploadVO.setFileUrl(url); + uploadVO.setFileKey(fileKey); + uploadVO.setFileSize(file.getSize()); + return ResponseDTO.succData(uploadVO); + } + + /** + * 获取文件url + * + * @param fileKey + * @return + */ + @Override + public ResponseDTO getFileUrl(String fileKey) { + if (StringUtils.isBlank(fileKey)) { + return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM); + } + if (!fileKey.startsWith(CommonConst.FileFolderConst.FOLDER_PRIVATE)) { + // 不是私有的 都公共读 + return ResponseDTO.succData(cloudConfig.getPublicUrl() + fileKey); + } + Date expiration = new Date(System.currentTimeMillis() + cloudConfig.getUrlExpire()); + URL url = amazonS3.generatePresignedUrl(cloudConfig.getBucketName(), fileKey, expiration); + String urlStr = url.toString().replace("http://", "https://"); + return ResponseDTO.succData(urlStr); + } + + /** + * 流式下载(名称为原文件) + */ + @Override + public ResponseDTO fileDownload(String key) { + //获取oss对象 + S3Object s3Object = amazonS3.getObject(cloudConfig.getBucketName(), key); + // 获取文件 meta + ObjectMetadata metadata = s3Object.getObjectMetadata(); + Map userMetadata = metadata.getUserMetadata(); + FileMetadataDTO metadataDTO = null; + if (MapUtils.isNotEmpty(userMetadata)) { + metadataDTO = new FileMetadataDTO(); + metadataDTO.setFileFormat(userMetadata.get(USER_METADATA_FILE_FORMAT)); + metadataDTO.setFileName(userMetadata.get(USER_METADATA_FILE_NAME)); + String fileSizeStr = userMetadata.get(USER_METADATA_FILE_SIZE); + Long fileSize = StringUtils.isBlank(fileSizeStr) ? null : Long.valueOf(fileSizeStr); + metadataDTO.setFileSize(fileSize); + } + + // 获得输入流 + InputStream objectContent = s3Object.getObjectContent(); + try { + // 输入流转换为字节流 + byte[] buffer = FileCopyUtils.copyToByteArray(objectContent); + + FileDownloadDTO fileDownloadDTO = new FileDownloadDTO(); + fileDownloadDTO.setData(buffer); + fileDownloadDTO.setMetadata(metadataDTO); + return ResponseDTO.succData(fileDownloadDTO); + } catch (IOException e) { + log.error("文件下载-发生异常:", e); + return ResponseDTO.wrap(FileResponseCodeConst.DOWNLOAD_ERROR); + } finally { + try { + // 关闭输入流 + objectContent.close(); + s3Object.close(); + } catch (IOException e) { + log.error("文件下载-发生异常:", e); + } + } + } + + /** + * 根据文件夹路径 返回对应的访问权限 + * + * @param fileKey + * @return + */ + private CannedAccessControlList getACL(String fileKey) { + // 公用读 + if (fileKey.contains(CommonConst.FileFolderConst.FOLDER_PUBLIC)) { + return CannedAccessControlList.PublicRead; + } + // 其他默认私有读写 + return CannedAccessControlList.Private; + } + + /** + * 单个删除文件 + * 根据 file key 删除文件 + * ps:不能删除fileKey不为空的文件夹 + * + * @param fileKey 文件or文件夹 + * @return + */ + @Override + public ResponseDTO delete(String fileKey) { + amazonS3.deleteObject(cloudConfig.getBucketName(), fileKey); + return ResponseDTO.succ(); + } + + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/service/FileStorageLocalServiceImpl.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/service/FileStorageLocalServiceImpl.java new file mode 100644 index 00000000..cf9d620c --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/service/FileStorageLocalServiceImpl.java @@ -0,0 +1,144 @@ +package net.lab1024.smartadmin.service.module.support.file.service; + +import lombok.extern.slf4j.Slf4j; +import net.lab1024.smartadmin.service.common.codeconst.FileResponseCodeConst; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.support.file.domain.dto.FileDownloadDTO; +import net.lab1024.smartadmin.service.module.support.file.domain.vo.FileUploadVO; +import net.lab1024.smartadmin.service.module.support.systemconfig.SystemConfigConst; +import net.lab1024.smartadmin.service.module.support.systemconfig.SystemConfigService; +import org.apache.commons.io.FileUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.util.FileCopyUtils; +import org.springframework.web.multipart.MultipartFile; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/8/25 11:57 + */ + +@Slf4j +@ConditionalOnProperty(prefix = "file.storage", name = {"mode"}, havingValue = "local") +public class FileStorageLocalServiceImpl implements IFileStorageService { + + @Value("${file.storage.local.path}") + private String localPath; + @Autowired + private SystemConfigService systemConfigService; + + @Override + public ResponseDTO fileUpload(MultipartFile multipartFile, String path) { + if (null == multipartFile) { + return ResponseDTO.wrap(FileResponseCodeConst.FILE_EMPTY); + } + String filePath = localPath + path; + File directory = new File(filePath); + if (!directory.exists()) { + // 目录不存在,新建 + directory.mkdirs(); + } + if (!path.endsWith("/")) { + path = path + "/"; + } + FileUploadVO fileUploadVO = new FileUploadVO(); + //原文件名 + String originalFileName = multipartFile.getOriginalFilename(); + //新文件名 + String newFileName = this.generateFileName(originalFileName); + //生成文件key + String fileKey = path + newFileName; + //创建文件 + File fileTemp = new File(new File(filePath + newFileName).getAbsolutePath()); + try { + multipartFile.transferTo(fileTemp); + fileUploadVO.setFileUrl(this.generateFileUrl(fileKey)); + fileUploadVO.setFileName(newFileName); + fileUploadVO.setFileKey(fileKey); + fileUploadVO.setFileSize(multipartFile.getSize()); + fileUploadVO.setFileType(FileUtils.getExtension(originalFileName)); + } catch (IOException e) { + if (fileTemp.exists() && fileTemp.isFile()) { + fileTemp.delete(); + } + log.error("", e); + return ResponseDTO.wrap(FileResponseCodeConst.UPLOAD_ERROR); + } + return ResponseDTO.succData(fileUploadVO); + } + + /** + * 生成fileUrl地址 + * + * @param fileKey + * @return + */ + public String generateFileUrl(String fileKey) { + String configValue = systemConfigService.getConfigValue(SystemConfigConst.Key.LOCAL_UPLOAD_URL_PREFIX); + String fileUrl = configValue + fileKey; + return fileUrl; + } + + /** + * 获取文件Url + * @param fileKey + * @return + */ + @Override + public ResponseDTO getFileUrl(String fileKey) { + String fileUrl = this.generateFileUrl(fileKey); + return ResponseDTO.succData(fileUrl); + } + + /** + * 文件下载 + * @param fileKey + * @return + */ + @Override + public ResponseDTO fileDownload(String fileKey) { + String filePath = localPath + fileKey; + File localFile = new File(filePath); + InputStream in = null; + try { + in = new FileInputStream(localFile); + // 输入流转换为字节流 + byte[] buffer = FileCopyUtils.copyToByteArray(in); + FileDownloadDTO fileDownloadDTO = new FileDownloadDTO(); + fileDownloadDTO.setData(buffer); + return ResponseDTO.succData(fileDownloadDTO); + } catch (IOException e) { + log.error("文件下载-发生异常:", e); + return ResponseDTO.wrap(FileResponseCodeConst.DOWNLOAD_ERROR); + } finally { + try { + // 关闭输入流 + if (in != null) { + in.close(); + } + } catch (IOException e) { + log.error("文件下载-发生异常:", e); + } + } + } + + @Override + public ResponseDTO delete(String fileKey) { + String filePath = localPath + fileKey; + File localFile = new File(filePath); + try { + FileUtils.forceDelete(localFile); + } catch (IOException e) { + log.error("删除本地文件失败:{}", e); + } + return ResponseDTO.succ(); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/service/IFileStorageService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/service/IFileStorageService.java new file mode 100644 index 00000000..683e4e64 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/file/service/IFileStorageService.java @@ -0,0 +1,310 @@ +package net.lab1024.smartadmin.service.module.support.file.service; + +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.support.file.domain.dto.FileDownloadDTO; +import net.lab1024.smartadmin.service.module.support.file.domain.vo.FileUploadVO; +import net.lab1024.smartadmin.service.util.date.SmartDateFormatterEnum; +import net.lab1024.smartadmin.service.util.date.SmartLocalDateUtil; +import org.apache.commons.io.FileUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.web.multipart.MultipartFile; + +import java.io.*; +import java.net.URLEncoder; +import java.nio.charset.Charset; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.UUID; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/8/25 11:57 + */ +public interface IFileStorageService { + + /** + * 文件上传 + * @param file + * @param path + * @return + */ + ResponseDTO fileUpload(MultipartFile file, String path); + + /** + * 获取文件url + * + * @param fileKey + * @return + */ + ResponseDTO getFileUrl(String fileKey); + + /** + * 流式下载(名称为原文件) + * @param key + * @return + */ + ResponseDTO fileDownload(String key); + + + /** + * 单个删除文件 + * @param fileKey + * @return + */ + ResponseDTO delete(String fileKey); + + + /** + * 不带后缀名的文件名 + * + * @param file + * @return + */ + default String getNameWithoutExtension(String file) { + String fileName = new File(file).getName(); + int dotIndex = fileName.lastIndexOf('.'); + return (dotIndex == -1) ? fileName : fileName.substring(0, dotIndex); + } + + /** + * 判断指定目录的文件是否存在 + * @param filePath + * @return + */ + default boolean isFileExist(String filePath) { + File file = new File(filePath); + return file.exists(); + } + + /** + * 验证文件是否存在,如果不存在则抛出异常 + * + * @param filePath + * @throws IOException + */ + default void isFileExistThrowException(String filePath) throws IOException { + File file = new File(filePath); + if (!file.exists()) { + throw new FileNotFoundException(filePath); + } + } + + /** + * 文件流读取 + * @param file + * @param charset + * @return + * @throws FileNotFoundException + */ + default BufferedReader newBufferedReader(File file, Charset charset) throws FileNotFoundException { + return new BufferedReader(new InputStreamReader(new FileInputStream(file), charset)); + } + + /** + * 文件写 + * @param file + * @param charset + * @return + * @throws FileNotFoundException + */ + default BufferedWriter newBufferedWriter(File file, Charset charset) throws FileNotFoundException { + return new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), charset)); + } + + /** + * 创建文件所在目录 + * @param file + * @return + * @throws IOException + */ + default boolean createParentDirs(File file) throws IOException { + File parent = file.getCanonicalFile().getParentFile(); + if (parent == null) { + return false; + } + return parent.mkdirs(); + } + + default boolean createNotExistParentDirFile(File file) throws IOException { + boolean createParentDirsRes = createParentDirs(file); + if (!createParentDirsRes) { + throw new IOException("cannot create parent Directory of " + file.getName()); + } + return file.createNewFile(); + } + + /** + * 生成文件名字 + * 当前年月日时分秒 +32位 uuid + 文件格式后缀 + * + * @param originalFileName + * @return String + */ + default String generateFileName(String originalFileName) { + String time = SmartLocalDateUtil.format(LocalDateTime.now(), SmartDateFormatterEnum.YMDHMS); + String uuid = UUID.randomUUID().toString().replaceAll("-", ""); + String fileType = FileUtils.getExtension(originalFileName); + return time + uuid + "." + fileType; + } + + /** + * 根据文件类型 生成文件名 + * @param fileType + * @return + */ + default String generateFileNameByType(String fileType) { + String uuid = UUID.randomUUID().toString().replaceAll("-", ""); + String time = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyMMddHH")); + return uuid + time + "." + fileType; + } + + /** + * 获取文件类型 + * + * @param originalFileName + * @return + */ + default String getFileType(String originalFileName) { + return originalFileName.substring(originalFileName.lastIndexOf(".") + 1); + } + + /** + * 获取文件格式 + * + * @param fileName + * @return 返回内容:png、mp4 等 + */ + default String getFormat(String fileName) { + if (StringUtils.isBlank(fileName)) { + return null; + } + int index = fileName.lastIndexOf("."); + if (index == -1) { + return null; + } + return fileName.substring(index + 1); + } + + /** + * 获取文件类型 + * + * @param fileExt + * @return + */ + default String getContentType(String fileExt) { + // 文件的后缀名 + if ("bmp".equalsIgnoreCase(fileExt)) { + return "image/bmp"; + } + if ("gif".equalsIgnoreCase(fileExt)) { + return "image/gif"; + } + if ("jpeg".equalsIgnoreCase(fileExt) || "jpg".equalsIgnoreCase(fileExt)) { + return "image/jpeg"; + } + if ("png".equalsIgnoreCase(fileExt)) { + return "image/png"; + } + if ("html".equalsIgnoreCase(fileExt)) { + return "text/html"; + } + if ("txt".equalsIgnoreCase(fileExt)) { + return "text/plain"; + } + if ("vsd".equalsIgnoreCase(fileExt)) { + return "application/vnd.visio"; + } + if ("ppt".equalsIgnoreCase(fileExt) || "pptx".equalsIgnoreCase(fileExt)) { + return "application/vnd.ms-powerpoint"; + } + if ("doc".equalsIgnoreCase(fileExt) || "docx".equalsIgnoreCase(fileExt)) { + return "application/msword"; + } + if ("pdf".equalsIgnoreCase(fileExt)) { + return "application/pdf"; + } + if ("xml".equalsIgnoreCase(fileExt)) { + return "text/xml"; + } + return ""; + } + + /** + * 获取文件格式 根据 content-type + * + * @param contentType + * @return + */ + default String getFileTypeByContentType(String contentType) { + // 文件的后缀名 + if ("image/bmp".equalsIgnoreCase(contentType)) { + return "bmp"; + } + if ("image/gif".equalsIgnoreCase(contentType)) { + return "gif"; + } + if ("image/jpeg".equalsIgnoreCase(contentType) || "image/jpg".equalsIgnoreCase(contentType)) { + return "jpg"; + } + if ("image/png".equalsIgnoreCase(contentType)) { + return "png"; + } + if ("text/html".equalsIgnoreCase(contentType)) { + return "html"; + } + if ("text/plain".equalsIgnoreCase(contentType)) { + return "txt"; + } + if ("application/vnd.visio".equalsIgnoreCase(contentType)) { + return "vsd"; + } + if ("application/vnd.ms-powerpoint".equalsIgnoreCase(contentType)) { + return "pptx"; + } + if ("application/msword".equalsIgnoreCase(contentType)) { + return "docx"; + } + if ("application/pdf".equalsIgnoreCase(contentType)) { + return "pdf"; + } + if ("text/xml".equalsIgnoreCase(contentType)) { + return "xml"; + } + return ""; + } + + /** + * 根据不同的浏览器 返回对应编码的文件名称 + * + * @param fileName + * @param userAgent + * @return + */ + default String getDownloadFileNameByUA(String fileName, String userAgent) { + try { + if (userAgent.toLowerCase().indexOf("firefox") > 0) { + // firefox浏览器 + fileName = new String(fileName.getBytes("UTF-8"), "ISO8859-1"); + } else if (userAgent.toUpperCase().indexOf("MSIE") > 0) { + // IE浏览器 + fileName = URLEncoder.encode(fileName, "UTF-8"); + } else if (userAgent.toUpperCase().indexOf("EDGE") > 0) { + // WIN10浏览器 + fileName = URLEncoder.encode(fileName, "UTF-8"); + } else if (userAgent.toUpperCase().indexOf("CHROME") > 0) { + // 谷歌 + fileName = new String(fileName.getBytes("UTF-8"), "ISO8859-1"); + } else { + //万能乱码问题解决 + fileName = new String(fileName.getBytes("UTF-8"), "ISO-8859-1"); + } + } catch (UnsupportedEncodingException e) { + return null; + } + return fileName; + } + + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/HeartBeatController.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/HeartBeatController.java new file mode 100644 index 00000000..83f53d06 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/HeartBeatController.java @@ -0,0 +1,31 @@ +package net.lab1024.smartadmin.service.module.support.heartbeat; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import net.lab1024.smartadmin.service.common.constant.SwaggerTagConst; +import net.lab1024.smartadmin.service.common.domain.PageBaseDTO; +import net.lab1024.smartadmin.service.common.domain.PageResultDTO; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.common.controller.SupportBaseController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; + +import javax.validation.Valid; + + +@Api(tags = {SwaggerTagConst.Support.HEART_BEAT}) +@RestController +public class HeartBeatController extends SupportBaseController { + + @Autowired + private HeartBeatService heartBeatService; + + @PostMapping("/heartBeat/query") + @ApiOperation("查询心跳记录 @author 卓大") + public ResponseDTO> query(@RequestBody @Valid PageBaseDTO pageBaseDTO) { + return heartBeatService.pageQuery(pageBaseDTO); + } + +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/heartbeat/HeartBeatRecordDao.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/HeartBeatRecordDao.java similarity index 80% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/heartbeat/HeartBeatRecordDao.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/HeartBeatRecordDao.java index e10c8e8c..5d6ef4b3 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/heartbeat/HeartBeatRecordDao.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/HeartBeatRecordDao.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.module.support.heartbeat; +package net.lab1024.smartadmin.service.module.support.heartbeat; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -10,11 +10,11 @@ import java.util.Date; import java.util.List; /** - * 心跳日志数据库操作 - * - * @author : simajinqiang - * Date: 2018/7/9 - * Time: 17:37 + * + * [ ] + * + * @author 罗伊 + * @date */ @Component @Mapper @@ -43,10 +43,10 @@ public interface HeartBeatRecordDao extends BaseMapper { */ HeartBeatRecordEntity query(HeartBeatRecordEntity heartBeatRecordEntity); - /** - * 分页查询心跳记录 + * 分页查询 + * @param pageQueryInfo * @return */ - List pageQuery(Page page); + List pageQuery(Page pageQueryInfo); } diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/heartbeat/HeartBeatRecordEntity.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/HeartBeatRecordEntity.java similarity index 52% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/heartbeat/HeartBeatRecordEntity.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/HeartBeatRecordEntity.java index 694eb936..b8b70afc 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/heartbeat/HeartBeatRecordEntity.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/HeartBeatRecordEntity.java @@ -1,21 +1,39 @@ -package net.lab1024.smartadmin.module.support.heartbeat; +package net.lab1024.smartadmin.service.module.support.heartbeat; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import net.lab1024.smartadmin.common.domain.BaseEntity; import lombok.Data; import java.io.Serializable; import java.util.Date; /** - * 心跳记录日志 - * User: simajinqiang - * Date: 2018/7/9 - * Time: 11:11 + * + * [ ] + * + * @author 罗伊 + * @date */ @Data @TableName(value = "t_heart_beat_record") -public class HeartBeatRecordEntity extends BaseEntity implements Serializable { +public class HeartBeatRecordEntity implements Serializable { + + /** + * 主键id + */ + @TableId(type = IdType.AUTO) + private Long id; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 创建时间 + */ + private Date createTime; /** * 项目名字 diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/HeartBeatRecordHandler.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/HeartBeatRecordHandler.java new file mode 100644 index 00000000..47ccbac5 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/HeartBeatRecordHandler.java @@ -0,0 +1,37 @@ +package net.lab1024.smartadmin.service.module.support.heartbeat; + +import lombok.extern.slf4j.Slf4j; +import net.lab1024.smartadmin.service.module.support.heartbeat.core.HeartBeatRecordDTO; +import net.lab1024.smartadmin.service.module.support.heartbeat.core.IHeartBeatRecordHandler; +import net.lab1024.smartadmin.service.util.SmartBeanUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * [ ] + * + * @author 罗伊 + */ +@Slf4j +@Service +public class HeartBeatRecordHandler implements IHeartBeatRecordHandler { + + @Autowired + private HeartBeatRecordDao heartBeatRecordDao; + + /** + * 心跳日志处理方法 + * @param heartBeatRecordDTO + */ + @Override + public void handler(HeartBeatRecordDTO heartBeatRecordDTO) { + HeartBeatRecordEntity heartBeatRecordEntity = SmartBeanUtil.copy(heartBeatRecordDTO, HeartBeatRecordEntity.class); + HeartBeatRecordEntity heartBeatRecordOld = heartBeatRecordDao.query(heartBeatRecordEntity); + if (heartBeatRecordOld == null) { + heartBeatRecordDao.insertHeartBeat(heartBeatRecordEntity); + } else { + heartBeatRecordDao.updateHeartBeatTimeById(heartBeatRecordOld.getId(), heartBeatRecordEntity.getHeartBeatTime()); + } + } + +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/heartbeat/HeartBeatRecordVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/HeartBeatRecordVO.java similarity index 81% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/heartbeat/HeartBeatRecordVO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/HeartBeatRecordVO.java index 34e98932..85ed58c6 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/heartbeat/HeartBeatRecordVO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/HeartBeatRecordVO.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.module.support.heartbeat; +package net.lab1024.smartadmin.service.module.support.heartbeat; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -7,10 +7,11 @@ import java.io.Serializable; import java.util.Date; /** - * 心跳记录日志 - * User: simajinqiang - * Date: 2018/7/9 - * Time: 11:11 + * + * [ ] + * + * @author 罗伊 + * @date */ @Data public class HeartBeatRecordVO implements Serializable { diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/HeartBeatService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/HeartBeatService.java new file mode 100644 index 00000000..657a24ec --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/HeartBeatService.java @@ -0,0 +1,33 @@ +package net.lab1024.smartadmin.service.module.support.heartbeat; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; +import net.lab1024.smartadmin.service.common.domain.PageBaseDTO; +import net.lab1024.smartadmin.service.common.domain.PageResultDTO; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.util.SmartPageUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * [ ] + * + * @author 罗伊 + */ +@Slf4j +@Service +public class HeartBeatService { + + @Autowired + private HeartBeatRecordDao heartBeatRecordDao; + + + public ResponseDTO> pageQuery(PageBaseDTO pageBaseDTO) { + Page pageQueryInfo = SmartPageUtil.convert2PageQuery(pageBaseDTO); + List recordVOList = heartBeatRecordDao.pageQuery(pageQueryInfo); + PageResultDTO pageResultDTO = SmartPageUtil.convert2PageResult(pageQueryInfo, recordVOList); + return ResponseDTO.succData(pageResultDTO); + } +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/heartbeat/AbstractHeartBeatCommand.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/core/AbstractHeartBeatManager.java similarity index 78% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/heartbeat/AbstractHeartBeatCommand.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/core/AbstractHeartBeatManager.java index c62fbc3d..77b6aee6 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/heartbeat/AbstractHeartBeatCommand.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/core/AbstractHeartBeatManager.java @@ -1,17 +1,23 @@ -package net.lab1024.smartadmin.common.heartbeat; +package net.lab1024.smartadmin.service.module.support.heartbeat.core; import com.google.common.util.concurrent.ThreadFactoryBuilder; +import net.lab1024.smartadmin.service.util.SmartIPUtil; +import org.apache.commons.lang3.StringUtils; + import java.util.Date; import java.util.List; -import java.util.concurrent.*; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ThreadFactory; +import java.util.concurrent.TimeUnit; /** * @Description: 心跳服务 -* @Author: simajinqiang +* @Author: 1024lab * @Date: 2018/7/9 16:26 */ -public abstract class AbstractHeartBeatCommand implements HeartBeatRecordCommendInterface { +public abstract class AbstractHeartBeatManager { ScheduledExecutorService executorService; @@ -50,7 +56,7 @@ public abstract class AbstractHeartBeatCommand implements HeartBeatRecordCommend public void handlerHeartBeat(){ try { projectPath = HeatBeatRecordHelper.getProjectPath(); - serverIps = IpUtil.getLocalIPS(); + serverIps = SmartIPUtil.getLocalHostIPList(); processNo = HeatBeatRecordHelper.getProcessID(); processStartTime = HeatBeatRecordHelper.getStartTime(); }catch (Throwable e){ @@ -75,7 +81,7 @@ public abstract class AbstractHeartBeatCommand implements HeartBeatRecordCommend try { HeartBeatRecordDTO heartBeatRecord = new HeartBeatRecordDTO(); heartBeatRecord.setProjectPath(projectPath); - heartBeatRecord.setServerIp(StringUtil.join(serverIps,";")); + heartBeatRecord.setServerIp(StringUtils.join(serverIps,";")); heartBeatRecord.setProcessNo(processNo); heartBeatRecord.setProcessStartTime(processStartTime); heartBeatRecord.setHeartBeatTime(new Date()); @@ -87,4 +93,6 @@ public abstract class AbstractHeartBeatCommand implements HeartBeatRecordCommend } } + abstract void handler(HeartBeatRecordDTO heartBeatRecord); + } diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/heartbeat/HeartBeatConfig.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/core/HeartBeatConfig.java similarity index 54% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/heartbeat/HeartBeatConfig.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/core/HeartBeatConfig.java index 3fa1ed84..6667449c 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/heartbeat/HeartBeatConfig.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/core/HeartBeatConfig.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.common.heartbeat; +package net.lab1024.smartadmin.service.module.support.heartbeat.core; import lombok.Builder; import lombok.Data; @@ -6,12 +6,8 @@ import lombok.Data; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/8/8 0008 下午 16:22 - * @since JDK1.8 + * @author 罗伊 + * */ @Data @Builder diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/core/HeartBeatLogger.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/core/HeartBeatLogger.java new file mode 100644 index 00000000..b9ba2291 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/core/HeartBeatLogger.java @@ -0,0 +1,15 @@ +package net.lab1024.smartadmin.service.module.support.heartbeat.core; + +/** + * [ ] + * + * @author 罗伊 + */ +public interface HeartBeatLogger { + + void error(String string); + + void error(String string, Throwable e); + + void info(String string); +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/core/HeartBeatManager.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/core/HeartBeatManager.java new file mode 100644 index 00000000..6919ea93 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/core/HeartBeatManager.java @@ -0,0 +1,54 @@ +package net.lab1024.smartadmin.service.module.support.heartbeat.core; + +import lombok.extern.slf4j.Slf4j; + +import javax.annotation.PreDestroy; + +/** + * [ ] + * + * @author 罗伊 + */ +@Slf4j +public class HeartBeatManager extends AbstractHeartBeatManager { + + private IHeartBeatRecordHandler heartBeatRecordHandler; + + /** + * @param delayHandlerTime 延迟执行时间 + * @param intervalTime 间隔执行时间 + */ + public HeartBeatManager(Long delayHandlerTime, Long intervalTime, IHeartBeatRecordHandler heartBeatRecordHandler) { + HeartBeatConfig config = HeartBeatConfig.builder().delayHandlerTime(delayHandlerTime).intervalTime(intervalTime).build(); + super.init(config, new HeartBeatLogger() { + @Override + public void error(String string) { + log.error(string); + } + + @Override + public void error(String string, Throwable e) { + log.error(string, e); + } + + @Override + public void info(String string) { + log.info(string); + } + }); + this.heartBeatRecordHandler = heartBeatRecordHandler; + } + + + @PreDestroy + @Override + public void destroy() { + super.destroy(); + } + + @Override + public void handler(HeartBeatRecordDTO heartBeatRecordDTO) { + heartBeatRecordHandler.handler(heartBeatRecordDTO); + } + +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/heartbeat/HeartBeatRecordDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/core/HeartBeatRecordDTO.java similarity index 84% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/heartbeat/HeartBeatRecordDTO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/core/HeartBeatRecordDTO.java index b5f4e499..ac72c174 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/heartbeat/HeartBeatRecordDTO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/core/HeartBeatRecordDTO.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.common.heartbeat; +package net.lab1024.smartadmin.service.module.support.heartbeat.core; import lombok.Data; @@ -6,7 +6,7 @@ import java.util.Date; /** * @Description: 心跳记录日志 -* @Author: simajinqiang +* @Author: 1024lab * @Date: 2018/7/9 11:11 */ @Data diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/heartbeat/HeatBeatRecordHelper.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/core/HeatBeatRecordHelper.java similarity index 73% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/heartbeat/HeatBeatRecordHelper.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/core/HeatBeatRecordHelper.java index ce3b04f7..60def1c7 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/heartbeat/HeatBeatRecordHelper.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/core/HeatBeatRecordHelper.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.common.heartbeat; +package net.lab1024.smartadmin.service.module.support.heartbeat.core; import java.lang.management.ManagementFactory; @@ -6,14 +6,15 @@ import java.lang.management.RuntimeMXBean; import java.util.Date; /** -* @Description: 心跳工具类 -* @Author: simajinqiang -* @Date: 2018/7/9 11:48 -*/ + * @Description: 心跳工具类 + * @Author: 1024lab + * @Date: 2018/7/9 11:48 + */ public class HeatBeatRecordHelper { /** * 获取进程号 + * * @return */ public static final Integer getProcessID() { @@ -24,22 +25,22 @@ public class HeatBeatRecordHelper { /** * 获取项目名称 + * * @return */ - public static final String getProjectPath(){ + public static final String getProjectPath() { return System.getProperty("user.dir"); } /** * 获取进程启动时间 + * * @return */ - public static final Date getStartTime(){ + public static final Date getStartTime() { RuntimeMXBean runtimeMXBean = ManagementFactory.getRuntimeMXBean(); return new Date(runtimeMXBean.getStartTime()); } - - } diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/core/IHeartBeatRecordHandler.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/core/IHeartBeatRecordHandler.java new file mode 100644 index 00000000..e7a4342e --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/heartbeat/core/IHeartBeatRecordHandler.java @@ -0,0 +1,16 @@ +package net.lab1024.smartadmin.service.module.support.heartbeat.core; + +/** + * [ ] + * + * @author 罗伊 + */ +public interface IHeartBeatRecordHandler { + + /** + * 心跳日志处理方法 + * + * @param recordDTO + */ + void handler(HeartBeatRecordDTO recordDTO); +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/idgenerator/IdGeneratorController.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/idgenerator/IdGeneratorController.java new file mode 100644 index 00000000..196ce638 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/idgenerator/IdGeneratorController.java @@ -0,0 +1,39 @@ +package net.lab1024.smartadmin.service.module.support.idgenerator; + +import net.lab1024.smartadmin.service.common.codeconst.ResponseCodeConst; +import net.lab1024.smartadmin.service.common.constant.SwaggerTagConst; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.common.controller.SupportBaseController; +import net.lab1024.smartadmin.service.module.support.idgenerator.constant.IdGeneratorEnum; +import net.lab1024.smartadmin.service.util.SmartBaseEnumUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RestController; + +/** + * id生成器路由 + * + * @author listen + * @date 2019/09/26 21:13 + */ +@Api(tags = SwaggerTagConst.Support.ID_GENERATOR) +@RestController +public class IdGeneratorController extends SupportBaseController { + + @Autowired + private IdGeneratorService idGeneratorService; + + @ApiOperation("生成id") + @GetMapping("/id/generator/{generatorId}") + public ResponseDTO generate(@PathVariable Integer generatorId) { + IdGeneratorEnum idGeneratorEnum = SmartBaseEnumUtil.getEnumByValue(generatorId, IdGeneratorEnum.class); + if (null == idGeneratorEnum) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "IdGenerator,不存在" + generatorId); + } + return idGeneratorService.generate(idGeneratorEnum); + } + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/idgenerator/IdGeneratorDao.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/idgenerator/IdGeneratorDao.java new file mode 100644 index 00000000..32a35ef9 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/idgenerator/IdGeneratorDao.java @@ -0,0 +1,32 @@ +package net.lab1024.smartadmin.service.module.support.idgenerator; + +import net.lab1024.smartadmin.service.module.support.idgenerator.domain.IdGeneratorEntity; +import net.lab1024.smartadmin.service.module.support.idgenerator.domain.IdGeneratorRecordDTO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * zhuo + */ +@Mapper +@Component +public interface IdGeneratorDao { + + List selectAll(); + + int replaceIdGeneratorRecord(@Param("generatorId") Integer generatorId, + @Param("year") int year, + @Param("month") int month, + @Param("day") int day, + @Param("lastNumber") Long lastNumber, + @Param("count") long count); + + IdGeneratorRecordDTO selectHistoryLastNumber(@Param("generatorId") Integer generatorId, + @Param("year") int year, + @Param("month") int month, + @Param("day") int day); + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/idgenerator/IdGeneratorService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/idgenerator/IdGeneratorService.java new file mode 100644 index 00000000..a987f49a --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/idgenerator/IdGeneratorService.java @@ -0,0 +1,147 @@ +package net.lab1024.smartadmin.service.module.support.idgenerator; + +import net.lab1024.smartadmin.service.common.codeconst.ResponseCodeConst; +import net.lab1024.smartadmin.service.common.constant.RedisKeyConst; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.support.idgenerator.constant.IdGeneratorEnum; +import net.lab1024.smartadmin.service.module.support.idgenerator.constant.IdGeneratorRuleTypeEnum; +import net.lab1024.smartadmin.service.module.support.idgenerator.domain.IdGeneratorEntity; +import net.lab1024.smartadmin.service.module.support.idgenerator.domain.IdGeneratorRecordDTO; +import net.lab1024.smartadmin.service.third.SmartRedisService; +import net.lab1024.smartadmin.service.util.SmartRandomUtil; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.PostConstruct; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; +import java.util.Objects; +import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Function; +import java.util.stream.Collectors; + +/** + * 全局id生成器 + * zhuo + */ +@Slf4j +@Service +public class IdGeneratorService { + + private static final int MAX_GET_LOCK_COUNT = 5; + + private static final long SLEEP_MILLISECONDS = 500L; + + private static volatile long lastSleepMilliSeconds = SLEEP_MILLISECONDS; + + private ConcurrentHashMap idGeneratorMap; + + @Autowired + private IdGeneratorDao idGeneratorDao; + + @Autowired + private SmartRedisService redisService; + + @PostConstruct + void init() { + List idGeneratorEntityList = idGeneratorDao.selectAll(); + idGeneratorMap = idGeneratorEntityList.stream().collect(Collectors.toMap(IdGeneratorEntity::getId, Function.identity(), (x, y) -> y, ConcurrentHashMap::new)); + } + + /** + * id 生成器 + * + * @param idGeneratorEnum + * @return + */ + public ResponseDTO generate(IdGeneratorEnum idGeneratorEnum) { + int generatorId = idGeneratorEnum.getId(); + IdGeneratorEntity idGeneratorEntity = this.idGeneratorMap.get(generatorId); + if (null == idGeneratorEntity) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "IdGenerator, 生成器 不存在" + generatorId); + } + + LocalDateTime now = LocalDateTime.now(); + int year = now.getYear(); + int monthValue = now.getMonthValue(); + int dayOfMonth = now.getDayOfMonth(); + + String lockKey = RedisKeyConst.Base.ID_GENERATOR + idGeneratorEnum.getKeyName(); + + try { + boolean lock = false; + + for (int i = 0; i < MAX_GET_LOCK_COUNT; i++) { + try { + //60秒 + lock = redisService.getLock(lockKey, 60 * 1000L); + if (lock) { + break; + } + Thread.sleep(Math.max(SLEEP_MILLISECONDS, lastSleepMilliSeconds)); + } catch (Throwable e) { + log.error(e.getMessage(), e); + } + } + + if (!lock) { + return ResponseDTO.wrap(ResponseCodeConst.BUSINESS_HANDING); + } + + long beginTime = System.currentTimeMillis(); + + IdGeneratorRecordDTO generatorRecordDTO = idGeneratorDao.selectHistoryLastNumber(generatorId, year, monthValue, dayOfMonth); + if (generatorRecordDTO == null) { + generatorRecordDTO = new IdGeneratorRecordDTO(); + generatorRecordDTO.setGeneratorId(generatorId); + generatorRecordDTO.setYear(year); + generatorRecordDTO.setMonth(monthValue); + generatorRecordDTO.setDay(dayOfMonth); + generatorRecordDTO.setLastNumber(idGeneratorEntity.getInitNumber()); + generatorRecordDTO.setCount(0L); + generatorRecordDTO.setUpdateTime(now); + } + + Long lastNumber = generatorRecordDTO.getLastNumber(); + IdGeneratorRuleTypeEnum ruleTypeEnum = this.getIdGeneratorRuleTypeEnum(idGeneratorEntity.getRuleType()); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern(ruleTypeEnum.getExt()); + String nowFormat = now.format(formatter); + if (IdGeneratorRuleTypeEnum.YEAR_CYCLE == ruleTypeEnum || IdGeneratorRuleTypeEnum.MONTH_CYCLE == ruleTypeEnum || IdGeneratorRuleTypeEnum.DAY_CYCLE == ruleTypeEnum) { + if (!Objects.equals(generatorRecordDTO.getUpdateTime().format(formatter), nowFormat)) { + lastNumber = idGeneratorEntity.getInitNumber(); + } + } + + lastNumber += SmartRandomUtil.nextInt(1, idGeneratorEntity.getStepRandomRange()); + long count = generatorRecordDTO.getCount() + 1; + idGeneratorDao.replaceIdGeneratorRecord(generatorId, year, monthValue, dayOfMonth, lastNumber, count); + + // 格式化num 不足位数则补零 + int minLength = idGeneratorEntity.getMinLength(); + minLength = minLength <= 0 ? 1 : minLength; + // 补位 + String finalId = String.format("%0" + minLength + "d", lastNumber); + String prefix = StringUtils.isBlank(idGeneratorEntity.getPrefix()) ? StringUtils.EMPTY : idGeneratorEntity.getPrefix(); + + lastSleepMilliSeconds = System.currentTimeMillis() - beginTime + 100; + return ResponseDTO.succData(prefix + nowFormat + finalId); + } catch (Throwable e) { + log.error(e.getMessage(), e); + throw e; + } finally { + redisService.unLock(lockKey); + } + } + + private IdGeneratorRuleTypeEnum getIdGeneratorRuleTypeEnum(String ruleType) { + for (IdGeneratorRuleTypeEnum en : IdGeneratorRuleTypeEnum.values()) { + if (en.name().equalsIgnoreCase(ruleType)) { + return en; + } + } + return null; + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/idgenerator/constant/IdGeneratorEnum.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/idgenerator/constant/IdGeneratorEnum.java new file mode 100644 index 00000000..0b3c1b5b --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/idgenerator/constant/IdGeneratorEnum.java @@ -0,0 +1,45 @@ +package net.lab1024.smartadmin.service.module.support.idgenerator.constant; + +import net.lab1024.smartadmin.service.common.constant.BaseEnum; + +/** + * @author Administrator + */ + +public enum IdGeneratorEnum implements BaseEnum { + + + ; + + private Integer id; + + private String keyName; + + IdGeneratorEnum(int id, String keyName) { + this.id = id; + this.keyName = keyName; + } + + @Override + public String toString() { + return "IdGeneratorEnum{" + "id=" + id + ", keyName='" + keyName + '\'' + '}'; + } + + public int getId() { + return id; + } + + public String getKeyName() { + return keyName; + } + + @Override + public Integer getValue() { + return id; + } + + @Override + public String getDesc() { + return null; + } +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/constant/IdGeneratorRuleTypeEnum.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/idgenerator/constant/IdGeneratorRuleTypeEnum.java similarity index 64% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/constant/IdGeneratorRuleTypeEnum.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/idgenerator/constant/IdGeneratorRuleTypeEnum.java index c2dad2da..7e6217e9 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/constant/IdGeneratorRuleTypeEnum.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/idgenerator/constant/IdGeneratorRuleTypeEnum.java @@ -1,14 +1,9 @@ -package net.lab1024.smartadmin.module.support.idgenerator.constant; +package net.lab1024.smartadmin.service.module.support.idgenerator.constant; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/3/8 0008 下午 13:43 - * @since JDK1.8 + * @author 罗伊 */ public enum IdGeneratorRuleTypeEnum { /** diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/idgenerator/domain/IdGeneratorEntity.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/idgenerator/domain/IdGeneratorEntity.java new file mode 100644 index 00000000..8c95d9ce --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/idgenerator/domain/IdGeneratorEntity.java @@ -0,0 +1,68 @@ +package net.lab1024.smartadmin.service.module.support.idgenerator.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * @Auther: 卓大 + * @Date: 2018/8/7 0007 13:33 + * @Description: + */ +@Data +@TableName("t_id_generator") +public class IdGeneratorEntity implements Serializable { + + private static final long serialVersionUID = 5582354131134766548L; + + /** + * 主键id + * + * @see net.lab1024.smartadmin.service.module.support.idgenerator.constant.IdGeneratorEnum + */ + @TableId(type = IdType.AUTO) + private Integer id; + + /** + * 英文key + */ + private String keyName; + + /** + * 前缀 + */ + private String prefix; + + /** + * 最低补位长度 + */ + private Integer minLength; + + /** + * 类型 + */ + private String ruleType; + + /** + * 初始值 + */ + private Long initNumber; + + /** + * 步长随机数范围 + */ + private Integer stepRandomRange; + + /** + * 备注 + */ + private String remark; + + private LocalDateTime updateTime; + + private LocalDateTime createTime; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/idgenerator/domain/IdGeneratorLastNumberDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/idgenerator/domain/IdGeneratorLastNumberDTO.java new file mode 100644 index 00000000..c7466658 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/idgenerator/domain/IdGeneratorLastNumberDTO.java @@ -0,0 +1,17 @@ +package net.lab1024.smartadmin.service.module.support.idgenerator.domain; + +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * @Auther: 罗伊 + * @Date: 2018/8/7 0007 13:33 + * @Description: + */ +@Data +public class IdGeneratorLastNumberDTO { + private LocalDateTime updateTime; + private Long lastNumber; + private LocalDateTime databaseTime; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/idgenerator/domain/IdGeneratorRecordDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/idgenerator/domain/IdGeneratorRecordDTO.java new file mode 100644 index 00000000..9ed744fb --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/idgenerator/domain/IdGeneratorRecordDTO.java @@ -0,0 +1,31 @@ +package net.lab1024.smartadmin.service.module.support.idgenerator.domain; + +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * @Auther: 罗伊 + * @Date: 2018/8/7 0007 13:33 + * @Description: + */ +@Data +public class IdGeneratorRecordDTO { + + private Integer generatorId; + + private Integer year; + + private Integer month; + + private Integer day; + + private Long lastNumber; + + private Long count; + + private LocalDateTime updateTime; + + private LocalDateTime createTime; + +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/anno/OperateLog.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/OperateLog.java similarity index 50% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/anno/OperateLog.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/OperateLog.java index 31dd3683..6d2c1b70 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/anno/OperateLog.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/OperateLog.java @@ -1,16 +1,13 @@ -package net.lab1024.smartadmin.common.anno; +package net.lab1024.smartadmin.service.module.support.operatelog; import java.lang.annotation.*; /** + * * [ 用户操作日志 ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. + * @author 罗伊 * @date - * @since JDK1.8 */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/OperateLogController.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/OperateLogController.java new file mode 100644 index 00000000..c3f0c487 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/OperateLogController.java @@ -0,0 +1,44 @@ +package net.lab1024.smartadmin.service.module.support.operatelog; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import net.lab1024.smartadmin.service.common.constant.SwaggerTagConst; +import net.lab1024.smartadmin.service.common.controller.SupportBaseController; +import net.lab1024.smartadmin.service.common.domain.PageResultDTO; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.support.operatelog.domain.dto.OperateLogDTO; +import net.lab1024.smartadmin.service.module.support.operatelog.domain.dto.OperateLogQueryDTO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * [ ] + * + * @author 罗伊 + */ +@RestController +@Api(tags = {SwaggerTagConst.Support.USER_OPERATE_LOG}) +public class OperateLogController extends SupportBaseController { + + @Autowired + private OperateLogService operateLogService; + + @ApiOperation(value = "分页查询 @author 罗伊") + @PostMapping("/userOperateLog/page/query") + public ResponseDTO> queryByPage(@RequestBody OperateLogQueryDTO queryDTO) { + return operateLogService.queryByPage(queryDTO); + } + + @ApiOperation(value = "删除 @author 罗伊") + @GetMapping("/userOperateLog/delete/{id}") + public ResponseDTO delete(@PathVariable("id") Long id) { + return operateLogService.delete(id); + } + + + @ApiOperation(value = "详情 @author 罗伊") + @GetMapping("/userOperateLog/detail/{id}") + public ResponseDTO detail(@PathVariable("id") Long id) { + return operateLogService.detail(id); + } +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/EmailDao.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/OperateLogDao.java similarity index 51% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/EmailDao.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/OperateLogDao.java index 76a7dea5..6184761b 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/EmailDao.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/OperateLogDao.java @@ -1,9 +1,9 @@ -package net.lab1024.smartadmin.module.business.email; +package net.lab1024.smartadmin.service.module.support.operatelog; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import net.lab1024.smartadmin.module.business.email.domain.dto.EmailQueryDTO; -import net.lab1024.smartadmin.module.business.email.domain.entity.EmailEntity; +import net.lab1024.smartadmin.service.module.support.operatelog.domain.OperateLogEntity; +import net.lab1024.smartadmin.service.module.support.operatelog.domain.dto.OperateLogQueryDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Component; @@ -13,35 +13,33 @@ import java.util.List; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019-05-13 17:10:16 - * @since JDK1.8 + * @author 罗伊 */ @Mapper @Component -public interface EmailDao extends BaseMapper { +public interface OperateLogDao extends BaseMapper { /** * 分页查询 + * * @param queryDTO - * @return EmailEntity - */ - List queryByPage(Page page, @Param("queryDTO") EmailQueryDTO queryDTO); + * @return UserOperateLogEntity + */ + List queryByPage(Page page, @Param("queryDTO") OperateLogQueryDTO queryDTO); /** * 根据id删除 + * * @param id * @return - */ + */ void deleteById(@Param("id") Long id); /** * 批量删除 + * * @param idList * @return - */ + */ void deleteByIds(@Param("idList") List idList); } diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/OperateLogService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/OperateLogService.java new file mode 100644 index 00000000..aaf8c08e --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/OperateLogService.java @@ -0,0 +1,86 @@ +package net.lab1024.smartadmin.service.module.support.operatelog; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import net.lab1024.smartadmin.service.common.domain.PageResultDTO; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.support.operatelog.domain.dto.OperateLogDTO; +import net.lab1024.smartadmin.service.module.support.operatelog.domain.OperateLogEntity; +import net.lab1024.smartadmin.service.module.support.operatelog.domain.dto.OperateLogQueryDTO; +import net.lab1024.smartadmin.service.util.SmartBeanUtil; +import net.lab1024.smartadmin.service.util.SmartPageUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + * [ ] + * + * @author 罗伊 + */ +@Service +public class OperateLogService { + + @Autowired + private OperateLogDao operateLogDao; + + /** + * @author 罗伊 + * @description 分页查询 + * @date 2019-05-15 11:32:14 + */ + public ResponseDTO> queryByPage(OperateLogQueryDTO queryDTO) { + Page page = SmartPageUtil.convert2PageQuery(queryDTO); + List entities = operateLogDao.queryByPage(page, queryDTO); + List dtoList = SmartBeanUtil.copyList(entities, OperateLogDTO.class); + page.setRecords(dtoList); + PageResultDTO pageResultDTO = SmartPageUtil.convert2PageResult(page); + return ResponseDTO.succData(pageResultDTO); + } + + /** + * @author 罗伊 + * @description 添加 + * @date 2019-05-15 11:32:14 + */ + public ResponseDTO add(OperateLogDTO addDTO) { + OperateLogEntity entity = SmartBeanUtil.copy(addDTO, OperateLogEntity.class); + operateLogDao.insert(entity); + return ResponseDTO.succ(); + } + + /** + * @author 罗伊 + * @description 编辑 + * @date 2019-05-15 11:32:14 + */ + @Transactional(rollbackFor = Exception.class) + public ResponseDTO update(OperateLogDTO updateDTO) { + OperateLogEntity entity = SmartBeanUtil.copy(updateDTO, OperateLogEntity.class); + operateLogDao.updateById(entity); + return ResponseDTO.succ(); + } + + /** + * @author 罗伊 + * @description 删除 + * @date 2019-05-15 11:32:14 + */ + @Transactional(rollbackFor = Exception.class) + public ResponseDTO delete(Long id) { + operateLogDao.deleteById(id); + return ResponseDTO.succ(); + } + + /** + * @author 罗伊 + * @description 根据ID查询 + * @date 2019-05-15 11:32:14 + */ + public ResponseDTO detail(Long id) { + OperateLogEntity entity = operateLogDao.selectById(id); + OperateLogDTO dto = SmartBeanUtil.copy(entity, OperateLogDTO.class); + return ResponseDTO.succData(dto); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/SmartOperateLogAspect.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/SmartOperateLogAspect.java new file mode 100644 index 00000000..67e64b10 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/SmartOperateLogAspect.java @@ -0,0 +1,273 @@ +package net.lab1024.smartadmin.service.module.support.operatelog; + +import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import net.lab1024.smartadmin.service.module.support.operatelog.domain.dto.SmartOperateLogConfigDTO; +import net.lab1024.smartadmin.service.module.support.operatelog.domain.dto.SmartOperateLogUserDTO; +import net.lab1024.smartadmin.service.module.support.operatelog.domain.OperateLogEntity; +import net.lab1024.smartadmin.service.third.SmartApplicationContext; +import net.lab1024.smartadmin.service.util.SmartStringUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.Signature; +import org.aspectj.lang.annotation.AfterReturning; +import org.aspectj.lang.annotation.AfterThrowing; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.aspectj.lang.reflect.MethodSignature; +import org.springframework.core.annotation.AnnotationUtils; +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.servlet.http.HttpServletRequest; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.lang.reflect.Method; +import java.util.concurrent.ThreadPoolExecutor; + +/** + * [ 操作日志记录处理,对所有OperateLog注解的Controller进行操作日志监控 ] + * + * @author 罗伊 + */ +@Slf4j +@Aspect +public class SmartOperateLogAspect { + + private static final String pointCut = "@within(org.springframework.web.bind.annotation.RestController) || @within(org.springframework.stereotype.Controller)"; + + private SmartOperateLogConfigDTO smartLogConfig; + + /** + * 线程池 + */ + private ThreadPoolTaskExecutor taskExecutor; + + /** + * 构造方法 + */ + public SmartOperateLogAspect(SmartOperateLogConfigDTO smartOperateLogConfigDTO) { + smartLogConfig = smartOperateLogConfigDTO; + this.initThread(smartLogConfig); + } + + @Pointcut(pointCut) + public void logPointCut() { + } + + @AfterReturning(pointcut = "logPointCut()") + public void doAfterReturning(JoinPoint joinPoint) { + handleLog(joinPoint, null); + } + + @AfterThrowing(value = "logPointCut()", throwing = "e") + public void doAfterThrowing(JoinPoint joinPoint, Exception e) { + handleLog(joinPoint, e); + } + + /** + * 初始化线程池 + */ + private void initThread(SmartOperateLogConfigDTO configDTO) { + int corePoolSize = Runtime.getRuntime().availableProcessors(); + if (null != configDTO.getCorePoolSize()) { + corePoolSize = configDTO.getCorePoolSize(); + } + taskExecutor = new ThreadPoolTaskExecutor(); + //线程初始化 + taskExecutor.initialize(); + // 设置核心线程数 + taskExecutor.setCorePoolSize(corePoolSize); + // 设置最大线程数 + taskExecutor.setMaxPoolSize(corePoolSize * 2); + // 设置队列容量 + taskExecutor.setQueueCapacity(1000); + // 设置线程活跃时间(秒) + taskExecutor.setKeepAliveSeconds(60); + // 设置默认线程名称 + taskExecutor.setThreadNamePrefix("smart-logs"); + // 设置拒绝策略 + taskExecutor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); + // 等待所有任务结束后再关闭线程池 + taskExecutor.setWaitForTasksToCompleteOnShutdown(true); + } + + protected void handleLog(final JoinPoint joinPoint, final Exception e) { + try { + OperateLog operateLog = this.getAnnotationLog(joinPoint); + if (operateLog == null) { + return; + } + this.submitLog(joinPoint, e); + } catch (Exception exp) { + log.error("保存操作日志异常:{}", exp.getMessage()); + exp.printStackTrace(); + } + } + + private OperateLog getAnnotationLog(JoinPoint joinPoint) throws Exception { + Signature signature = joinPoint.getSignature(); + MethodSignature methodSignature = (MethodSignature) signature; + Method method = methodSignature.getMethod(); + OperateLog classAnnotation = AnnotationUtils.findAnnotation(method.getDeclaringClass(), OperateLog.class); + + if (method != null) { + return classAnnotation; + } + return null; + } + + /** + * swagger API + * + * @param joinPoint + * @return + * @throws Exception + */ + private Api getApi(JoinPoint joinPoint) { + Signature signature = joinPoint.getSignature(); + MethodSignature methodSignature = (MethodSignature) signature; + Method method = methodSignature.getMethod(); + Api classAnnotation = AnnotationUtils.findAnnotation(method.getDeclaringClass(), Api.class); + + if (method != null) { + return classAnnotation; + } + return null; + } + + /** + * swagger ApiOperation + * + * @param joinPoint + * @return + * @throws Exception + */ + private ApiOperation getApiOperation(JoinPoint joinPoint) { + Signature signature = joinPoint.getSignature(); + MethodSignature methodSignature = (MethodSignature) signature; + Method method = methodSignature.getMethod(); + + if (method != null) { + return method.getAnnotation(ApiOperation.class); + } + return null; + } + + /** + * 提交存储操作日志 + * + * @param joinPoint + * @param e + * @throws Exception + */ + private void submitLog(final JoinPoint joinPoint, final Throwable e) throws Exception { + Boolean isOpen = this.isOpen(); + if (!isOpen) { + return; + } + HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + Boolean filter = this.filterUrl(request.getRequestURI()); + if (filter) { + return; + } + //设置用户信息 + SmartOperateLogUserDTO user = smartLogConfig.getUserFunction().apply(request); + if (user == null) { + return; + } + // 设置方法名称 + String className = joinPoint.getTarget().getClass().getName(); + String methodName = joinPoint.getSignature().getName(); + String operateMethod = className + "." + methodName; + Object[] args = joinPoint.getArgs(); + StringBuilder sb = new StringBuilder(); + for (Object obj : args) { + sb.append(obj.getClass().getSimpleName()); + sb.append("["); + sb.append(JSON.toJSONString(obj)); + sb.append("]"); + } + String params = sb.toString(); + String failReason = null; + Boolean successFlag = true; + if (e != null) { + successFlag = false; + StringWriter sw = new StringWriter(); + PrintWriter pw = new PrintWriter(sw, true); + e.printStackTrace(pw); + failReason = sw.toString(); + pw.flush(); + pw.close(); + sw.flush(); + sw.close(); + } + OperateLogEntity operateLogEntity = + OperateLogEntity.builder() + .userId(user.getUserId()) + .userName(user.getUserName()) + .url(request.getRequestURI()) + .method(operateMethod) + .param(params) + .failReason(failReason) + .successFlag(successFlag).build(); + ApiOperation apiOperation = this.getApiOperation(joinPoint); + if (apiOperation != null) { + operateLogEntity.setContent(apiOperation.value()); + } + Api api = this.getApi(joinPoint); + if (api != null) { + String[] tags = api.tags(); + operateLogEntity.setModule(SmartStringUtil.join(tags, ",")); + } + taskExecutor.execute(() -> { + this.saveLog(operateLogEntity); + }); + } + + /** + * 是否开启操作日志 + * + * @return + */ + private Boolean isOpen() { + if (smartLogConfig.getOpenSupplier() == null) { + return Boolean.TRUE; + } + return smartLogConfig.getOpenSupplier().get(); + } + + /** + * 需要过滤的url + * + * @param url + * @return + */ + private Boolean filterUrl(String url) { + if (smartLogConfig.getFilterFunction() == null) { + return Boolean.FALSE; + } + return smartLogConfig.getFilterFunction().apply(url); + } + + /** + * 保存操作日志 + * @param operateLogEntity + * @return + */ + private Boolean saveLog(OperateLogEntity operateLogEntity) { + if (smartLogConfig.getSaveFunction() == null) { + BaseMapper mapper = SmartApplicationContext.getBean(OperateLogDao.class); + if (mapper == null) { + return false; + } + mapper.insert(operateLogEntity); + return true; + } + return smartLogConfig.getSaveFunction().apply(operateLogEntity); + } + +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/useroperatelog/domain/UserOperateLogEntity.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/domain/OperateLogEntity.java similarity index 61% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/useroperatelog/domain/UserOperateLogEntity.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/domain/OperateLogEntity.java index 467ce769..483a11f8 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/useroperatelog/domain/UserOperateLogEntity.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/domain/OperateLogEntity.java @@ -1,29 +1,32 @@ -package net.lab1024.smartadmin.module.business.log.useroperatelog.domain; +package net.lab1024.smartadmin.service.module.support.operatelog.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import net.lab1024.smartadmin.common.domain.BaseEntity; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import java.time.LocalDateTime; + /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019-05-15 11:32:14 - * @since JDK1.8 + * @author 罗伊 */ @Data @Builder @NoArgsConstructor @AllArgsConstructor @TableName("t_user_operate_log") -public class UserOperateLogEntity extends BaseEntity { - +public class OperateLogEntity { + /** + * 主键id + */ + @TableId(type = IdType.AUTO) + private Long id; /** * 用户id @@ -62,7 +65,7 @@ public class UserOperateLogEntity extends BaseEntity { /** * 请求结果 0失败 1成功 */ - private Integer result; + private Boolean successFlag; /** * 失败原因 @@ -70,5 +73,15 @@ public class UserOperateLogEntity extends BaseEntity { private String failReason; + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + } diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/useroperatelog/domain/UserOperateLogDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/domain/dto/OperateLogDTO.java similarity index 79% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/useroperatelog/domain/UserOperateLogDTO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/domain/dto/OperateLogDTO.java index 39fd2f99..12f83d17 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/useroperatelog/domain/UserOperateLogDTO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/domain/dto/OperateLogDTO.java @@ -1,21 +1,18 @@ -package net.lab1024.smartadmin.module.business.log.useroperatelog.domain; -import lombok.Data; -import java.util.Date; +package net.lab1024.smartadmin.service.module.support.operatelog.domain.dto; + import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/3/27 0027 下午 12:27 - * @since JDK1.8 + * @author 罗伊 */ @Data -public class UserOperateLogDTO { +public class OperateLogDTO { @ApiModelProperty("主键") private Long id; diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/useroperatelog/domain/UserOperateLogQueryDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/domain/dto/OperateLogQueryDTO.java similarity index 52% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/useroperatelog/domain/UserOperateLogQueryDTO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/domain/dto/OperateLogQueryDTO.java index cee24b7d..bff4c851 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/useroperatelog/domain/UserOperateLogQueryDTO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/domain/dto/OperateLogQueryDTO.java @@ -1,21 +1,16 @@ -package net.lab1024.smartadmin.module.business.log.useroperatelog.domain; +package net.lab1024.smartadmin.service.module.support.operatelog.domain.dto; -import net.lab1024.smartadmin.common.domain.PageParamDTO; +import net.lab1024.smartadmin.service.common.domain.PageBaseDTO; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date 2019-05-15 11:32:14 - * @since JDK1.8 + * @author 罗伊 */ @Data -public class UserOperateLogQueryDTO extends PageParamDTO { +public class OperateLogQueryDTO extends PageBaseDTO { @ApiModelProperty("开始日期") diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/domain/dto/SmartOperateLogConfigDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/domain/dto/SmartOperateLogConfigDTO.java new file mode 100644 index 00000000..805f31c8 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/domain/dto/SmartOperateLogConfigDTO.java @@ -0,0 +1,51 @@ +package net.lab1024.smartadmin.service.module.support.operatelog.domain.dto; + +import lombok.Builder; +import lombok.Data; +import net.lab1024.smartadmin.service.module.support.operatelog.domain.OperateLogEntity; + +import javax.servlet.http.HttpServletRequest; +import java.util.function.Function; +import java.util.function.Supplier; + +/** +* @Description: 日志配置DTO +* @Author: sbq +* @CreateDate: 2019/8/3 8:54 +* @Version: 1.0 +*/ +@Data +@Builder +public class SmartOperateLogConfigDTO { + + /** + * 用户信息 + */ + private Function userFunction; + /** + * 是否启用 + */ + private Supplier openSupplier; + + /** + * 过滤器 + */ + private Function filterFunction; + + /** + * 操作日志存储方法 + */ + private Function saveFunction; + + /** + * 核心线程数 + */ + private Integer corePoolSize; + + /** + * 队列大小 + */ + private Integer queueCapacity; + + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/domain/dto/SmartOperateLogUserDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/domain/dto/SmartOperateLogUserDTO.java new file mode 100644 index 00000000..d2299109 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/operatelog/domain/dto/SmartOperateLogUserDTO.java @@ -0,0 +1,29 @@ +package net.lab1024.smartadmin.service.module.support.operatelog.domain.dto; + +import lombok.Data; + +/** +* @Description: 用户信息 +* @Author: sbq +* @CreateDate: 2019/8/2 10:41 +* @Version: 1.0 +*/ +@Data +public class SmartOperateLogUserDTO { + + /** + * 用户id + */ + private Long userId; + + /** + * 用户名 + */ + private String userName; + + /** + * 扩展信息 + */ + private String extData; + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/redismq/RedisMqHandle.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/redismq/RedisMqHandle.java new file mode 100644 index 00000000..fa8ef766 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/redismq/RedisMqHandle.java @@ -0,0 +1,20 @@ +package net.lab1024.smartadmin.service.module.support.redismq; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * [ ] + * + * @author 罗伊 + * @date 2020/9/6 15:53 + */ +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +public @interface RedisMqHandle { + + RedisMsgTypeEnum value(); + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/redismq/RedisMqTopicEnum.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/redismq/RedisMqTopicEnum.java new file mode 100644 index 00000000..7ae584ee --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/redismq/RedisMqTopicEnum.java @@ -0,0 +1,46 @@ +package net.lab1024.smartadmin.service.module.support.redismq; + +import net.lab1024.smartadmin.service.common.constant.BaseEnum; + +/** + * [ ] + * + * @author 罗伊 + * @date 2021/5/10 11:44 + */ +public enum RedisMqTopicEnum implements BaseEnum { + + + SMART_ADMIN("smartAdmin","主题"), + + ; + + private String type; + + private String desc; + + RedisMqTopicEnum(String type, String desc) { + this.type = type; + this.desc = desc; + } + + /** + * 获取枚举类的值 + * + * @return Integer + */ + @Override + public String getValue() { + return type; + } + + /** + * 获取枚举类的说明 + * + * @return String + */ + @Override + public String getDesc() { + return desc; + } +} \ No newline at end of file diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/redismq/RedisMsgDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/redismq/RedisMsgDTO.java new file mode 100644 index 00000000..05443992 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/redismq/RedisMsgDTO.java @@ -0,0 +1,25 @@ +package net.lab1024.smartadmin.service.module.support.redismq; + +import lombok.Data; + +/** + * [ ] + * + * @author 罗伊 + * @date 2021/5/10 11:04 + */ +@Data +public class RedisMsgDTO { + + /** + * @see RedisMsgTypeEnum + */ + private Integer msgType; + + private String jsonData; + + public RedisMsgDTO(Integer msgType, String jsonData) { + this.msgType = msgType; + this.jsonData = jsonData; + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/redismq/RedisMsgHandler.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/redismq/RedisMsgHandler.java new file mode 100644 index 00000000..939c0ead --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/redismq/RedisMsgHandler.java @@ -0,0 +1,79 @@ +package net.lab1024.smartadmin.service.module.support.redismq; + +import com.alibaba.fastjson.JSONObject; +import com.google.common.collect.Maps; +import lombok.extern.slf4j.Slf4j; +import net.lab1024.smartadmin.service.third.SmartApplicationContext; +import net.lab1024.smartadmin.service.util.SmartBaseEnumUtil; +import org.reflections.Reflections; +import org.reflections.scanners.MethodAnnotationsScanner; +import org.reflections.util.ConfigurationBuilder; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.stereotype.Component; + +import javax.annotation.PostConstruct; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.Map; +import java.util.Set; + +/** + * redis 订阅消息处理类 + * + * @author 胡克 + * @date 2019/12/25 15:02 + */ +@Slf4j +public class RedisMsgHandler { + + public static final String METHOD_NAME = "receiveMessage"; + + private Map redisHandle = Maps.newConcurrentMap(); + + public RedisMsgHandler(String scanPath) { + this.redisMqHandleFunction(scanPath); + } + + public void redisMqHandleFunction(String scanPath) { + Reflections reflections = new Reflections(new ConfigurationBuilder().forPackages(scanPath).addScanners(new MethodAnnotationsScanner())); + Set methods = reflections.getMethodsAnnotatedWith(RedisMqHandle.class); + for (Method method : methods) { + RedisMqHandle redisMqHandle = method.getAnnotation(RedisMqHandle.class); + if (redisMqHandle != null) { + redisHandle.put(redisMqHandle.value(), method); + } + } + } + + public void receiveMessage(String jsonMsg) throws InvocationTargetException, IllegalAccessException { + log.info("Redis订阅消息处理:接收到消息->{}", jsonMsg); + RedisMsgDTO redisMsgDTO = JSONObject.parseObject(jsonMsg, RedisMsgDTO.class); + if (redisMsgDTO.getMsgType() == null) { + log.error("Redis消息暂未指定消息类型"); + return; + } + RedisMsgTypeEnum msgTypeEnum = SmartBaseEnumUtil.getEnumByValue(redisMsgDTO.getMsgType(), RedisMsgTypeEnum.class); + if (msgTypeEnum == null) { + log.error("Redis消息类型错误"); + return; + } + Method handleMethod = redisHandle.get(msgTypeEnum); + if (handleMethod == null) { + log.error("Redis消息类型:{},暂未找到对应的处理类", msgTypeEnum.getDesc()); + return; + } + if (handleMethod.getParameterCount() == 0) { + log.error("Redis消息类型:{},处理方法:{},无入参信息", msgTypeEnum.getDesc(), handleMethod.getName()); + return; + } + Object object = SmartApplicationContext.getBean(handleMethod.getDeclaringClass()); + if (object == null) { + log.error("Redis消息类型处理方法:{},对应的类:{},无对应的bean", msgTypeEnum.getDesc(), handleMethod.getDeclaringClass()); + return; + } + handleMethod.invoke(object, redisMsgDTO.getJsonData()); + + } + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/redismq/RedisMsgTypeEnum.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/redismq/RedisMsgTypeEnum.java new file mode 100644 index 00000000..1feb3492 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/redismq/RedisMsgTypeEnum.java @@ -0,0 +1,47 @@ +package net.lab1024.smartadmin.service.module.support.redismq; + + +import net.lab1024.smartadmin.service.common.constant.BaseEnum; + +/** + * [ ] + * + * @author 罗伊 + * @date 2021/5/10 11:03 + */ +public enum RedisMsgTypeEnum implements BaseEnum { + + CACHE_CLEAR(1,"清除缓存"), + + CACHE_KEY_CLEAR(2,"清除缓存key") + ; + + private Integer type; + + private String desc; + + RedisMsgTypeEnum(Integer type, String desc) { + this.type = type; + this.desc = desc; + } + + /** + * 获取枚举类的值 + * + * @return Integer + */ + @Override + public Integer getValue() { + return type; + } + + /** + * 获取枚举类的说明 + * + * @return String + */ + @Override + public String getDesc() { + return desc; + } +} \ No newline at end of file diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/repeatsubmit/SmartRepeatSubmitAspect.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/repeatsubmit/SmartRepeatSubmitAspect.java new file mode 100644 index 00000000..a862968d --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/repeatsubmit/SmartRepeatSubmitAspect.java @@ -0,0 +1,85 @@ +package net.lab1024.smartadmin.service.module.support.repeatsubmit; + +import com.github.benmanes.caffeine.cache.Cache; +import com.github.benmanes.caffeine.cache.Caffeine; +import net.lab1024.smartadmin.service.common.anno.NoRepeatSubmit; +import net.lab1024.smartadmin.service.common.codeconst.ResponseCodeConst; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.reflect.MethodSignature; +import org.springframework.core.annotation.Order; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.servlet.http.HttpServletRequest; +import java.lang.reflect.Method; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + +/** + * [ ] + * + * @author 罗伊 + * @date + */ +@Aspect +@Order(1) +public class SmartRepeatSubmitAspect { + + /** + * 限制缓存最大数量 超过后先放入的会自动移除 + * 默认缓存时间 + */ + private static Cache cache = Caffeine.newBuilder() + .maximumSize(5000) + .expireAfterWrite(NoRepeatSubmit.MAX_INTERVAL, TimeUnit.MILLISECONDS).build(); + + private Function userFunction; + + /** + * 获取用户信息 + * + * @param userFunction + */ + public SmartRepeatSubmitAspect(Function userFunction) { + this.userFunction = userFunction; + } + + /** + * 定义切入点 + * + * @param point + * @return + * @throws Throwable + */ + @Around("@annotation(net.lab1024.smartadmin.service.common.anno.NoRepeatSubmit)") + public Object around(ProceedingJoinPoint point) throws Throwable { + HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + + SmartRepeatSubmitUserDTO user = this.userFunction.apply(request); + if (user == null) { + return point.proceed(); + } + + ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); + String servletPath = attributes.getRequest().getServletPath(); + String key = user.getUserId() + "_" + servletPath; + Object value = cache.getIfPresent(key); + if (value != null) { + Method method = ((MethodSignature) point.getSignature()).getMethod(); + NoRepeatSubmit annotation = method.getAnnotation(NoRepeatSubmit.class); + int interval = Math.min(annotation.value(), NoRepeatSubmit.MAX_INTERVAL); + if (System.currentTimeMillis() < (long) value + interval) { + // 提交频繁 + return ResponseDTO.wrap(ResponseCodeConst.REPEAT_SUBMIT); + } + } + cache.put(key, System.currentTimeMillis()); + Object obj = point.proceed(); + cache.put(key, System.currentTimeMillis()); + return obj; + } + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/repeatsubmit/SmartRepeatSubmitUserDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/repeatsubmit/SmartRepeatSubmitUserDTO.java new file mode 100644 index 00000000..232541ad --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/repeatsubmit/SmartRepeatSubmitUserDTO.java @@ -0,0 +1,30 @@ +package net.lab1024.smartadmin.service.module.support.repeatsubmit; + +import lombok.Data; + +/** + * + * [ ] + * + * @author 罗伊 + * @date + */ +@Data +public class SmartRepeatSubmitUserDTO { + + /** + * 用户id + */ + private Long userId; + + /** + * 用户名 + */ + private String userName; + + /** + * 扩展信息 + */ + private String extData; + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/responseencrypt/DecryptDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/responseencrypt/DecryptDTO.java new file mode 100644 index 00000000..16a2ef56 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/responseencrypt/DecryptDTO.java @@ -0,0 +1,15 @@ +package net.lab1024.smartadmin.service.module.support.responseencrypt; + +import lombok.Data; + +/** + * [ ] + * + * @author 罗伊 + * @date 2021/6/29 10:49 + */ +@Data +public class DecryptDTO { + + private String data; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/responseencrypt/ResponseDecrypt.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/responseencrypt/ResponseDecrypt.java new file mode 100644 index 00000000..c0bc1cac --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/responseencrypt/ResponseDecrypt.java @@ -0,0 +1,17 @@ +package net.lab1024.smartadmin.service.module.support.responseencrypt; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * [ ] + * + * @author 罗伊 + * @date 2021/5/21 14:21 + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.METHOD) +public @interface ResponseDecrypt { +} \ No newline at end of file diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/responseencrypt/ResponseEncrypt.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/responseencrypt/ResponseEncrypt.java new file mode 100644 index 00000000..ec706435 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/responseencrypt/ResponseEncrypt.java @@ -0,0 +1,17 @@ +package net.lab1024.smartadmin.service.module.support.responseencrypt; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * [ ] + * + * @author 罗伊 + * @date 2021/5/21 14:21 + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.METHOD) +public @interface ResponseEncrypt { +} \ No newline at end of file diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/responseencrypt/ResponseEncryptDecryptAspect.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/responseencrypt/ResponseEncryptDecryptAspect.java new file mode 100644 index 00000000..10f25b03 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/responseencrypt/ResponseEncryptDecryptAspect.java @@ -0,0 +1,118 @@ +package net.lab1024.smartadmin.service.module.support.responseencrypt; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.serializer.SerializerFeature; +import lombok.extern.slf4j.Slf4j; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.util.SmartAesUtil; +import net.lab1024.smartadmin.service.util.SmartDigestUtil; +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.annotation.AfterReturning; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Before; +import org.aspectj.lang.reflect.MethodSignature; +import org.springframework.core.annotation.Order; +import org.springframework.util.Base64Utils; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.servlet.http.HttpServletRequest; +import java.lang.reflect.Method; +import java.util.function.Function; + +/** + * 防止重复提交的 业务切面 + * + * @author 胡克 + * @date 2020/11/25 10:46 + */ +@Slf4j +@Aspect +@Order(100) +public class ResponseEncryptDecryptAspect { + + private Function userFunction; + + + public ResponseEncryptDecryptAspect(Function userFunction) { + this.userFunction = userFunction; + } + + @Before("@annotation(ResponseDecrypt)") + public void before(JoinPoint joinPoint) { + Method method = ((MethodSignature) joinPoint.getSignature()).getMethod(); + ResponseDecrypt annotation = method.getAnnotation(ResponseDecrypt.class); + if (annotation == null) { + return; + } + Object[] params = joinPoint.getArgs(); + if (params == null) { + return; + } + if (params.length == 0) { + return; + } + HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + ResponseEncryptDecryptUserDTO user = this.userFunction.apply(request); + if (user == null) { + return; + } + Boolean decryptParamFlag = params[0] instanceof DecryptDTO; + if (!decryptParamFlag) { + return; + } + DecryptDTO decryptDTO = (DecryptDTO)params[0]; + String data = decryptDTO.getData(); + log.info("解密前数据:{}", data); + String key = SmartDigestUtil.md5Hex(user.getUserId().toString()); + log.info("解密KEY数据:{}", key); + //初始化向量是16位长度 + String iv = key.substring(0, 16); + //解密 + data = SmartAesUtil.decrypt(data, key, iv); + log.info("解密后数据:{}", data); + //base64解码 + data = new String(Base64Utils.decodeFromString(data)); + log.info("base64解码后数据:{}", data); + decryptDTO.setData(data); + } + + + @AfterReturning(returning = "object", pointcut = "@annotation(ResponseEncrypt)") + public void afterReturning(JoinPoint joinPoint, Object object) { + Method method = ((MethodSignature) joinPoint.getSignature()).getMethod(); + ResponseEncrypt annotation = method.getAnnotation(ResponseEncrypt.class); + if (annotation == null) { + return; + } + HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + ResponseEncryptDecryptUserDTO user = this.userFunction.apply(request); + if (user == null) { + return; + } + try { + ResponseDTO responseDTO = (ResponseDTO) object; + Object data = responseDTO.getData(); + if (data == null) { + return; + } + String jsonData = JSON.toJSONString(data, SerializerFeature.DisableCircularReferenceDetect); + log.info("JSON 原数据:{}", jsonData); + //base64编码 + jsonData = Base64Utils.encodeToString(jsonData.getBytes("utf-8")); + log.info("JSON Base64数据:{}", jsonData); + //加密秘钥 + String key = SmartDigestUtil.md5Hex(user.getUserId().toString()); + log.info("JSON MD5 KEY数据:{}", key); + //初始化向量是16位长度 + String iv = key.substring(0, 16); + //AES 加密 + jsonData = SmartAesUtil.encrypt(jsonData, key, iv); + log.info("JSON ASE 加密数据:{}", jsonData); + responseDTO.setData(jsonData); + } catch (Exception e) { + return; + } + } + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/responseencrypt/ResponseEncryptDecryptUserDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/responseencrypt/ResponseEncryptDecryptUserDTO.java new file mode 100644 index 00000000..858d176f --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/responseencrypt/ResponseEncryptDecryptUserDTO.java @@ -0,0 +1,29 @@ +package net.lab1024.smartadmin.service.module.support.responseencrypt; + +import lombok.Data; + +/** +* @Description: 用户信息 +* @Author: sbq +* @CreateDate: 2019/8/2 10:41 +* @Version: 1.0 +*/ +@Data +public class ResponseEncryptDecryptUserDTO { + + /** + * 用户id + */ + private Long userId; + + /** + * 用户名 + */ + private String userName; + + /** + * 扩展信息 + */ + private String extData; + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/SystemConfigConst.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/SystemConfigConst.java new file mode 100644 index 00000000..fcc49baf --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/SystemConfigConst.java @@ -0,0 +1,79 @@ +package net.lab1024.smartadmin.service.module.support.systemconfig; + +import net.lab1024.smartadmin.service.common.constant.BaseEnum; + +/** + * [ 系统配置常量类 ] + * + * @author 罗伊 + * @version 1.0 + * @date + * @since JDK1.8 + */ +public class SystemConfigConst { + + + public enum Key implements BaseEnum { + + /** + * 超管id + */ + EMPLOYEE_SUPERMAN("employee_superman", "超管id"), + + /** + * 本地上传路径前缀 + */ + LOCAL_UPLOAD_URL_PREFIX("local_upload_url_prefix", "本地上传路径前缀"), + + ; + + private final String val; + + private final String desc; + + Key(String val, String desc) { + this.val = val; + this.desc = desc; + } + + @Override + public String getValue() { + return val; + } + + @Override + public String getDesc() { + return desc; + } + } + + public enum Group implements BaseEnum { + + /** + * system 默认系统 + */ + SYSTEM("system", "默认系统"), + + ; + + private final String val; + + private final String desc; + + Group(String val, String desc) { + this.val = val; + this.desc = desc; + } + + @Override + public String getValue() { + return val; + } + + @Override + public String getDesc() { + return desc; + } + } + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/SystemConfigController.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/SystemConfigController.java new file mode 100644 index 00000000..e4a66d30 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/SystemConfigController.java @@ -0,0 +1,57 @@ +package net.lab1024.smartadmin.service.module.support.systemconfig; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import net.lab1024.smartadmin.service.common.constant.SwaggerTagConst; +import net.lab1024.smartadmin.service.common.controller.SupportBaseController; +import net.lab1024.smartadmin.service.common.domain.PageResultDTO; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.support.systemconfig.domain.*; +import net.lab1024.smartadmin.service.util.SmartBeanUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; + +/** + * [ ] + * + * @author 罗伊 + * @version 1.0 + * @date + * @since JDK1.8 + */ +@Api(tags = {SwaggerTagConst.Support.SYSTEM_CONFIG}) +@RestController +public class SystemConfigController extends SupportBaseController { + + @Autowired + private SystemConfigService systemConfigService; + + @ApiOperation("分页查询系统配置") + @PostMapping("/system/config/query") + public ResponseDTO> querySystemConfigPage(@RequestBody @Valid SystemConfigQueryDTO queryDTO) { + return systemConfigService.queryConfigPage(queryDTO); + } + + @ApiOperation("添加配置参数") + @PostMapping("/system/config/add") + public ResponseDTO addSystemConfig(@RequestBody @Valid SystemConfigAddDTO configAddDTO) { + return systemConfigService.add(configAddDTO); + } + + @ApiOperation("修改配置参数") + @PostMapping("/system/config/update") + public ResponseDTO updateSystemConfig(@RequestBody @Valid SystemConfigUpdateDTO updateDTO) { + return systemConfigService.updateSystemConfig(updateDTO); + } + + @ApiOperation("查询配置详情") + @GetMapping("/system/config/queryByKey") + public ResponseDTO queryByKey(@RequestParam String configKey) { + SystemConfigDTO configDTO = systemConfigService.getConfig(configKey); + SystemConfigVO configVO = SmartBeanUtil.copy(configDTO, SystemConfigVO.class); + return ResponseDTO.succData(configVO); + } + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/SystemConfigDao.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/SystemConfigDao.java new file mode 100644 index 00000000..a21f4dd7 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/SystemConfigDao.java @@ -0,0 +1,38 @@ +package net.lab1024.smartadmin.service.module.support.systemconfig; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import net.lab1024.smartadmin.service.module.support.systemconfig.domain.SystemConfigEntity; +import net.lab1024.smartadmin.service.module.support.systemconfig.domain.SystemConfigQueryDTO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * 系统参数配置 t_system_config Dao层 + * + * @author 1024lab + * @date 2017-12-23 14:25 + */ +@Component +@Mapper +public interface SystemConfigDao extends BaseMapper { + + /** + * 分页查询系统配置 + * + * @param page + * @return + */ + List queryByPage(Page page, @Param("query") SystemConfigQueryDTO queryDTO); + + /** + * 根据key查询获取数据 + * + * @param key + * @return + */ + SystemConfigEntity selectByKey(String key); +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/SystemConfigService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/SystemConfigService.java new file mode 100644 index 00000000..8dd8a9f0 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/SystemConfigService.java @@ -0,0 +1,203 @@ +package net.lab1024.smartadmin.service.module.support.systemconfig; + +import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; +import net.lab1024.smartadmin.service.common.codeconst.ResponseCodeConst; +import net.lab1024.smartadmin.service.common.domain.PageResultDTO; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.support.systemconfig.domain.*; +import net.lab1024.smartadmin.service.util.SmartBaseEnumUtil; +import net.lab1024.smartadmin.service.util.SmartBeanUtil; +import net.lab1024.smartadmin.service.util.SmartPageUtil; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.Assert; + +import javax.annotation.PostConstruct; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.concurrent.ConcurrentHashMap; + +/** + * 系统配置业务类 + * + * @author 1024lab + * @date 2017-12-23 15:09 + */ +@Slf4j +@Service +public class SystemConfigService { + + /** + * 一个简单的系统配置缓存 + */ + private final ConcurrentHashMap CONFIG_CACHE = new ConcurrentHashMap<>(); + + @Autowired + private SystemConfigDao systemConfigDao; + + /** + * 初始化系统设置缓存 + */ + @PostConstruct + private void initConfigCache() { + CONFIG_CACHE.clear(); + List entityList = systemConfigDao.selectList(null); + if (CollectionUtils.isEmpty(entityList)) { + return; + } + entityList.forEach(entity -> this.CONFIG_CACHE.put(entity.getConfigKey().toLowerCase(), entity)); + log.info("################# 系统配置缓存初始化完毕:{} ###################", CONFIG_CACHE.size()); + } + + /** + * 初始化系统设置缓存 + */ + private void refreshConfigCache(Long configId) { + Optional optional = this.CONFIG_CACHE.values().stream().filter(e -> Objects.equals(configId, e.getConfigId())).findFirst(); + // 移除缓存 + optional.ifPresent(e -> this.CONFIG_CACHE.remove(e.getConfigKey())); + + // 重新查询 加入缓存 + SystemConfigEntity configEntity = systemConfigDao.selectById(configId); + if (null == configEntity) { + return; + } + this.CONFIG_CACHE.put(configEntity.getConfigKey().toLowerCase(), configEntity); + } + + /** + * 分页查询系统配置 + * + * @param queryDTO + * @return + */ + public ResponseDTO> queryConfigPage(SystemConfigQueryDTO queryDTO) { + Page page = SmartPageUtil.convert2PageQuery(queryDTO); + List entityList = systemConfigDao.queryByPage(page, queryDTO); + PageResultDTO pageResultDTO = SmartPageUtil.convert2PageResult(page, entityList, SystemConfigVO.class); + return ResponseDTO.succData(pageResultDTO); + } + + /** + * 查询配置缓存 + * + * @param configKey + * @return + */ + public SystemConfigDTO getConfig(SystemConfigConst.Key configKey) { + return this.getConfig(configKey.getValue()); + } + + /** + * 查询配置缓存 + * + * @param configKey + * @return + */ + public SystemConfigDTO getConfig(String configKey) { + boolean check = SmartBaseEnumUtil.checkEnum(configKey, SystemConfigConst.Key.class); + Assert.isTrue(check, "config key error"); + + SystemConfigEntity entity = this.CONFIG_CACHE.get(configKey); + Assert.notNull(entity, "缺少系统配置[" + configKey + "]"); + return SmartBeanUtil.copy(entity, SystemConfigDTO.class); + } + + /** + * 查询配置缓存参数 + * + * @param configKey + * @return + */ + public String getConfigValue(SystemConfigConst.Key configKey) { + return this.getConfig(configKey).getConfigValue(); + } + + /** + * 根据参数key获得一条数据 并转换为 对象 + * + * @param configKey + * @param clazz + * @param + * @return + */ + public T getConfigValue2Obj(SystemConfigConst.Key configKey, Class clazz) { + String configValue = this.getConfigValue(configKey); + return JSON.parseObject(configValue, clazz); + } + + /** + * 添加系统配置 + * + * @param configAddDTO + * @return + */ + public ResponseDTO add(SystemConfigAddDTO configAddDTO) { + SystemConfigEntity entity = systemConfigDao.selectByKey(configAddDTO.getConfigKey()); + if (entity != null) { + return ResponseDTO.wrap(ResponseCodeConst.ALREADY_EXIST); + } + entity = SmartBeanUtil.copy(configAddDTO, SystemConfigEntity.class); + entity.setDisabledFlag(true); + systemConfigDao.insert(entity); + + // 刷新缓存 + this.refreshConfigCache(entity.getConfigId()); + return ResponseDTO.succ(); + } + + /** + * 更新系统配置 + * + * @param updateDTO + * @return + */ + public ResponseDTO updateSystemConfig(SystemConfigUpdateDTO updateDTO) { + Long configId = updateDTO.getConfigId(); + SystemConfigEntity entity = systemConfigDao.selectById(configId); + if (null == entity) { + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); + } + SystemConfigEntity alreadyEntity = systemConfigDao.selectByKey(updateDTO.getConfigKey()); + if (null != alreadyEntity && !Objects.equals(configId, alreadyEntity.getConfigId())) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ALREADY_EXIST, "config key 已存在"); + } + + // 更新数据 + entity = SmartBeanUtil.copy(updateDTO, SystemConfigEntity.class); + systemConfigDao.updateById(entity); + + // 刷新缓存 + this.refreshConfigCache(configId); + return ResponseDTO.succ(); + } + + /** + * 更新系统配置 + * + * @param key + * @param value + * @return + */ + public ResponseDTO updateValueByKey(SystemConfigConst.Key key, String value) { + SystemConfigDTO config = this.getConfig(key); + if (null == config) { + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); + } + + // 更新数据 + Long configId = config.getConfigId(); + SystemConfigEntity entity = new SystemConfigEntity(); + entity.setConfigId(configId); + entity.setConfigValue(value); + systemConfigDao.updateById(entity); + + // 刷新缓存 + this.refreshConfigCache(configId); + return ResponseDTO.succ(); + } +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/domain/dto/SystemConfigAddDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/domain/SystemConfigAddDTO.java similarity index 81% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/domain/dto/SystemConfigAddDTO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/domain/SystemConfigAddDTO.java index 18b8a7c9..2e15513e 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/domain/dto/SystemConfigAddDTO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/domain/SystemConfigAddDTO.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.module.system.systemconfig.domain.dto; +package net.lab1024.smartadmin.service.module.support.systemconfig.domain; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -9,10 +9,9 @@ import javax.validation.constraints.NotBlank; /** * [ ] * - * @author yandanyang + * @author 罗伊 * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. + * * @date * @since JDK1.8 */ @@ -26,7 +25,7 @@ public class SystemConfigAddDTO { @ApiModelProperty("参数的值") @NotBlank(message = "参数的值不能为空") - @Length(max = 65530, message = "参数的值最多65530个字符") + @Length(max = 60000, message = "参数的值最多60000个字符") private String configValue; @ApiModelProperty("参数名称") diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/domain/dto/SystemConfigDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/domain/SystemConfigDTO.java similarity index 63% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/domain/dto/SystemConfigDTO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/domain/SystemConfigDTO.java index 16aadef5..d33a2eee 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/domain/dto/SystemConfigDTO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/domain/SystemConfigDTO.java @@ -1,26 +1,24 @@ -package net.lab1024.smartadmin.module.system.systemconfig.domain.dto; +package net.lab1024.smartadmin.service.module.support.systemconfig.domain; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -import java.util.Date; +import java.time.LocalDateTime; /** - * * [ ] - * + * + * @author 罗伊 * @version 1.0 - * @since JDK1.8 - * @author yandanyang - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. + * * @date + * @since JDK1.8 */ @Data public class SystemConfigDTO { @ApiModelProperty("主键") - private Long id; + private Long configId; @ApiModelProperty("参数key") private String configKey; @@ -34,17 +32,16 @@ public class SystemConfigDTO { @ApiModelProperty("参数类别") private String configGroup; - @ApiModelProperty("是否使用0 是 1否") - private Integer isUsing; + @ApiModelProperty("是否禁用") + private Boolean disabledFlag; @ApiModelProperty("备注") private String remark; @ApiModelProperty("创建时间") - private Date createTime; + private LocalDateTime createTime; @ApiModelProperty("上次修改时间") - private Date updateTime; - + private LocalDateTime updateTime; } diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/domain/entity/SystemConfigEntity.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/domain/SystemConfigEntity.java similarity index 50% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/domain/entity/SystemConfigEntity.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/domain/SystemConfigEntity.java index 18ca1f9f..bed586ae 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/domain/entity/SystemConfigEntity.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/domain/SystemConfigEntity.java @@ -1,22 +1,24 @@ -package net.lab1024.smartadmin.module.system.systemconfig.domain.entity; +package net.lab1024.smartadmin.service.module.support.systemconfig.domain; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import net.lab1024.smartadmin.common.domain.BaseEntity; import lombok.Data; -import java.io.Serializable; +import java.time.LocalDateTime; /** * 系统配置参数 实体类 * - * @author GHQ + * @author 1024lab * @date 2017-12-23 13:41 */ @Data -@TableName(value = "t_system_config") -public class SystemConfigEntity extends BaseEntity implements Serializable { +@TableName("t_system_config") +public class SystemConfigEntity { - private static final long serialVersionUID = 257284726400352502L; + @TableId(type = IdType.AUTO) + private Long configId; /** * 参数key @@ -39,13 +41,16 @@ public class SystemConfigEntity extends BaseEntity implements Serializable { private String configGroup; /** - * 是否使用0 是 1否 + * 是否禁用 */ - private Integer isUsing; + private Boolean disabledFlag; /** * 备注 */ private String remark; + private LocalDateTime updateTime; + + private LocalDateTime createTime; } diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/domain/SystemConfigQueryDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/domain/SystemConfigQueryDTO.java new file mode 100644 index 00000000..cab4ce4c --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/domain/SystemConfigQueryDTO.java @@ -0,0 +1,24 @@ +package net.lab1024.smartadmin.service.module.support.systemconfig.domain; + +import net.lab1024.smartadmin.service.common.domain.PageBaseDTO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 分页查询 系统配置 + * + * @author 罗伊 + * @version 1.0 + * + * @date + * @since JDK1.8 + */ +@Data +public class SystemConfigQueryDTO extends PageBaseDTO { + + @ApiModelProperty("参数KEY") + private String configKey; + + @ApiModelProperty("参数类别") + private String configGroup; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/domain/SystemConfigUpdateDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/domain/SystemConfigUpdateDTO.java new file mode 100644 index 00000000..d5d02047 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/domain/SystemConfigUpdateDTO.java @@ -0,0 +1,23 @@ +package net.lab1024.smartadmin.service.module.support.systemconfig.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotNull; + +/** + * [ ] + * + * @author 罗伊 + * @version 1.0 + * + * @date + * @since JDK1.8 + */ +@Data +public class SystemConfigUpdateDTO extends SystemConfigAddDTO { + + @ApiModelProperty("configId") + @NotNull(message = "configId不能为空") + private Long configId; +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/domain/dto/SystemConfigVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/domain/SystemConfigVO.java similarity index 59% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/domain/dto/SystemConfigVO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/domain/SystemConfigVO.java index 3b5de292..3f0324f9 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/domain/dto/SystemConfigVO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/support/systemconfig/domain/SystemConfigVO.java @@ -1,17 +1,16 @@ -package net.lab1024.smartadmin.module.system.systemconfig.domain.dto; +package net.lab1024.smartadmin.service.module.support.systemconfig.domain; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -import java.util.Date; +import java.time.LocalDateTime; /** * [ ] * - * @author yandanyang + * @author 罗伊 * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. + * * @date * @since JDK1.8 */ @@ -19,7 +18,7 @@ import java.util.Date; public class SystemConfigVO { @ApiModelProperty("主键") - private Long id; + private Long configId; @ApiModelProperty("参数key") private String configKey; @@ -30,19 +29,18 @@ public class SystemConfigVO { @ApiModelProperty("参数名称") private String configName; - @ApiModelProperty("参数类别") + @ApiModelProperty("参数分组") private String configGroup; - @ApiModelProperty("是否使用0 是 1否") - private Integer isUsing; + @ApiModelProperty("是否禁用") + private Boolean disabledFlag; @ApiModelProperty("备注") private String remark; @ApiModelProperty("创建时间") - private Date createTime; + private LocalDateTime createTime; @ApiModelProperty("上次修改时间") - private Date updateTime; - + private LocalDateTime updateTime; } diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/anno/DataScope.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/DataScope.java similarity index 57% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/anno/DataScope.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/DataScope.java index 1ab8061a..a754d799 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/anno/DataScope.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/DataScope.java @@ -1,8 +1,9 @@ -package net.lab1024.smartadmin.common.anno; +package net.lab1024.smartadmin.service.module.system.datascope; -import net.lab1024.smartadmin.module.system.datascope.constant.DataScopeTypeEnum; -import net.lab1024.smartadmin.module.system.datascope.constant.DataScopeWhereInTypeEnum; -import net.lab1024.smartadmin.module.system.datascope.strategy.DataScopePowerStrategy; + +import net.lab1024.smartadmin.service.module.system.datascope.constant.DataScopeTypeEnum; +import net.lab1024.smartadmin.service.module.system.datascope.constant.DataScopeWhereInTypeEnum; +import net.lab1024.smartadmin.service.module.system.datascope.strategy.DataScopePowerStrategy; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -12,18 +13,13 @@ import java.lang.annotation.Target; /** * [ 数据范围 ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 + * @author 罗伊 */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface DataScope { - DataScopeTypeEnum dataScopeType() default DataScopeTypeEnum.DEFAULT; + DataScopeTypeEnum dataScopeType() ; DataScopeWhereInTypeEnum whereInType() default DataScopeWhereInTypeEnum.EMPLOYEE; @@ -33,6 +29,11 @@ public @interface DataScope { */ Class joinSqlImplClazz() default DataScopePowerStrategy.class; + /** + * 多个参数已逗号分隔,本属性主要用于joinSqlImplClazz 实现类跟进参数进行不同的范围控制,如不使用CUSTOM_STRATEGY,可不做配置 + * @return + */ + String paramName() default ""; /** * * 第几个where 条件 从0开始 diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/DataScopeController.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/DataScopeController.java similarity index 54% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/DataScopeController.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/DataScopeController.java index 75a5eec4..4b47ed42 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/DataScopeController.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/DataScopeController.java @@ -1,15 +1,14 @@ -package net.lab1024.smartadmin.module.system.datascope; +package net.lab1024.smartadmin.service.module.system.datascope; -import net.lab1024.smartadmin.common.anno.NoValidPrivilege; -import net.lab1024.smartadmin.common.anno.OperateLog; -import net.lab1024.smartadmin.constant.SwaggerTagConst; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.module.system.datascope.domain.dto.DataScopeAndViewTypeVO; -import net.lab1024.smartadmin.module.system.datascope.domain.dto.DataScopeBatchSetRoleDTO; -import net.lab1024.smartadmin.module.system.datascope.domain.dto.DataScopeSelectVO; -import net.lab1024.smartadmin.module.system.datascope.service.DataScopeService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import net.lab1024.smartadmin.service.common.constant.SwaggerTagConst; +import net.lab1024.smartadmin.service.common.controller.AdminBaseController; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.system.datascope.domain.dto.DataScopeAndViewTypeVO; +import net.lab1024.smartadmin.service.module.system.datascope.domain.dto.DataScopeBatchSetRoleDTO; +import net.lab1024.smartadmin.service.module.system.datascope.domain.dto.DataScopeSelectVO; +import net.lab1024.smartadmin.service.module.system.datascope.service.DataScopeService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -19,38 +18,29 @@ import java.util.List; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/27 0027 下午 15:12 - * @since JDK1.8 + * @author 罗伊 */ -@Api(tags = {SwaggerTagConst.Admin.MANAGER_DATA_SCOPE}) -@OperateLog +@Api(tags = {SwaggerTagConst.Admin.MANAGER_ROLE}) @RestController -public class DataScopeController { +public class DataScopeController extends AdminBaseController { @Autowired private DataScopeService dataScopeService; @ApiOperation(value = "获取当前系统所配置的所有数据范围") @GetMapping("/dataScope/list") - @NoValidPrivilege public ResponseDTO> dataScopeList() { return dataScopeService.dataScopeList(); } @ApiOperation(value = "获取某角色所设置的数据范围") @GetMapping("/dataScope/listByRole/{roleId}") - @NoValidPrivilege public ResponseDTO> dataScopeListByRole(@PathVariable Long roleId) { return dataScopeService.dataScopeListByRole(roleId); } @ApiOperation(value = "批量设置某角色数据范围") @PostMapping("/dataScope/batchSet") - @NoValidPrivilege public ResponseDTO dataScopeBatchSet(@RequestBody @Valid DataScopeBatchSetRoleDTO batchSetRoleDTO) { return dataScopeService.dataScopeBatchSet(batchSetRoleDTO); } diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/DataScopeRoleDao.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/DataScopeRoleDao.java similarity index 75% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/DataScopeRoleDao.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/DataScopeRoleDao.java index 1b926a7b..a8046e16 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/DataScopeRoleDao.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/DataScopeRoleDao.java @@ -1,22 +1,17 @@ -package net.lab1024.smartadmin.module.system.datascope; +package net.lab1024.smartadmin.service.module.system.datascope; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import net.lab1024.smartadmin.module.system.datascope.domain.entity.DataScopeRoleEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Component; +import net.lab1024.smartadmin.service.module.system.datascope.domain.entity.DataScopeRoleEntity; import java.util.List; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/27 0027 下午 14:41 - * @since JDK1.8 + * @author 罗伊 */ @Mapper @Component diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/MyBatisPlugin.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/MyBatisPlugin.java similarity index 77% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/MyBatisPlugin.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/MyBatisPlugin.java index f9270b62..4f68e018 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/MyBatisPlugin.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/MyBatisPlugin.java @@ -1,9 +1,10 @@ -package net.lab1024.smartadmin.module.system.datascope; +package net.lab1024.smartadmin.service.module.system.datascope; -import net.lab1024.smartadmin.module.system.datascope.domain.dto.DataScopeSqlConfigDTO; -import net.lab1024.smartadmin.module.system.datascope.service.DataScopeSqlConfigService; -import net.lab1024.smartadmin.third.SmartApplicationContext; -import net.lab1024.smartadmin.util.SmartStringUtil; +import com.google.common.collect.Maps; +import net.lab1024.smartadmin.service.module.system.datascope.domain.dto.DataScopeSqlConfigDTO; +import net.lab1024.smartadmin.service.module.system.datascope.service.DataScopeSqlConfigService; +import net.lab1024.smartadmin.service.third.SmartApplicationContext; +import net.lab1024.smartadmin.service.util.SmartStringUtil; import org.apache.commons.lang3.StringUtils; import org.apache.ibatis.mapping.*; import org.apache.ibatis.plugin.*; @@ -12,17 +13,13 @@ import org.apache.ibatis.session.RowBounds; import org.springframework.stereotype.Component; import java.util.List; +import java.util.Map; import java.util.Properties; /** * [ mybaits sql 拦截 ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 + * @author 罗伊 */ @Intercepts({@Signature(type = org.apache.ibatis.executor.Executor.class, method = "query", args = {MappedStatement.class, Object.class, RowBounds.class, ResultHandler.class})}) @Component @@ -30,8 +27,10 @@ public class MyBatisPlugin implements Interceptor { @Override public Object intercept(Invocation invocation) throws Throwable { + MappedStatement mappedStatement = (MappedStatement) invocation.getArgs()[0]; Object parameter = invocation.getArgs()[1]; + BoundSql boundSql = mappedStatement.getBoundSql(parameter); String originalSql = boundSql.getSql().trim(); String id = mappedStatement.getId(); @@ -43,7 +42,8 @@ public class MyBatisPlugin implements Interceptor { } DataScopeSqlConfigDTO sqlConfigDTO = dataScopeSqlConfigService.getSqlConfig(path); if (sqlConfigDTO != null) { - BoundSql newBoundSql = copyFromBoundSql(mappedStatement, boundSql, this.joinSql(originalSql, sqlConfigDTO)); + Map paramMap = this.getParamList(sqlConfigDTO.getParamName(), parameter); + BoundSql newBoundSql = copyFromBoundSql(mappedStatement, boundSql, this.joinSql(originalSql, paramMap, sqlConfigDTO)); ParameterMap map = mappedStatement.getParameterMap(); MappedStatement newMs = copyFromMappedStatement(mappedStatement, new BoundSqlSqlSource(newBoundSql), map); invocation.getArgs()[0] = newMs; @@ -53,11 +53,32 @@ public class MyBatisPlugin implements Interceptor { return obj; } - private String joinSql(String sql, DataScopeSqlConfigDTO sqlConfigDTO) { + + private Map getParamList(String paramName, Object parameter) { + Map paramMap = Maps.newHashMap(); + if (StringUtils.isEmpty(paramName)) { + return paramMap; + } + if (parameter == null) { + return paramMap; + } + if (parameter instanceof Map) { + String[] paramNameArray = paramName.split(","); + Map parameterMap = (Map) parameter; + for (String param : paramNameArray) { + if(parameterMap.containsKey(param)){ + paramMap.put(param, parameterMap.get(param)); + } + } + } + return paramMap; + } + + private String joinSql(String sql, Map paramMap, DataScopeSqlConfigDTO sqlConfigDTO) { if (null == sqlConfigDTO) { return sql; } - String appendSql = this.dataScopeSqlConfigService().getJoinSql(sqlConfigDTO); + String appendSql = this.dataScopeSqlConfigService().getJoinSql(paramMap, sqlConfigDTO); if (StringUtils.isEmpty(appendSql)) { return sql; } @@ -68,18 +89,18 @@ public class MyBatisPlugin implements Interceptor { int whereIndex = StringUtils.ordinalIndexOf(sql.toLowerCase(), where, appendSqlWhereIndex + 1); int orderIndex = sql.toLowerCase().indexOf(order); int groupIndex = sql.toLowerCase().indexOf(group); - if (whereIndex > - 1) { + if (whereIndex > -1) { String subSql = sql.substring(0, whereIndex + where.length() + 1); subSql = subSql + " " + appendSql + " AND " + sql.substring(whereIndex + where.length() + 1); return subSql; } - if (groupIndex > - 1) { + if (groupIndex > -1) { String subSql = sql.substring(0, groupIndex); subSql = subSql + " where " + appendSql + " " + sql.substring(groupIndex); return subSql; } - if (orderIndex > - 1) { + if (orderIndex > -1) { String subSql = sql.substring(0, orderIndex); subSql = subSql + " where " + appendSql + " " + sql.substring(orderIndex); return subSql; @@ -99,6 +120,7 @@ public class MyBatisPlugin implements Interceptor { public BoundSqlSqlSource(BoundSql boundSql) { this.boundSql = boundSql; } + @Override public BoundSql getBoundSql(Object parameterObject) { return boundSql; diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/constant/DataScopeTypeEnum.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/constant/DataScopeTypeEnum.java similarity index 56% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/constant/DataScopeTypeEnum.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/constant/DataScopeTypeEnum.java index 66ebb8f9..2ef98b04 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/constant/DataScopeTypeEnum.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/constant/DataScopeTypeEnum.java @@ -1,28 +1,27 @@ -package net.lab1024.smartadmin.module.system.datascope.constant; +package net.lab1024.smartadmin.service.module.system.datascope.constant; -import net.lab1024.smartadmin.common.domain.BaseEnum; +import net.lab1024.smartadmin.service.common.constant.BaseEnum; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/28 0028 下午 15:37 - * @since JDK1.8 + * @author 罗伊 */ public enum DataScopeTypeEnum implements BaseEnum { - DEFAULT(0,0,"默认类型","数据范围样例"); + NOTICE(7, 7, "系统通知", "系统通知数据范围"), + ; private Integer value; + private Integer sort; + private String name; + private String desc; - DataScopeTypeEnum(Integer value,Integer sort,String name,String desc) { + DataScopeTypeEnum(Integer value, Integer sort, String name, String desc) { this.value = value; this.sort = sort; this.name = name; diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/constant/DataScopeViewTypeEnum.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/constant/DataScopeViewTypeEnum.java new file mode 100644 index 00000000..88a46038 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/constant/DataScopeViewTypeEnum.java @@ -0,0 +1,46 @@ +package net.lab1024.smartadmin.service.module.system.datascope.constant; + + +import net.lab1024.smartadmin.service.common.constant.BaseEnum; + +/** + * [ ] + * + * @author 罗伊 + */ +public enum DataScopeViewTypeEnum implements BaseEnum { + + ME(0, 0, "本人"), + + DEPARTMENT(1, 5, "本部门"), + + DEPARTMENT_AND_SUB(2, 10, "本部门及下属子部门"), + + ALL(3, 15, "全部"); + + private Integer value; + private Integer level; + private String desc; + + DataScopeViewTypeEnum(Integer value, Integer level, String desc) { + this.value = value; + this.level = level; + this.desc = desc; + } + + @Override + public Integer getValue() { + return value; + } + + public Integer getLevel() { + return level; + } + + @Override + public String getDesc() { + return desc; + } + + +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/constant/DataScopeWhereInTypeEnum.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/constant/DataScopeWhereInTypeEnum.java similarity index 50% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/constant/DataScopeWhereInTypeEnum.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/constant/DataScopeWhereInTypeEnum.java index e9037373..dd995b4f 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/constant/DataScopeWhereInTypeEnum.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/constant/DataScopeWhereInTypeEnum.java @@ -1,24 +1,20 @@ -package net.lab1024.smartadmin.module.system.datascope.constant; +package net.lab1024.smartadmin.service.module.system.datascope.constant; -import net.lab1024.smartadmin.common.domain.BaseEnum; + +import net.lab1024.smartadmin.service.common.constant.BaseEnum; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/5/8 0008 下午 16:00 - * @since JDK1.8 + * @author 罗伊 */ public enum DataScopeWhereInTypeEnum implements BaseEnum { - EMPLOYEE(0,"以员工IN"), + EMPLOYEE(0, "以员工IN"), - DEPARTMENT(1,"以部门IN"), + DEPARTMENT(1, "以部门IN"), - CUSTOM_STRATEGY(2,"自定义策略"); + CUSTOM_STRATEGY(2, "自定义策略"); private Integer value; private String desc; diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/domain/dto/DataScopeAndViewTypeVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/domain/dto/DataScopeAndViewTypeVO.java similarity index 69% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/domain/dto/DataScopeAndViewTypeVO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/domain/dto/DataScopeAndViewTypeVO.java index 1412be57..7ea77d2c 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/domain/dto/DataScopeAndViewTypeVO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/domain/dto/DataScopeAndViewTypeVO.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.module.system.datascope.domain.dto; +package net.lab1024.smartadmin.service.module.system.datascope.domain.dto; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -8,12 +8,7 @@ import java.util.List; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/27 0027 下午 16:37 - * @since JDK1.8 + * @author 罗伊 */ @Data public class DataScopeAndViewTypeVO { diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/domain/dto/DataScopeBatchSetDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/domain/dto/DataScopeBatchSetDTO.java similarity index 64% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/domain/dto/DataScopeBatchSetDTO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/domain/dto/DataScopeBatchSetDTO.java index 6ff9fc92..6500d417 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/domain/dto/DataScopeBatchSetDTO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/domain/dto/DataScopeBatchSetDTO.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.module.system.datascope.domain.dto; +package net.lab1024.smartadmin.service.module.system.datascope.domain.dto; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -8,12 +8,7 @@ import javax.validation.constraints.NotNull; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/27 0027 下午 16:51 - * @since JDK1.8 + * @author 罗伊 */ @Data public class DataScopeBatchSetDTO { diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/domain/dto/DataScopeBatchSetRoleDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/domain/dto/DataScopeBatchSetRoleDTO.java similarity index 64% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/domain/dto/DataScopeBatchSetRoleDTO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/domain/dto/DataScopeBatchSetRoleDTO.java index 215ab664..3e827f1d 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/domain/dto/DataScopeBatchSetRoleDTO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/domain/dto/DataScopeBatchSetRoleDTO.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.module.system.datascope.domain.dto; +package net.lab1024.smartadmin.service.module.system.datascope.domain.dto; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -10,12 +10,7 @@ import java.util.List; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/27 0027 下午 16:47 - * @since JDK1.8 + * @author 罗伊 */ @Data public class DataScopeBatchSetRoleDTO { diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/domain/dto/DataScopeDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/domain/dto/DataScopeDTO.java similarity index 65% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/domain/dto/DataScopeDTO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/domain/dto/DataScopeDTO.java index 629679bf..653239d6 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/domain/dto/DataScopeDTO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/domain/dto/DataScopeDTO.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.module.system.datascope.domain.dto; +package net.lab1024.smartadmin.service.module.system.datascope.domain.dto; import io.swagger.annotations.ApiModelProperty; import lombok.Builder; @@ -7,12 +7,7 @@ import lombok.Data; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/27 0027 下午 16:37 - * @since JDK1.8 + * @author 罗伊 */ @Data @Builder diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/domain/dto/DataScopeSelectVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/domain/dto/DataScopeSelectVO.java similarity index 53% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/domain/dto/DataScopeSelectVO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/domain/dto/DataScopeSelectVO.java index 5d0a3aa8..fd45790c 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/domain/dto/DataScopeSelectVO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/domain/dto/DataScopeSelectVO.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.module.system.datascope.domain.dto; +package net.lab1024.smartadmin.service.module.system.datascope.domain.dto; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -6,12 +6,7 @@ import lombok.Data; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/27 0027 下午 16:43 - * @since JDK1.8 + * @author 罗伊 */ @Data public class DataScopeSelectVO { diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/domain/dto/DataScopeSqlConfigDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/domain/dto/DataScopeSqlConfigDTO.java similarity index 54% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/domain/dto/DataScopeSqlConfigDTO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/domain/dto/DataScopeSqlConfigDTO.java index 422933de..ef9091bf 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/domain/dto/DataScopeSqlConfigDTO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/domain/dto/DataScopeSqlConfigDTO.java @@ -1,18 +1,13 @@ -package net.lab1024.smartadmin.module.system.datascope.domain.dto; +package net.lab1024.smartadmin.service.module.system.datascope.domain.dto; import lombok.Data; -import net.lab1024.smartadmin.module.system.datascope.constant.DataScopeTypeEnum; -import net.lab1024.smartadmin.module.system.datascope.constant.DataScopeWhereInTypeEnum; +import net.lab1024.smartadmin.service.module.system.datascope.constant.DataScopeTypeEnum; +import net.lab1024.smartadmin.service.module.system.datascope.constant.DataScopeWhereInTypeEnum; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/28 0028 下午 17:21 - * @since JDK1.8 + * @author 罗伊 */ @Data public class DataScopeSqlConfigDTO { @@ -32,6 +27,8 @@ public class DataScopeSqlConfigDTO { private Integer whereIndex; + private String paramName; + /** * whereIn类型 * {@link DataScopeWhereInTypeEnum} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/domain/dto/DataScopeViewTypeVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/domain/dto/DataScopeViewTypeVO.java similarity index 62% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/domain/dto/DataScopeViewTypeVO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/domain/dto/DataScopeViewTypeVO.java index 853a514f..eb9744c2 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/domain/dto/DataScopeViewTypeVO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/domain/dto/DataScopeViewTypeVO.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.module.system.datascope.domain.dto; +package net.lab1024.smartadmin.service.module.system.datascope.domain.dto; import io.swagger.annotations.ApiModelProperty; import lombok.Builder; @@ -7,12 +7,7 @@ import lombok.Data; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/28 0028 下午 15:41 - * @since JDK1.8 + * @author 罗伊 */ @Data @Builder diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/domain/entity/DataScopeRoleEntity.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/domain/entity/DataScopeRoleEntity.java new file mode 100644 index 00000000..961f77e5 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/domain/entity/DataScopeRoleEntity.java @@ -0,0 +1,50 @@ +package net.lab1024.smartadmin.service.module.system.datascope.domain.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * [ 数据范围与角色关系 ] + * + * @author 罗伊 + */ +@Data +@TableName("t_role_data_scope") +public class DataScopeRoleEntity { + /** + * 主键id + */ + @TableId(type = IdType.AUTO) + private Long id; + + /** + * 数据范围id + * {@link net.lab1024.smartadmin.service.module.system.datascope.constant.DataScopeTypeEnum} + */ + private Integer dataScopeType; + + /** + * 数据范围类型 + * {@link net.lab1024.smartadmin.service.module.system.datascope.constant.DataScopeViewTypeEnum} + */ + private Integer viewType; + + /** + * 角色id + */ + private Long roleId; + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + /** + * 创建时间 + */ + private LocalDateTime createTime; +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/service/DataScopeService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/service/DataScopeService.java similarity index 73% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/service/DataScopeService.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/service/DataScopeService.java index 46b80bd4..f4e77605 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/service/DataScopeService.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/service/DataScopeService.java @@ -1,14 +1,14 @@ -package net.lab1024.smartadmin.module.system.datascope.service; +package net.lab1024.smartadmin.service.module.system.datascope.service; -import net.lab1024.smartadmin.common.constant.ResponseCodeConst; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.module.system.datascope.DataScopeRoleDao; -import net.lab1024.smartadmin.module.system.datascope.constant.DataScopeTypeEnum; -import net.lab1024.smartadmin.module.system.datascope.constant.DataScopeViewTypeEnum; -import net.lab1024.smartadmin.module.system.datascope.domain.entity.DataScopeRoleEntity; -import net.lab1024.smartadmin.util.SmartBeanUtil; import com.google.common.collect.Lists; -import net.lab1024.smartadmin.module.system.datascope.domain.dto.*; +import net.lab1024.smartadmin.service.common.codeconst.ResponseCodeConst; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.system.datascope.DataScopeRoleDao; +import net.lab1024.smartadmin.service.module.system.datascope.constant.DataScopeTypeEnum; +import net.lab1024.smartadmin.service.module.system.datascope.constant.DataScopeViewTypeEnum; +import net.lab1024.smartadmin.service.module.system.datascope.domain.dto.*; +import net.lab1024.smartadmin.service.module.system.datascope.domain.entity.DataScopeRoleEntity; +import net.lab1024.smartadmin.service.util.SmartBeanUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -20,12 +20,7 @@ import java.util.List; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/27 0027 下午 14:52 - * @since JDK1.8 + * @author 罗伊 */ @Service public class DataScopeService { @@ -61,7 +56,7 @@ public class DataScopeService { dataScopeViewTypeDTO = DataScopeViewTypeVO.builder().viewType(viewTypeEnum.getValue()).viewTypeLevel(viewTypeEnum.getLevel()).viewTypeName(viewTypeEnum.getDesc()).build(); viewTypeList.add(dataScopeViewTypeDTO); } - Comparator comparator = (h1, h2) -> h1.getViewTypeLevel().compareTo(h2.getViewTypeLevel()); + Comparator comparator = Comparator.comparing(DataScopeViewTypeVO::getViewTypeLevel); viewTypeList.sort(comparator); return viewTypeList; } @@ -72,10 +67,10 @@ public class DataScopeService { DataScopeDTO dataScopeDTO; for (DataScopeTypeEnum typeEnum : enums) { dataScopeDTO = - DataScopeDTO.builder().dataScopeType(typeEnum.getValue()).dataScopeTypeDesc(typeEnum.getDesc()).dataScopeTypeName(typeEnum.getName()).dataScopeTypeSort(typeEnum.getSort()).build(); + DataScopeDTO.builder().dataScopeType(typeEnum.getValue()).dataScopeTypeDesc(typeEnum.getDesc()).dataScopeTypeName(typeEnum.getName()).dataScopeTypeSort(typeEnum.getSort()).build(); dataScopeTypeList.add(dataScopeDTO); } - Comparator comparator = (h1, h2) -> h1.getDataScopeTypeSort().compareTo(h2.getDataScopeTypeSort()); + Comparator comparator = Comparator.comparing(DataScopeDTO::getDataScopeTypeSort); dataScopeTypeList.sort(comparator); return dataScopeTypeList; } @@ -106,7 +101,7 @@ public class DataScopeService { public ResponseDTO dataScopeBatchSet(DataScopeBatchSetRoleDTO batchSetRoleDTO) { List batchSetList = batchSetRoleDTO.getBatchSetList(); if (CollectionUtils.isEmpty(batchSetList)) { - return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM, "缺少配置信息"); + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "缺少配置信息"); } List dataScopeRoleEntityList = SmartBeanUtil.copyList(batchSetList, DataScopeRoleEntity.class); dataScopeRoleEntityList.forEach(e -> e.setRoleId(batchSetRoleDTO.getRoleId())); diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/service/DataScopeSqlConfigService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/service/DataScopeSqlConfigService.java similarity index 76% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/service/DataScopeSqlConfigService.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/service/DataScopeSqlConfigService.java index 30381384..446600a6 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/service/DataScopeSqlConfigService.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/service/DataScopeSqlConfigService.java @@ -1,16 +1,15 @@ -package net.lab1024.smartadmin.module.system.datascope.service; +package net.lab1024.smartadmin.service.module.system.datascope.service; import lombok.extern.slf4j.Slf4j; -import net.lab1024.smartadmin.common.anno.DataScope; -import net.lab1024.smartadmin.module.system.datascope.constant.DataScopeTypeEnum; -import net.lab1024.smartadmin.module.system.datascope.constant.DataScopeViewTypeEnum; -import net.lab1024.smartadmin.module.system.datascope.constant.DataScopeWhereInTypeEnum; -import net.lab1024.smartadmin.module.system.datascope.domain.dto.DataScopeSqlConfigDTO; -import net.lab1024.smartadmin.module.system.datascope.strategy.DataScopePowerStrategy; -import net.lab1024.smartadmin.module.system.login.domain.RequestTokenBO; -import net.lab1024.smartadmin.third.SmartApplicationContext; -import net.lab1024.smartadmin.util.SmartRequestTokenUtil; -import org.apache.commons.collections.CollectionUtils; +import net.lab1024.smartadmin.service.module.system.datascope.DataScope; +import net.lab1024.smartadmin.service.module.system.datascope.constant.DataScopeTypeEnum; +import net.lab1024.smartadmin.service.module.system.datascope.constant.DataScopeViewTypeEnum; +import net.lab1024.smartadmin.service.module.system.datascope.constant.DataScopeWhereInTypeEnum; +import net.lab1024.smartadmin.service.module.system.datascope.domain.dto.DataScopeSqlConfigDTO; +import net.lab1024.smartadmin.service.module.system.datascope.strategy.DataScopePowerStrategy; +import net.lab1024.smartadmin.service.third.SmartApplicationContext; +import net.lab1024.smartadmin.service.util.SmartEmployeeTokenUtil; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.reflections.Reflections; import org.reflections.scanners.MethodAnnotationsScanner; @@ -30,12 +29,7 @@ import java.util.concurrent.ConcurrentHashMap; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/29 0029 上午 10:12 - * @since JDK1.8 + * @author 罗伊 */ @Slf4j @Service @@ -77,6 +71,7 @@ public class DataScopeSqlConfigService { configDTO.setJoinSql(dataScopeAnnotation.joinSql()); configDTO.setWhereIndex(dataScopeAnnotation.whereIndex()); configDTO.setDataScopeWhereInType(dataScopeAnnotation.whereInType()); + configDTO.setParamName(dataScopeAnnotation.paramName()); dataScopeMethodMap.put(method.getDeclaringClass().getSimpleName() + "." + method.getName(), configDTO); } } @@ -96,28 +91,30 @@ public class DataScopeSqlConfigService { /** * 组装需要拼接的sql - * + * @param paramMap * @param sqlConfigDTO * @return */ - public String getJoinSql(DataScopeSqlConfigDTO sqlConfigDTO) { + public String getJoinSql(Map paramMap, DataScopeSqlConfigDTO sqlConfigDTO) { DataScopeTypeEnum dataScopeTypeEnum = sqlConfigDTO.getDataScopeType(); String joinSql = sqlConfigDTO.getJoinSql(); - RequestTokenBO requestToken = SmartRequestTokenUtil.getThreadLocalUser(); - Long employeeId = requestToken.getRequestUserId(); + Long employeeId = SmartEmployeeTokenUtil.getRequestEmployeeId(); + if (employeeId == null) { + return ""; + } if (DataScopeWhereInTypeEnum.CUSTOM_STRATEGY == sqlConfigDTO.getDataScopeWhereInType()) { Class strategyClass = sqlConfigDTO.getJoinSqlImplClazz(); - if(strategyClass == null){ + if (strategyClass == null) { log.warn("data scope custom strategy class is null"); return ""; } - DataScopePowerStrategy powerStrategy = (DataScopePowerStrategy)SmartApplicationContext.getBean(sqlConfigDTO.getJoinSqlImplClazz()); + DataScopePowerStrategy powerStrategy = (DataScopePowerStrategy) SmartApplicationContext.getBean(sqlConfigDTO.getJoinSqlImplClazz()); if (powerStrategy == null) { - log.warn("data scope custom strategy class:{} ,bean is null",sqlConfigDTO.getJoinSqlImplClazz()); + log.warn("data scope custom strategy class:{} ,bean is null", sqlConfigDTO.getJoinSqlImplClazz()); return ""; } DataScopeViewTypeEnum viewTypeEnum = dataScopeViewService.getEmployeeDataScopeViewType(dataScopeTypeEnum, employeeId); - return powerStrategy.getCondition(viewTypeEnum,sqlConfigDTO); + return powerStrategy.getCondition(viewTypeEnum,paramMap, sqlConfigDTO); } if (DataScopeWhereInTypeEnum.EMPLOYEE == sqlConfigDTO.getDataScopeWhereInType()) { List canViewEmployeeIds = dataScopeViewService.getCanViewEmployeeId(dataScopeTypeEnum, employeeId); diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/service/DataScopeViewService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/service/DataScopeViewService.java similarity index 68% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/service/DataScopeViewService.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/service/DataScopeViewService.java index 11ec5bc7..93f052eb 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/service/DataScopeViewService.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/service/DataScopeViewService.java @@ -1,21 +1,19 @@ -package net.lab1024.smartadmin.module.system.datascope.service; +package net.lab1024.smartadmin.service.module.system.datascope.service; import com.google.common.collect.Lists; -import net.lab1024.smartadmin.module.system.datascope.DataScopeRoleDao; -import net.lab1024.smartadmin.module.system.datascope.constant.DataScopeTypeEnum; -import net.lab1024.smartadmin.module.system.datascope.constant.DataScopeViewTypeEnum; -import net.lab1024.smartadmin.module.system.datascope.domain.entity.DataScopeRoleEntity; -import net.lab1024.smartadmin.module.system.department.DepartmentTreeService; -import net.lab1024.smartadmin.module.system.employee.EmployeeDao; -import net.lab1024.smartadmin.module.system.employee.domain.dto.EmployeeDTO; -import net.lab1024.smartadmin.module.system.employee.domain.entity.EmployeeEntity; -import net.lab1024.smartadmin.module.system.employee.domain.vo.EmployeeVO; -import net.lab1024.smartadmin.module.system.privilege.service.PrivilegeEmployeeService; -import net.lab1024.smartadmin.module.system.role.roleemployee.RoleEmployeeDao; -import net.lab1024.smartadmin.util.SmartBaseEnumUtil; -import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import net.lab1024.smartadmin.service.module.system.datascope.DataScopeRoleDao; +import net.lab1024.smartadmin.service.module.system.datascope.constant.DataScopeTypeEnum; +import net.lab1024.smartadmin.service.module.system.datascope.constant.DataScopeViewTypeEnum; +import net.lab1024.smartadmin.service.module.system.datascope.domain.entity.DataScopeRoleEntity; +import net.lab1024.smartadmin.service.module.system.department.DepartmentService; +import net.lab1024.smartadmin.service.module.system.employee.EmployeeDao; +import net.lab1024.smartadmin.service.module.system.employee.domain.entity.EmployeeEntity; +import net.lab1024.smartadmin.service.module.system.menu.MenuEmployeeService; +import net.lab1024.smartadmin.service.module.system.role.roleemployee.RoleEmployeeDao; +import net.lab1024.smartadmin.service.util.SmartBaseEnumUtil; import java.util.Comparator; import java.util.List; @@ -25,12 +23,7 @@ import java.util.stream.Collectors; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/28 0028 下午 15:56 - * @since JDK1.8 + * @author 罗伊 */ @Service public class DataScopeViewService { @@ -41,15 +34,14 @@ public class DataScopeViewService { @Autowired private DataScopeRoleDao dataScopeRoleDao; - @Autowired - private DepartmentTreeService departmentTreeService; - @Autowired private EmployeeDao employeeDao; @Autowired - private PrivilegeEmployeeService privilegeEmployeeService; + private DepartmentService departmentService; + @Autowired + private MenuEmployeeService menuEmployeeService; /** * 获取某人可以查看的所有人员信息 * @@ -99,8 +91,7 @@ public class DataScopeViewService { private List getDepartmentAndSubIdList(Long employeeId) { EmployeeEntity employeeEntity = employeeDao.selectById(employeeId); - List allDepartmentIds = Lists.newArrayList(); - departmentTreeService.buildIdList(employeeEntity.getDepartmentId(), allDepartmentIds); + List allDepartmentIds = departmentService.selfAndChildrenIdList(employeeEntity.getDepartmentId()); return allDepartmentIds; } @@ -115,7 +106,7 @@ public class DataScopeViewService { return DataScopeViewTypeEnum.ME; } - if (privilegeEmployeeService.isSuperman(employeeId)) { + if (menuEmployeeService.isSuperman(employeeId)) { return DataScopeViewTypeEnum.ALL; } List roleIdList = roleEmployeeDao.selectRoleIdByEmployeeId(employeeId); @@ -152,8 +143,7 @@ public class DataScopeViewService { */ private List getDepartmentEmployeeIdList(Long employeeId) { EmployeeEntity employeeEntity = employeeDao.selectById(employeeId); - List employeeList = employeeDao.getEmployeeIdByDeptId(employeeEntity.getDepartmentId()); - List employeeIdList = employeeList.stream().map(e -> e.getId()).collect(Collectors.toList()); + List employeeIdList = employeeDao.getEmployeeIdByDepartmentId(employeeEntity.getDepartmentId(),false,false); return employeeIdList; } @@ -164,11 +154,8 @@ public class DataScopeViewService { * @return */ private List getDepartmentAndSubEmployeeIdList(Long employeeId) { - EmployeeEntity employeeEntity = employeeDao.selectById(employeeId); - List allDepartmentIds = Lists.newArrayList(); - departmentTreeService.buildIdList(employeeEntity.getDepartmentId(), allDepartmentIds); - List employeeList = employeeDao.getEmployeeIdByDeptIds(allDepartmentIds); - List employeeIdList = employeeList.stream().map(e -> e.getId()).collect(Collectors.toList()); + List allDepartmentIds = getDepartmentAndSubIdList(employeeId); + List employeeIdList = employeeDao.getEmployeeIdByDepartmentIdList(allDepartmentIds,false,false); return employeeIdList; } diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/strategy/DataScopePowerStrategy.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/strategy/DataScopePowerStrategy.java new file mode 100644 index 00000000..82ec0922 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/datascope/strategy/DataScopePowerStrategy.java @@ -0,0 +1,22 @@ +package net.lab1024.smartadmin.service.module.system.datascope.strategy; + +import net.lab1024.smartadmin.service.module.system.datascope.constant.DataScopeViewTypeEnum; +import net.lab1024.smartadmin.service.module.system.datascope.domain.dto.DataScopeSqlConfigDTO; + +import java.util.Map; + +/** + * [ 数据范围策略 ,使用DataScopeWhereInTypeEnum.CUSTOM_STRATEGY类型,DataScope注解的joinSql属性无用] + * + * @author 罗伊 + */ +public abstract class DataScopePowerStrategy { + + /** + * 获取joinsql 字符串 + * @param viewTypeEnum 查看的类型 + * @param sqlConfigDTO + * @return + */ + public abstract String getCondition(DataScopeViewTypeEnum viewTypeEnum, Map paramMap, DataScopeSqlConfigDTO sqlConfigDTO); +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/DepartmentCacheService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/DepartmentCacheService.java new file mode 100644 index 00000000..b4061383 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/DepartmentCacheService.java @@ -0,0 +1,71 @@ +package net.lab1024.smartadmin.service.module.system.department; + +import lombok.extern.slf4j.Slf4j; +import net.lab1024.smartadmin.service.common.constant.CacheModuleBaseConst; +import net.lab1024.smartadmin.service.module.support.beancache.key.CacheKey; +import net.lab1024.smartadmin.service.module.support.beancache.load.CacheLoad; +import net.lab1024.smartadmin.service.module.system.department.domain.vo.DepartmentTreeVO; +import net.lab1024.smartadmin.service.module.system.department.domain.vo.DepartmentVO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @author 罗伊 + * @date 2021-01-31 0:48 + */ +@Slf4j +@Service +public class DepartmentCacheService { + + @Autowired + private DepartmentDao departmentDao; + + @Autowired + private DepartmentTreeService departmentTreeService; + + /** + * 缓存部门结构 + * cacheKey = CacheKeyConst.DEPARTMENT_TREE_CACHE + * 无businessId + * + * @return + */ + @CacheLoad(CacheModuleBaseConst.Department.DEPARTMENT_CACHE) + public List departmentCache() { + List departmentVOList = departmentDao.listAll(); + return departmentVOList; + } + + /** + * 缓存部门树结构 + * cacheKey = CacheKeyConst.DEPARTMENT_TREE_CACHE + * 无businessId + * + * @return + */ + @CacheLoad(CacheModuleBaseConst.Department.DEPARTMENT_TREE_CACHE) + public List departmentTreeCache() { + List departmentVOList = departmentDao.listAll(); + List treeList = departmentTreeService.buildTree(departmentVOList); + return treeList; + } + + /** + * 缓存某个部门的下级id列表 + * cacheKey = CacheKeyConst.DEPARTMENT_TREE_ID_CACHE + * businessId = departmentId + * + * @param cacheKey + * @return + */ + @CacheLoad(CacheModuleBaseConst.Department.DEPARTMENT_TREE_ID_CACHE) + public List departmentTreeCache(String cacheKey) { + String businessId = CacheKey.getBusinessIdByCacheKey(cacheKey); + Long departmentId = Long.valueOf(businessId); + List departmentVOList = departmentDao.listAll(); + List idList = departmentTreeService.selfAndChildrenIdList(departmentId, departmentVOList); + return idList; + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/DepartmentController.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/DepartmentController.java new file mode 100644 index 00000000..4a97233a --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/DepartmentController.java @@ -0,0 +1,105 @@ +package net.lab1024.smartadmin.service.module.system.department; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import net.lab1024.smartadmin.service.common.constant.SwaggerTagConst; +import net.lab1024.smartadmin.service.common.controller.AdminBaseController; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.system.department.domain.dto.DepartmentCreateDTO; +import net.lab1024.smartadmin.service.module.system.department.domain.dto.DepartmentUpdateDTO; +import net.lab1024.smartadmin.service.module.system.department.domain.vo.DepartmentEmployeeTreeVO; +import net.lab1024.smartadmin.service.module.system.department.domain.vo.DepartmentTreeVO; +import net.lab1024.smartadmin.service.module.system.department.domain.vo.DepartmentVO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; +import java.util.List; + +/** + * 部门管理路由器 + * + * @author listen + * @date 2017/12/19 14:29 + */ +@Api(tags = {SwaggerTagConst.Admin.MANAGER_DEPARTMENT}) +@RestController +public class DepartmentController extends AdminBaseController { + + @Autowired + private DepartmentService departmentService; + + @ApiOperation(value = "查询部门树形列表") + @GetMapping("/department/treeList") + public ResponseDTO> departmentTree() { + return departmentService.departmentTree(); + } + + @ApiOperation(value = "查询部门及员工树列表") + @GetMapping("/department/departmentEmployeeTree") + public ResponseDTO> departmentEmployeeTree() { + return departmentService.departmentEmployeeTree(); + } + + @ApiOperation(value = "根据部门名称查询部门树列表") + @GetMapping("/department/departmentTreeByName") + public ResponseDTO> departmentTreeByName(String departmentName) { + return departmentService.departmentTreeByName(departmentName); + } + + @ApiOperation(value = "添加部门") + @PostMapping("/department/add") + public ResponseDTO addDepartment(@Valid @RequestBody DepartmentCreateDTO createDTO) { + return departmentService.addDepartment(createDTO); + } + + @ApiOperation(value = "更新部门信息") + @PostMapping("/department/update") + public ResponseDTO updateDepartment(@Valid @RequestBody DepartmentUpdateDTO updateDTO) { + return departmentService.updateDepartment(updateDTO); + } + + @ApiOperation(value = "删除部门") + @GetMapping("/department/delete/{deptId}") + public ResponseDTO delDepartment(@PathVariable Long deptId) { + return departmentService.delDepartment(deptId); + } + + @ApiOperation(value = "获取部门信息") + @GetMapping("/department/query/{deptId}") + public ResponseDTO getDepartment(@PathVariable Long deptId) { + return departmentService.getDepartmentById(deptId); + } + + @ApiOperation(value = "查询部门列表") + @GetMapping("/department/listAll") + public ResponseDTO> listAll() { + return departmentService.listAll(); + } + + + @ApiOperation(value = "上下移动") + @GetMapping("/department/upOrDown/{deptId}/{swapId}") + public ResponseDTO upOrDown(@PathVariable Long deptId, @PathVariable Long swapId) { + return departmentService.upOrDown(deptId, swapId); + } + + @ApiOperation(value = "升级") + @GetMapping("/department/upgrade/{deptId}") + public ResponseDTO upgrade(@PathVariable Long deptId) { + return departmentService.upgrade(deptId); + } + + @ApiOperation(value = "降级") + @GetMapping("/department/downgrade/{deptId}/{preId}") + public ResponseDTO downgrade(@PathVariable Long deptId, @PathVariable Long preId) { + return departmentService.downgrade(deptId, preId); + } + + @ApiOperation("获取校区列表 by 善逸") + @GetMapping("/department/querySchoolList") + public ResponseDTO> querySchoolList() { + return departmentService.querySchoolList(); + } + +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/DepartmentDao.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/DepartmentDao.java similarity index 61% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/DepartmentDao.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/DepartmentDao.java index d7bc2f77..6ffd1c18 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/DepartmentDao.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/DepartmentDao.java @@ -1,11 +1,11 @@ -package net.lab1024.smartadmin.module.system.department; +package net.lab1024.smartadmin.service.module.system.department; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import net.lab1024.smartadmin.module.system.department.domain.dto.DepartmentVO; -import net.lab1024.smartadmin.module.system.department.domain.entity.DepartmentEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Component; +import net.lab1024.smartadmin.service.module.system.department.domain.entity.DepartmentEntity; +import net.lab1024.smartadmin.service.module.system.department.domain.vo.DepartmentVO; import java.util.List; @@ -30,18 +30,15 @@ public interface DepartmentDao extends BaseMapper { /** * 获取全部部门列表 * - * @return List + * @return */ List listAll(); /** - * 功能描述: 根据父部门id查询 + * 获取根据父级ID查询部门列表 * - * @param * @return - * @auther yandanyang - * @date 2018/8/25 0025 上午 9:46 */ - List selectByParentId(@Param("departmentId") Long departmentId); + List queryByParentId(@Param("parentId") Long parentId); } diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/DepartmentManager.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/DepartmentManager.java new file mode 100644 index 00000000..7588948a --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/DepartmentManager.java @@ -0,0 +1,31 @@ +package net.lab1024.smartadmin.service.module.system.department; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import net.lab1024.smartadmin.service.module.system.department.domain.entity.DepartmentEntity; + +import java.util.List; + +/** + * Description + * + * @author 善逸 + * @date 2021/8/31 17:19 + */ +@Service +public class DepartmentManager extends ServiceImpl { + + + /** + * 批量添加 编辑 + * + * @param insertDepartmentList + * @param updateDepartmentList + */ + @Transactional(rollbackFor = Exception.class) + public void batchInsertUpdate(List insertDepartmentList, List updateDepartmentList) { + saveBatch(insertDepartmentList); + updateBatchById(updateDepartmentList); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/DepartmentService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/DepartmentService.java new file mode 100644 index 00000000..7c269c39 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/DepartmentService.java @@ -0,0 +1,522 @@ +package net.lab1024.smartadmin.service.module.system.department; + +import net.lab1024.smartadmin.service.common.codeconst.ResponseCodeConst; +import net.lab1024.smartadmin.service.common.constant.CacheModuleBaseConst; +import net.lab1024.smartadmin.service.common.constant.CommonConst; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.support.beancache.cache.IBeanCache; +import net.lab1024.smartadmin.service.module.support.beancache.key.CacheKey; +import net.lab1024.smartadmin.service.module.system.department.domain.dto.DepartmentCreateDTO; +import net.lab1024.smartadmin.service.module.system.department.domain.dto.DepartmentUpdateDTO; +import net.lab1024.smartadmin.service.module.system.department.domain.entity.DepartmentEntity; +import net.lab1024.smartadmin.service.module.system.department.domain.vo.DepartmentEmployeeTreeVO; +import net.lab1024.smartadmin.service.module.system.department.domain.vo.DepartmentTreeVO; +import net.lab1024.smartadmin.service.module.system.department.domain.vo.DepartmentVO; +import net.lab1024.smartadmin.service.module.system.employee.EmployeeDao; +import net.lab1024.smartadmin.service.module.system.employee.domain.dto.EmployeeDTO; +import net.lab1024.smartadmin.service.module.system.employee.domain.entity.EmployeeEntity; +import net.lab1024.smartadmin.service.util.SmartBeanUtil; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.compress.utils.Lists; +import org.apache.commons.lang3.StringUtils; +import org.springframework.aop.framework.AopContext; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import java.util.stream.Collectors; + +/** + * 部门管理业务类 + * + * @author listen + * @date 2017/12/19 14:25 + */ +@Service +public class DepartmentService { + + @Autowired + private DepartmentDao departmentDao; + + @Autowired + private EmployeeDao employeeDao; + + @Autowired + private DepartmentTreeService departmentTreeService; + + @Autowired + protected IBeanCache beanCache; + + /** + * 获取部门树形结构 + * + * @return + */ + public ResponseDTO> departmentTree() { + String cacheKey = CacheKey.cacheKey(CacheModuleBaseConst.Department.DEPARTMENT_TREE_CACHE); + List treeVOList = beanCache.get(cacheKey); + return ResponseDTO.succData(treeVOList); + } + + /** + * 自身以及所有下级的部门id列表 + * + * @param departmentId + * @return + */ + public List selfAndChildrenIdList(Long departmentId) { + String cacheKey = CacheKey.cacheKey(CacheModuleBaseConst.Department.DEPARTMENT_TREE_ID_CACHE, departmentId.toString()); + return beanCache.get(cacheKey); + } + + /** + * 部门员工树 + * + * @return + */ + public ResponseDTO> departmentEmployeeTree() { + String cacheKey = CacheKey.cacheKey(CacheModuleBaseConst.Department.DEPARTMENT_TREE_CACHE); + List treeVOList = beanCache.get(cacheKey); + if (CollectionUtils.isEmpty(treeVOList)) { + return ResponseDTO.succData(Lists.newArrayList()); + } + // 获取全部员工列表 + List employeeList = employeeDao.listAll(); + if (CollectionUtils.isEmpty(employeeList)) { + return ResponseDTO.succData(SmartBeanUtil.copyList(treeVOList, DepartmentEmployeeTreeVO.class)); + } + Map> employeeMap = employeeList.stream().collect(Collectors.groupingBy(EmployeeDTO::getDepartmentId)); + //构建各部门的员工信息 + List departmentEmployeeTreeVOList = this.buildTreeEmployee(treeVOList, employeeMap); + + return ResponseDTO.succData(departmentEmployeeTreeVOList); + } + + /** + * 递归构建每部门的员工信息 + * + * @param treeVOList + * @param employeeMap + * @return + */ + private List buildTreeEmployee(List treeVOList, Map> employeeMap) { + List departmentEmployeeTreeVOList = Lists.newArrayList(); + for (DepartmentTreeVO departmentTreeVO : treeVOList) { + DepartmentEmployeeTreeVO departmentEmployeeTreeVO = SmartBeanUtil.copy(departmentTreeVO, DepartmentEmployeeTreeVO.class); + departmentEmployeeTreeVO.setEmployees(employeeMap.getOrDefault(departmentEmployeeTreeVO.getId(), Lists.newArrayList())); + List children = departmentTreeVO.getChildren(); + if (CollectionUtils.isEmpty(children)) { + continue; + } + List childrenList = this.buildTreeEmployee(children, employeeMap); + departmentEmployeeTreeVO.setChildren(childrenList); + departmentEmployeeTreeVOList.add(departmentEmployeeTreeVO); + } + return departmentEmployeeTreeVOList; + } + + /** + * 获取所有部门和员工信息 + * + * @param departmentName + * @return + */ + public ResponseDTO> departmentTreeByName(String departmentName) { + // 获取全部部门列表 + List departmentVOList = departmentDao.listAll(); + if (StringUtils.isNotBlank(departmentName)) { + // 检索条件不为空的时候 过滤部门列表 + departmentVOList = this.filterDepartment(departmentVOList, departmentName); + } + List result = departmentTreeService.buildTree(departmentVOList); + return ResponseDTO.succData(result); + } + + /** + * 过滤部门名称,获取过滤后的结果 + * + * @author 开云 + * @date 2019/4/28 20:17 + */ + private List filterDepartment(List departmentVOList, String departmentName) { + Map departmentMap = new HashMap<>(departmentVOList.size()); + departmentVOList.forEach(item -> { + if (!item.getName().contains(departmentName)) { + return; + } + // 当前部门包含关键字 + departmentMap.put(item.getId(), item); + Long parentId = item.getParentId(); + if (null != parentId) { + List filterResult = new ArrayList<>(); + getParentDepartment(departmentVOList, parentId, filterResult); + for (DepartmentVO dto : filterResult) { + if (!departmentMap.containsKey(dto.getId())) { + departmentMap.put(dto.getId(), dto); + } + } + } + }); + return new ArrayList<>(departmentMap.values()); + } + + /** + * 递归获取部门的所有上级元素 + * + * @param departmentVOList + * @param parentId + * @param result + * @return + */ + private List getParentDepartment(List departmentVOList, Long parentId, List result) { + List deptList = departmentVOList.stream().filter(e -> e.getId().equals(parentId)).collect(Collectors.toList()); + for (DepartmentVO item : deptList) { + result.add(item); + if (item.getParentId() != CommonConst.DEFAULT_PARENT_ID && item.getParentId() != null) { + result.addAll(getParentDepartment(departmentVOList, item.getParentId(), result)); + } + } + return result; + } + + /** + * 新增添加部门 + * + * @param departmentCreateDTO + * @return AjaxResult + */ + + public ResponseDTO addDepartment(DepartmentCreateDTO departmentCreateDTO) { + DepartmentEntity departmentEntity = SmartBeanUtil.copy(departmentCreateDTO, DepartmentEntity.class); + departmentEntity.setSort(0L); + DepartmentService departmentService = (DepartmentService) AopContext.currentProxy(); + departmentService.addDepartmentHandle(departmentEntity); + this.clearTreeCache(); + this.clearSelfAndChildrenIdCache(); + return ResponseDTO.succ(); + } + + /** + * 新增部门数据处理 + * + * @param departmentEntity + */ + @Transactional(rollbackFor = Exception.class) + public void addDepartmentHandle(DepartmentEntity departmentEntity) { + departmentDao.insert(departmentEntity); + DepartmentEntity updateSortEntity = new DepartmentEntity(); + updateSortEntity.setId(departmentEntity.getId()); + updateSortEntity.setSort(departmentEntity.getId()); + departmentDao.updateById(updateSortEntity); + } + + /** + * 更新部门信息 + * + * @param updateDTO + * @return + */ + public ResponseDTO updateDepartment(DepartmentUpdateDTO updateDTO) { + if (updateDTO.getParentId() == null) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "父级部门id不能为空"); + } + DepartmentEntity entity = departmentDao.selectById(updateDTO.getId()); + if (entity == null) { + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); + } + DepartmentEntity departmentEntity = SmartBeanUtil.copy(updateDTO, DepartmentEntity.class); + departmentEntity.setSort(entity.getSort()); + departmentDao.updateById(departmentEntity); + this.clearTreeCache(); + return ResponseDTO.succ(); + } + + /** + * 根据id删除部门 + * 1、需要判断当前部门是否有子部门,有子部门则不允许删除 + * 2、需要判断当前部门是否有员工,有员工则不能删除 + * + * @param deptId + * @return + */ + public ResponseDTO delDepartment(Long deptId) { + DepartmentEntity departmentEntity = departmentDao.selectById(deptId); + if (null == departmentEntity) { + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); + } + // 是否有子级部门 + int subDepartmentNum = departmentDao.countSubDepartment(deptId); + if (subDepartmentNum > 0) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "请先删除子级部门"); + } + + // 是否有未删除员工 + int employeeNum = employeeDao.countByDepartmentId(deptId, false); + if (employeeNum > 0) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "请先删除部门员工"); + } + departmentDao.deleteById(deptId); + // 清除缓存 + this.clearTreeCache(); + this.clearSelfAndChildrenIdCache(); + return ResponseDTO.succ(); + } + + /** + * 根据id获取部门信息 + * + * @param departmentId + * @return + */ + public ResponseDTO getDepartmentById(Long departmentId) { + DepartmentEntity departmentEntity = departmentDao.selectById(departmentId); + if (departmentEntity == null) { + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); + } + DepartmentVO departmentVO = SmartBeanUtil.copy(departmentEntity, DepartmentVO.class); + return ResponseDTO.succData(departmentVO); + } + + /** + * 获取所有部门 + * + * @return + */ + public ResponseDTO> listAll() { + List departmentVOList = departmentDao.listAll(); + return ResponseDTO.succData(departmentVOList); + } + + /** + * 上下移动 + * + * @param departmentId + * @param swapId + * @return + */ + public ResponseDTO upOrDown(Long departmentId, Long swapId) { + DepartmentEntity departmentEntity = departmentDao.selectById(departmentId); + if (departmentEntity == null) { + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); + } + DepartmentEntity swapEntity = departmentDao.selectById(swapId); + if (swapEntity == null) { + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); + } + DepartmentEntity updateEntity = new DepartmentEntity(); + updateEntity.setId(departmentId); + updateEntity.setSort(swapEntity.getSort()); + + DepartmentEntity swapUpdateEntity = new DepartmentEntity(); + swapUpdateEntity.setId(swapEntity.getId()); + swapUpdateEntity.setSort(departmentEntity.getSort()); + DepartmentService departmentService = (DepartmentService) AopContext.currentProxy(); + departmentService.upOrDownUpdate(updateEntity, swapEntity); + //清除缓存 + this.clearTreeCache(); + return ResponseDTO.succ(); + } + + /** + * 上下移动数据库处理 + * + * @param departmentEntity + * @param swapEntity + */ + @Transactional(rollbackFor = Exception.class) + public void upOrDownUpdate(DepartmentEntity departmentEntity, DepartmentEntity swapEntity) { + departmentDao.updateById(departmentEntity); + departmentDao.updateById(swapEntity); + } + + /** + * 部门升级 + * + * @param departmentId + * @return + */ + public ResponseDTO upgrade(Long departmentId) { + DepartmentEntity departmentEntity = departmentDao.selectById(departmentId); + if (departmentEntity == null) { + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); + } + if (departmentEntity.getParentId() == null || departmentEntity.getParentId().equals(CommonConst.DEFAULT_PARENT_ID)) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "此部门已经是根节点无法移动"); + } + DepartmentEntity parentEntity = departmentDao.selectById(departmentEntity.getParentId()); + + DepartmentEntity updateEntity = new DepartmentEntity(); + updateEntity.setId(departmentId); + updateEntity.setParentId(parentEntity.getParentId()); + departmentDao.updateById(updateEntity); + //清除缓存 + this.clearTreeCache(); + return ResponseDTO.succ(); + } + + /** + * 部门降级 + * + * @param departmentId + * @param preId + * @return + */ + public ResponseDTO downgrade(Long departmentId, Long preId) { + DepartmentEntity departmentEntity = departmentDao.selectById(departmentId); + if (departmentEntity == null) { + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); + } + DepartmentEntity preEntity = departmentDao.selectById(preId); + if (preEntity == null) { + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); + } + DepartmentEntity updateEntity = new DepartmentEntity(); + updateEntity.setId(departmentId); + updateEntity.setParentId(preEntity.getId()); + departmentDao.updateById(updateEntity); + //清除缓存 + this.clearTreeCache(); + return ResponseDTO.succ(); + } + + + /** + * 清除自身以及下级的id列表缓存 + */ + private void clearSelfAndChildrenIdCache() { + beanCache.removeByModule(CacheModuleBaseConst.Department.DEPARTMENT_TREE_ID_CACHE); + } + + /** + * 清除树结构缓存 + */ + private void clearTreeCache() { + String treeCacheKey = CacheKey.cacheKey(CacheModuleBaseConst.Department.DEPARTMENT_TREE_CACHE); + beanCache.remove(treeCacheKey); + } + + /** + * 获取最顶级部门id + * + * @return + */ + public Long queryTopDeptId() { + ResponseDTO> departmentTree = departmentTree(); + List data = departmentTree.getData(); + return data.get(0).getId(); + } + + /** + * 获取校区列表 即第二级部门列表 + * + * @return + */ + public ResponseDTO> querySchoolList() { + ResponseDTO> res = departmentTree(); + if (!res.isSuccess()) { + return ResponseDTO.wrap(res); + } + List data = res.getData(); + // 拿到第二级部门列表 + List resList = Lists.newArrayList(); + for (DepartmentTreeVO tree : data) { + List children = tree.getChildren(); + if (!CollectionUtils.isEmpty(children)) { + resList.addAll(SmartBeanUtil.copyList(children, DepartmentVO.class)); + } + } + return ResponseDTO.succData(resList); + } + + /** + * 根据部门ID获取父级名称 + * + * @param departmentId + * @return + */ + public String getParentNameTreeByDepartmentId(Long departmentId) { + String cacheKey = CacheKey.cacheKey(CacheModuleBaseConst.Department.DEPARTMENT_CACHE); + List departmentList = beanCache.get(cacheKey); + //递归寻找上级直到校区(第二级) + List departmentNameList = Lists.newArrayList(); + this.recursionFindParentDepartmentName(departmentNameList, departmentList, departmentId); + return StringUtils.join(departmentNameList, "/"); + } + + /** + * 递归查询父级部门名称 到校区(第二级) + * + * @param departmentNameList + * @param departmentList + * @param departmentId + */ + private void recursionFindParentDepartmentName(List departmentNameList, List departmentList, Long departmentId) { + Optional findRes = departmentList.stream().filter(e -> e.getId().equals(departmentId)).findFirst(); + if (!findRes.isPresent() || findRes.get().getParentId() == CommonConst.DEFAULT_PARENT_ID) { + return; + } + DepartmentVO departmentVO = findRes.get(); + departmentNameList.add(0, departmentVO.getName()); + this.recursionFindParentDepartmentName(departmentNameList, departmentList, departmentVO.getParentId()); + } + + /** + * 寻找员工所属校区 + * + * @param employeeId + * @return + */ + public Long getSchoolIdByEmployeeId(Long employeeId) { + String cacheKey = CacheKey.cacheKey(CacheModuleBaseConst.Employee.SINGLE_EMPLOYEE_CACHE, employeeId.toString()); + EmployeeEntity employeeEntity = beanCache.get(cacheKey); + Long departmentId = employeeEntity.getDepartmentId(); + DepartmentVO schoolIdByDepartment = this.getSchoolIdByDepartment(departmentId); + if (schoolIdByDepartment != null) { + return schoolIdByDepartment.getId(); + } + return null; + } + + /** + * 寻找部门所属校区 + * + * @param departmentId + * @return + */ + public DepartmentVO getSchoolIdByDepartment(Long departmentId) { + String cacheKey = CacheKey.cacheKey(CacheModuleBaseConst.Department.DEPARTMENT_CACHE); + List departmentList = beanCache.get(cacheKey); + //递归寻找校区(第二级) + return this.recursionFindSchoolDepartmentId(departmentList, departmentId); + } + + /** + * 寻找校区ID + * + * @param departmentList + * @param departmentId + * @return + */ + private DepartmentVO recursionFindSchoolDepartmentId(List departmentList, Long departmentId) { + Optional findRes = departmentList.stream().filter(e -> e.getId().equals(departmentId)).findFirst(); + // 如果查询不到 或者自己本身为最顶级 返回null + if (!findRes.isPresent() || findRes.get().getParentId() == CommonConst.DEFAULT_PARENT_ID) { + return null; + } + DepartmentVO departmentVO = findRes.get(); + // 寻找父级 判断父级的父级是不是最顶级 + Optional parentFindRes = departmentList.stream().filter(e -> e.getId().equals(departmentVO.getParentId())).findFirst(); + // 若找不到父级则返回null + if (!parentFindRes.isPresent()) { + return null; + } + // 若父级为最顶级 则返回本级ID + if (parentFindRes.get().getParentId() == CommonConst.DEFAULT_PARENT_ID) { + return departmentVO; + } + // 若父级不为最顶级 进入递归 + return this.recursionFindSchoolDepartmentId(departmentList, departmentVO.getParentId()); + } + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/DepartmentTreeService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/DepartmentTreeService.java new file mode 100644 index 00000000..f7e59247 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/DepartmentTreeService.java @@ -0,0 +1,137 @@ +package net.lab1024.smartadmin.service.module.system.department; + +import com.google.common.collect.Lists; +import net.lab1024.smartadmin.service.common.constant.CommonConst; +import net.lab1024.smartadmin.service.module.system.department.domain.vo.DepartmentTreeVO; +import net.lab1024.smartadmin.service.module.system.department.domain.vo.DepartmentVO; +import net.lab1024.smartadmin.service.util.SmartBeanUtil; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * [ ] + * + * @author 罗伊 + */ +@Service +public class DepartmentTreeService { + + /** + * 构建部门树结构 + * + * @param voList + * @return + */ + public List buildTree(List voList) { + if (CollectionUtils.isEmpty(voList)) { + return Lists.newArrayList(); + } + List rootList = voList.stream().filter(e -> e.getParentId() == null || e.getParentId() == CommonConst.DEFAULT_PARENT_ID).collect(Collectors.toList()); + if (CollectionUtils.isEmpty(rootList)) { + return Lists.newArrayList(); + } + List treeVOList = SmartBeanUtil.copyList(rootList, DepartmentTreeVO.class); + this.buildTree(treeVOList, voList); + return treeVOList; + } + + /** + * 构建所有根节点的下级树形结构 + * + * @param nodeList + * @param voList + */ + private void buildTree(List nodeList, List voList) { + int nodeSize = nodeList.size(); + for (int i = 0; i < nodeSize; i++) { + int preIndex = i - 1; + int nextIndex = i + 1; + DepartmentTreeVO node = nodeList.get(i); + if (preIndex > -1) { + node.setPreId(nodeList.get(preIndex).getId()); + } + if (nextIndex < nodeSize) { + node.setNextId(nodeList.get(nextIndex).getId()); + } + buildTree(node, voList); + } + } + + /** + * 构建子元素的下级 + * + * @param node + * @param voList + */ + private void buildTree(DepartmentTreeVO node, List voList) { + List children = getChildren(node.getId(), voList); + if (CollectionUtils.isNotEmpty(children)) { + node.setChildren(children); + this.buildTree(children, voList); + } + } + + /** + * 获取子元素 + * + * @param departmentId + * @param voList + * @return + */ + private List getChildren(Long departmentId, List voList) { + List childrenEntityList = voList.stream().filter(e -> departmentId.equals(e.getParentId())).collect(Collectors.toList()); + if (CollectionUtils.isEmpty(childrenEntityList)) { + return Lists.newArrayList(); + } + return SmartBeanUtil.copyList(childrenEntityList, DepartmentTreeVO.class); + } + + + /** + * 通过部门id,获取当前以及下属部门 + * + * @param departmentId + * @param voList + */ + public List selfAndChildrenIdList(Long departmentId, List voList) { + List selfAndChildrenIdList = Lists.newArrayList(); + if (CollectionUtils.isEmpty(voList)) { + return selfAndChildrenIdList; + } + selfAndChildrenIdList.add(departmentId); + List children = this.getChildren(departmentId, voList); + if (CollectionUtils.isEmpty(children)) { + return selfAndChildrenIdList; + } + List childrenIdList = children.stream().map(DepartmentTreeVO::getId).collect(Collectors.toList()); + selfAndChildrenIdList.addAll(childrenIdList); + for (Long childId : childrenIdList) { + this.selfAndChildrenRecursion(selfAndChildrenIdList, childId, voList); + } + return selfAndChildrenIdList; + } + + /** + * 递归查询 + * + * @param selfAndChildrenIdList + * @param departmentId + * @param voList + */ + public void selfAndChildrenRecursion(List selfAndChildrenIdList, Long departmentId, List voList) { + List children = this.getChildren(departmentId, voList); + if (CollectionUtils.isEmpty(children)) { + return; + } + List childrenIdList = children.stream().map(DepartmentTreeVO::getId).collect(Collectors.toList()); + selfAndChildrenIdList.addAll(childrenIdList); + for (Long childId : childrenIdList) { + this.selfAndChildrenRecursion(selfAndChildrenIdList, childId, voList); + } + } + + +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/domain/dto/DepartmentCreateDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/domain/dto/DepartmentCreateDTO.java similarity index 75% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/domain/dto/DepartmentCreateDTO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/domain/dto/DepartmentCreateDTO.java index 3e80003c..d5b422e1 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/domain/dto/DepartmentCreateDTO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/domain/dto/DepartmentCreateDTO.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.module.system.department.domain.dto; +package net.lab1024.smartadmin.service.module.system.department.domain.dto; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -9,18 +9,12 @@ import javax.validation.constraints.NotNull; /** * * [ ] - * - * @version 1.0 - * @since JDK1.8 - * @author yandanyang - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date + * + * @author 罗伊 */ @Data public class DepartmentCreateDTO { - - + @ApiModelProperty("部门名称") @Length(min = 1, max = 50, message = "请输入正确的部门名称(1-50个字符)") @NotNull(message = "请输入正确的部门名称(1-50个字符)") diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/domain/dto/DepartmentUpdateDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/domain/dto/DepartmentUpdateDTO.java similarity index 58% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/domain/dto/DepartmentUpdateDTO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/domain/dto/DepartmentUpdateDTO.java index f1b108a8..1914508a 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/domain/dto/DepartmentUpdateDTO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/domain/dto/DepartmentUpdateDTO.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.module.system.department.domain.dto; +package net.lab1024.smartadmin.service.module.system.department.domain.dto; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -8,12 +8,7 @@ import javax.validation.constraints.NotNull; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 + * @author 罗伊 */ @Data public class DepartmentUpdateDTO extends DepartmentCreateDTO { diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/domain/entity/DepartmentEntity.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/domain/entity/DepartmentEntity.java new file mode 100644 index 00000000..3452d2fa --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/domain/entity/DepartmentEntity.java @@ -0,0 +1,70 @@ +package net.lab1024.smartadmin.service.module.system.department.domain.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * 部门实体类 + * t_department 数据表 + * + * @author listen + * @date 2017/12/19 10:45 + */ +@Data +@TableName(value = "t_department") +public class DepartmentEntity { + + /** + * 主键id + */ + @TableId(type = IdType.AUTO) + private Long id; + + /** + * 部门名称 + */ + private String name; + + /** + * 部门简称 + */ + private String shortName; + + /** + * 负责人员工 id + */ + private Long managerId; + + /** + * 部门父级id + */ + private Long parentId; + + /** + * 排序 + */ + private Long sort; + + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + + /** + * 导入标识 + */ + private Boolean importFlag; + + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/domain/vo/DepartmentEmployeeTreeVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/domain/vo/DepartmentEmployeeTreeVO.java new file mode 100644 index 00000000..ee2f0bc9 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/domain/vo/DepartmentEmployeeTreeVO.java @@ -0,0 +1,22 @@ +package net.lab1024.smartadmin.service.module.system.department.domain.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import net.lab1024.smartadmin.service.module.system.employee.domain.dto.EmployeeDTO; + +import java.util.List; + +/** + * @author 罗伊 + * @date 2021-01-30 23:57 + */ +@Data +public class DepartmentEmployeeTreeVO extends DepartmentVO { + + @ApiModelProperty("部门员工列表") + private List employees; + + @ApiModelProperty("子部门") + private List children; + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/domain/vo/DepartmentTreeVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/domain/vo/DepartmentTreeVO.java new file mode 100644 index 00000000..c4183866 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/domain/vo/DepartmentTreeVO.java @@ -0,0 +1,18 @@ +package net.lab1024.smartadmin.service.module.system.department.domain.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author 罗伊 + * @date 2021-01-30 23:57 + */ +@Data +public class DepartmentTreeVO extends DepartmentVO { + + @ApiModelProperty("子部门") + private List children; + +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/domain/dto/DepartmentVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/domain/vo/DepartmentVO.java similarity index 57% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/domain/dto/DepartmentVO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/domain/vo/DepartmentVO.java index 067e174d..84b204fe 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/domain/dto/DepartmentVO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/department/domain/vo/DepartmentVO.java @@ -1,13 +1,12 @@ -package net.lab1024.smartadmin.module.system.department.domain.dto; +package net.lab1024.smartadmin.service.module.system.department.domain.vo; -import com.fasterxml.jackson.annotation.JsonProperty; -import net.lab1024.smartadmin.module.system.employee.domain.dto.EmployeeDTO; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -import java.util.Date; -import java.util.List; - +/** + * @author 罗伊 + * @date 2021-01-30 23:57 + */ @Data public class DepartmentVO { @@ -26,10 +25,6 @@ public class DepartmentVO { @ApiModelProperty("部门负责人id") private Long managerId; - @ApiModelProperty("子部门") - @JsonProperty("children") - private List childrenDepartment; - @ApiModelProperty("父级部门id") private Long parentId; @@ -45,14 +40,4 @@ public class DepartmentVO { @ApiModelProperty("父级部门名称") private String parentName; - @ApiModelProperty("部门员工列表") - private List employees; - - @ApiModelProperty("上次更新时间") - private Date updateTime; - - @ApiModelProperty("创建时间") - private Date createTime; - - } diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/EmployeeCacheService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/EmployeeCacheService.java new file mode 100644 index 00000000..2e233d9c --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/EmployeeCacheService.java @@ -0,0 +1,81 @@ +package net.lab1024.smartadmin.service.module.system.employee; + +import lombok.extern.slf4j.Slf4j; +import net.lab1024.smartadmin.service.common.constant.CacheModuleBaseConst; +import net.lab1024.smartadmin.service.module.support.beancache.key.CacheKey; +import net.lab1024.smartadmin.service.module.support.beancache.load.CacheLoad; +import net.lab1024.smartadmin.service.module.system.employee.domain.entity.EmployeeEntity; +import net.lab1024.smartadmin.service.module.system.role.roleemployee.RoleEmployeeDao; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.compress.utils.Lists; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @author 罗伊 + * @date 2021-01-30 23:57 + */ +@Slf4j +@Service +public class EmployeeCacheService { + + @Autowired + private EmployeeDao employeeDao; + @Autowired + private RoleEmployeeDao roleEmployeeDao; + + /** + * 缓存某个部门下的员工 + * cacheKey = CacheKeyConst.Employee + * businessId = departmentId + * + * @param cacheKey + * @return + */ + @CacheLoad(CacheModuleBaseConst.Employee.DEPARTMENT_EMPLOYEE_CACHE) + public List departmentEmployeeCache(String cacheKey) { + String businessId = CacheKey.getBusinessIdByCacheKey(cacheKey); + Long departmentId = Long.valueOf(businessId); + List employeeEntityList = employeeDao.selectByDepartmentId(departmentId, false, false); + return employeeEntityList; + } + + /** + * 单个员工的缓存 + * + * @param cacheKey + * @return + */ + @CacheLoad(CacheModuleBaseConst.Employee.SINGLE_EMPLOYEE_CACHE) + public EmployeeEntity singleEmployeeCache(String cacheKey) { + String businessId = CacheKey.getBusinessIdByCacheKey(cacheKey); + Long employeeId = Long.valueOf(businessId); + EmployeeEntity employeeEntity = employeeDao.selectById(employeeId); + if (null == employeeEntity) { + return null; + } + if (employeeEntity.getDeletedFlag()) { + return null; + } + return employeeEntity; + } + + /** + * 单个员工的缓存 + * + * @param cacheKey + * @return + */ + @CacheLoad(CacheModuleBaseConst.Employee.SINGLE_EMPLOYEE_ROLE_CACHE) + public List singleEmployeeRoleCache(String cacheKey) { + String businessId = CacheKey.getBusinessIdByCacheKey(cacheKey); + Long employeeId = Long.valueOf(businessId); + List roleIdList = roleEmployeeDao.selectRoleIdByEmployeeId(employeeId); + if (CollectionUtils.isEmpty(roleIdList)) { + return Lists.newArrayList(); + } + return roleIdList; + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/EmployeeController.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/EmployeeController.java new file mode 100644 index 00000000..d4f1c2ed --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/EmployeeController.java @@ -0,0 +1,118 @@ +package net.lab1024.smartadmin.service.module.system.employee; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import net.lab1024.smartadmin.service.common.constant.SwaggerTagConst; +import net.lab1024.smartadmin.service.common.controller.AdminBaseController; +import net.lab1024.smartadmin.service.common.domain.PageResultDTO; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.system.employee.domain.dto.*; +import net.lab1024.smartadmin.service.module.system.employee.domain.vo.EmployeeVO; +import net.lab1024.smartadmin.service.util.SmartEmployeeTokenUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; +import java.util.List; + +/** + * 员工管理 + * + * @author 开云 + * @date 2017年12月19日上午11:34:52 + */ +@RestController +@Api(tags = {SwaggerTagConst.Admin.MANAGER_EMPLOYEE}) +public class EmployeeController extends AdminBaseController { + + @Autowired + private EmployeeService employeeService; + + @PostMapping("/employee/query") + @ApiOperation(value = "员工管理查询", notes = "员工管理查询 @author 开云") + public ResponseDTO> query(@Valid @RequestBody EmployeeQueryDTO query) { + return employeeService.queryEmployeeList(query); + } + + @ApiOperation(value = "添加员工", notes = "@author 罗伊") + @PostMapping("/employee/add") + public ResponseDTO addEmployee(@Valid @RequestBody EmployeeAddDTO addDTO) { + addDTO.setUpdateId(SmartEmployeeTokenUtil.getRequestEmployeeId()); + return employeeService.addEmployee(addDTO); + } + + @ApiOperation(value = "更新员工禁用状态", notes = "@author 罗伊") + @GetMapping("/employee/update/disabled/{employeeId}") + public ResponseDTO updateDisableFlag(@PathVariable Long employeeId) { + return employeeService.updateDisableFlag(employeeId); + } + + @ApiOperation(value = "批量更新员工禁用状态", notes = "@author 罗伊") + @PostMapping("/employee/update/batch/disabled") + public ResponseDTO batchUpdateDisableFlag(@Valid @RequestBody EmployeeDisabledUpdateDTO updateDTO) { + return employeeService.batchUpdateDisableFlag(updateDTO); + } + + @ApiOperation(value = "更新员工信息", notes = "@author 罗伊") + @PostMapping("/employee/update") + public ResponseDTO updateEmployee(@Valid @RequestBody EmployeeUpdateDTO updateDTO) { + updateDTO.setUpdateId(SmartEmployeeTokenUtil.getRequestEmployeeId()); + return employeeService.updateEmployee(updateDTO); + } + + @ApiOperation(value = "删除员工", notes = "@author 罗伊") + @GetMapping("/employee/delete/{employeeId}") + public ResponseDTO deleteEmployeeById(@PathVariable Long employeeId) { + return employeeService.deleteEmployeeById(employeeId); + } + + @ApiOperation(value = "批量删除员工", notes = "@author 善逸") + @GetMapping("/employee/update/batch/delete") + public ResponseDTO batchUpdateDeleteFlag(@RequestParam("employeeIdList")List employeeIdList) { + return employeeService.batchUpdateDeleteFlag(employeeIdList); + } + + @ApiOperation(value = "批量调整员工部门", notes = "@author 善逸") + @PostMapping("/employee/update/batch/department") + public ResponseDTO batchUpdateDepartment(@Valid @RequestBody EmployeeDepartmentUpdateDTO updateDto) { + return employeeService.batchUpdateDepartment(updateDto); + } + + @ApiOperation(value = "单个员工角色授权", notes = "@author 罗伊") + @PostMapping("/employee/update/roles") + public ResponseDTO updateRoles(@Valid @RequestBody EmployeeRoleUpdateDTO updateRolesDTO) { + return employeeService.updateRole(updateRolesDTO); + } + + @ApiOperation(value = "修改密码", notes = "@author 罗伊") + @PostMapping("/employee/update/pwd") + public ResponseDTO updatePwd(@Valid @RequestBody EmployeeUpdatePwdDTO updatePwdDTO) { + updatePwdDTO.setEmployeeId(SmartEmployeeTokenUtil.getRequestEmployeeId()); + return employeeService.updatePwd(updatePwdDTO); + } + + @ApiOperation(value = "查询员工-根据部门id", notes = "@author 罗伊") + @GetMapping("/employee/query/dept/{deptId}") + public ResponseDTO> listByDepartmentId(@PathVariable Long deptId) { + return employeeService.getEmployeeByDeptId(deptId); + } + + @ApiOperation("查询所有员工 by 善逸") + @GetMapping("/employee/queryAll") + public ResponseDTO> queryAllEmploy(@RequestParam(value = "disabledFlag", required = false) Boolean disabledFlag) { + return employeeService.queryAllEmploy(disabledFlag); + } + + @ApiOperation(value = "重置员工密码", notes = "@author 罗伊") + @GetMapping("/employee/update/pwd/reset/{employeeId}") + public ResponseDTO resetPassword(@PathVariable Integer employeeId) { + return employeeService.resetPassword(employeeId); + } + + @ApiOperation(value = "查询员工-根据校区id", notes = "@author 善逸") + @GetMapping("/employee/query/school/{deptId}") + public ResponseDTO> listBySchoolId(@PathVariable Long deptId) { + return employeeService.getEmployeeBySchoolId(deptId); + } + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/EmployeeDao.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/EmployeeDao.java new file mode 100644 index 00000000..913e2af8 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/EmployeeDao.java @@ -0,0 +1,169 @@ +package net.lab1024.smartadmin.service.module.system.employee; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; +import net.lab1024.smartadmin.service.module.system.employee.domain.dto.EmployeeDTO; +import net.lab1024.smartadmin.service.module.system.employee.domain.dto.EmployeeQueryDTO; +import net.lab1024.smartadmin.service.module.system.employee.domain.entity.EmployeeEntity; +import net.lab1024.smartadmin.service.module.system.employee.domain.vo.EmployeeVO; + +import java.util.Collection; +import java.util.List; + +/** + * 员工dao接口 + * + * @author 开云 + * @date 2017年12月19日下午1:36:30 + */ +@Mapper +@Component +public interface EmployeeDao extends BaseMapper { + /** + * 查询员工列表 + * + * @param page + * @param queryDTO + * @return + */ + List queryEmployee(Page page, @Param("queryDTO") EmployeeQueryDTO queryDTO); + + /** + * 查询员工列表 + * + * @param queryDTO + * @return + */ + List queryEmployee(@Param("queryDTO") EmployeeQueryDTO queryDTO); + + /** + * 批量更新禁用状态 + * + * @param employeeIdList + * @param disabledFlag + */ + void batchUpdateDisableFlag(@Param("employeeIdList") List employeeIdList, + @Param("disabledFlag") Boolean disabledFlag); + + /** + * 更新单个 + * + * @param id + * @param disabledFlag + */ + void updateDisableFlag(@Param("id") Long id, @Param("disabledFlag") Boolean disabledFlag); + + /** + * 根据 账号 密码 查询 + * + * @param loginName + * @param loginPwd + * @param deletedFlag + * @return + */ + EmployeeEntity selectByLoginNameAndPwd(@Param("loginName") String loginName, + @Param("loginPwd") String loginPwd, + @Param("deletedFlag") Boolean deletedFlag); + + /** + * 通过登录名查询 + * + * @param loginName + * @param disabledFlag + * @return + */ + EmployeeDTO getByLoginName(@Param("loginName") String loginName, + @Param("disabledFlag") Boolean disabledFlag, + @Param("deletedFlag") Boolean deletedFlag); + + /** + * 通过手机号查询 + * + * @param phone + * @param disabledFlag + * @return + */ + EmployeeDTO getByPhone(@Param("phone") String phone, @Param("disabledFlag") Boolean disabledFlag); + + /** + * 获取所有员工 + * + * @return + */ + List listAll(); + + /** + * 获取某个部门员工数 + * + * @param departmentId + * @param deletedFlag 可以null + * @return + */ + Integer countByDepartmentId(@Param("departmentId") Long departmentId, @Param("deletedFlag") Boolean deletedFlag); + + /** + * 获取一批员工 + * + * @param employeeIds + * @return + */ + List getEmployeeByIds(@Param("ids") Collection employeeIds); + + + /** + * 查询单个员工信息 + * + * @param employeeId + * @return + */ + EmployeeDTO getEmployeeById(@Param("id") Long employeeId); + + + /** + * 获取某个部门的员工 + * + * @param departmentId + * @param disabledFlag + * @param deletedFlag + * @return + */ + List selectByDepartmentId(@Param("departmentId") Long departmentId, @Param("disabledFlag") Boolean disabledFlag, @Param("deletedFlag") Boolean deletedFlag); + + /** + * 获取某批部门的员工Id + * + * @param departmentIds + * @return + */ + List getEmployeeIdByDepartmentIdList(@Param("departmentIds") List departmentIds, @Param("disabledFlag") Boolean disabledFlag, @Param("deletedFlag") Boolean deletedFlag); + + /** + * 获取所有 + * @param disabledFlag + * @param deletedFlag + * @return + */ + List getEmployeeId( @Param("disabledFlag") Boolean disabledFlag, @Param("deletedFlag") Boolean deletedFlag); + + /** + * 获取某个部门的员工Id + * @param departmentId + * @param disabledFlag + * @param deletedFlag + * @return + */ + List getEmployeeIdByDepartmentId(@Param("departmentId") Long departmentId, @Param("disabledFlag") Boolean disabledFlag, @Param("deletedFlag") Boolean deletedFlag); + + /** + * 员工重置密码 + * + * @param employeeId + * @param password + * @return + */ + Integer updatePassword(@Param("employeeId") Integer employeeId, @Param("password") String password); + +} \ No newline at end of file diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/EmployeeManager.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/EmployeeManager.java new file mode 100644 index 00000000..b3c060e0 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/EmployeeManager.java @@ -0,0 +1,78 @@ +package net.lab1024.smartadmin.service.module.system.employee; + + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import net.lab1024.smartadmin.service.module.system.employee.domain.entity.EmployeeEntity; +import net.lab1024.smartadmin.service.module.system.role.roleemployee.RoleEmployeeManager; +import net.lab1024.smartadmin.service.module.system.role.roleemployee.domain.RoleEmployeeEntity; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * 员工 manager + * + * @author 胡克 + * @date 2021/7/28 19:15 + */ +@Service +public class EmployeeManager extends ServiceImpl { + + @Autowired + private EmployeeDao employeeDao; + + @Autowired + private RoleEmployeeManager roleEmployeeManager; + + /** + * 保存员工 + * + * @param employee + */ + @Transactional(rollbackFor = Throwable.class) + public void saveEmployee(EmployeeEntity employee, List roleIdList) { + // 保存员工 获得id + employeeDao.insert(employee); + + if (CollectionUtils.isNotEmpty(roleIdList)) { + List roleEmployeeList = roleIdList.stream().map(e -> new RoleEmployeeEntity(e, employee.getId())).collect(Collectors.toList()); + roleEmployeeManager.saveBatch(roleEmployeeList); + } + } + + /** + * 更新员工 + * + * @param employee + */ + @Transactional(rollbackFor = Throwable.class) + public void updateEmployee(EmployeeEntity employee, List roleIdList) { + // 保存员工 获得id + employeeDao.updateById(employee); + + if (CollectionUtils.isNotEmpty(roleIdList)) { + List roleEmployeeList = roleIdList.stream().map(e -> new RoleEmployeeEntity(e, employee.getId())).collect(Collectors.toList()); + this.updateEmployeeRole(employee.getId(),roleEmployeeList); + } + } + + /** + * 更新员工角色 + * + * @param employeeId + * @param roleEmployeeList + */ + @Transactional(rollbackFor = Throwable.class) + public void updateEmployeeRole(Long employeeId, List roleEmployeeList) { + roleEmployeeManager.getBaseMapper().deleteByEmployeeId(employeeId); + + if (CollectionUtils.isNotEmpty(roleEmployeeList)) { + roleEmployeeManager.saveBatch(roleEmployeeList); + } + } + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/EmployeeService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/EmployeeService.java new file mode 100644 index 00000000..9981adf3 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/EmployeeService.java @@ -0,0 +1,514 @@ +package net.lab1024.smartadmin.service.module.system.employee; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.google.common.collect.Lists; +import net.lab1024.smartadmin.service.common.codeconst.ResponseCodeConst; +import net.lab1024.smartadmin.service.common.constant.CacheModuleBaseConst; +import net.lab1024.smartadmin.service.common.constant.CommonConst; +import net.lab1024.smartadmin.service.common.domain.PageResultDTO; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.support.beancache.cache.IBeanCache; +import net.lab1024.smartadmin.service.module.support.beancache.key.CacheKey; +import net.lab1024.smartadmin.service.module.system.department.DepartmentDao; +import net.lab1024.smartadmin.service.module.system.department.domain.entity.DepartmentEntity; +import net.lab1024.smartadmin.service.module.system.department.domain.vo.DepartmentVO; +import net.lab1024.smartadmin.service.module.system.employee.domain.dto.*; +import net.lab1024.smartadmin.service.module.system.employee.domain.entity.EmployeeEntity; +import net.lab1024.smartadmin.service.module.system.employee.domain.vo.EmployeeVO; +import net.lab1024.smartadmin.service.module.system.login.domain.EmployeeLoginBO; +import net.lab1024.smartadmin.service.module.system.login.domain.EmployeeLoginInfoDTO; +import net.lab1024.smartadmin.service.module.system.menu.MenuEmployeeService; +import net.lab1024.smartadmin.service.module.system.role.roleemployee.RoleEmployeeDao; +import net.lab1024.smartadmin.service.module.system.role.roleemployee.domain.RoleEmployeeEntity; +import net.lab1024.smartadmin.service.util.SmartBeanUtil; +import net.lab1024.smartadmin.service.util.SmartPageUtil; +import org.apache.commons.codec.digest.DigestUtils; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.stream.Collectors; + +/** + * 员工管理 + * + * @author 罗伊 + * @date 2021年01月21日上午11:54:52 + */ +@Service +public class EmployeeService { + + @Autowired + private EmployeeDao employeeDao; + + @Autowired + private DepartmentDao departmentDao; + + @Autowired + private MenuEmployeeService menuEmployeeService; + + @Autowired + private EmployeeManager employeeManager; + + @Autowired + private RoleEmployeeDao roleEmployeeDao; + + @Autowired + protected IBeanCache beanCache; + + /** + * 获取员工登录信息 + * + * @param employeeId + * @return + */ + public EmployeeLoginInfoDTO getById(Long employeeId) { + String cacheKey = CacheKey.cacheKey(CacheModuleBaseConst.Employee.SINGLE_EMPLOYEE_CACHE, employeeId.toString()); + EmployeeEntity employeeEntity = beanCache.get(cacheKey); + //获取员工角色缓存 + String roleCacheKey = CacheKey.cacheKey(CacheModuleBaseConst.Employee.SINGLE_EMPLOYEE_ROLE_CACHE, employeeId.toString()); + List roleIdList = beanCache.get(roleCacheKey); + if (employeeEntity != null) { + Boolean isSuperman = menuEmployeeService.isSuperman(employeeId); + EmployeeLoginInfoDTO loginDTO = SmartBeanUtil.copy(employeeEntity, EmployeeLoginInfoDTO.class); + loginDTO.setEmployeeId(employeeId); + loginDTO.setIsSuperMan(isSuperman); + loginDTO.setRoleList(roleIdList); + return loginDTO; + } + return null; + } + + /** + * 获取员工登录信息 + * + * @param employeeId + * @return + */ + public EmployeeLoginBO getBoById(Long employeeId) { + String cacheKey = CacheKey.cacheKey(CacheModuleBaseConst.Employee.SINGLE_EMPLOYEE_CACHE, employeeId.toString()); + EmployeeEntity employeeEntity = beanCache.get(cacheKey); + //获取员工角色缓存 + String roleCacheKey = CacheKey.cacheKey(CacheModuleBaseConst.Employee.SINGLE_EMPLOYEE_ROLE_CACHE, employeeId.toString()); + List roleIdList = beanCache.get(roleCacheKey); + if (employeeEntity != null) { + Boolean isSuperman = menuEmployeeService.isSuperman(employeeId); + EmployeeLoginBO loginDTO = SmartBeanUtil.copy(employeeEntity, EmployeeLoginBO.class); + loginDTO.setEmployeeId(employeeId); + loginDTO.setIsSuperMan(isSuperman); + loginDTO.setRoleList(roleIdList); + return loginDTO; + } + return null; + } + + /** + * 查询员工列表 + * + * @param queryDTO + * @return + */ + public ResponseDTO> queryEmployeeList(EmployeeQueryDTO queryDTO) { + queryDTO.setDeletedFlag(false); + Page pageParam = SmartPageUtil.convert2PageQuery(queryDTO); + List employeeList = employeeDao.queryEmployee(pageParam, queryDTO); + if (CollectionUtils.isEmpty(employeeList)) { + PageResultDTO pageResultDTO = SmartPageUtil.convert2PageResult(pageParam, employeeList); + return ResponseDTO.succData(pageResultDTO); + } + // 查询员工角色 + List employeeIdList = employeeList.stream().map(EmployeeVO::getId).collect(Collectors.toList()); + List roleEmployeeEntityList = roleEmployeeDao.selectRoleIdByEmployeeIdList(employeeIdList); + Map> employeeRoleIdListMap = roleEmployeeEntityList.stream().collect(Collectors.groupingBy(RoleEmployeeEntity::getEmployeeId, Collectors.mapping(RoleEmployeeEntity::getRoleId, Collectors.toList()))); + // 写入角色ID + employeeList.forEach(e -> { + e.setRoleIdList(employeeRoleIdListMap.getOrDefault(e.getId(), Lists.newArrayList())); + }); + PageResultDTO pageResultDTO = SmartPageUtil.convert2PageResult(pageParam, employeeList); + return ResponseDTO.succData(pageResultDTO); + } + + /** + * 新增员工 + * + * @param addDTO + * @return + */ + public ResponseDTO addEmployee(EmployeeAddDTO addDTO) { + // 校验名称是否重复 + EmployeeDTO employeeDTO = employeeDao.getByLoginName(addDTO.getLoginName(), false, false); + if (null != employeeDTO) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "员工名称重复"); + } + // 校验电话是否存在 + employeeDTO = employeeDao.getByPhone(addDTO.getPhone(), false); + if (null != employeeDTO) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "手机号已存在"); + } + // 部门是否存在 + Long departmentId = addDTO.getDepartmentId(); + DepartmentEntity department = departmentDao.selectById(departmentId); + if (department == null) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "部门不存在"); + } + + EmployeeEntity entity = SmartBeanUtil.copy(addDTO, EmployeeEntity.class); + // 设置密码 默认密码 + entity.setLoginPwd(getEncryptPwd(null)); + + // 保存数据 + employeeManager.saveEmployee(entity, addDTO.getRoleIdList()); + + this.clearCacheByDepartmentId(departmentId); + + return ResponseDTO.succ(); + } + + /** + * 更新员工 + * + * @param updateDTO + * @return + */ + public ResponseDTO updateEmployee(EmployeeUpdateDTO updateDTO) { + Long employeeId = updateDTO.getId(); + EmployeeEntity employeeEntity = employeeDao.selectById(employeeId); + if (null == employeeEntity) { + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); + } + Long departmentId = updateDTO.getDepartmentId(); + DepartmentEntity departmentEntity = departmentDao.selectById(departmentId); + if (departmentEntity == null) { + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); + } + EmployeeDTO employeeDTO = employeeDao.getByLoginName(updateDTO.getLoginName(), false, false); + if (null != employeeDTO && !Objects.equals(employeeDTO.getId(), employeeId)) { + return ResponseDTO.wrap(ResponseCodeConst.ALREADY_EXIST); + } + employeeDTO = employeeDao.getByPhone(updateDTO.getLoginName(), false); + if (null != employeeDTO && !Objects.equals(employeeDTO.getId(), employeeId)) { + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); + } + + // 不更新密码 + EmployeeEntity entity = SmartBeanUtil.copy(updateDTO, EmployeeEntity.class); + entity.setLoginPwd(null); + + // 更新数据 + employeeManager.updateEmployee(entity, updateDTO.getRoleIdList()); + + // 清除缓存 + this.clearCacheByEmployeeId(employeeId); + this.clearCacheByDepartmentId(departmentId); + + return ResponseDTO.succ(); + } + + /** + * 更新禁用状态 + * + * @param employeeId + * @return + */ + public ResponseDTO updateDisableFlag(Long employeeId) { + if (null == employeeId) { + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); + } + EmployeeEntity employeeEntity = employeeDao.selectById(employeeId); + if (null == employeeEntity) { + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); + } + + employeeDao.updateDisableFlag(employeeId, !employeeEntity.getDisabledFlag()); + + this.clearCacheByEmployeeId(employeeId); + this.clearCacheByDepartmentId(employeeEntity.getDepartmentId()); + return ResponseDTO.succ(); + } + + /** + * 批量更新员工状态 + * + * @param batchUpdateStatusDTO + * @return + */ + public ResponseDTO batchUpdateDisableFlag(EmployeeDisabledUpdateDTO batchUpdateStatusDTO) { + List employeeIdList = batchUpdateStatusDTO.getEmployeeIdList(); + List employeeEntityList = employeeDao.selectBatchIds(employeeIdList); + if (employeeIdList.size() != employeeEntityList.size()) { + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); + } + + employeeDao.batchUpdateDisableFlag(employeeIdList, batchUpdateStatusDTO.getDisabledFlag()); + + // 清除缓存 + employeeEntityList.forEach(e -> { + this.clearCacheByEmployeeId(e.getId()); + this.clearCacheByDepartmentId(e.getDepartmentId()); + }); + return ResponseDTO.succ(); + } + + /** + * 批量删除员工 + * + * @param employeeIdList 员工ID列表 + * @return + */ + public ResponseDTO batchUpdateDeleteFlag(List employeeIdList) { + if (CollectionUtils.isEmpty(employeeIdList)) { + return ResponseDTO.succ(); + } + List employeeEntityList = employeeManager.listByIds(employeeIdList); + if (CollectionUtils.isEmpty(employeeEntityList)) { + return ResponseDTO.succ(); + } + List deleteList = employeeIdList.stream().map(e -> { + // 更新删除 + EmployeeEntity updateEmployee = new EmployeeEntity(); + updateEmployee.setId(e); + updateEmployee.setDeletedFlag(true); + return updateEmployee; + }).collect(Collectors.toList()); + employeeManager.updateBatchById(deleteList); + + // 清除缓存 + employeeEntityList.forEach(e -> { + this.clearCacheByEmployeeId(e.getId()); + this.clearCacheByDepartmentId(e.getDepartmentId()); + }); + return ResponseDTO.succ(); + } + + /** + * 删除员工 + * + * @param employeeId 员工ID + * @return + */ + public ResponseDTO deleteEmployeeById(Long employeeId) { + EmployeeEntity employeeEntity = employeeDao.selectById(employeeId); + if (null == employeeEntity) { + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); + } + // 更新删除 + EmployeeEntity updateEmployee = new EmployeeEntity(); + updateEmployee.setId(employeeId); + updateEmployee.setDeletedFlag(true); + employeeDao.updateById(updateEmployee); + + this.clearCacheByEmployeeId(employeeId); + this.clearCacheByDepartmentId(employeeEntity.getDepartmentId()); + return ResponseDTO.succ(); + } + + /** + * 批量更新部门 + * + * @param updateDto + * @return + */ + public ResponseDTO batchUpdateDepartment(EmployeeDepartmentUpdateDTO updateDto) { + List employeeIdList = updateDto.getEmployeeIdList(); + List employeeEntityList = employeeDao.selectBatchIds(employeeIdList); + if (employeeIdList.size() != employeeEntityList.size()) { + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); + } + + List updateList = employeeIdList.stream().map(e -> { + // 更新删除 + EmployeeEntity updateEmployee = new EmployeeEntity(); + updateEmployee.setId(e); + updateEmployee.setDepartmentId(updateDto.getDepartmentId()); + return updateEmployee; + }).collect(Collectors.toList()); + employeeManager.updateBatchById(updateList); + + // 清除缓存 + employeeEntityList.forEach(e -> { + this.clearCacheByEmployeeId(e.getId()); + this.clearCacheByDepartmentId(e.getDepartmentId()); + }); + return ResponseDTO.succ(); + } + + /** + * 更新用户角色 + * + * @param updateDTO + * @return + */ + public ResponseDTO updateRole(EmployeeRoleUpdateDTO updateDTO) { + Long employeeId = updateDTO.getEmployeeId(); + List roleIdList = updateDTO.getRoleIdList(); + + // 保存新的角色信息 + List roleEmployeeList = null; + if (CollectionUtils.isNotEmpty(roleIdList)) { + roleEmployeeList = roleIdList.stream() + .map(roleId -> new RoleEmployeeEntity(roleId, employeeId)) + .collect(Collectors.toList()); + } + + // 更新数据 + employeeManager.updateEmployeeRole(employeeId, roleEmployeeList); + return ResponseDTO.succ(); + } + + /** + * 更新密码 + * + * @param updatePwdDTO + * @return + */ + public ResponseDTO updatePwd(EmployeeUpdatePwdDTO updatePwdDTO) { + Long employeeId = updatePwdDTO.getEmployeeId(); + EmployeeEntity employeeEntity = employeeDao.selectById(employeeId); + if (employeeEntity == null) { + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); + } + // 校验原始密码 + String encryptPwd = getEncryptPwd(updatePwdDTO.getOldPwd()); + if (!Objects.equals(encryptPwd, employeeEntity.getLoginPwd())) { + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); + } + + // 新旧密码相同 + String newPwd = updatePwdDTO.getPwd(); + if (Objects.equals(updatePwdDTO.getOldPwd(), newPwd)) { + return ResponseDTO.succ(); + } + + // 更新密码 + EmployeeEntity updateEntity = new EmployeeEntity(); + updateEntity.setId(employeeId); + updateEntity.setLoginPwd(getEncryptPwd(newPwd)); + employeeDao.updateById(updateEntity); + + return ResponseDTO.succ(); + } + + /** + * 获取某个部门的员工信息 + * + * @param departmentId + * @return + */ + public ResponseDTO> getEmployeeByDeptId(Long departmentId) { + String cacheKey = CacheKey.cacheKey(CacheModuleBaseConst.Employee.DEPARTMENT_EMPLOYEE_CACHE, departmentId.toString()); + List employeeEntityList = beanCache.get(cacheKey); + if (CollectionUtils.isEmpty(employeeEntityList)) { + return ResponseDTO.succData(CommonConst.EMPTY_LIST); + } + List voList = SmartBeanUtil.copyList(employeeEntityList, EmployeeVO.class); + return ResponseDTO.succData(voList); + } + + /** + * 获取某个校区的员工信息 + * + * @param departmentId + * @return + */ + public ResponseDTO> getEmployeeBySchoolId(Long departmentId) { + // 查询部门下所有部门包含子部门 + String cacheKey = CacheKey.cacheKey(CacheModuleBaseConst.Department.DEPARTMENT_CACHE); + List departmentList = beanCache.get(cacheKey); + // 先查询本部门的员工 + ResponseDTO> employeeByDeptId = getEmployeeByDeptId(departmentId); + List schoolEmployeeList = employeeByDeptId.getData(); + // 进入递归 + List employeeList = Lists.newArrayList(schoolEmployeeList); + recursionFindEmployee(employeeList, departmentList, departmentId); + return ResponseDTO.succData(employeeList); + } + + /** + * 递归查询员工 + * + * @param employeeList + * @param departmentList + */ + private void recursionFindEmployee(List employeeList, List departmentList, Long parentId) { + // 寻找子集部门 + List childDepartmentList = departmentList.stream().filter(e -> e.getParentId().equals(parentId)).collect(Collectors.toList()); + if (CollectionUtils.isEmpty(childDepartmentList)) { + return; + } + for (DepartmentVO departmentVO : childDepartmentList) { + // 查询本级部门下包含的员工 + ResponseDTO> employeeByDeptId = getEmployeeByDeptId(departmentVO.getId()); + employeeList.addAll(employeeByDeptId.getData()); + recursionFindEmployee(employeeList, departmentList, departmentVO.getId()); + } + } + + /** + * 重置密码 + * + * @param employeeId + * @return + */ + public ResponseDTO resetPassword(Integer employeeId) { + String md5Password = getEncryptPwd(null); + employeeDao.updatePassword(employeeId, md5Password); + return ResponseDTO.succ(); + } + + /** + * 清除businessId为员工id的缓存信息 + * + * @param employeeId + */ + public void clearCacheByEmployeeId(Long employeeId) { + String cacheKey = CacheKey.cacheKey(CacheModuleBaseConst.Employee.SINGLE_EMPLOYEE_CACHE, employeeId.toString()); + beanCache.remove(cacheKey); + String roleCacheKey = CacheKey.cacheKey(CacheModuleBaseConst.Employee.SINGLE_EMPLOYEE_ROLE_CACHE, employeeId.toString()); + beanCache.remove(roleCacheKey); + } + + /** + * 清除businessId为部门id的缓存信息 + * + * @param departmentId + */ + private void clearCacheByDepartmentId(Long departmentId) { + String cacheKey = CacheKey.cacheKey(CacheModuleBaseConst.Employee.DEPARTMENT_EMPLOYEE_CACHE, departmentId.toString()); + beanCache.remove(cacheKey); + } + + /** + * 获取 加密后 的密码 + * + * @param pwd 密码为空 将使用原始密码 + * @return + */ + public static String getEncryptPwd(String pwd) { + pwd = StringUtils.isBlank(pwd) ? CommonConst.Password.DEFAULT : pwd; + return DigestUtils.md5Hex(String.format(CommonConst.Password.SALT_FORMAT, pwd)); + } + + public static void main(String[] args) { + System.out.println(getEncryptPwd("123456")); + + } + + /** + * 查询全部员工 + * + * @return + */ + public ResponseDTO> queryAllEmploy(Boolean disabledFlag) { + EmployeeQueryDTO queryDTO = new EmployeeQueryDTO(); + queryDTO.setDeletedFlag(Boolean.FALSE); + if (disabledFlag != null) { + queryDTO.setDisabledFlag(disabledFlag); + } + List employeeList = employeeDao.queryEmployee(queryDTO); + return ResponseDTO.succData(employeeList); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeAddDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeAddDTO.java new file mode 100644 index 00000000..2bf4e3e1 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeAddDTO.java @@ -0,0 +1,56 @@ +package net.lab1024.smartadmin.service.module.system.employee.domain.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import net.lab1024.smartadmin.service.common.constant.GenderEnum; +import net.lab1024.smartadmin.service.common.swagger.ApiModelPropertyEnum; +import net.lab1024.smartadmin.service.common.validator.CheckEnum; +import net.lab1024.smartadmin.service.util.SmartVerificationUtil; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Pattern; +import java.util.List; + +/** + * 添加员工 + * + * @author 开云 + * @date 2017年12月19日下午2:06:31 + */ +@Data +public class EmployeeAddDTO { + + @ApiModelProperty("姓名") + @NotNull(message = "姓名不能为空") + @Length(max = 30, message = "姓名最多30字符") + private String actualName; + + @ApiModelProperty("登录账号") + @NotNull(message = "登录账号不能为空") + @Length(max = 30, message = "登录账号最多30字符") + private String loginName; + + @ApiModelPropertyEnum(GenderEnum.class) + @CheckEnum(enumClazz = GenderEnum.class, message = "性别错误") + private Integer gender; + + @ApiModelProperty("部门id") + @NotNull(message = "部门id不能为空") + private Long departmentId; + + @ApiModelProperty("是否启用") + @NotNull(message = "是否被禁用不能为空") + private Boolean disabledFlag; + + @ApiModelProperty("手机号") + @NotNull(message = "手机号不能为空") + @Pattern(regexp = SmartVerificationUtil.PHONE_REGEXP, message = "手机号格式不正确") + private String phone; + + @ApiModelProperty(hidden = true) + private Long updateId; + + @ApiModelProperty("角色列表") + private List roleIdList; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeDTO.java new file mode 100644 index 00000000..618806f4 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeDTO.java @@ -0,0 +1,43 @@ +package net.lab1024.smartadmin.service.module.system.employee.domain.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * 员工列表DTO + * + * @author 开云 + * @date 2017年12月21日上午09:09:31 + */ +@Data +public class EmployeeDTO { + + @ApiModelProperty("主键id") + private Long id; + + @ApiModelProperty("登录账号") + private String loginName; + + @ApiModelProperty("员工名称") + private String actualName; + + @ApiModelProperty("手机号码") + private String phone; + + @ApiModelProperty("部门id") + private Long departmentId; + + @ApiModelProperty("是否被禁用") + private Boolean disabledFlag; + + @ApiModelProperty("是否删除") + private Boolean deletedFlag; + + @ApiModelProperty("部门名称") + private String departmentName; + + @ApiModelProperty("创建时间") + private LocalDateTime createTime; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeDepartmentUpdateDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeDepartmentUpdateDTO.java new file mode 100644 index 00000000..55741420 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeDepartmentUpdateDTO.java @@ -0,0 +1,28 @@ +package net.lab1024.smartadmin.service.module.system.employee.domain.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; +import java.util.List; + +/** + * 员工更新部门 DTO + * + * @author 善逸 + * @date 2021年07月29日 20:00 + */ +@Data +public class EmployeeDepartmentUpdateDTO { + + @ApiModelProperty("员工id") + @NotEmpty(message = "员工id不能为空") + @Size(max = 99, message = "一次最多调整99个员工") + private List employeeIdList; + + @ApiModelProperty("部门ID") + @NotNull(message = "部门ID不能为空") + private Long departmentId; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeDisabledUpdateDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeDisabledUpdateDTO.java new file mode 100644 index 00000000..290e936b --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeDisabledUpdateDTO.java @@ -0,0 +1,28 @@ +package net.lab1024.smartadmin.service.module.system.employee.domain.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; +import java.util.List; + +/** + * 员工禁用状态更新 DTO + * + * @author listen + * @date 2021年07月29日 20:00 + */ +@Data +public class EmployeeDisabledUpdateDTO { + + @ApiModelProperty("员工id") + @NotEmpty(message = "员工id不能为空") + @Size(max = 99, message = "一次最多更新99次") + private List employeeIdList; + + @ApiModelProperty("禁用状态") + @NotNull(message = "禁用状态不能为空") + private Boolean disabledFlag; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeLoginDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeLoginDTO.java new file mode 100644 index 00000000..301dbdd8 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeLoginDTO.java @@ -0,0 +1,36 @@ +package net.lab1024.smartadmin.service.module.system.employee.domain.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import net.lab1024.smartadmin.service.module.support.captcha.domain.CaptchaDTO; +import net.lab1024.smartadmin.service.util.SmartVerificationUtil; +import org.hibernate.validator.constraints.Length; + +import javax.validation.Valid; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Pattern; + +/** + * 登录 + * + * @author 开云 + * @date 2017年12月19日上午11:49:46 + */ +@Data +public class EmployeeLoginDTO { + + @ApiModelProperty(example = "sa") + @NotBlank(message = "登录名不能为空") + @Length(max = 30, message = "登录账号最多30字符") + private String loginName; + + @ApiModelProperty(example = "123456") + @NotBlank(message = "密码不能为空") + @Pattern(regexp = SmartVerificationUtil.PWD_REGEXP, message = "请输入6-15位密码(数字|大小写字母|小数点)") + private String loginPwd; + + @ApiModelProperty("图形验证码|可选") + // @NotNull(message = "图形验证码不能为空") + @Valid + private CaptchaDTO captcha; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeQueryDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeQueryDTO.java new file mode 100644 index 00000000..9214be21 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeQueryDTO.java @@ -0,0 +1,36 @@ +package net.lab1024.smartadmin.service.module.system.employee.domain.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import net.lab1024.smartadmin.service.common.domain.PageBaseDTO; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.Size; +import java.util.List; + +/** + * 员工列表DTO + * + * @author 开云 + * @date 2017年12月21日上午09:09:31 + */ +@Data +public class EmployeeQueryDTO extends PageBaseDTO { + + @ApiModelProperty("搜索词") + @Length(max = 20, message = "搜索词最多20字符") + private String keyword; + + @ApiModelProperty("部门id") + private Long departmentId; + + @ApiModelProperty("是否禁用") + private Boolean disabledFlag; + + @ApiModelProperty("员工id集合") + @Size(max = 99, message = "最多查询99个员工") + private List employeeIdList; + + @ApiModelProperty(hidden = true) + private Boolean deletedFlag; +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeQueryExportDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeQueryExportDTO.java similarity index 63% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeQueryExportDTO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeQueryExportDTO.java index 645bd213..7a4e93c2 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeQueryExportDTO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeQueryExportDTO.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.module.system.employee.domain.dto; +package net.lab1024.smartadmin.service.module.system.employee.domain.dto; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -6,7 +6,7 @@ import lombok.Data; import java.util.List; /** - * @author zzr + * @author 1024lab * 不带分页的查询条件 */ @Data @@ -25,16 +25,10 @@ public class EmployeeQueryExportDTO { private Long departmentId; @ApiModelProperty(hidden = true) - private Integer isLeave; + private Boolean disabledFlag; - @ApiModelProperty(hidden = true) - private Integer isDisabled; - - /** - * 删除状态 0否 1是 - */ - @ApiModelProperty(value = "删除状态 0否 1是 不需要传", hidden = true) - private Integer isDelete; + @ApiModelProperty(value = "删除状态", hidden = true) + private Boolean deletedFlag; @ApiModelProperty(value = "员工ID集合", hidden = true) private List employeeIds; diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeUpdateRolesDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeRoleUpdateDTO.java similarity index 52% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeUpdateRolesDTO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeRoleUpdateDTO.java index 2829ba1a..22b2e39f 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeUpdateRolesDTO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeRoleUpdateDTO.java @@ -1,29 +1,26 @@ -package net.lab1024.smartadmin.module.system.employee.domain.dto; +package net.lab1024.smartadmin.service.module.system.employee.domain.dto; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; import java.util.List; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 + * @author 罗伊 */ @Data -public class EmployeeUpdateRolesDTO { +public class EmployeeRoleUpdateDTO { @ApiModelProperty("员工id") @NotNull(message = "员工id不能为空") private Long employeeId; @ApiModelProperty("角色ids") - private List roleIds; + @Size(max = 99, message = "角色最多99") + private List roleIdList; } diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeUpdateDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeUpdateDTO.java new file mode 100644 index 00000000..49a975e6 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeUpdateDTO.java @@ -0,0 +1,20 @@ +package net.lab1024.smartadmin.service.module.system.employee.domain.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotNull; + +/** + * 更新员工 + * + * @author 开云 + * @date 2017年12月19日下午2:06:31 + */ +@Data +public class EmployeeUpdateDTO extends EmployeeAddDTO { + + @ApiModelProperty("员工id") + @NotNull(message = "员工id不能为空") + private Long id; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeUpdatePwdDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeUpdatePwdDTO.java new file mode 100644 index 00000000..9b05658f --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/dto/EmployeeUpdatePwdDTO.java @@ -0,0 +1,31 @@ +package net.lab1024.smartadmin.service.module.system.employee.domain.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import net.lab1024.smartadmin.service.util.SmartVerificationUtil; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Pattern; + +/** + * 修改密码所需参数 + * + * @author cyj + * @date 2018-02-23 下午 4:53 + */ +@Data +public class EmployeeUpdatePwdDTO { + + @ApiModelProperty(hidden = true) + private Long employeeId; + + @ApiModelProperty("原密码") + @NotBlank(message = "原密码不能为空哦") + @Pattern(regexp = SmartVerificationUtil.PWD_REGEXP, message = "原密码请输入6-15位(数字|大小写字母|小数点)") + private String oldPwd; + + @ApiModelProperty("新密码") + @NotBlank(message = "新密码不能为空哦") + @Pattern(regexp = SmartVerificationUtil.PWD_REGEXP, message = "新密码请输入6-15位(数字|大小写字母|小数点)") + private String pwd; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/entity/EmployeeEntity.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/entity/EmployeeEntity.java new file mode 100644 index 00000000..2b76ee78 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/entity/EmployeeEntity.java @@ -0,0 +1,74 @@ +package net.lab1024.smartadmin.service.module.system.employee.domain.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * 员工实体类 + * + * @author 开云 + * @date 2017年12月19日下午1:34:48 + */ +@Data +@TableName("t_employee") +public class EmployeeEntity { + + @TableId(type = IdType.AUTO) + private Long id; + + /** + * 登录账号 + */ + private String loginName; + + /** + * 登录密码 + */ + private String loginPwd; + + /** + * 员工名称 + */ + private String actualName; + + /** + * 性别 + * + * @see net.lab1024.smartadmin.service.common.constant.GenderEnum + */ + private Integer gender; + + /** + * 手机号码 + */ + private String phone; + + /** + * 部门id + */ + private Long departmentId; + + /** + * 是否被禁用 + */ + private Boolean disabledFlag; + + /** + * 是否删除 + */ + private Boolean deletedFlag; + + /** + * 备注 + */ + private String remark; + + private LocalDateTime updateTime; + + private LocalDateTime createTime; + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/vo/EmployeeVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/vo/EmployeeVO.java new file mode 100644 index 00000000..c123c0d0 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/employee/domain/vo/EmployeeVO.java @@ -0,0 +1,50 @@ +package net.lab1024.smartadmin.service.module.system.employee.domain.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import net.lab1024.smartadmin.service.common.constant.GenderEnum; +import net.lab1024.smartadmin.service.common.swagger.ApiModelPropertyEnum; + +import java.time.LocalDateTime; +import java.util.List; + +/** + * + * [ ] + * + * @author 罗伊 + * @date + */ +@Data +public class EmployeeVO { + + @ApiModelProperty("主键id") + private Long id; + + @ApiModelProperty("登录账号") + private String loginName; + + @ApiModelPropertyEnum(GenderEnum.class) + private Integer gender; + + @ApiModelProperty("员工名称") + private String actualName; + + @ApiModelProperty("手机号码") + private String phone; + + @ApiModelProperty("部门id") + private Long departmentId; + + @ApiModelProperty("是否被禁用") + private Boolean disabledFlag; + + @ApiModelProperty("部门名称") + private String departmentName; + + @ApiModelProperty("创建时间") + private LocalDateTime createTime; + + @ApiModelProperty("角色列表") + private List roleIdList; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/login/EmployeeLoginController.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/login/EmployeeLoginController.java new file mode 100644 index 00000000..db6ffcec --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/login/EmployeeLoginController.java @@ -0,0 +1,53 @@ +package net.lab1024.smartadmin.service.module.system.login; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import net.lab1024.smartadmin.service.common.anno.NoNeedLogin; +import net.lab1024.smartadmin.service.common.constant.SwaggerTagConst; +import net.lab1024.smartadmin.service.common.controller.AdminBaseController; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.system.employee.domain.dto.EmployeeLoginDTO; +import net.lab1024.smartadmin.service.module.system.login.domain.EmployeeLoginInfoDTO; +import net.lab1024.smartadmin.service.module.system.login.domain.EmployeeLoginVO; +import net.lab1024.smartadmin.service.util.SmartEmployeeTokenUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; + +import javax.validation.Valid; + +/** + * 后台登录 + * + * @author 开云 + * @date 2017年12月19日上午11:46:04 + */ +@RestController +@Api(tags = {SwaggerTagConst.Admin.MANAGER_EMPLOYEE_LOGIN}) +public class EmployeeLoginController extends AdminBaseController { + + @Autowired + private EmployeeLoginService employeeLoginService; + + @NoNeedLogin + @ApiOperation("登录 by listen") + @PostMapping("/login") + public ResponseDTO login(@Valid @RequestBody EmployeeLoginDTO loginDTO) { + return employeeLoginService.login(loginDTO); + } + + @GetMapping("/login/get") + @ApiOperation("获取登录信息") + public ResponseDTO getSession() { + EmployeeLoginInfoDTO requestEmployee = SmartEmployeeTokenUtil.getRequestEmployee(); + return ResponseDTO.succData(employeeLoginService.getSession(requestEmployee)); + } + + @GetMapping("/logout") + @ApiOperation("退出登陆") + public ResponseDTO logout() { + return employeeLoginService.logoutByToken(SmartEmployeeTokenUtil.getRequestEmployeeId()); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/login/EmployeeLoginService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/login/EmployeeLoginService.java new file mode 100644 index 00000000..2da09cb4 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/login/EmployeeLoginService.java @@ -0,0 +1,143 @@ +package net.lab1024.smartadmin.service.module.system.login; + +import lombok.extern.slf4j.Slf4j; +import net.lab1024.smartadmin.service.common.codeconst.EmployeeResponseCodeConst; +import net.lab1024.smartadmin.service.common.constant.CommonConst; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.support.captcha.CaptchaService; +import net.lab1024.smartadmin.service.module.support.captcha.domain.CaptchaDTO; +import net.lab1024.smartadmin.service.module.system.department.DepartmentDao; +import net.lab1024.smartadmin.service.module.system.department.DepartmentService; +import net.lab1024.smartadmin.service.module.system.department.domain.entity.DepartmentEntity; +import net.lab1024.smartadmin.service.module.system.department.domain.vo.DepartmentVO; +import net.lab1024.smartadmin.service.module.system.employee.EmployeeDao; +import net.lab1024.smartadmin.service.module.system.employee.EmployeeService; +import net.lab1024.smartadmin.service.module.system.employee.domain.dto.EmployeeLoginDTO; +import net.lab1024.smartadmin.service.module.system.employee.domain.entity.EmployeeEntity; +import net.lab1024.smartadmin.service.module.system.login.domain.EmployeeLoginInfoDTO; +import net.lab1024.smartadmin.service.module.system.login.domain.EmployeeLoginVO; +import net.lab1024.smartadmin.service.module.system.menu.MenuEmployeeService; +import net.lab1024.smartadmin.service.module.system.menu.domain.MenuLoginBO; +import net.lab1024.smartadmin.service.util.SmartBeanUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * [ ] + * + * @author 罗伊 + */ +@Slf4j +@Service +public class EmployeeLoginService { + + @Autowired + private EmployeeDao employeeDao; + + @Autowired + private DepartmentDao departmentDao; + + @Autowired + private DepartmentService departmentService; + + @Autowired + private EmployeeLoginTokenService employeeLoginTokenService; + + @Autowired + private MenuEmployeeService menuEmployeeService; + + @Autowired + private EmployeeService employeeService; + + @Autowired + private CaptchaService captchaService; + + /** + * 员工登陆 + * + * @param loginDTO + * @return 返回用户登录信息 + */ + public ResponseDTO login(EmployeeLoginDTO loginDTO) { + // 校验图形验证码 + CaptchaDTO captcha = loginDTO.getCaptcha(); + if (null != captcha) { + ResponseDTO res = captchaService.checkCaptcha(captcha.getCaptchaId(), captcha.getCaptcha()); + if (!res.isSuccess()) { + return ResponseDTO.wrap(res); + } + } + + String loginPwd = EmployeeService.getEncryptPwd(loginDTO.getLoginPwd()); + EmployeeEntity employeeEntity = employeeDao.selectByLoginNameAndPwd(loginDTO.getLoginName(), loginPwd, false); + if (null == employeeEntity) { + return ResponseDTO.wrap(EmployeeResponseCodeConst.LOGIN_FAILED); + } + + if (employeeEntity.getDisabledFlag()) { + return ResponseDTO.wrap(EmployeeResponseCodeConst.STATUS_ERROR); + } + + // 生成 登录token + Long employeeId = employeeEntity.getId(); + String token = employeeLoginTokenService.generateToken(employeeId); + + // 判断是否为超管 + Boolean isSuperman = menuEmployeeService.isSuperman(employeeId); + + // 获取前端菜单以及功能权限 + MenuLoginBO menuLoginBORespDTO = menuEmployeeService.queryMenuTreeByEmployeeId(employeeId); + + // 查询部门 + DepartmentEntity deptEntity = departmentDao.selectById(employeeEntity.getDepartmentId()); + String deptName = null == deptEntity ? CommonConst.EMPTY_STR : deptEntity.getName(); + + // 查询所在校区 + DepartmentVO schoolIdByDepartment = departmentService.getSchoolIdByDepartment(employeeEntity.getDepartmentId()); + + // 返回登录结果 + EmployeeLoginVO loginResultDTO = SmartBeanUtil.copy(employeeEntity, EmployeeLoginVO.class); + loginResultDTO.setEmployeeId(employeeEntity.getId()); + loginResultDTO.setMenuTree(menuLoginBORespDTO.getMenuTree()); + loginResultDTO.setPointsList(menuLoginBORespDTO.getPointsList()); + loginResultDTO.setDepartmentName(deptName); + loginResultDTO.setToken(token); + loginResultDTO.setIsSuperMan(isSuperman); + if (schoolIdByDepartment != null) { + loginResultDTO.setSchoolId(schoolIdByDepartment.getId()); + loginResultDTO.setSchoolName(schoolIdByDepartment.getName()); + } + return ResponseDTO.succData(loginResultDTO); + } + + /** + * 退出登陆,清除token缓存 + * + * @param employeeId + * @return + */ + public ResponseDTO logoutByToken(Long employeeId) { + employeeService.clearCacheByEmployeeId(employeeId); + return ResponseDTO.succ(); + } + + /** + * 重新获取前端localStorage信息 + * + * @param loginInfo + * @return + */ + public EmployeeLoginVO getSession(EmployeeLoginInfoDTO loginInfo) { + Long employeeId = loginInfo.getEmployeeId(); + + EmployeeLoginVO loginDTO = SmartBeanUtil.copy(loginInfo, EmployeeLoginVO.class); + // 获取前端菜单以及功能权限 + MenuLoginBO menuLoginBORespDTO = menuEmployeeService.queryMenuTreeByEmployeeId(employeeId); + loginDTO.setMenuTree(menuLoginBORespDTO.getMenuTree()); + loginDTO.setPointsList(menuLoginBORespDTO.getPointsList()); + //判断是否为超管 + Boolean isSuperman = menuEmployeeService.isSuperman(loginDTO.getEmployeeId()); + loginDTO.setIsSuperMan(isSuperman); + return loginDTO; + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/login/EmployeeLoginTokenService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/login/EmployeeLoginTokenService.java new file mode 100644 index 00000000..2aa0bf7e --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/login/EmployeeLoginTokenService.java @@ -0,0 +1,139 @@ +package net.lab1024.smartadmin.service.module.system.login; + +import io.jsonwebtoken.Claims; +import io.jsonwebtoken.Jwts; +import io.jsonwebtoken.SignatureAlgorithm; +import lombok.extern.slf4j.Slf4j; +import net.lab1024.smartadmin.service.common.constant.SystemEnvironmentEnum; +import net.lab1024.smartadmin.service.module.system.employee.EmployeeService; +import net.lab1024.smartadmin.service.module.system.login.domain.EmployeeLoginBO; +import net.lab1024.smartadmin.service.module.system.login.domain.EmployeeLoginInfoDTO; +import org.apache.commons.lang3.math.NumberUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; + +/** + * [ ] + * + * @author 罗伊 + */ +@Slf4j +@Service +public class EmployeeLoginTokenService { + + /** + * 默认 token 过期时间 1 天 + */ + private static final int EXPIRE_SECONDS = 24 * 3600; + + /** + * 默认 jwt key + */ + private static final String JWT_KEY = "smart-admin-jwt-key"; + + /** + * jwt加密字段 + */ + private static final String CLAIM_ID_KEY = "id"; + + @Autowired + private EmployeeService employeeService; + + @Autowired + private SystemEnvironmentEnum systemEnvironment; + + /** + * 生成 JWT TOKEN + * + * @param employeeId + * @return + * @auther listen + */ + public String generateToken(Long employeeId) { + long nowTimeMilli = System.currentTimeMillis(); + Claims jwtClaims = Jwts.claims(); + jwtClaims.put(CLAIM_ID_KEY, employeeId); + return Jwts.builder() + .setClaims(jwtClaims) + .setIssuedAt(new Date(nowTimeMilli)) + .setExpiration(new Date(nowTimeMilli + EXPIRE_SECONDS * 1000)) + .signWith(SignatureAlgorithm.HS512, JWT_KEY) + .compact(); + } + + /** + * 根据登陆token 获取员工信息 + * + * @param + * @return + */ + public EmployeeLoginInfoDTO getEmployeeLoginInfo(String token) { + /** + * 非生产环境 直接使用 token 作为id + * 不需要的话 注释了吧 + */ + if (SystemEnvironmentEnum.PROD != systemEnvironment && NumberUtils.isParsable(token)) { + return employeeService.getById(Long.parseLong(token)); + } + + Long employeeId = getEmployeeIdByToken(token); + if (employeeId == null) { + return null; + } + // 查询用户信息 + EmployeeLoginInfoDTO loginInfo = employeeService.getById(employeeId); + if (loginInfo == null) { + return null; + } + if (loginInfo.getDisabledFlag()) { + return null; + } + return loginInfo; + } + + /** + * 根据登陆token 获取员工信息BO + * + * @param + * @return + */ + public EmployeeLoginBO getEmployeeLoginBO(String token) { + /** + * 非生产环境 直接使用 token 作为id + * 不需要的话 注释了吧 + */ + if (SystemEnvironmentEnum.PROD != systemEnvironment && NumberUtils.isParsable(token)) { + return employeeService.getBoById(Long.parseLong(token)); + } + + Long employeeId = getEmployeeIdByToken(token); + if(employeeId == null){ + return null; + } + // 查询用户信息 + EmployeeLoginBO loginInfo = employeeService.getBoById(employeeId); + if (loginInfo == null) { + return null; + } + if (loginInfo.getDisabledFlag()) { + return null; + } + return loginInfo; + } + + private Long getEmployeeIdByToken(String token) { + try { + Claims claims = Jwts.parser() + .setSigningKey(JWT_KEY) + .parseClaimsJws(token) + .getBody(); + return Long.parseLong(claims.get(CLAIM_ID_KEY).toString()); + } catch (Exception e) { + log.error("parse employee token error:", e); + } + return null; + } + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/login/domain/EmployeeLoginBO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/login/domain/EmployeeLoginBO.java new file mode 100644 index 00000000..95fbbe80 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/login/domain/EmployeeLoginBO.java @@ -0,0 +1,75 @@ +package net.lab1024.smartadmin.service.module.system.login.domain; + +import lombok.Data; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.userdetails.UserDetails; + +import java.util.Collection; + +/** + * 员工登陆BO + * + * @author 善逸 + * @date 2021/8/4 11:15 + */ +@Data +public class EmployeeLoginBO extends EmployeeLoginInfoDTO implements UserDetails { + + /** + * 登录密码 + */ + private String loginPwd; + + @Override + public Collection getAuthorities() { + return null; + } + + @Override + public String getPassword() { + return this.getLoginPwd(); + } + + @Override + public String getUsername() { + return this.getLoginName(); + } + + /** + * 账户是否未过期,过期无法验证 + */ + @Override + public boolean isAccountNonExpired() { + return true; + } + + /** + * 指定用户是否解锁,锁定的用户无法进行身份验证 + * + * @return + */ + @Override + public boolean isAccountNonLocked() { + return true; + } + + /** + * 指示是否已过期的用户的凭据(密码),过期的凭据防止认证 + * + * @return + */ + @Override + public boolean isCredentialsNonExpired() { + return true; + } + + /** + * 是否可用 ,禁用的用户不能身份验证 + * + * @return + */ + @Override + public boolean isEnabled() { + return true; + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/login/domain/EmployeeLoginInfoDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/login/domain/EmployeeLoginInfoDTO.java new file mode 100644 index 00000000..499f29ab --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/login/domain/EmployeeLoginInfoDTO.java @@ -0,0 +1,54 @@ +package net.lab1024.smartadmin.service.module.system.login.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import net.lab1024.smartadmin.service.common.constant.GenderEnum; +import net.lab1024.smartadmin.service.common.swagger.ApiModelPropertyEnum; + +import java.util.List; + +/** + * 员工登录信息 DTO + * + * @author listen + * @date 2021年07月21日 上午07:06:31 + */ +@Data +public class EmployeeLoginInfoDTO { + + @ApiModelProperty("员工id") + private Long employeeId; + + @ApiModelProperty("登录账号") + private String loginName; + + @ApiModelProperty("员工名称") + private String actualName; + + @ApiModelPropertyEnum(GenderEnum.class) + private Integer gender; + + @ApiModelProperty("手机号码") + private String phone; + + @ApiModelProperty("部门id") + private Long departmentId; + + @ApiModelProperty("部门名称") + private String departmentName; + + @ApiModelProperty("是否被禁用") + private Boolean disabledFlag; + + @ApiModelProperty("是否为超管") + private Boolean isSuperMan; + + @ApiModelProperty("角色列表") + private List roleList; + + @ApiModelProperty("所在校区ID") + private Long schoolId; + + @ApiModelProperty("所在校区名称") + private String schoolName; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/login/domain/EmployeeLoginPrivilegeDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/login/domain/EmployeeLoginPrivilegeDTO.java new file mode 100644 index 00000000..d3b3df74 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/login/domain/EmployeeLoginPrivilegeDTO.java @@ -0,0 +1,25 @@ +package net.lab1024.smartadmin.service.module.system.login.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * [ ] + * + * @author 罗伊 + */ +@Data +public class EmployeeLoginPrivilegeDTO { + + @ApiModelProperty("权限key") + private String key; + + private Integer type; + + @ApiModelProperty("url") + private String url; + + @ApiModelProperty("父级key") + private String parentKey; + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/login/domain/EmployeeLoginVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/login/domain/EmployeeLoginVO.java new file mode 100644 index 00000000..19d2177a --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/login/domain/EmployeeLoginVO.java @@ -0,0 +1,27 @@ +package net.lab1024.smartadmin.service.module.system.login.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import net.lab1024.smartadmin.service.module.system.menu.domain.MenuTreeVO; + +import java.util.List; + +/** + * 员工登录结果 VO + * + * @author listen + * @date 2021年07月21日 上午07:06:31 + */ +@Data +public class EmployeeLoginVO extends EmployeeLoginInfoDTO { + + @ApiModelProperty("token") + private String token; + + @ApiModelProperty("菜单树") + private List menuTree; + + @ApiModelProperty("功能点权限列表") + private List pointsList; + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/MenuController.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/MenuController.java new file mode 100644 index 00000000..025498b8 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/MenuController.java @@ -0,0 +1,71 @@ +package net.lab1024.smartadmin.service.module.system.menu; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import net.lab1024.smartadmin.service.common.constant.SwaggerTagConst; +import net.lab1024.smartadmin.service.common.controller.AdminBaseController; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.system.menu.domain.*; +import net.lab1024.smartadmin.service.util.SmartEmployeeTokenUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; +import java.util.List; + +/** + * 菜单 + * + * @author 卓大 + */ +@Api(tags = {SwaggerTagConst.Admin.MANAGER_MENU}) +@RestController +public class MenuController extends AdminBaseController { + + @Autowired + private MenuService menuService; + + @ApiOperation(value = "添加菜单") + @PostMapping("/menu/add") + public ResponseDTO addMenu(@RequestBody @Valid MenuAddForm menuAddForm) { + menuAddForm.setCreateUserId(SmartEmployeeTokenUtil.getRequestEmployeeId()); + return menuService.addMenu(menuAddForm); + } + + @ApiOperation(value = "更新菜单") + @PostMapping("/menu/update") + public ResponseDTO updateMenu(@RequestBody @Valid MenuUpdateForm menuUpdateForm) { + menuUpdateForm.setUpdateUserId(SmartEmployeeTokenUtil.getRequestEmployeeId()); + return menuService.updateMenu(menuUpdateForm); + } + + @ApiOperation(value = "批量删除菜单") + @GetMapping("/menu/batchDelete") + public ResponseDTO batchDeleteMenu(@RequestParam("menuIdList") List menuIdList) { + return menuService.batchDeleteMenu(menuIdList, SmartEmployeeTokenUtil.getRequestEmployeeId()); + } + + @ApiOperation(value = "查询菜单列表") + @GetMapping("/menu/query") + public ResponseDTO> queryMenuList() { + return ResponseDTO.succData(menuService.queryMenuList(null)); + } + + @ApiOperation(value = "查询菜单详情") + @GetMapping("/menu/detail/{menuId}") + public ResponseDTO getMenuDetail(@PathVariable Long menuId) { + return menuService.getMenuDetail(menuId); + } + + @ApiOperation(value = "查询菜单树") + @GetMapping("/menu/tree") + public ResponseDTO> queryMenuTree(@RequestParam("onlyMenu") Boolean onlyMenu) { + return menuService.queryMenuTree(onlyMenu); + } + + @ApiOperation(value = "获取所有请求路径", notes = "获取所有请求路径") + @GetMapping("/menu/getAllUrl") + public ResponseDTO> getAllUrl() { + return menuService.getPrivilegeUrlDTOList(); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/MenuDao.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/MenuDao.java new file mode 100644 index 00000000..57525773 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/MenuDao.java @@ -0,0 +1,85 @@ +package net.lab1024.smartadmin.service.module.system.menu; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import net.lab1024.smartadmin.service.module.system.menu.domain.MenuEntity; +import net.lab1024.smartadmin.service.module.system.menu.domain.MenuVO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * 菜单 + * + * @author 卓大 + * @date 2021/7/29 16:13 + */ +@Mapper +@Component +public interface MenuDao extends BaseMapper { + + /** + * 根据名称查询同一级下的菜单 + * + * @param menuName 菜单名 + * @param parentId 父级id + * @param deleteFlag 是否删除 + * @return + */ + MenuEntity getByMenuName(@Param("menuName") String menuName, @Param("parentId") Long parentId, @Param("deleteFlag") Boolean deleteFlag); + + /** + * 根据菜单ID删除菜单(逻辑删除) + * + * @param menuIdList 菜单id集合 + * @param updateUserId 操作人id + * @param deleteFlag 是否删除 + */ + void deleteByMenuIdList(@Param("menuIdList") List menuIdList, @Param("updateUserId") Long updateUserId, @Param("deleteFlag") Boolean deleteFlag); + + /** + * 查询菜单列表 + * + * @param deleteFlag 是否删除 + * @param disabledFlag 是否禁用 + * @param menuTypeList 菜单类型集合 + * @return + */ + List queryMenuList(@Param("deleteFlag") Boolean deleteFlag, @Param("disabledFlag") Boolean disabledFlag, @Param("menuTypeList") List menuTypeList); + + + /** + * 根据菜单ID 查询功能点列表 + * + * @param menuId 菜单id + * @param menuType 菜单类型 + * @param deleteFlag 删除标记 + * @return + */ + List getPointListByMenuId(@Param("menuId") Long menuId, @Param("menuType") Integer menuType, @Param("deleteFlag") Boolean deleteFlag); + + /** + * 根据员工ID查询菜单列表 + * + * @param deleteFlag 是否删除 + * @param disabledFlag 禁用标识 + * @param employeeId 员工id + * @return + */ + List queryMenuByEmployeeId(@Param("deleteFlag") Boolean deleteFlag, + @Param("disabledFlag") Boolean disabledFlag, + @Param("employeeId") Long employeeId); + + /** + * 查询有效功能点 + * + * @param menuType 菜单类型 + * @param deleteFlag 删除已 + * @param disabledFlag 禁用 + * @return + */ + List queryAllPoint(@Param("menuType") Integer menuType, + @Param("deleteFlag") Boolean deleteFlag, + @Param("disabledFlag") Boolean disabledFlag); +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/MenuEmployeeService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/MenuEmployeeService.java new file mode 100644 index 00000000..294f62a8 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/MenuEmployeeService.java @@ -0,0 +1,156 @@ +package net.lab1024.smartadmin.service.module.system.menu; + +import com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap; +import net.lab1024.smartadmin.service.module.support.systemconfig.SystemConfigConst; +import net.lab1024.smartadmin.service.module.support.systemconfig.SystemConfigService; +import net.lab1024.smartadmin.service.module.system.employee.EmployeeService; +import net.lab1024.smartadmin.service.module.system.login.domain.EmployeeLoginInfoDTO; +import net.lab1024.smartadmin.service.module.system.menu.constant.MenuTypeEnum; +import net.lab1024.smartadmin.service.module.system.menu.domain.MenuLoginBO; +import net.lab1024.smartadmin.service.module.system.menu.domain.MenuTreeVO; +import net.lab1024.smartadmin.service.module.system.menu.domain.MenuVO; +import net.lab1024.smartadmin.service.module.system.role.rolemenu.RoleMenuDao; +import net.lab1024.smartadmin.service.module.system.role.rolemenu.domain.RoleMenuEntity; +import net.lab1024.smartadmin.service.util.SmartStringUtil; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.compress.utils.Lists; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.PostConstruct; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.function.Function; +import java.util.stream.Collectors; + +/** + * 员工菜单缓存 + * + * @author 卓大 + * @date 2021/8/5 11:47 + */ +@Service +public class MenuEmployeeService { + + private static final long SUPER_ROLE_ID = -1L; + + /** + * 员工菜单权限 + */ + private ConcurrentLinkedHashMap> roleMenuListMap = new ConcurrentLinkedHashMap.Builder>().maximumWeightedCapacity(1000).build(); + + @Autowired + private MenuService menuService; + @Autowired + private RoleMenuDao roleMenuDao; + @Autowired + private EmployeeService employeeService; + @Autowired + private SystemConfigService systemConfigService; + + /** + * 初始化角色-菜单权限Map + */ + @PostConstruct + public void initRoleMenuListMap(){ + roleMenuListMap.clear(); + // 查询所有可用菜单列表 + List menuVOList = menuService.queryMenuList(Boolean.FALSE); + // 查询所有角色菜单 + List roleMenuList = roleMenuDao.queryAllRoleMenu(); + Map> roleMenuIdListMap = roleMenuList.stream().collect(Collectors.groupingBy(RoleMenuEntity::getRoleId, Collectors.mapping(RoleMenuEntity::getMenuId, Collectors.toList()))); + for (Map.Entry> roleMenuId : roleMenuIdListMap.entrySet()) { + List menuIdList = roleMenuId.getValue(); + List roleMenuVOList = menuVOList.stream().filter(e -> menuIdList.contains(e.getMenuId())).collect(Collectors.toList()); + roleMenuListMap.put(roleMenuId.getKey(),roleMenuVOList); + } + // map中放入超管权限 + roleMenuListMap.put(SUPER_ROLE_ID,menuVOList); + } + + /** + * 校验用户是否有功能权限 + * @param loginInfoDTO + * @param perms + * @return + */ + public Boolean checkEmployeeHavePrivilege(EmployeeLoginInfoDTO loginInfoDTO, String perms){ + if (StringUtils.isBlank(perms)) { + return false; + } + Boolean isSuperman = loginInfoDTO.getIsSuperMan(); + if (isSuperman) { + return true; + } + List menuList = this.getMenuByRoleIdList(loginInfoDTO.getRoleList(),loginInfoDTO.getIsSuperMan()); + Optional findRes = menuList.stream().filter(e -> { + List permsList = e.getPermsList(); + if(CollectionUtils.isEmpty(permsList)){ + return false; + } + return permsList.contains(perms); + }).findFirst(); + return findRes.isPresent(); + } + + /** + * 判断是否为超级管理员 + * + * @param employeeId + * @return + */ + public Boolean isSuperman(Long employeeId) { + String systemConfigValue = systemConfigService.getConfigValue(SystemConfigConst.Key.EMPLOYEE_SUPERMAN); + List superManIdsList = SmartStringUtil.splitConverToLongList(systemConfigValue, ","); + return superManIdsList.contains(employeeId); + } + + /** + * 根据角色列表查询菜单列表 + * @param roleIdList + * @return + */ + private List getMenuByRoleIdList(List roleIdList, Boolean isSuperman){ + // 超管返回全部菜单权限 + if(isSuperman){ + return roleMenuListMap.get(SUPER_ROLE_ID); + } + + if(CollectionUtils.isEmpty(roleIdList)){ + return Lists.newArrayList(); + } + + List menuVOList = Lists.newArrayList(); + for (Long roleId : roleIdList) { + menuVOList.addAll(roleMenuListMap.getOrDefault(roleId,Lists.newArrayList())); + } + if(CollectionUtils.isEmpty(menuVOList)){ + return Lists.newArrayList(); + } + Map distinctMap = menuVOList.stream().collect(Collectors.toMap(MenuVO::getMenuId, Function.identity(), (f, s) -> f)); + return distinctMap.values().stream().collect(Collectors.toList()); + } + + + /** + * 查询用户拥有的前端菜单项 用于登陆返回 前端动态路由配置 + * @param employeeId + * @return + */ + public MenuLoginBO queryMenuTreeByEmployeeId(Long employeeId){ + // 获取用户权限 + EmployeeLoginInfoDTO employeeLoginInfoDTO = employeeService.getById(employeeId); + // 获取角色菜单权限 + List menuVOList = this.getMenuByRoleIdList(employeeLoginInfoDTO.getRoleList(),employeeLoginInfoDTO.getIsSuperMan()); + //获取菜单树 + Map> parentMap = menuVOList.stream().filter(e->!e.getMenuType().equals(MenuTypeEnum.POINTS.getValue())).collect(Collectors.groupingBy(MenuVO::getParentId, Collectors.toList())); + List menuTreeVOList = menuService.buildMenuTree(parentMap, 0L); + //获取权限列表 + List pointsList = menuVOList.stream().filter(e -> e.getMenuType().equals(MenuTypeEnum.POINTS.getValue())).map(MenuVO::getPerms).collect(Collectors.toList()); + MenuLoginBO menuLoginBO = new MenuLoginBO(menuTreeVOList, pointsList); + return menuLoginBO; + } + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/MenuManager.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/MenuManager.java new file mode 100644 index 00000000..1999ebf3 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/MenuManager.java @@ -0,0 +1,65 @@ +package net.lab1024.smartadmin.service.module.system.menu; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import net.lab1024.smartadmin.service.module.system.menu.constant.MenuTypeEnum; +import net.lab1024.smartadmin.service.module.system.menu.domain.MenuEntity; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + * 菜单Manager层 + * + * @author 卓大 + * @date 2021/7/30 14:26 + */ +@Service +public class MenuManager extends ServiceImpl { + + /** + * 添加菜单 + * + * @param menuEntity + * @param pointEntityList + */ + @Transactional(rollbackFor = Exception.class) + public void addMenu(MenuEntity menuEntity, List pointEntityList) { + //添加菜单 + save(menuEntity); + //构建功能点 + pointEntityList.forEach(e->{ + e.setParentId(menuEntity.getMenuId()); + e.setMenuType(MenuTypeEnum.POINTS.getValue()); + e.setCreateUserId(menuEntity.getCreateUserId()); + }); + //批量添加功能点 + saveBatch(pointEntityList); + } + + /** + * 更新菜单 + * @param menuEntity + * @param savePointList + * @param deletePointList + * @param updatePointList + */ + @Transactional(rollbackFor = Exception.class) + public void updateMenu(MenuEntity menuEntity, List savePointList, List deletePointList, List updatePointList) { + //更新菜单 + updateById(menuEntity); + //构建新增功能点 + savePointList.forEach(e->{ + e.setParentId(menuEntity.getMenuId()); + e.setMenuType(MenuTypeEnum.POINTS.getValue()); + //因为更新操作人在menuEntity的UpdateUserId字段 + e.setCreateUserId(menuEntity.getUpdateUserId()); + }); + //批量添加功能点 + saveBatch(savePointList); + //批量删除功能点 + updateBatchById(deletePointList); + //批量更新功能点 + updateBatchById(updatePointList); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/MenuPermissionService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/MenuPermissionService.java new file mode 100644 index 00000000..d488e915 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/MenuPermissionService.java @@ -0,0 +1,33 @@ +package net.lab1024.smartadmin.service.module.system.menu; + +import net.lab1024.smartadmin.service.common.security.SmartSecurityMetadataSource; +import net.lab1024.smartadmin.service.module.system.login.domain.EmployeeLoginInfoDTO; +import net.lab1024.smartadmin.service.util.SmartEmployeeTokenUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * 菜单权限控制 + * + * @author 卓大 + * @date 2021/8/5 17:14 + */ +@Service(SmartSecurityMetadataSource.PRIVILEGE_CHECK_NAME) +public class MenuPermissionService { + + @Autowired + private MenuEmployeeService menuEmployeeService; + + /** + * 校验是否有权限 + * @param perms + * @return + */ + public boolean checkPermission(String perms){ + EmployeeLoginInfoDTO employeeLoginInfoDTO = SmartEmployeeTokenUtil.getRequestEmployee(); + if(employeeLoginInfoDTO == null){ + return false; + } + return menuEmployeeService.checkEmployeeHavePrivilege(employeeLoginInfoDTO,perms); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/MenuService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/MenuService.java new file mode 100644 index 00000000..8fe36801 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/MenuService.java @@ -0,0 +1,338 @@ +package net.lab1024.smartadmin.service.module.system.menu; + +import com.google.common.collect.Lists; +import net.lab1024.smartadmin.service.common.codeconst.ResponseCodeConst; +import net.lab1024.smartadmin.service.common.constant.CommonConst; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.system.menu.constant.MenuTypeEnum; +import net.lab1024.smartadmin.service.module.system.menu.domain.*; +import net.lab1024.smartadmin.service.util.SmartBeanUtil; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.stream.Collectors; + +/** + * 菜单 + * + * @author 卓大 + * @date 2021/7/29 16:11 + */ +@Service +public class MenuService { + + @Autowired + private MenuDao menuDao; + + @Autowired + private MenuManager menuManager; + + @Autowired + private MenuEmployeeService menuEmployeeService; + + @Autowired + private RequestUrlService requestUrlService; + + /** + * 添加菜单 + * + * @param menuAddForm + * @return + */ + public ResponseDTO addMenu(MenuAddForm menuAddForm) { + // 校验菜单名称 + if (this.validateMenuName(menuAddForm)) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "菜单名称已存在"); + } + MenuEntity menuEntity = SmartBeanUtil.copy(menuAddForm, MenuEntity.class); + // 处理接口权限 + List permsList = menuAddForm.getPermsList(); + if(!CollectionUtils.isEmpty(permsList)){ + String perms = StringUtils.join(permsList, ","); + menuEntity.setPerms(perms); + } + // 功能点列表为空 直接添加菜单 + List pointList = menuAddForm.getPointList(); + if (CollectionUtils.isEmpty(pointList)) { + menuDao.insert(menuEntity); + // 更新角色权限缓存 + menuEmployeeService.initRoleMenuListMap(); + return ResponseDTO.succ(); + } + // 若功能点列表不为空 + ResponseDTO> responseDTO = this.validateBuildPointList(menuAddForm.getMenuType(), pointList); + if (!responseDTO.isSuccess()) { + return ResponseDTO.wrap(responseDTO); + } + menuManager.addMenu(menuEntity, responseDTO.getData()); + // 更新角色权限缓存 + menuEmployeeService.initRoleMenuListMap(); + return ResponseDTO.succ(); + } + + /** + * 更新菜单 + * + * @param menuUpdateForm + * @return + */ + public ResponseDTO updateMenu(MenuUpdateForm menuUpdateForm) { + //校验菜单是否存在 + MenuEntity selectMenu = menuDao.selectById(menuUpdateForm.getMenuId()); + if (selectMenu == null) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "菜单不存在"); + } + if (selectMenu.getDeleteFlag()) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "菜单已被删除"); + } + //校验菜单名称 + if (this.validateMenuName(menuUpdateForm)) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "菜单名称已存在"); + } + if (menuUpdateForm.getMenuId().equals(menuUpdateForm.getParentId())) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "上级菜单不能为自己"); + } + MenuEntity menuEntity = SmartBeanUtil.copy(menuUpdateForm, MenuEntity.class); + // 处理接口权限 + List permsList = menuUpdateForm.getPermsList(); + if(!CollectionUtils.isEmpty(permsList)){ + String perms = StringUtils.join(permsList, ","); + menuEntity.setPerms(perms); + } + //功能点列表为空 直接修改菜单 + List pointList = menuUpdateForm.getPointList(); + if (CollectionUtils.isEmpty(pointList)) { + menuDao.updateById(menuEntity); + // 更新角色权限缓存 + menuEmployeeService.initRoleMenuListMap(); + return ResponseDTO.succ(); + } + //若功能点列表不为空 + ResponseDTO> validateBuildPointList = this.validateBuildPointList(menuUpdateForm.getMenuType(), pointList); + if (!validateBuildPointList.isSuccess()) { + return ResponseDTO.wrap(validateBuildPointList); + } + List pointEntityList = validateBuildPointList.getData(); + //查询当前菜单下的功能点列表 + List pointListByMenuId = menuDao.getPointListByMenuId(menuEntity.getMenuId(), MenuTypeEnum.POINTS.getValue(), Boolean.FALSE); + //新增的功能点 + List savePointList = pointEntityList.stream().filter(e -> e.getMenuId() == null).collect(Collectors.toList()); + //删除的功能点 + List deletePointList = Lists.newArrayList(); + //更新的功能点 + List updatePointList = Lists.newArrayList(); + //获取修改、移除的功能点列表 + for (MenuEntity menu : pointListByMenuId) { + Optional findMenu = pointEntityList.stream().filter(e -> e.getMenuId() != null && e.getMenuId().equals(menu.getMenuId())).findFirst(); + //删除的 + if (!findMenu.isPresent()) { + menu.setDeleteFlag(Boolean.TRUE); + menu.setUpdateUserId(menuUpdateForm.getUpdateUserId()); + deletePointList.add(menu); + continue; + } + MenuEntity requestMenu = findMenu.get(); + //是否更新 + Long requestContextMenuId = requestMenu.getContextMenuId() == null ? -1L : requestMenu.getContextMenuId(); + Long menuContextMenuId = menu.getContextMenuId() == null ? -1L : menu.getContextMenuId(); + if (!requestMenu.getMenuName().equals(menu.getMenuName()) + || !requestMenu.getDisabledFlag().equals(menu.getDisabledFlag()) + || !requestMenu.getPerms().equals(menu.getPerms()) + || !requestContextMenuId.equals(menuContextMenuId)) { + requestMenu.setUpdateUserId(menuUpdateForm.getUpdateUserId()); + updatePointList.add(requestMenu); + } + } + menuManager.updateMenu(menuEntity, savePointList, deletePointList, updatePointList); + // 更新角色权限缓存 + menuEmployeeService.initRoleMenuListMap(); + return ResponseDTO.succ(); + } + + /** + * 校验构建功能点列表 + * + * @param menuType + * @param pointList + * @return + */ + private ResponseDTO> validateBuildPointList(Integer menuType, List pointList) { + //判断 目录/功能点不能添加功能点 + if (!MenuTypeEnum.MENU.equalsValue(menuType)) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "目录/功能点不能添加子功能点"); + } + //构建功能点对象 + List pointEntityList = pointList.stream().map(e -> { + MenuEntity menu = SmartBeanUtil.copy(e, MenuEntity.class); + // 处理接口权限 + List permsList = e.getPermsList(); + if(!CollectionUtils.isEmpty(permsList)){ + String perms = StringUtils.join(permsList, ","); + menu.setPerms(perms); + } + return menu; + }).collect(Collectors.toList()); + //校验功能点名称是否重复 + Map nameGroupBy = pointEntityList.stream().collect(Collectors.groupingBy(MenuEntity::getMenuName, Collectors.counting())); + List repeatName = nameGroupBy.entrySet().stream().filter(e -> e.getValue() > 1).map(e -> e.getKey()).collect(Collectors.toList()); + if (!CollectionUtils.isEmpty(repeatName)) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "功能点:" + String.join("、", repeatName) + ",名称重复"); + } + return ResponseDTO.succData(pointEntityList); + } + + /** + * 批量删除菜单 + * + * @param menuIdList + * @param employeeId + * @return + */ + public ResponseDTO batchDeleteMenu(List menuIdList, Long employeeId) { + if (CollectionUtils.isEmpty(menuIdList)) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ERROR_PARAM, "所选菜单不能为空"); + } + menuDao.deleteByMenuIdList(menuIdList, employeeId, Boolean.TRUE); + // 更新角色权限缓存 + menuEmployeeService.initRoleMenuListMap(); + return ResponseDTO.succ(); + } + + /** + * 校验菜单名称 + * + * @param menuDTO + * @param + * @return true 重复 false 未重复 + */ + public Boolean validateMenuName(T menuDTO) { + MenuEntity menu = menuDao.getByMenuName(menuDTO.getMenuName(), menuDTO.getParentId(), Boolean.FALSE); + if (menuDTO instanceof MenuAddForm) { + return menu != null; + } + if (menuDTO instanceof MenuUpdateForm) { + Long menuId = ((MenuUpdateForm) menuDTO).getMenuId(); + return menu != null && menu.getMenuId().longValue() != menuId.longValue(); + } + return true; + } + + /** + * 查询菜单列表 + * + * @return + */ + public List queryMenuList(Boolean disabledFlag) { + List menuVOList = menuDao.queryMenuList(Boolean.FALSE, disabledFlag, null); + //根据ParentId进行分组 + Map> parentMap = menuVOList.stream().collect(Collectors.groupingBy(MenuVO::getParentId, Collectors.toList())); + List filterMenuVOList = this.filterNoParentMenu(parentMap, CommonConst.DEFAULT_PARENT_ID); + return filterMenuVOList; + } + + /** + * 过滤没有上级菜单的菜单列表 + * + * @param parentMap + * @param parentId + * @return + */ + private List filterNoParentMenu(Map> parentMap, Long parentId) { + // 获取本级菜单树List + List res = parentMap.getOrDefault(parentId, Lists.newArrayList()); + List childMenu = Lists.newArrayList(); + // 循环遍历下级菜单 + res.forEach(e -> { + //处理接口权限 + String perms = e.getPerms(); + if(!StringUtils.isBlank(perms)){ + List permsList = Lists.newArrayList(StringUtils.split(perms, ",")); + e.setPermsList(permsList); + } + List menuList = this.filterNoParentMenu(parentMap, e.getMenuId()); + childMenu.addAll(menuList); + }); + res.addAll(childMenu); + return res; + } + + /** + * 查询菜单树 + * + * @param onlyMenu 不查询功能点 + * @return + */ + public ResponseDTO> queryMenuTree(Boolean onlyMenu) { + List menuTypeList = Lists.newArrayList(); + if (onlyMenu) { + menuTypeList = Lists.newArrayList(MenuTypeEnum.CATALOG.getValue(), MenuTypeEnum.MENU.getValue()); + } + List menuVOList = menuDao.queryMenuList(Boolean.FALSE, null, menuTypeList); + //根据ParentId进行分组 + Map> parentMap = menuVOList.stream().collect(Collectors.groupingBy(MenuVO::getParentId, Collectors.toList())); + List menuTreeVOList = this.buildMenuTree(parentMap, CommonConst.DEFAULT_PARENT_ID); + return ResponseDTO.succData(menuTreeVOList); + } + + /** + * 构建菜单树 + * + * @return + */ + List buildMenuTree(Map> parentMap, Long parentId) { + // 获取本级菜单树List + List res = parentMap.getOrDefault(parentId, Lists.newArrayList()).stream() + .map(e -> SmartBeanUtil.copy(e, MenuTreeVO.class)).collect(Collectors.toList()); + // 循环遍历下级菜单 + res.forEach(e -> { + //处理接口权限 + String perms = e.getPerms(); + if(!StringUtils.isBlank(perms)){ + List permsList = Lists.newArrayList(StringUtils.split(perms, ",")); + e.setPermsList(permsList); + } + e.setChildren(this.buildMenuTree(parentMap, e.getMenuId())); + }); + return res; + } + + /** + * 查询菜单详情 + * + * @param menuId + * @return + */ + public ResponseDTO getMenuDetail(Long menuId) { + //校验菜单是否存在 + MenuEntity selectMenu = menuDao.selectById(menuId); + if (selectMenu == null) { + return ResponseDTO.wrapMsg(ResponseCodeConst.SYSTEM_ERROR, "菜单不存在"); + } + if (selectMenu.getDeleteFlag()) { + return ResponseDTO.wrapMsg(ResponseCodeConst.SYSTEM_ERROR, "菜单已被删除"); + } + MenuVO menuVO = SmartBeanUtil.copy(selectMenu, MenuVO.class); + //处理接口权限 + String perms = menuVO.getPerms(); + if(!StringUtils.isBlank(perms)){ + List permsList = Lists.newArrayList(StringUtils.split(perms, ",")); + menuVO.setPermsList(permsList); + } + return ResponseDTO.succData(menuVO); + } + + /** + * 获取系统所有请求路径 + * + * @return + */ + public ResponseDTO> getPrivilegeUrlDTOList() { + List privilegeUrlList = requestUrlService.getPrivilegeList(); + return ResponseDTO.succData(privilegeUrlList); + } +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/service/PrivilegeRequestUrlService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/RequestUrlService.java similarity index 74% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/service/PrivilegeRequestUrlService.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/RequestUrlService.java index f9aa07aa..d19990fd 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/service/PrivilegeRequestUrlService.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/RequestUrlService.java @@ -1,13 +1,13 @@ -package net.lab1024.smartadmin.module.system.privilege.service; +package net.lab1024.smartadmin.service.module.system.menu; -import net.lab1024.smartadmin.constant.CommonConst; -import net.lab1024.smartadmin.module.system.privilege.domain.dto.PrivilegeRequestUrlVO; -import net.lab1024.smartadmin.util.SmartStringUtil; import com.google.common.collect.Lists; import com.google.common.collect.Sets; import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiOperation; -import org.apache.commons.collections.CollectionUtils; +import net.lab1024.smartadmin.service.common.constant.CommonConst; +import net.lab1024.smartadmin.service.module.system.menu.domain.RequestUrlVO; +import net.lab1024.smartadmin.service.util.SmartStringUtil; +import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.annotation.AnnotationUtils; import org.springframework.stereotype.Service; @@ -25,29 +25,25 @@ import java.util.Set; import java.util.concurrent.CopyOnWriteArrayList; /** - * [ 初始化 分离前后台权限URL ] + * 分离前后台权限URL * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/3/28 0028 上午 9:13 - * @since JDK1.8 + * @author 卓大 + * @date 2021/9/1 20:14 */ @Service -public class PrivilegeRequestUrlService { +public class RequestUrlService { /** * 系统所有requestUrl */ - private CopyOnWriteArrayList privilegeUrlDTOList = Lists.newCopyOnWriteArrayList(); + private CopyOnWriteArrayList requestUrlVOS = Lists.newCopyOnWriteArrayList(); @Autowired private WebApplicationContext applicationContext; @PostConstruct public void initAllUrl() { - this.privilegeUrlDTOList.clear(); + this.requestUrlVOS.clear(); RequestMappingHandlerMapping mapping = applicationContext.getBean(RequestMappingHandlerMapping.class); //获取url与类和方法的对应信息 @@ -66,7 +62,7 @@ public class PrivilegeRequestUrlService { if (CollectionUtils.isEmpty(patterns)) { return; } - String className = (String) handlerMethod.getBean(); + String className = handlerMethod.getMethod().getDeclaringClass().getName(); String methodName = handlerMethod.getMethod().getName(); List list = SmartStringUtil.splitConvertToList(className, "\\."); String controllerName = list.get(list.size() - 1); @@ -86,11 +82,11 @@ public class PrivilegeRequestUrlService { } Set urlSet = this.getUrlSet(patterns); for (String url : urlSet) { - PrivilegeRequestUrlVO privilegeUrlDTO = new PrivilegeRequestUrlVO(); - privilegeUrlDTO.setUrl(url); - privilegeUrlDTO.setName(name); - privilegeUrlDTO.setComment(methodComment); - this.privilegeUrlDTOList.add(privilegeUrlDTO); + RequestUrlVO requestUrlVO = new RequestUrlVO(); + requestUrlVO.setUrl(url); + requestUrlVO.setName(name); + requestUrlVO.setComment(methodComment); + this.requestUrlVOS.add(requestUrlVO); } }); @@ -99,7 +95,7 @@ public class PrivilegeRequestUrlService { private Set getUrlSet(Set patterns) { Set urlSet = Sets.newHashSet(); for (String url : patterns) { - for (String ignoreUrl : CommonConst.CommonCollection.IGNORE_URL_MAPPING) { + for (String ignoreUrl : CommonConst.CommonCollection.IGNORE_URL) { if (url.startsWith(ignoreUrl)) { urlSet.add(url.substring(ignoreUrl.length() - 1)); } else { @@ -110,8 +106,8 @@ public class PrivilegeRequestUrlService { return urlSet; } - public List getPrivilegeList() { - return this.privilegeUrlDTOList; + public List getPrivilegeList() { + return this.requestUrlVOS; } } diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/constant/MenuTypeEnum.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/constant/MenuTypeEnum.java new file mode 100644 index 00000000..f15268c8 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/constant/MenuTypeEnum.java @@ -0,0 +1,45 @@ +package net.lab1024.smartadmin.service.module.system.menu.constant; + + +import net.lab1024.smartadmin.service.common.constant.BaseEnum; + +/** + * 菜单类型枚举 + * + * @author 卓大 + * @date 2021/7/29 15:30 + */ +public enum MenuTypeEnum implements BaseEnum { + /** + * 目录 + */ + CATALOG(1, "目录"), + /** + * 菜单 + */ + MENU(2, "菜单"), + /** + * 功能点 + */ + POINTS(3, "功能点"); + + private Integer value; + + private String desc; + + + MenuTypeEnum(Integer value, String desc) { + this.value = value; + this.desc = desc; + } + + @Override + public Integer getValue() { + return value; + } + + @Override + public String getDesc() { + return desc; + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuAddForm.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuAddForm.java new file mode 100644 index 00000000..36fd6a3c --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuAddForm.java @@ -0,0 +1,22 @@ +package net.lab1024.smartadmin.service.module.system.menu.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.Valid; +import java.util.List; + +/** + * @author 卓大 + * @Date 2021/7/27 + */ +@Data +public class MenuAddForm extends MenuBasicDTO { + + @ApiModelProperty(hidden = true) + private Long createUserId; + + @ApiModelProperty("功能点列表") + @Valid + private List pointList; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuBasicDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuBasicDTO.java new file mode 100644 index 00000000..921bd2f1 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuBasicDTO.java @@ -0,0 +1,72 @@ +package net.lab1024.smartadmin.service.module.system.menu.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import net.lab1024.smartadmin.service.common.swagger.ApiModelPropertyEnum; +import net.lab1024.smartadmin.service.common.validator.CheckEnum; +import net.lab1024.smartadmin.service.module.system.menu.constant.MenuTypeEnum; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.util.List; + +/** + * 菜单基础 + * + * @author 卓大 + * @date 2021/7/29 16:16 + */ +@Data +public class MenuBasicDTO { + + @ApiModelProperty("菜单名称") + @NotBlank(message = "菜单名称不能为空") + @Length(max = 30, message = "菜单名称最多30个字符") + private String menuName; + + @ApiModelPropertyEnum(value = MenuTypeEnum.class, desc = "类型") + @CheckEnum(enumClazz = MenuTypeEnum.class, message = "类型错误") + private Integer menuType; + + @ApiModelProperty("父菜单ID 无上级可传0") + @NotNull(message = "父菜单ID不能为空") + private Long parentId; + + @ApiModelProperty("显示顺序") + private Integer sort; + + @ApiModelProperty("路由地址") + private String path; + + @ApiModelProperty("组件路径") + private String component; + + @ApiModelProperty("是否为外链") + @NotNull(message = "是否为外链不能为空") + private Boolean frameFlag; + + @ApiModelProperty("是否缓存") + @NotNull(message = "是否缓存不能为空") + private Boolean cacheFlag; + + @ApiModelProperty("显示状态") + @NotNull(message = "显示状态不能为空") + private Boolean visibleFlag; + + @ApiModelProperty("禁用状态") + @NotNull(message = "禁用状态不能为空") + private Boolean disabledFlag; + + @ApiModelProperty("接口权限") + private String perms; + + @ApiModelProperty("接口权限(拆分)") + private List permsList; + + @ApiModelProperty("菜单图标") + private String icon; + + @ApiModelProperty("功能点关联菜单ID") + private Long contextMenuId; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuEntity.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuEntity.java new file mode 100644 index 00000000..11023a5c --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuEntity.java @@ -0,0 +1,114 @@ +package net.lab1024.smartadmin.service.module.system.menu.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * @author 卓大 + * @Date 2021/7/27 + */ +@Data +@TableName(value = "t_menu") +public class MenuEntity { + + /** + * 菜单ID + */ + @TableId(type = IdType.AUTO) + private Long menuId; + + /** + * 菜单名称 + */ + private String menuName; + + /** + * 类型 + * @see MenuTypeEnum + */ + private Integer menuType; + + /** + * 父菜单ID + */ + private Long parentId; + + /** + * 显示顺序 + */ + private Integer sort; + + /** + * 路由地址 + */ + private String path; + + /** + * 组件路径 + */ + private String component; + + /** + * 是否为外链 + */ + private Boolean frameFlag; + + /** + * 是否缓存 + */ + private Boolean cacheFlag; + + /** + * 显示状态 + */ + private Boolean visibleFlag; + + /** + * 禁用状态 + */ + private Boolean disabledFlag; + + /** + * 权限字符串 + */ + private String perms; + + /** + * 菜单图标 + */ + private String icon; + + /** + * 功能点关联菜单ID + */ + private Long contextMenuId; + + /** + * 删除状态 + */ + private Boolean deleteFlag; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 创建人 + */ + private Long createUserId; + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + /** + * 更新人 + */ + private Long updateUserId; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuLoginBO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuLoginBO.java new file mode 100644 index 00000000..b35f67c8 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuLoginBO.java @@ -0,0 +1,33 @@ +package net.lab1024.smartadmin.service.module.system.menu.domain; + +import lombok.Data; + +import java.util.List; + +/** + * 登陆时需要的菜单BO + * + * @author 卓大 + * @date 2021/8/5 11:35 + */ +@Data +public class MenuLoginBO { + + /** + * 菜单树 + */ + private List menuTree; + + /** + * 功能点权限列表 + */ + private List pointsList; + + public MenuLoginBO() { + } + + public MenuLoginBO(List menuTree, List pointsList) { + this.menuTree = menuTree; + this.pointsList = pointsList; + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuPointsOperateForm.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuPointsOperateForm.java new file mode 100644 index 00000000..bd1785ba --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuPointsOperateForm.java @@ -0,0 +1,37 @@ +package net.lab1024.smartadmin.service.module.system.menu.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.util.List; + +/** + * 菜单功能点操作Form + * + * @author 卓大 + * @date 2021/7/30 10:56 + */ +@Data +public class MenuPointsOperateForm { + + @ApiModelProperty("菜单ID") + private Long menuId; + + @ApiModelProperty("功能点名称") + @NotBlank(message = "功能点不能为空") + @Length(max = 30, message = "功能点最多30个字符") + private String menuName; + + @ApiModelProperty("禁用状态") + @NotNull(message = "禁用状态不能为空") + private Boolean disabledFlag; + + @ApiModelProperty("接口权限") + private List permsList; + + @ApiModelProperty("功能点关联菜单ID") + private Long contextMenuId; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuSimpleTreeVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuSimpleTreeVO.java new file mode 100644 index 00000000..d09d803d --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuSimpleTreeVO.java @@ -0,0 +1,34 @@ +package net.lab1024.smartadmin.service.module.system.menu.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * 简易的菜单VO + * + * @author 卓大 + * @date 2021/7/30 17:41 + */ +@Data +public class MenuSimpleTreeVO { + + @ApiModelProperty("菜单ID") + private Long menuId; + + @ApiModelProperty("菜单名称") + private String menuName; + + @ApiModelProperty("功能点关联菜单ID") + private Long contextMenuId; + + @ApiModelProperty("父级菜单ID") + private Long parentId; + + @ApiModelProperty("菜单类型") + private Integer menuType; + + @ApiModelProperty("子菜单") + private List children; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuTreeVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuTreeVO.java new file mode 100644 index 00000000..540384af --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuTreeVO.java @@ -0,0 +1,19 @@ +package net.lab1024.smartadmin.service.module.system.menu.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * 菜单功能点操作Form + * + * @author 卓大 + * @date 2021/7/30 10:56 + */ +@Data +public class MenuTreeVO extends MenuVO{ + + @ApiModelProperty("菜单子集") + private List children; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuUpdateForm.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuUpdateForm.java new file mode 100644 index 00000000..07ee34e6 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuUpdateForm.java @@ -0,0 +1,27 @@ +package net.lab1024.smartadmin.service.module.system.menu.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.Valid; +import javax.validation.constraints.NotNull; +import java.util.List; + +/** + * @author 卓大 + * @Date 2021/7/27 + */ +@Data +public class MenuUpdateForm extends MenuBasicDTO { + + @ApiModelProperty("菜单ID") + @NotNull(message = "菜单ID不能为空") + private Long menuId; + + @ApiModelProperty(hidden = true) + private Long updateUserId; + + @ApiModelProperty("功能点列表") + @Valid + private List pointList; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuVO.java new file mode 100644 index 00000000..01ed51fa --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/MenuVO.java @@ -0,0 +1,29 @@ +package net.lab1024.smartadmin.service.module.system.menu.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * @author 卓大 + * @Date 2021/7/27 + */ +@Data +public class MenuVO extends MenuBasicDTO{ + + @ApiModelProperty("菜单ID") + private Long menuId; + + @ApiModelProperty("创建时间") + private LocalDateTime createTime; + + @ApiModelProperty("创建人") + private Long createUserId; + + @ApiModelProperty("更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty("更新人") + private Long updateUserId; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/RequestUrlVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/RequestUrlVO.java new file mode 100644 index 00000000..5b722ff5 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/menu/domain/RequestUrlVO.java @@ -0,0 +1,23 @@ +package net.lab1024.smartadmin.service.module.system.menu.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Description + * + * @author 卓大 + * @date 2021/9/1 20:15 + */ +@Data +public class RequestUrlVO { + + @ApiModelProperty("注释说明") + private String comment; + + @ApiModelProperty("controller.method") + private String name; + + @ApiModelProperty("url") + private String url; +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/RoleController.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/RoleController.java similarity index 73% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/RoleController.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/RoleController.java index c95afff7..e62b26c4 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/RoleController.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/RoleController.java @@ -1,12 +1,13 @@ -package net.lab1024.smartadmin.module.system.role.basic; -import net.lab1024.smartadmin.common.anno.OperateLog; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.constant.SwaggerTagConst; -import net.lab1024.smartadmin.module.system.role.basic.domain.dto.RoleAddDTO; -import net.lab1024.smartadmin.module.system.role.basic.domain.dto.RoleUpdateDTO; -import net.lab1024.smartadmin.module.system.role.basic.domain.dto.RoleVO; +package net.lab1024.smartadmin.service.module.system.role.basic; + import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import net.lab1024.smartadmin.service.common.constant.SwaggerTagConst; +import net.lab1024.smartadmin.service.common.controller.AdminBaseController; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.system.role.basic.domain.dto.RoleAddDTO; +import net.lab1024.smartadmin.service.module.system.role.basic.domain.dto.RoleUpdateDTO; +import net.lab1024.smartadmin.service.module.system.role.basic.domain.vo.RoleVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -20,9 +21,8 @@ import java.util.List; * @date 2017/12/28 10:10 */ @Api(tags = {SwaggerTagConst.Admin.MANAGER_ROLE}) -@OperateLog @RestController -public class RoleController { +public class RoleController extends AdminBaseController { @Autowired private RoleService roleService; diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/RoleDao.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/RoleDao.java similarity index 53% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/RoleDao.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/RoleDao.java index 91b83b4f..744092e5 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/RoleDao.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/RoleDao.java @@ -1,20 +1,15 @@ -package net.lab1024.smartadmin.module.system.role.basic; +package net.lab1024.smartadmin.service.module.system.role.basic; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import net.lab1024.smartadmin.module.system.role.basic.domain.entity.RoleEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Component; +import net.lab1024.smartadmin.service.module.system.role.basic.domain.entity.RoleEntity; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/3/27 0027 下午 13:00 - * @since JDK1.8 + * @author 罗伊 */ @Mapper @Component diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/RoleService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/RoleService.java similarity index 60% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/RoleService.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/RoleService.java index cd0d6444..1bbd3f14 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/RoleService.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/RoleService.java @@ -1,18 +1,20 @@ -package net.lab1024.smartadmin.module.system.role.basic; +package net.lab1024.smartadmin.service.module.system.role.basic; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.module.system.role.basic.domain.dto.RoleAddDTO; -import net.lab1024.smartadmin.module.system.role.basic.domain.dto.RoleUpdateDTO; -import net.lab1024.smartadmin.module.system.role.basic.domain.dto.RoleVO; -import net.lab1024.smartadmin.module.system.role.basic.domain.entity.RoleEntity; -import net.lab1024.smartadmin.module.system.role.roleemployee.RoleEmployeeDao; -import net.lab1024.smartadmin.module.system.role.roleprivilege.RolePrivilegeDao; -import net.lab1024.smartadmin.util.SmartBeanUtil; +import net.lab1024.smartadmin.service.common.codeconst.ResponseCodeConst; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.system.role.basic.domain.dto.RoleAddDTO; +import net.lab1024.smartadmin.service.module.system.role.basic.domain.dto.RoleUpdateDTO; +import net.lab1024.smartadmin.service.module.system.role.basic.domain.entity.RoleEntity; +import net.lab1024.smartadmin.service.module.system.role.basic.domain.vo.RoleVO; +import net.lab1024.smartadmin.service.module.system.role.roleemployee.RoleEmployeeDao; +import net.lab1024.smartadmin.service.module.system.role.rolemenu.RoleMenuDao; +import net.lab1024.smartadmin.service.util.SmartBeanUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.List; +import java.util.Objects; /** * 角色管理业务 @@ -27,7 +29,7 @@ public class RoleService { private RoleDao roleDao; @Autowired - private RolePrivilegeDao rolePrivilegeDao; + private RoleMenuDao roleMenuDao; @Autowired private RoleEmployeeDao roleEmployeeDao; @@ -36,12 +38,12 @@ public class RoleService { * 新增添加角色 * * @param roleAddDTO - * @return ResponseDTO + * @return RespDTO */ public ResponseDTO addRole(RoleAddDTO roleAddDTO) { RoleEntity employeeRoleEntity = roleDao.getByRoleName(roleAddDTO.getRoleName()); if (null != employeeRoleEntity) { - return ResponseDTO.wrap(RoleResponseCodeConst.ROLE_NAME_EXISTS); + return ResponseDTO.wrapMsg(ResponseCodeConst.ALREADY_EXIST, "角色名称重复"); } RoleEntity roleEntity = SmartBeanUtil.copy(roleAddDTO, RoleEntity.class); roleDao.insert(roleEntity); @@ -52,16 +54,16 @@ public class RoleService { * 根据角色id 删除 * * @param roleId - * @return ResponseDTO + * @return RespDTO */ @Transactional(rollbackFor = Exception.class) public ResponseDTO deleteRole(Long roleId) { RoleEntity roleEntity = roleDao.selectById(roleId); if (null == roleEntity) { - return ResponseDTO.wrap(RoleResponseCodeConst.ROLE_NOT_EXISTS); + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); } roleDao.deleteById(roleId); - rolePrivilegeDao.deleteByRoleId(roleId); + roleMenuDao.deleteByRoleId(roleId); roleEmployeeDao.deleteByRoleId(roleId); return ResponseDTO.succ(); } @@ -70,16 +72,17 @@ public class RoleService { * 更新角色 * * @param roleUpdateDTO - * @return ResponseDTO + * @return RespDTO */ @Transactional(rollbackFor = Exception.class) public ResponseDTO updateRole(RoleUpdateDTO roleUpdateDTO) { - if (null == roleDao.selectById(roleUpdateDTO.getId())) { - return ResponseDTO.wrap(RoleResponseCodeConst.ROLE_NOT_EXISTS); + Long roleId = roleUpdateDTO.getId(); + if (null == roleDao.selectById(roleId)) { + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); } RoleEntity employeeRoleEntity = roleDao.getByRoleName(roleUpdateDTO.getRoleName()); - if (null != employeeRoleEntity && ! employeeRoleEntity.getId().equals(roleUpdateDTO.getId())) { - return ResponseDTO.wrap(RoleResponseCodeConst.ROLE_NAME_EXISTS); + if (null != employeeRoleEntity && !Objects.equals(employeeRoleEntity.getId(), roleId)) { + return ResponseDTO.wrapMsg(ResponseCodeConst.ALREADY_EXIST, "角色名称重复"); } RoleEntity roleEntity = SmartBeanUtil.copy(roleUpdateDTO, RoleEntity.class); roleDao.updateById(roleEntity); @@ -90,12 +93,12 @@ public class RoleService { * 根据id获取角色数据 * * @param roleId - * @return ResponseDTO + * @return RespDTO */ public ResponseDTO getRoleById(Long roleId) { RoleEntity roleEntity = roleDao.selectById(roleId); if (null == roleEntity) { - return ResponseDTO.wrap(RoleResponseCodeConst.ROLE_NOT_EXISTS); + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); } RoleVO role = SmartBeanUtil.copy(roleEntity, RoleVO.class); return ResponseDTO.succData(role); @@ -104,7 +107,7 @@ public class RoleService { /** * 获取所有角色列表 * - * @return ResponseDTO + * @return RespDTO */ public ResponseDTO> getAllRole() { List roleEntityList = roleDao.selectList(null); diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/domain/dto/RoleAddDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/domain/dto/RoleAddDTO.java similarity index 89% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/domain/dto/RoleAddDTO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/domain/dto/RoleAddDTO.java index ba66b68e..24b1b04e 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/domain/dto/RoleAddDTO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/domain/dto/RoleAddDTO.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.module.system.role.basic.domain.dto; +package net.lab1024.smartadmin.service.module.system.role.basic.domain.dto; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.hibernate.validator.constraints.Length; diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/domain/dto/RoleQueryDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/domain/dto/RoleQueryDTO.java new file mode 100644 index 00000000..83987bf7 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/domain/dto/RoleQueryDTO.java @@ -0,0 +1,20 @@ +package net.lab1024.smartadmin.service.module.system.role.basic.domain.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import net.lab1024.smartadmin.service.common.domain.PageBaseDTO; + +/** + * [ ] + * + * @author 罗伊 + */ +@Data +public class RoleQueryDTO extends PageBaseDTO { + + @ApiModelProperty("角色名称") + private String roleName; + + @ApiModelProperty("角色id") + private String roleId; +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/domain/dto/RoleUpdateDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/domain/dto/RoleUpdateDTO.java similarity index 83% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/domain/dto/RoleUpdateDTO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/domain/dto/RoleUpdateDTO.java index adde4749..eee16665 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/domain/dto/RoleUpdateDTO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/domain/dto/RoleUpdateDTO.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.module.system.role.basic.domain.dto; +package net.lab1024.smartadmin.service.module.system.role.basic.domain.dto; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/domain/entity/RoleEntity.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/domain/entity/RoleEntity.java new file mode 100644 index 00000000..44a8f306 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/domain/entity/RoleEntity.java @@ -0,0 +1,37 @@ +package net.lab1024.smartadmin.service.module.system.role.basic.domain.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * [ 角色 ] + * + * @author 罗伊 + */ +@Data +@TableName("t_role") +public class RoleEntity { + /** + * 主键id + */ + @TableId(type = IdType.AUTO) + private Long id; + + private String roleName; + + private String remark; + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + /** + * 创建时间 + */ + private LocalDateTime createTime; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/domain/vo/RoleSelectedVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/domain/vo/RoleSelectedVO.java new file mode 100644 index 00000000..ba47d33f --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/domain/vo/RoleSelectedVO.java @@ -0,0 +1,16 @@ +package net.lab1024.smartadmin.service.module.system.role.basic.domain.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * [ ] + * + * @author 罗伊 + */ +@Data +public class RoleSelectedVO extends RoleVO { + + @ApiModelProperty("角色名称") + private Boolean selected; +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/domain/dto/RoleVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/domain/vo/RoleVO.java similarity index 55% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/domain/dto/RoleVO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/domain/vo/RoleVO.java index 9f3eed90..63d36d81 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/domain/dto/RoleVO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/basic/domain/vo/RoleVO.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.module.system.role.basic.domain.dto; +package net.lab1024.smartadmin.service.module.system.role.basic.domain.vo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -6,12 +6,7 @@ import lombok.Data; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/3/27 0027 下午 15:27 - * @since JDK1.8 + * @author 罗伊 */ @Data public class RoleVO { diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleemployee/RoleEmployeeController.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/roleemployee/RoleEmployeeController.java similarity index 73% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleemployee/RoleEmployeeController.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/roleemployee/RoleEmployeeController.java index 72c4e507..021bea7c 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleemployee/RoleEmployeeController.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/roleemployee/RoleEmployeeController.java @@ -1,17 +1,17 @@ -package net.lab1024.smartadmin.module.system.role.roleemployee; +package net.lab1024.smartadmin.service.module.system.role.roleemployee; -import net.lab1024.smartadmin.common.anno.OperateLog; -import net.lab1024.smartadmin.common.domain.PageResultDTO; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.constant.SwaggerTagConst; -import net.lab1024.smartadmin.module.system.employee.domain.vo.EmployeeVO; -import net.lab1024.smartadmin.module.system.role.basic.domain.dto.RoleBatchDTO; -import net.lab1024.smartadmin.module.system.role.basic.domain.dto.RoleQueryDTO; -import net.lab1024.smartadmin.module.system.role.basic.domain.dto.RoleSelectedVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; +import net.lab1024.smartadmin.service.common.constant.SwaggerTagConst; +import net.lab1024.smartadmin.service.common.controller.AdminBaseController; +import net.lab1024.smartadmin.service.common.domain.PageResultDTO; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.system.employee.domain.vo.EmployeeVO; +import net.lab1024.smartadmin.service.module.system.role.basic.domain.dto.RoleQueryDTO; +import net.lab1024.smartadmin.service.module.system.role.basic.domain.vo.RoleSelectedVO; +import net.lab1024.smartadmin.service.module.system.role.roleemployee.domain.RoleEmployeeBatchDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -24,10 +24,9 @@ import java.util.List; * @author listen * @date 2017/12/28 10:10 */ -@Api(tags = {SwaggerTagConst.Admin.MANAGER_ROLE_USER}) -@OperateLog +@Api(tags = {SwaggerTagConst.Admin.MANAGER_ROLE}) @RestController -public class RoleEmployeeController { +public class RoleEmployeeController extends AdminBaseController { @Autowired private RoleEmployeeService roleEmployeeService; @@ -46,7 +45,7 @@ public class RoleEmployeeController { @ApiOperation(value = "从角色成员列表中移除员工", notes = "从角色成员列表中移除员工") @ApiImplicitParams({@ApiImplicitParam(name = "employeeId", value = "员工id", paramType = "query", required = true), @ApiImplicitParam(name = "roleId", value = "角色id", paramType = "query", - required = true)}) + required = true)}) @GetMapping("/role/removeEmployee") public ResponseDTO removeEmployee(Long employeeId, Long roleId) { return roleEmployeeService.removeEmployeeRole(employeeId, roleId); @@ -54,14 +53,14 @@ public class RoleEmployeeController { @ApiOperation(value = "从角色成员列表中批量移除员工", notes = "从角色成员列表中批量移除员工") @PostMapping("/role/removeEmployeeList") - public ResponseDTO removeEmployeeList(@Valid @RequestBody RoleBatchDTO removeDTO) { + public ResponseDTO removeEmployeeList(@Valid @RequestBody RoleEmployeeBatchDTO removeDTO) { return roleEmployeeService.batchRemoveEmployeeRole(removeDTO); } @ApiOperation(value = "角色成员列表中批量添加员工", notes = "角色成员列表中批量添加员工") @PostMapping("/role/addEmployeeList") - public ResponseDTO addEmployeeList(@Valid @RequestBody RoleBatchDTO addDTO) { - return roleEmployeeService.batchAddEmployeeRole(addDTO); + public ResponseDTO addEmployeeList(@Valid @RequestBody RoleEmployeeBatchDTO addDTO) { + return roleEmployeeService.batchAddRoleEmployee(addDTO); } @ApiOperation(value = "通过员工id获取所有角色以及员工具有的角色", notes = "通过员工id获取所有角色以及员工具有的角色") diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleemployee/RoleEmployeeDao.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/roleemployee/RoleEmployeeDao.java similarity index 68% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleemployee/RoleEmployeeDao.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/roleemployee/RoleEmployeeDao.java index 08a484e7..2611c0e7 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleemployee/RoleEmployeeDao.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/roleemployee/RoleEmployeeDao.java @@ -1,25 +1,20 @@ -package net.lab1024.smartadmin.module.system.role.roleemployee; +package net.lab1024.smartadmin.service.module.system.role.roleemployee; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import net.lab1024.smartadmin.module.system.employee.domain.dto.EmployeeDTO; -import net.lab1024.smartadmin.module.system.role.basic.domain.dto.RoleQueryDTO; -import net.lab1024.smartadmin.module.system.role.roleemployee.domain.RoleEmployeeEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Component; +import net.lab1024.smartadmin.service.module.system.employee.domain.dto.EmployeeDTO; +import net.lab1024.smartadmin.service.module.system.role.basic.domain.dto.RoleQueryDTO; +import net.lab1024.smartadmin.service.module.system.role.roleemployee.domain.RoleEmployeeEntity; import java.util.List; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/3/27 0027 下午 13:00 - * @since JDK1.8 + * @author 罗伊 */ @Mapper @Component @@ -32,6 +27,19 @@ public interface RoleEmployeeDao extends BaseMapper { */ List selectRoleIdByEmployeeId(@Param("employeeId") Long employeeId); + /** + * 根据员工id 查询所有的角色 + * @param employeeIdList + * @return + */ + List selectRoleIdByEmployeeIdList(@Param("employeeIdList") List employeeIdList); + + /** + * 查询角色下的人员id + * @param roleIdList + * @return + */ + List selectEmployeeIdByRoleIdList(@Param("roleIdList") List roleIdList); /** * * @param page @@ -71,10 +79,4 @@ public interface RoleEmployeeDao extends BaseMapper { * @param employeeIds */ void batchDeleteEmployeeRole(@Param("roleId") Long roleId,@Param("employeeIds")List employeeIds); - - /** - * 批量新增 - * @param roleRelationList - */ - void batchInsert(List roleRelationList); } diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/roleemployee/RoleEmployeeManager.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/roleemployee/RoleEmployeeManager.java new file mode 100644 index 00000000..1bd9d224 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/roleemployee/RoleEmployeeManager.java @@ -0,0 +1,33 @@ +package net.lab1024.smartadmin.service.module.system.role.roleemployee; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import net.lab1024.smartadmin.service.module.system.role.roleemployee.domain.RoleEmployeeEntity; + +import java.util.List; + +/** + * 角色员工 manager + * + * @author listen + * @date 2021年7月29日 21:15:50 + */ +@Service +public class RoleEmployeeManager extends ServiceImpl { + + /** + * 保存 角色员工 + * + * @param roleId + * @param roleEmployeeList + */ + @Transactional(rollbackFor = Throwable.class) + public void saveRoleEmployee(Long roleId, List roleEmployeeList) { + this.getBaseMapper().deleteByRoleId(roleId); + if (CollectionUtils.isNotEmpty(roleEmployeeList)) { + this.saveBatch(roleEmployeeList); + } + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/roleemployee/RoleEmployeeService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/roleemployee/RoleEmployeeService.java new file mode 100644 index 00000000..89bdfc22 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/roleemployee/RoleEmployeeService.java @@ -0,0 +1,155 @@ +package net.lab1024.smartadmin.service.module.system.role.roleemployee; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import net.lab1024.smartadmin.service.common.codeconst.ResponseCodeConst; +import net.lab1024.smartadmin.service.common.constant.CacheModuleBaseConst; +import net.lab1024.smartadmin.service.common.domain.PageResultDTO; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.support.beancache.cache.IBeanCache; +import net.lab1024.smartadmin.service.module.support.beancache.key.CacheKey; +import net.lab1024.smartadmin.service.module.system.department.DepartmentDao; +import net.lab1024.smartadmin.service.module.system.department.domain.entity.DepartmentEntity; +import net.lab1024.smartadmin.service.module.system.employee.domain.dto.EmployeeDTO; +import net.lab1024.smartadmin.service.module.system.employee.domain.vo.EmployeeVO; +import net.lab1024.smartadmin.service.module.system.role.basic.RoleDao; +import net.lab1024.smartadmin.service.module.system.role.basic.domain.dto.RoleQueryDTO; +import net.lab1024.smartadmin.service.module.system.role.basic.domain.entity.RoleEntity; +import net.lab1024.smartadmin.service.module.system.role.basic.domain.vo.RoleSelectedVO; +import net.lab1024.smartadmin.service.module.system.role.roleemployee.domain.RoleEmployeeBatchDTO; +import net.lab1024.smartadmin.service.module.system.role.roleemployee.domain.RoleEmployeeEntity; +import net.lab1024.smartadmin.service.util.SmartBeanUtil; +import net.lab1024.smartadmin.service.util.SmartPageUtil; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * 角色管理业务 + * + * @author 1024lab + * @date 2019/4/3 + */ +@Service +public class RoleEmployeeService { + + @Autowired + private RoleEmployeeDao roleEmployeeDao; + + @Autowired + private RoleDao roleDao; + + @Autowired + private DepartmentDao departmentDao; + + @Autowired + private RoleEmployeeManager roleEmployeeManager; + + @Autowired + protected IBeanCache beanCache; + + /** + * 通过角色id,分页获取成员员工列表 + * + * @param queryDTO + * @return + */ + public ResponseDTO> listEmployeeByName(RoleQueryDTO queryDTO) { + Page page = SmartPageUtil.convert2PageQuery(queryDTO); + List employeeDTOS = roleEmployeeDao.selectEmployeeByNamePage(page, queryDTO); + employeeDTOS.stream().filter(e -> e.getDepartmentId() != null).forEach(employeeDTO -> { + DepartmentEntity departmentEntity = departmentDao.selectById(employeeDTO.getDepartmentId()); + employeeDTO.setDepartmentName(departmentEntity.getName()); + }); + PageResultDTO pageResultDTO = SmartPageUtil.convert2PageResult(page, employeeDTOS, EmployeeVO.class); + return ResponseDTO.succData(pageResultDTO); + } + + public ResponseDTO> getAllEmployeeByRoleId(Long roleId) { + List employeeDTOS = roleEmployeeDao.selectEmployeeByRoleId(roleId); + List list = SmartBeanUtil.copyList(employeeDTOS, EmployeeVO.class); + return ResponseDTO.succData(list); + } + + /** + * 移除员工角色 + * + * @param employeeId + * @param roleId + * @return RespDTO + */ + @Transactional(rollbackFor = Exception.class) + public ResponseDTO removeEmployeeRole(Long employeeId, Long roleId) { + if (null == employeeId || null == roleId) { + return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM); + } + roleEmployeeDao.deleteByEmployeeIdRoleId(employeeId, roleId); + this.clearCacheByEmployeeId(employeeId); + return ResponseDTO.succ(); + } + + /** + * 批量删除角色的成员员工 + * + * @param removeDTO + * @return RespDTO + */ + public ResponseDTO batchRemoveEmployeeRole(RoleEmployeeBatchDTO removeDTO) { + roleEmployeeDao.batchDeleteEmployeeRole(removeDTO.getRoleId(), removeDTO.getEmployeeIdList()); + for (Long employeeId : removeDTO.getEmployeeIdList()) { + this.clearCacheByEmployeeId(employeeId); + } + return ResponseDTO.succ(); + } + + /** + * 批量添加角色的成员员工 + * + * @param addDTO + * @return + */ + public ResponseDTO batchAddRoleEmployee(RoleEmployeeBatchDTO addDTO) { + Long roleId = addDTO.getRoleId(); + List employeeIdList = addDTO.getEmployeeIdList(); + // 保存新的角色员工 + List roleEmployeeList = null; + if (CollectionUtils.isNotEmpty(employeeIdList)) { + roleEmployeeList = employeeIdList.stream() + .map(employeeId -> new RoleEmployeeEntity(roleId, employeeId)) + .collect(Collectors.toList()); + } + // 保存数据 + roleEmployeeManager.saveRoleEmployee(roleId, roleEmployeeList); + for (Long employeeId : employeeIdList) { + this.clearCacheByEmployeeId(employeeId); + } + return ResponseDTO.succ(); + } + + /** + * 通过员工id获取员工角色 + * + * @param employeeId + * @return + */ + public ResponseDTO> getRolesByEmployeeId(Long employeeId) { + List roleIds = roleEmployeeDao.selectRoleIdByEmployeeId(employeeId); + List roleList = roleDao.selectList(null); + List result = SmartBeanUtil.copyList(roleList, RoleSelectedVO.class); + result.stream().forEach(item -> item.setSelected(roleIds.contains(item.getId()))); + return ResponseDTO.succData(result); + } + + /** + * 清除businessId为员工id的缓存信息 + * + * @param employeeId + */ + public void clearCacheByEmployeeId(Long employeeId) { + String roleCacheKey = CacheKey.cacheKey(CacheModuleBaseConst.Employee.SINGLE_EMPLOYEE_ROLE_CACHE, employeeId.toString()); + beanCache.remove(roleCacheKey); + } +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/domain/dto/RoleBatchDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/roleemployee/domain/RoleEmployeeBatchDTO.java similarity index 61% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/domain/dto/RoleBatchDTO.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/roleemployee/domain/RoleEmployeeBatchDTO.java index af01cf8c..63ff3e10 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/domain/dto/RoleBatchDTO.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/roleemployee/domain/RoleEmployeeBatchDTO.java @@ -1,30 +1,29 @@ -package net.lab1024.smartadmin.module.system.role.basic.domain.dto; +package net.lab1024.smartadmin.service.module.system.role.roleemployee.domain; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; import java.util.List; /** - * 批量添加角色员工DTO + * 角色员工 批量操作DTO * * @author listen * @date 2017/12/29 15:38 */ @Data -public class RoleBatchDTO { +public class RoleEmployeeBatchDTO { @ApiModelProperty("角色id") @NotNull(message = "角色id不能为空") protected Long roleId; - /** - * 员工id集合 - */ @ApiModelProperty(value = "员工id集合") @NotEmpty(message = "员工id不能为空") - protected List employeeIds; + @Size(max = 99, message = "一次最多99个员工") + protected List employeeIdList; } diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/roleemployee/domain/RoleEmployeeDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/roleemployee/domain/RoleEmployeeDTO.java new file mode 100644 index 00000000..46755f40 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/roleemployee/domain/RoleEmployeeDTO.java @@ -0,0 +1,16 @@ +package net.lab1024.smartadmin.service.module.system.role.roleemployee.domain; + +import lombok.Data; + +/** + * [ ] + * + * @author 罗伊 + */ +@Data +public class RoleEmployeeDTO { + + private Long roleId; + + private Long employeeId; +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/roleemployee/domain/RoleEmployeeEntity.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/roleemployee/domain/RoleEmployeeEntity.java new file mode 100644 index 00000000..c4ced3c2 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/roleemployee/domain/RoleEmployeeEntity.java @@ -0,0 +1,37 @@ +package net.lab1024.smartadmin.service.module.system.role.roleemployee.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * [ 角色 员工关系] + * + * @author 罗伊 + */ +@Data +@TableName("t_role_employee") +public class RoleEmployeeEntity { + + @TableId(type = IdType.AUTO) + private Long id; + + private Long roleId; + + private Long employeeId; + + private LocalDateTime updateTime; + + private LocalDateTime createTime; + + public RoleEmployeeEntity() { + } + + public RoleEmployeeEntity(Long roleId, Long employeeId) { + this.roleId = roleId; + this.employeeId = employeeId; + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/rolemenu/RoleMenuController.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/rolemenu/RoleMenuController.java new file mode 100644 index 00000000..ecf79663 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/rolemenu/RoleMenuController.java @@ -0,0 +1,39 @@ +package net.lab1024.smartadmin.service.module.system.role.rolemenu; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import net.lab1024.smartadmin.service.common.constant.SwaggerTagConst; +import net.lab1024.smartadmin.service.common.controller.AdminBaseController; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.system.role.rolemenu.domain.RoleMenuDTO; +import net.lab1024.smartadmin.service.module.system.role.rolemenu.domain.RoleMenuTreeVO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; + +/** + * 角色-菜单 + * + * @author 善逸 + * @date 2021/7/30 17:06 + */ +@RestController +@Api(tags = {SwaggerTagConst.Admin.MANAGER_ROLE_MENU}) +public class RoleMenuController extends AdminBaseController { + + @Autowired + private RoleMenuService roleMenuService; + + @ApiOperation("更新角色权限") + @PostMapping("/role/menu/updateRoleMenu") + public ResponseDTO updateRoleMenu(@Valid @RequestBody RoleMenuDTO updateDTO) { + return roleMenuService.updateRoleMenu(updateDTO); + } + + @ApiOperation("获取角色关联菜单权限") + @GetMapping("/role/menu/getRoleSelectedMenu/{roleId}") + public ResponseDTO getRoleSelectedMenu(@PathVariable Long roleId) { + return roleMenuService.getRoleSelectedMenu(roleId); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/rolemenu/RoleMenuDao.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/rolemenu/RoleMenuDao.java new file mode 100644 index 00000000..bce6600e --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/rolemenu/RoleMenuDao.java @@ -0,0 +1,39 @@ +package net.lab1024.smartadmin.service.module.system.role.rolemenu; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; +import net.lab1024.smartadmin.service.module.system.role.rolemenu.domain.RoleMenuEntity; + +import java.util.List; + +/** + * 角色-菜单 + * + * @author 善逸 + * @date 2021/7/30 17:18 + */ +@Mapper +@Component +public interface RoleMenuDao extends BaseMapper { + + /** + * 根据角色ID删除菜单权限 + * @param roleId + */ + void deleteByRoleId(@Param("roleId") Long roleId); + + /** + * 根据角色ID查询选择的菜单权限 + * @param roleId + * @return + */ + List queryMenuIdByRoleId(@Param("roleId") Long roleId); + + /** + * 查询所有的菜单角色 + * @return + */ + List queryAllRoleMenu(); +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/rolemenu/RoleMenuManager.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/rolemenu/RoleMenuManager.java new file mode 100644 index 00000000..a31619c2 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/rolemenu/RoleMenuManager.java @@ -0,0 +1,35 @@ +package net.lab1024.smartadmin.service.module.system.role.rolemenu; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import net.lab1024.smartadmin.service.module.system.role.rolemenu.domain.RoleMenuEntity; + +import java.util.List; + +/** + * 角色-菜单 + * + * @author 善逸 + * @date 2021/7/30 17:13 + */ +@Service +public class RoleMenuManager extends ServiceImpl { + + @Autowired + private RoleMenuDao roleMenuDao; + + /** + * 更新角色权限 + * @param roleId + * @param roleMenuEntityList + */ + @Transactional(rollbackFor = Exception.class) + public void updateRoleMenu(Long roleId, List roleMenuEntityList) { + // 根据角色ID删除菜单权限 + roleMenuDao.deleteByRoleId(roleId); + // 批量添加菜单权限 + saveBatch(roleMenuEntityList); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/rolemenu/RoleMenuService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/rolemenu/RoleMenuService.java new file mode 100644 index 00000000..82fb9e6f --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/rolemenu/RoleMenuService.java @@ -0,0 +1,106 @@ +package net.lab1024.smartadmin.service.module.system.role.rolemenu; + +import com.google.common.collect.Lists; +import net.lab1024.smartadmin.service.common.codeconst.ResponseCodeConst; +import net.lab1024.smartadmin.service.common.constant.CommonConst; +import net.lab1024.smartadmin.service.common.domain.ResponseDTO; +import net.lab1024.smartadmin.service.module.system.menu.MenuDao; +import net.lab1024.smartadmin.service.module.system.menu.MenuEmployeeService; +import net.lab1024.smartadmin.service.module.system.menu.domain.MenuSimpleTreeVO; +import net.lab1024.smartadmin.service.module.system.menu.domain.MenuVO; +import net.lab1024.smartadmin.service.module.system.role.basic.RoleDao; +import net.lab1024.smartadmin.service.module.system.role.basic.domain.entity.RoleEntity; +import net.lab1024.smartadmin.service.module.system.role.rolemenu.domain.RoleMenuDTO; +import net.lab1024.smartadmin.service.module.system.role.rolemenu.domain.RoleMenuEntity; +import net.lab1024.smartadmin.service.module.system.role.rolemenu.domain.RoleMenuTreeVO; +import net.lab1024.smartadmin.service.util.SmartBeanUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * 角色-菜单 + * + * @author 善逸 + * @date 2021/7/30 17:13 + */ +@Service +public class RoleMenuService { + + @Autowired + private RoleDao roleDao; + @Autowired + private RoleMenuDao roleMenuDao; + @Autowired + private RoleMenuManager roleMenuManager; + @Autowired + private MenuDao menuDao; + @Autowired + private MenuEmployeeService menuEmployeeService; + + /** + * 更新角色权限 + * + * @param updateDTO + * @return + */ + public ResponseDTO updateRoleMenu(RoleMenuDTO updateDTO) { + //查询角色是否存在 + Long roleId = updateDTO.getRoleId(); + RoleEntity roleEntity = roleDao.selectById(roleId); + if (null == roleEntity) { + return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); + } + List roleMenuEntityList = Lists.newArrayList(); + RoleMenuEntity roleMenuEntity; + for (Long menuId : updateDTO.getMenuIdList()) { + roleMenuEntity = new RoleMenuEntity(); + roleMenuEntity.setRoleId(roleId); + roleMenuEntity.setMenuId(menuId); + roleMenuEntityList.add(roleMenuEntity); + } + roleMenuManager.updateRoleMenu(updateDTO.getRoleId(), roleMenuEntityList); + // 更新角色权限缓存 + menuEmployeeService.initRoleMenuListMap(); + return ResponseDTO.succ(); + } + + /** + * 获取角色关联菜单权限 + * + * @param roleId + * @return + */ + public ResponseDTO getRoleSelectedMenu(Long roleId) { + RoleMenuTreeVO res = new RoleMenuTreeVO(); + res.setRoleId(roleId); + //查询角色ID选择的菜单权限 + List selectedMenuId = roleMenuDao.queryMenuIdByRoleId(roleId); + res.setSelectedMenuId(selectedMenuId); + //查询菜单权限 + List menuVOList = menuDao.queryMenuList(Boolean.FALSE, Boolean.FALSE, null); + Map> parentMap = menuVOList.stream().collect(Collectors.groupingBy(MenuVO::getParentId, Collectors.toList())); + List menuTreeList = this.buildMenuTree(parentMap, CommonConst.DEFAULT_PARENT_ID); + res.setMenuTreeList(menuTreeList); + return ResponseDTO.succData(res); + } + + /** + * 构建菜单树 + * + * @return + */ + private List buildMenuTree(Map> parentMap, Long parentId) { + // 获取本级菜单树List + List res = parentMap.getOrDefault(parentId, Lists.newArrayList()).stream() + .map(e -> SmartBeanUtil.copy(e, MenuSimpleTreeVO.class)).collect(Collectors.toList()); + // 循环遍历下级菜单 + res.forEach(e -> { + e.setChildren(this.buildMenuTree(parentMap, e.getMenuId())); + }); + return res; + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/rolemenu/domain/RoleMenuDTO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/rolemenu/domain/RoleMenuDTO.java new file mode 100644 index 00000000..409214a4 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/rolemenu/domain/RoleMenuDTO.java @@ -0,0 +1,31 @@ +package net.lab1024.smartadmin.service.module.system.role.rolemenu.domain; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotNull; +import java.util.List; + +/** + * 角色-菜单 + * + * @author 善逸 + * @date 2021/7/30 17:18 + */ +@Data +public class RoleMenuDTO { + + /** + * 角色id + */ + @ApiModelProperty("角色id") + @NotNull(message = "角色id不能为空") + private Long roleId; + + /** + * 菜单ID 集合 + */ + @ApiModelProperty("菜单ID集合") + @NotNull(message = "菜单ID不能为空") + private List menuIdList; + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/rolemenu/domain/RoleMenuEntity.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/rolemenu/domain/RoleMenuEntity.java new file mode 100644 index 00000000..e714f310 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/rolemenu/domain/RoleMenuEntity.java @@ -0,0 +1,46 @@ +package net.lab1024.smartadmin.service.module.system.role.rolemenu.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * 角色-菜单 + * + * @author 善逸 + * @date 2021/7/30 17:09 + */ +@Data +@TableName("t_role_menu") +public class RoleMenuEntity { + + /** + * 主键id + */ + @TableId(type = IdType.AUTO) + private Long roleMenuId; + + /** + * 角色 id + */ + private Long roleId; + + /** + * 菜单 id + */ + private Long menuId; + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/rolemenu/domain/RoleMenuTreeVO.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/rolemenu/domain/RoleMenuTreeVO.java new file mode 100644 index 00000000..e8fdba8d --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/module/system/role/rolemenu/domain/RoleMenuTreeVO.java @@ -0,0 +1,26 @@ +package net.lab1024.smartadmin.service.module.system.role.rolemenu.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import net.lab1024.smartadmin.service.module.system.menu.domain.MenuSimpleTreeVO; + +import java.util.List; + +/** + * 角色菜单树 + * + * @author 善逸 + * @date 2021/7/30 17:36 + */ +@Data +public class RoleMenuTreeVO { + + @ApiModelProperty("角色ID") + private Long roleId; + + @ApiModelProperty("菜单列表") + private List menuTreeList; + + @ApiModelProperty("选中的菜单ID") + private List selectedMenuId; +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/third/SmartApplicationContext.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/third/SmartApplicationContext.java similarity index 72% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/third/SmartApplicationContext.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/third/SmartApplicationContext.java index fc366789..5d4c120a 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/third/SmartApplicationContext.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/third/SmartApplicationContext.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.third; +package net.lab1024.smartadmin.service.third; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; @@ -6,14 +6,14 @@ import org.springframework.context.ApplicationContextAware; import org.springframework.stereotype.Component; /** - * [ApplicationContextHelper] + * [ ApplicationContextHelper ] * - * @author yandanyang - * @version 1.0 - * @since JDK1.8 + * @author 罗伊 + * @date 2020/8/25 11:57 */ @Component public class SmartApplicationContext implements ApplicationContextAware { + /** * 上下文对象实例 */ @@ -21,15 +21,16 @@ public class SmartApplicationContext implements ApplicationContextAware { @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { - if(SmartApplicationContext.applicationContext == null){ + if (SmartApplicationContext.applicationContext == null) { - SmartApplicationContext.applicationContext = applicationContext; + SmartApplicationContext.applicationContext = applicationContext; } } /** * 获取applicationContext + * * @return */ public static ApplicationContext getApplicationContext() { @@ -38,12 +39,13 @@ public class SmartApplicationContext implements ApplicationContextAware { /** * 通过name获取 Bean. + * * @param name * @return */ - public static Object getBean(String name){ + public static Object getBean(String name) { ApplicationContext applicationContext = getApplicationContext(); - if(applicationContext == null){ + if (applicationContext == null) { return null; } return applicationContext.getBean(name); @@ -51,13 +53,14 @@ public class SmartApplicationContext implements ApplicationContextAware { /** * 通过class获取Bean. + * * @param clazz * @param * @return */ - public static T getBean(Class clazz){ + public static T getBean(Class clazz) { ApplicationContext applicationContext = getApplicationContext(); - if(applicationContext == null){ + if (applicationContext == null) { return null; } return applicationContext.getBean(clazz); @@ -65,14 +68,15 @@ public class SmartApplicationContext implements ApplicationContextAware { /** * 通过name,以及Clazz返回指定的Bean + * * @param name * @param clazz * @param * @return */ - public static T getBean(String name,Class clazz){ + public static T getBean(String name, Class clazz) { ApplicationContext applicationContext = getApplicationContext(); - if(applicationContext == null){ + if (applicationContext == null) { return null; } return applicationContext.getBean(name, clazz); diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/third/SmartRedisService.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/third/SmartRedisService.java similarity index 80% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/third/SmartRedisService.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/third/SmartRedisService.java index da36246a..a8a942cc 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/third/SmartRedisService.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/third/SmartRedisService.java @@ -1,14 +1,21 @@ -package net.lab1024.smartadmin.third; +package net.lab1024.smartadmin.service.third; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.google.common.collect.Lists; -import lombok.extern.slf4j.Slf4j; +import net.lab1024.smartadmin.service.module.support.redismq.RedisMqTopicEnum; +import net.lab1024.smartadmin.service.module.support.redismq.RedisMsgDTO; +import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.*; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.temporal.ChronoUnit; +import java.util.Collection; import java.util.List; import java.util.Map; import java.util.Set; @@ -17,17 +24,17 @@ import java.util.concurrent.TimeUnit; /** * [ redis 一顿操作 ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/3/26 0026 下午 18:12 - * @since JDK1.8 + * @author 罗伊 + * @date 2020/8/25 11:57 */ -@Slf4j @Component public class SmartRedisService { + private static final Logger log = org.slf4j.LoggerFactory.getLogger(SmartRedisService.class); + + @Autowired + private StringRedisTemplate stringRedisTemplate; + @Autowired private RedisTemplate redisTemplate; @@ -43,6 +50,15 @@ public class SmartRedisService { @Autowired private SetOperations redisSetOperations; + public boolean getLock(String key, long expire) { + return redisValueOperations.setIfAbsent(key, String.valueOf(System.currentTimeMillis()), expire, TimeUnit.MILLISECONDS); + } + + public void unLock(String key) { + redisValueOperations.getOperations().delete(key); + } + + /** * 指定缓存失效时间 * @@ -51,17 +67,27 @@ public class SmartRedisService { * @return */ public boolean expire(String key, long time) { + try { if (time > 0) { redisTemplate.expire(key, time, TimeUnit.SECONDS); } return true; } catch (Exception e) { - log.error("", e); + log.error("redis service 指定失效时间-发生异常:", e); return false; } } + /** + * 获取当天剩余的秒数 + * + * @return + */ + public static long currentDaySecond() { + return ChronoUnit.SECONDS.between(LocalDateTime.now(), LocalDateTime.of(LocalDate.now(), LocalTime.MAX)); + } + /** * 根据key 获取过期时间 * @@ -82,7 +108,7 @@ public class SmartRedisService { try { return redisTemplate.hasKey(key); } catch (Exception e) { - log.error("", e); + log.error("redis service 判断key是否存在-发生异常:", e); return false; } } @@ -98,11 +124,23 @@ public class SmartRedisService { if (key.length == 1) { redisTemplate.delete(key[0]); } else { - redisTemplate.delete(CollectionUtils.arrayToList(key)); + redisTemplate.delete((Collection) CollectionUtils.arrayToList(key)); } } } + /** + * 删除缓存 + * + * @param keyList + */ + public void del(List keyList) { + if (CollectionUtils.isEmpty(keyList)) { + return; + } + redisTemplate.delete(keyList); + } + //============================String============================= /** @@ -145,12 +183,39 @@ public class SmartRedisService { redisValueOperations.set(key, value); return true; } catch (Exception e) { - log.error("", e); + log.error("redis service set-发生异常:", e); return false; } } + /** + * 根据 key 批量获取 + * + * @param keyList + * @return + */ + public List mGet(List keyList) { + return redisValueOperations.multiGet(keyList); + } + + /** + * 普通缓存放入 + * + * @param key 键 + * @param value 值 + * @return true成功 false失败 + */ + public boolean set(String key, String value, long second) { + try { + redisValueOperations.set(key, value, second, TimeUnit.SECONDS); + return true; + } catch (Exception e) { + log.error("", e); + return false; + } + } + /** * 普通缓存放入并设置时间 * @@ -159,12 +224,13 @@ public class SmartRedisService { * @param time 时间(秒) time要大于0 如果time小于等于0 将设置无限期 * @return true成功 false 失败 */ - public boolean set(String key, String value, long time) { + public boolean set(Object key, Object value, long time) { + String jsonString = JSON.toJSONString(value); try { if (time > 0) { - redisValueOperations.set(key, value, time, TimeUnit.SECONDS); + redisValueOperations.set(key.toString(), jsonString, time, TimeUnit.SECONDS); } else { - set(key, value); + set(key.toString(), jsonString); } return true; } catch (Exception e) { @@ -214,6 +280,27 @@ public class SmartRedisService { return redisHashOperations.get(key, item); } + /** + * HashGet + * 并强制转换为对应对象 + * + * @param key 键 不能为null + * @param item 项 不能为null + * @return 值 + */ + public T hget(String key, String item, Class clazz) { + Object obj = redisHashOperations.get(key, item); + if (null == obj) { + return null; + } + + if (obj instanceof String) { + return JSON.parseObject((String) obj, clazz); + } + + return null; + } + /** * 获取hashKey对应的所有键值 * @@ -272,7 +359,7 @@ public class SmartRedisService { */ public boolean hset(String key, String item, Object value) { try { - redisHashOperations.put(key, item, value); + redisHashOperations.put(key, item, JSON.toJSONString(value)); return true; } catch (Exception e) { log.error("", e); @@ -291,7 +378,7 @@ public class SmartRedisService { */ public boolean hset(String key, String item, Object value, long time) { try { - redisHashOperations.put(key, item, value); + redisHashOperations.put(key, item, JSON.toJSONString(value)); if (time > 0) { expire(key, time); } @@ -619,4 +706,16 @@ public class SmartRedisService { return 0; } } + + /** + * 发送redis消息 + * + * @param topicEnum + * @param msgType + * @param jsonData + */ + public void sendMsg(RedisMqTopicEnum topicEnum, Integer msgType, String jsonData) { + RedisMsgDTO redisMsgDTO = new RedisMsgDTO(msgType, jsonData); + stringRedisTemplate.convertAndSend(topicEnum.getValue(), JSONObject.toJSONString(redisMsgDTO)); + } } \ No newline at end of file diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartAesUtil.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartAesUtil.java new file mode 100644 index 00000000..629db943 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartAesUtil.java @@ -0,0 +1,104 @@ +package net.lab1024.smartadmin.service.util; + +import lombok.extern.slf4j.Slf4j; + +import javax.crypto.Cipher; +import javax.crypto.spec.IvParameterSpec; +import javax.crypto.spec.SecretKeySpec; +import java.util.Base64; + +/** + * [ ] + * + * @author 罗伊 + * @date + */ +@Slf4j +public class SmartAesUtil { + + + /** + * 加密返回的数据转换成 String 类型 + * + * @param content 明文 + * @param key 秘钥 + * @param iv 初始化向量是16位长度的字符串 + * @return + */ + public static String encrypt(String content, String key, String iv) { + return base64ToString(AES_CBC_Encrypt(content.getBytes(), key.getBytes(), iv.getBytes())); + } + + /** + * 将解密返回的数据转换成 String 类型 + * + * @param content Base64编码的密文 + * @param key 秘钥 + * @param iv 初始化向量是16位长度的字符串 + * @return + */ + public static String decrypt(String content, String key, String iv) { + return new String(AES_CBC_Decrypt(stringToBase64(content), key.getBytes(), iv.getBytes())); + } + + private static byte[] AES_CBC_Encrypt(byte[] content, byte[] keyBytes, byte[] iv) { + try { + SecretKeySpec key = new SecretKeySpec(keyBytes, "AES"); + Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); + cipher.init(Cipher.ENCRYPT_MODE, key, new IvParameterSpec(iv)); + byte[] result = cipher.doFinal(content); + return result; + } catch (Exception e) { + System.out.println("exception:" + e.toString()); + } + return null; + } + + private static byte[] AES_CBC_Decrypt(byte[] content, byte[] keyBytes, byte[] iv) { + try { + SecretKeySpec key = new SecretKeySpec(keyBytes, "AES"); + Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); + cipher.init(Cipher.DECRYPT_MODE, key, new IvParameterSpec(iv)); + byte[] result = cipher.doFinal(content); + return result; + } catch (Exception e) { + System.out.println("exception:" + e.toString()); + } + return null; + } + + /** + * 字符串装换成 Base64 + */ + + public static byte[] stringToBase64(String key) { + return Base64.getDecoder().decode(key.getBytes()); + } + + /** + * Base64装换成字符串 + */ + public static String base64ToString(byte[] key) { + return Base64.getEncoder().encodeToString(key); + } + + public static void main(String args[]) throws Exception { + + String content = "明文 123 abc"; + String KEY = "c4ca4238a0b923820dcc509a6f75849b"; + String IV = KEY.substring(0, 16); + ; + //加密 + String encrypted = encrypt(content, KEY, IV); + //解密 + String decrypted = decrypt(encrypted, KEY, IV); + + System.out.println("加密前:" + content); + + System.out.println("加密后:" + encrypted); + + System.out.println("解密后:" + decrypted); + } + + +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartBaseEnumUtil.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartBaseEnumUtil.java new file mode 100644 index 00000000..d67c7fd4 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartBaseEnumUtil.java @@ -0,0 +1,121 @@ +package net.lab1024.smartadmin.service.util; + +import net.lab1024.smartadmin.service.common.constant.BaseEnum; + +import java.util.List; +import java.util.Objects; +import java.util.function.BiConsumer; +import java.util.function.Function; +import java.util.stream.Stream; + +/** + * 枚举工具类 + * + * @author listen + * @date 2017/10/10 18:17 + */ +public class SmartBaseEnumUtil { + + /** + * 校验参数与枚举类比较是否合法 + * + * @param value 参数 + * @param enumClass 枚举类必须实现BaseEnum接口 + * @return boolean + * @Author listen + */ + public static boolean checkEnum(Object value, Class enumClass) { + if (null == value) { + return false; + } + return Stream.of(enumClass.getEnumConstants()).anyMatch(e -> e.equalsValue(value)); + } + + /** + * 获取枚举类的说明 value : info 的形式 + * + * @param enumClass + * @return String + */ + public static String getEnumDesc(Class enumClass) { + BaseEnum[] enums = enumClass.getEnumConstants(); + // value : info 的形式 + StringBuilder sb = new StringBuilder(); + for (BaseEnum baseEnum : enums) { + sb.append(baseEnum.getValue()).append(":").append(baseEnum.getDesc()).append(","); + } + return sb.toString(); + } + + /** + * 获取与参数相匹配的枚举类实例的 说明 + * + * @param value 参数 + * @param enumClass 枚举类必须实现BaseEnum接口 + * @return String 如无匹配枚举则返回null + */ + public static String getEnumDescByValue(Object value, Class enumClass) { + if (null == value) { + return null; + } + return Stream.of(enumClass.getEnumConstants()) + .filter(e -> e.equalsValue(value)) + .findFirst() + .map(BaseEnum::getDesc) + .orElse(null); + } + + /** + * 根据参数获取枚举类的实例 + * + * @param value 参数 + * @param enumClass 枚举类必须实现BaseEnum接口 + * @return BaseEnum 无匹配值返回null + * @Author listen + */ + public static T getEnumByValue(Object value, Class enumClass) { + if (null == value) { + return null; + } + return Stream.of(enumClass.getEnumConstants()) + .filter(e -> e.equalsValue(value)) + .findFirst() + .orElse(null); + } + + /** + * 根据实例描述与获取枚举类的实例 + * + * @param desc 参数描述 + * @param enumClass 枚举类必须实现BaseEnum接口 + * @return BaseEnum 无匹配值返回null + * @Author listen + */ + public static T getEnumByDesc(String desc, Class enumClass) { + return Stream.of(enumClass.getEnumConstants()) + .filter(e -> Objects.equals(e.getDesc(), desc)) + .findFirst() + .orElse(null); + } + + /** + * 根据lambda getter/setter 注入 + * + * @param list + * @param getter + * @param setter + * @param enumClass + * @param + */ + public static void inject(List list, Function getter, BiConsumer setter, Class enumClass) { + if (list == null || list.isEmpty()) { + return; + } + for (T t : list) { + Integer enumValue = getter.apply(t); + if (enumValue != null) { + setter.accept(t, getEnumDescByValue(enumValue, enumClass)); + } + } + } +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartBeanUtil.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartBeanUtil.java similarity index 96% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartBeanUtil.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartBeanUtil.java index 6d36c05b..01eaa774 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartBeanUtil.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartBeanUtil.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.util; +package net.lab1024.smartadmin.service.util; import org.springframework.beans.BeanUtils; diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartBigDecimalUtil.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartBigDecimalUtil.java similarity index 99% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartBigDecimalUtil.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartBigDecimalUtil.java index 651f3d4e..0fab9911 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartBigDecimalUtil.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartBigDecimalUtil.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.util; +package net.lab1024.smartadmin.service.util; import java.math.BigDecimal; import java.math.RoundingMode; diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartCollectionUtil.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartCollectionUtil.java new file mode 100644 index 00000000..110b4c79 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartCollectionUtil.java @@ -0,0 +1,78 @@ +package net.lab1024.smartadmin.service.util; + +import org.apache.commons.collections4.CollectionUtils; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.function.BiFunction; +import java.util.function.Function; + +/** + * + * @author Administrator + */ +public class SmartCollectionUtil { + + public static boolean isEmptyMap(Map map) { + if (map == null || map.size() == 0) { + return true; + } + return false; + } + + /** + * 分批处理数据 + * + * @param list 集合 + * @param func 执行方法 + * @param limit 每次执行数量 + * @author listen + */ + public static void batchExecute(List list, Function, Object> func, int limit) { + if (CollectionUtils.isEmpty(list)) { + return; + } + List tempList = new ArrayList<>(limit); + for (T e : list) { + tempList.add(e); + if (tempList.size() >= limit) { + func.apply(tempList); + tempList.clear(); + } + } + if (CollectionUtils.isNotEmpty(tempList)) { + func.apply(tempList); + } + } + + /** + * 分批处理数据 支持两个参数 + * + * @param list 集合 + * @param func 执行方法 + * @param limit 每次执行数量 + * @author listen + */ + public static void batchExecute(List list, R obj, BiFunction, R, Object> func, int limit) { + if (CollectionUtils.isEmpty(list)) { + return; + } + limit = 0 >= limit ? 50 : limit; + List tempList = new ArrayList<>(limit); + for (T e : list) { + tempList.add(e); + if (tempList.size() >= limit) { + func.apply(tempList, obj); + tempList.clear(); + } + } + if (CollectionUtils.isNotEmpty(tempList)) { + func.apply(tempList, obj); + } + } + + public static boolean isNotEmptyMap(Map map) { + return !isEmptyMap(map); + } +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartDateUtil.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartDateUtil.java similarity index 99% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartDateUtil.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartDateUtil.java index 1e078263..acdaaeb5 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartDateUtil.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartDateUtil.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.util; +package net.lab1024.smartadmin.service.util; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.time.DateUtils; @@ -284,7 +284,7 @@ public class SmartDateUtil extends DateUtils { * * @param dateStr yyyy-mm-dd * @return - * @auther yandanyang + * @auther 罗伊 * @date 2018/10/16 0016 下午 17:43 */ public static boolean isCurrentDayYMD(String dateStr) { @@ -303,7 +303,7 @@ public class SmartDateUtil extends DateUtils { * * @param dateStr yyyy-mm-dd * @return - * @auther yandanyang + * @auther 罗伊 * @date 2018/10/16 0016 下午 17:43 */ public static boolean isCurrentMonthYMD(String dateStr) { diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartDigestUtil.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartDigestUtil.java new file mode 100644 index 00000000..e17a7432 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartDigestUtil.java @@ -0,0 +1,27 @@ +package net.lab1024.smartadmin.service.util; + +import org.apache.commons.codec.digest.DigestUtils; + +public class SmartDigestUtil extends DigestUtils { + + /** + * md5 加盐加密 + * + * @param salt + * @param str + * @return + */ + public static String encrypt(String salt, String str) { + return SmartDigestUtil.md5Hex(salt + str); + } + + /** + * md5 加密 + * + * @param str + * @return + */ + public static String encrypt(String str) { + return SmartDigestUtil.md5Hex(str); + } +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartEasyPoiExcelUtil.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartEasyPoiExcelUtil.java similarity index 81% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartEasyPoiExcelUtil.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartEasyPoiExcelUtil.java index fb3860a6..edfda2ad 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartEasyPoiExcelUtil.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartEasyPoiExcelUtil.java @@ -1,10 +1,11 @@ -package net.lab1024.smartadmin.util; +package net.lab1024.smartadmin.service.util; import cn.afterturn.easypoi.excel.ExcelExportUtil; import cn.afterturn.easypoi.excel.ExcelImportUtil; import cn.afterturn.easypoi.excel.entity.ExportParams; import cn.afterturn.easypoi.excel.entity.ImportParams; import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.apache.poi.ss.usermodel.Workbook; import org.springframework.web.multipart.MultipartFile; @@ -12,16 +13,17 @@ import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; import java.io.File; import java.io.IOException; +import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.util.List; import java.util.Map; import java.util.NoSuchElementException; /** - * @author: zhuoda + * @author: 卓大 * @create: 2020-03-30 14:27 PM from win10 */ - +@Slf4j public class SmartEasyPoiExcelUtil { public static void exportExcel(List list, String title, String sheetName, Class pojoClass, String fileName, boolean isCreateHeader, HttpServletResponse response) throws IOException { @@ -43,20 +45,31 @@ public class SmartEasyPoiExcelUtil { HttpServletResponse response, ExportParams exportParams) throws IOException { Workbook workbook = ExcelExportUtil.exportExcel(exportParams, pojoClass, list); if (workbook != null) ; - downLoadExcel(fileName, response, workbook); + downloadExcel(fileName, workbook, response); } - private static void downLoadExcel(String fileName, HttpServletResponse response, Workbook workbook) throws IOException { - response.setHeader("content-Type", "application/vnd.ms-excel"); - response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8")); - response.setCharacterEncoding("UTF-8"); + + public static void downloadExcel(String fileName, Workbook workbook, HttpServletResponse response) { + try { + fileName = URLEncoder.encode(fileName, "UTF-8"); + } catch (UnsupportedEncodingException e) { + log.error("", e); + } + response.setCharacterEncoding("utf-8"); + response.setHeader("Content-Type", "application/vnd.ms-excel"); + response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xls"); + try { workbook.write(response.getOutputStream()); + workbook.close(); + } catch (IOException e) { + log.error("", e); + } } private static void defaultExport(List> list, String fileName, HttpServletResponse response) throws IOException { Workbook workbook = ExcelExportUtil.exportExcel(list, ExcelType.HSSF); if (workbook != null) ; - downLoadExcel(fileName, response, workbook); + downloadExcel(fileName, workbook, response); } public static List importExcel(String filePath, Integer titleRows, Integer headerRows, Class pojoClass) { @@ -73,7 +86,6 @@ public class SmartEasyPoiExcelUtil { //throw new NormalException("模板不能为空"); } catch (Exception e) { e.printStackTrace(); - //throw new NormalException(e.getMessage()); } return list; } diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartEmployeeTokenUtil.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartEmployeeTokenUtil.java new file mode 100644 index 00000000..24436ee7 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartEmployeeTokenUtil.java @@ -0,0 +1,31 @@ +package net.lab1024.smartadmin.service.util; + +import net.lab1024.smartadmin.service.module.system.login.domain.EmployeeLoginInfoDTO; + +/** + * @author 罗伊 + */ +public class SmartEmployeeTokenUtil { + + private static final ThreadLocal LOCAL_USER = new ThreadLocal<>(); + + public static void setUser(EmployeeLoginInfoDTO loginInfoDTO) { + LOCAL_USER.set(loginInfoDTO); + } + + public static EmployeeLoginInfoDTO getRequestEmployee() { + return LOCAL_USER.get(); + } + + public static Long getRequestEmployeeId() { + EmployeeLoginInfoDTO requestUser = getRequestEmployee(); + if (null == requestUser) { + return null; + } + return requestUser.getEmployeeId(); + } + + public static void remove() { + LOCAL_USER.remove(); + } +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartFileUtil.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartFileUtil.java similarity index 84% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartFileUtil.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartFileUtil.java index 45735c9a..8f84fc2d 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartFileUtil.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartFileUtil.java @@ -1,22 +1,15 @@ -package net.lab1024.smartadmin.util; +package net.lab1024.smartadmin.service.util; -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; +import java.io.*; import java.nio.charset.Charset; -import org.apache.commons.io.FileUtils; - /** - * @author zhuoda + * [ ] + * + * @author 罗伊 + * @date 2021/2/22 14:19 */ -public class SmartFileUtil extends FileUtils { +public class SmartFileUtil { public static boolean isXmlFile(File file) { return "xml".equalsIgnoreCase(getFileExtension(file.getName())); diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartHttpUtil.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartHttpUtil.java similarity index 96% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartHttpUtil.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartHttpUtil.java index 62e8ff2d..d9f2ed14 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartHttpUtil.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartHttpUtil.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.util; +package net.lab1024.smartadmin.service.util; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -23,12 +23,7 @@ import java.util.Map.Entry; /** * [ HttpUtils ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 + * @author 罗伊 */ public class SmartHttpUtil { diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartIPUtil.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartIPUtil.java similarity index 81% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartIPUtil.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartIPUtil.java index fb93cd57..594d6372 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartIPUtil.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartIPUtil.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.util; +package net.lab1024.smartadmin.service.util; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; @@ -8,19 +8,12 @@ import javax.servlet.http.HttpServletRequest; import java.net.InetAddress; import java.net.NetworkInterface; import java.net.SocketException; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.Map; +import java.util.*; /** * [ ] * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/5/5 0005 下午 15:34 - * @since JDK1.8 + * @author 罗伊 */ public class SmartIPUtil { @@ -62,6 +55,30 @@ public class SmartIPUtil { } } + public static List getLocalHostIPList() { + InetAddress ip = null; + List ipList = new ArrayList(); + try { + Enumeration netInterfaces = (Enumeration) NetworkInterface + .getNetworkInterfaces(); + while (netInterfaces.hasMoreElements()) { + NetworkInterface ni = (NetworkInterface) netInterfaces + .nextElement(); + Enumeration ips = ni.getInetAddresses(); + while (ips.hasMoreElements()) { + ip = (InetAddress) ips.nextElement(); + if (!ip.isLoopbackAddress() + && ip.getHostAddress().matches( + "(\\d{1,3}\\.){3}\\d{1,3}")) { + ipList.add(ip.getHostAddress()); + } + } + } + } catch (Exception e) { + } + return ipList; + } + public static String getRemoteIp(HttpServletRequest request) { // 获取请求主机IP地址,如果通过代理进来,则透过防火墙获取真实IP地址 diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartPageUtil.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartPageUtil.java new file mode 100644 index 00000000..6ec1e64d --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartPageUtil.java @@ -0,0 +1,144 @@ +package net.lab1024.smartadmin.service.util; + +import com.baomidou.mybatisplus.core.metadata.OrderItem; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.google.common.collect.Lists; +import net.lab1024.smartadmin.service.common.domain.PageBaseDTO; +import net.lab1024.smartadmin.service.common.domain.PageResultDTO; +import org.apache.commons.collections4.CollectionUtils; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * 分页工具类 + * + * @author 1024lab + * @date 2017-12-23 16:40 + */ + +public class SmartPageUtil { + + public static Page convert2PageQuery(PageBaseDTO baseDTO) { + Page page = new Page(baseDTO.getPageNum(), baseDTO.getPageSize()); + + // 设置排序字段 + List sortItemList = baseDTO.getSortItemList(); + if (CollectionUtils.isNotEmpty(sortItemList)) { + List orderItemList = sortItemList.stream().map(e -> build(e.getColumn(), e.getIsAsc())).collect(Collectors.toList()); + page.setOrders(orderItemList); + } + return page; + } + + public static PageResultDTO convert2PageResult(Page page) { + PageResultDTO result = new PageResultDTO<>(); + result.setPageNum(page.getCurrent()); + result.setPageSize(page.getSize()); + result.setTotal(page.getTotal()); + result.setPages(page.getPages()); + result.setList(page.getRecords()); + result.setEmptyFlag(CollectionUtils.isEmpty(page.getRecords())); + return result; + } + + /** + * 转换为 PageResultDTO 对象 + * + * @param page + * @param sourceList 原list + * @param targetClazz 目标类 + * @return + * @author 罗伊 + * @date 2018年5月16日 下午6:05:28 + */ + public static PageResultDTO convert2PageResult(Page page, List sourceList, Class targetClazz) { + PageResultDTO pageResultDTO = setPage(page); + List records = SmartBeanUtil.copyList(sourceList, targetClazz); + page.setRecords(records); + pageResultDTO.setList(records); + pageResultDTO.setEmptyFlag(CollectionUtils.isEmpty(records)); + return pageResultDTO; + } + + /** + * 转换为 PageResultDTO 对象 + * + * @param page + * @param sourceList list + * @return + * @author 罗伊 + * @date 2018年5月16日 下午6:05:28 + */ + public static PageResultDTO convert2PageResult(Page page, List sourceList) { + PageResultDTO pageResultDTO = setPage(page); + page.setRecords(sourceList); + pageResultDTO.setList(sourceList); + pageResultDTO.setEmptyFlag(CollectionUtils.isEmpty(sourceList)); + return pageResultDTO; + } + + /** + * 转换分页结果对象 + * + * @param pageResultDTO + * @param targetClazz + * @param + * @param + * @return + */ + public static PageResultDTO convert2PageResult(PageResultDTO pageResultDTO, Class targetClazz) { + + PageResultDTO newPageResultDTO = new PageResultDTO(); + newPageResultDTO.setPageNum(pageResultDTO.getPageNum()); + newPageResultDTO.setPageSize(pageResultDTO.getPageSize()); + newPageResultDTO.setTotal(pageResultDTO.getTotal()); + newPageResultDTO.setPages(pageResultDTO.getPages()); + + List list = pageResultDTO.getList(); + List copyList = SmartBeanUtil.copyList(list, targetClazz); + newPageResultDTO.setList(copyList); + newPageResultDTO.setEmptyFlag(CollectionUtils.isEmpty(copyList)); + return newPageResultDTO; + } + + private static PageResultDTO setPage(Page page) { + PageResultDTO pageResultDTO = new PageResultDTO(); + pageResultDTO.setPageNum(page.getCurrent()); + pageResultDTO.setPageSize(page.getSize()); + pageResultDTO.setTotal(page.getTotal()); + pageResultDTO.setPages(page.getPages()); + return pageResultDTO; + } + + private static OrderItem build(String column, boolean asc) { + OrderItem item = new OrderItem(); + item.setColumn(column); + item.setAsc(asc); + return item; + } + + + public static PageResultDTO subListPage(Integer pageNum, Integer pageSize, List list) { + PageResultDTO pageRet = new PageResultDTO(); + //总条数 + int count = list.size(); + int pages = count%pageSize == 0 ? count/pageSize:(count/pageSize +1); + int fromIndex = (pageNum-1)*pageSize; + int toIndex = pageNum*pageSize>count ? count : pageNum*pageSize; + + if(pageNum > pages) { + pageRet.setList(Lists.newLinkedList()); + pageRet.setPageNum(pageNum.longValue()); + pageRet.setPages(Long.valueOf(pages)); + pageRet.setTotal(Long.valueOf(count)); + return pageRet; + } + List pageList = list.subList(fromIndex, toIndex); + pageRet.setList(pageList); + pageRet.setPageNum(pageNum.longValue()); + pageRet.setPages(Long.valueOf(pages)); + pageRet.setTotal(Long.valueOf(count)); + return pageRet; + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartRandomUtil.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartRandomUtil.java new file mode 100644 index 00000000..ae64fc4b --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartRandomUtil.java @@ -0,0 +1,181 @@ +package net.lab1024.smartadmin.service.util; + +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.lang3.RandomUtils; + +import java.security.SecureRandom; +import java.util.*; + +/** + * 产生随机数,打乱List顺序,随机取值 + * + * @author jiaozi + */ +public class SmartRandomUtil extends RandomUtils { + + private static final String NUM = "1234567890"; + + private static final String WORD = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890"; + + /** + * Returns a random long List within the specified range. + * + * @return + */ + public static List randomDiffInRange(final long startInclusive, final long endExclusive, int randomCount) { + if (randomCount < 1) { + return Collections.emptyList(); + } + + if (startInclusive >= endExclusive) { + throw new RuntimeException("<> randomLong , endExclusive >= startInclusive, " + endExclusive + " >= " + startInclusive); + } + + if (randomCount >= (endExclusive - startInclusive)) { + ArrayList result = new ArrayList(); + for (long i = startInclusive; i < endExclusive; i++) { + result.add(i); + } + return result; + } else { + HashSet set = new HashSet(randomCount); + int i = 0; + while (i < randomCount) { + long nextLong = nextLong(startInclusive, endExclusive); + if (set.add(nextLong)) { + i++; + } + } + return new ArrayList(set); + } + } + + public static List randomDiffInRange(final int startInclusive, final int endExclusive, int randomCount) { + if (randomCount < 1) { + return Collections.emptyList(); + } + + if (startInclusive >= endExclusive) { + throw new RuntimeException("<> randomLong , endExclusive >= startInclusive, " + endExclusive + " >= " + startInclusive); + } + + if (randomCount >= (endExclusive - startInclusive)) { + ArrayList result = new ArrayList(); + for (int i = startInclusive; i < endExclusive; i++) { + result.add(i); + } + return result; + } else { + HashSet set = new HashSet(randomCount); + int i = 0; + while (i < randomCount) { + int nextLong = nextInt(startInclusive, endExclusive); + if (set.add(nextLong)) { + i++; + } + } + return new ArrayList(set); + } + } + + /** + * 随机取一个 + * + * @param list + * @return + */ + public static T randomOne(List list) { + List randomDifferent = randomDiffInRearrange(list, 1); + if (randomDifferent.isEmpty()) { + return null; + } + return randomDifferent.get(0); + } + + /** + * 打乱顺序,重新排列List, 返回的还是原来的list + * + * @param list + * @return + */ + public static List rearrange(List list) { + List result = new ArrayList(list); + int size = list.size(), j = - 1; + T element = null; + Random random = new Random(); + for (int i = 0; i < size / 2; i++) { + j = random.nextInt(size - i) + i; + if (j != i) { + element = result.get(i); + result.set(i, result.get(j)); + result.set(j, element); + } + } + return result; + } + + /** + * 打乱顺序,并从中随机选取几个 + * + * @param list + * @param totalRandomCount + * @return + */ + public static List randomDiffInRearrange(List list, int totalRandomCount) { + if (CollectionUtils.isEmpty(list) || totalRandomCount < 1) { + return Collections.emptyList(); + } + + if (totalRandomCount >= list.size()) { + return rearrange(list); + } + Random random = new Random(); + ArrayList res = new ArrayList(totalRandomCount); + int len = list.size(); + for (int i = 0; i < len; i++) { + if (random.nextInt(len - i) < totalRandomCount) { + res.add(list.get(i)); + totalRandomCount--; + if (totalRandomCount == 0) { + break; + } + } + } + return res; + } + + /** + * 生成N位的随机字符串 + * 包含 大写A-Z 小写a-z 以及数字 + * + * @param length + * @return + * @author listen + */ + public static String generateRandomString(int length) { + final String SOURCES = WORD + NUM; + char[] text = new char[length]; + SecureRandom secureRandom = new SecureRandom(); + for (int i = 0; i < length; i++) { + text[i] = SOURCES.charAt(secureRandom.nextInt(SOURCES.length())); + } + return new String(text); + } + + /** + * 生成N位的随机数字 + * + * @param length + * @return + * @author listen + */ + public static String generateRandomNum(int length) { + final String SOURCES = NUM; + char[] text = new char[length]; + SecureRandom secureRandom = new SecureRandom(); + for (int i = 0; i < length; i++) { + text[i] = SOURCES.charAt(secureRandom.nextInt(SOURCES.length())); + } + return new String(text); + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartSecurityUtil.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartSecurityUtil.java new file mode 100644 index 00000000..a9c39ca9 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartSecurityUtil.java @@ -0,0 +1,80 @@ +package net.lab1024.smartadmin.service.util; + +import com.google.common.collect.Lists; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; + +import java.lang.reflect.Method; +import java.util.List; + +/** + * [ ] + * + * @author 罗伊 + * @date 2021/8/31 11:30 + */ +public class SmartSecurityUtil { + + /** + * 获取指定方法的uri 前缀 + * 即controller层注解 + * + * @param method + * @return + */ + public static String getUriPrefix(Method method) { + Class clazz = method.getDeclaringClass(); + return getUriPrefix(clazz); + } + + + public static String getUriPrefix(Class clazz) { + String uriPrefix = ""; + RequestMapping classRequestMapping = (RequestMapping) clazz.getAnnotation(RequestMapping.class); + if (classRequestMapping != null) { + uriPrefix = classRequestMapping.value()[0]; + } + Class superclass = clazz.getSuperclass(); + if (superclass == null || superclass == Object.class) { + return uriPrefix; + } + RequestMapping superClassRequestMapping = (RequestMapping) superclass.getAnnotation(RequestMapping.class); + if (superClassRequestMapping != null) { + uriPrefix = superClassRequestMapping.value()[0] + uriPrefix; + } + return uriPrefix; + } + + /** + * 获取完整的uri前缀 + * + * @param method + * @param uriPrefix + * @return + */ + public static List getAnnotationValueList(Method method, String uriPrefix) { + List valueList = Lists.newArrayList(); + GetMapping getMapping = method.getAnnotation(GetMapping.class); + if (getMapping != null) { + valueList.addAll(uriList(uriPrefix, getMapping.value())); + } + PostMapping postMapping = method.getAnnotation(PostMapping.class); + if (postMapping != null) { + valueList.addAll(uriList(uriPrefix, postMapping.value())); + } + RequestMapping requestMapping = method.getAnnotation(RequestMapping.class); + if (requestMapping != null) { + valueList.addAll(uriList(uriPrefix, requestMapping.value())); + } + return valueList; + } + + public static List uriList(String uriPrefix, String[] values) { + List uriList = Lists.newArrayList(); + for (String uri : values) { + uriList.add(uriPrefix + uri); + } + return uriList; + } +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartStringUtil.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartStringUtil.java similarity index 99% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartStringUtil.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartStringUtil.java index da2e1764..c0d91e0f 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartStringUtil.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartStringUtil.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.util; +package net.lab1024.smartadmin.service.util; import org.apache.commons.lang3.StringUtils; diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartThreadFactory.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartThreadFactory.java similarity index 96% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartThreadFactory.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartThreadFactory.java index 367f2b17..2bf36fde 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartThreadFactory.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartThreadFactory.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.util; +package net.lab1024.smartadmin.service.util; import java.util.concurrent.ThreadFactory; import java.util.concurrent.atomic.AtomicInteger; diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartVerificationUtil.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartVerificationUtil.java similarity index 89% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartVerificationUtil.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartVerificationUtil.java index ceb349f1..62ae063d 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartVerificationUtil.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/SmartVerificationUtil.java @@ -1,6 +1,7 @@ -package net.lab1024.smartadmin.util; +package net.lab1024.smartadmin.service.util; import java.util.regex.Pattern; + /** * 验证工具类 * @@ -46,6 +47,8 @@ public class SmartVerificationUtil { + "|(02-(0[1-9]|[1][0-9]|2[0-8])))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29)" + "([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9" + "][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|(" + "(([0-9]{2})(0[48]|[2468][048]|[13579][26])|(" + "(0[48" + "]|[2468][048]|[3579][26])00))-02-29)"; + public static final String DATE_TIME_HM = "^((([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29))\\s+([0-1]?[0-9]|2[0-3]):([0-5][0-9])$"; + /** * 年月校验 例: 2019-10 */ diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/date/SmartDateFormatterEnum.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/date/SmartDateFormatterEnum.java new file mode 100644 index 00000000..0ed67613 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/date/SmartDateFormatterEnum.java @@ -0,0 +1,78 @@ +package net.lab1024.smartadmin.service.util.date; + +import java.time.format.DateTimeFormatter; + +/** + * 时间格式化 枚举类 + * + * @author 胡克 + * @date 2021/6/6 18:45 + */ +public enum SmartDateFormatterEnum { + + /** + * 日期格式 :年月日 yyyy-MM-dd + * 例:2021-10-15 + */ + YMD(DateTimeFormatter.ofPattern("yyyy-MM-dd")), + + /** + * 日期格式 :年月日 时分 yyyy-MM-dd HH:mm + * 例:2021-10-15 10:15 + */ + YMD_HM(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm")), + + /** + * 日期格式 :年月日 时分秒 yyyy-MM-dd HH:mm:ss + * 例:2021-10-15 10:15:00 + */ + YMD_HMS(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")), + + /** + * 日期格式 :年月 yyyy-MM + * 例:2021-10 + */ + YM(DateTimeFormatter.ofPattern("yyyy-MM")), + + /** + * 日期格式:年月 MM-dd + * 例:10-15 + */ + MD(DateTimeFormatter.ofPattern("MM-dd")), + + /** + * 日期格式:年月 MM月dd日 + * 例:10月15日 + */ + CHINESE_MD(DateTimeFormatter.ofPattern("MM月dd日")), + + /** + * 日期格式 : yyyyMMddHHmmss + * 例:20091225091010 + */ + YMDHMS(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")), + + /** + * 日期格式 :时分秒 HH:mm:ss + * 例:10:15:00 + */ + HMS(DateTimeFormatter.ofPattern("HH:mm:ss")), + + /** + * 日期格式 :时分 HH:mm + * 例:10:15 + */ + HM(DateTimeFormatter.ofPattern("HH:mm")), + + ; + + private final DateTimeFormatter formatter; + + SmartDateFormatterEnum(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public DateTimeFormatter getFormatter() { + return formatter; + } +} diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/date/SmartLocalDateUtil.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/date/SmartLocalDateUtil.java new file mode 100644 index 00000000..3952303b --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/date/SmartLocalDateUtil.java @@ -0,0 +1,121 @@ +package net.lab1024.smartadmin.service.util.date; + +import java.time.*; +import java.time.format.TextStyle; +import java.time.temporal.ChronoUnit; +import java.util.Date; +import java.util.Locale; + +/** + * java8 LocalDate 日期工具类 + * + * @author listen + * @date 2019/02/20 10:16 + */ +public class SmartLocalDateUtil { + + /** + * 格式化 LocalDateTime 返回对应格式字符串 + * + * @param time + * @param formatterEnum {@link SmartDateFormatterEnum} + * @return + */ + public static String format(LocalDateTime time, SmartDateFormatterEnum formatterEnum) { + return time.format(formatterEnum.getFormatter()); + } + + /** + * 格式化 LocalDate返回对应格式字符串 + * + * @param date + * @param formatterEnum {@link SmartDateFormatterEnum} + * @return + */ + public static String format(LocalDate date, SmartDateFormatterEnum formatterEnum) { + return date.format(formatterEnum.getFormatter()); + } + + /** + * 解析时间字符串 返回LocalDateTime + * + * @param time + * @param formatterEnum {@link SmartDateFormatterEnum} + * @return + */ + public static LocalDateTime parse(String time, SmartDateFormatterEnum formatterEnum) { + return LocalDateTime.parse(time, formatterEnum.getFormatter()); + } + + /** + * 解析时间字符串 返回 LocalDate + * + * @param time + * @param formatterEnum {@link SmartDateFormatterEnum} + * @return + */ + public static LocalDate parseDate(String time, SmartDateFormatterEnum formatterEnum) { + return LocalDate.parse(time, formatterEnum.getFormatter()); + } + + /** + * 获取指定日期时间戳 + * + * @param time + * @return + */ + public static Long getTimestamp(LocalDateTime time) { + return time.toInstant(ZoneOffset.ofHours(8)).toEpochMilli(); + } + + /** + * 获取当前时间戳(秒) + * + * @return + */ + public static long nowSecond() { + return System.currentTimeMillis() / 1000; + } + + /** + * 将时间格式化为 星期几,例:星期一 ... 星期日 + * + * @param localDate + * @return + */ + public static String formatToChineseWeek(LocalDate localDate) { + return localDate.getDayOfWeek().getDisplayName(TextStyle.FULL, Locale.CHINESE); + } + + /** + * 将时间格式化为 周几,例:周一 ... 周日 + * + * @param localDate + * @return + */ + public static String formatToChineseWeekZhou(LocalDate localDate) { + return formatToChineseWeek(localDate).replace("星期", "周"); + } + + public static LocalDateTime toLocalDateTime(Date date) { + return Instant.ofEpochMilli(date.getTime()).atZone(ZoneId.systemDefault()).toLocalDateTime(); + } + + /** + * 获取当天剩余时间 单位 + * + * @param unit 时间单位 + * @return + */ + public static Long getDayBalanceTime(ChronoUnit unit) { + LocalDateTime now = LocalDateTime.now(); + return Duration.between(now, now.plusDays(1L).with(LocalTime.MIN)).get(unit); + } + + public static void main(String[] args) { + System.out.println(SmartLocalDateUtil.format(LocalDateTime.now(),SmartDateFormatterEnum.YMD_HMS)); + System.out.println(SmartLocalDateUtil.format(LocalDateTime.now(),SmartDateFormatterEnum.YMD_HM)); + System.out.println(SmartLocalDateUtil.parse("2021-10-15 10:10:00",SmartDateFormatterEnum.YMD_HMS)); + } + +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/excel/SmartExcel.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/excel/SmartExcel.java similarity index 97% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/excel/SmartExcel.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/excel/SmartExcel.java index 47f6e8cd..d9f6bb02 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/excel/SmartExcel.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/excel/SmartExcel.java @@ -1,4 +1,7 @@ -package net.lab1024.smartadmin.util.excel; +package net.lab1024.smartadmin.service.util.excel; + +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; import java.io.FileInputStream; import java.io.IOException; @@ -7,11 +10,8 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; -import org.apache.poi.hssf.usermodel.HSSFWorkbook; -import org.apache.poi.xssf.usermodel.XSSFWorkbook; - /** - * zhuoda + * 卓大 */ public class SmartExcel { diff --git a/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/excel/SmartExcelFileType.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/excel/SmartExcelFileType.java new file mode 100644 index 00000000..f65658f9 --- /dev/null +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/excel/SmartExcelFileType.java @@ -0,0 +1,10 @@ +package net.lab1024.smartadmin.service.util.excel; + +/** + * @author 卓大 + */ +public enum SmartExcelFileType { + XLS, + XLSX + +} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/excel/SmartExcelReader.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/excel/SmartExcelReader.java similarity index 77% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/excel/SmartExcelReader.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/excel/SmartExcelReader.java index e5c1ba5b..439c78e2 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/excel/SmartExcelReader.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/excel/SmartExcelReader.java @@ -1,13 +1,16 @@ -package net.lab1024.smartadmin.util.excel; +package net.lab1024.smartadmin.service.util.excel; /** - * @author zhuoda + * @author 卓大 * @Date 2020/8/10 */ -import net.lab1024.smartadmin.util.SmartFileUtil; +import net.lab1024.smartadmin.service.util.SmartFileUtil; -import java.io.*; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; public class SmartExcelReader { diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/excel/SmartSheet.java b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/excel/SmartSheet.java similarity index 98% rename from smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/excel/SmartSheet.java rename to admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/excel/SmartSheet.java index 80aed760..836657cd 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/excel/SmartSheet.java +++ b/admin-api/java-api/src/main/java/net/lab1024/smartadmin/service/util/excel/SmartSheet.java @@ -1,4 +1,4 @@ -package net.lab1024.smartadmin.util.excel; +package net.lab1024.smartadmin.service.util.excel; import org.apache.poi.ss.usermodel.Cell; @@ -7,7 +7,7 @@ import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.util.CellRangeAddress; /** - * @author zhuoda + * @author 卓大 */ public class SmartSheet { final String name; diff --git a/smart-admin-service/smart-admin-api/src/main/resources/banner.txt b/admin-api/java-api/src/main/resources/banner.txt similarity index 69% rename from smart-admin-service/smart-admin-api/src/main/resources/banner.txt rename to admin-api/java-api/src/main/resources/banner.txt index d3187732..73c66a4e 100644 --- a/smart-admin-service/smart-admin-api/src/main/resources/banner.txt +++ b/admin-api/java-api/src/main/resources/banner.txt @@ -1,8 +1,14 @@ + ${AnsiColor.BRIGHT_GREEN} + / ____| | | /\ | | (_) | (___ _ __ ___ __ _ _ __| |_ / \ __| |_ __ ___ _ _ __ \___ \| '_ ` _ \ / _` | '__| __| / /\ \ / _` | '_ ` _ \| | '_ \ ____) | | | | | | (_| | | | |_ / ____ \ (_| | | | | | | | | | | |_____/|_| |_| |_|\__,_|_| \__/_/ \_\__,_|_| |_| |_|_|_| |_| -SmartAdmin v1.2.0 +热爱代码 热爱生活 +永远年轻 永远前行 +SmartAdmin v2.0.0 by 【1024lab team】 + +${AnsiColor.DEFAULT} \ No newline at end of file diff --git a/admin-api/java-api/src/main/resources/dev/application.properties b/admin-api/java-api/src/main/resources/dev/application.properties new file mode 100644 index 00000000..96a556e1 --- /dev/null +++ b/admin-api/java-api/src/main/resources/dev/application.properties @@ -0,0 +1,98 @@ +######################### server ################### +server.servlet.context-path=/ +server.port=10086 +spring.profiles.active=@profiles.active@ + +######################### project ################### +project.name=smart-admin +project.module=net.lab1024.smartadmin.service.module + +######################### tomcat ################### +server.tomcat.basedir=/home/logs/smart-admin/tomcat-logs +server.tomcat.accesslog.enabled=true +server.tomcat.accesslog.pattern=%t %{X-Forwarded-For}i %a "%r" %s %D (%D ms) + +######################### jackson ######################### +spring.jackson.serialization.write-enums-using-to-string=true +spring.jackson.deserialization.read-enums-using-to-string=true +spring.jackson.deserialization.fail-on-unknown-properties=false +spring.jackson.default-property-inclusion=always +spring.jackson.date-format=yyyy-MM-dd HH:mm:ss +spring.jackson.time-zone=GMT+8 +spring.jackson.serialization.write-dates-as-timestamps=false + +######################### database ######################### +spring.datasource.url=jdbc:p6spy:mysql://127.0.0.1:3306/smart_admin_v2?autoReconnect=true&useServerPreparedStmts=false&rewriteBatchedStatements=true&characterEncoding=UTF-8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai +spring.datasource.username=root +spring.datasource.password=1024lab +spring.datasource.initial-size=2 +spring.datasource.min-idle=1 +spring.datasource.max-active=10 +spring.datasource.max-wait=60000 +spring.datasource.time-between-eviction-runs-millis=60000 +spring.datasource.min-evictable-idle-time-millis=300000 +spring.datasource.driver-class-name=com.p6spy.engine.spy.P6SpyDriver +spring.datasource.filters=stat +spring.datasource.druid.username=druid +spring.datasource.druid.password=123456 +spring.datasource.druid.login.enabled=false +spring.datasource.druid.service.scanner=net.lab1024.smartadmin.module..*Service.* + +######################### redis ####################################### +spring.redis.database=1 +spring.redis.host=127.0.0.1 +spring.redis.lettuce.pool.max-active=100 +spring.redis.lettuce.pool.min-idle=5 +spring.redis.lettuce.pool.max-idle=10 +spring.redis.lettuce.pool.max-wait=30000ms +spring.redis.port=6379 +spring.redis.timeout=10000ms +spring.redis.password= + +######################### swagger ######################### +swagger.apiGroupName=smartAdmin +swagger.title=SmartAdmin +swagger.description=SmartAdmin2.0 +swagger.version=2.0 +swagger.serviceUrl=http://localhost:${server.port}/smart-admin-api +swagger.packAge=net.lab1024.smartadmin.service +swagger.tagClass=net.lab1024.smartadmin.service.common.constant.SwaggerTagConst + +########################## rest http pool ######################### +http.pool.max-total=20 +http.pool.connect-timeout=50000 +http.pool.read-timeout=50000 +http.pool.write-timeout=50000 +http.pool.keep-alive=300000 + +######################### http file ######################### +spring.servlet.multipart.max-file-size=30MB +spring.servlet.multipart.max-request-size=30MB + +######################### ali oss ######################### +file.storage.mode=cloud +file.storage.local.path=/home/upload/ +file.storage.cloud.region=oss-cn-qingdao +file.storage.cloud.endpoint=oss-cn-qingdao.aliyuncs.com +file.storage.cloud.bucket-name=smart-admin-sit +file.storage.cloud.access-key=xxxx +file.storage.cloud.secret-key=xxxx +file.storage.cloud.url.expire=7200000 +file.storage.cloud.url.public=https://${file.storage.cloud.bucket-name}.${file.storage.cloud.endpoint}/ + +######################### redis mq ######################### +redis.mq.topic=smartAdmin +redis.mq.scanPath=${project.module} + +######################### cros ######################### +access-control-allow-origin=* + +######################### heart beat ######################### +heart-beat.delayHandlerTime=60000 +heart-beat.intervalTime=300000 + +######################### cache config ######################### +cache.maximumSize=5000 +cache.expireDays=10 +cache.scanPath=${project.module} + diff --git a/smart-admin-service/smart-admin-api/src/main/resources/dev/log4j2.xml b/admin-api/java-api/src/main/resources/dev/log4j2.xml similarity index 99% rename from smart-admin-service/smart-admin-api/src/main/resources/dev/log4j2.xml rename to admin-api/java-api/src/main/resources/dev/log4j2.xml index 86c514a3..da37dd11 100644 --- a/smart-admin-service/smart-admin-api/src/main/resources/dev/log4j2.xml +++ b/admin-api/java-api/src/main/resources/dev/log4j2.xml @@ -85,6 +85,7 @@ + @@ -94,4 +95,5 @@ + \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/dev/spy.properties b/admin-api/java-api/src/main/resources/dev/spy.properties similarity index 100% rename from smart-admin-service/smart-admin-api/src/main/resources/dev/spy.properties rename to admin-api/java-api/src/main/resources/dev/spy.properties diff --git a/admin-api/java-api/src/main/resources/mapper/business/category/CategoryMapper.xml b/admin-api/java-api/src/main/resources/mapper/business/category/CategoryMapper.xml new file mode 100644 index 00000000..c3c73f90 --- /dev/null +++ b/admin-api/java-api/src/main/resources/mapper/business/category/CategoryMapper.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/admin-api/java-api/src/main/resources/mapper/business/goods/GoodsMapper.xml b/admin-api/java-api/src/main/resources/mapper/business/goods/GoodsMapper.xml new file mode 100644 index 00000000..c0913e63 --- /dev/null +++ b/admin-api/java-api/src/main/resources/mapper/business/goods/GoodsMapper.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/mapper/business/notice/NoticeMapper.xml b/admin-api/java-api/src/main/resources/mapper/business/notice/NoticeMapper.xml similarity index 76% rename from smart-admin-service/smart-admin-api/src/main/resources/mapper/business/notice/NoticeMapper.xml rename to admin-api/java-api/src/main/resources/mapper/business/notice/NoticeMapper.xml index d94c0ab7..0cf555fc 100644 --- a/smart-admin-service/smart-admin-api/src/main/resources/mapper/business/notice/NoticeMapper.xml +++ b/admin-api/java-api/src/main/resources/mapper/business/notice/NoticeMapper.xml @@ -1,20 +1,8 @@ - + - - - - - - - - - - - - - select n.id, n.title, @@ -34,8 +22,8 @@ AND INSTR(n.title,#{queryDTO.title}) - - AND n.deleted = #{queryDTO.deleted} + + AND n.deleted_flag = #{queryDTO.deletedFlag} ORDER by n.create_time desc @@ -43,7 +31,7 @@ - select n.id, n.title, @@ -59,7 +47,7 @@ - select n.id, n.title, @@ -91,7 +79,7 @@ - select n.id, n.title, @@ -110,13 +98,13 @@ UPDATE t_notice - set deleted = #{deletedFlag} + set deleted_flag = #{deletedFlag} WHERE id =#{id} - UPDATE t_notice set deleted = #{deletedFlag} where id in + UPDATE t_notice set deleted_flag = #{deletedFlag} where id in #{item} @@ -129,7 +117,7 @@ from t_notice where send_status = #{sendStatus} - SELECT nrr.employee_id, count(1) as readCount diff --git a/smart-admin-service/smart-admin-api/src/main/resources/mapper/business/notice/NoticeReceiveRecordMapper.xml b/admin-api/java-api/src/main/resources/mapper/business/notice/NoticeReceiveRecordMapper.xml similarity index 84% rename from smart-admin-service/smart-admin-api/src/main/resources/mapper/business/notice/NoticeReceiveRecordMapper.xml rename to admin-api/java-api/src/main/resources/mapper/business/notice/NoticeReceiveRecordMapper.xml index 66168c57..424c8d5f 100644 --- a/smart-admin-service/smart-admin-api/src/main/resources/mapper/business/notice/NoticeReceiveRecordMapper.xml +++ b/admin-api/java-api/src/main/resources/mapper/business/notice/NoticeReceiveRecordMapper.xml @@ -1,8 +1,8 @@ - + - + diff --git a/admin-api/java-api/src/main/resources/mapper/support/DataTracerMapper.xml b/admin-api/java-api/src/main/resources/mapper/support/DataTracerMapper.xml new file mode 100644 index 00000000..67f5c31e --- /dev/null +++ b/admin-api/java-api/src/main/resources/mapper/support/DataTracerMapper.xml @@ -0,0 +1,25 @@ + + + + + + + + + \ No newline at end of file diff --git a/admin-api/java-api/src/main/resources/mapper/support/FileMapper.xml b/admin-api/java-api/src/main/resources/mapper/support/FileMapper.xml new file mode 100644 index 00000000..2f4bd253 --- /dev/null +++ b/admin-api/java-api/src/main/resources/mapper/support/FileMapper.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/mapper/support/heartbeat/HeartBeatRecordMapper.xml b/admin-api/java-api/src/main/resources/mapper/support/HeartBeatRecordMapper.xml similarity index 75% rename from smart-admin-service/smart-admin-api/src/main/resources/mapper/support/heartbeat/HeartBeatRecordMapper.xml rename to admin-api/java-api/src/main/resources/mapper/support/HeartBeatRecordMapper.xml index 27ce75e6..e9fcdf2b 100644 --- a/smart-admin-service/smart-admin-api/src/main/resources/mapper/support/heartbeat/HeartBeatRecordMapper.xml +++ b/admin-api/java-api/src/main/resources/mapper/support/HeartBeatRecordMapper.xml @@ -1,6 +1,6 @@ - + @@ -18,7 +18,7 @@ #{processStartTime}, #{heartBeatTime}) - + update t_heart_beat_record set heart_beat_time = #{heartBeatTime} @@ -26,16 +26,17 @@ id = #{id} - - select * from t_heart_beat_record where project_path = #{projectPath} and server_ip = #{serverIp} and process_no =#{processNo} - + SELECT * FROM t_heart_beat_record order by heart_beat_time desc + diff --git a/admin-api/java-api/src/main/resources/mapper/support/IdGeneratorMapper.xml b/admin-api/java-api/src/main/resources/mapper/support/IdGeneratorMapper.xml new file mode 100644 index 00000000..5662d77a --- /dev/null +++ b/admin-api/java-api/src/main/resources/mapper/support/IdGeneratorMapper.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + REPLACE INTO t_id_generator_record (generator_id, `year`, `month`, `day`, last_number,`count`) + values (#{generatorId}, #{year}, #{month}, #{day}, #{lastNumber},#{count}) + + + + \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/mapper/business/log/UserOperateLogMapper.xml b/admin-api/java-api/src/main/resources/mapper/support/OperateLogMapper.xml similarity index 81% rename from smart-admin-service/smart-admin-api/src/main/resources/mapper/business/log/UserOperateLogMapper.xml rename to admin-api/java-api/src/main/resources/mapper/support/OperateLogMapper.xml index 7088f2c4..2e0d2b7e 100644 --- a/smart-admin-service/smart-admin-api/src/main/resources/mapper/business/log/UserOperateLogMapper.xml +++ b/admin-api/java-api/src/main/resources/mapper/support/OperateLogMapper.xml @@ -1,11 +1,8 @@ - + - - - - select id, user_id, @@ -15,7 +12,7 @@ url, method, param, - result, + success_flag, fail_reason, update_time, create_time diff --git a/admin-api/java-api/src/main/resources/mapper/support/SystemConfigMapper.xml b/admin-api/java-api/src/main/resources/mapper/support/SystemConfigMapper.xml new file mode 100644 index 00000000..311c63c4 --- /dev/null +++ b/admin-api/java-api/src/main/resources/mapper/support/SystemConfigMapper.xml @@ -0,0 +1,25 @@ + + + + + + + + + + \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/mapper/system/datascope/DataScopeRoleMapper.xml b/admin-api/java-api/src/main/resources/mapper/system/datascope/DataScopeRoleMapper.xml similarity index 88% rename from smart-admin-service/smart-admin-api/src/main/resources/mapper/system/datascope/DataScopeRoleMapper.xml rename to admin-api/java-api/src/main/resources/mapper/system/datascope/DataScopeRoleMapper.xml index 88bd6a9d..4e313b18 100644 --- a/smart-admin-service/smart-admin-api/src/main/resources/mapper/system/datascope/DataScopeRoleMapper.xml +++ b/admin-api/java-api/src/main/resources/mapper/system/datascope/DataScopeRoleMapper.xml @@ -1,8 +1,8 @@ - + - + + SELECT + d.*, + e.actual_name as managerName, + pd.`name` as parentName + FROM + t_department d + left join t_employee e on d.manager_id= e.id + left join t_department pd on d.parent_id = pd.id + order by sort asc + + + + + + + \ No newline at end of file diff --git a/admin-api/java-api/src/main/resources/mapper/system/employee/EmployeeMapper.xml b/admin-api/java-api/src/main/resources/mapper/system/employee/EmployeeMapper.xml new file mode 100644 index 00000000..fb4c12e0 --- /dev/null +++ b/admin-api/java-api/src/main/resources/mapper/system/employee/EmployeeMapper.xml @@ -0,0 +1,158 @@ + + + + + + + + UPDATE t_employee + SET disabled_flag = #{disabledFlag} + WHERE id in + + #{item} + + + + + UPDATE t_employee + SET disabled_flag = #{disabledFlag} + WHERE id = #{id} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + UPDATE t_employee + SET login_pwd = #{password} + WHERE id = #{employeeId} + + + + \ No newline at end of file diff --git a/admin-api/java-api/src/main/resources/mapper/system/menu/MenuMapper.xml b/admin-api/java-api/src/main/resources/mapper/system/menu/MenuMapper.xml new file mode 100644 index 00000000..c5cfa4b5 --- /dev/null +++ b/admin-api/java-api/src/main/resources/mapper/system/menu/MenuMapper.xml @@ -0,0 +1,76 @@ + + + + + + select m.menu_id, + m.menu_name, + m.menu_type, + m.parent_id, + m.sort, + m.path, + m.component, + m.frame_flag, + m.cache_flag, + m.visible_flag, + m.disabled_flag, + m.perms, + m.icon, + m.context_menu_id, + m.create_user_id, + m.create_time, + m.update_user_id, + m.update_time + from t_menu m + + + + + update t_menu + set delete_flag = #{deleteFlag}, + update_user_id = #{updateUserId} + where menu_id = #{item} + + + + + + + + + + + \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/mapper/system/role/RoleEmployeeMapper.xml b/admin-api/java-api/src/main/resources/mapper/system/role/RoleEmployeeMapper.xml similarity index 50% rename from smart-admin-service/smart-admin-api/src/main/resources/mapper/system/role/RoleEmployeeMapper.xml rename to admin-api/java-api/src/main/resources/mapper/system/role/RoleEmployeeMapper.xml index 5984cb7d..9db6197c 100644 --- a/smart-admin-service/smart-admin-api/src/main/resources/mapper/system/role/RoleEmployeeMapper.xml +++ b/admin-api/java-api/src/main/resources/mapper/system/role/RoleEmployeeMapper.xml @@ -1,14 +1,17 @@ - + + type="net.lab1024.smartadmin.service.module.system.employee.domain.dto.EmployeeDTO"> - er.id, + er + . + id + , er.role_id, er.employee_id, er.update_time, @@ -17,12 +20,9 @@ @@ -32,14 +32,9 @@ e.login_name, e.login_pwd, e.actual_name, - e.nick_name, e.phone, - e.id_card, - e.birthday, - e.email, e.department_id, - e.is_leave, - e.is_disabled, + e.disabled_flag, e.remark, e.update_time, e.create_time @@ -49,8 +44,7 @@ left join t_role r on er.role_id = r.id - - AND r.role_name like #{likeRoleName} + AND INSTR(r.role_name,#{queryDTO.roleName}) AND er.role_id = #{queryDTO.roleId} @@ -59,66 +53,72 @@ + + + - DELETE FROM t_role_employee + DELETE + FROM t_role_employee WHERE employee_id = #{employeeId} - DELETE FROM t_role_employee + DELETE + FROM t_role_employee WHERE role_id = #{roleId} - DELETE FROM t_role_employee - WHERE role_id = #{roleId} and employee_id = #{employeeId} + DELETE + FROM t_role_employee + WHERE role_id = #{roleId} + and employee_id = #{employeeId} DELETE FROM t_role_employee WHERE role_id = #{roleId} and employee_id in - + #{item} - - - INSERT INTO t_role_employee (role_id, employee_id, update_time, create_time) VALUES - - ( - #{item.roleId}, - #{item.employeeId}, - now(), - now() - ) - - - - \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/mapper/system/role/RoleMapper.xml b/admin-api/java-api/src/main/resources/mapper/system/role/RoleMapper.xml similarity index 72% rename from smart-admin-service/smart-admin-api/src/main/resources/mapper/system/role/RoleMapper.xml rename to admin-api/java-api/src/main/resources/mapper/system/role/RoleMapper.xml index 5b7177dd..84a8b47e 100644 --- a/smart-admin-service/smart-admin-api/src/main/resources/mapper/system/role/RoleMapper.xml +++ b/admin-api/java-api/src/main/resources/mapper/system/role/RoleMapper.xml @@ -1,9 +1,9 @@ - + + type="net.lab1024.smartadmin.service.module.system.role.basic.domain.entity.RoleEntity"> diff --git a/admin-api/java-api/src/main/resources/mapper/system/role/RoleMenuMapper.xml b/admin-api/java-api/src/main/resources/mapper/system/role/RoleMenuMapper.xml new file mode 100644 index 00000000..77c6cec3 --- /dev/null +++ b/admin-api/java-api/src/main/resources/mapper/system/role/RoleMenuMapper.xml @@ -0,0 +1,18 @@ + + + + + delete + from t_role_menu + where role_id = #{roleId} + + + + \ No newline at end of file diff --git a/admin-web/typescript-ant-design-vue/.env b/admin-web/typescript-ant-design-vue/.env new file mode 100644 index 00000000..6181c66e --- /dev/null +++ b/admin-web/typescript-ant-design-vue/.env @@ -0,0 +1,2 @@ + +VITE_APP_PROJECT_TITLE = 'SmartAdmin' \ No newline at end of file diff --git a/admin-web/typescript-ant-design-vue/.env.development b/admin-web/typescript-ant-design-vue/.env.development new file mode 100644 index 00000000..de2f991c --- /dev/null +++ b/admin-web/typescript-ant-design-vue/.env.development @@ -0,0 +1,7 @@ + +VITE_APP_API_URL = 'http://localhost:10086/api' + +VITE_APP_PROJECT_TITLE = 'SmartAdmin Dev' + +VITE_APP_PROFILE = 'dev' +VITE_APP_MODE = 'development' diff --git a/admin-web/typescript-ant-design-vue/.env.localhost b/admin-web/typescript-ant-design-vue/.env.localhost new file mode 100644 index 00000000..88c177ef --- /dev/null +++ b/admin-web/typescript-ant-design-vue/.env.localhost @@ -0,0 +1,7 @@ + +VITE_APP_API_URL = 'http://127.0.0.1:10086/admin' + +VITE_APP_PROJECT_TITLE = 'SmartAdmin Localhost' + +VITE_APP_PROFILE = 'local' +VITE_APP_MODE = 'local' \ No newline at end of file diff --git a/admin-web/typescript-ant-design-vue/.env.pre b/admin-web/typescript-ant-design-vue/.env.pre new file mode 100644 index 00000000..fb0d72e0 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/.env.pre @@ -0,0 +1,8 @@ + +VITE_APP_API_URL = 'http://localhost:10086/api' + +VITE_APP_PROJECT_TITLE = 'SmartAdmin PRE' + +VITE_APP_PROFILE = 'pre' + +VITE_APP_MODE = 'development' \ No newline at end of file diff --git a/admin-web/typescript-ant-design-vue/.env.production b/admin-web/typescript-ant-design-vue/.env.production new file mode 100644 index 00000000..b2e8e4d3 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/.env.production @@ -0,0 +1,6 @@ + +VITE_APP_API_URL = 'http://localhost:10086/api' + +VITE_APP_PROFILE = 'prod' + +VITE_APP_MODE = 'production' \ No newline at end of file diff --git a/admin-web/typescript-ant-design-vue/.env.sit b/admin-web/typescript-ant-design-vue/.env.sit new file mode 100644 index 00000000..c139f546 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/.env.sit @@ -0,0 +1,7 @@ + +VITE_APP_API_URL = 'http://sit-xmf-crm.renminyixue.cn/api/admin' + +VITE_APP_PROJECT_TITLE = 'SmartAdmin Sit' + +VITE_APP_PROFILE = 'sit' +VITE_APP_MODE = 'development' diff --git a/admin-web/typescript-ant-design-vue/.eslintignore b/admin-web/typescript-ant-design-vue/.eslintignore new file mode 100644 index 00000000..6869ab58 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/.eslintignore @@ -0,0 +1,17 @@ + +*.sh +node_modules +lib +*.md +*.woff +*.ttf +.vscode +.idea +dist +public +/docs +.husky +.local +/bin +Dockerfile +src/assets diff --git a/admin-web/typescript-ant-design-vue/.eslintrc.js b/admin-web/typescript-ant-design-vue/.eslintrc.js new file mode 100644 index 00000000..43d58245 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/.eslintrc.js @@ -0,0 +1,76 @@ +module.exports = { + root: true, + env: { + browser: true, + es2021: true, + node: true, + }, + parser: 'vue-eslint-parser', + parserOptions: { + ecmaVersion: 12, + parser: '@typescript-eslint/parser', + sourceType: 'module', + }, + extends: [ + 'plugin:vue/vue3-essential', + 'eslint:recommended', + 'plugin:vue/base' + ], + globals: { + defineProps: "readonly", + defineEmits: "readonly", + defineExpose: "readonly", + withDefaults: "readonly" + }, + plugins: ['vue', '@typescript-eslint'], + rules: { + '@typescript-eslint/ban-ts-ignore': 'off', + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-var-requires': 'off', + '@typescript-eslint/no-empty-function': 'off', + 'vue/custom-event-name-casing': 'off', + 'no-use-before-define': 'off', + '@typescript-eslint/no-use-before-define': 'off', + '@typescript-eslint/ban-ts-comment': 'off', + '@typescript-eslint/ban-types': 'off', + '@typescript-eslint/no-non-null-assertion': 'off', + '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/no-unused-vars': [ + 'error', + // we are only using this rule to check for unused arguments since TS + // catches unused variables but not args. + { varsIgnorePattern: '.*', args: 'none' } + ], + 'no-unused-vars': [ + 'error', + // we are only using this rule to check for unused arguments since TS + // catches unused variables but not args. + { varsIgnorePattern: '.*', args: 'none' } + ], + 'space-before-function-paren': 'off', + + 'vue/attributes-order': 'off', + 'vue/one-component-per-file': 'off', + 'vue/html-closing-bracket-newline': 'off', + 'vue/max-attributes-per-line': 'off', + 'vue/multiline-html-element-content-newline': 'off', + 'vue/singleline-html-element-content-newline': 'off', + 'vue/attribute-hyphenation': 'off', + 'vue/require-default-prop': 'off', + 'vue/html-self-closing': [ + 'error', + { + html: { + void: 'always', + normal: 'never', + component: 'always', + }, + svg: 'always', + math: 'always', + }, + ], + // Enable vue/script-setup-uses-vars rule + 'vue/script-setup-uses-vars': 'error', + } +}; diff --git a/admin-web/typescript-ant-design-vue/.gitignore b/admin-web/typescript-ant-design-vue/.gitignore new file mode 100644 index 00000000..f4f9f437 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/.gitignore @@ -0,0 +1,6 @@ +node_modules +.DS_Store +dist +dist-ssr +*.local +.idea diff --git a/admin-web/typescript-ant-design-vue/.prettierrc.js b/admin-web/typescript-ant-design-vue/.prettierrc.js new file mode 100644 index 00000000..5e6a08b2 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/.prettierrc.js @@ -0,0 +1,21 @@ +module.exports = { + printWidth: 150,// 每行字符长度 + tabWidth: 2,// 缩进空格数 + useTabs: false,//不用tab缩进 + semi: true,//// 在语句末尾打印分号 + singleQuote: true,// 使用单引号而不是双引号 + vueIndentScriptAndStyle: true,//Vue文件脚本和样式标签缩进 + quoteProps: 'as-needed',// 更改引用对象属性的时间 可选值"" + jsxSingleQuote: false,// 在JSX中使用单引号而不是双引号 + trailingComma: 'es5',//多行时尽可能打印尾随逗号。(例如,单行数组永远不会出现逗号结尾。) 可选值"",默认none + bracketSpacing: true,// 在对象文字中的括号之间打印空格 + jsxBracketSameLine: false,//jsx 标签的反尖括号需要换行 + arrowParens: 'always',// 在单独的箭头函数参数周围包括括号 always:(x) => x \ avoid:x => x + rangeStart: 0,// 这两个选项可用于格式化以给定字符偏移量(分别包括和不包括)开始和结束的代码 + rangeEnd: Infinity, + requirePragma: false,// 指定要使用的解析器,不需要写文件开头的 @prettier + insertPragma: false,// 不需要自动在文件开头插入 @prettier + proseWrap: 'preserve',// 使用默认的折行标准 always\never\preserve + htmlWhitespaceSensitivity: 'css',// 指定HTML文件的全局空格敏感度 css\strict\ignore + endOfLine: 'lf',// 换行符使用 lf 结尾是 可选值"" +}; diff --git a/admin-web/typescript-ant-design-vue/.stylelintignore b/admin-web/typescript-ant-design-vue/.stylelintignore new file mode 100644 index 00000000..05170761 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/.stylelintignore @@ -0,0 +1,3 @@ +/dist/* +/public/* +public/* diff --git a/admin-web/typescript-ant-design-vue/.stylelintrc.js b/admin-web/typescript-ant-design-vue/.stylelintrc.js new file mode 100644 index 00000000..06951edd --- /dev/null +++ b/admin-web/typescript-ant-design-vue/.stylelintrc.js @@ -0,0 +1,70 @@ +module.exports = { + root: true, + plugins: ['stylelint-order'], + extends: ['stylelint-config-standard', 'stylelint-config-prettier'], + rules: { + 'selector-pseudo-class-no-unknown': [ + true, + { + ignorePseudoClasses: ['global'], + }, + ], + 'selector-pseudo-element-no-unknown': [ + true, + { + ignorePseudoElements: ['v-deep'], + }, + ], + 'at-rule-no-unknown': [ + true, + { + ignoreAtRules: [ + 'tailwind', + 'apply', + 'variants', + 'responsive', + 'screen', + 'function', + 'if', + 'each', + 'include', + 'mixin', + ], + }, + ], + 'no-empty-source': null, + 'named-grid-areas-no-invalid': null, + 'unicode-bom': 'never', + 'no-descending-specificity': null, + 'font-family-no-missing-generic-family-keyword': null, + 'declaration-colon-space-after': 'always-single-line', + 'declaration-colon-space-before': 'never', + // 'declaration-block-trailing-semicolon': 'always', + 'rule-empty-line-before': [ + 'always', + { + ignore: ['after-comment', 'first-nested'], + }, + ], + 'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }], + 'order/order': [ + [ + 'dollar-variables', + 'custom-properties', + 'at-rules', + 'declarations', + { + type: 'at-rule', + name: 'supports', + }, + { + type: 'at-rule', + name: 'media', + }, + 'rules', + ], + { severity: 'warning' }, + ], + }, + ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'], +}; diff --git a/admin-web/typescript-ant-design-vue/README.en.md b/admin-web/typescript-ant-design-vue/README.en.md new file mode 100644 index 00000000..76e2e42b --- /dev/null +++ b/admin-web/typescript-ant-design-vue/README.en.md @@ -0,0 +1,36 @@ +# smart-admin2 + +#### Description +{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} + +#### Software Architecture +Software architecture description + +#### Installation + +1. xxxx +2. xxxx +3. xxxx + +#### Instructions + +1. xxxx +2. xxxx +3. xxxx + +#### Contribution + +1. Fork the repository +2. Create Feat_xxx branch +3. Commit your code +4. Create Pull Request + + +#### Gitee Feature + +1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md +2. Gitee blog [blog.gitee.com](https://blog.gitee.com) +3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) +4. The most valuable open source project [GVP](https://gitee.com/gvp) +5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) +6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/admin-web/typescript-ant-design-vue/README.md b/admin-web/typescript-ant-design-vue/README.md new file mode 100644 index 00000000..e69de29b diff --git a/admin-web/typescript-ant-design-vue/index.html b/admin-web/typescript-ant-design-vue/index.html new file mode 100644 index 00000000..f4aaac9c --- /dev/null +++ b/admin-web/typescript-ant-design-vue/index.html @@ -0,0 +1,24 @@ + + + + + + + + + SmartAdmin + + + +
+ + + diff --git a/admin-web/typescript-ant-design-vue/package-lock.json b/admin-web/typescript-ant-design-vue/package-lock.json new file mode 100644 index 00000000..e9783199 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/package-lock.json @@ -0,0 +1,5012 @@ +{ + "version": "0.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@ant-design/colors": { + "version": "5.1.1", + "resolved": "https://registry.npm.taobao.org/@ant-design/colors/download/@ant-design/colors-5.1.1.tgz", + "integrity": "sha1-gAshhrHifmZDLmfQPtlq8+IdiUA=", + "requires": { + "@ctrl/tinycolor": "^3.3.1" + } + }, + "@ant-design/icons-svg": { + "version": "4.1.0", + "resolved": "https://registry.npm.taobao.org/@ant-design/icons-svg/download/@ant-design/icons-svg-4.1.0.tgz", + "integrity": "sha1-SAsCX0sg73/o9H1KSEbk/uhOoGw=" + }, + "@ant-design/icons-vue": { + "version": "6.0.1", + "resolved": "https://registry.npm.taobao.org/@ant-design/icons-vue/download/@ant-design/icons-vue-6.0.1.tgz?cache=0&sync_timestamp=1611990835390&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40ant-design%2Ficons-vue%2Fdownload%2F%40ant-design%2Ficons-vue-6.0.1.tgz", + "integrity": "sha1-nYBMPHTSz6+XyxjlgtO5QAk09f0=", + "requires": { + "@ant-design/colors": "^5.0.0", + "@ant-design/icons-svg": "^4.0.0", + "@types/lodash": "^4.14.165", + "lodash": "^4.17.15" + } + }, + "@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.nlark.com/@babel/code-frame/download/@babel/code-frame-7.12.11.tgz?cache=0&sync_timestamp=1623280355998&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fcode-frame%2Fdownload%2F%40babel%2Fcode-frame-7.12.11.tgz", + "integrity": "sha1-9K1DWqJj25NbjxDyxVLSP7cWpj8=", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/compat-data": { + "version": "7.14.7", + "resolved": "https://registry.nlark.com/@babel/compat-data/download/@babel/compat-data-7.14.7.tgz", + "integrity": "sha1-ewR9ejqJpn0iWNxh9gTwmPG8fgg=", + "dev": true + }, + "@babel/core": { + "version": "7.14.6", + "resolved": "https://registry.nlark.com/@babel/core/download/@babel/core-7.14.6.tgz?cache=0&sync_timestamp=1623708890157&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fcore%2Fdownload%2F%40babel%2Fcore-7.14.6.tgz", + "integrity": "sha1-4IFOwalQAy/xbBOich3jmoQW/Ks=", + "dev": true, + "requires": { + "@babel/code-frame": "^7.14.5", + "@babel/generator": "^7.14.5", + "@babel/helper-compilation-targets": "^7.14.5", + "@babel/helper-module-transforms": "^7.14.5", + "@babel/helpers": "^7.14.6", + "@babel/parser": "^7.14.6", + "@babel/template": "^7.14.5", + "@babel/traverse": "^7.14.5", + "@babel/types": "^7.14.5", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.1.2", + "semver": "^6.3.0", + "source-map": "^0.5.0" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.14.5", + "resolved": "https://registry.nlark.com/@babel/code-frame/download/@babel/code-frame-7.14.5.tgz?cache=0&sync_timestamp=1623280355998&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fcode-frame%2Fdownload%2F%40babel%2Fcode-frame-7.14.5.tgz", + "integrity": "sha1-I7CNdA6D9JxeWZRfvxtD6Au/Tts=", + "dev": true, + "requires": { + "@babel/highlight": "^7.14.5" + } + }, + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npm.taobao.org/json5/download/json5-2.2.0.tgz", + "integrity": "sha1-Lf7+cgxrpSXZ69kJlQ8FFTFsiaM=", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1616463550093&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz", + "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@babel/generator": { + "version": "7.14.5", + "resolved": "https://registry.nlark.com/@babel/generator/download/@babel/generator-7.14.5.tgz?cache=0&sync_timestamp=1623280360946&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fgenerator%2Fdownload%2F%40babel%2Fgenerator-7.14.5.tgz", + "integrity": "sha1-hI17nwMcrKnQzQrwGwY/Im9S14U=", + "dev": true, + "requires": { + "@babel/types": "^7.14.5", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@babel/helper-compilation-targets": { + "version": "7.14.5", + "resolved": "https://registry.nlark.com/@babel/helper-compilation-targets/download/@babel/helper-compilation-targets-7.14.5.tgz", + "integrity": "sha1-epnF0JZ5Eely/iw0EffVtJhJjs8=", + "dev": true, + "requires": { + "@babel/compat-data": "^7.14.5", + "@babel/helper-validator-option": "^7.14.5", + "browserslist": "^4.16.6", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1616463550093&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz", + "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=", + "dev": true + } + } + }, + "@babel/helper-function-name": { + "version": "7.14.5", + "resolved": "https://registry.nlark.com/@babel/helper-function-name/download/@babel/helper-function-name-7.14.5.tgz?cache=0&sync_timestamp=1623280385237&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fhelper-function-name%2Fdownload%2F%40babel%2Fhelper-function-name-7.14.5.tgz", + "integrity": "sha1-ieLEdJcvFdjiM7Uu6MSA4s/NUMQ=", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.14.5", + "@babel/template": "^7.14.5", + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.14.5", + "resolved": "https://registry.nlark.com/@babel/helper-get-function-arity/download/@babel/helper-get-function-arity-7.14.5.tgz?cache=0&sync_timestamp=1623280360950&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fhelper-get-function-arity%2Fdownload%2F%40babel%2Fhelper-get-function-arity-7.14.5.tgz", + "integrity": "sha1-Jfv6V5sJN+7h87gF7OTOOYxDGBU=", + "dev": true, + "requires": { + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.14.5", + "resolved": "https://registry.nlark.com/@babel/helper-hoist-variables/download/@babel/helper-hoist-variables-7.14.5.tgz?cache=0&sync_timestamp=1623280361512&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fhelper-hoist-variables%2Fdownload%2F%40babel%2Fhelper-hoist-variables-7.14.5.tgz", + "integrity": "sha1-4N0nwzp45XfXyIhJFqPn7x98f40=", + "dev": true, + "requires": { + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.14.7", + "resolved": "https://registry.nlark.com/@babel/helper-member-expression-to-functions/download/@babel/helper-member-expression-to-functions-7.14.7.tgz", + "integrity": "sha1-l+ViRL65QhH+J3vYGOOjKcZveXA=", + "dev": true, + "requires": { + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-module-imports": { + "version": "7.14.5", + "resolved": "https://registry.nlark.com/@babel/helper-module-imports/download/@babel/helper-module-imports-7.14.5.tgz?cache=0&sync_timestamp=1623280362184&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fhelper-module-imports%2Fdownload%2F%40babel%2Fhelper-module-imports-7.14.5.tgz", + "integrity": "sha1-bRpE32o4yVeqfDEtoHZCnxG0IvM=", + "dev": true, + "requires": { + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-module-transforms": { + "version": "7.14.5", + "resolved": "https://registry.nlark.com/@babel/helper-module-transforms/download/@babel/helper-module-transforms-7.14.5.tgz?cache=0&sync_timestamp=1623280992002&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fhelper-module-transforms%2Fdownload%2F%40babel%2Fhelper-module-transforms-7.14.5.tgz", + "integrity": "sha1-feQvENeJtCPrkC69JAMcp3yx4Q4=", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.14.5", + "@babel/helper-replace-supers": "^7.14.5", + "@babel/helper-simple-access": "^7.14.5", + "@babel/helper-split-export-declaration": "^7.14.5", + "@babel/helper-validator-identifier": "^7.14.5", + "@babel/template": "^7.14.5", + "@babel/traverse": "^7.14.5", + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.14.5", + "resolved": "https://registry.nlark.com/@babel/helper-optimise-call-expression/download/@babel/helper-optimise-call-expression-7.14.5.tgz?cache=0&sync_timestamp=1623280360981&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fhelper-optimise-call-expression%2Fdownload%2F%40babel%2Fhelper-optimise-call-expression-7.14.5.tgz", + "integrity": "sha1-8nOVqGGeBmWz8DZM3bQcJdcbSZw=", + "dev": true, + "requires": { + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-replace-supers": { + "version": "7.14.5", + "resolved": "https://registry.nlark.com/@babel/helper-replace-supers/download/@babel/helper-replace-supers-7.14.5.tgz", + "integrity": "sha1-DswLA8Qc1We0Ak6gFhNMKEFKu5Q=", + "dev": true, + "requires": { + "@babel/helper-member-expression-to-functions": "^7.14.5", + "@babel/helper-optimise-call-expression": "^7.14.5", + "@babel/traverse": "^7.14.5", + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-simple-access": { + "version": "7.14.5", + "resolved": "https://registry.nlark.com/@babel/helper-simple-access/download/@babel/helper-simple-access-7.14.5.tgz?cache=0&sync_timestamp=1623280360968&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fhelper-simple-access%2Fdownload%2F%40babel%2Fhelper-simple-access-7.14.5.tgz", + "integrity": "sha1-ZuqFz1O6C05Yi6d/yBP1OryqQcQ=", + "dev": true, + "requires": { + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.14.5", + "resolved": "https://registry.nlark.com/@babel/helper-split-export-declaration/download/@babel/helper-split-export-declaration-7.14.5.tgz?cache=0&sync_timestamp=1623280365934&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fhelper-split-export-declaration%2Fdownload%2F%40babel%2Fhelper-split-export-declaration-7.14.5.tgz", + "integrity": "sha1-IrI6VO9RwrdgXYUZMMGXbdC8aTo=", + "dev": true, + "requires": { + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.14.5", + "resolved": "https://registry.nlark.com/@babel/helper-validator-identifier/download/@babel/helper-validator-identifier-7.14.5.tgz?cache=0&sync_timestamp=1623280518972&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fhelper-validator-identifier%2Fdownload%2F%40babel%2Fhelper-validator-identifier-7.14.5.tgz", + "integrity": "sha1-0PDid8US4Mk4J3+qhaOWjJpEwOg=" + }, + "@babel/helper-validator-option": { + "version": "7.14.5", + "resolved": "https://registry.nlark.com/@babel/helper-validator-option/download/@babel/helper-validator-option-7.14.5.tgz", + "integrity": "sha1-bnKh//GNXfy4eOHmLxoCHEty1aM=", + "dev": true + }, + "@babel/helpers": { + "version": "7.14.6", + "resolved": "https://registry.nlark.com/@babel/helpers/download/@babel/helpers-7.14.6.tgz?cache=0&sync_timestamp=1623708882051&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fhelpers%2Fdownload%2F%40babel%2Fhelpers-7.14.6.tgz", + "integrity": "sha1-W1gwa5XxtH4qAZlDT6hlj6bCFjU=", + "dev": true, + "requires": { + "@babel/template": "^7.14.5", + "@babel/traverse": "^7.14.5", + "@babel/types": "^7.14.5" + } + }, + "@babel/highlight": { + "version": "7.14.5", + "resolved": "https://registry.nlark.com/@babel/highlight/download/@babel/highlight-7.14.5.tgz", + "integrity": "sha1-aGGlLwOWZAUAH2qlNKAaJNmejNk=", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.14.5", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.nlark.com/chalk/download/chalk-2.4.2.tgz?cache=0&sync_timestamp=1618995384030&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-2.4.2.tgz", + "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz?cache=0&sync_timestamp=1618677243201&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescape-string-regexp%2Fdownload%2Fescape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + } + } + }, + "@babel/parser": { + "version": "7.14.7", + "resolved": "https://registry.nlark.com/@babel/parser/download/@babel/parser-7.14.7.tgz", + "integrity": "sha1-YJlyDIg5yoZaJjfmyFhS6tC9tZU=" + }, + "@babel/runtime": { + "version": "7.15.3", + "resolved": "https://registry.nlark.com/@babel/runtime/download/@babel/runtime-7.15.3.tgz?cache=0&sync_timestamp=1628666503436&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fruntime%2Fdownload%2F%40babel%2Fruntime-7.15.3.tgz", + "integrity": "sha1-LhwogMoRjlsvmYgyK9inZWoyUCs=", + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@babel/standalone": { + "version": "7.15.2", + "resolved": "https://registry.nlark.com/@babel/standalone/download/@babel/standalone-7.15.2.tgz", + "integrity": "sha1-08h3lDWxwx/evQUvAzN96uF/GbE=", + "dev": true + }, + "@babel/template": { + "version": "7.14.5", + "resolved": "https://registry.nlark.com/@babel/template/download/@babel/template-7.14.5.tgz", + "integrity": "sha1-qbydizM1T/blWpxg0RCSAKaJdPQ=", + "dev": true, + "requires": { + "@babel/code-frame": "^7.14.5", + "@babel/parser": "^7.14.5", + "@babel/types": "^7.14.5" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.14.5", + "resolved": "https://registry.nlark.com/@babel/code-frame/download/@babel/code-frame-7.14.5.tgz?cache=0&sync_timestamp=1623280355998&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fcode-frame%2Fdownload%2F%40babel%2Fcode-frame-7.14.5.tgz", + "integrity": "sha1-I7CNdA6D9JxeWZRfvxtD6Au/Tts=", + "dev": true, + "requires": { + "@babel/highlight": "^7.14.5" + } + } + } + }, + "@babel/traverse": { + "version": "7.14.7", + "resolved": "https://registry.nlark.com/@babel/traverse/download/@babel/traverse-7.14.7.tgz", + "integrity": "sha1-ZAB8l3TP3Dq9I7B4C8GKPONjF1M=", + "dev": true, + "requires": { + "@babel/code-frame": "^7.14.5", + "@babel/generator": "^7.14.5", + "@babel/helper-function-name": "^7.14.5", + "@babel/helper-hoist-variables": "^7.14.5", + "@babel/helper-split-export-declaration": "^7.14.5", + "@babel/parser": "^7.14.7", + "@babel/types": "^7.14.5", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.14.5", + "resolved": "https://registry.nlark.com/@babel/code-frame/download/@babel/code-frame-7.14.5.tgz?cache=0&sync_timestamp=1623280355998&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fcode-frame%2Fdownload%2F%40babel%2Fcode-frame-7.14.5.tgz", + "integrity": "sha1-I7CNdA6D9JxeWZRfvxtD6Au/Tts=", + "dev": true, + "requires": { + "@babel/highlight": "^7.14.5" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.nlark.com/globals/download/globals-11.12.0.tgz?cache=0&sync_timestamp=1622088047458&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fglobals%2Fdownload%2Fglobals-11.12.0.tgz", + "integrity": "sha1-q4eVM4hooLq9hSV1gBjCp+uVxC4=", + "dev": true + } + } + }, + "@babel/types": { + "version": "7.14.5", + "resolved": "https://registry.nlark.com/@babel/types/download/@babel/types-7.14.5.tgz?cache=0&sync_timestamp=1623280355970&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Ftypes%2Fdownload%2F%40babel%2Ftypes-7.14.5.tgz", + "integrity": "sha1-O7mXuoKaIQTO2yBonEpbgSHTg/8=", + "requires": { + "@babel/helper-validator-identifier": "^7.14.5", + "to-fast-properties": "^2.0.0" + } + }, + "@ctrl/tinycolor": { + "version": "3.4.0", + "resolved": "https://registry.npm.taobao.org/@ctrl/tinycolor/download/@ctrl/tinycolor-3.4.0.tgz", + "integrity": "sha1-w8WuVDyJfKqcKmhjC+01W+X5mQ8=" + }, + "@eslint/eslintrc": { + "version": "0.4.2", + "resolved": "https://registry.nlark.com/@eslint/eslintrc/download/@eslint/eslintrc-0.4.2.tgz?cache=0&sync_timestamp=1622843858887&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40eslint%2Feslintrc%2Fdownload%2F%40eslint%2Feslintrc-0.4.2.tgz", + "integrity": "sha1-9j0O8G9cDFfXbEq19j04NcUbAXk=", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npm.taobao.org/ignore/download/ignore-4.0.6.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fignore%2Fdownload%2Fignore-4.0.6.tgz", + "integrity": "sha1-dQ49tYYgh7RzfrrIIH/9HvJ7Jfw=", + "dev": true + } + } + }, + "@intlify/core-base": { + "version": "9.1.6", + "resolved": "https://registry.nlark.com/@intlify/core-base/download/@intlify/core-base-9.1.6.tgz", + "integrity": "sha1-iH++r+N9lVusUDGPMKxYmDnw2fs=", + "requires": { + "@intlify/devtools-if": "9.1.6", + "@intlify/message-compiler": "9.1.6", + "@intlify/message-resolver": "9.1.6", + "@intlify/runtime": "9.1.6", + "@intlify/shared": "9.1.6", + "@intlify/vue-devtools": "9.1.6" + } + }, + "@intlify/devtools-if": { + "version": "9.1.6", + "resolved": "https://registry.nlark.com/@intlify/devtools-if/download/@intlify/devtools-if-9.1.6.tgz", + "integrity": "sha1-c5sZXkMOJPv4+GTsilHiQ+M0c4U=", + "requires": { + "@intlify/shared": "9.1.6" + } + }, + "@intlify/message-compiler": { + "version": "9.1.6", + "resolved": "https://registry.nlark.com/@intlify/message-compiler/download/@intlify/message-compiler-9.1.6.tgz", + "integrity": "sha1-4+mRZcHm7MSWIRAXeZrlnhWwWhg=", + "requires": { + "@intlify/message-resolver": "9.1.6", + "@intlify/shared": "9.1.6", + "source-map": "0.6.1" + } + }, + "@intlify/message-resolver": { + "version": "9.1.6", + "resolved": "https://registry.nlark.com/@intlify/message-resolver/download/@intlify/message-resolver-9.1.6.tgz", + "integrity": "sha1-10k8nzJtX+sM2FOKZzW2SKkdjy8=" + }, + "@intlify/runtime": { + "version": "9.1.6", + "resolved": "https://registry.nlark.com/@intlify/runtime/download/@intlify/runtime-9.1.6.tgz", + "integrity": "sha1-vxVI2QNMgO75KwayQMs0fv+0H3E=", + "requires": { + "@intlify/message-compiler": "9.1.6", + "@intlify/message-resolver": "9.1.6", + "@intlify/shared": "9.1.6" + } + }, + "@intlify/shared": { + "version": "9.1.6", + "resolved": "https://registry.nlark.com/@intlify/shared/download/@intlify/shared-9.1.6.tgz", + "integrity": "sha1-0DyTAYmNbd/+KlTAPnZkF0+839k=" + }, + "@intlify/vue-devtools": { + "version": "9.1.6", + "resolved": "https://registry.nlark.com/@intlify/vue-devtools/download/@intlify/vue-devtools-9.1.6.tgz", + "integrity": "sha1-iPqt8gOVGioQEHRA+pm1j0Y31A0=", + "requires": { + "@intlify/message-resolver": "9.1.6", + "@intlify/runtime": "9.1.6", + "@intlify/shared": "9.1.6" + } + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.nlark.com/@nodelib/fs.scandir/download/@nodelib/fs.scandir-2.1.5.tgz", + "integrity": "sha1-dhnC6yGyVIP20WdUi0z9WnSIw9U=", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.nlark.com/@nodelib/fs.stat/download/@nodelib/fs.stat-2.0.5.tgz?cache=0&sync_timestamp=1622792772584&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40nodelib%2Ffs.stat%2Fdownload%2F%40nodelib%2Ffs.stat-2.0.5.tgz", + "integrity": "sha1-W9Jir5Tp0lvR5xsF3u1Eh2oiLos=", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.7", + "resolved": "https://registry.nlark.com/@nodelib/fs.walk/download/@nodelib/fs.walk-1.2.7.tgz", + "integrity": "sha1-lMI9sY7kZT4Smr0m+wb4cKyeHuI=", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@rollup/plugin-node-resolve": { + "version": "13.0.4", + "resolved": "https://registry.nlark.com/@rollup/plugin-node-resolve/download/@rollup/plugin-node-resolve-13.0.4.tgz", + "integrity": "sha1-sQIi9BRaAZdArLdzhAITDYSGYMA=", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.1.0", + "@types/resolve": "1.17.1", + "builtin-modules": "^3.1.0", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.19.0" + } + }, + "@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://registry.nlark.com/@rollup/pluginutils/download/@rollup/pluginutils-3.1.0.tgz", + "integrity": "sha1-cGtFJO5tyLEDs8mVUz5a1oDAK5s=", + "dev": true, + "requires": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + }, + "dependencies": { + "@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.nlark.com/@types/estree/download/@types/estree-0.0.39.tgz?cache=0&sync_timestamp=1622612050840&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Festree%2Fdownload%2F%40types%2Festree-0.0.39.tgz", + "integrity": "sha1-4Xfmme4bjCLSMXTKqnQiZEOJUJ8=", + "dev": true + }, + "estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npm.taobao.org/estree-walker/download/estree-walker-1.0.1.tgz", + "integrity": "sha1-MbxdYSyWtwQQa0d+bdXYqhOMtwA=", + "dev": true + } + } + }, + "@simonwep/pickr": { + "version": "1.8.1", + "resolved": "https://registry.nlark.com/@simonwep/pickr/download/@simonwep/pickr-1.8.1.tgz?cache=0&sync_timestamp=1620897298440&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40simonwep%2Fpickr%2Fdownload%2F%40simonwep%2Fpickr-1.8.1.tgz", + "integrity": "sha1-4TbL2cNF3bt9cesUr1RMeYFl1JU=", + "requires": { + "core-js": "^3.12.1", + "nanopop": "^2.1.0" + } + }, + "@stylelint/postcss-css-in-js": { + "version": "0.37.2", + "resolved": "https://registry.npm.taobao.org/@stylelint/postcss-css-in-js/download/@stylelint/postcss-css-in-js-0.37.2.tgz", + "integrity": "sha1-flqErRgfQjSiSAgDQipHuHSa89I=", + "dev": true, + "requires": { + "@babel/core": ">=7.9.0" + } + }, + "@stylelint/postcss-markdown": { + "version": "0.36.2", + "resolved": "https://registry.npm.taobao.org/@stylelint/postcss-markdown/download/@stylelint/postcss-markdown-0.36.2.tgz", + "integrity": "sha1-ClQMRpL43N/BPI41LBfnv+4rs5E=", + "dev": true, + "requires": { + "remark": "^13.0.0", + "unist-util-find-all-after": "^3.0.2" + } + }, + "@types/estree": { + "version": "0.0.48", + "resolved": "https://registry.nlark.com/@types/estree/download/@types/estree-0.0.48.tgz?cache=0&sync_timestamp=1622612050840&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Festree%2Fdownload%2F%40types%2Festree-0.0.48.tgz", + "integrity": "sha1-GNyAkbKF35DbLyWqfZBs/DlLf3Q=", + "dev": true + }, + "@types/js-cookie": { + "version": "2.2.7", + "resolved": "https://registry.nlark.com/@types/js-cookie/download/@types/js-cookie-2.2.7.tgz", + "integrity": "sha1-ImqeMWgINaYYjoh/OYjmDATT9qM=" + }, + "@types/json-schema": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "dev": true + }, + "@types/lodash": { + "version": "4.14.172", + "resolved": "https://registry.nlark.com/@types/lodash/download/@types/lodash-4.14.172.tgz", + "integrity": "sha1-qtd0wo57/Xpn3iVAjgPuWow9Aoo=" + }, + "@types/mdast": { + "version": "3.0.3", + "resolved": "https://registry.nlark.com/@types/mdast/download/@types/mdast-3.0.3.tgz?cache=0&sync_timestamp=1621242009980&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fmdast%2Fdownload%2F%40types%2Fmdast-3.0.3.tgz", + "integrity": "sha1-LX1nGxzR6j3rMG6nUDbCoEB9Les=", + "dev": true, + "requires": { + "@types/unist": "*" + } + }, + "@types/minimist": { + "version": "1.2.1", + "resolved": "https://registry.nlark.com/@types/minimist/download/@types/minimist-1.2.1.tgz", + "integrity": "sha1-KD9mn/dte4Jg34q3pCYsyD2YglY=", + "dev": true + }, + "@types/mockjs": { + "version": "1.0.4", + "resolved": "https://registry.nlark.com/@types/mockjs/download/@types/mockjs-1.0.4.tgz", + "integrity": "sha1-5waVHV4ztPCku3Ox+LEk4m8IHeA=", + "dev": true + }, + "@types/node": { + "version": "16.4.13", + "resolved": "https://registry.nlark.com/@types/node/download/@types/node-16.4.13.tgz?cache=0&sync_timestamp=1628211811317&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fnode%2Fdownload%2F%40types%2Fnode-16.4.13.tgz", + "integrity": "sha1-ff2cFGYe3GXMzUOinrRUF0ZCNw0=", + "dev": true + }, + "@types/normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.nlark.com/@types/normalize-package-data/download/@types/normalize-package-data-2.4.0.tgz?cache=0&sync_timestamp=1621242104575&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fnormalize-package-data%2Fdownload%2F%40types%2Fnormalize-package-data-2.4.0.tgz", + "integrity": "sha1-5IbQ2XOW15vu3QpuM/RTT/a0lz4=", + "dev": true + }, + "@types/nprogress": { + "version": "0.2.0", + "resolved": "https://registry.nlark.com/@types/nprogress/download/@types/nprogress-0.2.0.tgz?cache=0&sync_timestamp=1621242271973&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fnprogress%2Fdownload%2F%40types%2Fnprogress-0.2.0.tgz", + "integrity": "sha1-hsWTaC1BmSEqBQnMPE1WK7vW5F8=", + "dev": true + }, + "@types/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.nlark.com/@types/parse-json/download/@types/parse-json-4.0.0.tgz?cache=0&sync_timestamp=1621242198435&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fparse-json%2Fdownload%2F%40types%2Fparse-json-4.0.0.tgz", + "integrity": "sha1-L4u0QUNNFjs1+4/9zNcTiSf/uMA=", + "dev": true + }, + "@types/resolve": { + "version": "1.17.1", + "resolved": "https://registry.nlark.com/@types/resolve/download/@types/resolve-1.17.1.tgz?cache=0&sync_timestamp=1621242543115&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fresolve%2Fdownload%2F%40types%2Fresolve-1.17.1.tgz", + "integrity": "sha1-Ov1q2JZ8d+Q3bFmKgt3Vj0bsRdY=", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/unist": { + "version": "2.0.3", + "resolved": "https://registry.nlark.com/@types/unist/download/@types/unist-2.0.3.tgz?cache=0&sync_timestamp=1621243983753&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Funist%2Fdownload%2F%40types%2Funist-2.0.3.tgz", + "integrity": "sha1-nAiGeYdvN061mD8VDUeHqm+zLX4=", + "dev": true + }, + "@typescript-eslint/eslint-plugin": { + "version": "4.28.0", + "resolved": "https://registry.nlark.com/@typescript-eslint/eslint-plugin/download/@typescript-eslint/eslint-plugin-4.28.0.tgz?cache=0&sync_timestamp=1624299411502&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40typescript-eslint%2Feslint-plugin%2Fdownload%2F%40typescript-eslint%2Feslint-plugin-4.28.0.tgz", + "integrity": "sha1-GmbwOyZIRDh7633IXh8dQDvRgD8=", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "4.28.0", + "@typescript-eslint/scope-manager": "4.28.0", + "debug": "^4.3.1", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^3.1.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/experimental-utils": { + "version": "4.28.0", + "resolved": "https://registry.nlark.com/@typescript-eslint/experimental-utils/download/@typescript-eslint/experimental-utils-4.28.0.tgz?cache=0&sync_timestamp=1624299370816&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40typescript-eslint%2Fexperimental-utils%2Fdownload%2F%40typescript-eslint%2Fexperimental-utils-4.28.0.tgz", + "integrity": "sha1-ExZ+2ZEyBoS9wjWIE1rmIRWzDuA=", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.7", + "@typescript-eslint/scope-manager": "4.28.0", + "@typescript-eslint/types": "4.28.0", + "@typescript-eslint/typescript-estree": "4.28.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + } + }, + "@typescript-eslint/parser": { + "version": "4.28.0", + "resolved": "https://registry.nlark.com/@typescript-eslint/parser/download/@typescript-eslint/parser-4.28.0.tgz", + "integrity": "sha1-JATBZ1GihhbvOrq3fI5R1oChLKo=", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "4.28.0", + "@typescript-eslint/types": "4.28.0", + "@typescript-eslint/typescript-estree": "4.28.0", + "debug": "^4.3.1" + } + }, + "@typescript-eslint/scope-manager": { + "version": "4.28.0", + "resolved": "https://registry.nlark.com/@typescript-eslint/scope-manager/download/@typescript-eslint/scope-manager-4.28.0.tgz?cache=0&sync_timestamp=1624295732180&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40typescript-eslint%2Fscope-manager%2Fdownload%2F%40typescript-eslint%2Fscope-manager-4.28.0.tgz", + "integrity": "sha1-ajAJ0qtkow/IoeJXoaMgBn82oM4=", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.28.0", + "@typescript-eslint/visitor-keys": "4.28.0" + } + }, + "@typescript-eslint/types": { + "version": "4.28.0", + "resolved": "https://registry.nlark.com/@typescript-eslint/types/download/@typescript-eslint/types-4.28.0.tgz", + "integrity": "sha1-ozUE4c56xR/DkDX1/m8VB51Nr7A=", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "4.28.0", + "resolved": "https://registry.nlark.com/@typescript-eslint/typescript-estree/download/@typescript-eslint/typescript-estree-4.28.0.tgz?cache=0&sync_timestamp=1624299371640&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40typescript-eslint%2Ftypescript-estree%2Fdownload%2F%40typescript-eslint%2Ftypescript-estree-4.28.0.tgz", + "integrity": "sha1-5m1OWqLt5m/sivQ0iY/mGvEMcc8=", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.28.0", + "@typescript-eslint/visitor-keys": "4.28.0", + "debug": "^4.3.1", + "globby": "^11.0.3", + "is-glob": "^4.0.1", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "4.28.0", + "resolved": "https://registry.nlark.com/@typescript-eslint/visitor-keys/download/@typescript-eslint/visitor-keys-4.28.0.tgz", + "integrity": "sha1-JVxnyWbsKUEEFpppOdlvkciolDQ=", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.28.0", + "eslint-visitor-keys": "^2.0.0" + } + }, + "@vitejs/plugin-legacy": { + "version": "1.5.1", + "resolved": "https://registry.nlark.com/@vitejs/plugin-legacy/download/@vitejs/plugin-legacy-1.5.1.tgz", + "integrity": "sha1-/vKhHAXYP1qxPS0E5S11usE8bmw=", + "dev": true, + "requires": { + "@babel/standalone": "^7.14.9", + "core-js": "^3.16.0", + "magic-string": "^0.25.7", + "regenerator-runtime": "^0.13.9", + "systemjs": "^6.10.2" + } + }, + "@vitejs/plugin-vue": { + "version": "1.4.0", + "resolved": "https://registry.nlark.com/@vitejs/plugin-vue/download/@vitejs/plugin-vue-1.4.0.tgz?cache=0&sync_timestamp=1628298033751&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40vitejs%2Fplugin-vue%2Fdownload%2F%40vitejs%2Fplugin-vue-1.4.0.tgz", + "integrity": "sha1-lirgG3/RatQAeJjGTtY5E24SIVs=", + "dev": true + }, + "@vue/compiler-core": { + "version": "3.2.1", + "resolved": "https://registry.nlark.com/@vue/compiler-core/download/@vue/compiler-core-3.2.1.tgz?cache=0&sync_timestamp=1628541189114&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40vue%2Fcompiler-core%2Fdownload%2F%40vue%2Fcompiler-core-3.2.1.tgz", + "integrity": "sha1-jhMjL3rvjjCPstShBXGlZAJXBks=", + "requires": { + "@babel/parser": "^7.12.0", + "@babel/types": "^7.12.0", + "@vue/shared": "3.2.1", + "estree-walker": "^2.0.1", + "source-map": "^0.6.1" + } + }, + "@vue/compiler-dom": { + "version": "3.2.1", + "resolved": "https://registry.nlark.com/@vue/compiler-dom/download/@vue/compiler-dom-3.2.1.tgz?cache=0&sync_timestamp=1628541189208&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40vue%2Fcompiler-dom%2Fdownload%2F%40vue%2Fcompiler-dom-3.2.1.tgz", + "integrity": "sha1-XMaIc/GSjHua7oyKKEb382LLGrk=", + "requires": { + "@vue/compiler-core": "3.2.1", + "@vue/shared": "3.2.1" + } + }, + "@vue/compiler-sfc": { + "version": "3.2.1", + "resolved": "https://registry.nlark.com/@vue/compiler-sfc/download/@vue/compiler-sfc-3.2.1.tgz?cache=0&sync_timestamp=1628541189312&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40vue%2Fcompiler-sfc%2Fdownload%2F%40vue%2Fcompiler-sfc-3.2.1.tgz", + "integrity": "sha1-eAmymM8PvOYqLGKLffwegt2aOps=", + "dev": true, + "requires": { + "@babel/parser": "^7.13.9", + "@babel/types": "^7.13.0", + "@types/estree": "^0.0.48", + "@vue/compiler-core": "3.2.1", + "@vue/compiler-dom": "3.2.1", + "@vue/compiler-ssr": "3.2.1", + "@vue/shared": "3.2.1", + "consolidate": "^0.16.0", + "estree-walker": "^2.0.1", + "hash-sum": "^2.0.0", + "lru-cache": "^5.1.1", + "magic-string": "^0.25.7", + "merge-source-map": "^1.1.0", + "postcss": "^8.1.10", + "postcss-modules": "^4.0.0", + "postcss-selector-parser": "^6.0.4", + "source-map": "^0.6.1" + } + }, + "@vue/compiler-ssr": { + "version": "3.2.1", + "resolved": "https://registry.nlark.com/@vue/compiler-ssr/download/@vue/compiler-ssr-3.2.1.tgz?cache=0&sync_timestamp=1628541189227&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40vue%2Fcompiler-ssr%2Fdownload%2F%40vue%2Fcompiler-ssr-3.2.1.tgz", + "integrity": "sha1-+QB2L4NILkTpJgwjIuPTMscRgmw=", + "dev": true, + "requires": { + "@vue/compiler-dom": "3.2.1", + "@vue/shared": "3.2.1" + } + }, + "@vue/devtools-api": { + "version": "6.0.0-beta.14", + "resolved": "https://registry.nlark.com/@vue/devtools-api/download/@vue/devtools-api-6.0.0-beta.14.tgz", + "integrity": "sha1-btLW+NZqklbJrQS//wgwm6h7lyM=" + }, + "@vue/reactivity": { + "version": "3.2.1", + "resolved": "https://registry.nlark.com/@vue/reactivity/download/@vue/reactivity-3.2.1.tgz", + "integrity": "sha1-DnHU7gCw0MpqYUGWbDC2iz9oUAI=", + "requires": { + "@vue/shared": "3.2.1" + } + }, + "@vue/runtime-core": { + "version": "3.2.1", + "resolved": "https://registry.nlark.com/@vue/runtime-core/download/@vue/runtime-core-3.2.1.tgz", + "integrity": "sha1-OWQRELL4T92juAuGgwgnt7XvBBo=", + "requires": { + "@vue/reactivity": "3.2.1", + "@vue/shared": "3.2.1" + } + }, + "@vue/runtime-dom": { + "version": "3.2.1", + "resolved": "https://registry.nlark.com/@vue/runtime-dom/download/@vue/runtime-dom-3.2.1.tgz", + "integrity": "sha1-CHzzb0CtCGlxLEFUaTxiDkeAYag=", + "requires": { + "@vue/runtime-core": "3.2.1", + "@vue/shared": "3.2.1", + "csstype": "^2.6.8" + } + }, + "@vue/shared": { + "version": "3.2.1", + "resolved": "https://registry.nlark.com/@vue/shared/download/@vue/shared-3.2.1.tgz", + "integrity": "sha1-Hx/ib+AzRATM4QdAtf+yZU8Sgao=" + }, + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.nlark.com/acorn/download/acorn-7.4.1.tgz", + "integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=", + "dev": true + }, + "acorn-jsx": { + "version": "5.3.1", + "resolved": "https://registry.npm.taobao.org/acorn-jsx/download/acorn-jsx-5.3.1.tgz?cache=0&sync_timestamp=1599499185510&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Facorn-jsx%2Fdownload%2Facorn-jsx-5.3.1.tgz", + "integrity": "sha1-/IZh4Rt6wVOcR9v+oucrOvNNJns=", + "dev": true + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.nlark.com/ajv/download/ajv-6.12.6.tgz", + "integrity": "sha1-uvWmLoArB9l3A0WG+MO69a3ybfQ=", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npm.taobao.org/ansi-colors/download/ansi-colors-4.1.1.tgz", + "integrity": "sha1-y7muJWv3UK8eqzRPIpqif+lLo0g=", + "dev": true + }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-5.0.0.tgz?cache=0&sync_timestamp=1618552978881&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-regex%2Fdownload%2Fansi-regex-5.0.0.tgz", + "integrity": "sha1-OIU59VF5vzkznIGvMKZU1p+Hy3U=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "ant-design-vue": { + "version": "2.2.4", + "resolved": "https://registry.nlark.com/ant-design-vue/download/ant-design-vue-2.2.4.tgz", + "integrity": "sha1-OM36Zpr9ZhcOFO9G1HJ9M+KYR1A=", + "requires": { + "@ant-design/icons-vue": "^6.0.0", + "@babel/runtime": "^7.10.5", + "@simonwep/pickr": "~1.8.0", + "array-tree-filter": "^2.1.0", + "async-validator": "^3.3.0", + "dom-align": "^1.12.1", + "dom-scroll-into-view": "^2.0.0", + "lodash": "^4.17.21", + "lodash-es": "^4.17.15", + "moment": "^2.27.0", + "omit.js": "^2.0.0", + "scroll-into-view-if-needed": "^2.2.25", + "shallow-equal": "^1.0.0", + "vue-types": "^3.0.0", + "warning": "^4.0.0" + } + }, + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npm.taobao.org/anymatch/download/anymatch-3.1.2.tgz", + "integrity": "sha1-wFV8CWrzLxBhmPT04qODU343hxY=", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npm.taobao.org/argparse/download/argparse-1.0.10.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fargparse%2Fdownload%2Fargparse-1.0.10.tgz", + "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "array-tree-filter": { + "version": "2.1.0", + "resolved": "https://registry.npm.taobao.org/array-tree-filter/download/array-tree-filter-2.1.0.tgz", + "integrity": "sha1-hzrAD+yDdJ8lWsjdCDgUtPYykZA=" + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npm.taobao.org/array-union/download/array-union-2.1.0.tgz?cache=0&sync_timestamp=1614624423985&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Farray-union%2Fdownload%2Farray-union-2.1.0.tgz", + "integrity": "sha1-t5hCCtvrHego2ErNii4j0+/oXo0=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.nlark.com/arrify/download/arrify-1.0.1.tgz?cache=0&sync_timestamp=1619599511725&other_urls=https%3A%2F%2Fregistry.nlark.com%2Farrify%2Fdownload%2Farrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/astral-regex/download/astral-regex-2.0.0.tgz", + "integrity": "sha1-SDFDxWeu7UeFdZwIZXhtx319LjE=", + "dev": true + }, + "async-validator": { + "version": "3.5.2", + "resolved": "https://registry.nlark.com/async-validator/download/async-validator-3.5.2.tgz?cache=0&sync_timestamp=1619755921381&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fasync-validator%2Fdownload%2Fasync-validator-3.5.2.tgz", + "integrity": "sha1-aOhmqWgk6LJpT/eoMcGiXETV5QA=" + }, + "autoprefixer": { + "version": "9.8.6", + "resolved": "https://registry.nlark.com/autoprefixer/download/autoprefixer-9.8.6.tgz", + "integrity": "sha1-O3NZTKG/kmYyDFrPFYjXTep0IQ8=", + "dev": true, + "requires": { + "browserslist": "^4.12.0", + "caniuse-lite": "^1.0.30001109", + "colorette": "^1.2.1", + "normalize-range": "^0.1.2", + "num2fraction": "^1.2.2", + "postcss": "^7.0.32", + "postcss-value-parser": "^4.1.0" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.nlark.com/chalk/download/chalk-2.4.2.tgz?cache=0&sync_timestamp=1618995384030&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-2.4.2.tgz", + "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.nlark.com/supports-color/download/supports-color-5.5.0.tgz?cache=0&sync_timestamp=1622293670728&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-5.5.0.tgz", + "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz?cache=0&sync_timestamp=1618677243201&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescape-string-regexp%2Fdownload%2Fescape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "postcss": { + "version": "7.0.36", + "resolved": "https://registry.nlark.com/postcss/download/postcss-7.0.36.tgz", + "integrity": "sha1-BW+M/6k5ZiqPWQWVDAfVKFZE38s=", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + } + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.nlark.com/supports-color/download/supports-color-6.1.0.tgz?cache=0&sync_timestamp=1622293670728&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-6.1.0.tgz", + "integrity": "sha1-B2Srxpxj1ayELdSGfo0CXogN+PM=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "axios": { + "version": "0.21.1", + "resolved": "https://registry.npm.taobao.org/axios/download/axios-0.21.1.tgz", + "integrity": "sha1-IlY0gZYvTWvemnbVFu8OXTwJsrg=", + "requires": { + "follow-redirects": "^1.10.0" + } + }, + "bail": { + "version": "1.0.5", + "resolved": "https://registry.nlark.com/bail/download/bail-1.0.5.tgz?cache=0&sync_timestamp=1621397830539&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fbail%2Fdownload%2Fbail-1.0.5.tgz", + "integrity": "sha1-tvoTNASjksvB+MS/Y/WVM1Hnp3Y=", + "dev": true + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.2.tgz?cache=0&sync_timestamp=1617714298273&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbalanced-match%2Fdownload%2Fbalanced-match-1.0.2.tgz", + "integrity": "sha1-6D46fj8wCzTLnYf2FfoMvzV2kO4=", + "dev": true + }, + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.nlark.com/big.js/download/big.js-5.2.2.tgz", + "integrity": "sha1-ZfCvOC9Xi83HQr2cKB6cstd2gyg=", + "dev": true + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npm.taobao.org/binary-extensions/download/binary-extensions-2.2.0.tgz?cache=0&sync_timestamp=1610299640881&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbinary-extensions%2Fdownload%2Fbinary-extensions-2.2.0.tgz", + "integrity": "sha1-dfUC7q+f/eQvyYgpZFvk6na9ni0=", + "dev": true + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npm.taobao.org/bluebird/download/bluebird-3.7.2.tgz", + "integrity": "sha1-nyKcFb4nJFT/qXOs4NvueaGww28=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz?cache=0&sync_timestamp=1614010713935&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbrace-expansion%2Fdownload%2Fbrace-expansion-1.1.11.tgz", + "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npm.taobao.org/braces/download/braces-3.0.2.tgz", + "integrity": "sha1-NFThpGLujVmeI23zNs2epPiv4Qc=", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "browserslist": { + "version": "4.16.6", + "resolved": "https://registry.nlark.com/browserslist/download/browserslist-4.16.6.tgz?cache=0&sync_timestamp=1619789101558&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fbrowserslist%2Fdownload%2Fbrowserslist-4.16.6.tgz", + "integrity": "sha1-15ASd6WojlVO0wWxg+ybDAj2b6I=", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001219", + "colorette": "^1.2.2", + "electron-to-chromium": "^1.3.723", + "escalade": "^3.1.1", + "node-releases": "^1.1.71" + } + }, + "builtin-modules": { + "version": "3.2.0", + "resolved": "https://registry.npm.taobao.org/builtin-modules/download/builtin-modules-3.2.0.tgz", + "integrity": "sha1-RdXbmefuXmvE82LgCL+RerUEmIc=", + "dev": true + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npm.taobao.org/callsites/download/callsites-3.1.0.tgz", + "integrity": "sha1-s2MKvYlDQy9Us/BRkjjjPNffL3M=", + "dev": true + }, + "camel-case": { + "version": "4.1.2", + "resolved": "https://registry.npm.taobao.org/camel-case/download/camel-case-4.1.2.tgz?cache=0&sync_timestamp=1606869196008&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcamel-case%2Fdownload%2Fcamel-case-4.1.2.tgz", + "integrity": "sha1-lygHKpVPgFIoIlpt7qazhGHhvVo=", + "dev": true, + "requires": { + "pascal-case": "^3.1.2", + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.nlark.com/tslib/download/tslib-2.3.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftslib%2Fdownload%2Ftslib-2.3.0.tgz", + "integrity": "sha1-gDuM2rPhK6WBpMpByIObuw2ssJ4=", + "dev": true + } + } + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-5.3.1.tgz?cache=0&sync_timestamp=1603921882890&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcamelcase%2Fdownload%2Fcamelcase-5.3.1.tgz", + "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", + "dev": true + }, + "camelcase-keys": { + "version": "6.2.2", + "resolved": "https://registry.nlark.com/camelcase-keys/download/camelcase-keys-6.2.2.tgz?cache=0&sync_timestamp=1624608993530&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcamelcase-keys%2Fdownload%2Fcamelcase-keys-6.2.2.tgz", + "integrity": "sha1-XnVda6UaoiPsfT1S8ld4IQ+dw8A=", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" + } + }, + "caniuse-lite": { + "version": "1.0.30001240", + "resolved": "https://registry.nlark.com/caniuse-lite/download/caniuse-lite-1.0.30001240.tgz?cache=0&sync_timestamp=1624686622197&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcaniuse-lite%2Fdownload%2Fcaniuse-lite-1.0.30001240.tgz", + "integrity": "sha1-7BXRJbWQYCyHMVRcU1H/BUrS1S8=", + "dev": true + }, + "capital-case": { + "version": "1.0.4", + "resolved": "https://registry.npm.taobao.org/capital-case/download/capital-case-1.0.4.tgz", + "integrity": "sha1-nRMCkjU8kkn2sA+lhSvuOKcX5mk=", + "dev": true, + "requires": { + "no-case": "^3.0.4", + "tslib": "^2.0.3", + "upper-case-first": "^2.0.2" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.nlark.com/tslib/download/tslib-2.3.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftslib%2Fdownload%2Ftslib-2.3.0.tgz", + "integrity": "sha1-gDuM2rPhK6WBpMpByIObuw2ssJ4=", + "dev": true + } + } + }, + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.nlark.com/chalk/download/chalk-4.1.1.tgz?cache=0&sync_timestamp=1618995384030&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-4.1.1.tgz", + "integrity": "sha1-yAs/qyi/Y3HmhjMl7uZ+YYt35q0=", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz", + "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz", + "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz", + "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-4.0.0.tgz?cache=0&sync_timestamp=1618559697170&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhas-flag%2Fdownload%2Fhas-flag-4.0.0.tgz", + "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.nlark.com/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1622293670728&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz", + "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "change-case": { + "version": "4.1.2", + "resolved": "https://registry.npm.taobao.org/change-case/download/change-case-4.1.2.tgz?cache=0&sync_timestamp=1606867703975&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchange-case%2Fdownload%2Fchange-case-4.1.2.tgz", + "integrity": "sha1-/t/F8TYEXiOYwEEO5EH5VwRkHhI=", + "dev": true, + "requires": { + "camel-case": "^4.1.2", + "capital-case": "^1.0.4", + "constant-case": "^3.0.4", + "dot-case": "^3.0.4", + "header-case": "^2.0.4", + "no-case": "^3.0.4", + "param-case": "^3.0.4", + "pascal-case": "^3.1.2", + "path-case": "^3.0.4", + "sentence-case": "^3.0.4", + "snake-case": "^3.0.4", + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.nlark.com/tslib/download/tslib-2.3.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftslib%2Fdownload%2Ftslib-2.3.0.tgz", + "integrity": "sha1-gDuM2rPhK6WBpMpByIObuw2ssJ4=", + "dev": true + } + } + }, + "character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npm.taobao.org/character-entities/download/character-entities-1.2.4.tgz?cache=0&sync_timestamp=1615197575922&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcharacter-entities%2Fdownload%2Fcharacter-entities-1.2.4.tgz", + "integrity": "sha1-4Sw5Obfq9OWxXnrUxeKOHUjFsWs=", + "dev": true + }, + "character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npm.taobao.org/character-entities-legacy/download/character-entities-legacy-1.1.4.tgz", + "integrity": "sha1-lLwYRdznClu50uzHSHJWYSk9j8E=", + "dev": true + }, + "character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npm.taobao.org/character-reference-invalid/download/character-reference-invalid-1.1.4.tgz", + "integrity": "sha1-CDMpzaDq4nKrPbvzfpo4LBOvFWA=", + "dev": true + }, + "chokidar": { + "version": "3.5.2", + "resolved": "https://registry.nlark.com/chokidar/download/chokidar-3.5.2.tgz", + "integrity": "sha1-26OXb8rbAW9m/TZQIdkWANAcHnU=", + "dev": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, + "clipboard": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.8.tgz", + "integrity": "sha512-Y6WO0unAIQp5bLmk1zdThRhgJt/x3ks6f30s3oE3H1mgIEU33XyQjEf8gsf6DxC7NPX8Y1SsNWjUjL/ywLnnbQ==", + "requires": { + "good-listener": "^1.2.2", + "select": "^1.1.2", + "tiny-emitter": "^2.0.0" + } + }, + "clone-regexp": { + "version": "2.2.0", + "resolved": "https://registry.npm.taobao.org/clone-regexp/download/clone-regexp-2.2.0.tgz?cache=0&sync_timestamp=1617892066413&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fclone-regexp%2Fdownload%2Fclone-regexp-2.2.0.tgz", + "integrity": "sha1-fWXgCIXNh5ZAXDWnN+eoa3Qp428=", + "dev": true, + "requires": { + "is-regexp": "^2.0.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-1.9.3.tgz", + "integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "colorette": { + "version": "1.2.2", + "resolved": "https://registry.npm.taobao.org/colorette/download/colorette-1.2.2.tgz?cache=0&sync_timestamp=1614259623635&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcolorette%2Fdownload%2Fcolorette-1.2.2.tgz", + "integrity": "sha1-y8x51emcrqLb8Q6zom/Ys+as+pQ=", + "dev": true + }, + "compute-scroll-into-view": { + "version": "1.0.17", + "resolved": "https://registry.npm.taobao.org/compute-scroll-into-view/download/compute-scroll-into-view-1.0.17.tgz?cache=0&sync_timestamp=1614042424875&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcompute-scroll-into-view%2Fdownload%2Fcompute-scroll-into-view-1.0.17.tgz", + "integrity": "sha1-aojxis2dQunPS6pr7H4FImB6t6s=" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "connect": { + "version": "3.7.0", + "resolved": "https://registry.npm.taobao.org/connect/download/connect-3.7.0.tgz", + "integrity": "sha1-XUk0iRDKpeB6AYALAw0MNfIEhPg=", + "dev": true, + "requires": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1607566512593&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", + "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz?cache=0&sync_timestamp=1607433816745&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fms%2Fdownload%2Fms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "consolidate": { + "version": "0.16.0", + "resolved": "https://registry.npm.taobao.org/consolidate/download/consolidate-0.16.0.tgz?cache=0&sync_timestamp=1599596640464&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fconsolidate%2Fdownload%2Fconsolidate-0.16.0.tgz", + "integrity": "sha1-oRhkdokw8vGUMWYKZZBmaPX73BY=", + "dev": true, + "requires": { + "bluebird": "^3.7.2" + } + }, + "constant-case": { + "version": "3.0.4", + "resolved": "https://registry.npm.taobao.org/constant-case/download/constant-case-3.0.4.tgz", + "integrity": "sha1-O4Sprq9M8x7EXmv13pG9+wWJ+vE=", + "dev": true, + "requires": { + "no-case": "^3.0.4", + "tslib": "^2.0.3", + "upper-case": "^2.0.2" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.nlark.com/tslib/download/tslib-2.3.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftslib%2Fdownload%2Ftslib-2.3.0.tgz", + "integrity": "sha1-gDuM2rPhK6WBpMpByIObuw2ssJ4=", + "dev": true + } + } + }, + "convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.nlark.com/convert-source-map/download/convert-source-map-1.8.0.tgz", + "integrity": "sha1-8zc8MtIbTXgN2ABFFGhPt5HKQ2k=", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "copy-anything": { + "version": "2.0.3", + "resolved": "https://registry.npm.taobao.org/copy-anything/download/copy-anything-2.0.3.tgz", + "integrity": "sha1-hCQHugJGaw34RIGbvjuuu+XUXYc=", + "dev": true, + "requires": { + "is-what": "^3.12.0" + } + }, + "core-js": { + "version": "3.16.1", + "resolved": "https://registry.nlark.com/core-js/download/core-js-3.16.1.tgz?cache=0&sync_timestamp=1628444136511&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcore-js%2Fdownload%2Fcore-js-3.16.1.tgz", + "integrity": "sha1-9Ehc5cnzxqfLGPqASI4I02IJckk=" + }, + "cosmiconfig": { + "version": "7.0.0", + "resolved": "https://registry.npm.taobao.org/cosmiconfig/download/cosmiconfig-7.0.0.tgz?cache=0&sync_timestamp=1596310591228&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcosmiconfig%2Fdownload%2Fcosmiconfig-7.0.0.tgz", + "integrity": "sha1-75tE13OVnK5j3ezRIt4jhTtg+NM=", + "dev": true, + "requires": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + } + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-7.0.3.tgz", + "integrity": "sha1-9zqFudXUHQRVUcF34ogtSshXKKY=", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "crypto-js": { + "version": "4.0.0", + "resolved": "https://registry.npm.taobao.org/crypto-js/download/crypto-js-4.0.0.tgz", + "integrity": "sha1-KQSrJnep0EKFai6i74DekuSjbcw=" + }, + "cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npm.taobao.org/cssesc/download/cssesc-3.0.0.tgz", + "integrity": "sha1-N3QZGZA7hoVl4cCep0dEXNGJg+4=", + "dev": true + }, + "csstype": { + "version": "2.6.17", + "resolved": "https://registry.nlark.com/csstype/download/csstype-2.6.17.tgz?cache=0&sync_timestamp=1618818393132&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcsstype%2Fdownload%2Fcsstype-2.6.17.tgz", + "integrity": "sha1-TPMOuH4dGgBdi2UQ+VKSQT9qHA4=" + }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npm.taobao.org/debug/download/debug-4.3.1.tgz?cache=0&sync_timestamp=1607566512593&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-4.3.1.tgz", + "integrity": "sha1-8NIpxQXgxtjEmsVT0bE9wYP2su4=", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npm.taobao.org/decamelize/download/decamelize-1.2.0.tgz?cache=0&sync_timestamp=1610348638646&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdecamelize%2Fdownload%2Fdecamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decamelize-keys": { + "version": "1.1.0", + "resolved": "https://registry.npm.taobao.org/decamelize-keys/download/decamelize-keys-1.1.0.tgz", + "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", + "dev": true, + "requires": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "dependencies": { + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npm.taobao.org/map-obj/download/map-obj-1.0.1.tgz?cache=0&sync_timestamp=1617771296262&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmap-obj%2Fdownload%2Fmap-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + } + } + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npm.taobao.org/deep-is/download/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-4.2.2.tgz", + "integrity": "sha1-RNLqNnm49NT/ujPwPYZfwee/SVU=", + "dev": true + }, + "delegate": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz", + "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==" + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npm.taobao.org/dir-glob/download/dir-glob-3.0.1.tgz", + "integrity": "sha1-Vtv3PZkqSpO6FYT0U0Bj/S5BcX8=", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npm.taobao.org/doctrine/download/doctrine-3.0.0.tgz", + "integrity": "sha1-rd6+rXKmV023g2OdyHoSF3OXOWE=", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "dom-align": { + "version": "1.12.2", + "resolved": "https://registry.nlark.com/dom-align/download/dom-align-1.12.2.tgz?cache=0&sync_timestamp=1621853230649&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdom-align%2Fdownload%2Fdom-align-1.12.2.tgz", + "integrity": "sha1-D4Fk69DJwhsMeQMQSTzYVYkqzUs=" + }, + "dom-scroll-into-view": { + "version": "2.0.1", + "resolved": "https://registry.npm.taobao.org/dom-scroll-into-view/download/dom-scroll-into-view-2.0.1.tgz", + "integrity": "sha1-DezIUigB/Y0/HGujVadNOCxfmJs=" + }, + "dom-serializer": { + "version": "0.2.2", + "resolved": "https://registry.nlark.com/dom-serializer/download/dom-serializer-0.2.2.tgz?cache=0&sync_timestamp=1621256858583&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdom-serializer%2Fdownload%2Fdom-serializer-0.2.2.tgz", + "integrity": "sha1-GvuB9TNxcXXUeGVd68XjMtn5u1E=", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + }, + "dependencies": { + "domelementtype": { + "version": "2.2.0", + "resolved": "https://registry.npm.taobao.org/domelementtype/download/domelementtype-2.2.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdomelementtype%2Fdownload%2Fdomelementtype-2.2.0.tgz", + "integrity": "sha1-mgtsJ4LtahxzI9QiZxg9+b2LHVc=", + "dev": true + }, + "entities": { + "version": "2.2.0", + "resolved": "https://registry.npm.taobao.org/entities/download/entities-2.2.0.tgz?cache=0&sync_timestamp=1611535326982&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fentities%2Fdownload%2Fentities-2.2.0.tgz", + "integrity": "sha1-CY3JDruD2N/6CJ1VJWs1HTTE2lU=", + "dev": true + } + } + }, + "domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npm.taobao.org/domelementtype/download/domelementtype-1.3.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdomelementtype%2Fdownload%2Fdomelementtype-1.3.1.tgz", + "integrity": "sha1-0EjESzew0Qp/Kj1f7j9DM9eQSB8=", + "dev": true + }, + "domhandler": { + "version": "2.4.2", + "resolved": "https://registry.nlark.com/domhandler/download/domhandler-2.4.2.tgz", + "integrity": "sha1-iAUJfpM9ZehVRvcm1g9euItE+AM=", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "domutils": { + "version": "1.7.0", + "resolved": "https://registry.nlark.com/domutils/download/domutils-1.7.0.tgz?cache=0&sync_timestamp=1622995212689&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdomutils%2Fdownload%2Fdomutils-1.7.0.tgz", + "integrity": "sha1-Vuo0HoNOBuZ0ivehyyXaZ+qfjCo=", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "dot-case": { + "version": "3.0.4", + "resolved": "https://registry.npm.taobao.org/dot-case/download/dot-case-3.0.4.tgz", + "integrity": "sha1-mytnDQCkMWZ6inW6Kc0bmICc51E=", + "dev": true, + "requires": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.nlark.com/tslib/download/tslib-2.3.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftslib%2Fdownload%2Ftslib-2.3.0.tgz", + "integrity": "sha1-gDuM2rPhK6WBpMpByIObuw2ssJ4=", + "dev": true + } + } + }, + "dotenv": { + "version": "10.0.0", + "resolved": "https://registry.nlark.com/dotenv/download/dotenv-10.0.0.tgz?cache=0&sync_timestamp=1621633079842&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdotenv%2Fdownload%2Fdotenv-10.0.0.tgz", + "integrity": "sha1-PUInuPuV+BCWzdK2ZlP7LHCFuoE=", + "dev": true + }, + "echarts": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.1.2.tgz", + "integrity": "sha512-okUhO4sw22vwZp+rTPNjd/bvTdpug4K4sHNHyrV8NdAncIX9/AarlolFqtJCAYKGFYhUBNjIWu1EznFrSWTFxg==", + "requires": { + "tslib": "2.0.3", + "zrender": "5.1.1" + }, + "dependencies": { + "tslib": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" + } + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npm.taobao.org/ee-first/download/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "electron-to-chromium": { + "version": "1.3.759", + "resolved": "https://registry.nlark.com/electron-to-chromium/download/electron-to-chromium-1.3.759.tgz?cache=0&sync_timestamp=1624658593703&other_urls=https%3A%2F%2Fregistry.nlark.com%2Felectron-to-chromium%2Fdownload%2Felectron-to-chromium-1.3.759.tgz", + "integrity": "sha1-sNZS03aDFHCkwjC6ch2iQnv7mWo=", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npm.taobao.org/emoji-regex/download/emoji-regex-8.0.0.tgz?cache=0&sync_timestamp=1614682818988&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Femoji-regex%2Fdownload%2Femoji-regex-8.0.0.tgz", + "integrity": "sha1-6Bj9ac5cz8tARZT4QpY79TFkzDc=", + "dev": true + }, + "emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npm.taobao.org/emojis-list/download/emojis-list-3.0.0.tgz", + "integrity": "sha1-VXBmIEatKeLpFucariYKvf9Pang=", + "dev": true + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npm.taobao.org/encodeurl/download/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true + }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npm.taobao.org/enquirer/download/enquirer-2.3.6.tgz", + "integrity": "sha1-Kn/l3WNKHkElqXXsmU/1RW3Dc00=", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } + }, + "entities": { + "version": "1.1.2", + "resolved": "https://registry.npm.taobao.org/entities/download/entities-1.1.2.tgz?cache=0&sync_timestamp=1611535326982&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fentities%2Fdownload%2Fentities-1.1.2.tgz", + "integrity": "sha1-vfpzUplmTfr9NFKe1PhSKidf6lY=", + "dev": true + }, + "errno": { + "version": "0.1.8", + "resolved": "https://registry.npm.taobao.org/errno/download/errno-0.1.8.tgz", + "integrity": "sha1-i7Ppx9Rjvkl2/4iPdrSAnrwugR8=", + "dev": true, + "optional": true, + "requires": { + "prr": "~1.0.1" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npm.taobao.org/error-ex/download/error-ex-1.3.2.tgz", + "integrity": "sha1-tKxAZIEH/c3PriQvQovqihTU8b8=", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-module-lexer": { + "version": "0.7.1", + "resolved": "https://registry.nlark.com/es-module-lexer/download/es-module-lexer-0.7.1.tgz", + "integrity": "sha1-wsjg9G8t8GJ0za8N0/OzPgoLJn0=", + "dev": true + }, + "esbuild": { + "version": "0.12.11", + "resolved": "https://registry.nlark.com/esbuild/download/esbuild-0.12.11.tgz", + "integrity": "sha1-qyT3jKv0gefcdH59sV+cUJG+qhQ=", + "dev": true + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npm.taobao.org/escalade/download/escalade-3.1.1.tgz?cache=0&sync_timestamp=1602567310672&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescalade%2Fdownload%2Fescalade-3.1.1.tgz", + "integrity": "sha1-2M/ccACWXFoBdLSoLqpcBVJ0LkA=", + "dev": true + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npm.taobao.org/escape-html/download/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-4.0.0.tgz?cache=0&sync_timestamp=1618677243201&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescape-string-regexp%2Fdownload%2Fescape-string-regexp-4.0.0.tgz", + "integrity": "sha1-FLqDpdNz49MR5a/KKc9b+tllvzQ=", + "dev": true + }, + "eslint": { + "version": "7.29.0", + "resolved": "https://registry.nlark.com/eslint/download/eslint-7.29.0.tgz", + "integrity": "sha1-7ip2SPLnKUheTQvWOD7B3qvIs8A=", + "dev": true, + "requires": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.2", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.1.2", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.9", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.nlark.com/eslint-utils/download/eslint-utils-2.1.0.tgz?cache=0&sync_timestamp=1620975524854&other_urls=https%3A%2F%2Fregistry.nlark.com%2Feslint-utils%2Fdownload%2Feslint-utils-2.1.0.tgz", + "integrity": "sha1-0t5eA0JOcH3BDHQGjd7a5wh0Gyc=", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.nlark.com/eslint-visitor-keys/download/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha1-MOvR73wv3/AcOk8VEESvJfqwUj4=", + "dev": true + } + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npm.taobao.org/ignore/download/ignore-4.0.6.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fignore%2Fdownload%2Fignore-4.0.6.tgz", + "integrity": "sha1-dQ49tYYgh7RzfrrIIH/9HvJ7Jfw=", + "dev": true + } + } + }, + "eslint-config-prettier": { + "version": "8.3.0", + "resolved": "https://registry.nlark.com/eslint-config-prettier/download/eslint-config-prettier-8.3.0.tgz?cache=0&sync_timestamp=1619270948988&other_urls=https%3A%2F%2Fregistry.nlark.com%2Feslint-config-prettier%2Fdownload%2Feslint-config-prettier-8.3.0.tgz", + "integrity": "sha1-90cbILb+ipqSVMxoRFQgKIai3Xo=", + "dev": true + }, + "eslint-plugin-prettier": { + "version": "3.4.0", + "resolved": "https://registry.npm.taobao.org/eslint-plugin-prettier/download/eslint-plugin-prettier-3.4.0.tgz", + "integrity": "sha1-zbrTvx29Kxd+mCVzf+Y7R2oI8Mc=", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, + "eslint-plugin-vue": { + "version": "7.16.0", + "resolved": "https://registry.nlark.com/eslint-plugin-vue/download/eslint-plugin-vue-7.16.0.tgz?cache=0&sync_timestamp=1628592345667&other_urls=https%3A%2F%2Fregistry.nlark.com%2Feslint-plugin-vue%2Fdownload%2Feslint-plugin-vue-7.16.0.tgz", + "integrity": "sha1-f+n+oDmhkLEIMZwTgK31Q+9XcH0=", + "dev": true, + "requires": { + "eslint-utils": "^2.1.0", + "natural-compare": "^1.4.0", + "semver": "^6.3.0", + "vue-eslint-parser": "^7.10.0" + }, + "dependencies": { + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.nlark.com/eslint-utils/download/eslint-utils-2.1.0.tgz?cache=0&sync_timestamp=1620975524854&other_urls=https%3A%2F%2Fregistry.nlark.com%2Feslint-utils%2Fdownload%2Feslint-utils-2.1.0.tgz", + "integrity": "sha1-0t5eA0JOcH3BDHQGjd7a5wh0Gyc=", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.nlark.com/eslint-visitor-keys/download/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha1-MOvR73wv3/AcOk8VEESvJfqwUj4=", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1616463550093&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz", + "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=", + "dev": true + } + } + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npm.taobao.org/eslint-scope/download/eslint-scope-5.1.1.tgz", + "integrity": "sha1-54blmmbLkrP2wfsNUIqrF0hI9Iw=", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.nlark.com/eslint-utils/download/eslint-utils-3.0.0.tgz?cache=0&sync_timestamp=1620975524854&other_urls=https%3A%2F%2Fregistry.nlark.com%2Feslint-utils%2Fdownload%2Feslint-utils-3.0.0.tgz", + "integrity": "sha1-iuuvrOc0W7M1WdsKHxOh0tSMNnI=", + "dev": true, + "requires": { + "eslint-visitor-keys": "^2.0.0" + } + }, + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.nlark.com/eslint-visitor-keys/download/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha1-9lMoJZMFknOSyTjtROsKXJsr0wM=", + "dev": true + }, + "espree": { + "version": "7.3.1", + "resolved": "https://registry.nlark.com/espree/download/espree-7.3.1.tgz", + "integrity": "sha1-8t8zC3Usb1UBn4vYm3ZgA5wbu7Y=", + "dev": true, + "requires": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.nlark.com/eslint-visitor-keys/download/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha1-MOvR73wv3/AcOk8VEESvJfqwUj4=", + "dev": true + } + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npm.taobao.org/esprima/download/esprima-4.0.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fesprima%2Fdownload%2Fesprima-4.0.1.tgz", + "integrity": "sha1-E7BM2z5sXRnfkatph6hpVhmwqnE=", + "dev": true + }, + "esquery": { + "version": "1.4.0", + "resolved": "https://registry.npm.taobao.org/esquery/download/esquery-1.4.0.tgz?cache=0&sync_timestamp=1612565659324&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fesquery%2Fdownload%2Fesquery-1.4.0.tgz", + "integrity": "sha1-IUj/w4uC6McFff7UhCWz5h8PJKU=", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npm.taobao.org/estraverse/download/estraverse-5.2.0.tgz?cache=0&sync_timestamp=1596643087461&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Festraverse%2Fdownload%2Festraverse-5.2.0.tgz", + "integrity": "sha1-MH30JUfmzHMk088DwVXVzbjFOIA=", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npm.taobao.org/esrecurse/download/esrecurse-4.3.0.tgz?cache=0&sync_timestamp=1598900128185&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fesrecurse%2Fdownload%2Fesrecurse-4.3.0.tgz", + "integrity": "sha1-eteWTWeauyi+5yzsY3WLHF0smSE=", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npm.taobao.org/estraverse/download/estraverse-5.2.0.tgz?cache=0&sync_timestamp=1596643087461&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Festraverse%2Fdownload%2Festraverse-5.2.0.tgz", + "integrity": "sha1-MH30JUfmzHMk088DwVXVzbjFOIA=", + "dev": true + } + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npm.taobao.org/estraverse/download/estraverse-4.3.0.tgz?cache=0&sync_timestamp=1596643087461&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Festraverse%2Fdownload%2Festraverse-4.3.0.tgz", + "integrity": "sha1-OYrT88WiSUi+dyXoPRGn3ijNvR0=", + "dev": true + }, + "estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npm.taobao.org/estree-walker/download/estree-walker-2.0.2.tgz", + "integrity": "sha1-UvAQF4wqTBF6d1fP6UKtt9LaTKw=" + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npm.taobao.org/esutils/download/esutils-2.0.3.tgz?cache=0&sync_timestamp=1564535492241&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fesutils%2Fdownload%2Fesutils-2.0.3.tgz", + "integrity": "sha1-dNLrTeC42hKTcRkQ1Qd1ubcQ72Q=", + "dev": true + }, + "execall": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/execall/download/execall-2.0.0.tgz?cache=0&sync_timestamp=1617892843041&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fexecall%2Fdownload%2Fexecall-2.0.0.tgz", + "integrity": "sha1-FqBrX+UJnffQC+XZwG7s3tFmO0U=", + "dev": true, + "requires": { + "clone-regexp": "^2.1.0" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npm.taobao.org/extend/download/extend-3.0.2.tgz", + "integrity": "sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo=", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-3.1.3.tgz?cache=0&sync_timestamp=1591599666712&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-deep-equal%2Fdownload%2Ffast-deep-equal-3.1.3.tgz", + "integrity": "sha1-On1WtVnWy8PrUSMlJE5hmmXGxSU=", + "dev": true + }, + "fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npm.taobao.org/fast-diff/download/fast-diff-1.2.0.tgz", + "integrity": "sha1-c+4RmC2Gyq95WYKNUZz+kn+sXwM=", + "dev": true + }, + "fast-glob": { + "version": "3.2.7", + "resolved": "https://registry.nlark.com/fast-glob/download/fast-glob-3.2.7.tgz", + "integrity": "sha1-/Wy3otfpqnp4RhEehaGW1rL3ZqE=", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npm.taobao.org/fast-json-stable-stringify/download/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha1-h0v2nG9ATCtdmcSBNBOZ/VWJJjM=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npm.taobao.org/fast-levenshtein/download/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "fastest-levenshtein": { + "version": "1.0.12", + "resolved": "https://registry.npm.taobao.org/fastest-levenshtein/download/fastest-levenshtein-1.0.12.tgz", + "integrity": "sha1-mZD306iMxan/0fF0V0UlFwDUl+I=", + "dev": true + }, + "fastq": { + "version": "1.11.0", + "resolved": "https://registry.npm.taobao.org/fastq/download/fastq-1.11.0.tgz", + "integrity": "sha1-u5+5VaBxMKkY62PB9RYcwypdCFg=", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npm.taobao.org/file-entry-cache/download/file-entry-cache-6.0.1.tgz", + "integrity": "sha1-IRst2WWcsDlLBz5zI6w8kz1SICc=", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npm.taobao.org/fill-range/download/fill-range-7.0.1.tgz", + "integrity": "sha1-GRmmp8df44ssfHflGYU12prN2kA=", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npm.taobao.org/finalhandler/download/finalhandler-1.1.2.tgz", + "integrity": "sha1-t+fQAP/RGTjQ/bBTUG9uur6fWH0=", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1607566512593&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", + "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz?cache=0&sync_timestamp=1607433816745&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fms%2Fdownload%2Fms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npm.taobao.org/find-up/download/find-up-4.1.0.tgz?cache=0&sync_timestamp=1597172141619&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffind-up%2Fdownload%2Ffind-up-4.1.0.tgz", + "integrity": "sha1-l6/n1s3AvFkoWEt8jXsW6KmqXRk=", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npm.taobao.org/flat-cache/download/flat-cache-3.0.4.tgz?cache=0&sync_timestamp=1604831825098&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fflat-cache%2Fdownload%2Fflat-cache-3.0.4.tgz", + "integrity": "sha1-YbAzgwKy/p+Vfcwy/CqH8cMEixE=", + "dev": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.1.1", + "resolved": "https://registry.npm.taobao.org/flatted/download/flatted-3.1.1.tgz", + "integrity": "sha1-xLSJ6ACW2d8d/JfHmHGup8YXxGk=", + "dev": true + }, + "follow-redirects": { + "version": "1.14.1", + "resolved": "https://registry.nlark.com/follow-redirects/download/follow-redirects-1.14.1.tgz?cache=0&sync_timestamp=1620555234886&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffollow-redirects%2Fdownload%2Ffollow-redirects-1.14.1.tgz", + "integrity": "sha1-2RFN7Qoc/dM04WTmZirQK/2R/0M=" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/fs.realpath/download/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-2.3.2.tgz?cache=0&sync_timestamp=1612536422255&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffsevents%2Fdownload%2Ffsevents-2.3.2.tgz", + "integrity": "sha1-ilJveLj99GI7cJ4Ll1xSwkwC/Ro=", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npm.taobao.org/function-bind/download/function-bind-1.1.1.tgz", + "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npm.taobao.org/functional-red-black-tree/download/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "generic-names": { + "version": "2.0.1", + "resolved": "https://registry.npm.taobao.org/generic-names/download/generic-names-2.0.1.tgz", + "integrity": "sha1-+KN46tLMqno08DF7BVVIMq5BuHI=", + "dev": true, + "requires": { + "loader-utils": "^1.1.0" + } + }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npm.taobao.org/gensync/download/gensync-1.0.0-beta.2.tgz?cache=0&sync_timestamp=1603829637456&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fgensync%2Fdownload%2Fgensync-1.0.0-beta.2.tgz", + "integrity": "sha1-MqbudsPX9S1GsrGuXZP+qFgKJeA=", + "dev": true + }, + "get-stdin": { + "version": "8.0.0", + "resolved": "https://registry.nlark.com/get-stdin/download/get-stdin-8.0.0.tgz", + "integrity": "sha1-y61qc/63X27rIrqeAfiaooqpelM=", + "dev": true + }, + "glob": { + "version": "7.1.7", + "resolved": "https://registry.nlark.com/glob/download/glob-7.1.7.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fglob%2Fdownload%2Fglob-7.1.7.tgz", + "integrity": "sha1-Oxk+kjPwHULQs/eClLvutBj5SpA=", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.nlark.com/glob-parent/download/glob-parent-5.1.2.tgz?cache=0&sync_timestamp=1620073245729&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fglob-parent%2Fdownload%2Fglob-parent-5.1.2.tgz", + "integrity": "sha1-hpgyxYA0/mikCTwX3BXoNA2EAcQ=", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "global-modules": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/global-modules/download/global-modules-2.0.0.tgz", + "integrity": "sha1-mXYFrSNF8n9RU5vqJldEISFcd4A=", + "dev": true, + "requires": { + "global-prefix": "^3.0.0" + } + }, + "global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npm.taobao.org/global-prefix/download/global-prefix-3.0.0.tgz", + "integrity": "sha1-/IX3MGTfafUEIfR/iD/luRO6m5c=", + "dev": true, + "requires": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + }, + "dependencies": { + "which": { + "version": "1.3.1", + "resolved": "https://registry.npm.taobao.org/which/download/which-1.3.1.tgz?cache=0&sync_timestamp=1574116262707&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwhich%2Fdownload%2Fwhich-1.3.1.tgz", + "integrity": "sha1-pFBD1U9YBTFtqNYvn1CRjT2nCwo=", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "globals": { + "version": "13.9.0", + "resolved": "https://registry.nlark.com/globals/download/globals-13.9.0.tgz?cache=0&sync_timestamp=1622088047458&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fglobals%2Fdownload%2Fglobals-13.9.0.tgz", + "integrity": "sha1-S/K/Y1szShc/sdr3xeayGOzcBss=", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "globby": { + "version": "11.0.4", + "resolved": "https://registry.nlark.com/globby/download/globby-11.0.4.tgz?cache=0&sync_timestamp=1623850220985&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fglobby%2Fdownload%2Fglobby-11.0.4.tgz", + "integrity": "sha1-LLr/d8Lypi5x6bKBOme5ejowAaU=", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + } + }, + "globjoin": { + "version": "0.1.4", + "resolved": "https://registry.nlark.com/globjoin/download/globjoin-0.1.4.tgz", + "integrity": "sha1-L0SUrIkZ43Z8XLtpHp9GMyQoXUM=", + "dev": true + }, + "gonzales-pe": { + "version": "4.3.0", + "resolved": "https://registry.npm.taobao.org/gonzales-pe/download/gonzales-pe-4.3.0.tgz", + "integrity": "sha1-/p3sXzxVfurQn/hoxlgmvlTQZ7M=", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "good-listener": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", + "integrity": "sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=", + "requires": { + "delegate": "^3.1.2" + } + }, + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.2.6.tgz", + "integrity": "sha1-/wQLKwhTsjw9MQJ1I3BvGIXXa+4=", + "dev": true, + "optional": true + }, + "hard-rejection": { + "version": "2.1.0", + "resolved": "https://registry.nlark.com/hard-rejection/download/hard-rejection-2.1.0.tgz", + "integrity": "sha1-HG7aXBaFxjlCdm15u0Cudzzs2IM=", + "dev": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npm.taobao.org/has/download/has-1.0.3.tgz", + "integrity": "sha1-ci18v8H2qoJB8W3YFOAR4fQeh5Y=", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-3.0.0.tgz?cache=0&sync_timestamp=1618559697170&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhas-flag%2Fdownload%2Fhas-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "hash-sum": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/hash-sum/download/hash-sum-2.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhash-sum%2Fdownload%2Fhash-sum-2.0.0.tgz", + "integrity": "sha1-gdAbtd6OpKIUrV1urRtSNGCwtFo=", + "dev": true + }, + "header-case": { + "version": "2.0.4", + "resolved": "https://registry.npm.taobao.org/header-case/download/header-case-2.0.4.tgz", + "integrity": "sha1-WkLmO1UXc0nPQFvrjXdayruSwGM=", + "dev": true, + "requires": { + "capital-case": "^1.0.4", + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.nlark.com/tslib/download/tslib-2.3.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftslib%2Fdownload%2Ftslib-2.3.0.tgz", + "integrity": "sha1-gDuM2rPhK6WBpMpByIObuw2ssJ4=", + "dev": true + } + } + }, + "hosted-git-info": { + "version": "4.0.2", + "resolved": "https://registry.npm.taobao.org/hosted-git-info/download/hosted-git-info-4.0.2.tgz?cache=0&sync_timestamp=1617826545071&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhosted-git-info%2Fdownload%2Fhosted-git-info-4.0.2.tgz", + "integrity": "sha1-XkJVB+7eT+qEa3Ji8IOEVsQgmWE=", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-6.0.0.tgz?cache=0&sync_timestamp=1594427569171&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flru-cache%2Fdownload%2Flru-cache-6.0.0.tgz", + "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-4.0.0.tgz", + "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", + "dev": true + } + } + }, + "html-tags": { + "version": "3.1.0", + "resolved": "https://registry.npm.taobao.org/html-tags/download/html-tags-3.1.0.tgz", + "integrity": "sha1-e15vfmZen7QfMAB+2eDUHpf7IUA=", + "dev": true + }, + "htmlparser2": { + "version": "3.10.1", + "resolved": "https://registry.npm.taobao.org/htmlparser2/download/htmlparser2-3.10.1.tgz", + "integrity": "sha1-vWedw/WYl7ajS7EHSchVu1OpOS8=", + "dev": true, + "requires": { + "domelementtype": "^1.3.1", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^3.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npm.taobao.org/readable-stream/download/readable-stream-3.6.0.tgz", + "integrity": "sha1-M3u9o63AcGvT4CRCaihtS0sskZg=", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.nlark.com/iconv-lite/download/iconv-lite-0.4.24.tgz", + "integrity": "sha1-ICK0sl+93CHS9SSXSkdKr+czkIs=", + "dev": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "icss-replace-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npm.taobao.org/icss-replace-symbols/download/icss-replace-symbols-1.1.0.tgz", + "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=", + "dev": true + }, + "icss-utils": { + "version": "5.1.0", + "resolved": "https://registry.npm.taobao.org/icss-utils/download/icss-utils-5.1.0.tgz?cache=0&sync_timestamp=1605801312995&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ficss-utils%2Fdownload%2Ficss-utils-5.1.0.tgz", + "integrity": "sha1-xr5oWKvQE9do6YNmrkfiXViHsa4=", + "dev": true + }, + "ignore": { + "version": "5.1.8", + "resolved": "https://registry.npm.taobao.org/ignore/download/ignore-5.1.8.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fignore%2Fdownload%2Fignore-5.1.8.tgz", + "integrity": "sha1-8VCotQo0KJsz4i9YiavU2AFvDlc=", + "dev": true + }, + "image-size": { + "version": "0.5.5", + "resolved": "https://registry.npm.taobao.org/image-size/download/image-size-0.5.5.tgz", + "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", + "dev": true, + "optional": true + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npm.taobao.org/import-fresh/download/import-fresh-3.3.0.tgz?cache=0&sync_timestamp=1608469480577&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fimport-fresh%2Fdownload%2Fimport-fresh-3.3.0.tgz", + "integrity": "sha1-NxYsJfy566oublPVtNiM4X2eDCs=", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "import-lazy": { + "version": "4.0.0", + "resolved": "https://registry.npm.taobao.org/import-lazy/download/import-lazy-4.0.0.tgz", + "integrity": "sha1-6OtidIOgpD2jwD8+NVSL5csMwVM=", + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npm.taobao.org/imurmurhash/download/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npm.taobao.org/indent-string/download/indent-string-4.0.0.tgz?cache=0&sync_timestamp=1618679442183&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Findent-string%2Fdownload%2Findent-string-4.0.0.tgz", + "integrity": "sha1-Yk+PRJfWGbLZdoUx1Y9BIoVNclE=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.4.tgz", + "integrity": "sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w=", + "dev": true + }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npm.taobao.org/ini/download/ini-1.3.8.tgz?cache=0&sync_timestamp=1607907874824&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fini%2Fdownload%2Fini-1.3.8.tgz", + "integrity": "sha1-op2kJbSIBvNHZ6Tvzjlyaa8oQyw=", + "dev": true + }, + "is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npm.taobao.org/is-alphabetical/download/is-alphabetical-1.0.4.tgz", + "integrity": "sha1-nn1rlJFr4iFTdF0YTCmMv5hqaG0=", + "dev": true + }, + "is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npm.taobao.org/is-alphanumerical/download/is-alphanumerical-1.0.4.tgz?cache=0&sync_timestamp=1615453958702&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-alphanumerical%2Fdownload%2Fis-alphanumerical-1.0.4.tgz", + "integrity": "sha1-frmiQx+FX2se8aeOMm31FWlsTb8=", + "dev": true, + "requires": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npm.taobao.org/is-arrayish/download/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npm.taobao.org/is-binary-path/download/is-binary-path-2.1.0.tgz", + "integrity": "sha1-6h9/O4DwZCNug0cPhsCcJU+0Wwk=", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npm.taobao.org/is-buffer/download/is-buffer-2.0.5.tgz?cache=0&sync_timestamp=1604432327227&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-buffer%2Fdownload%2Fis-buffer-2.0.5.tgz", + "integrity": "sha1-68JS5ADSL/jXf6CYiIIaJKZYwZE=", + "dev": true + }, + "is-core-module": { + "version": "2.4.0", + "resolved": "https://registry.nlark.com/is-core-module/download/is-core-module-2.4.0.tgz?cache=0&sync_timestamp=1620592629366&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-core-module%2Fdownload%2Fis-core-module-2.4.0.tgz", + "integrity": "sha1-jp/I4VAnsBFBgCbpjw5vTYYwXME=", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npm.taobao.org/is-decimal/download/is-decimal-1.0.4.tgz", + "integrity": "sha1-ZaOllYocW2OnBuGzM9fNn2MNP6U=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npm.taobao.org/is-extglob/download/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-3.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-fullwidth-code-point%2Fdownload%2Fis-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha1-8Rb4Bk/pCz94RKOJl8C3UFEmnx0=", + "dev": true + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-4.0.1.tgz", + "integrity": "sha1-dWfb6fL14kZ7x3q4PEopSCQHpdw=", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npm.taobao.org/is-hexadecimal/download/is-hexadecimal-1.0.4.tgz?cache=0&sync_timestamp=1615466008748&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-hexadecimal%2Fdownload%2Fis-hexadecimal-1.0.4.tgz", + "integrity": "sha1-zDXJdYjaS9Saju3WvECC1E3LI6c=", + "dev": true + }, + "is-module": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/is-module/download/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npm.taobao.org/is-number/download/is-number-7.0.0.tgz", + "integrity": "sha1-dTU0W4lnNNX4DE0GxQlVUnoU8Ss=", + "dev": true + }, + "is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npm.taobao.org/is-plain-obj/download/is-plain-obj-2.1.0.tgz?cache=0&sync_timestamp=1618600554597&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-plain-obj%2Fdownload%2Fis-plain-obj-2.1.0.tgz", + "integrity": "sha1-ReQuN/zPH0Dajl927iFRWEDAkoc=", + "dev": true + }, + "is-plain-object": { + "version": "3.0.1", + "resolved": "https://registry.npm.taobao.org/is-plain-object/download/is-plain-object-3.0.1.tgz?cache=0&sync_timestamp=1599667338683&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-plain-object%2Fdownload%2Fis-plain-object-3.0.1.tgz", + "integrity": "sha1-Zi2S0kwKpDAkB7DUXSHyJRyF+Fs=" + }, + "is-regexp": { + "version": "2.1.0", + "resolved": "https://registry.npm.taobao.org/is-regexp/download/is-regexp-2.1.0.tgz?cache=0&sync_timestamp=1617816584210&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-regexp%2Fdownload%2Fis-regexp-2.1.0.tgz", + "integrity": "sha1-zXNKVoZOI7lWv058ZsOWpMCyLC0=", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/is-typedarray/download/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npm.taobao.org/is-unicode-supported/download/is-unicode-supported-0.1.0.tgz?cache=0&sync_timestamp=1618722953653&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-unicode-supported%2Fdownload%2Fis-unicode-supported-0.1.0.tgz", + "integrity": "sha1-PybHaoCVk7Ur+i7LVxDtJ3m1Iqc=", + "dev": true + }, + "is-what": { + "version": "3.14.1", + "resolved": "https://registry.npm.taobao.org/is-what/download/is-what-3.14.1.tgz?cache=0&sync_timestamp=1615169735707&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-what%2Fdownload%2Fis-what-3.14.1.tgz", + "integrity": "sha1-4SIvRt3ahd6tD9HJ3xMXYOd3VcE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/isexe/download/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "js-cookie": { + "version": "2.2.1", + "resolved": "https://registry.nlark.com/js-cookie/download/js-cookie-2.2.1.tgz", + "integrity": "sha1-aeEG3F1YBolFYpAqpbrsN0Tpsrg=" + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.nlark.com/js-tokens/download/js-tokens-4.0.0.tgz?cache=0&sync_timestamp=1619345098261&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fjs-tokens%2Fdownload%2Fjs-tokens-4.0.0.tgz", + "integrity": "sha1-GSA/tZmR35jjoocFDUZHzerzJJk=" + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.nlark.com/js-yaml/download/js-yaml-3.14.1.tgz?cache=0&sync_timestamp=1618847165988&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fjs-yaml%2Fdownload%2Fjs-yaml-3.14.1.tgz", + "integrity": "sha1-2ugS/bOCX6MGYJqHFzg8UMNqBTc=", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npm.taobao.org/jsesc/download/jsesc-2.5.2.tgz?cache=0&sync_timestamp=1603891175833&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjsesc%2Fdownload%2Fjsesc-2.5.2.tgz", + "integrity": "sha1-gFZNLkg9rPbo7yCWUKZ98/DCg6Q=", + "dev": true + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npm.taobao.org/json-parse-even-better-errors/download/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha1-fEeAWpQxmSjgV3dAXcEuH3pO4C0=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz", + "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npm.taobao.org/json-stable-stringify-without-jsonify/download/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npm.taobao.org/json5/download/json5-1.0.1.tgz", + "integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-6.0.3.tgz", + "integrity": "sha1-B8BQNKbDSfoG4k+jWqdttFgM5N0=", + "dev": true + }, + "klona": { + "version": "2.0.4", + "resolved": "https://registry.npm.taobao.org/klona/download/klona-2.0.4.tgz?cache=0&sync_timestamp=1600226641291&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fklona%2Fdownload%2Fklona-2.0.4.tgz", + "integrity": "sha1-e7Hjr/sMuGJFR+9+j2cI6i4538A=", + "dev": true + }, + "known-css-properties": { + "version": "0.21.0", + "resolved": "https://registry.npm.taobao.org/known-css-properties/download/known-css-properties-0.21.0.tgz", + "integrity": "sha1-FfvQu7g0R/POCdivJH7UfGjt6A0=", + "dev": true + }, + "less": { + "version": "4.1.1", + "resolved": "https://registry.npm.taobao.org/less/download/less-4.1.1.tgz", + "integrity": "sha1-Fb8lOpk5eR3GkIiMP/Qk8+bH7bo=", + "dev": true, + "requires": { + "copy-anything": "^2.0.1", + "errno": "^0.1.1", + "graceful-fs": "^4.1.2", + "image-size": "~0.5.0", + "make-dir": "^2.1.0", + "mime": "^1.4.1", + "needle": "^2.5.2", + "parse-node-version": "^1.0.1", + "source-map": "~0.6.0", + "tslib": "^1.10.0" + } + }, + "less-loader": { + "version": "10.0.1", + "resolved": "https://registry.nlark.com/less-loader/download/less-loader-10.0.1.tgz", + "integrity": "sha1-wFqrpo0AQAggJ18hwq2Hy5+pkj8=", + "dev": true, + "requires": { + "klona": "^2.0.4" + } + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npm.taobao.org/levn/download/levn-0.4.1.tgz", + "integrity": "sha1-rkViwAdHO5MqYgDUAyaN0v/8at4=", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npm.taobao.org/lines-and-columns/download/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "dev": true + }, + "loader-utils": { + "version": "1.4.0", + "resolved": "https://registry.npm.taobao.org/loader-utils/download/loader-utils-1.4.0.tgz", + "integrity": "sha1-xXm140yzSxp07cbB+za/o3HVphM=", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-5.0.0.tgz", + "integrity": "sha1-Gvujlq/WdqbUJQTQpno6frn2KqA=", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npm.taobao.org/lodash/download/lodash-4.17.21.tgz", + "integrity": "sha1-Z5WRxWTDv/quhFTPCz3zcMPWkRw=" + }, + "lodash-es": { + "version": "4.17.21", + "resolved": "https://registry.npm.taobao.org/lodash-es/download/lodash-es-4.17.21.tgz", + "integrity": "sha1-Q+YmxG5lkbd1C+srUBFzkMYJ4+4=" + }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npm.taobao.org/lodash.camelcase/download/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", + "dev": true + }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npm.taobao.org/lodash.clonedeep/download/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npm.taobao.org/lodash.merge/download/lodash.merge-4.6.2.tgz", + "integrity": "sha1-VYqlO0O2YeGSWgr9+japoQhf5Xo=", + "dev": true + }, + "lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npm.taobao.org/lodash.truncate/download/lodash.truncate-4.4.2.tgz", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", + "dev": true + }, + "log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.nlark.com/log-symbols/download/log-symbols-4.1.0.tgz", + "integrity": "sha1-P727lbRoOsn8eFER55LlWNSr1QM=", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + } + }, + "longest-streak": { + "version": "2.0.4", + "resolved": "https://registry.npm.taobao.org/longest-streak/download/longest-streak-2.0.4.tgz?cache=0&sync_timestamp=1615193481278&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flongest-streak%2Fdownload%2Flongest-streak-2.0.4.tgz", + "integrity": "sha1-uFmZV9pbXatk3uP+MW+ndFl9kOQ=", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npm.taobao.org/loose-envify/download/loose-envify-1.4.0.tgz", + "integrity": "sha1-ce5R+nvkyuwaY4OffmgtgTLTDK8=", + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "lower-case": { + "version": "2.0.2", + "resolved": "https://registry.npm.taobao.org/lower-case/download/lower-case-2.0.2.tgz?cache=0&sync_timestamp=1606867317282&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flower-case%2Fdownload%2Flower-case-2.0.2.tgz", + "integrity": "sha1-b6I3xj29xKgsoP2ILkci3F5jTig=", + "dev": true, + "requires": { + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.nlark.com/tslib/download/tslib-2.3.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftslib%2Fdownload%2Ftslib-2.3.0.tgz", + "integrity": "sha1-gDuM2rPhK6WBpMpByIObuw2ssJ4=", + "dev": true + } + } + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-5.1.1.tgz?cache=0&sync_timestamp=1594427569171&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flru-cache%2Fdownload%2Flru-cache-5.1.1.tgz", + "integrity": "sha1-HaJ+ZxAnGUdpXa9oSOhH8B2EuSA=", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "magic-string": { + "version": "0.25.7", + "resolved": "https://registry.npm.taobao.org/magic-string/download/magic-string-0.25.7.tgz", + "integrity": "sha1-P0l9b9NMZpxnmNy4IfLvMfVEUFE=", + "dev": true, + "requires": { + "sourcemap-codec": "^1.4.4" + } + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npm.taobao.org/make-dir/download/make-dir-2.1.0.tgz?cache=0&sync_timestamp=1587567875186&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmake-dir%2Fdownload%2Fmake-dir-2.1.0.tgz", + "integrity": "sha1-XwMQ4YuL6JjMBwCSlaMK5B6R5vU=", + "dev": true, + "optional": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npm.taobao.org/semver/download/semver-5.7.1.tgz?cache=0&sync_timestamp=1616463550093&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-5.7.1.tgz", + "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=", + "dev": true, + "optional": true + } + } + }, + "map-obj": { + "version": "4.2.1", + "resolved": "https://registry.npm.taobao.org/map-obj/download/map-obj-4.2.1.tgz?cache=0&sync_timestamp=1617771296262&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmap-obj%2Fdownload%2Fmap-obj-4.2.1.tgz", + "integrity": "sha1-5Oo5nbyXmuc1yDyGPdMb3zZCd7c=", + "dev": true + }, + "mathml-tag-names": { + "version": "2.1.3", + "resolved": "https://registry.nlark.com/mathml-tag-names/download/mathml-tag-names-2.1.3.tgz", + "integrity": "sha1-TdrdZzCOeAzxakdoWHjuJ7c2oKM=", + "dev": true + }, + "mdast-util-from-markdown": { + "version": "0.8.5", + "resolved": "https://registry.nlark.com/mdast-util-from-markdown/download/mdast-util-from-markdown-0.8.5.tgz?cache=0&sync_timestamp=1624394132113&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fmdast-util-from-markdown%2Fdownload%2Fmdast-util-from-markdown-0.8.5.tgz", + "integrity": "sha1-0e8spCvDd+ywRjqYeRDa6JvZoow=", + "dev": true, + "requires": { + "@types/mdast": "^3.0.0", + "mdast-util-to-string": "^2.0.0", + "micromark": "~2.11.0", + "parse-entities": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + } + }, + "mdast-util-to-markdown": { + "version": "0.6.5", + "resolved": "https://registry.nlark.com/mdast-util-to-markdown/download/mdast-util-to-markdown-0.6.5.tgz", + "integrity": "sha1-sz9nyoINaebMUnqT1AOSSbUEvr4=", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "longest-streak": "^2.0.0", + "mdast-util-to-string": "^2.0.0", + "parse-entities": "^2.0.0", + "repeat-string": "^1.0.0", + "zwitch": "^1.0.0" + } + }, + "mdast-util-to-string": { + "version": "2.0.0", + "resolved": "https://registry.nlark.com/mdast-util-to-string/download/mdast-util-to-string-2.0.0.tgz", + "integrity": "sha1-uM/mpxPhCRy1tyj8SIhaR2f4uXs=", + "dev": true + }, + "meow": { + "version": "9.0.0", + "resolved": "https://registry.nlark.com/meow/download/meow-9.0.0.tgz", + "integrity": "sha1-zZUQvFysne59A8c+4fmtlZ9Oo2Q=", + "dev": true, + "requires": { + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize": "^1.2.0", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" + }, + "dependencies": { + "type-fest": { + "version": "0.18.1", + "resolved": "https://registry.nlark.com/type-fest/download/type-fest-0.18.1.tgz", + "integrity": "sha1-20vBUaSiz07r+a3V23VQjbbMhB8=", + "dev": true + } + } + }, + "merge-source-map": { + "version": "1.1.0", + "resolved": "https://registry.npm.taobao.org/merge-source-map/download/merge-source-map-1.1.0.tgz", + "integrity": "sha1-L93n5gIJOfcJBqaPLXrmheTIxkY=", + "dev": true, + "requires": { + "source-map": "^0.6.1" + } + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npm.taobao.org/merge2/download/merge2-1.4.1.tgz", + "integrity": "sha1-Q2iJL4hekHRVpv19xVwMnUBJkK4=", + "dev": true + }, + "micromark": { + "version": "2.11.4", + "resolved": "https://registry.nlark.com/micromark/download/micromark-2.11.4.tgz", + "integrity": "sha1-0TQ2E47qgmOD6CJEnJpcUO5EZlo=", + "dev": true, + "requires": { + "debug": "^4.0.0", + "parse-entities": "^2.0.0" + } + }, + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npm.taobao.org/micromatch/download/micromatch-4.0.4.tgz?cache=0&sync_timestamp=1618054885525&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmicromatch%2Fdownload%2Fmicromatch-4.0.4.tgz", + "integrity": "sha1-iW1Rnf6dsl/OlM63pQCRm/iB6/k=", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npm.taobao.org/mime/download/mime-1.6.0.tgz", + "integrity": "sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE=", + "dev": true, + "optional": true + }, + "min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npm.taobao.org/min-indent/download/min-indent-1.0.1.tgz", + "integrity": "sha1-pj9oFnOzBXH76LwlaGrnRu76mGk=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npm.taobao.org/minimatch/download/minimatch-3.0.4.tgz", + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npm.taobao.org/minimist/download/minimist-1.2.5.tgz", + "integrity": "sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI=", + "dev": true + }, + "minimist-options": { + "version": "4.1.0", + "resolved": "https://registry.npm.taobao.org/minimist-options/download/minimist-options-4.1.0.tgz", + "integrity": "sha1-wGVXE8U6ii69d/+iR9NCxA8BBhk=", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" + }, + "dependencies": { + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npm.taobao.org/is-plain-obj/download/is-plain-obj-1.1.0.tgz?cache=0&sync_timestamp=1618600554597&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-plain-obj%2Fdownload%2Fis-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + } + } + }, + "mitt": { + "version": "3.0.0", + "resolved": "https://registry.nlark.com/mitt/download/mitt-3.0.0.tgz", + "integrity": "sha1-ae+b1cgP9vV0c+jYkybQHEFL4L0=" + }, + "moment": { + "version": "2.29.1", + "resolved": "https://registry.npm.taobao.org/moment/download/moment-2.29.1.tgz?cache=0&sync_timestamp=1601983517363&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmoment%2Fdownload%2Fmoment-2.29.1.tgz", + "integrity": "sha1-sr52n6MZQL6e7qZGnAdeNQBvo9M=" + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.1.2.tgz?cache=0&sync_timestamp=1607433816745&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fms%2Fdownload%2Fms-2.1.2.tgz", + "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", + "dev": true + }, + "nanoid": { + "version": "3.1.23", + "resolved": "https://registry.nlark.com/nanoid/download/nanoid-3.1.23.tgz", + "integrity": "sha1-90QIbOfCvEfuCoRyV01ceOQYOoE=", + "dev": true + }, + "nanopop": { + "version": "2.1.0", + "resolved": "https://registry.npm.taobao.org/nanopop/download/nanopop-2.1.0.tgz", + "integrity": "sha1-I0dlE87iQFiIr9LopLVAZrcLnmA=" + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npm.taobao.org/natural-compare/download/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "needle": { + "version": "2.6.0", + "resolved": "https://registry.npm.taobao.org/needle/download/needle-2.6.0.tgz", + "integrity": "sha1-JNu1XyUJ4jJLSpnWH0E5ggE8zb4=", + "dev": true, + "optional": true, + "requires": { + "debug": "^3.2.6", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npm.taobao.org/debug/download/debug-3.2.7.tgz?cache=0&sync_timestamp=1607566512593&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-3.2.7.tgz", + "integrity": "sha1-clgLfpFF+zm2Z2+cXl+xALk0F5o=", + "dev": true, + "optional": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "no-case": { + "version": "3.0.4", + "resolved": "https://registry.npm.taobao.org/no-case/download/no-case-3.0.4.tgz?cache=0&sync_timestamp=1606867315452&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fno-case%2Fdownload%2Fno-case-3.0.4.tgz", + "integrity": "sha1-02H9XJgA9VhVGoNp/A3NRmK2Ek0=", + "dev": true, + "requires": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.nlark.com/tslib/download/tslib-2.3.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftslib%2Fdownload%2Ftslib-2.3.0.tgz", + "integrity": "sha1-gDuM2rPhK6WBpMpByIObuw2ssJ4=", + "dev": true + } + } + }, + "node-releases": { + "version": "1.1.73", + "resolved": "https://registry.nlark.com/node-releases/download/node-releases-1.1.73.tgz?cache=0&sync_timestamp=1623060224459&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnode-releases%2Fdownload%2Fnode-releases-1.1.73.tgz", + "integrity": "sha1-3U6B3dUnf/hGuAtSu0DEnt96eyA=", + "dev": true + }, + "normalize-package-data": { + "version": "3.0.2", + "resolved": "https://registry.npm.taobao.org/normalize-package-data/download/normalize-package-data-3.0.2.tgz", + "integrity": "sha1-yuXEEK4kNPmmwbqmXVvDuTZshpk=", + "dev": true, + "requires": { + "hosted-git-info": "^4.0.1", + "resolve": "^1.20.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npm.taobao.org/normalize-path/download/normalize-path-3.0.0.tgz", + "integrity": "sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU=", + "dev": true + }, + "normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npm.taobao.org/normalize-range/download/normalize-range-0.1.2.tgz", + "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", + "dev": true + }, + "normalize-selector": { + "version": "0.2.0", + "resolved": "https://registry.npm.taobao.org/normalize-selector/download/normalize-selector-0.2.0.tgz", + "integrity": "sha1-0LFF62kRicY6eNIB3E/bEpPvDAM=", + "dev": true + }, + "nprogress": { + "version": "0.2.0", + "resolved": "https://registry.npm.taobao.org/nprogress/download/nprogress-0.2.0.tgz", + "integrity": "sha1-y480xTIT2JVyP8urkH6UIq28r7E=" + }, + "num2fraction": { + "version": "1.2.2", + "resolved": "https://registry.npm.taobao.org/num2fraction/download/num2fraction-1.2.2.tgz", + "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", + "dev": true + }, + "omit.js": { + "version": "2.0.2", + "resolved": "https://registry.npm.taobao.org/omit.js/download/omit.js-2.0.2.tgz", + "integrity": "sha1-3ZuENvq5R6Xz/yFMslOGMeMT7C8=" + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npm.taobao.org/on-finished/download/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npm.taobao.org/once/download/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npm.taobao.org/optionator/download/optionator-0.9.1.tgz?cache=0&sync_timestamp=1585966141328&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Foptionator%2Fdownload%2Foptionator-0.9.1.tgz", + "integrity": "sha1-TyNqY3Pa4FZqbUPhMmZ09QwpFJk=", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npm.taobao.org/p-limit/download/p-limit-2.3.0.tgz", + "integrity": "sha1-PdM8ZHohT9//2DWTPrCG2g3CHbE=", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npm.taobao.org/p-locate/download/p-locate-4.1.0.tgz", + "integrity": "sha1-o0KLtwiLOmApL2aRkni3wpetTwc=", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npm.taobao.org/p-try/download/p-try-2.2.0.tgz", + "integrity": "sha1-yyhoVA4xPWHeWPr741zpAE1VQOY=", + "dev": true + }, + "param-case": { + "version": "3.0.4", + "resolved": "https://registry.npm.taobao.org/param-case/download/param-case-3.0.4.tgz?cache=0&sync_timestamp=1606869196249&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fparam-case%2Fdownload%2Fparam-case-3.0.4.tgz", + "integrity": "sha1-fRf+SqEr3jTUp32RrPtiGcqtAcU=", + "dev": true, + "requires": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.nlark.com/tslib/download/tslib-2.3.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftslib%2Fdownload%2Ftslib-2.3.0.tgz", + "integrity": "sha1-gDuM2rPhK6WBpMpByIObuw2ssJ4=", + "dev": true + } + } + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npm.taobao.org/parent-module/download/parent-module-1.0.1.tgz", + "integrity": "sha1-aR0nCeeMefrjoVZiJFLQB2LKqqI=", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/parse-entities/download/parse-entities-2.0.0.tgz", + "integrity": "sha1-U8brW5MUofTsmfoP33zgHs2gy+g=", + "dev": true, + "requires": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + } + }, + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npm.taobao.org/parse-json/download/parse-json-5.2.0.tgz?cache=0&sync_timestamp=1610966676829&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fparse-json%2Fdownload%2Fparse-json-5.2.0.tgz", + "integrity": "sha1-x2/Gbe5UIxyWKyK8yKcs8vmXU80=", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, + "parse-node-version": { + "version": "1.0.1", + "resolved": "https://registry.nlark.com/parse-node-version/download/parse-node-version-1.0.1.tgz", + "integrity": "sha1-4rXb7eAOf6m8NjYH9TMn6LBzGJs=", + "dev": true + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npm.taobao.org/parseurl/download/parseurl-1.3.3.tgz", + "integrity": "sha1-naGee+6NEt/wUT7Vt2lXeTvC6NQ=", + "dev": true + }, + "pascal-case": { + "version": "3.1.2", + "resolved": "https://registry.npm.taobao.org/pascal-case/download/pascal-case-3.1.2.tgz", + "integrity": "sha1-tI4O8rmOIF58Ha50fQsVCCN2YOs=", + "dev": true, + "requires": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.nlark.com/tslib/download/tslib-2.3.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftslib%2Fdownload%2Ftslib-2.3.0.tgz", + "integrity": "sha1-gDuM2rPhK6WBpMpByIObuw2ssJ4=", + "dev": true + } + } + }, + "path-case": { + "version": "3.0.4", + "resolved": "https://registry.npm.taobao.org/path-case/download/path-case-3.0.4.tgz", + "integrity": "sha1-kWhkUzTrlCZYN1xW+AtMDLX4LG8=", + "dev": true, + "requires": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.nlark.com/tslib/download/tslib-2.3.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftslib%2Fdownload%2Ftslib-2.3.0.tgz", + "integrity": "sha1-gDuM2rPhK6WBpMpByIObuw2ssJ4=", + "dev": true + } + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npm.taobao.org/path-exists/download/path-exists-4.0.0.tgz", + "integrity": "sha1-UTvb4tO5XXdi6METfvoZXGxhtbM=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npm.taobao.org/path-is-absolute/download/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npm.taobao.org/path-key/download/path-key-3.1.1.tgz?cache=0&sync_timestamp=1617971691339&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpath-key%2Fdownload%2Fpath-key-3.1.1.tgz", + "integrity": "sha1-WB9q3mWMu6ZaDTOA3ndTKVBU83U=", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.nlark.com/path-parse/download/path-parse-1.0.7.tgz", + "integrity": "sha1-+8EUtgykKzDZ2vWFjkvWi77bZzU=", + "dev": true + }, + "path-to-regexp": { + "version": "6.2.0", + "resolved": "https://registry.npm.taobao.org/path-to-regexp/download/path-to-regexp-6.2.0.tgz?cache=0&sync_timestamp=1601401130106&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpath-to-regexp%2Fdownload%2Fpath-to-regexp-6.2.0.tgz", + "integrity": "sha1-97OAMzYQTDRoia3s5hRmkjBkXzg=", + "dev": true + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npm.taobao.org/path-type/download/path-type-4.0.0.tgz?cache=0&sync_timestamp=1611752074264&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpath-type%2Fdownload%2Fpath-type-4.0.0.tgz", + "integrity": "sha1-hO0BwKe6OAr+CdkKjBgNzZ0DBDs=", + "dev": true + }, + "picomatch": { + "version": "2.3.0", + "resolved": "https://registry.nlark.com/picomatch/download/picomatch-2.3.0.tgz", + "integrity": "sha1-8fBh3o9qS/AiiS4tEoI0+5gwKXI=", + "dev": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npm.taobao.org/pify/download/pify-4.0.1.tgz", + "integrity": "sha1-SyzSXFDVmHNcUCkiJP2MbfQeMjE=", + "dev": true, + "optional": true + }, + "pinia": { + "version": "2.0.0-beta.3", + "resolved": "https://registry.nlark.com/pinia/download/pinia-2.0.0-beta.3.tgz", + "integrity": "sha1-xvDQfaVNxaojf0zJKBiY6SezPRY=", + "requires": { + "@vue/devtools-api": "^6.0.0-beta.14" + } + }, + "postcss": { + "version": "8.3.6", + "resolved": "https://registry.nlark.com/postcss/download/postcss-8.3.6.tgz?cache=0&sync_timestamp=1626882928473&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss%2Fdownload%2Fpostcss-8.3.6.tgz", + "integrity": "sha1-JzDddql5afN/U7mmCWGXvjEcxOo=", + "dev": true, + "requires": { + "colorette": "^1.2.2", + "nanoid": "^3.1.23", + "source-map-js": "^0.6.2" + } + }, + "postcss-html": { + "version": "0.36.0", + "resolved": "https://registry.npm.taobao.org/postcss-html/download/postcss-html-0.36.0.tgz", + "integrity": "sha1-tAkT+U6qzCRT/TChMnrW7h+IsgQ=", + "dev": true, + "requires": { + "htmlparser2": "^3.10.0" + } + }, + "postcss-less": { + "version": "3.1.4", + "resolved": "https://registry.nlark.com/postcss-less/download/postcss-less-3.1.4.tgz", + "integrity": "sha1-Np9YZCtZKO+Jj/vBpuk8lYMExa0=", + "dev": true, + "requires": { + "postcss": "^7.0.14" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.nlark.com/chalk/download/chalk-2.4.2.tgz?cache=0&sync_timestamp=1618995384030&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-2.4.2.tgz", + "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.nlark.com/supports-color/download/supports-color-5.5.0.tgz?cache=0&sync_timestamp=1622293670728&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-5.5.0.tgz", + "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz?cache=0&sync_timestamp=1618677243201&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescape-string-regexp%2Fdownload%2Fescape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "postcss": { + "version": "7.0.36", + "resolved": "https://registry.nlark.com/postcss/download/postcss-7.0.36.tgz", + "integrity": "sha1-BW+M/6k5ZiqPWQWVDAfVKFZE38s=", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + } + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.nlark.com/supports-color/download/supports-color-6.1.0.tgz?cache=0&sync_timestamp=1622293670728&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-6.1.0.tgz", + "integrity": "sha1-B2Srxpxj1ayELdSGfo0CXogN+PM=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-media-query-parser": { + "version": "0.2.3", + "resolved": "https://registry.nlark.com/postcss-media-query-parser/download/postcss-media-query-parser-0.2.3.tgz", + "integrity": "sha1-J7Ocb02U+Bsac7j3Y1HGCeXO8kQ=", + "dev": true + }, + "postcss-modules": { + "version": "4.1.3", + "resolved": "https://registry.nlark.com/postcss-modules/download/postcss-modules-4.1.3.tgz", + "integrity": "sha1-xMTEHZjZfSTHDojaz8l69aSz4h0=", + "dev": true, + "requires": { + "generic-names": "^2.0.1", + "icss-replace-symbols": "^1.1.0", + "lodash.camelcase": "^4.3.0", + "postcss-modules-extract-imports": "^3.0.0", + "postcss-modules-local-by-default": "^4.0.0", + "postcss-modules-scope": "^3.0.0", + "postcss-modules-values": "^4.0.0", + "string-hash": "^1.1.1" + } + }, + "postcss-modules-extract-imports": { + "version": "3.0.0", + "resolved": "https://registry.npm.taobao.org/postcss-modules-extract-imports/download/postcss-modules-extract-imports-3.0.0.tgz?cache=0&sync_timestamp=1602588256782&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-modules-extract-imports%2Fdownload%2Fpostcss-modules-extract-imports-3.0.0.tgz", + "integrity": "sha1-zaHwR8CugMl9vijD52pDuIAldB0=", + "dev": true + }, + "postcss-modules-local-by-default": { + "version": "4.0.0", + "resolved": "https://registry.npm.taobao.org/postcss-modules-local-by-default/download/postcss-modules-local-by-default-4.0.0.tgz?cache=0&sync_timestamp=1602587676537&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-modules-local-by-default%2Fdownload%2Fpostcss-modules-local-by-default-4.0.0.tgz", + "integrity": "sha1-67tU+uFZjuz99pGgKz/zs5ClpRw=", + "dev": true, + "requires": { + "icss-utils": "^5.0.0", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.1.0" + } + }, + "postcss-modules-scope": { + "version": "3.0.0", + "resolved": "https://registry.npm.taobao.org/postcss-modules-scope/download/postcss-modules-scope-3.0.0.tgz?cache=0&sync_timestamp=1602593182204&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-modules-scope%2Fdownload%2Fpostcss-modules-scope-3.0.0.tgz", + "integrity": "sha1-nvMVFFbTu/oSDKRImN/Kby+gHwY=", + "dev": true, + "requires": { + "postcss-selector-parser": "^6.0.4" + } + }, + "postcss-modules-values": { + "version": "4.0.0", + "resolved": "https://registry.npm.taobao.org/postcss-modules-values/download/postcss-modules-values-4.0.0.tgz?cache=0&sync_timestamp=1602586306639&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-modules-values%2Fdownload%2Fpostcss-modules-values-4.0.0.tgz", + "integrity": "sha1-18Xn5ow7s8myfL9Iyguz/7RgLJw=", + "dev": true, + "requires": { + "icss-utils": "^5.0.0" + } + }, + "postcss-resolve-nested-selector": { + "version": "0.1.1", + "resolved": "https://registry.nlark.com/postcss-resolve-nested-selector/download/postcss-resolve-nested-selector-0.1.1.tgz", + "integrity": "sha1-Kcy8fDfe36wwTp//C/FZaz9qDk4=", + "dev": true + }, + "postcss-safe-parser": { + "version": "4.0.2", + "resolved": "https://registry.nlark.com/postcss-safe-parser/download/postcss-safe-parser-4.0.2.tgz?cache=0&sync_timestamp=1623651635519&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss-safe-parser%2Fdownload%2Fpostcss-safe-parser-4.0.2.tgz", + "integrity": "sha1-ptTkjw832ffBGypYG/APi6SHC5Y=", + "dev": true, + "requires": { + "postcss": "^7.0.26" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.nlark.com/chalk/download/chalk-2.4.2.tgz?cache=0&sync_timestamp=1618995384030&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-2.4.2.tgz", + "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.nlark.com/supports-color/download/supports-color-5.5.0.tgz?cache=0&sync_timestamp=1622293670728&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-5.5.0.tgz", + "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz?cache=0&sync_timestamp=1618677243201&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescape-string-regexp%2Fdownload%2Fescape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "postcss": { + "version": "7.0.36", + "resolved": "https://registry.nlark.com/postcss/download/postcss-7.0.36.tgz", + "integrity": "sha1-BW+M/6k5ZiqPWQWVDAfVKFZE38s=", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + } + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.nlark.com/supports-color/download/supports-color-6.1.0.tgz?cache=0&sync_timestamp=1622293670728&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-6.1.0.tgz", + "integrity": "sha1-B2Srxpxj1ayELdSGfo0CXogN+PM=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-sass": { + "version": "0.4.4", + "resolved": "https://registry.nlark.com/postcss-sass/download/postcss-sass-0.4.4.tgz", + "integrity": "sha1-kfDzRHtFzjcyJ6mLYfjY8HhShaM=", + "dev": true, + "requires": { + "gonzales-pe": "^4.3.0", + "postcss": "^7.0.21" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.nlark.com/chalk/download/chalk-2.4.2.tgz?cache=0&sync_timestamp=1618995384030&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-2.4.2.tgz", + "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.nlark.com/supports-color/download/supports-color-5.5.0.tgz?cache=0&sync_timestamp=1622293670728&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-5.5.0.tgz", + "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz?cache=0&sync_timestamp=1618677243201&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescape-string-regexp%2Fdownload%2Fescape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "postcss": { + "version": "7.0.36", + "resolved": "https://registry.nlark.com/postcss/download/postcss-7.0.36.tgz", + "integrity": "sha1-BW+M/6k5ZiqPWQWVDAfVKFZE38s=", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + } + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.nlark.com/supports-color/download/supports-color-6.1.0.tgz?cache=0&sync_timestamp=1622293670728&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-6.1.0.tgz", + "integrity": "sha1-B2Srxpxj1ayELdSGfo0CXogN+PM=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-scss": { + "version": "2.1.1", + "resolved": "https://registry.nlark.com/postcss-scss/download/postcss-scss-2.1.1.tgz?cache=0&sync_timestamp=1623651257144&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss-scss%2Fdownload%2Fpostcss-scss-2.1.1.tgz", + "integrity": "sha1-7Dp1+imlXgFrkL8yaQJsU8HSs4M=", + "dev": true, + "requires": { + "postcss": "^7.0.6" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.nlark.com/chalk/download/chalk-2.4.2.tgz?cache=0&sync_timestamp=1618995384030&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-2.4.2.tgz", + "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.nlark.com/supports-color/download/supports-color-5.5.0.tgz?cache=0&sync_timestamp=1622293670728&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-5.5.0.tgz", + "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz?cache=0&sync_timestamp=1618677243201&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescape-string-regexp%2Fdownload%2Fescape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "postcss": { + "version": "7.0.36", + "resolved": "https://registry.nlark.com/postcss/download/postcss-7.0.36.tgz", + "integrity": "sha1-BW+M/6k5ZiqPWQWVDAfVKFZE38s=", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + } + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.nlark.com/supports-color/download/supports-color-6.1.0.tgz?cache=0&sync_timestamp=1622293670728&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-6.1.0.tgz", + "integrity": "sha1-B2Srxpxj1ayELdSGfo0CXogN+PM=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-selector-parser": { + "version": "6.0.6", + "resolved": "https://registry.nlark.com/postcss-selector-parser/download/postcss-selector-parser-6.0.6.tgz?cache=0&sync_timestamp=1620752924836&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss-selector-parser%2Fdownload%2Fpostcss-selector-parser-6.0.6.tgz", + "integrity": "sha1-LFu6gXSsL2mBq2MaQqsO5UrzMuo=", + "dev": true, + "requires": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + } + }, + "postcss-sorting": { + "version": "5.0.1", + "resolved": "https://registry.npm.taobao.org/postcss-sorting/download/postcss-sorting-5.0.1.tgz", + "integrity": "sha1-ENXQBZ7qgzTazIIMASGGQDW8PxE=", + "dev": true, + "requires": { + "lodash": "^4.17.14", + "postcss": "^7.0.17" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.nlark.com/chalk/download/chalk-2.4.2.tgz?cache=0&sync_timestamp=1618995384030&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-2.4.2.tgz", + "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.nlark.com/supports-color/download/supports-color-5.5.0.tgz?cache=0&sync_timestamp=1622293670728&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-5.5.0.tgz", + "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz?cache=0&sync_timestamp=1618677243201&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescape-string-regexp%2Fdownload%2Fescape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "postcss": { + "version": "7.0.36", + "resolved": "https://registry.nlark.com/postcss/download/postcss-7.0.36.tgz", + "integrity": "sha1-BW+M/6k5ZiqPWQWVDAfVKFZE38s=", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + } + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.nlark.com/supports-color/download/supports-color-6.1.0.tgz?cache=0&sync_timestamp=1622293670728&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-6.1.0.tgz", + "integrity": "sha1-B2Srxpxj1ayELdSGfo0CXogN+PM=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-syntax": { + "version": "0.36.2", + "resolved": "https://registry.npm.taobao.org/postcss-syntax/download/postcss-syntax-0.36.2.tgz", + "integrity": "sha1-8IV4x9lYNFdOVZOoLfv6ivrjtRw=", + "dev": true + }, + "postcss-value-parser": { + "version": "4.1.0", + "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-4.1.0.tgz?cache=0&sync_timestamp=1588083210998&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-value-parser%2Fdownload%2Fpostcss-value-parser-4.1.0.tgz", + "integrity": "sha1-RD9qIM7WSBor2k+oUypuVdeJoss=", + "dev": true + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npm.taobao.org/prelude-ls/download/prelude-ls-1.2.1.tgz", + "integrity": "sha1-3rxkidem5rDnYRiIzsiAM30xY5Y=", + "dev": true + }, + "prettier": { + "version": "2.3.2", + "resolved": "https://registry.nlark.com/prettier/download/prettier-2.3.2.tgz?cache=0&sync_timestamp=1624696193562&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fprettier%2Fdownload%2Fprettier-2.3.2.tgz", + "integrity": "sha1-7ygKBewlNxLkhiM9tcbyNEHnNC0=", + "dev": true + }, + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/prettier-linter-helpers/download/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha1-0j1B/hN1ZG3i0BBNNFSjAIgCz3s=", + "dev": true, + "requires": { + "fast-diff": "^1.1.2" + } + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npm.taobao.org/progress/download/progress-2.0.3.tgz", + "integrity": "sha1-foz42PW48jnBvGi+tOt4Vn1XLvg=", + "dev": true + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npm.taobao.org/prr/download/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true, + "optional": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npm.taobao.org/punycode/download/punycode-2.1.1.tgz", + "integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew=", + "dev": true + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.nlark.com/queue-microtask/download/queue-microtask-1.2.3.tgz", + "integrity": "sha1-SSkii7xyTfrEPg77BYyve2z7YkM=", + "dev": true + }, + "quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npm.taobao.org/quick-lru/download/quick-lru-4.0.1.tgz?cache=0&sync_timestamp=1610610459445&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fquick-lru%2Fdownload%2Fquick-lru-4.0.1.tgz", + "integrity": "sha1-W4h48ROlgheEjGSCAmxz4bpXcn8=", + "dev": true + }, + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npm.taobao.org/read-pkg/download/read-pkg-5.2.0.tgz?cache=0&sync_timestamp=1616914810926&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fread-pkg%2Fdownload%2Fread-pkg-5.2.0.tgz", + "integrity": "sha1-e/KVQ4yloz5WzTDgU7NO5yUMk8w=", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npm.taobao.org/hosted-git-info/download/hosted-git-info-2.8.9.tgz?cache=0&sync_timestamp=1617826545071&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhosted-git-info%2Fdownload%2Fhosted-git-info-2.8.9.tgz", + "integrity": "sha1-3/wL+aIcAiCQkPKqaUKeFBTa8/k=", + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npm.taobao.org/normalize-package-data/download/normalize-package-data-2.5.0.tgz", + "integrity": "sha1-5m2xg4sgDB38IzIl0SyzZSDiNKg=", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npm.taobao.org/semver/download/semver-5.7.1.tgz?cache=0&sync_timestamp=1616463550093&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-5.7.1.tgz", + "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=", + "dev": true + }, + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.nlark.com/type-fest/download/type-fest-0.6.0.tgz", + "integrity": "sha1-jSojcNPfiG61yQraHFv2GIrPg4s=", + "dev": true + } + } + }, + "read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npm.taobao.org/read-pkg-up/download/read-pkg-up-7.0.1.tgz", + "integrity": "sha1-86YTV1hFlzOuK5VjgFbhhU5+9Qc=", + "dev": true, + "requires": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "dependencies": { + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.nlark.com/type-fest/download/type-fest-0.8.1.tgz", + "integrity": "sha1-CeJJ696FHTseSNJ8EFREZn8XuD0=", + "dev": true + } + } + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npm.taobao.org/readdirp/download/readdirp-3.6.0.tgz", + "integrity": "sha1-dKNwvYVxFuJFspzJc0DNQxoCpsc=", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "redent": { + "version": "3.0.0", + "resolved": "https://registry.nlark.com/redent/download/redent-3.0.0.tgz?cache=0&sync_timestamp=1620071175005&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fredent%2Fdownload%2Fredent-3.0.0.tgz", + "integrity": "sha1-5Ve3mYMWu1PJ8fVvpiY1LGljBZ8=", + "dev": true, + "requires": { + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + } + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.nlark.com/regenerator-runtime/download/regenerator-runtime-0.13.9.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fregenerator-runtime%2Fdownload%2Fregenerator-runtime-0.13.9.tgz", + "integrity": "sha1-iSV0Kpj/2QgUmI11Zq0wyjsmO1I=" + }, + "regexpp": { + "version": "3.2.0", + "resolved": "https://registry.nlark.com/regexpp/download/regexpp-3.2.0.tgz?cache=0&sync_timestamp=1623668905417&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fregexpp%2Fdownload%2Fregexpp-3.2.0.tgz", + "integrity": "sha1-BCWido2PI7rXDKS5BGH6LxIT4bI=", + "dev": true + }, + "remark": { + "version": "13.0.0", + "resolved": "https://registry.npm.taobao.org/remark/download/remark-13.0.0.tgz", + "integrity": "sha1-0V2b9xpAL0Aofr42Bntm1Uho5CU=", + "dev": true, + "requires": { + "remark-parse": "^9.0.0", + "remark-stringify": "^9.0.0", + "unified": "^9.1.0" + } + }, + "remark-parse": { + "version": "9.0.0", + "resolved": "https://registry.npm.taobao.org/remark-parse/download/remark-parse-9.0.0.tgz", + "integrity": "sha1-TSCimWZYgOT0r12Qt8e4qTWFNkA=", + "dev": true, + "requires": { + "mdast-util-from-markdown": "^0.8.0" + } + }, + "remark-stringify": { + "version": "9.0.1", + "resolved": "https://registry.npm.taobao.org/remark-stringify/download/remark-stringify-9.0.1.tgz", + "integrity": "sha1-V20G6RBUiwpxkacfJ7M/EhiGKJQ=", + "dev": true, + "requires": { + "mdast-util-to-markdown": "^0.6.0" + } + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npm.taobao.org/repeat-string/download/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npm.taobao.org/require-from-string/download/require-from-string-2.0.2.tgz", + "integrity": "sha1-iaf92TgmEmcxjq/hT5wy5ZjDaQk=", + "dev": true + }, + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npm.taobao.org/resolve/download/resolve-1.20.0.tgz?cache=0&sync_timestamp=1613054862388&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fresolve%2Fdownload%2Fresolve-1.20.0.tgz", + "integrity": "sha1-YpoBP7P3B1XW8LeTXMHCxTeLGXU=", + "dev": true, + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npm.taobao.org/resolve-from/download/resolve-from-4.0.0.tgz", + "integrity": "sha1-SrzYUq0y3Xuqv+m0DgCjbbXzkuY=", + "dev": true + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npm.taobao.org/reusify/download/reusify-1.0.4.tgz", + "integrity": "sha1-kNo4Kx4SbvwCFG6QhFqI2xKSXXY=", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npm.taobao.org/rimraf/download/rimraf-3.0.2.tgz?cache=0&sync_timestamp=1581229865753&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frimraf%2Fdownload%2Frimraf-3.0.2.tgz", + "integrity": "sha1-8aVAK6YiCtUswSgrrBrjqkn9Bho=", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "rollup": { + "version": "2.52.3", + "resolved": "https://registry.nlark.com/rollup/download/rollup-2.52.3.tgz?cache=0&sync_timestamp=1624627360389&other_urls=https%3A%2F%2Fregistry.nlark.com%2Frollup%2Fdownload%2Frollup-2.52.3.tgz", + "integrity": "sha1-Bi/DyF9nc21nWHSTEM/uZINsTio=", + "dev": true, + "requires": { + "fsevents": "~2.3.2" + } + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npm.taobao.org/run-parallel/download/run-parallel-1.2.0.tgz?cache=0&sync_timestamp=1612925912322&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frun-parallel%2Fdownload%2Frun-parallel-1.2.0.tgz", + "integrity": "sha1-ZtE2jae9+SHrnZW9GpIp5/IaQ+4=", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz", + "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=", + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npm.taobao.org/safer-buffer/download/safer-buffer-2.1.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsafer-buffer%2Fdownload%2Fsafer-buffer-2.1.2.tgz", + "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=", + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npm.taobao.org/sax/download/sax-1.2.4.tgz", + "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=", + "dev": true, + "optional": true + }, + "scroll-into-view-if-needed": { + "version": "2.2.28", + "resolved": "https://registry.npm.taobao.org/scroll-into-view-if-needed/download/scroll-into-view-if-needed-2.2.28.tgz", + "integrity": "sha1-WhWy9YpSZCyIyOylhGROAXA9ZFo=", + "requires": { + "compute-scroll-into-view": "^1.0.17" + } + }, + "select": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", + "integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=" + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npm.taobao.org/semver/download/semver-7.3.5.tgz?cache=0&sync_timestamp=1616463550093&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-7.3.5.tgz", + "integrity": "sha1-C2Ich5NI2JmOSw5L6Us/EuYBjvc=", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-6.0.0.tgz?cache=0&sync_timestamp=1594427569171&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flru-cache%2Fdownload%2Flru-cache-6.0.0.tgz", + "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-4.0.0.tgz", + "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", + "dev": true + } + } + }, + "sentence-case": { + "version": "3.0.4", + "resolved": "https://registry.npm.taobao.org/sentence-case/download/sentence-case-3.0.4.tgz", + "integrity": "sha1-NkWnuMEXx4f96HAgViJbtipFEx8=", + "dev": true, + "requires": { + "no-case": "^3.0.4", + "tslib": "^2.0.3", + "upper-case-first": "^2.0.2" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.nlark.com/tslib/download/tslib-2.3.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftslib%2Fdownload%2Ftslib-2.3.0.tgz", + "integrity": "sha1-gDuM2rPhK6WBpMpByIObuw2ssJ4=", + "dev": true + } + } + }, + "shallow-equal": { + "version": "1.2.1", + "resolved": "https://registry.npm.taobao.org/shallow-equal/download/shallow-equal-1.2.1.tgz", + "integrity": "sha1-TBar+lYEOqINBQMk76aJQLDaedo=" + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/shebang-command/download/shebang-command-2.0.0.tgz", + "integrity": "sha1-zNCvT4g1+9wmW4JGGq8MNmY/NOo=", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npm.taobao.org/shebang-regex/download/shebang-regex-3.0.0.tgz", + "integrity": "sha1-rhbxZE2HPsrYQ7AwexQzYtTEIXI=", + "dev": true + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npm.taobao.org/signal-exit/download/signal-exit-3.0.3.tgz", + "integrity": "sha1-oUEMLt2PB3sItOJTyOrPyvBXRhw=", + "dev": true + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npm.taobao.org/slash/download/slash-3.0.0.tgz", + "integrity": "sha1-ZTm+hwwWWtvVJAIg2+Nh8bxNRjQ=", + "dev": true + }, + "slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npm.taobao.org/slice-ansi/download/slice-ansi-4.0.0.tgz?cache=0&sync_timestamp=1618555008681&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fslice-ansi%2Fdownload%2Fslice-ansi-4.0.0.tgz", + "integrity": "sha1-UA6N0P1VsFgVCGJVsxla3ypF/ms=", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz", + "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz", + "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz", + "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", + "dev": true + } + } + }, + "snake-case": { + "version": "3.0.4", + "resolved": "https://registry.npm.taobao.org/snake-case/download/snake-case-3.0.4.tgz", + "integrity": "sha1-Tyu9Vo6ZNavf1ZPzTGkdrbScRSw=", + "dev": true, + "requires": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.nlark.com/tslib/download/tslib-2.3.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftslib%2Fdownload%2Ftslib-2.3.0.tgz", + "integrity": "sha1-gDuM2rPhK6WBpMpByIObuw2ssJ4=", + "dev": true + } + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=" + }, + "source-map-js": { + "version": "0.6.2", + "resolved": "https://registry.npm.taobao.org/source-map-js/download/source-map-js-0.6.2.tgz", + "integrity": "sha1-C7XeYxtBz72mz7qL0FqA79/SOF4=", + "dev": true + }, + "sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npm.taobao.org/sourcemap-codec/download/sourcemap-codec-1.4.8.tgz", + "integrity": "sha1-6oBL2UhXQC5pktBaOO8a41qatMQ=", + "dev": true + }, + "spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npm.taobao.org/spdx-correct/download/spdx-correct-3.1.1.tgz?cache=0&sync_timestamp=1590161967473&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fspdx-correct%2Fdownload%2Fspdx-correct-3.1.1.tgz", + "integrity": "sha1-3s6BrJweZxPl99G28X1Gj6U9iak=", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npm.taobao.org/spdx-exceptions/download/spdx-exceptions-2.3.0.tgz?cache=0&sync_timestamp=1587422410312&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fspdx-exceptions%2Fdownload%2Fspdx-exceptions-2.3.0.tgz", + "integrity": "sha1-PyjOGnegA3JoPq3kpDMYNSeiFj0=", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npm.taobao.org/spdx-expression-parse/download/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha1-z3D1BILu/cmOPOCmgz5KU87rpnk=", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.9", + "resolved": "https://registry.nlark.com/spdx-license-ids/download/spdx-license-ids-3.0.9.tgz", + "integrity": "sha1-illRNd75WSvaaXCUdPHL7qfCRn8=", + "dev": true + }, + "specificity": { + "version": "0.4.1", + "resolved": "https://registry.nlark.com/specificity/download/specificity-0.4.1.tgz?cache=0&sync_timestamp=1620301057306&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fspecificity%2Fdownload%2Fspecificity-0.4.1.tgz", + "integrity": "sha1-qrXmRQEtsIuhguFRFlc40AiHsBk=", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npm.taobao.org/sprintf-js/download/sprintf-js-1.0.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsprintf-js%2Fdownload%2Fsprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npm.taobao.org/statuses/download/statuses-1.5.0.tgz?cache=0&sync_timestamp=1609654060878&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstatuses%2Fdownload%2Fstatuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true + }, + "string-hash": { + "version": "1.1.3", + "resolved": "https://registry.npm.taobao.org/string-hash/download/string-hash-1.1.3.tgz", + "integrity": "sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs=", + "dev": true + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-4.2.2.tgz?cache=0&sync_timestamp=1618558856477&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstring-width%2Fdownload%2Fstring-width-4.2.2.tgz", + "integrity": "sha1-2v1PlVmnWFz7pSnGoKT3NIjr1MU=", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-6.0.0.tgz?cache=0&sync_timestamp=1618553351145&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-6.0.0.tgz", + "integrity": "sha1-CxVx3XZpzNTz4G4U7x7tJiJa5TI=", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.nlark.com/strip-indent/download/strip-indent-3.0.0.tgz", + "integrity": "sha1-wy4c7pQLazQyx3G8LFS8znPNMAE=", + "dev": true, + "requires": { + "min-indent": "^1.0.0" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npm.taobao.org/strip-json-comments/download/strip-json-comments-3.1.1.tgz?cache=0&sync_timestamp=1594567586410&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-json-comments%2Fdownload%2Fstrip-json-comments-3.1.1.tgz", + "integrity": "sha1-MfEoGzgyYwQ0gxwxDAHMzajL4AY=", + "dev": true + }, + "style-search": { + "version": "0.1.0", + "resolved": "https://registry.npm.taobao.org/style-search/download/style-search-0.1.0.tgz", + "integrity": "sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI=", + "dev": true + }, + "stylelint": { + "version": "13.13.1", + "resolved": "https://registry.nlark.com/stylelint/download/stylelint-13.13.1.tgz", + "integrity": "sha1-/KnJ9d55kKsmoA8We4l48IOhjzw=", + "dev": true, + "requires": { + "@stylelint/postcss-css-in-js": "^0.37.2", + "@stylelint/postcss-markdown": "^0.36.2", + "autoprefixer": "^9.8.6", + "balanced-match": "^2.0.0", + "chalk": "^4.1.1", + "cosmiconfig": "^7.0.0", + "debug": "^4.3.1", + "execall": "^2.0.0", + "fast-glob": "^3.2.5", + "fastest-levenshtein": "^1.0.12", + "file-entry-cache": "^6.0.1", + "get-stdin": "^8.0.0", + "global-modules": "^2.0.0", + "globby": "^11.0.3", + "globjoin": "^0.1.4", + "html-tags": "^3.1.0", + "ignore": "^5.1.8", + "import-lazy": "^4.0.0", + "imurmurhash": "^0.1.4", + "known-css-properties": "^0.21.0", + "lodash": "^4.17.21", + "log-symbols": "^4.1.0", + "mathml-tag-names": "^2.1.3", + "meow": "^9.0.0", + "micromatch": "^4.0.4", + "normalize-selector": "^0.2.0", + "postcss": "^7.0.35", + "postcss-html": "^0.36.0", + "postcss-less": "^3.1.4", + "postcss-media-query-parser": "^0.2.3", + "postcss-resolve-nested-selector": "^0.1.1", + "postcss-safe-parser": "^4.0.2", + "postcss-sass": "^0.4.4", + "postcss-scss": "^2.1.1", + "postcss-selector-parser": "^6.0.5", + "postcss-syntax": "^0.36.2", + "postcss-value-parser": "^4.1.0", + "resolve-from": "^5.0.0", + "slash": "^3.0.0", + "specificity": "^0.4.1", + "string-width": "^4.2.2", + "strip-ansi": "^6.0.0", + "style-search": "^0.1.0", + "sugarss": "^2.0.0", + "svg-tags": "^1.0.0", + "table": "^6.6.0", + "v8-compile-cache": "^2.3.0", + "write-file-atomic": "^3.0.3" + }, + "dependencies": { + "balanced-match": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/balanced-match/download/balanced-match-2.0.0.tgz?cache=0&sync_timestamp=1617714298273&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbalanced-match%2Fdownload%2Fbalanced-match-2.0.0.tgz", + "integrity": "sha1-3HD5INeNuLhYU1eVhnv0j4IGM9k=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz?cache=0&sync_timestamp=1618677243201&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescape-string-regexp%2Fdownload%2Fescape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "postcss": { + "version": "7.0.36", + "resolved": "https://registry.nlark.com/postcss/download/postcss-7.0.36.tgz", + "integrity": "sha1-BW+M/6k5ZiqPWQWVDAfVKFZE38s=", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.nlark.com/chalk/download/chalk-2.4.2.tgz?cache=0&sync_timestamp=1618995384030&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-2.4.2.tgz", + "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.nlark.com/supports-color/download/supports-color-5.5.0.tgz?cache=0&sync_timestamp=1622293670728&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-5.5.0.tgz", + "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + } + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npm.taobao.org/resolve-from/download/resolve-from-5.0.0.tgz", + "integrity": "sha1-w1IlhD3493bfIcV1V7wIfp39/Gk=", + "dev": true + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.nlark.com/supports-color/download/supports-color-6.1.0.tgz?cache=0&sync_timestamp=1622293670728&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-6.1.0.tgz", + "integrity": "sha1-B2Srxpxj1ayELdSGfo0CXogN+PM=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "stylelint-config-prettier": { + "version": "8.0.2", + "resolved": "https://registry.npm.taobao.org/stylelint-config-prettier/download/stylelint-config-prettier-8.0.2.tgz", + "integrity": "sha1-2p3jPaTFaJPL5+Jt8jmnN0BF4U4=", + "dev": true + }, + "stylelint-config-recommended": { + "version": "5.0.0", + "resolved": "https://registry.nlark.com/stylelint-config-recommended/download/stylelint-config-recommended-5.0.0.tgz?cache=0&sync_timestamp=1619280044204&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fstylelint-config-recommended%2Fdownload%2Fstylelint-config-recommended-5.0.0.tgz", + "integrity": "sha1-+1ZT9JWmC0k48q0+d3EtnhA5rng=", + "dev": true + }, + "stylelint-config-standard": { + "version": "22.0.0", + "resolved": "https://registry.nlark.com/stylelint-config-standard/download/stylelint-config-standard-22.0.0.tgz?cache=0&sync_timestamp=1619280042839&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fstylelint-config-standard%2Fdownload%2Fstylelint-config-standard-22.0.0.tgz", + "integrity": "sha1-yGC+mhPrvBsIRFb6EFJ78TpErd8=", + "dev": true, + "requires": { + "stylelint-config-recommended": "^5.0.0" + } + }, + "stylelint-order": { + "version": "4.1.0", + "resolved": "https://registry.npm.taobao.org/stylelint-order/download/stylelint-order-4.1.0.tgz", + "integrity": "sha1-aS0Ft9DCNaxm/PXqHZ5fCKdnR/Y=", + "dev": true, + "requires": { + "lodash": "^4.17.15", + "postcss": "^7.0.31", + "postcss-sorting": "^5.0.1" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.nlark.com/chalk/download/chalk-2.4.2.tgz?cache=0&sync_timestamp=1618995384030&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-2.4.2.tgz", + "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.nlark.com/supports-color/download/supports-color-5.5.0.tgz?cache=0&sync_timestamp=1622293670728&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-5.5.0.tgz", + "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz?cache=0&sync_timestamp=1618677243201&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescape-string-regexp%2Fdownload%2Fescape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "postcss": { + "version": "7.0.36", + "resolved": "https://registry.nlark.com/postcss/download/postcss-7.0.36.tgz", + "integrity": "sha1-BW+M/6k5ZiqPWQWVDAfVKFZE38s=", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + } + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.nlark.com/supports-color/download/supports-color-6.1.0.tgz?cache=0&sync_timestamp=1622293670728&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-6.1.0.tgz", + "integrity": "sha1-B2Srxpxj1ayELdSGfo0CXogN+PM=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "sugarss": { + "version": "2.0.0", + "resolved": "https://registry.nlark.com/sugarss/download/sugarss-2.0.0.tgz", + "integrity": "sha1-3dduASSyl9QL88yjHIsi7LQ7xh0=", + "dev": true, + "requires": { + "postcss": "^7.0.2" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.nlark.com/chalk/download/chalk-2.4.2.tgz?cache=0&sync_timestamp=1618995384030&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-2.4.2.tgz", + "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.nlark.com/supports-color/download/supports-color-5.5.0.tgz?cache=0&sync_timestamp=1622293670728&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-5.5.0.tgz", + "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz?cache=0&sync_timestamp=1618677243201&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescape-string-regexp%2Fdownload%2Fescape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "postcss": { + "version": "7.0.36", + "resolved": "https://registry.nlark.com/postcss/download/postcss-7.0.36.tgz", + "integrity": "sha1-BW+M/6k5ZiqPWQWVDAfVKFZE38s=", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + } + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.nlark.com/supports-color/download/supports-color-6.1.0.tgz?cache=0&sync_timestamp=1622293670728&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-6.1.0.tgz", + "integrity": "sha1-B2Srxpxj1ayELdSGfo0CXogN+PM=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.nlark.com/supports-color/download/supports-color-5.5.0.tgz?cache=0&sync_timestamp=1622293670728&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-5.5.0.tgz", + "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "svg-tags": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/svg-tags/download/svg-tags-1.0.0.tgz", + "integrity": "sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=", + "dev": true + }, + "systemjs": { + "version": "6.10.2", + "resolved": "https://registry.nlark.com/systemjs/download/systemjs-6.10.2.tgz", + "integrity": "sha1-yYcCF73fnP0l0S1PzRmJVB7xIHw=", + "dev": true + }, + "table": { + "version": "6.7.1", + "resolved": "https://registry.nlark.com/table/download/table-6.7.1.tgz?cache=0&sync_timestamp=1620957183690&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftable%2Fdownload%2Ftable-6.7.1.tgz", + "integrity": "sha1-7gVZK3FDgxqMlPPO5qrkwczvM+I=", + "dev": true, + "requires": { + "ajv": "^8.0.1", + "lodash.clonedeep": "^4.5.0", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ajv": { + "version": "8.6.0", + "resolved": "https://registry.nlark.com/ajv/download/ajv-8.6.0.tgz", + "integrity": "sha1-YMxF2cRqR32A2SxIB22XLDQuVyA=", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-1.0.0.tgz", + "integrity": "sha1-rnvLNlard6c7pcSb9lTzjmtoYOI=", + "dev": true + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npm.taobao.org/text-table/download/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "throttle-debounce": { + "version": "2.3.0", + "resolved": "https://registry.npm.taobao.org/throttle-debounce/download/throttle-debounce-2.3.0.tgz?cache=0&sync_timestamp=1604315662384&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fthrottle-debounce%2Fdownload%2Fthrottle-debounce-2.3.0.tgz", + "integrity": "sha1-/TGGXmZQIHHkEYF+JBRls+nDcuI=", + "dev": true + }, + "tiny-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", + "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==" + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npm.taobao.org/to-fast-properties/download/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npm.taobao.org/to-regex-range/download/to-regex-range-5.0.1.tgz", + "integrity": "sha1-FkjESq58jZiKMmAY7XL1tN0DkuQ=", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "trim-newlines": { + "version": "3.0.1", + "resolved": "https://registry.nlark.com/trim-newlines/download/trim-newlines-3.0.1.tgz?cache=0&sync_timestamp=1623341614526&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftrim-newlines%2Fdownload%2Ftrim-newlines-3.0.1.tgz", + "integrity": "sha1-Jgpdli2LdSQlsy86fbDcrNF2wUQ=", + "dev": true + }, + "trough": { + "version": "1.0.5", + "resolved": "https://registry.nlark.com/trough/download/trough-1.0.5.tgz", + "integrity": "sha1-uLY5zvrX0LsqvTfUM/+Ck++l9AY=", + "dev": true + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.nlark.com/tslib/download/tslib-1.14.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftslib%2Fdownload%2Ftslib-1.14.1.tgz", + "integrity": "sha1-zy04vcNKE0vK8QkcQfZhni9nLQA=", + "dev": true + }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npm.taobao.org/tsutils/download/tsutils-3.21.0.tgz?cache=0&sync_timestamp=1615138637708&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftsutils%2Fdownload%2Ftsutils-3.21.0.tgz", + "integrity": "sha1-tIcX05TOpsHglpg+7Vjp1hcVtiM=", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npm.taobao.org/type-check/download/type-check-0.4.0.tgz", + "integrity": "sha1-B7ggO/pwVsBlcFDjzNLDdzC6uPE=", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.nlark.com/type-fest/download/type-fest-0.20.2.tgz", + "integrity": "sha1-G/IH9LKPkVg2ZstfvTJ4hzAc1fQ=", + "dev": true + }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npm.taobao.org/typedarray-to-buffer/download/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha1-qX7nqf9CaRufeD/xvFES/j/KkIA=", + "dev": true, + "requires": { + "is-typedarray": "^1.0.0" + } + }, + "typescript": { + "version": "4.3.4", + "resolved": "https://registry.nlark.com/typescript/download/typescript-4.3.4.tgz", + "integrity": "sha1-P4W5hpRbzzEHHezdls+L+mX53Lw=", + "dev": true + }, + "unified": { + "version": "9.2.1", + "resolved": "https://registry.npm.taobao.org/unified/download/unified-9.2.1.tgz?cache=0&sync_timestamp=1614242914877&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Funified%2Fdownload%2Funified-9.2.1.tgz", + "integrity": "sha1-rhjVZ0wRQCG/299zhlymD0ECFaM=", + "dev": true, + "requires": { + "bail": "^1.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^2.0.0", + "trough": "^1.0.0", + "vfile": "^4.0.0" + } + }, + "unist-util-find-all-after": { + "version": "3.0.2", + "resolved": "https://registry.nlark.com/unist-util-find-all-after/download/unist-util-find-all-after-3.0.2.tgz", + "integrity": "sha1-/f7NFMW3rqXp7zjV4NX3dO61YfY=", + "dev": true, + "requires": { + "unist-util-is": "^4.0.0" + } + }, + "unist-util-is": { + "version": "4.1.0", + "resolved": "https://registry.nlark.com/unist-util-is/download/unist-util-is-4.1.0.tgz", + "integrity": "sha1-l25fRip6Xec9lLcGusG5BnG1d5c=", + "dev": true + }, + "unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npm.taobao.org/unist-util-stringify-position/download/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha1-zOO/oc34W6c3XR1bF73Eytqb2do=", + "dev": true, + "requires": { + "@types/unist": "^2.0.2" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npm.taobao.org/unpipe/download/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, + "upper-case": { + "version": "2.0.2", + "resolved": "https://registry.npm.taobao.org/upper-case/download/upper-case-2.0.2.tgz", + "integrity": "sha1-2JgQgj+qsd8VSbfZenb4Ziuub3o=", + "dev": true, + "requires": { + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.nlark.com/tslib/download/tslib-2.3.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftslib%2Fdownload%2Ftslib-2.3.0.tgz", + "integrity": "sha1-gDuM2rPhK6WBpMpByIObuw2ssJ4=", + "dev": true + } + } + }, + "upper-case-first": { + "version": "2.0.2", + "resolved": "https://registry.npm.taobao.org/upper-case-first/download/upper-case-first-2.0.2.tgz", + "integrity": "sha1-mSwyc/iCq9GdHgKJTMFHEX+EQyQ=", + "dev": true, + "requires": { + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.nlark.com/tslib/download/tslib-2.3.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftslib%2Fdownload%2Ftslib-2.3.0.tgz", + "integrity": "sha1-gDuM2rPhK6WBpMpByIObuw2ssJ4=", + "dev": true + } + } + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npm.taobao.org/uri-js/download/uri-js-4.4.1.tgz?cache=0&sync_timestamp=1610237756396&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Furi-js%2Fdownload%2Furi-js-4.4.1.tgz", + "integrity": "sha1-mxpSWVIlhZ5V9mnZKPiMbFfyp34=", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npm.taobao.org/util-deprecate/download/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npm.taobao.org/utils-merge/download/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true + }, + "v-viewer": { + "version": "1.6.4", + "resolved": "https://registry.nlark.com/v-viewer/download/v-viewer-1.6.4.tgz", + "integrity": "sha1-OeNrU0uqs0B2+4FnBManNN4Nxy8=", + "dev": true, + "requires": { + "throttle-debounce": "^2.0.1", + "viewerjs": "^1.5.0" + } + }, + "v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npm.taobao.org/v8-compile-cache/download/v8-compile-cache-2.3.0.tgz", + "integrity": "sha1-LeGWGMZtwkfc+2+ZM4A12CRaLO4=", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npm.taobao.org/validate-npm-package-license/download/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha1-/JH2uce6FchX9MssXe/uw51PQQo=", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "vfile": { + "version": "4.2.1", + "resolved": "https://registry.nlark.com/vfile/download/vfile-4.2.1.tgz?cache=0&sync_timestamp=1620239829054&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fvfile%2Fdownload%2Fvfile-4.2.1.tgz", + "integrity": "sha1-A/Hc4o/GJcYlvGUUNQ+9sA+p5iQ=", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^2.0.0", + "vfile-message": "^2.0.0" + } + }, + "vfile-message": { + "version": "2.0.4", + "resolved": "https://registry.nlark.com/vfile-message/download/vfile-message-2.0.4.tgz?cache=0&sync_timestamp=1620225355335&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fvfile-message%2Fdownload%2Fvfile-message-2.0.4.tgz", + "integrity": "sha1-W0O4gXHUCerlhHfRPyPdQdUsNxo=", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + } + }, + "viewerjs": { + "version": "1.10.1", + "resolved": "https://registry.nlark.com/viewerjs/download/viewerjs-1.10.1.tgz", + "integrity": "sha1-B0me0EPQop4wArkPVcWyKL0adCw=", + "dev": true + }, + "vite": { + "version": "2.4.4", + "resolved": "https://registry.nlark.com/vite/download/vite-2.4.4.tgz", + "integrity": "sha1-jEAqB61F8Wj261Qovq048+Q2Pkc=", + "dev": true, + "requires": { + "esbuild": "^0.12.8", + "fsevents": "~2.3.2", + "postcss": "^8.3.6", + "resolve": "^1.20.0", + "rollup": "^2.38.5" + } + }, + "vite-plugin-mock": { + "version": "2.9.4", + "resolved": "https://registry.nlark.com/vite-plugin-mock/download/vite-plugin-mock-2.9.4.tgz", + "integrity": "sha1-DXOfwbL/Pzg/I6viuQbayiiVkJ0=", + "dev": true, + "requires": { + "@rollup/plugin-node-resolve": "^13.0.2", + "@types/mockjs": "^1.0.4", + "chalk": "^4.1.1", + "chokidar": "^3.5.2", + "connect": "^3.7.0", + "debug": "^4.3.2", + "esbuild": "0.11.3", + "fast-glob": "^3.2.7", + "path-to-regexp": "^6.2.0" + }, + "dependencies": { + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npm.taobao.org/debug/download/debug-4.3.2.tgz?cache=0&sync_timestamp=1607566512593&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-4.3.2.tgz", + "integrity": "sha1-8KScGKyHeeMdSgxgKd+3aHPHQos=", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "esbuild": { + "version": "0.11.3", + "resolved": "https://registry.nlark.com/esbuild/download/esbuild-0.11.3.tgz", + "integrity": "sha1-tXFluQe+T/umUfZFBTjOjYwdXrA=", + "dev": true + } + } + }, + "vite-plugin-style-import": { + "version": "1.1.1", + "resolved": "https://registry.nlark.com/vite-plugin-style-import/download/vite-plugin-style-import-1.1.1.tgz", + "integrity": "sha1-fM67BCvOlO6y9pXHM5NUotrEjCU=", + "dev": true, + "requires": { + "@rollup/pluginutils": "^4.1.1", + "change-case": "^4.1.2", + "debug": "^4.3.2", + "es-module-lexer": "^0.7.1", + "magic-string": "^0.25.7" + }, + "dependencies": { + "@rollup/pluginutils": { + "version": "4.1.1", + "resolved": "https://registry.nlark.com/@rollup/pluginutils/download/@rollup/pluginutils-4.1.1.tgz", + "integrity": "sha1-HU2obdTt7RVlalfZM/2iuaCNR+w=", + "dev": true, + "requires": { + "estree-walker": "^2.0.1", + "picomatch": "^2.2.2" + } + }, + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npm.taobao.org/debug/download/debug-4.3.2.tgz?cache=0&sync_timestamp=1607566512593&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-4.3.2.tgz", + "integrity": "sha1-8KScGKyHeeMdSgxgKd+3aHPHQos=", + "dev": true, + "requires": { + "ms": "2.1.2" + } + } + } + }, + "vue": { + "version": "3.2.1", + "resolved": "https://registry.nlark.com/vue/download/vue-3.2.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fvue%2Fdownload%2Fvue-3.2.1.tgz", + "integrity": "sha1-MN3hUvL9rQZp6phU1akKAO+Wl0s=", + "requires": { + "@vue/compiler-dom": "3.2.1", + "@vue/runtime-dom": "3.2.1", + "@vue/shared": "3.2.1" + } + }, + "vue-eslint-parser": { + "version": "7.10.0", + "resolved": "https://registry.nlark.com/vue-eslint-parser/download/vue-eslint-parser-7.10.0.tgz?cache=0&sync_timestamp=1627452620913&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fvue-eslint-parser%2Fdownload%2Fvue-eslint-parser-7.10.0.tgz", + "integrity": "sha1-6k5LEP0QqjXIp5rHg0iNirzSm+g=", + "dev": true, + "requires": { + "debug": "^4.1.1", + "eslint-scope": "^5.1.1", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.2.1", + "esquery": "^1.4.0", + "lodash": "^4.17.21", + "semver": "^6.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.nlark.com/eslint-visitor-keys/download/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha1-MOvR73wv3/AcOk8VEESvJfqwUj4=", + "dev": true + }, + "espree": { + "version": "6.2.1", + "resolved": "https://registry.nlark.com/espree/download/espree-6.2.1.tgz", + "integrity": "sha1-d/xy4f10SiBSwg84pbV1gy6Cc0o=", + "dev": true, + "requires": { + "acorn": "^7.1.1", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.1.0" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1616463550093&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz", + "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=", + "dev": true + } + } + }, + "vue-i18n": { + "version": "9.1.6", + "resolved": "https://registry.nlark.com/vue-i18n/download/vue-i18n-9.1.6.tgz", + "integrity": "sha1-TPmS4q7FRYvBk2mXPJbqfQ9WAyE=", + "requires": { + "@intlify/core-base": "9.1.6", + "@intlify/shared": "9.1.6", + "@intlify/vue-devtools": "9.1.6", + "@vue/devtools-api": "^6.0.0-beta.7" + } + }, + "vue-router": { + "version": "4.0.10", + "resolved": "https://registry.nlark.com/vue-router/download/vue-router-4.0.10.tgz", + "integrity": "sha1-7I/aAylJsqMdMnMXD483bobrUqw=", + "requires": { + "@vue/devtools-api": "^6.0.0-beta.14" + } + }, + "vue-types": { + "version": "3.0.2", + "resolved": "https://registry.nlark.com/vue-types/download/vue-types-3.0.2.tgz", + "integrity": "sha1-7BbgXUEsA4Ji/B76TOuWR+f7YB0=", + "requires": { + "is-plain-object": "3.0.1" + } + }, + "warning": { + "version": "4.0.3", + "resolved": "https://registry.npm.taobao.org/warning/download/warning-4.0.3.tgz", + "integrity": "sha1-Fungd+uKhtavfWSqHgX9hbRnjKM=", + "requires": { + "loose-envify": "^1.0.0" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npm.taobao.org/which/download/which-2.0.2.tgz?cache=0&sync_timestamp=1574116262707&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwhich%2Fdownload%2Fwhich-2.0.2.tgz", + "integrity": "sha1-fGqN0KY2oDJ+ELWckobu6T8/UbE=", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npm.taobao.org/word-wrap/download/word-wrap-1.2.3.tgz", + "integrity": "sha1-YQY29rH3A4kb00dxzLF/uTtHB5w=", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.nlark.com/wrappy/download/wrappy-1.0.2.tgz?cache=0&sync_timestamp=1619133505879&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fwrappy%2Fdownload%2Fwrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npm.taobao.org/write-file-atomic/download/write-file-atomic-3.0.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwrite-file-atomic%2Fdownload%2Fwrite-file-atomic-3.0.3.tgz", + "integrity": "sha1-Vr1cWlxwSBzRnFcb05q5ZaXeVug=", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-3.1.1.tgz", + "integrity": "sha1-27fa+b/YusmrRev2ArjLrQ1dCP0=", + "dev": true + }, + "yaml": { + "version": "1.10.2", + "resolved": "https://registry.nlark.com/yaml/download/yaml-1.10.2.tgz?cache=0&sync_timestamp=1623654032636&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fyaml%2Fdownload%2Fyaml-1.10.2.tgz", + "integrity": "sha1-IwHF/78StGfejaIzOkWeKeeSDks=", + "dev": true + }, + "yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.nlark.com/yargs-parser/download/yargs-parser-20.2.9.tgz?cache=0&sync_timestamp=1624233275366&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fyargs-parser%2Fdownload%2Fyargs-parser-20.2.9.tgz", + "integrity": "sha1-LrfcOwKJcY/ClfNidThFxBoMlO4=", + "dev": true + }, + "zrender": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.1.1.tgz", + "integrity": "sha512-oeWlmUZPQdS9f5hK4pV21tHPqA3wgQ7CkKkw7l0CCBgWlJ/FP+lRgLFtUBW6yam4JX8y9CdHJo1o587VVrbcoQ==", + "requires": { + "tslib": "2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" + } + } + }, + "zwitch": { + "version": "1.0.5", + "resolved": "https://registry.nlark.com/zwitch/download/zwitch-1.0.5.tgz", + "integrity": "sha1-0R1zgf/tFrdC9q97PyI9XNn+mSA=", + "dev": true + } + } +} diff --git a/admin-web/typescript-ant-design-vue/package.json b/admin-web/typescript-ant-design-vue/package.json new file mode 100644 index 00000000..018b40a9 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/package.json @@ -0,0 +1,68 @@ +{ + "version": "0.0.0", + "author": { + "name": "1024lab", + "email": "1024lab@sina.com", + "url": "https://1024lab.net" + }, + "license": "MIT", + "homepage": "https://smartadmin.1024lab.net", + "scripts": { + "dev": "vite", + "sit": "vite build --base=/manage/ --mode sit", + "localhost": "vite --mode localhost", + "build": "vue-tsc --noEmit && vite build", + "serve": "vite preview" + }, + "dependencies": { + "@types/js-cookie": "^2.2.7", + "ant-design-vue": "2.2.4", + "axios": "^0.21.1", + "clipboard": "^2.0.8", + "crypto-js": "^4.0.0", + "echarts": "^5.1.2", + "js-cookie": "^2.2.1", + "mitt": "^3.0.0", + "moment": "2.29.1", + "nprogress": "^0.2.0", + "pinia": "^2.0.0-beta.3", + "vue": "^3.2.1", + "vue-i18n": "9.1.6", + "vue-router": "^4.0.10" + }, + "devDependencies": { + "@types/nprogress": "^0.2.0", + "@typescript-eslint/eslint-plugin": "^4.28.0", + "@typescript-eslint/parser": "^4.28.0", + "@vitejs/plugin-legacy": "^1.5.1", + "@vitejs/plugin-vue": "^1.4.0", + "@vue/compiler-sfc": "^3.2.1", + "dotenv": "^10.0.0", + "eslint": "^7.29.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-prettier": "^3.4.0", + "eslint-plugin-vue": "^7.16.0", + "less": "^4.1.1", + "less-loader": "^10.0.1", + "postcss": "^8.3.5", + "prettier": "^2.3.1", + "rimraf": "^3.0.2", + "stylelint": "^13.13.1", + "stylelint-config-prettier": "^8.0.2", + "stylelint-config-standard": "^22.0.0", + "stylelint-order": "^4.1.0", + "typescript": "^4.3.4", + "v-viewer": "^1.5.1", + "vite": "^2.4.4", + "vite-plugin-mock": "^2.9.4", + "vite-plugin-style-import": "^1.1.1", + "vue-eslint-parser": "^7.10.0" + }, + "engines": { + "node": ">=12" + }, + "repository": { + "type": "git", + "url": "https://github.com/1024-lab/smart-admin.git" + } +} diff --git a/smart-admin-web/.postcssrc.js b/admin-web/typescript-ant-design-vue/postcss.config.js similarity index 51% rename from smart-admin-web/.postcssrc.js rename to admin-web/typescript-ant-design-vue/postcss.config.js index 961986e2..a47ef4f9 100644 --- a/smart-admin-web/.postcssrc.js +++ b/admin-web/typescript-ant-design-vue/postcss.config.js @@ -1,5 +1,5 @@ module.exports = { plugins: { - autoprefixer: {} - } -} + autoprefixer: {}, + }, +}; diff --git a/smart-admin-h5/public/favicon.ico b/admin-web/typescript-ant-design-vue/public/favicon.ico similarity index 100% rename from smart-admin-h5/public/favicon.ico rename to admin-web/typescript-ant-design-vue/public/favicon.ico diff --git a/admin-web/typescript-ant-design-vue/public/images/1024lab-gzh.jpg b/admin-web/typescript-ant-design-vue/public/images/1024lab-gzh.jpg new file mode 100644 index 00000000..d6b03f53 Binary files /dev/null and b/admin-web/typescript-ant-design-vue/public/images/1024lab-gzh.jpg differ diff --git a/admin-web/typescript-ant-design-vue/public/images/ali-icon.png b/admin-web/typescript-ant-design-vue/public/images/ali-icon.png new file mode 100644 index 00000000..fe141241 Binary files /dev/null and b/admin-web/typescript-ant-design-vue/public/images/ali-icon.png differ diff --git a/admin-web/typescript-ant-design-vue/public/images/google-icon.png b/admin-web/typescript-ant-design-vue/public/images/google-icon.png new file mode 100644 index 00000000..4bc6e4b0 Binary files /dev/null and b/admin-web/typescript-ant-design-vue/public/images/google-icon.png differ diff --git a/admin-web/typescript-ant-design-vue/public/images/login-bg.png b/admin-web/typescript-ant-design-vue/public/images/login-bg.png new file mode 100644 index 00000000..469c2da9 Binary files /dev/null and b/admin-web/typescript-ant-design-vue/public/images/login-bg.png differ diff --git a/admin-web/typescript-ant-design-vue/public/images/login-form-open-eyes-close.png b/admin-web/typescript-ant-design-vue/public/images/login-form-open-eyes-close.png new file mode 100644 index 00000000..89f85301 Binary files /dev/null and b/admin-web/typescript-ant-design-vue/public/images/login-form-open-eyes-close.png differ diff --git a/admin-web/typescript-ant-design-vue/public/images/login-form-open-eyes.png b/admin-web/typescript-ant-design-vue/public/images/login-form-open-eyes.png new file mode 100644 index 00000000..f8eb3d70 Binary files /dev/null and b/admin-web/typescript-ant-design-vue/public/images/login-form-open-eyes.png differ diff --git a/admin-web/typescript-ant-design-vue/public/images/login-person.png b/admin-web/typescript-ant-design-vue/public/images/login-person.png new file mode 100644 index 00000000..c845a7a5 Binary files /dev/null and b/admin-web/typescript-ant-design-vue/public/images/login-person.png differ diff --git a/admin-web/typescript-ant-design-vue/public/images/login-qr.png b/admin-web/typescript-ant-design-vue/public/images/login-qr.png new file mode 100644 index 00000000..9f002819 Binary files /dev/null and b/admin-web/typescript-ant-design-vue/public/images/login-qr.png differ diff --git a/smart-admin-web/src/assets/images/logo-min.png b/admin-web/typescript-ant-design-vue/public/images/logo-min.png similarity index 100% rename from smart-admin-web/src/assets/images/logo-min.png rename to admin-web/typescript-ant-design-vue/public/images/logo-min.png diff --git a/admin-web/typescript-ant-design-vue/public/images/logo.png b/admin-web/typescript-ant-design-vue/public/images/logo.png new file mode 100644 index 00000000..9b11579e Binary files /dev/null and b/admin-web/typescript-ant-design-vue/public/images/logo.png differ diff --git a/admin-web/typescript-ant-design-vue/public/images/qq-icon.png b/admin-web/typescript-ant-design-vue/public/images/qq-icon.png new file mode 100644 index 00000000..87cefd14 Binary files /dev/null and b/admin-web/typescript-ant-design-vue/public/images/qq-icon.png differ diff --git a/admin-web/typescript-ant-design-vue/public/images/wechat-icon.png b/admin-web/typescript-ant-design-vue/public/images/wechat-icon.png new file mode 100644 index 00000000..23a41d6e Binary files /dev/null and b/admin-web/typescript-ant-design-vue/public/images/wechat-icon.png differ diff --git a/admin-web/typescript-ant-design-vue/public/images/weibo-icon.png b/admin-web/typescript-ant-design-vue/public/images/weibo-icon.png new file mode 100644 index 00000000..1babf8ed Binary files /dev/null and b/admin-web/typescript-ant-design-vue/public/images/weibo-icon.png differ diff --git a/admin-web/typescript-ant-design-vue/src/App.vue b/admin-web/typescript-ant-design-vue/src/App.vue new file mode 100644 index 00000000..6de3cc75 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/App.vue @@ -0,0 +1,50 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/api/base-model/page-param-model.ts b/admin-web/typescript-ant-design-vue/src/api/base-model/page-param-model.ts new file mode 100644 index 00000000..434fb682 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/base-model/page-param-model.ts @@ -0,0 +1,35 @@ +/* + * @Description: 分页查询你参数 + * @Author: zhuoda + * @Date: 2021-08-12 + * @LastEditTime: 2021-08-14 + * @LastEditors: zhuoda + */ +import { SortItemModel } from './sort-item-model'; + +/** + * + * @export + * @interface PageResultDto + */ +export interface PageParamModel { + /** + * 页码(不能为空) + * @type {number} + * @memberof ClueUserQueryForm + */ + pageNum: number; + /** + * 每页数量(不能为空) + * @type {number} + * @memberof ClueUserQueryForm + */ + pageSize: number; + + /** + * 排序字段集合 + * @type {Array} + * @memberof ClueUserQueryForm + */ + sortItemList?: Array; +} diff --git a/admin-web/typescript-ant-design-vue/src/api/base-model/page-result-model.ts b/admin-web/typescript-ant-design-vue/src/api/base-model/page-result-model.ts new file mode 100644 index 00000000..7f145710 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/base-model/page-result-model.ts @@ -0,0 +1,50 @@ +/* + * @Description: + * @Author: zhuoda + * @Date: 2021-08-11 18:12:07 + * @LastEditTime: 2021-08-12 15:11:54 + * @LastEditors: zhuoda + */ +/** + * + * @export + * @interface PageResultModel + */ +export interface PageResultModel { + /** + * 是否为空 + * @type {boolean} + * @memberof PageResultModel + */ + emptyFlag?: boolean; + /** + * 结果集 + * @type {Array} + * @memberof PageResultModel + */ + list: Array; + /** + * 当前页 + * @type {number} + * @memberof PageResultModel + */ + pageNum?: number; + /** + * 每页的数量 + * @type {number} + * @memberof PageResultModel + */ + pageSize?: number; + /** + * 总页数 + * @type {number} + * @memberof PageResultModel + */ + pages?: number; + /** + * 总记录数 + * @type {number} + * @memberof PageResultModel + */ + total: number; +} diff --git a/admin-web/typescript-ant-design-vue/src/api/base-model/response-model.ts b/admin-web/typescript-ant-design-vue/src/api/base-model/response-model.ts new file mode 100644 index 00000000..19ee2f8d --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/base-model/response-model.ts @@ -0,0 +1,30 @@ + +/** + * + */ +export interface ResponseModel { + /** + * + * @type {number} + * @memberof ResponseDtoOfLoginDetailVo + */ + code: number; + /** + * + * @type {LoginDetailVo} + * @memberof ResponseDtoOfLoginDetailVo + */ + data: T; + /** + * + * @type {string} + * @memberof ResponseDtoOfLoginDetailVo + */ + msg?: string; + /** + * + * @type {boolean} + * @memberof ResponseDtoOfLoginDetailVo + */ + success: boolean; +} \ No newline at end of file diff --git a/admin-web/typescript-ant-design-vue/src/api/base-model/sort-item-model.ts b/admin-web/typescript-ant-design-vue/src/api/base-model/sort-item-model.ts new file mode 100644 index 00000000..a2795f38 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/base-model/sort-item-model.ts @@ -0,0 +1,24 @@ +/* + * @Description: + * @Author: zhuoda + * @Date: 2021-08-11 + * @LastEditTime: 2021-08-14 + * @LastEditors: zhuoda + */ +/** + * + */ +export interface SortItemModel { + /** + * + * @type {boolean} + * @memberof SortItemModel + */ + asc: boolean; + /** + * + * @type {string} + * @memberof SortItemModel + */ + column: string; +} diff --git a/admin-web/typescript-ant-design-vue/src/api/business/category/category-api.ts b/admin-web/typescript-ant-design-vue/src/api/business/category/category-api.ts new file mode 100644 index 00000000..496346d3 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/business/category/category-api.ts @@ -0,0 +1,38 @@ +/* + * @Description: + * @Author: zhuoda + * @Date: 2021-08-12 16:46:21 + * @LastEditTime: 2021-08-12 16:47:04 + * @LastEditors: zhuoda + */ +import { ResponseModel } from '../../base-model/response-model'; +import { CategoryAddForm } from './model/category-add-form'; +import { CategoryTreeQueryForm } from './model/category-tree-query-form'; +import { CategoryTreeVo } from './model/category-tree-vo'; +import { CategoryUpdateForm } from './model/category-update-form'; +import { getRequest, postRequest } from '/@/lib/axios'; + +export const categoryApi = { + // 添加类目 by zhuoda + addCategory: (param: CategoryAddForm) => { + return postRequest>('/category/add', param); + }, + // GET + // 删除类目 by zhuoda + deleteCategoryById: (categoryId: number) => { + return getRequest>(`/category/del/${categoryId}`); + }, + // 查询类目层级树 by zhuoda + queryCategoryTree: (param: CategoryTreeQueryForm) => { + return postRequest>('/category/tree', param); + }, + // 更新类目 by zhuoda + updateCategory: (param: CategoryUpdateForm) => { + return postRequest>('/category/update', param); + }, + // 查询类目详情 by zhuoda + getCategory: (categoryId: number) => { + // POST /admin/clue/user/track/add + return getRequest>(`/category/${categoryId}`); + }, +}; diff --git a/admin-web/typescript-ant-design-vue/src/api/business/category/model/category-add-form.ts b/admin-web/typescript-ant-design-vue/src/api/business/category/model/category-add-form.ts new file mode 100644 index 00000000..d7d54765 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/business/category/model/category-add-form.ts @@ -0,0 +1,43 @@ +/** + * + * @export + * @interface CategoryAddDto + */ +export interface CategoryAddForm { + /** + * 类目名称 + * @type {string} + * @memberof CategoryAddDto + */ + categoryName: string; + /** + * 分类类型:
export const
CATEGORY_TYPE_ENUM =

+ * @type {number} + * @memberof CategoryAddDto + */ + categoryType: number; + /** + * 禁用状态 + * @type {boolean} + * @memberof CategoryAddDto + */ + disabledFlag?: boolean; + /** + * 父级类目id|可选 + * @type {number} + * @memberof CategoryAddDto + */ + parentId?: number; + /** + * 备注|可选 + * @type {string} + * @memberof CategoryAddDto + */ + remark?: string; + /** + * 排序|可选 + * @type {number} + * @memberof CategoryAddDto + */ + sort?: number; +} diff --git a/admin-web/typescript-ant-design-vue/src/api/business/category/model/category-tree-query-form.ts b/admin-web/typescript-ant-design-vue/src/api/business/category/model/category-tree-query-form.ts new file mode 100644 index 00000000..3fae312f --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/business/category/model/category-tree-query-form.ts @@ -0,0 +1,19 @@ +/** + * + * @export + * @interface CategoryTreeQueryDto + */ +export interface CategoryTreeQueryForm { + /** + * 分类类型|可选:
export const
CATEGORY_TYPE_ENUM
+ * @type {number} + * @memberof CategoryTreeQueryDto + */ + categoryType: number; + /** + * 父级类目id|可选 + * @type {number} + * @memberof CategoryTreeQueryDto + */ + parentId?: number; +} \ No newline at end of file diff --git a/admin-web/typescript-ant-design-vue/src/api/business/category/model/category-tree-vo.ts b/admin-web/typescript-ant-design-vue/src/api/business/category/model/category-tree-vo.ts new file mode 100644 index 00000000..31f058d7 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/business/category/model/category-tree-vo.ts @@ -0,0 +1,49 @@ +/** + * + * @export + * @interface CategoryTreeVo + */ +export interface CategoryTreeVo { + /** + * 类目层级全称 + * @type {string} + * @memberof CategoryTreeVo + */ + categoryFullName?: string; + /** + * 类目id + * @type {number} + * @memberof CategoryTreeVo + */ + categoryId?: number; + /** + * 类目名称 + * @type {string} + * @memberof CategoryTreeVo + */ + categoryName?: string; + /** + * 子类 + * @type {Array} + * @memberof CategoryTreeVo + */ + children?: Array; + /** + * 类目名称 + * @type {string} + * @memberof CategoryTreeVo + */ + label?: string; + /** + * 父级id + * @type {number} + * @memberof CategoryTreeVo + */ + parentId?: number; + /** + * 类目id + * @type {number} + * @memberof CategoryTreeVo + */ + value?: number; +} diff --git a/admin-web/typescript-ant-design-vue/src/api/business/category/model/category-update-form.ts b/admin-web/typescript-ant-design-vue/src/api/business/category/model/category-update-form.ts new file mode 100644 index 00000000..444a5777 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/business/category/model/category-update-form.ts @@ -0,0 +1,49 @@ +/** + * + * @export + * @interface CategoryUpdateDto + */ +export interface CategoryUpdateForm { + /** + * 类目id + * @type {number} + * @memberof CategoryUpdateDto + */ + categoryId?: number; + /** + * 类目名称 + * @type {string} + * @memberof CategoryUpdateDto + */ + categoryName: string; + /** + * 分类类型:
export const
CATEGORY_TYPE_ENUM
+ * @type {number} + * @memberof CategoryUpdateDto + */ + categoryType: number; + /** + * 禁用状态 + * @type {boolean} + * @memberof CategoryUpdateDto + */ + disabledFlag?: boolean; + /** + * 父级类目id|可选 + * @type {number} + * @memberof CategoryUpdateDto + */ + parentId?: number; + /** + * 备注|可选 + * @type {string} + * @memberof CategoryUpdateDto + */ + remark?: string; + /** + * 排序|可选 + * @type {number} + * @memberof CategoryUpdateDto + */ + sort?: number; +} diff --git a/admin-web/typescript-ant-design-vue/src/api/business/category/model/category-vo.ts b/admin-web/typescript-ant-design-vue/src/api/business/category/model/category-vo.ts new file mode 100644 index 00000000..f6dedc29 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/business/category/model/category-vo.ts @@ -0,0 +1,61 @@ +/** + * + * @export + * @interface CategoryVo + */ +export interface CategoryVo { + /** + * 类目id + * @type {number} + * @memberof CategoryVo + */ + categoryId?: number; + /** + * 类目名称 + * @type {string} + * @memberof CategoryVo + */ + categoryName: string; + /** + * 分类类型:
export const
CATEGORY_TYPE_ENUM
+ * @type {number} + * @memberof CategoryVo + */ + categoryType: number; + /** + * + * @type {Date} + * @memberof CategoryVo + */ + createTime?: Date; + /** + * 禁用状态 + * @type {boolean} + * @memberof CategoryVo + */ + disabledFlag?: boolean; + /** + * 父级类目id|可选 + * @type {number} + * @memberof CategoryVo + */ + parentId?: number; + /** + * 备注|可选 + * @type {string} + * @memberof CategoryVo + */ + remark?: string; + /** + * 排序|可选 + * @type {number} + * @memberof CategoryVo + */ + sort?: number; + /** + * + * @type {Date} + * @memberof CategoryVo + */ + updateTime?: Date; +} diff --git a/admin-web/typescript-ant-design-vue/src/api/business/file/file-api.ts b/admin-web/typescript-ant-design-vue/src/api/business/file/file-api.ts new file mode 100644 index 00000000..5195ae3f --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/business/file/file-api.ts @@ -0,0 +1,19 @@ +/* + * @Description: + * @version: + * @Author: zhuoda + * @Date: 2021-08-17 23:32:36 + * @LastEditors: zhuoda + * @LastEditTime: 2021-08-18 14:35:52 + */ +import { ResponseModel } from '../../base-model/response-model'; +import { FileUploadVo } from './model/file-upload-vo'; +import { postRequest } from '/@/lib/axios'; + +export const fileApi = { + // 文件上传 by zhuoda + uploadUrl: '/file/upload', + uploadFile: (param: any, folder: number) => { + return postRequest>(`/file/upload?folder=${folder}`, param); + }, +}; diff --git a/admin-web/typescript-ant-design-vue/src/api/business/file/model/file-upload-vo.ts b/admin-web/typescript-ant-design-vue/src/api/business/file/model/file-upload-vo.ts new file mode 100644 index 00000000..17eb9674 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/business/file/model/file-upload-vo.ts @@ -0,0 +1,38 @@ +/* + * @Description: + * @version: + * @Author: zhuoda + * @Date: 2021-08-18 10:41:31 + * @LastEditors: zhuoda + * @LastEditTime: 2021-08-18 18:02:18 + */ +export interface FileUploadVo { + /** + * 文件id + */ + fileId?: number; + /** + * fileKey + */ + fileKey: string; + /** + * 文件名称 + */ + fileName?: string; + /** + * 文件大小 + */ + fileSize?: number; + /** + * 文件类型 + */ + fileType?: string; + /** + * fileUrl + */ + fileUrl?: string; + /** + * 自定义的url用于文件上传的展示 + */ + url?: string; +} diff --git a/admin-web/typescript-ant-design-vue/src/api/business/goods/goods-api.ts b/admin-web/typescript-ant-design-vue/src/api/business/goods/goods-api.ts new file mode 100644 index 00000000..b773fe20 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/business/goods/goods-api.ts @@ -0,0 +1,30 @@ +import { postRequest } from '/@/lib/axios'; +import { ResponseModel } from '/@/api/base-model/response-model'; +import {GoodsAddForm} from "./model/goods-add-form"; +import {GoodsDelDto} from "./model/goods-del-dto"; +import {GoodsQueryDto} from "./model/goods-query-dto"; +import { GoodsUpdateForm } from './model/goods-update-form'; +import { GoodsAdminVo } from './model/goods-admin-vo'; +import { PageResultModel } from '../../base-model/page-result-model'; + +export const goodsApi = { + // 添加商品 by zhuoda + addGoods: (param: GoodsAddForm) => { + return postRequest>('/goods/add', param); + }, + // POST /admin/goods/del + // 删除 by zhuoda + deleteGoods: (param: GoodsDelDto) => { + return postRequest>('/goods/del', param); + }, + // POST /admin/goods/query + // 分页查询 by zhuoda + queryGoodsList: (param: GoodsQueryDto) => { + return postRequest>>('/goods/query', param); + }, + // POST /admin/goods/update + // 更新商品 by zhuoda + updateGoods: (param: GoodsUpdateForm) => { + return postRequest>('/goods/update', param); + } +}; diff --git a/admin-web/typescript-ant-design-vue/src/api/business/goods/model/goods-add-form.ts b/admin-web/typescript-ant-design-vue/src/api/business/goods/model/goods-add-form.ts new file mode 100644 index 00000000..e554c81f --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/business/goods/model/goods-add-form.ts @@ -0,0 +1,67 @@ +/** + * + * @export + * @interface GoodsAddDto + */ +export interface GoodsAddForm { + /** + * 商品分类 + * @type {number} + * @memberof GoodsAddDto + */ + categoryId?: number; + /** + * 商品封面 + * @type {string} + * @memberof GoodsAddDto + */ + coverPic?: string; + /** + * 商品简介 + * @type {string} + * @memberof GoodsAddDto + */ + goodsIntro?: string; + /** + * 商品名称 + * @type {string} + * @memberof GoodsAddDto + */ + goodsName?: string; + /** + * 商品类型|可选:
export const
GOODS_TYPE_ENUM
+ * @type {number} + * @memberof GoodsAddDto + */ + goodsType?: number; + /** + * 商品分组:
export const
GOODS_GROUP_TYPE_ENUM =
+ * @type {number} + * @memberof GoodsAddDto + */ + groupType?: number; + /** + * 商品价格 + * @type {number} + * @memberof GoodsAddDto + */ + price?: number; + /** + * 上架状态 + * @type {boolean} + * @memberof GoodsAddDto + */ + shelvesFlag?: boolean; + /** + * 第三方商品id|可选 + * @type {number} + * @memberof GoodsAddDto + */ + thirdGoodsId?: number; + /** + * 备注|可选 + * @type {string} + * @memberof GoodsUpdateDto + */ + remark?: string; +} \ No newline at end of file diff --git a/admin-web/typescript-ant-design-vue/src/api/business/goods/model/goods-admin-vo.ts b/admin-web/typescript-ant-design-vue/src/api/business/goods/model/goods-admin-vo.ts new file mode 100644 index 00000000..300948bc --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/business/goods/model/goods-admin-vo.ts @@ -0,0 +1,93 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-12 18:10:22 + * @LastEditTime: 2021-09-01 21:25:35 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/api/business/goods/model/goods-admin-vo.ts + */ +/** + * + * @export + * @interface GoodsAdminVo + */ +export interface GoodsAdminVo { + /** + * 商品分类 + * @type {number} + * @memberof GoodsAdminVo + */ + categoryId?: number; + /** + * 商品封面 + * @type {string} + * @memberof GoodsAdminVo + */ + coverPic?: string; + /** + * + * @type {Date} + * @memberof GoodsAdminVo + */ + createTime?: Date; + /** + * 商品id + * @type {number} + * @memberof GoodsAdminVo + */ + goodsId: number; + /** + * 商品简介 + * @type {string} + * @memberof GoodsAdminVo + */ + goodsIntro?: string; + /** + * 商品名称 + * @type {string} + * @memberof GoodsAdminVo + */ + goodsName?: string; + /** + * 商品类型|可选:
export const
GOODS_TYPE_ENUM
+ * @type {number} + * @memberof GoodsAdminVo + */ + goodsType: number; + /** + * 商品分组:
export const
GOODS_GROUP_TYPE_ENUM
+ * @type {number} + * @memberof GoodsAdminVo + */ + groupType: number; + /** + * 商品价格 + * @type {number} + * @memberof GoodsAdminVo + */ + price?: number; + /** + * + * @type {string} + * @memberof GoodsAdminVo + */ + remark?: string; + /** + * 上架状态 + * @type {boolean} + * @memberof GoodsAdminVo + */ + shelvesFlag?: boolean; + /** + * 第三方商品id|可选 + * @type {number} + * @memberof GoodsAdminVo + */ + thirdGoodsId?: number; + /** + * + * @type {Date} + * @memberof GoodsAdminVo + */ + updateTime?: Date; +} \ No newline at end of file diff --git a/admin-web/typescript-ant-design-vue/src/api/business/goods/model/goods-del-dto.ts b/admin-web/typescript-ant-design-vue/src/api/business/goods/model/goods-del-dto.ts new file mode 100644 index 00000000..37ad0d3a --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/business/goods/model/goods-del-dto.ts @@ -0,0 +1,13 @@ +/** + * + * @export + * @interface GoodsDelDto + */ +export interface GoodsDelDto { + /** + * 商品id集合 + * @type {Array} + * @memberof GoodsDelDto + */ + goodsIdList?: Array; +} \ No newline at end of file diff --git a/admin-web/typescript-ant-design-vue/src/api/business/goods/model/goods-query-dto.ts b/admin-web/typescript-ant-design-vue/src/api/business/goods/model/goods-query-dto.ts new file mode 100644 index 00000000..0c91f9ad --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/business/goods/model/goods-query-dto.ts @@ -0,0 +1,60 @@ +import { + SortItemModel +} from '../../../base-model/sort-item-model'; + +/** + * + * @export + * @interface GoodsQueryDto + */ +export interface GoodsQueryDto { + /** + * 商品分类 + * @type {number} + * @memberof GoodsQueryDto + */ + categoryId?: number; + /** + * 商品类型|可选:
export const
GOODS_TYPE_ENUM
+ * @type {number} + * @memberof GoodsQueryDto + */ + goodsType?: number; + /** + * 商品分组:
export const
GOODS_GROUP_TYPE_ENUM
+ * @type {number} + * @memberof GoodsQueryDto + */ + groupType?: number; + /** + * 页码(不能为空) + * @type {number} + * @memberof GoodsQueryDto + */ + pageNum: number; + /** + * 每页数量(不能为空) + * @type {number} + * @memberof GoodsQueryDto + */ + pageSize: number; + /** + * 搜索词 + * @type {string} + * @memberof GoodsQueryDto + */ + searchWord?: string; + /** + * 上架状态 + * @type {boolean} + * @memberof GoodsQueryDto + */ + shelvesFlag?: boolean | string; + /** + * 排序字段集合 + * @type {Array} + * @memberof GoodsQueryDto + */ + sortItemList?: Array; +} + diff --git a/admin-web/typescript-ant-design-vue/src/api/business/goods/model/goods-update-form.ts b/admin-web/typescript-ant-design-vue/src/api/business/goods/model/goods-update-form.ts new file mode 100644 index 00000000..c5a1dfac --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/business/goods/model/goods-update-form.ts @@ -0,0 +1,73 @@ +/** + * + * @export + * @interface GoodsUpdateDto + */ +export interface GoodsUpdateForm { + /** + * 商品分类 + * @type {number} + * @memberof GoodsUpdateDto + */ + categoryId?: number; + /** + * 商品封面 + * @type {string} + * @memberof GoodsUpdateDto + */ + coverPic?: string; + /** + * 商品id + * @type {number} + * @memberof GoodsUpdateDto + */ + goodsId?: number; + /** + * 商品简介 + * @type {string} + * @memberof GoodsUpdateDto + */ + goodsIntro?: string; + /** + * 商品名称 + * @type {string} + * @memberof GoodsUpdateDto + */ + goodsName?: string; + /** + * 商品类型|可选:
export const
GOODS_TYPE_ENUM
+ * @type {number} + * @memberof GoodsUpdateDto + */ + goodsType?: number; + /** + * 商品分组:
export const
GOODS_GROUP_TYPE_ENUM
+ * @type {number} + * @memberof GoodsUpdateDto + */ + groupType?: number; + /** + * 商品价格 + * @type {number} + * @memberof GoodsUpdateDto + */ + price?: number; + /** + * 上架状态 + * @type {boolean} + * @memberof GoodsUpdateDto + */ + shelvesFlag?: boolean; + /** + * 第三方商品id|可选 + * @type {number} + * @memberof GoodsUpdateDto + */ + thirdGoodsId?: number; + /** + * 备注|可选 + * @type {string} + * @memberof GoodsUpdateDto + */ + remark?: string; +} diff --git a/admin-web/typescript-ant-design-vue/src/api/business/goods/model/goods-vo.ts b/admin-web/typescript-ant-design-vue/src/api/business/goods/model/goods-vo.ts new file mode 100644 index 00000000..b5785e21 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/business/goods/model/goods-vo.ts @@ -0,0 +1,25 @@ +/** + * + * @export + * @interface Goods + */ +export interface GoodsVo { + /** + * 实际销售单价 + * @type {number} + * @memberof Goods + */ + actualSalePrice?: number; + /** + * 件数 + * @type {number} + * @memberof Goods + */ + count?: number; + /** + * 商品id + * @type {number} + * @memberof Goods + */ + goodsId?: number; +} diff --git a/admin-web/typescript-ant-design-vue/src/api/business/goods/model/goods.ts b/admin-web/typescript-ant-design-vue/src/api/business/goods/model/goods.ts new file mode 100644 index 00000000..04e50202 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/business/goods/model/goods.ts @@ -0,0 +1,15 @@ +export interface Goods { + /** + * 实际销售单价 + */ + actualSalePrice?: number; + /** + * 件数 + */ + count?: number; + /** + * 商品id + */ + goodsId?: number; +} + diff --git a/admin-web/typescript-ant-design-vue/src/api/system/department/department-api.ts b/admin-web/typescript-ant-design-vue/src/api/system/department/department-api.ts new file mode 100644 index 00000000..7b732da9 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/department/department-api.ts @@ -0,0 +1,66 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-12 17:56:25 + * @LastEditTime: 2021-08-16 10:45:05 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/api/system/department/department-api.ts + */ +import { ResponseModel } from '../../base-model/response-model'; +import { DepartmentCreateDto } from './model/department-create-dto'; +import { DepartmentTreeVo } from './model/department-tree-vo'; +import { DepartmentVo } from './model/department-vo'; +import { getRequest, postRequest } from '/@/lib/axios'; +export const departmentApi = { + /** + * @description: 查询部门列表 + * @param {*} + * @return {*} + */ + queryAllDepartment: (): Promise> => { + return getRequest>>('/department/listAll'); + }, + + /** + * @description: 查询部门树形列表 + * @param {*} + * @return {*} + */ + departmentTree: (): Promise> => { + return getRequest>>('/department/treeList'); + }, + + /** + * @description: 获取校区列表 by zhuoda + * @param {*} + * @return {*} + */ + querySchoolDepartmentList: (): Promise> => { + return getRequest>('/department/querySchoolList'); + }, + + /** + * @description: 添加部门 by zhuoda + * @param {*} + * @return {*} + */ + addDepartment: (param: DepartmentCreateDto) => { + return postRequest>('/department/add', param); + }, + /** + * @description: 更新部门信息 by zhuoda + * @param {*} + * @return {*} + */ + updateDepartment: (param: DepartmentCreateDto) => { + return postRequest>('/department/update', param); + }, + /** + * @description: 获取校区列表 by zhuoda + * @param {*} + * @return {*} + */ + deleteDepartment: (deptId: number) => { + return getRequest>(`/department/delete/${deptId}`); + }, +}; diff --git a/admin-web/typescript-ant-design-vue/src/api/system/department/model/department-create-dto.ts b/admin-web/typescript-ant-design-vue/src/api/system/department/model/department-create-dto.ts new file mode 100644 index 00000000..758a67ad --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/department/model/department-create-dto.ts @@ -0,0 +1,32 @@ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface DepartmentCreateDto { + /** + * 部门负责人id + */ + managerId?: number; + /** + * 部门名称 + */ + name?: string; + /** + * 上级部门id (可选) + */ + parentId?: number; + /** + * 部门简称 + */ + shortName?: string; +} + diff --git a/admin-web/typescript-ant-design-vue/src/api/system/department/model/department-simple-vo.ts b/admin-web/typescript-ant-design-vue/src/api/system/department/model/department-simple-vo.ts new file mode 100644 index 00000000..c98223eb --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/department/model/department-simple-vo.ts @@ -0,0 +1,30 @@ +/* + * @Description: + * @Author: zhuoda + * @Date: 2021-08-12 18:19:34 + * @LastEditTime: 2021-09-01 + * @LastEditors: zhuoda + */ +/** + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface DepartmentSimpleVo { + /** + * 部门id + */ + id: number; + /** + * 部门名称 + */ + name: string; + /** + * 部门简称 + */ + shortName?: string; +} diff --git a/admin-web/typescript-ant-design-vue/src/api/system/department/model/department-tree-vo.ts b/admin-web/typescript-ant-design-vue/src/api/system/department/model/department-tree-vo.ts new file mode 100644 index 00000000..382f44dc --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/department/model/department-tree-vo.ts @@ -0,0 +1,63 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-12 17:53:15 + * @LastEditTime: 2021-09-01 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/api/system/department/model/department-tree-vo.ts + */ +/** + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface DepartmentTreeVo { + /** + * 子部门 + */ + children?: Array; + /** + * 部门id + */ + id: number; + /** + * 部门负责人id + */ + managerId?: number; + /** + * 部门负责人姓名 + */ + managerName?: string; + /** + * 部门名称 + */ + name: string; + /** + * 同级下一个元素id + */ + nextId?: number; + /** + * 父级部门id + */ + parentId?: number; + /** + * 父级部门名称 + */ + parentName?: string; + /** + * 同级上一个元素id + */ + preId?: number; + /** + * 部门简称 + */ + shortName?: string; + /** + * 排序 + */ + sort?: number; +} diff --git a/admin-web/typescript-ant-design-vue/src/api/system/department/model/department-update-dto.ts b/admin-web/typescript-ant-design-vue/src/api/system/department/model/department-update-dto.ts new file mode 100644 index 00000000..c490ea27 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/department/model/department-update-dto.ts @@ -0,0 +1,36 @@ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface DepartmentUpdateDto { + /** + * 部门id + */ + id?: number; + /** + * 部门负责人id + */ + managerId?: number; + /** + * 部门名称 + */ + name?: string; + /** + * 上级部门id (可选) + */ + parentId?: number; + /** + * 部门简称 + */ + shortName?: string; +} + diff --git a/admin-web/typescript-ant-design-vue/src/api/system/department/model/department-vo.ts b/admin-web/typescript-ant-design-vue/src/api/system/department/model/department-vo.ts new file mode 100644 index 00000000..dc779eb6 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/department/model/department-vo.ts @@ -0,0 +1,59 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-12 18:51:32 + * @LastEditTime: 2021-09-01 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/api/system/department/model/department-vo.ts + */ +/** + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface DepartmentVo { + /** + * 部门id + */ + id: number; + /** + * 部门负责人id + */ + managerId?: number; + /** + * 部门负责人姓名 + */ + managerName?: string; + /** + * 部门名称 + */ + name: string; + /** + * 同级下一个元素id + */ + nextId?: number; + /** + * 父级部门id + */ + parentId?: number; + /** + * 父级部门名称 + */ + parentName?: string; + /** + * 同级上一个元素id + */ + preId?: number; + /** + * 部门简称 + */ + shortName?: string; + /** + * 排序 + */ + sort?: number; +} diff --git a/admin-web/typescript-ant-design-vue/src/api/system/employee/employee-api.ts b/admin-web/typescript-ant-design-vue/src/api/system/employee/employee-api.ts new file mode 100644 index 00000000..4212f04b --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/employee/employee-api.ts @@ -0,0 +1,102 @@ +/* + * @Description: 员工api + * @Author: zhuoda + * @Date: 2021-08-12 18:00:56 + * @LastEditTime: 2021-08-25 11:24:51 + * @LastEditors: zhuoda + */ + +import { PageResultModel } from '../../base-model/page-result-model'; +import { ResponseModel } from '../../base-model/response-model'; +import { EmployeeAddDto } from './model/employee-add-dto'; +import { EmployeeDepartmentUpdateDto } from './model/employee-department-update-dto'; +import { EmployeeQueryDto } from './model/employee-query-dto'; +import { EmployeeUpdateDto } from './model/employee-update-dto'; +import { EmployeeVo } from './model/employee-vo'; +import { getRequest, postRequest } from '/@/lib/axios'; +export const employeeApi = { + /** + * @description: 查询所有员工 by zhuoda + * @param {*} + * @return {*} + */ + queryAll: (): Promise> => { + return getRequest>('/employee/queryAll'); + }, + /** + * @description: 员工管理查询 + * @param {*} + * @return {*} + */ + queryEmployee: (params: EmployeeQueryDto): Promise>> => { + return postRequest>>('/employee/query', params); + }, + /** + * @description: 添加员工 + * @param {EmployeeAddDto} params + * @return {*} + */ + addEmployee: (params: EmployeeAddDto) => { + return postRequest>('/employee/add', params); + }, + /** + * @description: 更新员工信息 + * @param {EmployeeUpdateDto} params + * @return {*} + */ + updateEmployee: (params: EmployeeUpdateDto) => { + return postRequest>('/employee/update', params); + }, + /** + * @description: 删除员工 + * @param {number} employeeId + * @return {*} + */ + deleteEmployee: (employeeId: number) => { + return getRequest>(`/employee/delete/${employeeId}`); + }, + /** + * @description: 批量删除员工 + * @param {number} employeeIdList + * @return {*} + */ + batchDeleteEmployee: (employeeIdList: number[]) => { + return getRequest>(`/employee/update/batch/delete?employeeIdList=${employeeIdList}`); + }, + /** + * @description: 批量调整员工部门 + * @param {EmployeeDepartmentUpdateDto} updateDto + * @return {*} + */ + batchUpdateDepartmentEmployee: (updateDto: EmployeeDepartmentUpdateDto) => { + return postRequest>('/employee/update/batch/department', updateDto); + }, + /** + * @description: 重置员工密码 + * @param {number} employeeId + * @return {*} + */ + resetPassword: (employeeId: number) => { + return getRequest>(`employee/update/pwd/reset/${employeeId}`); + }, + /** + * @description: 更新员工禁用状态 + * @param {number} employeeId + * @return {*} + */ + updateDisabled: (employeeId: number) => { + return getRequest>(`employee/update/disabled/${employeeId}`); + }, + /** + * @description: 查询员工-根据校区id + * @param {number} deptId + * @return {*} + */ + querySchoolEmployee: (deptId: number) => { + return getRequest>(`/employee/query/school/${deptId}`); + }, + // 查询员工-根据部门id + queryEmployeeByDeptId: (deptId: number) => { + return getRequest>(`/employee/query/dept/${deptId}`); + }, +}; diff --git a/admin-web/typescript-ant-design-vue/src/api/system/employee/model/employee-add-dto.ts b/admin-web/typescript-ant-design-vue/src/api/system/employee/model/employee-add-dto.ts new file mode 100644 index 00000000..82352dd2 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/employee/model/employee-add-dto.ts @@ -0,0 +1,50 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-16 15:10:08 + * @LastEditTime: 2021-09-01 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/api/system/employee/model/employee-add-dto.ts + */ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface EmployeeAddDto { + /** + * 姓名 + */ + actualName?: string; + /** + * 部门id + */ + departmentId?: number; + /** + * 是否启用 + */ + disabledFlag?: boolean; + /** + * :
export const
GenderEnum =
{
  UNKNOWN:{
    value:0,
    desc:\'未知\'
  },
  MAN:{
    value:1,
    desc:\'男\'
  },
  WOMAN:{
    value:2,
    desc:\'女\'
  }
}
+ */ + gender?: number; + /** + * 登录账号 + */ + loginName?: string; + /** + * 手机号 + */ + phone?: string; + /** + * 角色列表 + */ + roleIdList?: Array; +} diff --git a/admin-web/typescript-ant-design-vue/src/api/system/employee/model/employee-department-update-dto.ts b/admin-web/typescript-ant-design-vue/src/api/system/employee/model/employee-department-update-dto.ts new file mode 100644 index 00000000..65e4eef3 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/employee/model/employee-department-update-dto.ts @@ -0,0 +1,22 @@ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface EmployeeDepartmentUpdateDto { + /** + * 部门ID集合 + */ + departmentId?: number; + /** + * 员工id + */ + employeeIdList?: Array; +} diff --git a/admin-web/typescript-ant-design-vue/src/api/system/employee/model/employee-query-dto.ts b/admin-web/typescript-ant-design-vue/src/api/system/employee/model/employee-query-dto.ts new file mode 100644 index 00000000..e63f530b --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/employee/model/employee-query-dto.ts @@ -0,0 +1,45 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-14 16:52:13 + * @LastEditTime: 2021-08-14 16:53:58 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/api/system/employee/model/employee-query-dto.ts + */ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { PageParamModel } from "/@/api/base-model/page-param-model"; + +export interface EmployeeQueryDto extends PageParamModel{ + /** + * 部门id + */ + departmentId?: number; + /** + * 是否禁用 + */ + disabledFlag?: boolean; + /** + * 员工id集合 + */ + employeeIdList?: Array; + /** + * 搜索词 + */ + keyword?: string; + /** + * 是否查询总条数 + */ + searchCount?: boolean; +} + diff --git a/admin-web/typescript-ant-design-vue/src/api/system/employee/model/employee-update-dto.ts b/admin-web/typescript-ant-design-vue/src/api/system/employee/model/employee-update-dto.ts new file mode 100644 index 00000000..75d3e4a1 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/employee/model/employee-update-dto.ts @@ -0,0 +1,54 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-16 15:10:08 + * @LastEditTime: 2021-09-01 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/api/system/employee/model/employee-update-dto.ts + */ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface EmployeeUpdateDto { + /** + * 姓名 + */ + actualName?: string; + /** + * 部门id + */ + departmentId?: number; + /** + * 是否启用 + */ + disabledFlag?: boolean | number; + /** + * :
export const
GenderEnum =
{
  UNKNOWN:{
    value:0,
    desc:\'未知\'
  },
  MAN:{
    value:1,
    desc:\'男\'
  },
  WOMAN:{
    value:2,
    desc:\'女\'
  }
}
+ */ + gender?: number; + /** + * 员工id + */ + id?: number; + /** + * 登录账号 + */ + loginName?: string; + /** + * 手机号 + */ + phone?: string; + /** + * 角色列表 + */ + roleIdList?: Array; +} diff --git a/admin-web/typescript-ant-design-vue/src/api/system/employee/model/employee-vo.ts b/admin-web/typescript-ant-design-vue/src/api/system/employee/model/employee-vo.ts new file mode 100644 index 00000000..6d3b5e2f --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/employee/model/employee-vo.ts @@ -0,0 +1,71 @@ +/* + * @Description: + * @Author: zhuoda + * @Date: 2021-08-12 18:07:31 + * @LastEditTime: 2021-09-01 + * @LastEditors: zhuoda + */ +/** + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { DepartmentSimpleVo } from '/@/api/system/department/model/department-simple-vo'; + +export interface EmployeeVo { + /** + * 员工名称 + */ + actualName?: string; + /** + * 出生日期 + */ + birthday?: string; + /** + * 创建时间 + */ + createTime?: string; + /** + * 部门 + */ + department?: Array; + /** + * 部门id + */ + departmentId?: string; + /** + * 是否被禁用 + */ + disabledFlag?: boolean; + /** + * 邮箱 + */ + email?: string; + /** + * 主键id + */ + id: number; + /** + * 身份证 + */ + idCard?: string; + /** + * 是否离职 + */ + leaveFlag?: boolean; + /** + * 登录账号 + */ + loginName?: string; + /** + * 别名 + */ + nickName?: string; + /** + * 手机号码 + */ + phone?: string; +} diff --git a/admin-web/typescript-ant-design-vue/src/api/system/home/home-api.ts b/admin-web/typescript-ant-design-vue/src/api/system/home/home-api.ts new file mode 100644 index 00000000..474f452f --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/home/home-api.ts @@ -0,0 +1,30 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-24 17:21:35 + * @LastEditTime: 2021-08-24 17:24:31 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/api/system/home/home-api.ts + */ +import { ResponseModel } from '../../base-model/response-model'; +import { HomeAmountStatisticsVo } from './model/home-amount-statistics-vo'; +import { HomeWaitHandleVo } from './model/home-wait-handle-vo'; +import { getRequest, postRequest } from '/@/lib/axios'; +export const homeApi = { + /** + * @description: 首页-金额统计(业绩、收款、订单数等) by zhuoda + * @param {*} + * @return {*} + */ + homeAmountStatistics: () => { + return getRequest>('/home/amount/statistics'); + }, + /** + * @description: 首页-待办信息 by zhuoda + * @param {*} + * @return {*} + */ + homeWaitHandle: () => { + return getRequest>('home/wait/handle'); + }, +}; diff --git a/admin-web/typescript-ant-design-vue/src/api/system/home/model/home-amount-statistics-vo.ts b/admin-web/typescript-ant-design-vue/src/api/system/home/model/home-amount-statistics-vo.ts new file mode 100644 index 00000000..25be7548 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/home/model/home-amount-statistics-vo.ts @@ -0,0 +1,22 @@ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { HomeEmployeeReceiveVo } from './home-employee-receive-vo'; +import { HomeEmployeeOrderVo } from './home-employee-order-vo'; +import { HomeEmployeeSaleTargetVo } from './home-employee-sale-target-vo'; + + +export interface HomeAmountStatisticsVo { + orderVO?: HomeEmployeeOrderVo; + receiveVO?: HomeEmployeeReceiveVo; + saleTargetVO?: HomeEmployeeSaleTargetVo; +} + diff --git a/admin-web/typescript-ant-design-vue/src/api/system/home/model/home-employee-order-vo.ts b/admin-web/typescript-ant-design-vue/src/api/system/home/model/home-employee-order-vo.ts new file mode 100644 index 00000000..63960590 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/home/model/home-employee-order-vo.ts @@ -0,0 +1,24 @@ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface HomeEmployeeOrderVo { + /** + * 上月订单数 + */ + lastMonthNum?: number; + /** + * 本月订单数 + */ + thisMonthNum?: number; +} + diff --git a/admin-web/typescript-ant-design-vue/src/api/system/home/model/home-employee-receive-vo.ts b/admin-web/typescript-ant-design-vue/src/api/system/home/model/home-employee-receive-vo.ts new file mode 100644 index 00000000..bf7cc6b0 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/home/model/home-employee-receive-vo.ts @@ -0,0 +1,24 @@ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface HomeEmployeeReceiveVo { + /** + * 上月收款金额 + */ + lastMonthAmount?: number; + /** + * 本月收款金额 + */ + thisMonthAmount?: number; +} + diff --git a/admin-web/typescript-ant-design-vue/src/api/system/home/model/home-employee-sale-target-vo.ts b/admin-web/typescript-ant-design-vue/src/api/system/home/model/home-employee-sale-target-vo.ts new file mode 100644 index 00000000..e9f55c85 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/home/model/home-employee-sale-target-vo.ts @@ -0,0 +1,28 @@ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface HomeEmployeeSaleTargetVo { + /** + * 日均金额 + */ + averageAmount?: number; + /** + * 月度销售金额(完成金额) + */ + salesAmount?: number; + /** + * 月度目标金额 + */ + targetAmount?: number; +} + diff --git a/admin-web/typescript-ant-design-vue/src/api/system/home/model/home-wait-handle-vo.ts b/admin-web/typescript-ant-design-vue/src/api/system/home/model/home-wait-handle-vo.ts new file mode 100644 index 00000000..8de2d859 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/home/model/home-wait-handle-vo.ts @@ -0,0 +1,40 @@ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface HomeWaitHandleVo { + /** + * 驳回完成收款单数 + */ + rejectCompleteReceiveOrderNum?: number; + /** + * 驳回收款单数 + */ + rejectReceiveOrderNum?: number; + /** + * 驳回退款单数 + */ + rejectRefundOrderNum?: number; + /** + * 签订合同数 + */ + signContractNum?: number; + /** + * 关联线索欠款(余额)总金额 + */ + userTotalAmount?: number; + /** + * 待跟进数量 + */ + waitTrackNum?: number; +} + diff --git a/admin-web/typescript-ant-design-vue/src/api/system/login/login-model.ts b/admin-web/typescript-ant-design-vue/src/api/system/login/login-model.ts new file mode 100644 index 00000000..1f5aff13 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/login/login-model.ts @@ -0,0 +1,40 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-03 10:27:11 + * @LastEditTime: 2021-08-18 20:03:44 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/api/system/login/login-model.ts + */ + +/** + * + * @export + * @interface EmployeeLoginFormDto + */ +export interface EmployeeLoginFormDto { + /** + * 验证码 + * @type {string} + * @memberof EmployeeLoginFormDto + */ + code?: string; + /** + * 验证码uuid + * @type {string} + * @memberof EmployeeLoginFormDto + */ + codeUuid?: string; + /** + * + * @type {string} + * @memberof EmployeeLoginFormDto + */ + loginName: string; + /** + * + * @type {string} + * @memberof EmployeeLoginFormDto + */ + loginPwd: string; +} diff --git a/admin-web/typescript-ant-design-vue/src/api/system/login/login.ts b/admin-web/typescript-ant-design-vue/src/api/system/login/login.ts new file mode 100644 index 00000000..da9639a1 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/login/login.ts @@ -0,0 +1,30 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-03 10:27:11 + * @LastEditTime: 2021-08-18 20:04:05 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/api/system/login/login.ts + */ +import { EmployeeLoginVo } from './model/employee-login-vo'; +import { ResponseModel } from '/@/api/base-model/response-model'; +import { EmployeeLoginFormDto } from '/@/api/system/login/login-model'; +import { getRequest, postRequest } from '/@/lib/axios'; + +export const loginApi = { + /** + * 登录 + * @param param + */ + login: (param: EmployeeLoginFormDto) => { + return postRequest>('/login', param); + }, + + /** + * 获取登录信息 + * @param param + */ + getLogin: () => { + return getRequest>('/login/get'); + }, +}; diff --git a/admin-web/typescript-ant-design-vue/src/api/system/login/model/employee-login-vo.ts b/admin-web/typescript-ant-design-vue/src/api/system/login/model/employee-login-vo.ts new file mode 100644 index 00000000..ba10444f --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/login/model/employee-login-vo.ts @@ -0,0 +1,84 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-18 20:02:35 + * @LastEditTime: 2021-09-01 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/api/system/login/model/employee-login-vo.ts + */ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { MenuTreeVo } from '../../menu/model/menu-tree-vo'; + +export interface EmployeeLoginVo { + /** + * 员工名称 + */ + actualName: string; + /** + * 部门id + */ + departmentId?: number; + /** + * 部门名称 + */ + departmentName?: string; + /** + * 是否被禁用 + */ + disabledFlag?: boolean; + /** + * 员工id + */ + employeeId?: number; + /** + * :
export const
GenderEnum =
{
  UNKNOWN:{
    value:0,
    desc:\'未知\'
  },
  MAN:{
    value:1,
    desc:\'男\'
  },
  WOMAN:{
    value:2,
    desc:\'女\'
  }
}
+ */ + gender?: number; + /** + * 是否为超管 + */ + isSuperMan?: boolean; + /** + * 登录账号 + */ + loginName?: string; + /** + * 菜单树 + */ + menuTree?: Array; + /** + * 手机号码 + */ + phone?: string; + /** + * 功能点权限列表 + */ + pointsList?: Array; + /** + * 角色列表 + */ + roleList?: Array; + /** + * token + */ + token?: string; + /** + * 所属校区 + */ + schoolId?: number; + /** + * 所属校区名称 + */ + schoolName?: string; +} diff --git a/admin-web/typescript-ant-design-vue/src/api/system/menu/menu-api.ts b/admin-web/typescript-ant-design-vue/src/api/system/menu/menu-api.ts new file mode 100644 index 00000000..71248f36 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/menu/menu-api.ts @@ -0,0 +1,59 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-11 22:15:04 + * @LastEditTime: 2021-09-01 20:21:29 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/api/system/menu/menu-api.ts + */ +import { getRequest, postRequest } from '/@/lib/axios'; +import { MenuAddForm } from '/@/api/system/menu/model/menu-add-form'; +import { ResponseModel } from '/@/api/base-model/response-model'; +import { MenuUpdateForm } from '/@/api/system/menu/model/menu-update-form'; +import { MenuVo } from '/@/api/system/menu/model/menu-vo'; +import { MenuTreeVo } from '/@/api/system/menu/model/menu-tree-vo'; +import { RequestUrlVo } from './model/request-url-vo'; + +export const menuApi = { + /** + * 添加菜单 + */ + addMenu: (param: MenuAddForm) => { + return postRequest>('/menu/add', param); + }, + + /** + * 更新菜单 + */ + updateMenu: (param: MenuUpdateForm) => { + return postRequest>('/menu/update', param); + }, + + /** + * 批量删除菜单 + */ + batchDeleteMenu: (menuIdList: Array) => { + return getRequest>(`/menu/batchDelete?menuIdList=${menuIdList}`); + }, + + /** + * 查询所有菜单列表 + */ + queryMenu: (): Promise> => { + return getRequest>('/menu/query'); + }, + + /** + * 查询菜单树 + */ + queryMenuTree: (onlyMenu?: boolean): Promise> => { + return getRequest>(`/menu/tree?onlyMenu=${onlyMenu}`); + }, + + /** + * 获取所有请求路径 + */ + getAllUrl: () => { + return getRequest>('/menu/getAllUrl'); + }, +}; diff --git a/admin-web/typescript-ant-design-vue/src/api/system/menu/model/menu-add-form.ts b/admin-web/typescript-ant-design-vue/src/api/system/menu/model/menu-add-form.ts new file mode 100644 index 00000000..682c6c3f --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/menu/model/menu-add-form.ts @@ -0,0 +1,83 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-03 10:27:11 + * @LastEditTime: 2021-09-01 20:57:32 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/api/system/menu/model/menu-add-form.ts + */ +/** + * smart-admin-java-2.0-admin + * http://localhost:20086/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { MenuPointsOperateForm } from './menu-points-operate-form'; + +export interface MenuAddForm { + /** + * 是否缓存 + */ + cacheFlag?: boolean; + /** + * 组件路径 + */ + component?: string; + /** + * 功能点关联菜单ID + */ + contextMenuId?: number; + /** + * 禁用状态 + */ + disabledFlag?: boolean; + /** + * 是否为外链 + */ + frameFlag?: boolean; + /** + * 菜单图标 + */ + icon?: string; + /** + * 菜单名称 + */ + menuName?: string; + /** + * 类型:
export const
MENU_TYPE_ENUM =
{
  CATALOG:{
    value:1,
    desc:\'目录\'
  },
  MENU:{
    value:2,
    desc:\'菜单\'
  },
  POINTS:{
    value:3,
    desc:\'功能点\'
  }
}
+ */ + menuType: string | number; + /** + * 父菜单ID + */ + parentId?: number; + /** + * 路由地址 + */ + path?: string; + /** + * 接口权限 + */ + perms?: string; + /** + * 接口权限(拆分) + */ + permsList?: string[]; + /** + * 功能点列表 + */ + pointList?: Array; + /** + * 显示顺序 + */ + sort?: number; + /** + * 显示状态 + */ + visibleFlag?: boolean; +} diff --git a/admin-web/typescript-ant-design-vue/src/api/system/menu/model/menu-points-operate-form.ts b/admin-web/typescript-ant-design-vue/src/api/system/menu/model/menu-points-operate-form.ts new file mode 100644 index 00000000..754504ca --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/menu/model/menu-points-operate-form.ts @@ -0,0 +1,42 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-03 10:27:11 + * @LastEditTime: 2021-09-01 20:56:03 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/api/system/menu/model/menu-points-operate-form.ts + */ +/** + * smart-admin-java-2.0-admin + * http://localhost:20086/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface MenuPointsOperateForm { + /** + * 功能点关联菜单ID + */ + contextMenuId?: number; + /** + * 禁用状态 + */ + disabledFlag?: boolean; + /** + * 菜单ID + */ + menuId?: number; + /** + * 功能点名称 + */ + menuName?: string; + /** + * 接口权限 + */ + permsList?: string[]; +} diff --git a/admin-web/typescript-ant-design-vue/src/api/system/menu/model/menu-simple-tree-vo.ts b/admin-web/typescript-ant-design-vue/src/api/system/menu/model/menu-simple-tree-vo.ts new file mode 100644 index 00000000..202a4bcd --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/menu/model/menu-simple-tree-vo.ts @@ -0,0 +1,46 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-28 14:19:22 + * @LastEditTime: 2021-08-28 15:08:02 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/api/system/menu/model/menu-simple-tree-vo.ts + */ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface MenuSimpleTreeVo { + /** + * 子菜单 + */ + children?: Array; + /** + * 功能点关联菜单ID + */ + contextMenuId?: number; + /** + * 菜单ID + */ + menuId?: number; + /** + * 父菜单ID + */ + parentId?: number; + /** + * 菜单类型 + */ + menuType?:number; + /** + * 菜单名称 + */ + menuName?: string; +} diff --git a/admin-web/typescript-ant-design-vue/src/api/system/menu/model/menu-tree-vo.ts b/admin-web/typescript-ant-design-vue/src/api/system/menu/model/menu-tree-vo.ts new file mode 100644 index 00000000..65e5e986 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/menu/model/menu-tree-vo.ts @@ -0,0 +1,100 @@ +/* + * @Description: + * @Author: zhuoda + * @Date: 2021-08-10 + * @LastEditTime: 2021-09-01 21:16:00 + * @LastEditors: zhuoda + */ +/** + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface MenuTreeVo { + /** + * 是否缓存 + */ + cacheFlag?: boolean; + /** + * 菜单子集 + */ + children?: Array; + /** + * 组件路径 + */ + component?: string; + /** + * 功能点关联菜单ID + */ + contextMenuId?: number; + /** + * 创建时间 + */ + createTime?: string; + /** + * 创建人 + */ + createUserId?: number; + /** + * 禁用状态 + */ + disabledFlag?: boolean; + /** + * 是否为外链 + */ + frameFlag?: boolean; + /** + * 菜单图标 + */ + icon?: string; + /** + * 菜单ID + */ + menuId: number; + /** + * 菜单名称 + */ + menuName?: string; + /** + * 类型:
export const
MENU_TYPE_ENUM =
{
  CATALOG:{
    value:1,
    desc:\'目录\'
  },
  MENU:{
    value:2,
    desc:\'菜单\'
  },
  POINTS:{
    value:3,
    desc:\'功能点\'
  }
}
+ */ + menuType: number; + /** + * 父菜单ID 无上级可传0 + */ + parentId?: number; + /** + * 路由地址 + */ + path?: string; + /** + * 接口权限 + */ + perms?: string; + /** + * 接口权限 + */ + permsList?: string[]; + /** + * 显示顺序 + */ + sort?: number; + /** + * 更新时间 + */ + updateTime?: string; + /** + * 更新人 + */ + updateUserId?: number; + /** + * 显示状态 + */ + visibleFlag?: boolean; +} diff --git a/admin-web/typescript-ant-design-vue/src/api/system/menu/model/menu-update-form.ts b/admin-web/typescript-ant-design-vue/src/api/system/menu/model/menu-update-form.ts new file mode 100644 index 00000000..791c8095 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/menu/model/menu-update-form.ts @@ -0,0 +1,88 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-03 10:27:11 + * @LastEditTime: 2021-09-01 20:57:27 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/api/system/menu/model/menu-update-form.ts + */ +/** + * smart-admin-java-2.0-admin + * http://localhost:20086/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { MenuPointsOperateForm } from './menu-points-operate-form'; + +export interface MenuUpdateForm { + /** + * 是否缓存 + */ + cacheFlag?: boolean; + /** + * 组件路径 + */ + component?: string; + /** + * 功能点关联菜单ID + */ + contextMenuId?: number; + /** + * 禁用状态 + */ + disabledFlag?: boolean; + /** + * 是否为外链 + */ + frameFlag?: boolean; + /** + * 菜单图标 + */ + icon?: string; + /** + * 菜单ID + */ + menuId?: number; + /** + * 菜单名称 + */ + menuName?: string; + /** + * 类型:
export const
MENU_TYPE_ENUM =
{
  CATALOG:{
    value:1,
    desc:\'目录\'
  },
  MENU:{
    value:2,
    desc:\'菜单\'
  },
  POINTS:{
    value:3,
    desc:\'功能点\'
  }
}
+ */ + menuType: string | number; + /** + * 父菜单ID + */ + parentId?: number; + /** + * 路由地址 + */ + path?: string; + /** + * 接口权限 + */ + perms?: string; + /** + * 接口权限(拆分) + */ + permsList?: string[]; + /** + * 功能点列表 + */ + pointList?: Array; + /** + * 显示顺序 + */ + sort?: number; + /** + * 显示状态 + */ + visibleFlag?: boolean; +} diff --git a/admin-web/typescript-ant-design-vue/src/api/system/menu/model/menu-vo.ts b/admin-web/typescript-ant-design-vue/src/api/system/menu/model/menu-vo.ts new file mode 100644 index 00000000..01bc59f8 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/menu/model/menu-vo.ts @@ -0,0 +1,103 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-11 11:52:11 + * @LastEditTime: 2021-09-01 20:55:06 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/api/system/menu/model/menu-vo.ts + */ +/** + * smart-admin-java-2.0-admin + * http://localhost:20086/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface MenuVo { + /** + * 是否缓存 + */ + cacheFlag?: boolean; + /** + * 组件路径 + */ + component?: string; + /** + * 功能点关联菜单ID + */ + contextMenuId?: number; + /** + * 创建时间 + */ + createTime?: string; + /** + * 创建人 + */ + createUser?: number; + /** + * 禁用状态 + */ + disabledFlag?: boolean; + /** + * 是否为外链 + */ + frameFlag?: boolean; + /** + * 菜单图标 + */ + icon?: string; + /** + * 菜单ID + */ + menuId?: number; + /** + * 菜单名称 + */ + menuName?: string; + /** + * 类型:
export const
MENU_TYPE_ENUM =
{
  CATALOG:{
    value:1,
    desc:\'目录\'
  },
  MENU:{
    value:2,
    desc:\'菜单\'
  },
  POINTS:{
    value:3,
    desc:\'功能点\'
  }
}
+ */ + menuType: number; + /** + * 父菜单ID + */ + parentId?: number; + /** + * 路由地址 + */ + path?: string; + /** + * 接口权限 + */ + perms?: string; + /** + * 接口权限(拆分) + */ + permsList?: string[]; + /** + * 显示顺序 + */ + sort?: number; + /** + * 更新时间 + */ + updateTime?: string; + /** + * 更新人 + */ + updateUser?: number; + /** + * 显示状态 + */ + visibleFlag?: boolean; + + /** + * 孩子 + */ + children?: MenuVo[]; +} diff --git a/admin-web/typescript-ant-design-vue/src/api/system/menu/model/models.ts b/admin-web/typescript-ant-design-vue/src/api/system/menu/model/models.ts new file mode 100644 index 00000000..09993d12 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/menu/model/models.ts @@ -0,0 +1,3 @@ +export * from './menu-add-form'; +export * from './menu-points-operate-form'; +export * from './response-dto-ofstring'; diff --git a/admin-web/typescript-ant-design-vue/src/api/system/menu/model/request-url-vo.ts b/admin-web/typescript-ant-design-vue/src/api/system/menu/model/request-url-vo.ts new file mode 100644 index 00000000..1a89b254 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/menu/model/request-url-vo.ts @@ -0,0 +1,28 @@ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface RequestUrlVo { + /** + * 注释说明 + */ + comment?: string; + /** + * controller.method + */ + name?: string; + /** + * url + */ + url?: string; +} + diff --git a/admin-web/typescript-ant-design-vue/src/api/system/role-menu/modal/role-menu-dto.ts b/admin-web/typescript-ant-design-vue/src/api/system/role-menu/modal/role-menu-dto.ts new file mode 100644 index 00000000..7caf388f --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/role-menu/modal/role-menu-dto.ts @@ -0,0 +1,24 @@ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface RoleMenuDto { + /** + * 菜单ID集合 + */ + menuIdList?: Array; + /** + * 角色id + */ + roleId?: number; +} + diff --git a/admin-web/typescript-ant-design-vue/src/api/system/role-menu/modal/role-menu-tree-vo.ts b/admin-web/typescript-ant-design-vue/src/api/system/role-menu/modal/role-menu-tree-vo.ts new file mode 100644 index 00000000..4e6e78ea --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/role-menu/modal/role-menu-tree-vo.ts @@ -0,0 +1,38 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-28 14:19:33 + * @LastEditTime: 2021-08-28 14:19:46 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/api/system/role-menu/modal/role-menu-tree-vo.ts + */ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { MenuSimpleTreeVo } from "../../menu/model/menu-simple-tree-vo"; + + +export interface RoleMenuTreeVo { + /** + * 菜单列表 + */ + menuTreeList?: Array; + /** + * 角色ID + */ + roleId?: number; + /** + * 选中的菜单ID + */ + selectedMenuId?: Array; +} + diff --git a/admin-web/typescript-ant-design-vue/src/api/system/role-menu/role-menu-api.ts b/admin-web/typescript-ant-design-vue/src/api/system/role-menu/role-menu-api.ts new file mode 100644 index 00000000..e4738a42 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/role-menu/role-menu-api.ts @@ -0,0 +1,30 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-28 14:16:46 + * @LastEditTime: 2021-08-28 14:25:36 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/api/system/role-menu/role-menu-api.ts + */ +import { ResponseModel } from '../../base-model/response-model'; +import { RoleMenuDto } from './modal/role-menu-dto'; +import { RoleMenuTreeVo } from './modal/role-menu-tree-vo'; +import { getRequest, postRequest } from '/@/lib/axios'; +export const roleMenuApi = { + /** + * @description: 获取角色关联菜单权限 + * @param {*} + * @return {*} + */ + getRoleSelectedMenu: (roleId: number) => { + return getRequest>(`role/menu/getRoleSelectedMenu/${roleId}`); + }, + /** + * @description: 更新角色权限 + * @param {*} + * @return {*} + */ + updateRoleMenu: (data: RoleMenuDto) => { + return postRequest>('role/menu/updateRoleMenu', data); + }, +}; diff --git a/admin-web/typescript-ant-design-vue/src/api/system/role/model/data-scope-and-view-type-vo.ts b/admin-web/typescript-ant-design-vue/src/api/system/role/model/data-scope-and-view-type-vo.ts new file mode 100644 index 00000000..6d1ce334 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/role/model/data-scope-and-view-type-vo.ts @@ -0,0 +1,37 @@ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { DataScopeViewTypeVo } from './data-scope-view-type-vo'; + + +export interface DataScopeAndViewTypeVo { + /** + * 数据范围类型 + */ + dataScopeType?: number; + /** + * 描述 + */ + dataScopeTypeDesc?: string; + /** + * 数据范围名称 + */ + dataScopeTypeName?: string; + /** + * 顺序 + */ + dataScopeTypeSort?: number; + /** + * 可见范围列表 + */ + viewTypeList?: Array; +} + diff --git a/admin-web/typescript-ant-design-vue/src/api/system/role/model/data-scope-batch-set-dto.ts b/admin-web/typescript-ant-design-vue/src/api/system/role/model/data-scope-batch-set-dto.ts new file mode 100644 index 00000000..6b5f5019 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/role/model/data-scope-batch-set-dto.ts @@ -0,0 +1,24 @@ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface DataScopeBatchSetDto { + /** + * 数据范围类型 + */ + dataScopeType?: number; + /** + * 可见范围 + */ + viewType?: number; +} + diff --git a/admin-web/typescript-ant-design-vue/src/api/system/role/model/data-scope-batch-set-role-dto.ts b/admin-web/typescript-ant-design-vue/src/api/system/role/model/data-scope-batch-set-role-dto.ts new file mode 100644 index 00000000..e1607fe4 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/role/model/data-scope-batch-set-role-dto.ts @@ -0,0 +1,25 @@ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { DataScopeBatchSetDto } from './data-scope-batch-set-dto'; + + +export interface DataScopeBatchSetRoleDto { + /** + * 设置信息 + */ + batchSetList?: Array; + /** + * 角色id + */ + roleId?: number; +} + diff --git a/admin-web/typescript-ant-design-vue/src/api/system/role/model/data-scope-select-vo.ts b/admin-web/typescript-ant-design-vue/src/api/system/role/model/data-scope-select-vo.ts new file mode 100644 index 00000000..1dc69fc0 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/role/model/data-scope-select-vo.ts @@ -0,0 +1,24 @@ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface DataScopeSelectVo { + /** + * 数据范围id + */ + dataScopeType?: number; + /** + * 可见范围 + */ + viewType?: number; +} + diff --git a/admin-web/typescript-ant-design-vue/src/api/system/role/model/data-scope-view-type-vo.ts b/admin-web/typescript-ant-design-vue/src/api/system/role/model/data-scope-view-type-vo.ts new file mode 100644 index 00000000..806749ba --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/role/model/data-scope-view-type-vo.ts @@ -0,0 +1,28 @@ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface DataScopeViewTypeVo { + /** + * 可见范围 + */ + viewType?: number; + /** + * 级别,用于表示范围大小 + */ + viewTypeLevel?: number; + /** + * 可见范围名称 + */ + viewTypeName?: string; +} + diff --git a/admin-web/typescript-ant-design-vue/src/api/system/role/model/role-add-dto.ts b/admin-web/typescript-ant-design-vue/src/api/system/role/model/role-add-dto.ts new file mode 100644 index 00000000..5d9bcdff --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/role/model/role-add-dto.ts @@ -0,0 +1,24 @@ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface RoleAddDto { + /** + * 角色描述 + */ + remark?: string; + /** + * 角色名称 + */ + roleName?: string; +} + diff --git a/admin-web/typescript-ant-design-vue/src/api/system/role/model/role-employee-batch-dto.ts b/admin-web/typescript-ant-design-vue/src/api/system/role/model/role-employee-batch-dto.ts new file mode 100644 index 00000000..ebc06d76 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/role/model/role-employee-batch-dto.ts @@ -0,0 +1,24 @@ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface RoleEmployeeBatchDto { + /** + * 员工id集合 + */ + employeeIdList?: Array; + /** + * 角色id + */ + roleId?: number; +} + diff --git a/admin-web/typescript-ant-design-vue/src/api/system/role/model/role-query-dto.ts b/admin-web/typescript-ant-design-vue/src/api/system/role/model/role-query-dto.ts new file mode 100644 index 00000000..91058b45 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/role/model/role-query-dto.ts @@ -0,0 +1,49 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-30 11:10:09 + * @LastEditTime: 2021-08-30 11:20:04 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/api/system/role/model/role-query-dto.ts + */ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { SortItemDto } from './sort-item-dto'; + + +export interface RoleQueryDto { + /** + * 页码(不能为空) + */ + pageNum: number; + /** + * 每页数量(不能为空) + */ + pageSize: number; + /** + * 角色id + */ + roleId?: number; + /** + * 角色名称 + */ + roleName?: string; + /** + * 是否查询总条数 + */ + searchCount?: boolean; + /** + * 排序字段集合 + */ + sortItemList?: Array; +} + diff --git a/admin-web/typescript-ant-design-vue/src/api/system/role/model/role-update-dto.ts b/admin-web/typescript-ant-design-vue/src/api/system/role/model/role-update-dto.ts new file mode 100644 index 00000000..a9534d54 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/role/model/role-update-dto.ts @@ -0,0 +1,28 @@ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface RoleUpdateDto { + /** + * 角色id + */ + id?: number; + /** + * 角色描述 + */ + remark?: string; + /** + * 角色名称 + */ + roleName?: string; +} + diff --git a/admin-web/typescript-ant-design-vue/src/api/system/role/model/role-vo.ts b/admin-web/typescript-ant-design-vue/src/api/system/role/model/role-vo.ts new file mode 100644 index 00000000..e233e456 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/role/model/role-vo.ts @@ -0,0 +1,28 @@ +/** + * smart-admin-local + * http://localhost:50110/v2/api-docs?group=Admin + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface RoleVo { + /** + * 角色ID + */ + id?: number; + /** + * 角色备注 + */ + remark?: string; + /** + * 角色名称 + */ + roleName?: string; +} + diff --git a/admin-web/typescript-ant-design-vue/src/api/system/role/role-api.ts b/admin-web/typescript-ant-design-vue/src/api/system/role/role-api.ts new file mode 100644 index 00000000..ca88b744 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/api/system/role/role-api.ts @@ -0,0 +1,119 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-16 15:53:46 + * @LastEditTime: 2021-08-30 15:18:18 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/api/system/role/role-api.ts + */ +import { PageResultModel } from '../../base-model/page-result-model'; +import { ResponseModel } from '../../base-model/response-model'; +import { EmployeeVo } from '../employee/model/employee-vo'; +import { DataScopeAndViewTypeVo } from './model/data-scope-and-view-type-vo'; +import { DataScopeBatchSetRoleDto } from './model/data-scope-batch-set-role-dto'; +import { DataScopeSelectVo } from './model/data-scope-select-vo'; +import { RoleAddDto } from './model/role-add-dto'; +import { RoleEmployeeBatchDto } from './model/role-employee-batch-dto'; +import { RoleQueryDto } from './model/role-query-dto'; +import { RoleUpdateDto } from './model/role-update-dto'; +import { RoleVo } from './model/role-vo'; +import { getRequest, postRequest } from '/@/lib/axios'; +export const roleApi = { + /** + * @description: 获取所有角色 + * @param {*} + * @return {*} + */ + queryAll: (): Promise> => { + return getRequest>('role/getAll'); + }, + /** + * @description:添加角色 + * @param {*} + * @return {*} + */ + addRole: (data: RoleAddDto) => { + return postRequest>('role/add', data); + }, + /** + * @description:更新角色 + * @param {*} + * @return {*} + */ + updateRole: (data: RoleUpdateDto) => { + return postRequest>('role/update', data); + }, + /** + * @description: 删除角色 + * @param {number} roleId + * @return {*} + */ + deleteRole: (roleId: number) => { + return getRequest>(`role/delete/${roleId}`); + }, + /** + * @description: 批量设置某角色数据范围 + * @param {DataScopeBatchSetRoleDto} data + * @return {*} + */ + updateDataScope: (data: DataScopeBatchSetRoleDto) => { + return postRequest>('/dataScope/batchSet', data); + }, + /** + * @description: 获取当前系统所配置的所有数据范围 + * @param {*} + * @return {*} + */ + getDataScopeList: () => { + return getRequest>('/dataScope/list'); + }, + /** + * @description: 获取某角色所设置的数据范围 + * @param {number} roleId + * @return {*} + */ + getDataScopeByRoleId: (roleId: number) => { + return getRequest>(`/dataScope/listByRole/${roleId}`); + }, + /** + * @description: 获取角色成员-员工列表 + * @param {*} + * @return {*} + */ + queryRoleEmployee: (params: RoleQueryDto) => { + return postRequest>>('/role/listEmployee', params); + }, + /** + * @description: 从角色成员列表中移除员工 + * @param {number} employeeId + * @param {number} roleId + * @return {*} + */ + deleteEmployeeRole: (employeeId: number, roleId: number) => { + return getRequest>('/role/removeEmployee?employeeId=' + employeeId + '&roleId=' + roleId); + }, + /** + * @description: 从角色成员列表中批量移除员工 + * @param {RoleEmployeeBatchDto} data + * @return {*} + */ + deleteEmployeeList: (data: RoleEmployeeBatchDto) => { + return postRequest>('/role/removeEmployeeList', data); + }, + /** + * @description: 根据角色id获取角色员工列表(无分页) + * @param {*} + * @return {*} + */ + getRoleAllEmployee: (roleId: number) => { + return getRequest>(`role/listAllEmployee/${roleId}`); + }, + /** + * @description: 角色成员列表中批量添加员工 + * @param {RoleEmployeeBatchDto} data + * @return {*} + */ + addRoleEmployeeList: (data: RoleEmployeeBatchDto) => { + return postRequest>('/role/addEmployeeList', data); + }, +}; diff --git a/smart-admin-h5/src/assets/logo.png b/admin-web/typescript-ant-design-vue/src/assets/img/logo.png similarity index 100% rename from smart-admin-h5/src/assets/logo.png rename to admin-web/typescript-ant-design-vue/src/assets/img/logo.png diff --git a/admin-web/typescript-ant-design-vue/src/assets/logo.png b/admin-web/typescript-ant-design-vue/src/assets/logo.png new file mode 100644 index 00000000..f3d2503f Binary files /dev/null and b/admin-web/typescript-ant-design-vue/src/assets/logo.png differ diff --git a/admin-web/typescript-ant-design-vue/src/components/HelloWorld.vue b/admin-web/typescript-ant-design-vue/src/components/HelloWorld.vue new file mode 100644 index 00000000..8e73cc6d --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/components/HelloWorld.vue @@ -0,0 +1,70 @@ + + + + + diff --git a/admin-web/typescript-ant-design-vue/src/components/category-tree-select/index.vue b/admin-web/typescript-ant-design-vue/src/components/category-tree-select/index.vue new file mode 100644 index 00000000..76ad2bf1 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/components/category-tree-select/index.vue @@ -0,0 +1,93 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/components/department-tree-select/index.vue b/admin-web/typescript-ant-design-vue/src/components/department-tree-select/index.vue new file mode 100644 index 00000000..d5130c8e --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/components/department-tree-select/index.vue @@ -0,0 +1,72 @@ + + + diff --git a/admin-web/typescript-ant-design-vue/src/components/employee-select/index.vue b/admin-web/typescript-ant-design-vue/src/components/employee-select/index.vue new file mode 100644 index 00000000..cdec9d6c --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/components/employee-select/index.vue @@ -0,0 +1,80 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/components/menu-location-breadcrumb/index.vue b/admin-web/typescript-ant-design-vue/src/components/menu-location-breadcrumb/index.vue new file mode 100644 index 00000000..3c61e078 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/components/menu-location-breadcrumb/index.vue @@ -0,0 +1,31 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/components/recursion-menu/index.vue b/admin-web/typescript-ant-design-vue/src/components/recursion-menu/index.vue new file mode 100644 index 00000000..ec0400d5 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/components/recursion-menu/index.vue @@ -0,0 +1,115 @@ + + + diff --git a/admin-web/typescript-ant-design-vue/src/components/recursion-menu/sub-menu.vue b/admin-web/typescript-ant-design-vue/src/components/recursion-menu/sub-menu.vue new file mode 100644 index 00000000..41d21628 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/components/recursion-menu/sub-menu.vue @@ -0,0 +1,56 @@ + + + diff --git a/admin-web/typescript-ant-design-vue/src/components/school-department-select/index.vue b/admin-web/typescript-ant-design-vue/src/components/school-department-select/index.vue new file mode 100644 index 00000000..f0edac51 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/components/school-department-select/index.vue @@ -0,0 +1,96 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/components/select-employee-modal/index.vue b/admin-web/typescript-ant-design-vue/src/components/select-employee-modal/index.vue new file mode 100644 index 00000000..8cb8e6bf --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/components/select-employee-modal/index.vue @@ -0,0 +1,177 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/components/side-expand/side-menu/index.vue b/admin-web/typescript-ant-design-vue/src/components/side-expand/side-menu/index.vue new file mode 100644 index 00000000..6a76fc9b --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/components/side-expand/side-menu/index.vue @@ -0,0 +1,61 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/components/side-expand/side-menu/recursion-menu.vue b/admin-web/typescript-ant-design-vue/src/components/side-expand/side-menu/recursion-menu.vue new file mode 100644 index 00000000..774a02d5 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/components/side-expand/side-menu/recursion-menu.vue @@ -0,0 +1,87 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/components/side-expand/side-menu/sub-menu.vue b/admin-web/typescript-ant-design-vue/src/components/side-expand/side-menu/sub-menu.vue new file mode 100644 index 00000000..1aaa1256 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/components/side-expand/side-menu/sub-menu.vue @@ -0,0 +1,56 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/components/side-expand/side-menu/top-menu.vue b/admin-web/typescript-ant-design-vue/src/components/side-expand/side-menu/top-menu.vue new file mode 100644 index 00000000..9ea372e2 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/components/side-expand/side-menu/top-menu.vue @@ -0,0 +1,113 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/components/side-menu/index.less b/admin-web/typescript-ant-design-vue/src/components/side-menu/index.less new file mode 100644 index 00000000..37241638 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/components/side-menu/index.less @@ -0,0 +1,38 @@ +.shadow{ + box-shadow: 2px 0 6px rgba(0, 21, 41, .35); +} +.side-menu{ + min-height: 100vh; + overflow-y: auto; + z-index: 10; + .logo{ + height: @header-user-height; + position: relative; + line-height: @header-user-height; + padding-left: 24px; + -webkit-transition: all .3s; + transition: all .3s; + overflow: hidden; + background-color: @layout-trigger-background; + &.light{ + background-color: #fff; + h1{ + color: @primary-color; + } + } + h1{ + color: @menu-dark-highlight-color; + font-size: 20px; + margin: 0 0 0 12px; + display: inline-block; + vertical-align: middle; + } + img{ + width: 32px; + vertical-align: middle; + } + } +} +.menu{ + padding: 16px 0; +} diff --git a/admin-web/typescript-ant-design-vue/src/components/side-menu/index.vue b/admin-web/typescript-ant-design-vue/src/components/side-menu/index.vue new file mode 100644 index 00000000..bea10e19 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/components/side-menu/index.vue @@ -0,0 +1,69 @@ + + + + + diff --git a/admin-web/typescript-ant-design-vue/src/components/smart-area-cascader/index.vue b/admin-web/typescript-ant-design-vue/src/components/smart-area-cascader/index.vue new file mode 100644 index 00000000..da9ac3cb --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/components/smart-area-cascader/index.vue @@ -0,0 +1,87 @@ + + + + + diff --git a/admin-web/typescript-ant-design-vue/src/components/smart-area-cascader/province-city-district.ts b/admin-web/typescript-ant-design-vue/src/components/smart-area-cascader/province-city-district.ts new file mode 100644 index 00000000..5d8cbef0 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/components/smart-area-cascader/province-city-district.ts @@ -0,0 +1,17546 @@ +export const PROVINCE_CITY_DISTRICT = [ + { + children: [ + { + children: [ + { + children: [], + label: '东城区', + value: 110101, + }, + { + children: [], + label: '西城区', + value: 110102, + }, + { + children: [], + label: '朝阳区', + value: 110105, + }, + { + children: [], + label: '丰台区', + value: 110106, + }, + { + children: [], + label: '石景山区', + value: 110107, + }, + { + children: [], + label: '海淀区', + value: 110108, + }, + { + children: [], + label: '门头沟区', + value: 110109, + }, + { + children: [], + label: '房山区', + value: 110111, + }, + { + children: [], + label: '通州区', + value: 110112, + }, + { + children: [], + label: '顺义区', + value: 110113, + }, + { + children: [], + label: '昌平区', + value: 110114, + }, + { + children: [], + label: '大兴区', + value: 110115, + }, + { + children: [], + label: '怀柔区', + value: 110116, + }, + { + children: [], + label: '平谷区', + value: 110117, + }, + { + children: [], + label: '密云区', + value: 110118, + }, + { + children: [], + label: '延庆区', + value: 110119, + }, + ], + label: '北京市', + value: 110100, + }, + ], + label: '北京市', + value: 110000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '和平区', + value: 120101, + }, + { + children: [], + label: '河东区', + value: 120102, + }, + { + children: [], + label: '河西区', + value: 120103, + }, + { + children: [], + label: '南开区', + value: 120104, + }, + { + children: [], + label: '河北区', + value: 120105, + }, + { + children: [], + label: '红桥区', + value: 120106, + }, + { + children: [], + label: '东丽区', + value: 120110, + }, + { + children: [], + label: '西青区', + value: 120111, + }, + { + children: [], + label: '津南区', + value: 120112, + }, + { + children: [], + label: '北辰区', + value: 120113, + }, + { + children: [], + label: '武清区', + value: 120114, + }, + { + children: [], + label: '宝坻区', + value: 120115, + }, + { + children: [], + label: '滨海新区', + value: 120116, + }, + { + children: [], + label: '宁河区', + value: 120117, + }, + { + children: [], + label: '静海区', + value: 120118, + }, + { + children: [], + label: '蓟州区', + value: 120119, + }, + ], + label: '天津市', + value: 120100, + }, + ], + label: '天津市', + value: 120000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '长安区', + value: 130102, + }, + { + children: [], + label: '桥西区', + value: 130104, + }, + { + children: [], + label: '新华区', + value: 130105, + }, + { + children: [], + label: '井陉矿区', + value: 130107, + }, + { + children: [], + label: '裕华区', + value: 130108, + }, + { + children: [], + label: '藁城区', + value: 130109, + }, + { + children: [], + label: '鹿泉区', + value: 130110, + }, + { + children: [], + label: '栾城区', + value: 130111, + }, + { + children: [], + label: '井陉县', + value: 130121, + }, + { + children: [], + label: '正定县', + value: 130123, + }, + { + children: [], + label: '行唐县', + value: 130125, + }, + { + children: [], + label: '灵寿县', + value: 130126, + }, + { + children: [], + label: '高邑县', + value: 130127, + }, + { + children: [], + label: '深泽县', + value: 130128, + }, + { + children: [], + label: '赞皇县', + value: 130129, + }, + { + children: [], + label: '无极县', + value: 130130, + }, + { + children: [], + label: '平山县', + value: 130131, + }, + { + children: [], + label: '元氏县', + value: 130132, + }, + { + children: [], + label: '赵县', + value: 130133, + }, + { + children: [], + label: '辛集市', + value: 130181, + }, + { + children: [], + label: '晋州市', + value: 130183, + }, + { + children: [], + label: '新乐市', + value: 130184, + }, + ], + label: '石家庄市', + value: 130100, + }, + { + children: [ + { + children: [], + label: '路南区', + value: 130202, + }, + { + children: [], + label: '路北区', + value: 130203, + }, + { + children: [], + label: '古冶区', + value: 130204, + }, + { + children: [], + label: '开平区', + value: 130205, + }, + { + children: [], + label: '丰南区', + value: 130207, + }, + { + children: [], + label: '丰润区', + value: 130208, + }, + { + children: [], + label: '曹妃甸区', + value: 130209, + }, + { + children: [], + label: '滦南县', + value: 130224, + }, + { + children: [], + label: '乐亭县', + value: 130225, + }, + { + children: [], + label: '迁西县', + value: 130227, + }, + { + children: [], + label: '玉田县', + value: 130229, + }, + { + children: [], + label: '遵化市', + value: 130281, + }, + { + children: [], + label: '迁安市', + value: 130283, + }, + { + children: [], + label: '滦州市', + value: 130284, + }, + ], + label: '唐山市', + value: 130200, + }, + { + children: [ + { + children: [], + label: '海港区', + value: 130302, + }, + { + children: [], + label: '山海关区', + value: 130303, + }, + { + children: [], + label: '北戴河区', + value: 130304, + }, + { + children: [], + label: '抚宁区', + value: 130306, + }, + { + children: [], + label: '青龙满族自治县', + value: 130321, + }, + { + children: [], + label: '昌黎县', + value: 130322, + }, + { + children: [], + label: '卢龙县', + value: 130324, + }, + ], + label: '秦皇岛市', + value: 130300, + }, + { + children: [ + { + children: [], + label: '邯山区', + value: 130402, + }, + { + children: [], + label: '丛台区', + value: 130403, + }, + { + children: [], + label: '复兴区', + value: 130404, + }, + { + children: [], + label: '峰峰矿区', + value: 130406, + }, + { + children: [], + label: '肥乡区', + value: 130407, + }, + { + children: [], + label: '永年区', + value: 130408, + }, + { + children: [], + label: '临漳县', + value: 130423, + }, + { + children: [], + label: '成安县', + value: 130424, + }, + { + children: [], + label: '大名县', + value: 130425, + }, + { + children: [], + label: '涉县', + value: 130426, + }, + { + children: [], + label: '磁县', + value: 130427, + }, + { + children: [], + label: '邱县', + value: 130430, + }, + { + children: [], + label: '鸡泽县', + value: 130431, + }, + { + children: [], + label: '广平县', + value: 130432, + }, + { + children: [], + label: '馆陶县', + value: 130433, + }, + { + children: [], + label: '魏县', + value: 130434, + }, + { + children: [], + label: '曲周县', + value: 130435, + }, + { + children: [], + label: '武安市', + value: 130481, + }, + ], + label: '邯郸市', + value: 130400, + }, + { + children: [ + { + children: [], + label: '桥东区', + value: 130502, + }, + { + children: [], + label: '桥西区', + value: 130503, + }, + { + children: [], + label: '邢台县', + value: 130521, + }, + { + children: [], + label: '临城县', + value: 130522, + }, + { + children: [], + label: '内丘县', + value: 130523, + }, + { + children: [], + label: '柏乡县', + value: 130524, + }, + { + children: [], + label: '隆尧县', + value: 130525, + }, + { + children: [], + label: '任县', + value: 130526, + }, + { + children: [], + label: '南和县', + value: 130527, + }, + { + children: [], + label: '宁晋县', + value: 130528, + }, + { + children: [], + label: '巨鹿县', + value: 130529, + }, + { + children: [], + label: '新河县', + value: 130530, + }, + { + children: [], + label: '广宗县', + value: 130531, + }, + { + children: [], + label: '平乡县', + value: 130532, + }, + { + children: [], + label: '威县', + value: 130533, + }, + { + children: [], + label: '清河县', + value: 130534, + }, + { + children: [], + label: '临西县', + value: 130535, + }, + { + children: [], + label: '南宫市', + value: 130581, + }, + { + children: [], + label: '沙河市', + value: 130582, + }, + ], + label: '邢台市', + value: 130500, + }, + { + children: [ + { + children: [], + label: '竞秀区', + value: 130602, + }, + { + children: [], + label: '莲池区', + value: 130606, + }, + { + children: [], + label: '满城区', + value: 130607, + }, + { + children: [], + label: '清苑区', + value: 130608, + }, + { + children: [], + label: '徐水区', + value: 130609, + }, + { + children: [], + label: '涞水县', + value: 130623, + }, + { + children: [], + label: '阜平县', + value: 130624, + }, + { + children: [], + label: '定兴县', + value: 130626, + }, + { + children: [], + label: '唐县', + value: 130627, + }, + { + children: [], + label: '高阳县', + value: 130628, + }, + { + children: [], + label: '容城县', + value: 130629, + }, + { + children: [], + label: '涞源县', + value: 130630, + }, + { + children: [], + label: '望都县', + value: 130631, + }, + { + children: [], + label: '安新县', + value: 130632, + }, + { + children: [], + label: '易县', + value: 130633, + }, + { + children: [], + label: '曲阳县', + value: 130634, + }, + { + children: [], + label: '蠡县', + value: 130635, + }, + { + children: [], + label: '顺平县', + value: 130636, + }, + { + children: [], + label: '博野县', + value: 130637, + }, + { + children: [], + label: '雄县', + value: 130638, + }, + { + children: [], + label: '涿州市', + value: 130681, + }, + { + children: [], + label: '定州市', + value: 130682, + }, + { + children: [], + label: '安国市', + value: 130683, + }, + { + children: [], + label: '高碑店市', + value: 130684, + }, + ], + label: '保定市', + value: 130600, + }, + { + children: [ + { + children: [], + label: '桥东区', + value: 130702, + }, + { + children: [], + label: '桥西区', + value: 130703, + }, + { + children: [], + label: '宣化区', + value: 130705, + }, + { + children: [], + label: '下花园区', + value: 130706, + }, + { + children: [], + label: '万全区', + value: 130708, + }, + { + children: [], + label: '崇礼区', + value: 130709, + }, + { + children: [], + label: '张北县', + value: 130722, + }, + { + children: [], + label: '康保县', + value: 130723, + }, + { + children: [], + label: '沽源县', + value: 130724, + }, + { + children: [], + label: '尚义县', + value: 130725, + }, + { + children: [], + label: '蔚县', + value: 130726, + }, + { + children: [], + label: '阳原县', + value: 130727, + }, + { + children: [], + label: '怀安县', + value: 130728, + }, + { + children: [], + label: '怀来县', + value: 130730, + }, + { + children: [], + label: '涿鹿县', + value: 130731, + }, + { + children: [], + label: '赤城县', + value: 130732, + }, + ], + label: '张家口市', + value: 130700, + }, + { + children: [ + { + children: [], + label: '双桥区', + value: 130802, + }, + { + children: [], + label: '双滦区', + value: 130803, + }, + { + children: [], + label: '鹰手营子矿区', + value: 130804, + }, + { + children: [], + label: '承德县', + value: 130821, + }, + { + children: [], + label: '兴隆县', + value: 130822, + }, + { + children: [], + label: '滦平县', + value: 130824, + }, + { + children: [], + label: '隆化县', + value: 130825, + }, + { + children: [], + label: '丰宁满族自治县', + value: 130826, + }, + { + children: [], + label: '宽城满族自治县', + value: 130827, + }, + { + children: [], + label: '围场满族蒙古族自治县', + value: 130828, + }, + { + children: [], + label: '平泉市', + value: 130881, + }, + ], + label: '承德市', + value: 130800, + }, + { + children: [ + { + children: [], + label: '新华区', + value: 130902, + }, + { + children: [], + label: '运河区', + value: 130903, + }, + { + children: [], + label: '沧县', + value: 130921, + }, + { + children: [], + label: '青县', + value: 130922, + }, + { + children: [], + label: '东光县', + value: 130923, + }, + { + children: [], + label: '海兴县', + value: 130924, + }, + { + children: [], + label: '盐山县', + value: 130925, + }, + { + children: [], + label: '肃宁县', + value: 130926, + }, + { + children: [], + label: '南皮县', + value: 130927, + }, + { + children: [], + label: '吴桥县', + value: 130928, + }, + { + children: [], + label: '献县', + value: 130929, + }, + { + children: [], + label: '孟村回族自治县', + value: 130930, + }, + { + children: [], + label: '泊头市', + value: 130981, + }, + { + children: [], + label: '任丘市', + value: 130982, + }, + { + children: [], + label: '黄骅市', + value: 130983, + }, + { + children: [], + label: '河间市', + value: 130984, + }, + ], + label: '沧州市', + value: 130900, + }, + { + children: [ + { + children: [], + label: '安次区', + value: 131002, + }, + { + children: [], + label: '广阳区', + value: 131003, + }, + { + children: [], + label: '固安县', + value: 131022, + }, + { + children: [], + label: '永清县', + value: 131023, + }, + { + children: [], + label: '香河县', + value: 131024, + }, + { + children: [], + label: '大城县', + value: 131025, + }, + { + children: [], + label: '文安县', + value: 131026, + }, + { + children: [], + label: '大厂回族自治县', + value: 131028, + }, + { + children: [], + label: '霸州市', + value: 131081, + }, + { + children: [], + label: '三河市', + value: 131082, + }, + ], + label: '廊坊市', + value: 131000, + }, + { + children: [ + { + children: [], + label: '桃城区', + value: 131102, + }, + { + children: [], + label: '冀州区', + value: 131103, + }, + { + children: [], + label: '枣强县', + value: 131121, + }, + { + children: [], + label: '武邑县', + value: 131122, + }, + { + children: [], + label: '武强县', + value: 131123, + }, + { + children: [], + label: '饶阳县', + value: 131124, + }, + { + children: [], + label: '安平县', + value: 131125, + }, + { + children: [], + label: '故城县', + value: 131126, + }, + { + children: [], + label: '景县', + value: 131127, + }, + { + children: [], + label: '阜城县', + value: 131128, + }, + { + children: [], + label: '深州市', + value: 131182, + }, + ], + label: '衡水市', + value: 131100, + }, + ], + label: '河北省', + value: 130000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '小店区', + value: 140105, + }, + { + children: [], + label: '迎泽区', + value: 140106, + }, + { + children: [], + label: '杏花岭区', + value: 140107, + }, + { + children: [], + label: '尖草坪区', + value: 140108, + }, + { + children: [], + label: '万柏林区', + value: 140109, + }, + { + children: [], + label: '晋源区', + value: 140110, + }, + { + children: [], + label: '清徐县', + value: 140121, + }, + { + children: [], + label: '阳曲县', + value: 140122, + }, + { + children: [], + label: '娄烦县', + value: 140123, + }, + { + children: [], + label: '古交市', + value: 140181, + }, + ], + label: '太原市', + value: 140100, + }, + { + children: [ + { + children: [], + label: '新荣区', + value: 140212, + }, + { + children: [], + label: '平城区', + value: 140213, + }, + { + children: [], + label: '云冈区', + value: 140214, + }, + { + children: [], + label: '云州区', + value: 140215, + }, + { + children: [], + label: '阳高县', + value: 140221, + }, + { + children: [], + label: '天镇县', + value: 140222, + }, + { + children: [], + label: '广灵县', + value: 140223, + }, + { + children: [], + label: '灵丘县', + value: 140224, + }, + { + children: [], + label: '浑源县', + value: 140225, + }, + { + children: [], + label: '左云县', + value: 140226, + }, + ], + label: '大同市', + value: 140200, + }, + { + children: [ + { + children: [], + label: '城区', + value: 140302, + }, + { + children: [], + label: '矿区', + value: 140303, + }, + { + children: [], + label: '郊区', + value: 140311, + }, + { + children: [], + label: '平定县', + value: 140321, + }, + { + children: [], + label: '盂县', + value: 140322, + }, + ], + label: '阳泉市', + value: 140300, + }, + { + children: [ + { + children: [], + label: '潞州区', + value: 140403, + }, + { + children: [], + label: '上党区', + value: 140404, + }, + { + children: [], + label: '屯留区', + value: 140405, + }, + { + children: [], + label: '潞城区', + value: 140406, + }, + { + children: [], + label: '襄垣县', + value: 140423, + }, + { + children: [], + label: '平顺县', + value: 140425, + }, + { + children: [], + label: '黎城县', + value: 140426, + }, + { + children: [], + label: '壶关县', + value: 140427, + }, + { + children: [], + label: '长子县', + value: 140428, + }, + { + children: [], + label: '武乡县', + value: 140429, + }, + { + children: [], + label: '沁县', + value: 140430, + }, + { + children: [], + label: '沁源县', + value: 140431, + }, + ], + label: '长治市', + value: 140400, + }, + { + children: [ + { + children: [], + label: '城区', + value: 140502, + }, + { + children: [], + label: '沁水县', + value: 140521, + }, + { + children: [], + label: '阳城县', + value: 140522, + }, + { + children: [], + label: '陵川县', + value: 140524, + }, + { + children: [], + label: '泽州县', + value: 140525, + }, + { + children: [], + label: '高平市', + value: 140581, + }, + ], + label: '晋城市', + value: 140500, + }, + { + children: [ + { + children: [], + label: '朔城区', + value: 140602, + }, + { + children: [], + label: '平鲁区', + value: 140603, + }, + { + children: [], + label: '山阴县', + value: 140621, + }, + { + children: [], + label: '应县', + value: 140622, + }, + { + children: [], + label: '右玉县', + value: 140623, + }, + { + children: [], + label: '怀仁市', + value: 140681, + }, + ], + label: '朔州市', + value: 140600, + }, + { + children: [ + { + children: [], + label: '榆次区', + value: 140702, + }, + { + children: [], + label: '榆社县', + value: 140721, + }, + { + children: [], + label: '左权县', + value: 140722, + }, + { + children: [], + label: '和顺县', + value: 140723, + }, + { + children: [], + label: '昔阳县', + value: 140724, + }, + { + children: [], + label: '寿阳县', + value: 140725, + }, + { + children: [], + label: '太谷县', + value: 140726, + }, + { + children: [], + label: '祁县', + value: 140727, + }, + { + children: [], + label: '平遥县', + value: 140728, + }, + { + children: [], + label: '灵石县', + value: 140729, + }, + { + children: [], + label: '介休市', + value: 140781, + }, + ], + label: '晋中市', + value: 140700, + }, + { + children: [ + { + children: [], + label: '盐湖区', + value: 140802, + }, + { + children: [], + label: '临猗县', + value: 140821, + }, + { + children: [], + label: '万荣县', + value: 140822, + }, + { + children: [], + label: '闻喜县', + value: 140823, + }, + { + children: [], + label: '稷山县', + value: 140824, + }, + { + children: [], + label: '新绛县', + value: 140825, + }, + { + children: [], + label: '绛县', + value: 140826, + }, + { + children: [], + label: '垣曲县', + value: 140827, + }, + { + children: [], + label: '夏县', + value: 140828, + }, + { + children: [], + label: '平陆县', + value: 140829, + }, + { + children: [], + label: '芮城县', + value: 140830, + }, + { + children: [], + label: '永济市', + value: 140881, + }, + { + children: [], + label: '河津市', + value: 140882, + }, + ], + label: '运城市', + value: 140800, + }, + { + children: [ + { + children: [], + label: '忻府区', + value: 140902, + }, + { + children: [], + label: '定襄县', + value: 140921, + }, + { + children: [], + label: '五台县', + value: 140922, + }, + { + children: [], + label: '代县', + value: 140923, + }, + { + children: [], + label: '繁峙县', + value: 140924, + }, + { + children: [], + label: '宁武县', + value: 140925, + }, + { + children: [], + label: '静乐县', + value: 140926, + }, + { + children: [], + label: '神池县', + value: 140927, + }, + { + children: [], + label: '五寨县', + value: 140928, + }, + { + children: [], + label: '岢岚县', + value: 140929, + }, + { + children: [], + label: '河曲县', + value: 140930, + }, + { + children: [], + label: '保德县', + value: 140931, + }, + { + children: [], + label: '偏关县', + value: 140932, + }, + { + children: [], + label: '原平市', + value: 140981, + }, + ], + label: '忻州市', + value: 140900, + }, + { + children: [ + { + children: [], + label: '尧都区', + value: 141002, + }, + { + children: [], + label: '曲沃县', + value: 141021, + }, + { + children: [], + label: '翼城县', + value: 141022, + }, + { + children: [], + label: '襄汾县', + value: 141023, + }, + { + children: [], + label: '洪洞县', + value: 141024, + }, + { + children: [], + label: '古县', + value: 141025, + }, + { + children: [], + label: '安泽县', + value: 141026, + }, + { + children: [], + label: '浮山县', + value: 141027, + }, + { + children: [], + label: '吉县', + value: 141028, + }, + { + children: [], + label: '乡宁县', + value: 141029, + }, + { + children: [], + label: '大宁县', + value: 141030, + }, + { + children: [], + label: '隰县', + value: 141031, + }, + { + children: [], + label: '永和县', + value: 141032, + }, + { + children: [], + label: '蒲县', + value: 141033, + }, + { + children: [], + label: '汾西县', + value: 141034, + }, + { + children: [], + label: '侯马市', + value: 141081, + }, + { + children: [], + label: '霍州市', + value: 141082, + }, + ], + label: '临汾市', + value: 141000, + }, + { + children: [ + { + children: [], + label: '离石区', + value: 141102, + }, + { + children: [], + label: '文水县', + value: 141121, + }, + { + children: [], + label: '交城县', + value: 141122, + }, + { + children: [], + label: '兴县', + value: 141123, + }, + { + children: [], + label: '临县', + value: 141124, + }, + { + children: [], + label: '柳林县', + value: 141125, + }, + { + children: [], + label: '石楼县', + value: 141126, + }, + { + children: [], + label: '岚县', + value: 141127, + }, + { + children: [], + label: '方山县', + value: 141128, + }, + { + children: [], + label: '中阳县', + value: 141129, + }, + { + children: [], + label: '交口县', + value: 141130, + }, + { + children: [], + label: '孝义市', + value: 141181, + }, + { + children: [], + label: '汾阳市', + value: 141182, + }, + ], + label: '吕梁市', + value: 141100, + }, + ], + label: '山西省', + value: 140000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '新城区', + value: 150102, + }, + { + children: [], + label: '回民区', + value: 150103, + }, + { + children: [], + label: '玉泉区', + value: 150104, + }, + { + children: [], + label: '赛罕区', + value: 150105, + }, + { + children: [], + label: '土默特左旗', + value: 150121, + }, + { + children: [], + label: '托克托县', + value: 150122, + }, + { + children: [], + label: '和林格尔县', + value: 150123, + }, + { + children: [], + label: '清水河县', + value: 150124, + }, + { + children: [], + label: '武川县', + value: 150125, + }, + ], + label: '呼和浩特市', + value: 150100, + }, + { + children: [ + { + children: [], + label: '东河区', + value: 150202, + }, + { + children: [], + label: '昆都仑区', + value: 150203, + }, + { + children: [], + label: '青山区', + value: 150204, + }, + { + children: [], + label: '石拐区', + value: 150205, + }, + { + children: [], + label: '白云鄂博矿区', + value: 150206, + }, + { + children: [], + label: '九原区', + value: 150207, + }, + { + children: [], + label: '土默特右旗', + value: 150221, + }, + { + children: [], + label: '固阳县', + value: 150222, + }, + { + children: [], + label: '达尔罕茂明安联合旗', + value: 150223, + }, + ], + label: '包头市', + value: 150200, + }, + { + children: [ + { + children: [], + label: '海勃湾区', + value: 150302, + }, + { + children: [], + label: '海南区', + value: 150303, + }, + { + children: [], + label: '乌达区', + value: 150304, + }, + ], + label: '乌海市', + value: 150300, + }, + { + children: [ + { + children: [], + label: '红山区', + value: 150402, + }, + { + children: [], + label: '元宝山区', + value: 150403, + }, + { + children: [], + label: '松山区', + value: 150404, + }, + { + children: [], + label: '阿鲁科尔沁旗', + value: 150421, + }, + { + children: [], + label: '巴林左旗', + value: 150422, + }, + { + children: [], + label: '巴林右旗', + value: 150423, + }, + { + children: [], + label: '林西县', + value: 150424, + }, + { + children: [], + label: '克什克腾旗', + value: 150425, + }, + { + children: [], + label: '翁牛特旗', + value: 150426, + }, + { + children: [], + label: '喀喇沁旗', + value: 150428, + }, + { + children: [], + label: '宁城县', + value: 150429, + }, + { + children: [], + label: '敖汉旗', + value: 150430, + }, + ], + label: '赤峰市', + value: 150400, + }, + { + children: [ + { + children: [], + label: '科尔沁区', + value: 150502, + }, + { + children: [], + label: '科尔沁左翼中旗', + value: 150521, + }, + { + children: [], + label: '科尔沁左翼后旗', + value: 150522, + }, + { + children: [], + label: '开鲁县', + value: 150523, + }, + { + children: [], + label: '库伦旗', + value: 150524, + }, + { + children: [], + label: '奈曼旗', + value: 150525, + }, + { + children: [], + label: '扎鲁特旗', + value: 150526, + }, + { + children: [], + label: '霍林郭勒市', + value: 150581, + }, + ], + label: '通辽市', + value: 150500, + }, + { + children: [ + { + children: [], + label: '东胜区', + value: 150602, + }, + { + children: [], + label: '康巴什区', + value: 150603, + }, + { + children: [], + label: '达拉特旗', + value: 150621, + }, + { + children: [], + label: '准格尔旗', + value: 150622, + }, + { + children: [], + label: '鄂托克前旗', + value: 150623, + }, + { + children: [], + label: '鄂托克旗', + value: 150624, + }, + { + children: [], + label: '杭锦旗', + value: 150625, + }, + { + children: [], + label: '乌审旗', + value: 150626, + }, + { + children: [], + label: '伊金霍洛旗', + value: 150627, + }, + ], + label: '鄂尔多斯市', + value: 150600, + }, + { + children: [ + { + children: [], + label: '海拉尔区', + value: 150702, + }, + { + children: [], + label: '扎赉诺尔区', + value: 150703, + }, + { + children: [], + label: '阿荣旗', + value: 150721, + }, + { + children: [], + label: '莫力达瓦达斡尔族自治旗', + value: 150722, + }, + { + children: [], + label: '鄂伦春自治旗', + value: 150723, + }, + { + children: [], + label: '鄂温克族自治旗', + value: 150724, + }, + { + children: [], + label: '陈巴尔虎旗', + value: 150725, + }, + { + children: [], + label: '新巴尔虎左旗', + value: 150726, + }, + { + children: [], + label: '新巴尔虎右旗', + value: 150727, + }, + { + children: [], + label: '满洲里市', + value: 150781, + }, + { + children: [], + label: '牙克石市', + value: 150782, + }, + { + children: [], + label: '扎兰屯市', + value: 150783, + }, + { + children: [], + label: '额尔古纳市', + value: 150784, + }, + { + children: [], + label: '根河市', + value: 150785, + }, + ], + label: '呼伦贝尔市', + value: 150700, + }, + { + children: [ + { + children: [], + label: '临河区', + value: 150802, + }, + { + children: [], + label: '五原县', + value: 150821, + }, + { + children: [], + label: '磴口县', + value: 150822, + }, + { + children: [], + label: '乌拉特前旗', + value: 150823, + }, + { + children: [], + label: '乌拉特中旗', + value: 150824, + }, + { + children: [], + label: '乌拉特后旗', + value: 150825, + }, + { + children: [], + label: '杭锦后旗', + value: 150826, + }, + ], + label: '巴彦淖尔市', + value: 150800, + }, + { + children: [ + { + children: [], + label: '集宁区', + value: 150902, + }, + { + children: [], + label: '卓资县', + value: 150921, + }, + { + children: [], + label: '化德县', + value: 150922, + }, + { + children: [], + label: '商都县', + value: 150923, + }, + { + children: [], + label: '兴和县', + value: 150924, + }, + { + children: [], + label: '凉城县', + value: 150925, + }, + { + children: [], + label: '察哈尔右翼前旗', + value: 150926, + }, + { + children: [], + label: '察哈尔右翼中旗', + value: 150927, + }, + { + children: [], + label: '察哈尔右翼后旗', + value: 150928, + }, + { + children: [], + label: '四子王旗', + value: 150929, + }, + { + children: [], + label: '丰镇市', + value: 150981, + }, + ], + label: '乌兰察布市', + value: 150900, + }, + { + children: [ + { + children: [], + label: '乌兰浩特市', + value: 152201, + }, + { + children: [], + label: '阿尔山市', + value: 152202, + }, + { + children: [], + label: '科尔沁右翼前旗', + value: 152221, + }, + { + children: [], + label: '科尔沁右翼中旗', + value: 152222, + }, + { + children: [], + label: '扎赉特旗', + value: 152223, + }, + { + children: [], + label: '突泉县', + value: 152224, + }, + ], + label: '兴安盟', + value: 152200, + }, + { + children: [ + { + children: [], + label: '二连浩特市', + value: 152501, + }, + { + children: [], + label: '锡林浩特市', + value: 152502, + }, + { + children: [], + label: '阿巴嘎旗', + value: 152522, + }, + { + children: [], + label: '苏尼特左旗', + value: 152523, + }, + { + children: [], + label: '苏尼特右旗', + value: 152524, + }, + { + children: [], + label: '东乌珠穆沁旗', + value: 152525, + }, + { + children: [], + label: '西乌珠穆沁旗', + value: 152526, + }, + { + children: [], + label: '太仆寺旗', + value: 152527, + }, + { + children: [], + label: '镶黄旗', + value: 152528, + }, + { + children: [], + label: '正镶白旗', + value: 152529, + }, + { + children: [], + label: '正蓝旗', + value: 152530, + }, + { + children: [], + label: '多伦县', + value: 152531, + }, + ], + label: '锡林郭勒盟', + value: 152500, + }, + { + children: [ + { + children: [], + label: '阿拉善左旗', + value: 152921, + }, + { + children: [], + label: '阿拉善右旗', + value: 152922, + }, + { + children: [], + label: '额济纳旗', + value: 152923, + }, + ], + label: '阿拉善盟', + value: 152900, + }, + ], + label: '内蒙古自治区', + value: 150000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '和平区', + value: 210102, + }, + { + children: [], + label: '沈河区', + value: 210103, + }, + { + children: [], + label: '大东区', + value: 210104, + }, + { + children: [], + label: '皇姑区', + value: 210105, + }, + { + children: [], + label: '铁西区', + value: 210106, + }, + { + children: [], + label: '苏家屯区', + value: 210111, + }, + { + children: [], + label: '浑南区', + value: 210112, + }, + { + children: [], + label: '沈北新区', + value: 210113, + }, + { + children: [], + label: '于洪区', + value: 210114, + }, + { + children: [], + label: '辽中区', + value: 210115, + }, + { + children: [], + label: '康平县', + value: 210123, + }, + { + children: [], + label: '法库县', + value: 210124, + }, + { + children: [], + label: '新民市', + value: 210181, + }, + ], + label: '沈阳市', + value: 210100, + }, + { + children: [ + { + children: [], + label: '中山区', + value: 210202, + }, + { + children: [], + label: '西岗区', + value: 210203, + }, + { + children: [], + label: '沙河口区', + value: 210204, + }, + { + children: [], + label: '甘井子区', + value: 210211, + }, + { + children: [], + label: '旅顺口区', + value: 210212, + }, + { + children: [], + label: '金州区', + value: 210213, + }, + { + children: [], + label: '普兰店区', + value: 210214, + }, + { + children: [], + label: '长海县', + value: 210224, + }, + { + children: [], + label: '瓦房店市', + value: 210281, + }, + { + children: [], + label: '庄河市', + value: 210283, + }, + ], + label: '大连市', + value: 210200, + }, + { + children: [ + { + children: [], + label: '铁东区', + value: 210302, + }, + { + children: [], + label: '铁西区', + value: 210303, + }, + { + children: [], + label: '立山区', + value: 210304, + }, + { + children: [], + label: '千山区', + value: 210311, + }, + { + children: [], + label: '台安县', + value: 210321, + }, + { + children: [], + label: '岫岩满族自治县', + value: 210323, + }, + { + children: [], + label: '海城市', + value: 210381, + }, + ], + label: '鞍山市', + value: 210300, + }, + { + children: [ + { + children: [], + label: '新抚区', + value: 210402, + }, + { + children: [], + label: '东洲区', + value: 210403, + }, + { + children: [], + label: '望花区', + value: 210404, + }, + { + children: [], + label: '顺城区', + value: 210411, + }, + { + children: [], + label: '抚顺县', + value: 210421, + }, + { + children: [], + label: '新宾满族自治县', + value: 210422, + }, + { + children: [], + label: '清原满族自治县', + value: 210423, + }, + ], + label: '抚顺市', + value: 210400, + }, + { + children: [ + { + children: [], + label: '平山区', + value: 210502, + }, + { + children: [], + label: '溪湖区', + value: 210503, + }, + { + children: [], + label: '明山区', + value: 210504, + }, + { + children: [], + label: '南芬区', + value: 210505, + }, + { + children: [], + label: '本溪满族自治县', + value: 210521, + }, + { + children: [], + label: '桓仁满族自治县', + value: 210522, + }, + ], + label: '本溪市', + value: 210500, + }, + { + children: [ + { + children: [], + label: '元宝区', + value: 210602, + }, + { + children: [], + label: '振兴区', + value: 210603, + }, + { + children: [], + label: '振安区', + value: 210604, + }, + { + children: [], + label: '宽甸满族自治县', + value: 210624, + }, + { + children: [], + label: '东港市', + value: 210681, + }, + { + children: [], + label: '凤城市', + value: 210682, + }, + ], + label: '丹东市', + value: 210600, + }, + { + children: [ + { + children: [], + label: '古塔区', + value: 210702, + }, + { + children: [], + label: '凌河区', + value: 210703, + }, + { + children: [], + label: '太和区', + value: 210711, + }, + { + children: [], + label: '黑山县', + value: 210726, + }, + { + children: [], + label: '义县', + value: 210727, + }, + { + children: [], + label: '凌海市', + value: 210781, + }, + { + children: [], + label: '北镇市', + value: 210782, + }, + ], + label: '锦州市', + value: 210700, + }, + { + children: [ + { + children: [], + label: '站前区', + value: 210802, + }, + { + children: [], + label: '西市区', + value: 210803, + }, + { + children: [], + label: '鲅鱼圈区', + value: 210804, + }, + { + children: [], + label: '老边区', + value: 210811, + }, + { + children: [], + label: '盖州市', + value: 210881, + }, + { + children: [], + label: '大石桥市', + value: 210882, + }, + ], + label: '营口市', + value: 210800, + }, + { + children: [ + { + children: [], + label: '海州区', + value: 210902, + }, + { + children: [], + label: '新邱区', + value: 210903, + }, + { + children: [], + label: '太平区', + value: 210904, + }, + { + children: [], + label: '清河门区', + value: 210905, + }, + { + children: [], + label: '细河区', + value: 210911, + }, + { + children: [], + label: '阜新蒙古族自治县', + value: 210921, + }, + { + children: [], + label: '彰武县', + value: 210922, + }, + ], + label: '阜新市', + value: 210900, + }, + { + children: [ + { + children: [], + label: '白塔区', + value: 211002, + }, + { + children: [], + label: '文圣区', + value: 211003, + }, + { + children: [], + label: '宏伟区', + value: 211004, + }, + { + children: [], + label: '弓长岭区', + value: 211005, + }, + { + children: [], + label: '太子河区', + value: 211011, + }, + { + children: [], + label: '辽阳县', + value: 211021, + }, + { + children: [], + label: '灯塔市', + value: 211081, + }, + ], + label: '辽阳市', + value: 211000, + }, + { + children: [ + { + children: [], + label: '双台子区', + value: 211102, + }, + { + children: [], + label: '兴隆台区', + value: 211103, + }, + { + children: [], + label: '大洼区', + value: 211104, + }, + { + children: [], + label: '盘山县', + value: 211122, + }, + ], + label: '盘锦市', + value: 211100, + }, + { + children: [ + { + children: [], + label: '银州区', + value: 211202, + }, + { + children: [], + label: '清河区', + value: 211204, + }, + { + children: [], + label: '铁岭县', + value: 211221, + }, + { + children: [], + label: '西丰县', + value: 211223, + }, + { + children: [], + label: '昌图县', + value: 211224, + }, + { + children: [], + label: '调兵山市', + value: 211281, + }, + { + children: [], + label: '开原市', + value: 211282, + }, + ], + label: '铁岭市', + value: 211200, + }, + { + children: [ + { + children: [], + label: '双塔区', + value: 211302, + }, + { + children: [], + label: '龙城区', + value: 211303, + }, + { + children: [], + label: '朝阳县', + value: 211321, + }, + { + children: [], + label: '建平县', + value: 211322, + }, + { + children: [], + label: '喀喇沁左翼蒙古族自治县', + value: 211324, + }, + { + children: [], + label: '北票市', + value: 211381, + }, + { + children: [], + label: '凌源市', + value: 211382, + }, + ], + label: '朝阳市', + value: 211300, + }, + { + children: [ + { + children: [], + label: '连山区', + value: 211402, + }, + { + children: [], + label: '龙港区', + value: 211403, + }, + { + children: [], + label: '南票区', + value: 211404, + }, + { + children: [], + label: '绥中县', + value: 211421, + }, + { + children: [], + label: '建昌县', + value: 211422, + }, + { + children: [], + label: '兴城市', + value: 211481, + }, + ], + label: '葫芦岛市', + value: 211400, + }, + ], + label: '辽宁省', + value: 210000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '南关区', + value: 220102, + }, + { + children: [], + label: '宽城区', + value: 220103, + }, + { + children: [], + label: '朝阳区', + value: 220104, + }, + { + children: [], + label: '二道区', + value: 220105, + }, + { + children: [], + label: '绿园区', + value: 220106, + }, + { + children: [], + label: '双阳区', + value: 220112, + }, + { + children: [], + label: '九台区', + value: 220113, + }, + { + children: [], + label: '农安县', + value: 220122, + }, + { + children: [], + label: '榆树市', + value: 220182, + }, + { + children: [], + label: '德惠市', + value: 220183, + }, + ], + label: '长春市', + value: 220100, + }, + { + children: [ + { + children: [], + label: '昌邑区', + value: 220202, + }, + { + children: [], + label: '龙潭区', + value: 220203, + }, + { + children: [], + label: '船营区', + value: 220204, + }, + { + children: [], + label: '丰满区', + value: 220211, + }, + { + children: [], + label: '永吉县', + value: 220221, + }, + { + children: [], + label: '蛟河市', + value: 220281, + }, + { + children: [], + label: '桦甸市', + value: 220282, + }, + { + children: [], + label: '舒兰市', + value: 220283, + }, + { + children: [], + label: '磐石市', + value: 220284, + }, + ], + label: '吉林市', + value: 220200, + }, + { + children: [ + { + children: [], + label: '铁西区', + value: 220302, + }, + { + children: [], + label: '铁东区', + value: 220303, + }, + { + children: [], + label: '梨树县', + value: 220322, + }, + { + children: [], + label: '伊通满族自治县', + value: 220323, + }, + { + children: [], + label: '公主岭市', + value: 220381, + }, + { + children: [], + label: '双辽市', + value: 220382, + }, + ], + label: '四平市', + value: 220300, + }, + { + children: [ + { + children: [], + label: '龙山区', + value: 220402, + }, + { + children: [], + label: '西安区', + value: 220403, + }, + { + children: [], + label: '东丰县', + value: 220421, + }, + { + children: [], + label: '东辽县', + value: 220422, + }, + ], + label: '辽源市', + value: 220400, + }, + { + children: [ + { + children: [], + label: '东昌区', + value: 220502, + }, + { + children: [], + label: '二道江区', + value: 220503, + }, + { + children: [], + label: '通化县', + value: 220521, + }, + { + children: [], + label: '辉南县', + value: 220523, + }, + { + children: [], + label: '柳河县', + value: 220524, + }, + { + children: [], + label: '梅河口市', + value: 220581, + }, + { + children: [], + label: '集安市', + value: 220582, + }, + ], + label: '通化市', + value: 220500, + }, + { + children: [ + { + children: [], + label: '浑江区', + value: 220602, + }, + { + children: [], + label: '江源区', + value: 220605, + }, + { + children: [], + label: '抚松县', + value: 220621, + }, + { + children: [], + label: '靖宇县', + value: 220622, + }, + { + children: [], + label: '长白朝鲜族自治县', + value: 220623, + }, + { + children: [], + label: '临江市', + value: 220681, + }, + ], + label: '白山市', + value: 220600, + }, + { + children: [ + { + children: [], + label: '宁江区', + value: 220702, + }, + { + children: [], + label: '前郭尔罗斯蒙古族自治县', + value: 220721, + }, + { + children: [], + label: '长岭县', + value: 220722, + }, + { + children: [], + label: '乾安县', + value: 220723, + }, + { + children: [], + label: '扶余市', + value: 220781, + }, + ], + label: '松原市', + value: 220700, + }, + { + children: [ + { + children: [], + label: '洮北区', + value: 220802, + }, + { + children: [], + label: '镇赉县', + value: 220821, + }, + { + children: [], + label: '通榆县', + value: 220822, + }, + { + children: [], + label: '洮南市', + value: 220881, + }, + { + children: [], + label: '大安市', + value: 220882, + }, + ], + label: '白城市', + value: 220800, + }, + { + children: [ + { + children: [], + label: '延吉市', + value: 222401, + }, + { + children: [], + label: '图们市', + value: 222402, + }, + { + children: [], + label: '敦化市', + value: 222403, + }, + { + children: [], + label: '珲春市', + value: 222404, + }, + { + children: [], + label: '龙井市', + value: 222405, + }, + { + children: [], + label: '和龙市', + value: 222406, + }, + { + children: [], + label: '汪清县', + value: 222424, + }, + { + children: [], + label: '安图县', + value: 222426, + }, + ], + label: '延边朝鲜族自治州', + value: 222400, + }, + ], + label: '吉林省', + value: 220000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '道里区', + value: 230102, + }, + { + children: [], + label: '南岗区', + value: 230103, + }, + { + children: [], + label: '道外区', + value: 230104, + }, + { + children: [], + label: '平房区', + value: 230108, + }, + { + children: [], + label: '松北区', + value: 230109, + }, + { + children: [], + label: '香坊区', + value: 230110, + }, + { + children: [], + label: '呼兰区', + value: 230111, + }, + { + children: [], + label: '阿城区', + value: 230112, + }, + { + children: [], + label: '双城区', + value: 230113, + }, + { + children: [], + label: '依兰县', + value: 230123, + }, + { + children: [], + label: '方正县', + value: 230124, + }, + { + children: [], + label: '宾县', + value: 230125, + }, + { + children: [], + label: '巴彦县', + value: 230126, + }, + { + children: [], + label: '木兰县', + value: 230127, + }, + { + children: [], + label: '通河县', + value: 230128, + }, + { + children: [], + label: '延寿县', + value: 230129, + }, + { + children: [], + label: '尚志市', + value: 230183, + }, + { + children: [], + label: '五常市', + value: 230184, + }, + ], + label: '哈尔滨市', + value: 230100, + }, + { + children: [ + { + children: [], + label: '龙沙区', + value: 230202, + }, + { + children: [], + label: '建华区', + value: 230203, + }, + { + children: [], + label: '铁锋区', + value: 230204, + }, + { + children: [], + label: '昂昂溪区', + value: 230205, + }, + { + children: [], + label: '富拉尔基区', + value: 230206, + }, + { + children: [], + label: '碾子山区', + value: 230207, + }, + { + children: [], + label: '梅里斯达斡尔族区', + value: 230208, + }, + { + children: [], + label: '龙江县', + value: 230221, + }, + { + children: [], + label: '依安县', + value: 230223, + }, + { + children: [], + label: '泰来县', + value: 230224, + }, + { + children: [], + label: '甘南县', + value: 230225, + }, + { + children: [], + label: '富裕县', + value: 230227, + }, + { + children: [], + label: '克山县', + value: 230229, + }, + { + children: [], + label: '克东县', + value: 230230, + }, + { + children: [], + label: '拜泉县', + value: 230231, + }, + { + children: [], + label: '讷河市', + value: 230281, + }, + ], + label: '齐齐哈尔市', + value: 230200, + }, + { + children: [ + { + children: [], + label: '鸡冠区', + value: 230302, + }, + { + children: [], + label: '恒山区', + value: 230303, + }, + { + children: [], + label: '滴道区', + value: 230304, + }, + { + children: [], + label: '梨树区', + value: 230305, + }, + { + children: [], + label: '城子河区', + value: 230306, + }, + { + children: [], + label: '麻山区', + value: 230307, + }, + { + children: [], + label: '鸡东县', + value: 230321, + }, + { + children: [], + label: '虎林市', + value: 230381, + }, + { + children: [], + label: '密山市', + value: 230382, + }, + ], + label: '鸡西市', + value: 230300, + }, + { + children: [ + { + children: [], + label: '向阳区', + value: 230402, + }, + { + children: [], + label: '工农区', + value: 230403, + }, + { + children: [], + label: '南山区', + value: 230404, + }, + { + children: [], + label: '兴安区', + value: 230405, + }, + { + children: [], + label: '东山区', + value: 230406, + }, + { + children: [], + label: '兴山区', + value: 230407, + }, + { + children: [], + label: '萝北县', + value: 230421, + }, + { + children: [], + label: '绥滨县', + value: 230422, + }, + ], + label: '鹤岗市', + value: 230400, + }, + { + children: [ + { + children: [], + label: '尖山区', + value: 230502, + }, + { + children: [], + label: '岭东区', + value: 230503, + }, + { + children: [], + label: '四方台区', + value: 230505, + }, + { + children: [], + label: '宝山区', + value: 230506, + }, + { + children: [], + label: '集贤县', + value: 230521, + }, + { + children: [], + label: '友谊县', + value: 230522, + }, + { + children: [], + label: '宝清县', + value: 230523, + }, + { + children: [], + label: '饶河县', + value: 230524, + }, + ], + label: '双鸭山市', + value: 230500, + }, + { + children: [ + { + children: [], + label: '萨尔图区', + value: 230602, + }, + { + children: [], + label: '龙凤区', + value: 230603, + }, + { + children: [], + label: '让胡路区', + value: 230604, + }, + { + children: [], + label: '红岗区', + value: 230605, + }, + { + children: [], + label: '大同区', + value: 230606, + }, + { + children: [], + label: '肇州县', + value: 230621, + }, + { + children: [], + label: '肇源县', + value: 230622, + }, + { + children: [], + label: '林甸县', + value: 230623, + }, + { + children: [], + label: '杜尔伯特蒙古族自治县', + value: 230624, + }, + ], + label: '大庆市', + value: 230600, + }, + { + children: [ + { + children: [], + label: '伊春区', + value: 230702, + }, + { + children: [], + label: '南岔区', + value: 230703, + }, + { + children: [], + label: '友好区', + value: 230704, + }, + { + children: [], + label: '西林区', + value: 230705, + }, + { + children: [], + label: '翠峦区', + value: 230706, + }, + { + children: [], + label: '新青区', + value: 230707, + }, + { + children: [], + label: '美溪区', + value: 230708, + }, + { + children: [], + label: '金山屯区', + value: 230709, + }, + { + children: [], + label: '五营区', + value: 230710, + }, + { + children: [], + label: '乌马河区', + value: 230711, + }, + { + children: [], + label: '汤旺河区', + value: 230712, + }, + { + children: [], + label: '带岭区', + value: 230713, + }, + { + children: [], + label: '乌伊岭区', + value: 230714, + }, + { + children: [], + label: '红星区', + value: 230715, + }, + { + children: [], + label: '上甘岭区', + value: 230716, + }, + { + children: [], + label: '嘉荫县', + value: 230722, + }, + { + children: [], + label: '铁力市', + value: 230781, + }, + ], + label: '伊春市', + value: 230700, + }, + { + children: [ + { + children: [], + label: '向阳区', + value: 230803, + }, + { + children: [], + label: '前进区', + value: 230804, + }, + { + children: [], + label: '东风区', + value: 230805, + }, + { + children: [], + label: '郊区', + value: 230811, + }, + { + children: [], + label: '桦南县', + value: 230822, + }, + { + children: [], + label: '桦川县', + value: 230826, + }, + { + children: [], + label: '汤原县', + value: 230828, + }, + { + children: [], + label: '同江市', + value: 230881, + }, + { + children: [], + label: '富锦市', + value: 230882, + }, + { + children: [], + label: '抚远市', + value: 230883, + }, + ], + label: '佳木斯市', + value: 230800, + }, + { + children: [ + { + children: [], + label: '新兴区', + value: 230902, + }, + { + children: [], + label: '桃山区', + value: 230903, + }, + { + children: [], + label: '茄子河区', + value: 230904, + }, + { + children: [], + label: '勃利县', + value: 230921, + }, + ], + label: '七台河市', + value: 230900, + }, + { + children: [ + { + children: [], + label: '东安区', + value: 231002, + }, + { + children: [], + label: '阳明区', + value: 231003, + }, + { + children: [], + label: '爱民区', + value: 231004, + }, + { + children: [], + label: '西安区', + value: 231005, + }, + { + children: [], + label: '林口县', + value: 231025, + }, + { + children: [], + label: '绥芬河市', + value: 231081, + }, + { + children: [], + label: '海林市', + value: 231083, + }, + { + children: [], + label: '宁安市', + value: 231084, + }, + { + children: [], + label: '穆棱市', + value: 231085, + }, + { + children: [], + label: '东宁市', + value: 231086, + }, + ], + label: '牡丹江市', + value: 231000, + }, + { + children: [ + { + children: [], + label: '爱辉区', + value: 231102, + }, + { + children: [], + label: '嫩江县', + value: 231121, + }, + { + children: [], + label: '逊克县', + value: 231123, + }, + { + children: [], + label: '孙吴县', + value: 231124, + }, + { + children: [], + label: '北安市', + value: 231181, + }, + { + children: [], + label: '五大连池市', + value: 231182, + }, + ], + label: '黑河市', + value: 231100, + }, + { + children: [ + { + children: [], + label: '北林区', + value: 231202, + }, + { + children: [], + label: '望奎县', + value: 231221, + }, + { + children: [], + label: '兰西县', + value: 231222, + }, + { + children: [], + label: '青冈县', + value: 231223, + }, + { + children: [], + label: '庆安县', + value: 231224, + }, + { + children: [], + label: '明水县', + value: 231225, + }, + { + children: [], + label: '绥棱县', + value: 231226, + }, + { + children: [], + label: '安达市', + value: 231281, + }, + { + children: [], + label: '肇东市', + value: 231282, + }, + { + children: [], + label: '海伦市', + value: 231283, + }, + ], + label: '绥化市', + value: 231200, + }, + { + children: [ + { + children: [], + label: '漠河市', + value: 232701, + }, + { + children: [], + label: '呼玛县', + value: 232721, + }, + { + children: [], + label: '塔河县', + value: 232722, + }, + { + children: [], + label: '大兴安岭地区直辖', + value: 232723, + }, + ], + label: '大兴安岭地区', + value: 232700, + }, + ], + label: '黑龙江省', + value: 230000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '黄浦区', + value: 310101, + }, + { + children: [], + label: '徐汇区', + value: 310104, + }, + { + children: [], + label: '长宁区', + value: 310105, + }, + { + children: [], + label: '静安区', + value: 310106, + }, + { + children: [], + label: '普陀区', + value: 310107, + }, + { + children: [], + label: '虹口区', + value: 310109, + }, + { + children: [], + label: '杨浦区', + value: 310110, + }, + { + children: [], + label: '闵行区', + value: 310112, + }, + { + children: [], + label: '宝山区', + value: 310113, + }, + { + children: [], + label: '嘉定区', + value: 310114, + }, + { + children: [], + label: '浦东新区', + value: 310115, + }, + { + children: [], + label: '金山区', + value: 310116, + }, + { + children: [], + label: '松江区', + value: 310117, + }, + { + children: [], + label: '青浦区', + value: 310118, + }, + { + children: [], + label: '奉贤区', + value: 310120, + }, + { + children: [], + label: '崇明区', + value: 310151, + }, + ], + label: '上海市', + value: 310100, + }, + ], + label: '上海市', + value: 310000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '玄武区', + value: 320102, + }, + { + children: [], + label: '秦淮区', + value: 320104, + }, + { + children: [], + label: '建邺区', + value: 320105, + }, + { + children: [], + label: '鼓楼区', + value: 320106, + }, + { + children: [], + label: '浦口区', + value: 320111, + }, + { + children: [], + label: '栖霞区', + value: 320113, + }, + { + children: [], + label: '雨花台区', + value: 320114, + }, + { + children: [], + label: '江宁区', + value: 320115, + }, + { + children: [], + label: '六合区', + value: 320116, + }, + { + children: [], + label: '溧水区', + value: 320117, + }, + { + children: [], + label: '高淳区', + value: 320118, + }, + ], + label: '南京市', + value: 320100, + }, + { + children: [ + { + children: [], + label: '锡山区', + value: 320205, + }, + { + children: [], + label: '惠山区', + value: 320206, + }, + { + children: [], + label: '滨湖区', + value: 320211, + }, + { + children: [], + label: '梁溪区', + value: 320213, + }, + { + children: [], + label: '新吴区', + value: 320214, + }, + { + children: [], + label: '江阴市', + value: 320281, + }, + { + children: [], + label: '宜兴市', + value: 320282, + }, + ], + label: '无锡市', + value: 320200, + }, + { + children: [ + { + children: [], + label: '鼓楼区', + value: 320302, + }, + { + children: [], + label: '云龙区', + value: 320303, + }, + { + children: [], + label: '贾汪区', + value: 320305, + }, + { + children: [], + label: '泉山区', + value: 320311, + }, + { + children: [], + label: '铜山区', + value: 320312, + }, + { + children: [], + label: '丰县', + value: 320321, + }, + { + children: [], + label: '沛县', + value: 320322, + }, + { + children: [], + label: '睢宁县', + value: 320324, + }, + { + children: [], + label: '新沂市', + value: 320381, + }, + { + children: [], + label: '邳州市', + value: 320382, + }, + ], + label: '徐州市', + value: 320300, + }, + { + children: [ + { + children: [], + label: '天宁区', + value: 320402, + }, + { + children: [], + label: '钟楼区', + value: 320404, + }, + { + children: [], + label: '新北区', + value: 320411, + }, + { + children: [], + label: '武进区', + value: 320412, + }, + { + children: [], + label: '金坛区', + value: 320413, + }, + { + children: [], + label: '溧阳市', + value: 320481, + }, + ], + label: '常州市', + value: 320400, + }, + { + children: [ + { + children: [], + label: '虎丘区', + value: 320505, + }, + { + children: [], + label: '吴中区', + value: 320506, + }, + { + children: [], + label: '相城区', + value: 320507, + }, + { + children: [], + label: '姑苏区', + value: 320508, + }, + { + children: [], + label: '吴江区', + value: 320509, + }, + { + children: [], + label: '苏州工业园区', + value: 320571, + }, + { + children: [], + label: '常熟市', + value: 320581, + }, + { + children: [], + label: '张家港市', + value: 320582, + }, + { + children: [], + label: '昆山市', + value: 320583, + }, + { + children: [], + label: '太仓市', + value: 320585, + }, + ], + label: '苏州市', + value: 320500, + }, + { + children: [ + { + children: [], + label: '崇川区', + value: 320602, + }, + { + children: [], + label: '港闸区', + value: 320611, + }, + { + children: [], + label: '通州区', + value: 320612, + }, + { + children: [], + label: '如东县', + value: 320623, + }, + { + children: [], + label: '启东市', + value: 320681, + }, + { + children: [], + label: '如皋市', + value: 320682, + }, + { + children: [], + label: '海门市', + value: 320684, + }, + { + children: [], + label: '海安市', + value: 320685, + }, + ], + label: '南通市', + value: 320600, + }, + { + children: [ + { + children: [], + label: '连云区', + value: 320703, + }, + { + children: [], + label: '海州区', + value: 320706, + }, + { + children: [], + label: '赣榆区', + value: 320707, + }, + { + children: [], + label: '东海县', + value: 320722, + }, + { + children: [], + label: '灌云县', + value: 320723, + }, + { + children: [], + label: '灌南县', + value: 320724, + }, + ], + label: '连云港市', + value: 320700, + }, + { + children: [ + { + children: [], + label: '淮安区', + value: 320803, + }, + { + children: [], + label: '淮阴区', + value: 320804, + }, + { + children: [], + label: '清江浦区', + value: 320812, + }, + { + children: [], + label: '洪泽区', + value: 320813, + }, + { + children: [], + label: '涟水县', + value: 320826, + }, + { + children: [], + label: '盱眙县', + value: 320830, + }, + { + children: [], + label: '金湖县', + value: 320831, + }, + ], + label: '淮安市', + value: 320800, + }, + { + children: [ + { + children: [], + label: '亭湖区', + value: 320902, + }, + { + children: [], + label: '盐都区', + value: 320903, + }, + { + children: [], + label: '大丰区', + value: 320904, + }, + { + children: [], + label: '响水县', + value: 320921, + }, + { + children: [], + label: '滨海县', + value: 320922, + }, + { + children: [], + label: '阜宁县', + value: 320923, + }, + { + children: [], + label: '射阳县', + value: 320924, + }, + { + children: [], + label: '建湖县', + value: 320925, + }, + { + children: [], + label: '东台市', + value: 320981, + }, + ], + label: '盐城市', + value: 320900, + }, + { + children: [ + { + children: [], + label: '广陵区', + value: 321002, + }, + { + children: [], + label: '邗江区', + value: 321003, + }, + { + children: [], + label: '江都区', + value: 321012, + }, + { + children: [], + label: '宝应县', + value: 321023, + }, + { + children: [], + label: '仪征市', + value: 321081, + }, + { + children: [], + label: '高邮市', + value: 321084, + }, + ], + label: '扬州市', + value: 321000, + }, + { + children: [ + { + children: [], + label: '京口区', + value: 321102, + }, + { + children: [], + label: '润州区', + value: 321111, + }, + { + children: [], + label: '丹徒区', + value: 321112, + }, + { + children: [], + label: '丹阳市', + value: 321181, + }, + { + children: [], + label: '扬中市', + value: 321182, + }, + { + children: [], + label: '句容市', + value: 321183, + }, + ], + label: '镇江市', + value: 321100, + }, + { + children: [ + { + children: [], + label: '海陵区', + value: 321202, + }, + { + children: [], + label: '高港区', + value: 321203, + }, + { + children: [], + label: '姜堰区', + value: 321204, + }, + { + children: [], + label: '兴化市', + value: 321281, + }, + { + children: [], + label: '靖江市', + value: 321282, + }, + { + children: [], + label: '泰兴市', + value: 321283, + }, + ], + label: '泰州市', + value: 321200, + }, + { + children: [ + { + children: [], + label: '宿城区', + value: 321302, + }, + { + children: [], + label: '宿豫区', + value: 321311, + }, + { + children: [], + label: '沭阳县', + value: 321322, + }, + { + children: [], + label: '泗阳县', + value: 321323, + }, + { + children: [], + label: '泗洪县', + value: 321324, + }, + ], + label: '宿迁市', + value: 321300, + }, + ], + label: '江苏省', + value: 320000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '上城区', + value: 330102, + }, + { + children: [], + label: '下城区', + value: 330103, + }, + { + children: [], + label: '江干区', + value: 330104, + }, + { + children: [], + label: '拱墅区', + value: 330105, + }, + { + children: [], + label: '西湖区', + value: 330106, + }, + { + children: [], + label: '滨江区', + value: 330108, + }, + { + children: [], + label: '萧山区', + value: 330109, + }, + { + children: [], + label: '余杭区', + value: 330110, + }, + { + children: [], + label: '富阳区', + value: 330111, + }, + { + children: [], + label: '临安区', + value: 330112, + }, + { + children: [], + label: '桐庐县', + value: 330122, + }, + { + children: [], + label: '淳安县', + value: 330127, + }, + { + children: [], + label: '建德市', + value: 330182, + }, + ], + label: '杭州市', + value: 330100, + }, + { + children: [ + { + children: [], + label: '海曙区', + value: 330203, + }, + { + children: [], + label: '江北区', + value: 330205, + }, + { + children: [], + label: '北仑区', + value: 330206, + }, + { + children: [], + label: '镇海区', + value: 330211, + }, + { + children: [], + label: '鄞州区', + value: 330212, + }, + { + children: [], + label: '奉化区', + value: 330213, + }, + { + children: [], + label: '象山县', + value: 330225, + }, + { + children: [], + label: '宁海县', + value: 330226, + }, + { + children: [], + label: '余姚市', + value: 330281, + }, + { + children: [], + label: '慈溪市', + value: 330282, + }, + ], + label: '宁波市', + value: 330200, + }, + { + children: [ + { + children: [], + label: '鹿城区', + value: 330302, + }, + { + children: [], + label: '龙湾区', + value: 330303, + }, + { + children: [], + label: '瓯海区', + value: 330304, + }, + { + children: [], + label: '洞头区', + value: 330305, + }, + { + children: [], + label: '永嘉县', + value: 330324, + }, + { + children: [], + label: '平阳县', + value: 330326, + }, + { + children: [], + label: '苍南县', + value: 330327, + }, + { + children: [], + label: '文成县', + value: 330328, + }, + { + children: [], + label: '泰顺县', + value: 330329, + }, + { + children: [], + label: '瑞安市', + value: 330381, + }, + { + children: [], + label: '乐清市', + value: 330382, + }, + ], + label: '温州市', + value: 330300, + }, + { + children: [ + { + children: [], + label: '南湖区', + value: 330402, + }, + { + children: [], + label: '秀洲区', + value: 330411, + }, + { + children: [], + label: '嘉善县', + value: 330421, + }, + { + children: [], + label: '海盐县', + value: 330424, + }, + { + children: [], + label: '海宁市', + value: 330481, + }, + { + children: [], + label: '平湖市', + value: 330482, + }, + { + children: [], + label: '桐乡市', + value: 330483, + }, + ], + label: '嘉兴市', + value: 330400, + }, + { + children: [ + { + children: [], + label: '吴兴区', + value: 330502, + }, + { + children: [], + label: '南浔区', + value: 330503, + }, + { + children: [], + label: '德清县', + value: 330521, + }, + { + children: [], + label: '长兴县', + value: 330522, + }, + { + children: [], + label: '安吉县', + value: 330523, + }, + ], + label: '湖州市', + value: 330500, + }, + { + children: [ + { + children: [], + label: '越城区', + value: 330602, + }, + { + children: [], + label: '柯桥区', + value: 330603, + }, + { + children: [], + label: '上虞区', + value: 330604, + }, + { + children: [], + label: '新昌县', + value: 330624, + }, + { + children: [], + label: '诸暨市', + value: 330681, + }, + { + children: [], + label: '嵊州市', + value: 330683, + }, + ], + label: '绍兴市', + value: 330600, + }, + { + children: [ + { + children: [], + label: '婺城区', + value: 330702, + }, + { + children: [], + label: '金东区', + value: 330703, + }, + { + children: [], + label: '武义县', + value: 330723, + }, + { + children: [], + label: '浦江县', + value: 330726, + }, + { + children: [], + label: '磐安县', + value: 330727, + }, + { + children: [], + label: '兰溪市', + value: 330781, + }, + { + children: [], + label: '义乌市', + value: 330782, + }, + { + children: [], + label: '东阳市', + value: 330783, + }, + { + children: [], + label: '永康市', + value: 330784, + }, + ], + label: '金华市', + value: 330700, + }, + { + children: [ + { + children: [], + label: '柯城区', + value: 330802, + }, + { + children: [], + label: '衢江区', + value: 330803, + }, + { + children: [], + label: '常山县', + value: 330822, + }, + { + children: [], + label: '开化县', + value: 330824, + }, + { + children: [], + label: '龙游县', + value: 330825, + }, + { + children: [], + label: '江山市', + value: 330881, + }, + ], + label: '衢州市', + value: 330800, + }, + { + children: [ + { + children: [], + label: '定海区', + value: 330902, + }, + { + children: [], + label: '普陀区', + value: 330903, + }, + { + children: [], + label: '岱山县', + value: 330921, + }, + { + children: [], + label: '嵊泗县', + value: 330922, + }, + ], + label: '舟山市', + value: 330900, + }, + { + children: [ + { + children: [], + label: '椒江区', + value: 331002, + }, + { + children: [], + label: '黄岩区', + value: 331003, + }, + { + children: [], + label: '路桥区', + value: 331004, + }, + { + children: [], + label: '三门县', + value: 331022, + }, + { + children: [], + label: '天台县', + value: 331023, + }, + { + children: [], + label: '仙居县', + value: 331024, + }, + { + children: [], + label: '温岭市', + value: 331081, + }, + { + children: [], + label: '临海市', + value: 331082, + }, + { + children: [], + label: '玉环市', + value: 331083, + }, + ], + label: '台州市', + value: 331000, + }, + { + children: [ + { + children: [], + label: '莲都区', + value: 331102, + }, + { + children: [], + label: '青田县', + value: 331121, + }, + { + children: [], + label: '缙云县', + value: 331122, + }, + { + children: [], + label: '遂昌县', + value: 331123, + }, + { + children: [], + label: '松阳县', + value: 331124, + }, + { + children: [], + label: '云和县', + value: 331125, + }, + { + children: [], + label: '庆元县', + value: 331126, + }, + { + children: [], + label: '景宁畲族自治县', + value: 331127, + }, + { + children: [], + label: '龙泉市', + value: 331181, + }, + ], + label: '丽水市', + value: 331100, + }, + ], + label: '浙江省', + value: 330000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '瑶海区', + value: 340102, + }, + { + children: [], + label: '庐阳区', + value: 340103, + }, + { + children: [], + label: '蜀山区', + value: 340104, + }, + { + children: [], + label: '包河区', + value: 340111, + }, + { + children: [], + label: '长丰县', + value: 340121, + }, + { + children: [], + label: '肥东县', + value: 340122, + }, + { + children: [], + label: '肥西县', + value: 340123, + }, + { + children: [], + label: '庐江县', + value: 340124, + }, + { + children: [], + label: '巢湖市', + value: 340181, + }, + ], + label: '合肥市', + value: 340100, + }, + { + children: [ + { + children: [], + label: '镜湖区', + value: 340202, + }, + { + children: [], + label: '弋江区', + value: 340203, + }, + { + children: [], + label: '鸠江区', + value: 340207, + }, + { + children: [], + label: '三山区', + value: 340208, + }, + { + children: [], + label: '芜湖县', + value: 340221, + }, + { + children: [], + label: '繁昌县', + value: 340222, + }, + { + children: [], + label: '南陵县', + value: 340223, + }, + { + children: [], + label: '无为县', + value: 340225, + }, + ], + label: '芜湖市', + value: 340200, + }, + { + children: [ + { + children: [], + label: '龙子湖区', + value: 340302, + }, + { + children: [], + label: '蚌山区', + value: 340303, + }, + { + children: [], + label: '禹会区', + value: 340304, + }, + { + children: [], + label: '淮上区', + value: 340311, + }, + { + children: [], + label: '怀远县', + value: 340321, + }, + { + children: [], + label: '五河县', + value: 340322, + }, + { + children: [], + label: '固镇县', + value: 340323, + }, + ], + label: '蚌埠市', + value: 340300, + }, + { + children: [ + { + children: [], + label: '大通区', + value: 340402, + }, + { + children: [], + label: '田家庵区', + value: 340403, + }, + { + children: [], + label: '谢家集区', + value: 340404, + }, + { + children: [], + label: '八公山区', + value: 340405, + }, + { + children: [], + label: '潘集区', + value: 340406, + }, + { + children: [], + label: '凤台县', + value: 340421, + }, + { + children: [], + label: '寿县', + value: 340422, + }, + ], + label: '淮南市', + value: 340400, + }, + { + children: [ + { + children: [], + label: '花山区', + value: 340503, + }, + { + children: [], + label: '雨山区', + value: 340504, + }, + { + children: [], + label: '博望区', + value: 340506, + }, + { + children: [], + label: '当涂县', + value: 340521, + }, + { + children: [], + label: '含山县', + value: 340522, + }, + { + children: [], + label: '和县', + value: 340523, + }, + ], + label: '马鞍山市', + value: 340500, + }, + { + children: [ + { + children: [], + label: '杜集区', + value: 340602, + }, + { + children: [], + label: '相山区', + value: 340603, + }, + { + children: [], + label: '烈山区', + value: 340604, + }, + { + children: [], + label: '濉溪县', + value: 340621, + }, + ], + label: '淮北市', + value: 340600, + }, + { + children: [ + { + children: [], + label: '铜官区', + value: 340705, + }, + { + children: [], + label: '义安区', + value: 340706, + }, + { + children: [], + label: '郊区', + value: 340711, + }, + { + children: [], + label: '枞阳县', + value: 340722, + }, + ], + label: '铜陵市', + value: 340700, + }, + { + children: [ + { + children: [], + label: '迎江区', + value: 340802, + }, + { + children: [], + label: '大观区', + value: 340803, + }, + { + children: [], + label: '宜秀区', + value: 340811, + }, + { + children: [], + label: '怀宁县', + value: 340822, + }, + { + children: [], + label: '太湖县', + value: 340825, + }, + { + children: [], + label: '宿松县', + value: 340826, + }, + { + children: [], + label: '望江县', + value: 340827, + }, + { + children: [], + label: '岳西县', + value: 340828, + }, + { + children: [], + label: '桐城市', + value: 340881, + }, + { + children: [], + label: '潜山市', + value: 340882, + }, + ], + label: '安庆市', + value: 340800, + }, + { + children: [ + { + children: [], + label: '屯溪区', + value: 341002, + }, + { + children: [], + label: '黄山区', + value: 341003, + }, + { + children: [], + label: '徽州区', + value: 341004, + }, + { + children: [], + label: '歙县', + value: 341021, + }, + { + children: [], + label: '休宁县', + value: 341022, + }, + { + children: [], + label: '黟县', + value: 341023, + }, + { + children: [], + label: '祁门县', + value: 341024, + }, + ], + label: '黄山市', + value: 341000, + }, + { + children: [ + { + children: [], + label: '琅琊区', + value: 341102, + }, + { + children: [], + label: '南谯区', + value: 341103, + }, + { + children: [], + label: '来安县', + value: 341122, + }, + { + children: [], + label: '全椒县', + value: 341124, + }, + { + children: [], + label: '定远县', + value: 341125, + }, + { + children: [], + label: '凤阳县', + value: 341126, + }, + { + children: [], + label: '天长市', + value: 341181, + }, + { + children: [], + label: '明光市', + value: 341182, + }, + ], + label: '滁州市', + value: 341100, + }, + { + children: [ + { + children: [], + label: '颍州区', + value: 341202, + }, + { + children: [], + label: '颍东区', + value: 341203, + }, + { + children: [], + label: '颍泉区', + value: 341204, + }, + { + children: [], + label: '临泉县', + value: 341221, + }, + { + children: [], + label: '太和县', + value: 341222, + }, + { + children: [], + label: '阜南县', + value: 341225, + }, + { + children: [], + label: '颍上县', + value: 341226, + }, + { + children: [], + label: '界首市', + value: 341282, + }, + ], + label: '阜阳市', + value: 341200, + }, + { + children: [ + { + children: [], + label: '埇桥区', + value: 341302, + }, + { + children: [], + label: '砀山县', + value: 341321, + }, + { + children: [], + label: '萧县', + value: 341322, + }, + { + children: [], + label: '灵璧县', + value: 341323, + }, + { + children: [], + label: '泗县', + value: 341324, + }, + ], + label: '宿州市', + value: 341300, + }, + { + children: [ + { + children: [], + label: '金安区', + value: 341502, + }, + { + children: [], + label: '裕安区', + value: 341503, + }, + { + children: [], + label: '叶集区', + value: 341504, + }, + { + children: [], + label: '霍邱县', + value: 341522, + }, + { + children: [], + label: '舒城县', + value: 341523, + }, + { + children: [], + label: '金寨县', + value: 341524, + }, + { + children: [], + label: '霍山县', + value: 341525, + }, + ], + label: '六安市', + value: 341500, + }, + { + children: [ + { + children: [], + label: '谯城区', + value: 341602, + }, + { + children: [], + label: '涡阳县', + value: 341621, + }, + { + children: [], + label: '蒙城县', + value: 341622, + }, + { + children: [], + label: '利辛县', + value: 341623, + }, + ], + label: '亳州市', + value: 341600, + }, + { + children: [ + { + children: [], + label: '贵池区', + value: 341702, + }, + { + children: [], + label: '东至县', + value: 341721, + }, + { + children: [], + label: '石台县', + value: 341722, + }, + { + children: [], + label: '青阳县', + value: 341723, + }, + ], + label: '池州市', + value: 341700, + }, + { + children: [ + { + children: [], + label: '宣州区', + value: 341802, + }, + { + children: [], + label: '郎溪县', + value: 341821, + }, + { + children: [], + label: '广德县', + value: 341822, + }, + { + children: [], + label: '泾县', + value: 341823, + }, + { + children: [], + label: '绩溪县', + value: 341824, + }, + { + children: [], + label: '旌德县', + value: 341825, + }, + { + children: [], + label: '宁国市', + value: 341881, + }, + ], + label: '宣城市', + value: 341800, + }, + ], + label: '安徽省', + value: 340000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '鼓楼区', + value: 350102, + }, + { + children: [], + label: '台江区', + value: 350103, + }, + { + children: [], + label: '仓山区', + value: 350104, + }, + { + children: [], + label: '马尾区', + value: 350105, + }, + { + children: [], + label: '晋安区', + value: 350111, + }, + { + children: [], + label: '长乐区', + value: 350112, + }, + { + children: [], + label: '闽侯县', + value: 350121, + }, + { + children: [], + label: '连江县', + value: 350122, + }, + { + children: [], + label: '罗源县', + value: 350123, + }, + { + children: [], + label: '闽清县', + value: 350124, + }, + { + children: [], + label: '永泰县', + value: 350125, + }, + { + children: [], + label: '平潭县', + value: 350128, + }, + { + children: [], + label: '福清市', + value: 350181, + }, + ], + label: '福州市', + value: 350100, + }, + { + children: [ + { + children: [], + label: '思明区', + value: 350203, + }, + { + children: [], + label: '海沧区', + value: 350205, + }, + { + children: [], + label: '湖里区', + value: 350206, + }, + { + children: [], + label: '集美区', + value: 350211, + }, + { + children: [], + label: '同安区', + value: 350212, + }, + { + children: [], + label: '翔安区', + value: 350213, + }, + ], + label: '厦门市', + value: 350200, + }, + { + children: [ + { + children: [], + label: '城厢区', + value: 350302, + }, + { + children: [], + label: '涵江区', + value: 350303, + }, + { + children: [], + label: '荔城区', + value: 350304, + }, + { + children: [], + label: '秀屿区', + value: 350305, + }, + { + children: [], + label: '仙游县', + value: 350322, + }, + ], + label: '莆田市', + value: 350300, + }, + { + children: [ + { + children: [], + label: '梅列区', + value: 350402, + }, + { + children: [], + label: '三元区', + value: 350403, + }, + { + children: [], + label: '明溪县', + value: 350421, + }, + { + children: [], + label: '清流县', + value: 350423, + }, + { + children: [], + label: '宁化县', + value: 350424, + }, + { + children: [], + label: '大田县', + value: 350425, + }, + { + children: [], + label: '尤溪县', + value: 350426, + }, + { + children: [], + label: '沙县', + value: 350427, + }, + { + children: [], + label: '将乐县', + value: 350428, + }, + { + children: [], + label: '泰宁县', + value: 350429, + }, + { + children: [], + label: '建宁县', + value: 350430, + }, + { + children: [], + label: '永安市', + value: 350481, + }, + ], + label: '三明市', + value: 350400, + }, + { + children: [ + { + children: [], + label: '鲤城区', + value: 350502, + }, + { + children: [], + label: '丰泽区', + value: 350503, + }, + { + children: [], + label: '洛江区', + value: 350504, + }, + { + children: [], + label: '泉港区', + value: 350505, + }, + { + children: [], + label: '惠安县', + value: 350521, + }, + { + children: [], + label: '安溪县', + value: 350524, + }, + { + children: [], + label: '永春县', + value: 350525, + }, + { + children: [], + label: '德化县', + value: 350526, + }, + { + children: [], + label: '金门县', + value: 350527, + }, + { + children: [], + label: '石狮市', + value: 350581, + }, + { + children: [], + label: '晋江市', + value: 350582, + }, + { + children: [], + label: '南安市', + value: 350583, + }, + ], + label: '泉州市', + value: 350500, + }, + { + children: [ + { + children: [], + label: '芗城区', + value: 350602, + }, + { + children: [], + label: '龙文区', + value: 350603, + }, + { + children: [], + label: '云霄县', + value: 350622, + }, + { + children: [], + label: '漳浦县', + value: 350623, + }, + { + children: [], + label: '诏安县', + value: 350624, + }, + { + children: [], + label: '长泰县', + value: 350625, + }, + { + children: [], + label: '东山县', + value: 350626, + }, + { + children: [], + label: '南靖县', + value: 350627, + }, + { + children: [], + label: '平和县', + value: 350628, + }, + { + children: [], + label: '华安县', + value: 350629, + }, + { + children: [], + label: '龙海市', + value: 350681, + }, + ], + label: '漳州市', + value: 350600, + }, + { + children: [ + { + children: [], + label: '延平区', + value: 350702, + }, + { + children: [], + label: '建阳区', + value: 350703, + }, + { + children: [], + label: '顺昌县', + value: 350721, + }, + { + children: [], + label: '浦城县', + value: 350722, + }, + { + children: [], + label: '光泽县', + value: 350723, + }, + { + children: [], + label: '松溪县', + value: 350724, + }, + { + children: [], + label: '政和县', + value: 350725, + }, + { + children: [], + label: '邵武市', + value: 350781, + }, + { + children: [], + label: '武夷山市', + value: 350782, + }, + { + children: [], + label: '建瓯市', + value: 350783, + }, + ], + label: '南平市', + value: 350700, + }, + { + children: [ + { + children: [], + label: '新罗区', + value: 350802, + }, + { + children: [], + label: '永定区', + value: 350803, + }, + { + children: [], + label: '长汀县', + value: 350821, + }, + { + children: [], + label: '上杭县', + value: 350823, + }, + { + children: [], + label: '武平县', + value: 350824, + }, + { + children: [], + label: '连城县', + value: 350825, + }, + { + children: [], + label: '漳平市', + value: 350881, + }, + ], + label: '龙岩市', + value: 350800, + }, + { + children: [ + { + children: [], + label: '蕉城区', + value: 350902, + }, + { + children: [], + label: '霞浦县', + value: 350921, + }, + { + children: [], + label: '古田县', + value: 350922, + }, + { + children: [], + label: '屏南县', + value: 350923, + }, + { + children: [], + label: '寿宁县', + value: 350924, + }, + { + children: [], + label: '周宁县', + value: 350925, + }, + { + children: [], + label: '柘荣县', + value: 350926, + }, + { + children: [], + label: '福安市', + value: 350981, + }, + { + children: [], + label: '福鼎市', + value: 350982, + }, + ], + label: '宁德市', + value: 350900, + }, + ], + label: '福建省', + value: 350000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '东湖区', + value: 360102, + }, + { + children: [], + label: '西湖区', + value: 360103, + }, + { + children: [], + label: '青云谱区', + value: 360104, + }, + { + children: [], + label: '湾里区', + value: 360105, + }, + { + children: [], + label: '青山湖区', + value: 360111, + }, + { + children: [], + label: '新建区', + value: 360112, + }, + { + children: [], + label: '南昌县', + value: 360121, + }, + { + children: [], + label: '安义县', + value: 360123, + }, + { + children: [], + label: '进贤县', + value: 360124, + }, + ], + label: '南昌市', + value: 360100, + }, + { + children: [ + { + children: [], + label: '昌江区', + value: 360202, + }, + { + children: [], + label: '珠山区', + value: 360203, + }, + { + children: [], + label: '浮梁县', + value: 360222, + }, + { + children: [], + label: '乐平市', + value: 360281, + }, + ], + label: '景德镇市', + value: 360200, + }, + { + children: [ + { + children: [], + label: '安源区', + value: 360302, + }, + { + children: [], + label: '湘东区', + value: 360313, + }, + { + children: [], + label: '莲花县', + value: 360321, + }, + { + children: [], + label: '上栗县', + value: 360322, + }, + { + children: [], + label: '芦溪县', + value: 360323, + }, + ], + label: '萍乡市', + value: 360300, + }, + { + children: [ + { + children: [], + label: '濂溪区', + value: 360402, + }, + { + children: [], + label: '浔阳区', + value: 360403, + }, + { + children: [], + label: '柴桑区', + value: 360404, + }, + { + children: [], + label: '武宁县', + value: 360423, + }, + { + children: [], + label: '修水县', + value: 360424, + }, + { + children: [], + label: '永修县', + value: 360425, + }, + { + children: [], + label: '德安县', + value: 360426, + }, + { + children: [], + label: '都昌县', + value: 360428, + }, + { + children: [], + label: '湖口县', + value: 360429, + }, + { + children: [], + label: '彭泽县', + value: 360430, + }, + { + children: [], + label: '瑞昌市', + value: 360481, + }, + { + children: [], + label: '共青城市', + value: 360482, + }, + { + children: [], + label: '庐山市', + value: 360483, + }, + ], + label: '九江市', + value: 360400, + }, + { + children: [ + { + children: [], + label: '渝水区', + value: 360502, + }, + { + children: [], + label: '分宜县', + value: 360521, + }, + ], + label: '新余市', + value: 360500, + }, + { + children: [ + { + children: [], + label: '月湖区', + value: 360602, + }, + { + children: [], + label: '余江区', + value: 360603, + }, + { + children: [], + label: '贵溪市', + value: 360681, + }, + ], + label: '鹰潭市', + value: 360600, + }, + { + children: [ + { + children: [], + label: '章贡区', + value: 360702, + }, + { + children: [], + label: '南康区', + value: 360703, + }, + { + children: [], + label: '赣县区', + value: 360704, + }, + { + children: [], + label: '信丰县', + value: 360722, + }, + { + children: [], + label: '大余县', + value: 360723, + }, + { + children: [], + label: '上犹县', + value: 360724, + }, + { + children: [], + label: '崇义县', + value: 360725, + }, + { + children: [], + label: '安远县', + value: 360726, + }, + { + children: [], + label: '龙南县', + value: 360727, + }, + { + children: [], + label: '定南县', + value: 360728, + }, + { + children: [], + label: '全南县', + value: 360729, + }, + { + children: [], + label: '宁都县', + value: 360730, + }, + { + children: [], + label: '于都县', + value: 360731, + }, + { + children: [], + label: '兴国县', + value: 360732, + }, + { + children: [], + label: '会昌县', + value: 360733, + }, + { + children: [], + label: '寻乌县', + value: 360734, + }, + { + children: [], + label: '石城县', + value: 360735, + }, + { + children: [], + label: '瑞金市', + value: 360781, + }, + ], + label: '赣州市', + value: 360700, + }, + { + children: [ + { + children: [], + label: '吉州区', + value: 360802, + }, + { + children: [], + label: '青原区', + value: 360803, + }, + { + children: [], + label: '吉安县', + value: 360821, + }, + { + children: [], + label: '吉水县', + value: 360822, + }, + { + children: [], + label: '峡江县', + value: 360823, + }, + { + children: [], + label: '新干县', + value: 360824, + }, + { + children: [], + label: '永丰县', + value: 360825, + }, + { + children: [], + label: '泰和县', + value: 360826, + }, + { + children: [], + label: '遂川县', + value: 360827, + }, + { + children: [], + label: '万安县', + value: 360828, + }, + { + children: [], + label: '安福县', + value: 360829, + }, + { + children: [], + label: '永新县', + value: 360830, + }, + { + children: [], + label: '井冈山市', + value: 360881, + }, + ], + label: '吉安市', + value: 360800, + }, + { + children: [ + { + children: [], + label: '袁州区', + value: 360902, + }, + { + children: [], + label: '奉新县', + value: 360921, + }, + { + children: [], + label: '万载县', + value: 360922, + }, + { + children: [], + label: '上高县', + value: 360923, + }, + { + children: [], + label: '宜丰县', + value: 360924, + }, + { + children: [], + label: '靖安县', + value: 360925, + }, + { + children: [], + label: '铜鼓县', + value: 360926, + }, + { + children: [], + label: '丰城市', + value: 360981, + }, + { + children: [], + label: '樟树市', + value: 360982, + }, + { + children: [], + label: '高安市', + value: 360983, + }, + ], + label: '宜春市', + value: 360900, + }, + { + children: [ + { + children: [], + label: '临川区', + value: 361002, + }, + { + children: [], + label: '东乡区', + value: 361003, + }, + { + children: [], + label: '南城县', + value: 361021, + }, + { + children: [], + label: '黎川县', + value: 361022, + }, + { + children: [], + label: '南丰县', + value: 361023, + }, + { + children: [], + label: '崇仁县', + value: 361024, + }, + { + children: [], + label: '乐安县', + value: 361025, + }, + { + children: [], + label: '宜黄县', + value: 361026, + }, + { + children: [], + label: '金溪县', + value: 361027, + }, + { + children: [], + label: '资溪县', + value: 361028, + }, + { + children: [], + label: '广昌县', + value: 361030, + }, + ], + label: '抚州市', + value: 361000, + }, + { + children: [ + { + children: [], + label: '信州区', + value: 361102, + }, + { + children: [], + label: '广丰区', + value: 361103, + }, + { + children: [], + label: '上饶县', + value: 361121, + }, + { + children: [], + label: '玉山县', + value: 361123, + }, + { + children: [], + label: '铅山县', + value: 361124, + }, + { + children: [], + label: '横峰县', + value: 361125, + }, + { + children: [], + label: '弋阳县', + value: 361126, + }, + { + children: [], + label: '余干县', + value: 361127, + }, + { + children: [], + label: '鄱阳县', + value: 361128, + }, + { + children: [], + label: '万年县', + value: 361129, + }, + { + children: [], + label: '婺源县', + value: 361130, + }, + { + children: [], + label: '德兴市', + value: 361181, + }, + ], + label: '上饶市', + value: 361100, + }, + ], + label: '江西省', + value: 360000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '历下区', + value: 370102, + }, + { + children: [], + label: '市中区', + value: 370103, + }, + { + children: [], + label: '槐荫区', + value: 370104, + }, + { + children: [], + label: '天桥区', + value: 370105, + }, + { + children: [], + label: '历城区', + value: 370112, + }, + { + children: [], + label: '长清区', + value: 370113, + }, + { + children: [], + label: '章丘区', + value: 370114, + }, + { + children: [], + label: '济阳区', + value: 370115, + }, + { + children: [], + label: '莱芜区', + value: 370116, + }, + { + children: [], + label: '钢城区', + value: 370117, + }, + { + children: [], + label: '平阴县', + value: 370124, + }, + { + children: [], + label: '商河县', + value: 370126, + }, + ], + label: '济南市', + value: 370100, + }, + { + children: [ + { + children: [], + label: '市南区', + value: 370202, + }, + { + children: [], + label: '市北区', + value: 370203, + }, + { + children: [], + label: '黄岛区', + value: 370211, + }, + { + children: [], + label: '崂山区', + value: 370212, + }, + { + children: [], + label: '李沧区', + value: 370213, + }, + { + children: [], + label: '城阳区', + value: 370214, + }, + { + children: [], + label: '即墨区', + value: 370215, + }, + { + children: [], + label: '胶州市', + value: 370281, + }, + { + children: [], + label: '平度市', + value: 370283, + }, + { + children: [], + label: '莱西市', + value: 370285, + }, + ], + label: '青岛市', + value: 370200, + }, + { + children: [ + { + children: [], + label: '淄川区', + value: 370302, + }, + { + children: [], + label: '张店区', + value: 370303, + }, + { + children: [], + label: '博山区', + value: 370304, + }, + { + children: [], + label: '临淄区', + value: 370305, + }, + { + children: [], + label: '周村区', + value: 370306, + }, + { + children: [], + label: '桓台县', + value: 370321, + }, + { + children: [], + label: '高青县', + value: 370322, + }, + { + children: [], + label: '沂源县', + value: 370323, + }, + ], + label: '淄博市', + value: 370300, + }, + { + children: [ + { + children: [], + label: '市中区', + value: 370402, + }, + { + children: [], + label: '薛城区', + value: 370403, + }, + { + children: [], + label: '峄城区', + value: 370404, + }, + { + children: [], + label: '台儿庄区', + value: 370405, + }, + { + children: [], + label: '山亭区', + value: 370406, + }, + { + children: [], + label: '滕州市', + value: 370481, + }, + ], + label: '枣庄市', + value: 370400, + }, + { + children: [ + { + children: [], + label: '东营区', + value: 370502, + }, + { + children: [], + label: '河口区', + value: 370503, + }, + { + children: [], + label: '垦利区', + value: 370505, + }, + { + children: [], + label: '利津县', + value: 370522, + }, + { + children: [], + label: '广饶县', + value: 370523, + }, + ], + label: '东营市', + value: 370500, + }, + { + children: [ + { + children: [], + label: '芝罘区', + value: 370602, + }, + { + children: [], + label: '福山区', + value: 370611, + }, + { + children: [], + label: '牟平区', + value: 370612, + }, + { + children: [], + label: '莱山区', + value: 370613, + }, + { + children: [], + label: '长岛县', + value: 370634, + }, + { + children: [], + label: '龙口市', + value: 370681, + }, + { + children: [], + label: '莱阳市', + value: 370682, + }, + { + children: [], + label: '莱州市', + value: 370683, + }, + { + children: [], + label: '蓬莱市', + value: 370684, + }, + { + children: [], + label: '招远市', + value: 370685, + }, + { + children: [], + label: '栖霞市', + value: 370686, + }, + { + children: [], + label: '海阳市', + value: 370687, + }, + ], + label: '烟台市', + value: 370600, + }, + { + children: [ + { + children: [], + label: '潍城区', + value: 370702, + }, + { + children: [], + label: '寒亭区', + value: 370703, + }, + { + children: [], + label: '坊子区', + value: 370704, + }, + { + children: [], + label: '奎文区', + value: 370705, + }, + { + children: [], + label: '临朐县', + value: 370724, + }, + { + children: [], + label: '昌乐县', + value: 370725, + }, + { + children: [], + label: '青州市', + value: 370781, + }, + { + children: [], + label: '诸城市', + value: 370782, + }, + { + children: [], + label: '寿光市', + value: 370783, + }, + { + children: [], + label: '安丘市', + value: 370784, + }, + { + children: [], + label: '高密市', + value: 370785, + }, + { + children: [], + label: '昌邑市', + value: 370786, + }, + ], + label: '潍坊市', + value: 370700, + }, + { + children: [ + { + children: [], + label: '任城区', + value: 370811, + }, + { + children: [], + label: '兖州区', + value: 370812, + }, + { + children: [], + label: '微山县', + value: 370826, + }, + { + children: [], + label: '鱼台县', + value: 370827, + }, + { + children: [], + label: '金乡县', + value: 370828, + }, + { + children: [], + label: '嘉祥县', + value: 370829, + }, + { + children: [], + label: '汶上县', + value: 370830, + }, + { + children: [], + label: '泗水县', + value: 370831, + }, + { + children: [], + label: '梁山县', + value: 370832, + }, + { + children: [], + label: '曲阜市', + value: 370881, + }, + { + children: [], + label: '邹城市', + value: 370883, + }, + ], + label: '济宁市', + value: 370800, + }, + { + children: [ + { + children: [], + label: '泰山区', + value: 370902, + }, + { + children: [], + label: '岱岳区', + value: 370911, + }, + { + children: [], + label: '宁阳县', + value: 370921, + }, + { + children: [], + label: '东平县', + value: 370923, + }, + { + children: [], + label: '新泰市', + value: 370982, + }, + { + children: [], + label: '肥城市', + value: 370983, + }, + ], + label: '泰安市', + value: 370900, + }, + { + children: [ + { + children: [], + label: '环翠区', + value: 371002, + }, + { + children: [], + label: '文登区', + value: 371003, + }, + { + children: [], + label: '荣成市', + value: 371082, + }, + { + children: [], + label: '乳山市', + value: 371083, + }, + ], + label: '威海市', + value: 371000, + }, + { + children: [ + { + children: [], + label: '东港区', + value: 371102, + }, + { + children: [], + label: '岚山区', + value: 371103, + }, + { + children: [], + label: '五莲县', + value: 371121, + }, + { + children: [], + label: '莒县', + value: 371122, + }, + ], + label: '日照市', + value: 371100, + }, + { + children: [ + { + children: [], + label: '兰山区', + value: 371302, + }, + { + children: [], + label: '罗庄区', + value: 371311, + }, + { + children: [], + label: '河东区', + value: 371312, + }, + { + children: [], + label: '沂南县', + value: 371321, + }, + { + children: [], + label: '郯城县', + value: 371322, + }, + { + children: [], + label: '沂水县', + value: 371323, + }, + { + children: [], + label: '兰陵县', + value: 371324, + }, + { + children: [], + label: '费县', + value: 371325, + }, + { + children: [], + label: '平邑县', + value: 371326, + }, + { + children: [], + label: '莒南县', + value: 371327, + }, + { + children: [], + label: '蒙阴县', + value: 371328, + }, + { + children: [], + label: '临沭县', + value: 371329, + }, + ], + label: '临沂市', + value: 371300, + }, + { + children: [ + { + children: [], + label: '德城区', + value: 371402, + }, + { + children: [], + label: '陵城区', + value: 371403, + }, + { + children: [], + label: '宁津县', + value: 371422, + }, + { + children: [], + label: '庆云县', + value: 371423, + }, + { + children: [], + label: '临邑县', + value: 371424, + }, + { + children: [], + label: '齐河县', + value: 371425, + }, + { + children: [], + label: '平原县', + value: 371426, + }, + { + children: [], + label: '夏津县', + value: 371427, + }, + { + children: [], + label: '武城县', + value: 371428, + }, + { + children: [], + label: '乐陵市', + value: 371481, + }, + { + children: [], + label: '禹城市', + value: 371482, + }, + ], + label: '德州市', + value: 371400, + }, + { + children: [ + { + children: [], + label: '东昌府区', + value: 371502, + }, + { + children: [], + label: '阳谷县', + value: 371521, + }, + { + children: [], + label: '莘县', + value: 371522, + }, + { + children: [], + label: '茌平县', + value: 371523, + }, + { + children: [], + label: '东阿县', + value: 371524, + }, + { + children: [], + label: '冠县', + value: 371525, + }, + { + children: [], + label: '高唐县', + value: 371526, + }, + { + children: [], + label: '临清市', + value: 371581, + }, + ], + label: '聊城市', + value: 371500, + }, + { + children: [ + { + children: [], + label: '滨城区', + value: 371602, + }, + { + children: [], + label: '沾化区', + value: 371603, + }, + { + children: [], + label: '惠民县', + value: 371621, + }, + { + children: [], + label: '阳信县', + value: 371622, + }, + { + children: [], + label: '无棣县', + value: 371623, + }, + { + children: [], + label: '博兴县', + value: 371625, + }, + { + children: [], + label: '邹平市', + value: 371681, + }, + ], + label: '滨州市', + value: 371600, + }, + { + children: [ + { + children: [], + label: '牡丹区', + value: 371702, + }, + { + children: [], + label: '定陶区', + value: 371703, + }, + { + children: [], + label: '曹县', + value: 371721, + }, + { + children: [], + label: '单县', + value: 371722, + }, + { + children: [], + label: '成武县', + value: 371723, + }, + { + children: [], + label: '巨野县', + value: 371724, + }, + { + children: [], + label: '郓城县', + value: 371725, + }, + { + children: [], + label: '鄄城县', + value: 371726, + }, + { + children: [], + label: '东明县', + value: 371728, + }, + ], + label: '菏泽市', + value: 371700, + }, + ], + label: '山东省', + value: 370000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '中原区', + value: 410102, + }, + { + children: [], + label: '二七区', + value: 410103, + }, + { + children: [], + label: '管城回族区', + value: 410104, + }, + { + children: [], + label: '金水区', + value: 410105, + }, + { + children: [], + label: '上街区', + value: 410106, + }, + { + children: [], + label: '惠济区', + value: 410108, + }, + { + children: [], + label: '中牟县', + value: 410122, + }, + { + children: [], + label: '巩义市', + value: 410181, + }, + { + children: [], + label: '荥阳市', + value: 410182, + }, + { + children: [], + label: '新密市', + value: 410183, + }, + { + children: [], + label: '新郑市', + value: 410184, + }, + { + children: [], + label: '登封市', + value: 410185, + }, + ], + label: '郑州市', + value: 410100, + }, + { + children: [ + { + children: [], + label: '龙亭区', + value: 410202, + }, + { + children: [], + label: '顺河回族区', + value: 410203, + }, + { + children: [], + label: '鼓楼区', + value: 410204, + }, + { + children: [], + label: '禹王台区', + value: 410205, + }, + { + children: [], + label: '祥符区', + value: 410212, + }, + { + children: [], + label: '杞县', + value: 410221, + }, + { + children: [], + label: '通许县', + value: 410222, + }, + { + children: [], + label: '尉氏县', + value: 410223, + }, + { + children: [], + label: '兰考县', + value: 410225, + }, + ], + label: '开封市', + value: 410200, + }, + { + children: [ + { + children: [], + label: '老城区', + value: 410302, + }, + { + children: [], + label: '西工区', + value: 410303, + }, + { + children: [], + label: '瀍河回族区', + value: 410304, + }, + { + children: [], + label: '涧西区', + value: 410305, + }, + { + children: [], + label: '吉利区', + value: 410306, + }, + { + children: [], + label: '洛龙区', + value: 410311, + }, + { + children: [], + label: '孟津县', + value: 410322, + }, + { + children: [], + label: '新安县', + value: 410323, + }, + { + children: [], + label: '栾川县', + value: 410324, + }, + { + children: [], + label: '嵩县', + value: 410325, + }, + { + children: [], + label: '汝阳县', + value: 410326, + }, + { + children: [], + label: '宜阳县', + value: 410327, + }, + { + children: [], + label: '洛宁县', + value: 410328, + }, + { + children: [], + label: '伊川县', + value: 410329, + }, + { + children: [], + label: '偃师市', + value: 410381, + }, + ], + label: '洛阳市', + value: 410300, + }, + { + children: [ + { + children: [], + label: '新华区', + value: 410402, + }, + { + children: [], + label: '卫东区', + value: 410403, + }, + { + children: [], + label: '石龙区', + value: 410404, + }, + { + children: [], + label: '湛河区', + value: 410411, + }, + { + children: [], + label: '宝丰县', + value: 410421, + }, + { + children: [], + label: '叶县', + value: 410422, + }, + { + children: [], + label: '鲁山县', + value: 410423, + }, + { + children: [], + label: '郏县', + value: 410425, + }, + { + children: [], + label: '舞钢市', + value: 410481, + }, + { + children: [], + label: '汝州市', + value: 410482, + }, + ], + label: '平顶山市', + value: 410400, + }, + { + children: [ + { + children: [], + label: '文峰区', + value: 410502, + }, + { + children: [], + label: '北关区', + value: 410503, + }, + { + children: [], + label: '殷都区', + value: 410505, + }, + { + children: [], + label: '龙安区', + value: 410506, + }, + { + children: [], + label: '安阳县', + value: 410522, + }, + { + children: [], + label: '汤阴县', + value: 410523, + }, + { + children: [], + label: '滑县', + value: 410526, + }, + { + children: [], + label: '内黄县', + value: 410527, + }, + { + children: [], + label: '林州市', + value: 410581, + }, + ], + label: '安阳市', + value: 410500, + }, + { + children: [ + { + children: [], + label: '鹤山区', + value: 410602, + }, + { + children: [], + label: '山城区', + value: 410603, + }, + { + children: [], + label: '淇滨区', + value: 410611, + }, + { + children: [], + label: '浚县', + value: 410621, + }, + { + children: [], + label: '淇县', + value: 410622, + }, + ], + label: '鹤壁市', + value: 410600, + }, + { + children: [ + { + children: [], + label: '红旗区', + value: 410702, + }, + { + children: [], + label: '卫滨区', + value: 410703, + }, + { + children: [], + label: '凤泉区', + value: 410704, + }, + { + children: [], + label: '牧野区', + value: 410711, + }, + { + children: [], + label: '新乡县', + value: 410721, + }, + { + children: [], + label: '获嘉县', + value: 410724, + }, + { + children: [], + label: '原阳县', + value: 410725, + }, + { + children: [], + label: '延津县', + value: 410726, + }, + { + children: [], + label: '封丘县', + value: 410727, + }, + { + children: [], + label: '长垣县', + value: 410728, + }, + { + children: [], + label: '卫辉市', + value: 410781, + }, + { + children: [], + label: '辉县市', + value: 410782, + }, + ], + label: '新乡市', + value: 410700, + }, + { + children: [ + { + children: [], + label: '解放区', + value: 410802, + }, + { + children: [], + label: '中站区', + value: 410803, + }, + { + children: [], + label: '马村区', + value: 410804, + }, + { + children: [], + label: '山阳区', + value: 410811, + }, + { + children: [], + label: '修武县', + value: 410821, + }, + { + children: [], + label: '博爱县', + value: 410822, + }, + { + children: [], + label: '武陟县', + value: 410823, + }, + { + children: [], + label: '温县', + value: 410825, + }, + { + children: [], + label: '沁阳市', + value: 410882, + }, + { + children: [], + label: '孟州市', + value: 410883, + }, + ], + label: '焦作市', + value: 410800, + }, + { + children: [ + { + children: [], + label: '华龙区', + value: 410902, + }, + { + children: [], + label: '清丰县', + value: 410922, + }, + { + children: [], + label: '南乐县', + value: 410923, + }, + { + children: [], + label: '范县', + value: 410926, + }, + { + children: [], + label: '台前县', + value: 410927, + }, + { + children: [], + label: '濮阳县', + value: 410928, + }, + ], + label: '濮阳市', + value: 410900, + }, + { + children: [ + { + children: [], + label: '魏都区', + value: 411002, + }, + { + children: [], + label: '建安区', + value: 411003, + }, + { + children: [], + label: '鄢陵县', + value: 411024, + }, + { + children: [], + label: '襄城县', + value: 411025, + }, + { + children: [], + label: '禹州市', + value: 411081, + }, + { + children: [], + label: '长葛市', + value: 411082, + }, + ], + label: '许昌市', + value: 411000, + }, + { + children: [ + { + children: [], + label: '源汇区', + value: 411102, + }, + { + children: [], + label: '郾城区', + value: 411103, + }, + { + children: [], + label: '召陵区', + value: 411104, + }, + { + children: [], + label: '舞阳县', + value: 411121, + }, + { + children: [], + label: '临颍县', + value: 411122, + }, + ], + label: '漯河市', + value: 411100, + }, + { + children: [ + { + children: [], + label: '湖滨区', + value: 411202, + }, + { + children: [], + label: '陕州区', + value: 411203, + }, + { + children: [], + label: '渑池县', + value: 411221, + }, + { + children: [], + label: '卢氏县', + value: 411224, + }, + { + children: [], + label: '义马市', + value: 411281, + }, + { + children: [], + label: '灵宝市', + value: 411282, + }, + ], + label: '三门峡市', + value: 411200, + }, + { + children: [ + { + children: [], + label: '宛城区', + value: 411302, + }, + { + children: [], + label: '卧龙区', + value: 411303, + }, + { + children: [], + label: '南召县', + value: 411321, + }, + { + children: [], + label: '方城县', + value: 411322, + }, + { + children: [], + label: '西峡县', + value: 411323, + }, + { + children: [], + label: '镇平县', + value: 411324, + }, + { + children: [], + label: '内乡县', + value: 411325, + }, + { + children: [], + label: '淅川县', + value: 411326, + }, + { + children: [], + label: '社旗县', + value: 411327, + }, + { + children: [], + label: '唐河县', + value: 411328, + }, + { + children: [], + label: '新野县', + value: 411329, + }, + { + children: [], + label: '桐柏县', + value: 411330, + }, + { + children: [], + label: '邓州市', + value: 411381, + }, + ], + label: '南阳市', + value: 411300, + }, + { + children: [ + { + children: [], + label: '梁园区', + value: 411402, + }, + { + children: [], + label: '睢阳区', + value: 411403, + }, + { + children: [], + label: '民权县', + value: 411421, + }, + { + children: [], + label: '睢县', + value: 411422, + }, + { + children: [], + label: '宁陵县', + value: 411423, + }, + { + children: [], + label: '柘城县', + value: 411424, + }, + { + children: [], + label: '虞城县', + value: 411425, + }, + { + children: [], + label: '夏邑县', + value: 411426, + }, + { + children: [], + label: '永城市', + value: 411481, + }, + ], + label: '商丘市', + value: 411400, + }, + { + children: [ + { + children: [], + label: '浉河区', + value: 411502, + }, + { + children: [], + label: '平桥区', + value: 411503, + }, + { + children: [], + label: '罗山县', + value: 411521, + }, + { + children: [], + label: '光山县', + value: 411522, + }, + { + children: [], + label: '新县', + value: 411523, + }, + { + children: [], + label: '商城县', + value: 411524, + }, + { + children: [], + label: '固始县', + value: 411525, + }, + { + children: [], + label: '潢川县', + value: 411526, + }, + { + children: [], + label: '淮滨县', + value: 411527, + }, + { + children: [], + label: '息县', + value: 411528, + }, + ], + label: '信阳市', + value: 411500, + }, + { + children: [ + { + children: [], + label: '川汇区', + value: 411602, + }, + { + children: [], + label: '扶沟县', + value: 411621, + }, + { + children: [], + label: '西华县', + value: 411622, + }, + { + children: [], + label: '商水县', + value: 411623, + }, + { + children: [], + label: '沈丘县', + value: 411624, + }, + { + children: [], + label: '郸城县', + value: 411625, + }, + { + children: [], + label: '淮阳县', + value: 411626, + }, + { + children: [], + label: '太康县', + value: 411627, + }, + { + children: [], + label: '鹿邑县', + value: 411628, + }, + { + children: [], + label: '项城市', + value: 411681, + }, + ], + label: '周口市', + value: 411600, + }, + { + children: [ + { + children: [], + label: '驿城区', + value: 411702, + }, + { + children: [], + label: '西平县', + value: 411721, + }, + { + children: [], + label: '上蔡县', + value: 411722, + }, + { + children: [], + label: '平舆县', + value: 411723, + }, + { + children: [], + label: '正阳县', + value: 411724, + }, + { + children: [], + label: '确山县', + value: 411725, + }, + { + children: [], + label: '泌阳县', + value: 411726, + }, + { + children: [], + label: '汝南县', + value: 411727, + }, + { + children: [], + label: '遂平县', + value: 411728, + }, + { + children: [], + label: '新蔡县', + value: 411729, + }, + ], + label: '驻马店市', + value: 411700, + }, + { + children: [], + label: '济源市', + value: 419001, + }, + ], + label: '河南省', + value: 410000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '江岸区', + value: 420102, + }, + { + children: [], + label: '江汉区', + value: 420103, + }, + { + children: [], + label: '硚口区', + value: 420104, + }, + { + children: [], + label: '汉阳区', + value: 420105, + }, + { + children: [], + label: '武昌区', + value: 420106, + }, + { + children: [], + label: '青山区', + value: 420107, + }, + { + children: [], + label: '洪山区', + value: 420111, + }, + { + children: [], + label: '东西湖区', + value: 420112, + }, + { + children: [], + label: '汉南区', + value: 420113, + }, + { + children: [], + label: '蔡甸区', + value: 420114, + }, + { + children: [], + label: '江夏区', + value: 420115, + }, + { + children: [], + label: '黄陂区', + value: 420116, + }, + { + children: [], + label: '新洲区', + value: 420117, + }, + ], + label: '武汉市', + value: 420100, + }, + { + children: [ + { + children: [], + label: '黄石港区', + value: 420202, + }, + { + children: [], + label: '西塞山区', + value: 420203, + }, + { + children: [], + label: '下陆区', + value: 420204, + }, + { + children: [], + label: '铁山区', + value: 420205, + }, + { + children: [], + label: '阳新县', + value: 420222, + }, + { + children: [], + label: '大冶市', + value: 420281, + }, + ], + label: '黄石市', + value: 420200, + }, + { + children: [ + { + children: [], + label: '茅箭区', + value: 420302, + }, + { + children: [], + label: '张湾区', + value: 420303, + }, + { + children: [], + label: '郧阳区', + value: 420304, + }, + { + children: [], + label: '郧西县', + value: 420322, + }, + { + children: [], + label: '竹山县', + value: 420323, + }, + { + children: [], + label: '竹溪县', + value: 420324, + }, + { + children: [], + label: '房县', + value: 420325, + }, + { + children: [], + label: '丹江口市', + value: 420381, + }, + ], + label: '十堰市', + value: 420300, + }, + { + children: [ + { + children: [], + label: '西陵区', + value: 420502, + }, + { + children: [], + label: '伍家岗区', + value: 420503, + }, + { + children: [], + label: '点军区', + value: 420504, + }, + { + children: [], + label: '猇亭区', + value: 420505, + }, + { + children: [], + label: '夷陵区', + value: 420506, + }, + { + children: [], + label: '远安县', + value: 420525, + }, + { + children: [], + label: '兴山县', + value: 420526, + }, + { + children: [], + label: '秭归县', + value: 420527, + }, + { + children: [], + label: '长阳土家族自治县', + value: 420528, + }, + { + children: [], + label: '五峰土家族自治县', + value: 420529, + }, + { + children: [], + label: '宜都市', + value: 420581, + }, + { + children: [], + label: '当阳市', + value: 420582, + }, + { + children: [], + label: '枝江市', + value: 420583, + }, + ], + label: '宜昌市', + value: 420500, + }, + { + children: [ + { + children: [], + label: '襄城区', + value: 420602, + }, + { + children: [], + label: '樊城区', + value: 420606, + }, + { + children: [], + label: '襄州区', + value: 420607, + }, + { + children: [], + label: '南漳县', + value: 420624, + }, + { + children: [], + label: '谷城县', + value: 420625, + }, + { + children: [], + label: '保康县', + value: 420626, + }, + { + children: [], + label: '老河口市', + value: 420682, + }, + { + children: [], + label: '枣阳市', + value: 420683, + }, + { + children: [], + label: '宜城市', + value: 420684, + }, + ], + label: '襄阳市', + value: 420600, + }, + { + children: [ + { + children: [], + label: '梁子湖区', + value: 420702, + }, + { + children: [], + label: '华容区', + value: 420703, + }, + { + children: [], + label: '鄂城区', + value: 420704, + }, + ], + label: '鄂州市', + value: 420700, + }, + { + children: [ + { + children: [], + label: '东宝区', + value: 420802, + }, + { + children: [], + label: '掇刀区', + value: 420804, + }, + { + children: [], + label: '沙洋县', + value: 420822, + }, + { + children: [], + label: '钟祥市', + value: 420881, + }, + { + children: [], + label: '京山市', + value: 420882, + }, + ], + label: '荆门市', + value: 420800, + }, + { + children: [ + { + children: [], + label: '孝南区', + value: 420902, + }, + { + children: [], + label: '孝昌县', + value: 420921, + }, + { + children: [], + label: '大悟县', + value: 420922, + }, + { + children: [], + label: '云梦县', + value: 420923, + }, + { + children: [], + label: '应城市', + value: 420981, + }, + { + children: [], + label: '安陆市', + value: 420982, + }, + { + children: [], + label: '汉川市', + value: 420984, + }, + ], + label: '孝感市', + value: 420900, + }, + { + children: [ + { + children: [], + label: '沙市区', + value: 421002, + }, + { + children: [], + label: '荆州区', + value: 421003, + }, + { + children: [], + label: '公安县', + value: 421022, + }, + { + children: [], + label: '监利县', + value: 421023, + }, + { + children: [], + label: '江陵县', + value: 421024, + }, + { + children: [], + label: '石首市', + value: 421081, + }, + { + children: [], + label: '洪湖市', + value: 421083, + }, + { + children: [], + label: '松滋市', + value: 421087, + }, + ], + label: '荆州市', + value: 421000, + }, + { + children: [ + { + children: [], + label: '黄州区', + value: 421102, + }, + { + children: [], + label: '团风县', + value: 421121, + }, + { + children: [], + label: '红安县', + value: 421122, + }, + { + children: [], + label: '罗田县', + value: 421123, + }, + { + children: [], + label: '英山县', + value: 421124, + }, + { + children: [], + label: '浠水县', + value: 421125, + }, + { + children: [], + label: '蕲春县', + value: 421126, + }, + { + children: [], + label: '黄梅县', + value: 421127, + }, + { + children: [], + label: '麻城市', + value: 421181, + }, + { + children: [], + label: '武穴市', + value: 421182, + }, + ], + label: '黄冈市', + value: 421100, + }, + { + children: [ + { + children: [], + label: '咸安区', + value: 421202, + }, + { + children: [], + label: '嘉鱼县', + value: 421221, + }, + { + children: [], + label: '通城县', + value: 421222, + }, + { + children: [], + label: '崇阳县', + value: 421223, + }, + { + children: [], + label: '通山县', + value: 421224, + }, + { + children: [], + label: '赤壁市', + value: 421281, + }, + ], + label: '咸宁市', + value: 421200, + }, + { + children: [ + { + children: [], + label: '曾都区', + value: 421303, + }, + { + children: [], + label: '随县', + value: 421321, + }, + { + children: [], + label: '广水市', + value: 421381, + }, + ], + label: '随州市', + value: 421300, + }, + { + children: [ + { + children: [], + label: '恩施市', + value: 422801, + }, + { + children: [], + label: '利川市', + value: 422802, + }, + { + children: [], + label: '建始县', + value: 422822, + }, + { + children: [], + label: '巴东县', + value: 422823, + }, + { + children: [], + label: '宣恩县', + value: 422825, + }, + { + children: [], + label: '咸丰县', + value: 422826, + }, + { + children: [], + label: '来凤县', + value: 422827, + }, + { + children: [], + label: '鹤峰县', + value: 422828, + }, + ], + label: '恩施土家族苗族自治州', + value: 422800, + }, + { + children: [], + label: '仙桃市', + value: 429004, + }, + { + children: [], + label: '潜江市', + value: 429005, + }, + { + children: [], + label: '天门市', + value: 429006, + }, + { + children: [], + label: '神农架林区', + value: 429021, + }, + ], + label: '湖北省', + value: 420000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '芙蓉区', + value: 430102, + }, + { + children: [], + label: '天心区', + value: 430103, + }, + { + children: [], + label: '岳麓区', + value: 430104, + }, + { + children: [], + label: '开福区', + value: 430105, + }, + { + children: [], + label: '雨花区', + value: 430111, + }, + { + children: [], + label: '望城区', + value: 430112, + }, + { + children: [], + label: '长沙县', + value: 430121, + }, + { + children: [], + label: '浏阳市', + value: 430181, + }, + { + children: [], + label: '宁乡市', + value: 430182, + }, + ], + label: '长沙市', + value: 430100, + }, + { + children: [ + { + children: [], + label: '荷塘区', + value: 430202, + }, + { + children: [], + label: '芦淞区', + value: 430203, + }, + { + children: [], + label: '石峰区', + value: 430204, + }, + { + children: [], + label: '天元区', + value: 430211, + }, + { + children: [], + label: '渌口区', + value: 430212, + }, + { + children: [], + label: '攸县', + value: 430223, + }, + { + children: [], + label: '茶陵县', + value: 430224, + }, + { + children: [], + label: '炎陵县', + value: 430225, + }, + { + children: [], + label: '醴陵市', + value: 430281, + }, + ], + label: '株洲市', + value: 430200, + }, + { + children: [ + { + children: [], + label: '雨湖区', + value: 430302, + }, + { + children: [], + label: '岳塘区', + value: 430304, + }, + { + children: [], + label: '湘潭县', + value: 430321, + }, + { + children: [], + label: '湘乡市', + value: 430381, + }, + { + children: [], + label: '韶山市', + value: 430382, + }, + ], + label: '湘潭市', + value: 430300, + }, + { + children: [ + { + children: [], + label: '珠晖区', + value: 430405, + }, + { + children: [], + label: '雁峰区', + value: 430406, + }, + { + children: [], + label: '石鼓区', + value: 430407, + }, + { + children: [], + label: '蒸湘区', + value: 430408, + }, + { + children: [], + label: '南岳区', + value: 430412, + }, + { + children: [], + label: '衡阳县', + value: 430421, + }, + { + children: [], + label: '衡南县', + value: 430422, + }, + { + children: [], + label: '衡山县', + value: 430423, + }, + { + children: [], + label: '衡东县', + value: 430424, + }, + { + children: [], + label: '祁东县', + value: 430426, + }, + { + children: [], + label: '耒阳市', + value: 430481, + }, + { + children: [], + label: '常宁市', + value: 430482, + }, + ], + label: '衡阳市', + value: 430400, + }, + { + children: [ + { + children: [], + label: '双清区', + value: 430502, + }, + { + children: [], + label: '大祥区', + value: 430503, + }, + { + children: [], + label: '北塔区', + value: 430511, + }, + { + children: [], + label: '邵东县', + value: 430521, + }, + { + children: [], + label: '新邵县', + value: 430522, + }, + { + children: [], + label: '邵阳县', + value: 430523, + }, + { + children: [], + label: '隆回县', + value: 430524, + }, + { + children: [], + label: '洞口县', + value: 430525, + }, + { + children: [], + label: '绥宁县', + value: 430527, + }, + { + children: [], + label: '新宁县', + value: 430528, + }, + { + children: [], + label: '城步苗族自治县', + value: 430529, + }, + { + children: [], + label: '武冈市', + value: 430581, + }, + ], + label: '邵阳市', + value: 430500, + }, + { + children: [ + { + children: [], + label: '岳阳楼区', + value: 430602, + }, + { + children: [], + label: '云溪区', + value: 430603, + }, + { + children: [], + label: '君山区', + value: 430611, + }, + { + children: [], + label: '岳阳县', + value: 430621, + }, + { + children: [], + label: '华容县', + value: 430623, + }, + { + children: [], + label: '湘阴县', + value: 430624, + }, + { + children: [], + label: '平江县', + value: 430626, + }, + { + children: [], + label: '汨罗市', + value: 430681, + }, + { + children: [], + label: '临湘市', + value: 430682, + }, + ], + label: '岳阳市', + value: 430600, + }, + { + children: [ + { + children: [], + label: '武陵区', + value: 430702, + }, + { + children: [], + label: '鼎城区', + value: 430703, + }, + { + children: [], + label: '安乡县', + value: 430721, + }, + { + children: [], + label: '汉寿县', + value: 430722, + }, + { + children: [], + label: '澧县', + value: 430723, + }, + { + children: [], + label: '临澧县', + value: 430724, + }, + { + children: [], + label: '桃源县', + value: 430725, + }, + { + children: [], + label: '石门县', + value: 430726, + }, + { + children: [], + label: '津市市', + value: 430781, + }, + ], + label: '常德市', + value: 430700, + }, + { + children: [ + { + children: [], + label: '永定区', + value: 430802, + }, + { + children: [], + label: '武陵源区', + value: 430811, + }, + { + children: [], + label: '慈利县', + value: 430821, + }, + { + children: [], + label: '桑植县', + value: 430822, + }, + ], + label: '张家界市', + value: 430800, + }, + { + children: [ + { + children: [], + label: '资阳区', + value: 430902, + }, + { + children: [], + label: '赫山区', + value: 430903, + }, + { + children: [], + label: '南县', + value: 430921, + }, + { + children: [], + label: '桃江县', + value: 430922, + }, + { + children: [], + label: '安化县', + value: 430923, + }, + { + children: [], + label: '沅江市', + value: 430981, + }, + ], + label: '益阳市', + value: 430900, + }, + { + children: [ + { + children: [], + label: '北湖区', + value: 431002, + }, + { + children: [], + label: '苏仙区', + value: 431003, + }, + { + children: [], + label: '桂阳县', + value: 431021, + }, + { + children: [], + label: '宜章县', + value: 431022, + }, + { + children: [], + label: '永兴县', + value: 431023, + }, + { + children: [], + label: '嘉禾县', + value: 431024, + }, + { + children: [], + label: '临武县', + value: 431025, + }, + { + children: [], + label: '汝城县', + value: 431026, + }, + { + children: [], + label: '桂东县', + value: 431027, + }, + { + children: [], + label: '安仁县', + value: 431028, + }, + { + children: [], + label: '资兴市', + value: 431081, + }, + ], + label: '郴州市', + value: 431000, + }, + { + children: [ + { + children: [], + label: '零陵区', + value: 431102, + }, + { + children: [], + label: '冷水滩区', + value: 431103, + }, + { + children: [], + label: '祁阳县', + value: 431121, + }, + { + children: [], + label: '东安县', + value: 431122, + }, + { + children: [], + label: '双牌县', + value: 431123, + }, + { + children: [], + label: '道县', + value: 431124, + }, + { + children: [], + label: '江永县', + value: 431125, + }, + { + children: [], + label: '宁远县', + value: 431126, + }, + { + children: [], + label: '蓝山县', + value: 431127, + }, + { + children: [], + label: '新田县', + value: 431128, + }, + { + children: [], + label: '江华瑶族自治县', + value: 431129, + }, + ], + label: '永州市', + value: 431100, + }, + { + children: [ + { + children: [], + label: '鹤城区', + value: 431202, + }, + { + children: [], + label: '中方县', + value: 431221, + }, + { + children: [], + label: '沅陵县', + value: 431222, + }, + { + children: [], + label: '辰溪县', + value: 431223, + }, + { + children: [], + label: '溆浦县', + value: 431224, + }, + { + children: [], + label: '会同县', + value: 431225, + }, + { + children: [], + label: '麻阳苗族自治县', + value: 431226, + }, + { + children: [], + label: '新晃侗族自治县', + value: 431227, + }, + { + children: [], + label: '芷江侗族自治县', + value: 431228, + }, + { + children: [], + label: '靖州苗族侗族自治县', + value: 431229, + }, + { + children: [], + label: '通道侗族自治县', + value: 431230, + }, + { + children: [], + label: '洪江市', + value: 431281, + }, + ], + label: '怀化市', + value: 431200, + }, + { + children: [ + { + children: [], + label: '娄星区', + value: 431302, + }, + { + children: [], + label: '双峰县', + value: 431321, + }, + { + children: [], + label: '新化县', + value: 431322, + }, + { + children: [], + label: '冷水江市', + value: 431381, + }, + { + children: [], + label: '涟源市', + value: 431382, + }, + ], + label: '娄底市', + value: 431300, + }, + { + children: [ + { + children: [], + label: '吉首市', + value: 433101, + }, + { + children: [], + label: '泸溪县', + value: 433122, + }, + { + children: [], + label: '凤凰县', + value: 433123, + }, + { + children: [], + label: '花垣县', + value: 433124, + }, + { + children: [], + label: '保靖县', + value: 433125, + }, + { + children: [], + label: '古丈县', + value: 433126, + }, + { + children: [], + label: '永顺县', + value: 433127, + }, + { + children: [], + label: '龙山县', + value: 433130, + }, + ], + label: '湘西土家族苗族自治州', + value: 433100, + }, + ], + label: '湖南省', + value: 430000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '荔湾区', + value: 440103, + }, + { + children: [], + label: '越秀区', + value: 440104, + }, + { + children: [], + label: '海珠区', + value: 440105, + }, + { + children: [], + label: '天河区', + value: 440106, + }, + { + children: [], + label: '白云区', + value: 440111, + }, + { + children: [], + label: '黄埔区', + value: 440112, + }, + { + children: [], + label: '番禺区', + value: 440113, + }, + { + children: [], + label: '花都区', + value: 440114, + }, + { + children: [], + label: '南沙区', + value: 440115, + }, + { + children: [], + label: '从化区', + value: 440117, + }, + { + children: [], + label: '增城区', + value: 440118, + }, + ], + label: '广州市', + value: 440100, + }, + { + children: [ + { + children: [], + label: '武江区', + value: 440203, + }, + { + children: [], + label: '浈江区', + value: 440204, + }, + { + children: [], + label: '曲江区', + value: 440205, + }, + { + children: [], + label: '始兴县', + value: 440222, + }, + { + children: [], + label: '仁化县', + value: 440224, + }, + { + children: [], + label: '翁源县', + value: 440229, + }, + { + children: [], + label: '乳源瑶族自治县', + value: 440232, + }, + { + children: [], + label: '新丰县', + value: 440233, + }, + { + children: [], + label: '乐昌市', + value: 440281, + }, + { + children: [], + label: '南雄市', + value: 440282, + }, + ], + label: '韶关市', + value: 440200, + }, + { + children: [ + { + children: [], + label: '罗湖区', + value: 440303, + }, + { + children: [], + label: '福田区', + value: 440304, + }, + { + children: [], + label: '南山区', + value: 440305, + }, + { + children: [], + label: '宝安区', + value: 440306, + }, + { + children: [], + label: '龙岗区', + value: 440307, + }, + { + children: [], + label: '盐田区', + value: 440308, + }, + { + children: [], + label: '龙华区', + value: 440309, + }, + { + children: [], + label: '坪山区', + value: 440310, + }, + { + children: [], + label: '光明区', + value: 440311, + }, + ], + label: '深圳市', + value: 440300, + }, + { + children: [ + { + children: [], + label: '香洲区', + value: 440402, + }, + { + children: [], + label: '斗门区', + value: 440403, + }, + { + children: [], + label: '金湾区', + value: 440404, + }, + ], + label: '珠海市', + value: 440400, + }, + { + children: [ + { + children: [], + label: '龙湖区', + value: 440507, + }, + { + children: [], + label: '金平区', + value: 440511, + }, + { + children: [], + label: '濠江区', + value: 440512, + }, + { + children: [], + label: '潮阳区', + value: 440513, + }, + { + children: [], + label: '潮南区', + value: 440514, + }, + { + children: [], + label: '澄海区', + value: 440515, + }, + { + children: [], + label: '南澳县', + value: 440523, + }, + ], + label: '汕头市', + value: 440500, + }, + { + children: [ + { + children: [], + label: '禅城区', + value: 440604, + }, + { + children: [], + label: '南海区', + value: 440605, + }, + { + children: [], + label: '顺德区', + value: 440606, + }, + { + children: [], + label: '三水区', + value: 440607, + }, + { + children: [], + label: '高明区', + value: 440608, + }, + ], + label: '佛山市', + value: 440600, + }, + { + children: [ + { + children: [], + label: '蓬江区', + value: 440703, + }, + { + children: [], + label: '江海区', + value: 440704, + }, + { + children: [], + label: '新会区', + value: 440705, + }, + { + children: [], + label: '台山市', + value: 440781, + }, + { + children: [], + label: '开平市', + value: 440783, + }, + { + children: [], + label: '鹤山市', + value: 440784, + }, + { + children: [], + label: '恩平市', + value: 440785, + }, + ], + label: '江门市', + value: 440700, + }, + { + children: [ + { + children: [], + label: '赤坎区', + value: 440802, + }, + { + children: [], + label: '霞山区', + value: 440803, + }, + { + children: [], + label: '坡头区', + value: 440804, + }, + { + children: [], + label: '麻章区', + value: 440811, + }, + { + children: [], + label: '遂溪县', + value: 440823, + }, + { + children: [], + label: '徐闻县', + value: 440825, + }, + { + children: [], + label: '廉江市', + value: 440881, + }, + { + children: [], + label: '雷州市', + value: 440882, + }, + { + children: [], + label: '吴川市', + value: 440883, + }, + ], + label: '湛江市', + value: 440800, + }, + { + children: [ + { + children: [], + label: '茂南区', + value: 440902, + }, + { + children: [], + label: '电白区', + value: 440904, + }, + { + children: [], + label: '高州市', + value: 440981, + }, + { + children: [], + label: '化州市', + value: 440982, + }, + { + children: [], + label: '信宜市', + value: 440983, + }, + ], + label: '茂名市', + value: 440900, + }, + { + children: [ + { + children: [], + label: '端州区', + value: 441202, + }, + { + children: [], + label: '鼎湖区', + value: 441203, + }, + { + children: [], + label: '高要区', + value: 441204, + }, + { + children: [], + label: '广宁县', + value: 441223, + }, + { + children: [], + label: '怀集县', + value: 441224, + }, + { + children: [], + label: '封开县', + value: 441225, + }, + { + children: [], + label: '德庆县', + value: 441226, + }, + { + children: [], + label: '四会市', + value: 441284, + }, + ], + label: '肇庆市', + value: 441200, + }, + { + children: [ + { + children: [], + label: '惠城区', + value: 441302, + }, + { + children: [], + label: '惠阳区', + value: 441303, + }, + { + children: [], + label: '博罗县', + value: 441322, + }, + { + children: [], + label: '惠东县', + value: 441323, + }, + { + children: [], + label: '龙门县', + value: 441324, + }, + ], + label: '惠州市', + value: 441300, + }, + { + children: [ + { + children: [], + label: '梅江区', + value: 441402, + }, + { + children: [], + label: '梅县区', + value: 441403, + }, + { + children: [], + label: '大埔县', + value: 441422, + }, + { + children: [], + label: '丰顺县', + value: 441423, + }, + { + children: [], + label: '五华县', + value: 441424, + }, + { + children: [], + label: '平远县', + value: 441426, + }, + { + children: [], + label: '蕉岭县', + value: 441427, + }, + { + children: [], + label: '兴宁市', + value: 441481, + }, + ], + label: '梅州市', + value: 441400, + }, + { + children: [ + { + children: [], + label: '城区', + value: 441502, + }, + { + children: [], + label: '海丰县', + value: 441521, + }, + { + children: [], + label: '陆河县', + value: 441523, + }, + { + children: [], + label: '陆丰市', + value: 441581, + }, + ], + label: '汕尾市', + value: 441500, + }, + { + children: [ + { + children: [], + label: '源城区', + value: 441602, + }, + { + children: [], + label: '紫金县', + value: 441621, + }, + { + children: [], + label: '龙川县', + value: 441622, + }, + { + children: [], + label: '连平县', + value: 441623, + }, + { + children: [], + label: '和平县', + value: 441624, + }, + { + children: [], + label: '东源县', + value: 441625, + }, + ], + label: '河源市', + value: 441600, + }, + { + children: [ + { + children: [], + label: '江城区', + value: 441702, + }, + { + children: [], + label: '阳东区', + value: 441704, + }, + { + children: [], + label: '阳西县', + value: 441721, + }, + { + children: [], + label: '阳春市', + value: 441781, + }, + ], + label: '阳江市', + value: 441700, + }, + { + children: [ + { + children: [], + label: '清城区', + value: 441802, + }, + { + children: [], + label: '清新区', + value: 441803, + }, + { + children: [], + label: '佛冈县', + value: 441821, + }, + { + children: [], + label: '阳山县', + value: 441823, + }, + { + children: [], + label: '连山壮族瑶族自治县', + value: 441825, + }, + { + children: [], + label: '连南瑶族自治县', + value: 441826, + }, + { + children: [], + label: '英德市', + value: 441881, + }, + { + children: [], + label: '连州市', + value: 441882, + }, + ], + label: '清远市', + value: 441800, + }, + { + children: [], + label: '东莞市', + value: 441900, + }, + { + children: [], + label: '中山市', + value: 442000, + }, + { + children: [ + { + children: [], + label: '湘桥区', + value: 445102, + }, + { + children: [], + label: '潮安区', + value: 445103, + }, + { + children: [], + label: '饶平县', + value: 445122, + }, + ], + label: '潮州市', + value: 445100, + }, + { + children: [ + { + children: [], + label: '榕城区', + value: 445202, + }, + { + children: [], + label: '揭东区', + value: 445203, + }, + { + children: [], + label: '揭西县', + value: 445222, + }, + { + children: [], + label: '惠来县', + value: 445224, + }, + { + children: [], + label: '普宁市', + value: 445281, + }, + ], + label: '揭阳市', + value: 445200, + }, + { + children: [ + { + children: [], + label: '云城区', + value: 445302, + }, + { + children: [], + label: '云安区', + value: 445303, + }, + { + children: [], + label: '新兴县', + value: 445321, + }, + { + children: [], + label: '郁南县', + value: 445322, + }, + { + children: [], + label: '罗定市', + value: 445381, + }, + ], + label: '云浮市', + value: 445300, + }, + ], + label: '广东省', + value: 440000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '兴宁区', + value: 450102, + }, + { + children: [], + label: '青秀区', + value: 450103, + }, + { + children: [], + label: '江南区', + value: 450105, + }, + { + children: [], + label: '西乡塘区', + value: 450107, + }, + { + children: [], + label: '良庆区', + value: 450108, + }, + { + children: [], + label: '邕宁区', + value: 450109, + }, + { + children: [], + label: '武鸣区', + value: 450110, + }, + { + children: [], + label: '隆安县', + value: 450123, + }, + { + children: [], + label: '马山县', + value: 450124, + }, + { + children: [], + label: '上林县', + value: 450125, + }, + { + children: [], + label: '宾阳县', + value: 450126, + }, + { + children: [], + label: '横县', + value: 450127, + }, + ], + label: '南宁市', + value: 450100, + }, + { + children: [ + { + children: [], + label: '城中区', + value: 450202, + }, + { + children: [], + label: '鱼峰区', + value: 450203, + }, + { + children: [], + label: '柳南区', + value: 450204, + }, + { + children: [], + label: '柳北区', + value: 450205, + }, + { + children: [], + label: '柳江区', + value: 450206, + }, + { + children: [], + label: '柳城县', + value: 450222, + }, + { + children: [], + label: '鹿寨县', + value: 450223, + }, + { + children: [], + label: '融安县', + value: 450224, + }, + { + children: [], + label: '融水苗族自治县', + value: 450225, + }, + { + children: [], + label: '三江侗族自治县', + value: 450226, + }, + ], + label: '柳州市', + value: 450200, + }, + { + children: [ + { + children: [], + label: '秀峰区', + value: 450302, + }, + { + children: [], + label: '叠彩区', + value: 450303, + }, + { + children: [], + label: '象山区', + value: 450304, + }, + { + children: [], + label: '七星区', + value: 450305, + }, + { + children: [], + label: '雁山区', + value: 450311, + }, + { + children: [], + label: '临桂区', + value: 450312, + }, + { + children: [], + label: '阳朔县', + value: 450321, + }, + { + children: [], + label: '灵川县', + value: 450323, + }, + { + children: [], + label: '全州县', + value: 450324, + }, + { + children: [], + label: '兴安县', + value: 450325, + }, + { + children: [], + label: '永福县', + value: 450326, + }, + { + children: [], + label: '灌阳县', + value: 450327, + }, + { + children: [], + label: '龙胜各族自治县', + value: 450328, + }, + { + children: [], + label: '资源县', + value: 450329, + }, + { + children: [], + label: '平乐县', + value: 450330, + }, + { + children: [], + label: '恭城瑶族自治县', + value: 450332, + }, + { + children: [], + label: '荔浦市', + value: 450381, + }, + ], + label: '桂林市', + value: 450300, + }, + { + children: [ + { + children: [], + label: '万秀区', + value: 450403, + }, + { + children: [], + label: '长洲区', + value: 450405, + }, + { + children: [], + label: '龙圩区', + value: 450406, + }, + { + children: [], + label: '苍梧县', + value: 450421, + }, + { + children: [], + label: '藤县', + value: 450422, + }, + { + children: [], + label: '蒙山县', + value: 450423, + }, + { + children: [], + label: '岑溪市', + value: 450481, + }, + ], + label: '梧州市', + value: 450400, + }, + { + children: [ + { + children: [], + label: '海城区', + value: 450502, + }, + { + children: [], + label: '银海区', + value: 450503, + }, + { + children: [], + label: '铁山港区', + value: 450512, + }, + { + children: [], + label: '合浦县', + value: 450521, + }, + ], + label: '北海市', + value: 450500, + }, + { + children: [ + { + children: [], + label: '港口区', + value: 450602, + }, + { + children: [], + label: '防城区', + value: 450603, + }, + { + children: [], + label: '上思县', + value: 450621, + }, + { + children: [], + label: '东兴市', + value: 450681, + }, + ], + label: '防城港市', + value: 450600, + }, + { + children: [ + { + children: [], + label: '钦南区', + value: 450702, + }, + { + children: [], + label: '钦北区', + value: 450703, + }, + { + children: [], + label: '灵山县', + value: 450721, + }, + { + children: [], + label: '浦北县', + value: 450722, + }, + ], + label: '钦州市', + value: 450700, + }, + { + children: [ + { + children: [], + label: '港北区', + value: 450802, + }, + { + children: [], + label: '港南区', + value: 450803, + }, + { + children: [], + label: '覃塘区', + value: 450804, + }, + { + children: [], + label: '平南县', + value: 450821, + }, + { + children: [], + label: '桂平市', + value: 450881, + }, + ], + label: '贵港市', + value: 450800, + }, + { + children: [ + { + children: [], + label: '玉州区', + value: 450902, + }, + { + children: [], + label: '福绵区', + value: 450903, + }, + { + children: [], + label: '容县', + value: 450921, + }, + { + children: [], + label: '陆川县', + value: 450922, + }, + { + children: [], + label: '博白县', + value: 450923, + }, + { + children: [], + label: '兴业县', + value: 450924, + }, + { + children: [], + label: '北流市', + value: 450981, + }, + ], + label: '玉林市', + value: 450900, + }, + { + children: [ + { + children: [], + label: '右江区', + value: 451002, + }, + { + children: [], + label: '田阳县', + value: 451021, + }, + { + children: [], + label: '田东县', + value: 451022, + }, + { + children: [], + label: '平果县', + value: 451023, + }, + { + children: [], + label: '德保县', + value: 451024, + }, + { + children: [], + label: '那坡县', + value: 451026, + }, + { + children: [], + label: '凌云县', + value: 451027, + }, + { + children: [], + label: '乐业县', + value: 451028, + }, + { + children: [], + label: '田林县', + value: 451029, + }, + { + children: [], + label: '西林县', + value: 451030, + }, + { + children: [], + label: '隆林各族自治县', + value: 451031, + }, + { + children: [], + label: '靖西市', + value: 451081, + }, + ], + label: '百色市', + value: 451000, + }, + { + children: [ + { + children: [], + label: '八步区', + value: 451102, + }, + { + children: [], + label: '平桂区', + value: 451103, + }, + { + children: [], + label: '昭平县', + value: 451121, + }, + { + children: [], + label: '钟山县', + value: 451122, + }, + { + children: [], + label: '富川瑶族自治县', + value: 451123, + }, + ], + label: '贺州市', + value: 451100, + }, + { + children: [ + { + children: [], + label: '金城江区', + value: 451202, + }, + { + children: [], + label: '宜州区', + value: 451203, + }, + { + children: [], + label: '南丹县', + value: 451221, + }, + { + children: [], + label: '天峨县', + value: 451222, + }, + { + children: [], + label: '凤山县', + value: 451223, + }, + { + children: [], + label: '东兰县', + value: 451224, + }, + { + children: [], + label: '罗城仫佬族自治县', + value: 451225, + }, + { + children: [], + label: '环江毛南族自治县', + value: 451226, + }, + { + children: [], + label: '巴马瑶族自治县', + value: 451227, + }, + { + children: [], + label: '都安瑶族自治县', + value: 451228, + }, + { + children: [], + label: '大化瑶族自治县', + value: 451229, + }, + ], + label: '河池市', + value: 451200, + }, + { + children: [ + { + children: [], + label: '兴宾区', + value: 451302, + }, + { + children: [], + label: '忻城县', + value: 451321, + }, + { + children: [], + label: '象州县', + value: 451322, + }, + { + children: [], + label: '武宣县', + value: 451323, + }, + { + children: [], + label: '金秀瑶族自治县', + value: 451324, + }, + { + children: [], + label: '合山市', + value: 451381, + }, + ], + label: '来宾市', + value: 451300, + }, + { + children: [ + { + children: [], + label: '江州区', + value: 451402, + }, + { + children: [], + label: '扶绥县', + value: 451421, + }, + { + children: [], + label: '宁明县', + value: 451422, + }, + { + children: [], + label: '龙州县', + value: 451423, + }, + { + children: [], + label: '大新县', + value: 451424, + }, + { + children: [], + label: '天等县', + value: 451425, + }, + { + children: [], + label: '凭祥市', + value: 451481, + }, + ], + label: '崇左市', + value: 451400, + }, + ], + label: '广西壮族自治区', + value: 450000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '秀英区', + value: 460105, + }, + { + children: [], + label: '龙华区', + value: 460106, + }, + { + children: [], + label: '琼山区', + value: 460107, + }, + { + children: [], + label: '美兰区', + value: 460108, + }, + ], + label: '海口市', + value: 460100, + }, + { + children: [ + { + children: [], + label: '海棠区', + value: 460202, + }, + { + children: [], + label: '吉阳区', + value: 460203, + }, + { + children: [], + label: '天涯区', + value: 460204, + }, + { + children: [], + label: '崖州区', + value: 460205, + }, + ], + label: '三亚市', + value: 460200, + }, + { + children: [ + { + children: [], + label: '西沙群岛', + value: 460321, + }, + { + children: [], + label: '南沙群岛', + value: 460322, + }, + { + children: [], + label: '中沙群岛', + value: 460323, + }, + ], + label: '三沙市', + value: 460300, + }, + { + children: [], + label: '儋州市', + value: 460400, + }, + { + children: [], + label: '五指山市', + value: 469001, + }, + { + children: [], + label: '琼海市', + value: 469002, + }, + { + children: [], + label: '文昌市', + value: 469005, + }, + { + children: [], + label: '万宁市', + value: 469006, + }, + { + children: [], + label: '东方市', + value: 469007, + }, + { + children: [], + label: '定安县', + value: 469021, + }, + { + children: [], + label: '屯昌县', + value: 469022, + }, + { + children: [], + label: '澄迈县', + value: 469023, + }, + { + children: [], + label: '临高县', + value: 469024, + }, + { + children: [], + label: '白沙黎族自治县', + value: 469025, + }, + { + children: [], + label: '昌江黎族自治县', + value: 469026, + }, + { + children: [], + label: '乐东黎族自治县', + value: 469027, + }, + { + children: [], + label: '陵水黎族自治县', + value: 469028, + }, + { + children: [], + label: '保亭黎族苗族自治县', + value: 469029, + }, + { + children: [], + label: '琼中黎族苗族自治县', + value: 469030, + }, + ], + label: '海南省', + value: 460000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '万州区', + value: 500101, + }, + { + children: [], + label: '涪陵区', + value: 500102, + }, + { + children: [], + label: '渝中区', + value: 500103, + }, + { + children: [], + label: '大渡口区', + value: 500104, + }, + { + children: [], + label: '江北区', + value: 500105, + }, + { + children: [], + label: '沙坪坝区', + value: 500106, + }, + { + children: [], + label: '九龙坡区', + value: 500107, + }, + { + children: [], + label: '南岸区', + value: 500108, + }, + { + children: [], + label: '北碚区', + value: 500109, + }, + { + children: [], + label: '綦江区', + value: 500110, + }, + { + children: [], + label: '大足区', + value: 500111, + }, + { + children: [], + label: '渝北区', + value: 500112, + }, + { + children: [], + label: '巴南区', + value: 500113, + }, + { + children: [], + label: '黔江区', + value: 500114, + }, + { + children: [], + label: '长寿区', + value: 500115, + }, + { + children: [], + label: '江津区', + value: 500116, + }, + { + children: [], + label: '合川区', + value: 500117, + }, + { + children: [], + label: '永川区', + value: 500118, + }, + { + children: [], + label: '南川区', + value: 500119, + }, + { + children: [], + label: '璧山区', + value: 500120, + }, + { + children: [], + label: '铜梁区', + value: 500151, + }, + { + children: [], + label: '潼南区', + value: 500152, + }, + { + children: [], + label: '荣昌区', + value: 500153, + }, + { + children: [], + label: '开州区', + value: 500154, + }, + { + children: [], + label: '梁平区', + value: 500155, + }, + { + children: [], + label: '武隆区', + value: 500156, + }, + ], + label: '重庆市', + value: 500100, + }, + { + children: [ + { + children: [], + label: '城口县', + value: 500229, + }, + { + children: [], + label: '丰都县', + value: 500230, + }, + { + children: [], + label: '垫江县', + value: 500231, + }, + { + children: [], + label: '忠县', + value: 500233, + }, + { + children: [], + label: '云阳县', + value: 500235, + }, + { + children: [], + label: '奉节县', + value: 500236, + }, + { + children: [], + label: '巫山县', + value: 500237, + }, + { + children: [], + label: '巫溪县', + value: 500238, + }, + { + children: [], + label: '石柱土家族自治县', + value: 500240, + }, + { + children: [], + label: '秀山土家族苗族自治县', + value: 500241, + }, + { + children: [], + label: '酉阳土家族苗族自治县', + value: 500242, + }, + { + children: [], + label: '彭水苗族土家族自治县', + value: 500243, + }, + ], + label: '重庆市', + value: 500200, + }, + ], + label: '重庆市', + value: 500000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '锦江区', + value: 510104, + }, + { + children: [], + label: '青羊区', + value: 510105, + }, + { + children: [], + label: '金牛区', + value: 510106, + }, + { + children: [], + label: '武侯区', + value: 510107, + }, + { + children: [], + label: '成华区', + value: 510108, + }, + { + children: [], + label: '龙泉驿区', + value: 510112, + }, + { + children: [], + label: '青白江区', + value: 510113, + }, + { + children: [], + label: '新都区', + value: 510114, + }, + { + children: [], + label: '温江区', + value: 510115, + }, + { + children: [], + label: '双流区', + value: 510116, + }, + { + children: [], + label: '郫都区', + value: 510117, + }, + { + children: [], + label: '金堂县', + value: 510121, + }, + { + children: [], + label: '大邑县', + value: 510129, + }, + { + children: [], + label: '蒲江县', + value: 510131, + }, + { + children: [], + label: '新津县', + value: 510132, + }, + { + children: [], + label: '都江堰市', + value: 510181, + }, + { + children: [], + label: '彭州市', + value: 510182, + }, + { + children: [], + label: '邛崃市', + value: 510183, + }, + { + children: [], + label: '崇州市', + value: 510184, + }, + { + children: [], + label: '简阳市', + value: 510185, + }, + ], + label: '成都市', + value: 510100, + }, + { + children: [ + { + children: [], + label: '自流井区', + value: 510302, + }, + { + children: [], + label: '贡井区', + value: 510303, + }, + { + children: [], + label: '大安区', + value: 510304, + }, + { + children: [], + label: '沿滩区', + value: 510311, + }, + { + children: [], + label: '荣县', + value: 510321, + }, + { + children: [], + label: '富顺县', + value: 510322, + }, + ], + label: '自贡市', + value: 510300, + }, + { + children: [ + { + children: [], + label: '东区', + value: 510402, + }, + { + children: [], + label: '西区', + value: 510403, + }, + { + children: [], + label: '仁和区', + value: 510411, + }, + { + children: [], + label: '米易县', + value: 510421, + }, + { + children: [], + label: '盐边县', + value: 510422, + }, + ], + label: '攀枝花市', + value: 510400, + }, + { + children: [ + { + children: [], + label: '江阳区', + value: 510502, + }, + { + children: [], + label: '纳溪区', + value: 510503, + }, + { + children: [], + label: '龙马潭区', + value: 510504, + }, + { + children: [], + label: '泸县', + value: 510521, + }, + { + children: [], + label: '合江县', + value: 510522, + }, + { + children: [], + label: '叙永县', + value: 510524, + }, + { + children: [], + label: '古蔺县', + value: 510525, + }, + ], + label: '泸州市', + value: 510500, + }, + { + children: [ + { + children: [], + label: '旌阳区', + value: 510603, + }, + { + children: [], + label: '罗江区', + value: 510604, + }, + { + children: [], + label: '中江县', + value: 510623, + }, + { + children: [], + label: '广汉市', + value: 510681, + }, + { + children: [], + label: '什邡市', + value: 510682, + }, + { + children: [], + label: '绵竹市', + value: 510683, + }, + ], + label: '德阳市', + value: 510600, + }, + { + children: [ + { + children: [], + label: '涪城区', + value: 510703, + }, + { + children: [], + label: '游仙区', + value: 510704, + }, + { + children: [], + label: '安州区', + value: 510705, + }, + { + children: [], + label: '三台县', + value: 510722, + }, + { + children: [], + label: '盐亭县', + value: 510723, + }, + { + children: [], + label: '梓潼县', + value: 510725, + }, + { + children: [], + label: '北川羌族自治县', + value: 510726, + }, + { + children: [], + label: '平武县', + value: 510727, + }, + { + children: [], + label: '江油市', + value: 510781, + }, + ], + label: '绵阳市', + value: 510700, + }, + { + children: [ + { + children: [], + label: '利州区', + value: 510802, + }, + { + children: [], + label: '昭化区', + value: 510811, + }, + { + children: [], + label: '朝天区', + value: 510812, + }, + { + children: [], + label: '旺苍县', + value: 510821, + }, + { + children: [], + label: '青川县', + value: 510822, + }, + { + children: [], + label: '剑阁县', + value: 510823, + }, + { + children: [], + label: '苍溪县', + value: 510824, + }, + ], + label: '广元市', + value: 510800, + }, + { + children: [ + { + children: [], + label: '船山区', + value: 510903, + }, + { + children: [], + label: '安居区', + value: 510904, + }, + { + children: [], + label: '蓬溪县', + value: 510921, + }, + { + children: [], + label: '射洪县', + value: 510922, + }, + { + children: [], + label: '大英县', + value: 510923, + }, + ], + label: '遂宁市', + value: 510900, + }, + { + children: [ + { + children: [], + label: '市中区', + value: 511002, + }, + { + children: [], + label: '东兴区', + value: 511011, + }, + { + children: [], + label: '威远县', + value: 511024, + }, + { + children: [], + label: '资中县', + value: 511025, + }, + { + children: [], + label: '隆昌市', + value: 511083, + }, + ], + label: '内江市', + value: 511000, + }, + { + children: [ + { + children: [], + label: '市中区', + value: 511102, + }, + { + children: [], + label: '沙湾区', + value: 511111, + }, + { + children: [], + label: '五通桥区', + value: 511112, + }, + { + children: [], + label: '金口河区', + value: 511113, + }, + { + children: [], + label: '犍为县', + value: 511123, + }, + { + children: [], + label: '井研县', + value: 511124, + }, + { + children: [], + label: '夹江县', + value: 511126, + }, + { + children: [], + label: '沐川县', + value: 511129, + }, + { + children: [], + label: '峨边彝族自治县', + value: 511132, + }, + { + children: [], + label: '马边彝族自治县', + value: 511133, + }, + { + children: [], + label: '峨眉山市', + value: 511181, + }, + ], + label: '乐山市', + value: 511100, + }, + { + children: [ + { + children: [], + label: '顺庆区', + value: 511302, + }, + { + children: [], + label: '高坪区', + value: 511303, + }, + { + children: [], + label: '嘉陵区', + value: 511304, + }, + { + children: [], + label: '南部县', + value: 511321, + }, + { + children: [], + label: '营山县', + value: 511322, + }, + { + children: [], + label: '蓬安县', + value: 511323, + }, + { + children: [], + label: '仪陇县', + value: 511324, + }, + { + children: [], + label: '西充县', + value: 511325, + }, + { + children: [], + label: '阆中市', + value: 511381, + }, + ], + label: '南充市', + value: 511300, + }, + { + children: [ + { + children: [], + label: '东坡区', + value: 511402, + }, + { + children: [], + label: '彭山区', + value: 511403, + }, + { + children: [], + label: '仁寿县', + value: 511421, + }, + { + children: [], + label: '洪雅县', + value: 511423, + }, + { + children: [], + label: '丹棱县', + value: 511424, + }, + { + children: [], + label: '青神县', + value: 511425, + }, + ], + label: '眉山市', + value: 511400, + }, + { + children: [ + { + children: [], + label: '翠屏区', + value: 511502, + }, + { + children: [], + label: '南溪区', + value: 511503, + }, + { + children: [], + label: '叙州区', + value: 511504, + }, + { + children: [], + label: '江安县', + value: 511523, + }, + { + children: [], + label: '长宁县', + value: 511524, + }, + { + children: [], + label: '高县', + value: 511525, + }, + { + children: [], + label: '珙县', + value: 511526, + }, + { + children: [], + label: '筠连县', + value: 511527, + }, + { + children: [], + label: '兴文县', + value: 511528, + }, + { + children: [], + label: '屏山县', + value: 511529, + }, + ], + label: '宜宾市', + value: 511500, + }, + { + children: [ + { + children: [], + label: '广安区', + value: 511602, + }, + { + children: [], + label: '前锋区', + value: 511603, + }, + { + children: [], + label: '岳池县', + value: 511621, + }, + { + children: [], + label: '武胜县', + value: 511622, + }, + { + children: [], + label: '邻水县', + value: 511623, + }, + { + children: [], + label: '华蓥市', + value: 511681, + }, + ], + label: '广安市', + value: 511600, + }, + { + children: [ + { + children: [], + label: '通川区', + value: 511702, + }, + { + children: [], + label: '达川区', + value: 511703, + }, + { + children: [], + label: '宣汉县', + value: 511722, + }, + { + children: [], + label: '开江县', + value: 511723, + }, + { + children: [], + label: '大竹县', + value: 511724, + }, + { + children: [], + label: '渠县', + value: 511725, + }, + { + children: [], + label: '万源市', + value: 511781, + }, + ], + label: '达州市', + value: 511700, + }, + { + children: [ + { + children: [], + label: '雨城区', + value: 511802, + }, + { + children: [], + label: '名山区', + value: 511803, + }, + { + children: [], + label: '荥经县', + value: 511822, + }, + { + children: [], + label: '汉源县', + value: 511823, + }, + { + children: [], + label: '石棉县', + value: 511824, + }, + { + children: [], + label: '天全县', + value: 511825, + }, + { + children: [], + label: '芦山县', + value: 511826, + }, + { + children: [], + label: '宝兴县', + value: 511827, + }, + ], + label: '雅安市', + value: 511800, + }, + { + children: [ + { + children: [], + label: '巴州区', + value: 511902, + }, + { + children: [], + label: '恩阳区', + value: 511903, + }, + { + children: [], + label: '通江县', + value: 511921, + }, + { + children: [], + label: '南江县', + value: 511922, + }, + { + children: [], + label: '平昌县', + value: 511923, + }, + ], + label: '巴中市', + value: 511900, + }, + { + children: [ + { + children: [], + label: '雁江区', + value: 512002, + }, + { + children: [], + label: '安岳县', + value: 512021, + }, + { + children: [], + label: '乐至县', + value: 512022, + }, + ], + label: '资阳市', + value: 512000, + }, + { + children: [ + { + children: [], + label: '马尔康市', + value: 513201, + }, + { + children: [], + label: '汶川县', + value: 513221, + }, + { + children: [], + label: '理县', + value: 513222, + }, + { + children: [], + label: '茂县', + value: 513223, + }, + { + children: [], + label: '松潘县', + value: 513224, + }, + { + children: [], + label: '九寨沟县', + value: 513225, + }, + { + children: [], + label: '金川县', + value: 513226, + }, + { + children: [], + label: '小金县', + value: 513227, + }, + { + children: [], + label: '黑水县', + value: 513228, + }, + { + children: [], + label: '壤塘县', + value: 513230, + }, + { + children: [], + label: '阿坝县', + value: 513231, + }, + { + children: [], + label: '若尔盖县', + value: 513232, + }, + { + children: [], + label: '红原县', + value: 513233, + }, + ], + label: '阿坝藏族羌族自治州', + value: 513200, + }, + { + children: [ + { + children: [], + label: '康定市', + value: 513301, + }, + { + children: [], + label: '泸定县', + value: 513322, + }, + { + children: [], + label: '丹巴县', + value: 513323, + }, + { + children: [], + label: '九龙县', + value: 513324, + }, + { + children: [], + label: '雅江县', + value: 513325, + }, + { + children: [], + label: '道孚县', + value: 513326, + }, + { + children: [], + label: '炉霍县', + value: 513327, + }, + { + children: [], + label: '甘孜县', + value: 513328, + }, + { + children: [], + label: '新龙县', + value: 513329, + }, + { + children: [], + label: '德格县', + value: 513330, + }, + { + children: [], + label: '白玉县', + value: 513331, + }, + { + children: [], + label: '石渠县', + value: 513332, + }, + { + children: [], + label: '色达县', + value: 513333, + }, + { + children: [], + label: '理塘县', + value: 513334, + }, + { + children: [], + label: '巴塘县', + value: 513335, + }, + { + children: [], + label: '乡城县', + value: 513336, + }, + { + children: [], + label: '稻城县', + value: 513337, + }, + { + children: [], + label: '得荣县', + value: 513338, + }, + ], + label: '甘孜藏族自治州', + value: 513300, + }, + { + children: [ + { + children: [], + label: '西昌市', + value: 513401, + }, + { + children: [], + label: '木里藏族自治县', + value: 513422, + }, + { + children: [], + label: '盐源县', + value: 513423, + }, + { + children: [], + label: '德昌县', + value: 513424, + }, + { + children: [], + label: '会理县', + value: 513425, + }, + { + children: [], + label: '会东县', + value: 513426, + }, + { + children: [], + label: '宁南县', + value: 513427, + }, + { + children: [], + label: '普格县', + value: 513428, + }, + { + children: [], + label: '布拖县', + value: 513429, + }, + { + children: [], + label: '金阳县', + value: 513430, + }, + { + children: [], + label: '昭觉县', + value: 513431, + }, + { + children: [], + label: '喜德县', + value: 513432, + }, + { + children: [], + label: '冕宁县', + value: 513433, + }, + { + children: [], + label: '越西县', + value: 513434, + }, + { + children: [], + label: '甘洛县', + value: 513435, + }, + { + children: [], + label: '美姑县', + value: 513436, + }, + { + children: [], + label: '雷波县', + value: 513437, + }, + ], + label: '凉山彝族自治州', + value: 513400, + }, + ], + label: '四川省', + value: 510000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '南明区', + value: 520102, + }, + { + children: [], + label: '云岩区', + value: 520103, + }, + { + children: [], + label: '花溪区', + value: 520111, + }, + { + children: [], + label: '乌当区', + value: 520112, + }, + { + children: [], + label: '白云区', + value: 520113, + }, + { + children: [], + label: '观山湖区', + value: 520115, + }, + { + children: [], + label: '开阳县', + value: 520121, + }, + { + children: [], + label: '息烽县', + value: 520122, + }, + { + children: [], + label: '修文县', + value: 520123, + }, + { + children: [], + label: '清镇市', + value: 520181, + }, + ], + label: '贵阳市', + value: 520100, + }, + { + children: [ + { + children: [], + label: '钟山区', + value: 520201, + }, + { + children: [], + label: '六枝特区', + value: 520203, + }, + { + children: [], + label: '水城县', + value: 520221, + }, + { + children: [], + label: '盘州市', + value: 520281, + }, + ], + label: '六盘水市', + value: 520200, + }, + { + children: [ + { + children: [], + label: '红花岗区', + value: 520302, + }, + { + children: [], + label: '汇川区', + value: 520303, + }, + { + children: [], + label: '播州区', + value: 520304, + }, + { + children: [], + label: '桐梓县', + value: 520322, + }, + { + children: [], + label: '绥阳县', + value: 520323, + }, + { + children: [], + label: '正安县', + value: 520324, + }, + { + children: [], + label: '道真仡佬族苗族自治县', + value: 520325, + }, + { + children: [], + label: '务川仡佬族苗族自治县', + value: 520326, + }, + { + children: [], + label: '凤冈县', + value: 520327, + }, + { + children: [], + label: '湄潭县', + value: 520328, + }, + { + children: [], + label: '余庆县', + value: 520329, + }, + { + children: [], + label: '习水县', + value: 520330, + }, + { + children: [], + label: '赤水市', + value: 520381, + }, + { + children: [], + label: '仁怀市', + value: 520382, + }, + ], + label: '遵义市', + value: 520300, + }, + { + children: [ + { + children: [], + label: '西秀区', + value: 520402, + }, + { + children: [], + label: '平坝区', + value: 520403, + }, + { + children: [], + label: '普定县', + value: 520422, + }, + { + children: [], + label: '镇宁布依族苗族自治县', + value: 520423, + }, + { + children: [], + label: '关岭布依族苗族自治县', + value: 520424, + }, + { + children: [], + label: '紫云苗族布依族自治县', + value: 520425, + }, + ], + label: '安顺市', + value: 520400, + }, + { + children: [ + { + children: [], + label: '七星关区', + value: 520502, + }, + { + children: [], + label: '大方县', + value: 520521, + }, + { + children: [], + label: '黔西县', + value: 520522, + }, + { + children: [], + label: '金沙县', + value: 520523, + }, + { + children: [], + label: '织金县', + value: 520524, + }, + { + children: [], + label: '纳雍县', + value: 520525, + }, + { + children: [], + label: '威宁彝族回族苗族自治县', + value: 520526, + }, + { + children: [], + label: '赫章县', + value: 520527, + }, + ], + label: '毕节市', + value: 520500, + }, + { + children: [ + { + children: [], + label: '碧江区', + value: 520602, + }, + { + children: [], + label: '万山区', + value: 520603, + }, + { + children: [], + label: '江口县', + value: 520621, + }, + { + children: [], + label: '玉屏侗族自治县', + value: 520622, + }, + { + children: [], + label: '石阡县', + value: 520623, + }, + { + children: [], + label: '思南县', + value: 520624, + }, + { + children: [], + label: '印江土家族苗族自治县', + value: 520625, + }, + { + children: [], + label: '德江县', + value: 520626, + }, + { + children: [], + label: '沿河土家族自治县', + value: 520627, + }, + { + children: [], + label: '松桃苗族自治县', + value: 520628, + }, + ], + label: '铜仁市', + value: 520600, + }, + { + children: [ + { + children: [], + label: '兴义市', + value: 522301, + }, + { + children: [], + label: '兴仁市', + value: 522302, + }, + { + children: [], + label: '普安县', + value: 522323, + }, + { + children: [], + label: '晴隆县', + value: 522324, + }, + { + children: [], + label: '贞丰县', + value: 522325, + }, + { + children: [], + label: '望谟县', + value: 522326, + }, + { + children: [], + label: '册亨县', + value: 522327, + }, + { + children: [], + label: '安龙县', + value: 522328, + }, + ], + label: '黔西南布依族苗族自治州', + value: 522300, + }, + { + children: [ + { + children: [], + label: '凯里市', + value: 522601, + }, + { + children: [], + label: '黄平县', + value: 522622, + }, + { + children: [], + label: '施秉县', + value: 522623, + }, + { + children: [], + label: '三穗县', + value: 522624, + }, + { + children: [], + label: '镇远县', + value: 522625, + }, + { + children: [], + label: '岑巩县', + value: 522626, + }, + { + children: [], + label: '天柱县', + value: 522627, + }, + { + children: [], + label: '锦屏县', + value: 522628, + }, + { + children: [], + label: '剑河县', + value: 522629, + }, + { + children: [], + label: '台江县', + value: 522630, + }, + { + children: [], + label: '黎平县', + value: 522631, + }, + { + children: [], + label: '榕江县', + value: 522632, + }, + { + children: [], + label: '从江县', + value: 522633, + }, + { + children: [], + label: '雷山县', + value: 522634, + }, + { + children: [], + label: '麻江县', + value: 522635, + }, + { + children: [], + label: '丹寨县', + value: 522636, + }, + ], + label: '黔东南苗族侗族自治州', + value: 522600, + }, + { + children: [ + { + children: [], + label: '都匀市', + value: 522701, + }, + { + children: [], + label: '福泉市', + value: 522702, + }, + { + children: [], + label: '荔波县', + value: 522722, + }, + { + children: [], + label: '贵定县', + value: 522723, + }, + { + children: [], + label: '瓮安县', + value: 522725, + }, + { + children: [], + label: '独山县', + value: 522726, + }, + { + children: [], + label: '平塘县', + value: 522727, + }, + { + children: [], + label: '罗甸县', + value: 522728, + }, + { + children: [], + label: '长顺县', + value: 522729, + }, + { + children: [], + label: '龙里县', + value: 522730, + }, + { + children: [], + label: '惠水县', + value: 522731, + }, + { + children: [], + label: '三都水族自治县', + value: 522732, + }, + ], + label: '黔南布依族苗族自治州', + value: 522700, + }, + ], + label: '贵州省', + value: 520000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '五华区', + value: 530102, + }, + { + children: [], + label: '盘龙区', + value: 530103, + }, + { + children: [], + label: '官渡区', + value: 530111, + }, + { + children: [], + label: '西山区', + value: 530112, + }, + { + children: [], + label: '东川区', + value: 530113, + }, + { + children: [], + label: '呈贡区', + value: 530114, + }, + { + children: [], + label: '晋宁区', + value: 530115, + }, + { + children: [], + label: '富民县', + value: 530124, + }, + { + children: [], + label: '宜良县', + value: 530125, + }, + { + children: [], + label: '石林彝族自治县', + value: 530126, + }, + { + children: [], + label: '嵩明县', + value: 530127, + }, + { + children: [], + label: '禄劝彝族苗族自治县', + value: 530128, + }, + { + children: [], + label: '寻甸回族彝族自治县', + value: 530129, + }, + { + children: [], + label: '安宁市', + value: 530181, + }, + ], + label: '昆明市', + value: 530100, + }, + { + children: [ + { + children: [], + label: '麒麟区', + value: 530302, + }, + { + children: [], + label: '沾益区', + value: 530303, + }, + { + children: [], + label: '马龙区', + value: 530304, + }, + { + children: [], + label: '陆良县', + value: 530322, + }, + { + children: [], + label: '师宗县', + value: 530323, + }, + { + children: [], + label: '罗平县', + value: 530324, + }, + { + children: [], + label: '富源县', + value: 530325, + }, + { + children: [], + label: '会泽县', + value: 530326, + }, + { + children: [], + label: '宣威市', + value: 530381, + }, + ], + label: '曲靖市', + value: 530300, + }, + { + children: [ + { + children: [], + label: '红塔区', + value: 530402, + }, + { + children: [], + label: '江川区', + value: 530403, + }, + { + children: [], + label: '澄江县', + value: 530422, + }, + { + children: [], + label: '通海县', + value: 530423, + }, + { + children: [], + label: '华宁县', + value: 530424, + }, + { + children: [], + label: '易门县', + value: 530425, + }, + { + children: [], + label: '峨山彝族自治县', + value: 530426, + }, + { + children: [], + label: '新平彝族傣族自治县', + value: 530427, + }, + { + children: [], + label: '元江哈尼族彝族傣族自治县', + value: 530428, + }, + ], + label: '玉溪市', + value: 530400, + }, + { + children: [ + { + children: [], + label: '隆阳区', + value: 530502, + }, + { + children: [], + label: '施甸县', + value: 530521, + }, + { + children: [], + label: '龙陵县', + value: 530523, + }, + { + children: [], + label: '昌宁县', + value: 530524, + }, + { + children: [], + label: '腾冲市', + value: 530581, + }, + ], + label: '保山市', + value: 530500, + }, + { + children: [ + { + children: [], + label: '昭阳区', + value: 530602, + }, + { + children: [], + label: '鲁甸县', + value: 530621, + }, + { + children: [], + label: '巧家县', + value: 530622, + }, + { + children: [], + label: '盐津县', + value: 530623, + }, + { + children: [], + label: '大关县', + value: 530624, + }, + { + children: [], + label: '永善县', + value: 530625, + }, + { + children: [], + label: '绥江县', + value: 530626, + }, + { + children: [], + label: '镇雄县', + value: 530627, + }, + { + children: [], + label: '彝良县', + value: 530628, + }, + { + children: [], + label: '威信县', + value: 530629, + }, + { + children: [], + label: '水富市', + value: 530681, + }, + ], + label: '昭通市', + value: 530600, + }, + { + children: [ + { + children: [], + label: '古城区', + value: 530702, + }, + { + children: [], + label: '玉龙纳西族自治县', + value: 530721, + }, + { + children: [], + label: '永胜县', + value: 530722, + }, + { + children: [], + label: '华坪县', + value: 530723, + }, + { + children: [], + label: '宁蒗彝族自治县', + value: 530724, + }, + ], + label: '丽江市', + value: 530700, + }, + { + children: [ + { + children: [], + label: '思茅区', + value: 530802, + }, + { + children: [], + label: '宁洱哈尼族彝族自治县', + value: 530821, + }, + { + children: [], + label: '墨江哈尼族自治县', + value: 530822, + }, + { + children: [], + label: '景东彝族自治县', + value: 530823, + }, + { + children: [], + label: '景谷傣族彝族自治县', + value: 530824, + }, + { + children: [], + label: '镇沅彝族哈尼族拉祜族自治县', + value: 530825, + }, + { + children: [], + label: '江城哈尼族彝族自治县', + value: 530826, + }, + { + children: [], + label: '孟连傣族拉祜族佤族自治县', + value: 530827, + }, + { + children: [], + label: '澜沧拉祜族自治县', + value: 530828, + }, + { + children: [], + label: '西盟佤族自治县', + value: 530829, + }, + ], + label: '普洱市', + value: 530800, + }, + { + children: [ + { + children: [], + label: '临翔区', + value: 530902, + }, + { + children: [], + label: '凤庆县', + value: 530921, + }, + { + children: [], + label: '云县', + value: 530922, + }, + { + children: [], + label: '永德县', + value: 530923, + }, + { + children: [], + label: '镇康县', + value: 530924, + }, + { + children: [], + label: '双江拉祜族佤族布朗族傣族自治县', + value: 530925, + }, + { + children: [], + label: '耿马傣族佤族自治县', + value: 530926, + }, + { + children: [], + label: '沧源佤族自治县', + value: 530927, + }, + ], + label: '临沧市', + value: 530900, + }, + { + children: [ + { + children: [], + label: '楚雄市', + value: 532301, + }, + { + children: [], + label: '双柏县', + value: 532322, + }, + { + children: [], + label: '牟定县', + value: 532323, + }, + { + children: [], + label: '南华县', + value: 532324, + }, + { + children: [], + label: '姚安县', + value: 532325, + }, + { + children: [], + label: '大姚县', + value: 532326, + }, + { + children: [], + label: '永仁县', + value: 532327, + }, + { + children: [], + label: '元谋县', + value: 532328, + }, + { + children: [], + label: '武定县', + value: 532329, + }, + { + children: [], + label: '禄丰县', + value: 532331, + }, + ], + label: '楚雄彝族自治州', + value: 532300, + }, + { + children: [ + { + children: [], + label: '个旧市', + value: 532501, + }, + { + children: [], + label: '开远市', + value: 532502, + }, + { + children: [], + label: '蒙自市', + value: 532503, + }, + { + children: [], + label: '弥勒市', + value: 532504, + }, + { + children: [], + label: '屏边苗族自治县', + value: 532523, + }, + { + children: [], + label: '建水县', + value: 532524, + }, + { + children: [], + label: '石屏县', + value: 532525, + }, + { + children: [], + label: '泸西县', + value: 532527, + }, + { + children: [], + label: '元阳县', + value: 532528, + }, + { + children: [], + label: '红河县', + value: 532529, + }, + { + children: [], + label: '金平苗族瑶族傣族自治县', + value: 532530, + }, + { + children: [], + label: '绿春县', + value: 532531, + }, + { + children: [], + label: '河口瑶族自治县', + value: 532532, + }, + ], + label: '红河哈尼族彝族自治州', + value: 532500, + }, + { + children: [ + { + children: [], + label: '文山市', + value: 532601, + }, + { + children: [], + label: '砚山县', + value: 532622, + }, + { + children: [], + label: '西畴县', + value: 532623, + }, + { + children: [], + label: '麻栗坡县', + value: 532624, + }, + { + children: [], + label: '马关县', + value: 532625, + }, + { + children: [], + label: '丘北县', + value: 532626, + }, + { + children: [], + label: '广南县', + value: 532627, + }, + { + children: [], + label: '富宁县', + value: 532628, + }, + ], + label: '文山壮族苗族自治州', + value: 532600, + }, + { + children: [ + { + children: [], + label: '景洪市', + value: 532801, + }, + { + children: [], + label: '勐海县', + value: 532822, + }, + { + children: [], + label: '勐腊县', + value: 532823, + }, + ], + label: '西双版纳傣族自治州', + value: 532800, + }, + { + children: [ + { + children: [], + label: '大理市', + value: 532901, + }, + { + children: [], + label: '漾濞彝族自治县', + value: 532922, + }, + { + children: [], + label: '祥云县', + value: 532923, + }, + { + children: [], + label: '宾川县', + value: 532924, + }, + { + children: [], + label: '弥渡县', + value: 532925, + }, + { + children: [], + label: '南涧彝族自治县', + value: 532926, + }, + { + children: [], + label: '巍山彝族回族自治县', + value: 532927, + }, + { + children: [], + label: '永平县', + value: 532928, + }, + { + children: [], + label: '云龙县', + value: 532929, + }, + { + children: [], + label: '洱源县', + value: 532930, + }, + { + children: [], + label: '剑川县', + value: 532931, + }, + { + children: [], + label: '鹤庆县', + value: 532932, + }, + ], + label: '大理白族自治州', + value: 532900, + }, + { + children: [ + { + children: [], + label: '瑞丽市', + value: 533102, + }, + { + children: [], + label: '芒市', + value: 533103, + }, + { + children: [], + label: '梁河县', + value: 533122, + }, + { + children: [], + label: '盈江县', + value: 533123, + }, + { + children: [], + label: '陇川县', + value: 533124, + }, + ], + label: '德宏傣族景颇族自治州', + value: 533100, + }, + { + children: [ + { + children: [], + label: '泸水市', + value: 533301, + }, + { + children: [], + label: '福贡县', + value: 533323, + }, + { + children: [], + label: '贡山独龙族怒族自治县', + value: 533324, + }, + { + children: [], + label: '兰坪白族普米族自治县', + value: 533325, + }, + ], + label: '怒江傈僳族自治州', + value: 533300, + }, + { + children: [ + { + children: [], + label: '香格里拉市', + value: 533401, + }, + { + children: [], + label: '德钦县', + value: 533422, + }, + { + children: [], + label: '维西傈僳族自治县', + value: 533423, + }, + ], + label: '迪庆藏族自治州', + value: 533400, + }, + ], + label: '云南省', + value: 530000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '城关区', + value: 540102, + }, + { + children: [], + label: '堆龙德庆区', + value: 540103, + }, + { + children: [], + label: '达孜区', + value: 540104, + }, + { + children: [], + label: '林周县', + value: 540121, + }, + { + children: [], + label: '当雄县', + value: 540122, + }, + { + children: [], + label: '尼木县', + value: 540123, + }, + { + children: [], + label: '曲水县', + value: 540124, + }, + { + children: [], + label: '墨竹工卡县', + value: 540127, + }, + ], + label: '拉萨市', + value: 540100, + }, + { + children: [ + { + children: [], + label: '桑珠孜区', + value: 540202, + }, + { + children: [], + label: '南木林县', + value: 540221, + }, + { + children: [], + label: '江孜县', + value: 540222, + }, + { + children: [], + label: '定日县', + value: 540223, + }, + { + children: [], + label: '萨迦县', + value: 540224, + }, + { + children: [], + label: '拉孜县', + value: 540225, + }, + { + children: [], + label: '昂仁县', + value: 540226, + }, + { + children: [], + label: '谢通门县', + value: 540227, + }, + { + children: [], + label: '白朗县', + value: 540228, + }, + { + children: [], + label: '仁布县', + value: 540229, + }, + { + children: [], + label: '康马县', + value: 540230, + }, + { + children: [], + label: '定结县', + value: 540231, + }, + { + children: [], + label: '仲巴县', + value: 540232, + }, + { + children: [], + label: '亚东县', + value: 540233, + }, + { + children: [], + label: '吉隆县', + value: 540234, + }, + { + children: [], + label: '聂拉木县', + value: 540235, + }, + { + children: [], + label: '萨嘎县', + value: 540236, + }, + { + children: [], + label: '岗巴县', + value: 540237, + }, + ], + label: '日喀则市', + value: 540200, + }, + { + children: [ + { + children: [], + label: '卡若区', + value: 540302, + }, + { + children: [], + label: '江达县', + value: 540321, + }, + { + children: [], + label: '贡觉县', + value: 540322, + }, + { + children: [], + label: '类乌齐县', + value: 540323, + }, + { + children: [], + label: '丁青县', + value: 540324, + }, + { + children: [], + label: '察雅县', + value: 540325, + }, + { + children: [], + label: '八宿县', + value: 540326, + }, + { + children: [], + label: '左贡县', + value: 540327, + }, + { + children: [], + label: '芒康县', + value: 540328, + }, + { + children: [], + label: '洛隆县', + value: 540329, + }, + { + children: [], + label: '边坝县', + value: 540330, + }, + ], + label: '昌都市', + value: 540300, + }, + { + children: [ + { + children: [], + label: '巴宜区', + value: 540402, + }, + { + children: [], + label: '工布江达县', + value: 540421, + }, + { + children: [], + label: '米林县', + value: 540422, + }, + { + children: [], + label: '墨脱县', + value: 540423, + }, + { + children: [], + label: '波密县', + value: 540424, + }, + { + children: [], + label: '察隅县', + value: 540425, + }, + { + children: [], + label: '朗县', + value: 540426, + }, + ], + label: '林芝市', + value: 540400, + }, + { + children: [ + { + children: [], + label: '乃东区', + value: 540502, + }, + { + children: [], + label: '扎囊县', + value: 540521, + }, + { + children: [], + label: '贡嘎县', + value: 540522, + }, + { + children: [], + label: '桑日县', + value: 540523, + }, + { + children: [], + label: '琼结县', + value: 540524, + }, + { + children: [], + label: '曲松县', + value: 540525, + }, + { + children: [], + label: '措美县', + value: 540526, + }, + { + children: [], + label: '洛扎县', + value: 540527, + }, + { + children: [], + label: '加查县', + value: 540528, + }, + { + children: [], + label: '隆子县', + value: 540529, + }, + { + children: [], + label: '错那县', + value: 540530, + }, + { + children: [], + label: '浪卡子县', + value: 540531, + }, + ], + label: '山南市', + value: 540500, + }, + { + children: [ + { + children: [], + label: '色尼区', + value: 540602, + }, + { + children: [], + label: '嘉黎县', + value: 540621, + }, + { + children: [], + label: '比如县', + value: 540622, + }, + { + children: [], + label: '聂荣县', + value: 540623, + }, + { + children: [], + label: '安多县', + value: 540624, + }, + { + children: [], + label: '申扎县', + value: 540625, + }, + { + children: [], + label: '索县', + value: 540626, + }, + { + children: [], + label: '班戈县', + value: 540627, + }, + { + children: [], + label: '巴青县', + value: 540628, + }, + { + children: [], + label: '尼玛县', + value: 540629, + }, + { + children: [], + label: '双湖县', + value: 540630, + }, + ], + label: '那曲市', + value: 540600, + }, + { + children: [ + { + children: [], + label: '普兰县', + value: 542521, + }, + { + children: [], + label: '札达县', + value: 542522, + }, + { + children: [], + label: '噶尔县', + value: 542523, + }, + { + children: [], + label: '日土县', + value: 542524, + }, + { + children: [], + label: '革吉县', + value: 542525, + }, + { + children: [], + label: '改则县', + value: 542526, + }, + { + children: [], + label: '措勤县', + value: 542527, + }, + ], + label: '阿里地区', + value: 542500, + }, + ], + label: '西藏自治区', + value: 540000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '新城区', + value: 610102, + }, + { + children: [], + label: '碑林区', + value: 610103, + }, + { + children: [], + label: '莲湖区', + value: 610104, + }, + { + children: [], + label: '灞桥区', + value: 610111, + }, + { + children: [], + label: '未央区', + value: 610112, + }, + { + children: [], + label: '雁塔区', + value: 610113, + }, + { + children: [], + label: '阎良区', + value: 610114, + }, + { + children: [], + label: '临潼区', + value: 610115, + }, + { + children: [], + label: '长安区', + value: 610116, + }, + { + children: [], + label: '高陵区', + value: 610117, + }, + { + children: [], + label: '鄠邑区', + value: 610118, + }, + { + children: [], + label: '蓝田县', + value: 610122, + }, + { + children: [], + label: '周至县', + value: 610124, + }, + ], + label: '西安市', + value: 610100, + }, + { + children: [ + { + children: [], + label: '王益区', + value: 610202, + }, + { + children: [], + label: '印台区', + value: 610203, + }, + { + children: [], + label: '耀州区', + value: 610204, + }, + { + children: [], + label: '宜君县', + value: 610222, + }, + ], + label: '铜川市', + value: 610200, + }, + { + children: [ + { + children: [], + label: '渭滨区', + value: 610302, + }, + { + children: [], + label: '金台区', + value: 610303, + }, + { + children: [], + label: '陈仓区', + value: 610304, + }, + { + children: [], + label: '凤翔县', + value: 610322, + }, + { + children: [], + label: '岐山县', + value: 610323, + }, + { + children: [], + label: '扶风县', + value: 610324, + }, + { + children: [], + label: '眉县', + value: 610326, + }, + { + children: [], + label: '陇县', + value: 610327, + }, + { + children: [], + label: '千阳县', + value: 610328, + }, + { + children: [], + label: '麟游县', + value: 610329, + }, + { + children: [], + label: '凤县', + value: 610330, + }, + { + children: [], + label: '太白县', + value: 610331, + }, + ], + label: '宝鸡市', + value: 610300, + }, + { + children: [ + { + children: [], + label: '秦都区', + value: 610402, + }, + { + children: [], + label: '杨陵区', + value: 610403, + }, + { + children: [], + label: '渭城区', + value: 610404, + }, + { + children: [], + label: '三原县', + value: 610422, + }, + { + children: [], + label: '泾阳县', + value: 610423, + }, + { + children: [], + label: '乾县', + value: 610424, + }, + { + children: [], + label: '礼泉县', + value: 610425, + }, + { + children: [], + label: '永寿县', + value: 610426, + }, + { + children: [], + label: '长武县', + value: 610428, + }, + { + children: [], + label: '旬邑县', + value: 610429, + }, + { + children: [], + label: '淳化县', + value: 610430, + }, + { + children: [], + label: '武功县', + value: 610431, + }, + { + children: [], + label: '兴平市', + value: 610481, + }, + { + children: [], + label: '彬州市', + value: 610482, + }, + ], + label: '咸阳市', + value: 610400, + }, + { + children: [ + { + children: [], + label: '临渭区', + value: 610502, + }, + { + children: [], + label: '华州区', + value: 610503, + }, + { + children: [], + label: '潼关县', + value: 610522, + }, + { + children: [], + label: '大荔县', + value: 610523, + }, + { + children: [], + label: '合阳县', + value: 610524, + }, + { + children: [], + label: '澄城县', + value: 610525, + }, + { + children: [], + label: '蒲城县', + value: 610526, + }, + { + children: [], + label: '白水县', + value: 610527, + }, + { + children: [], + label: '富平县', + value: 610528, + }, + { + children: [], + label: '韩城市', + value: 610581, + }, + { + children: [], + label: '华阴市', + value: 610582, + }, + ], + label: '渭南市', + value: 610500, + }, + { + children: [ + { + children: [], + label: '宝塔区', + value: 610602, + }, + { + children: [], + label: '安塞区', + value: 610603, + }, + { + children: [], + label: '延长县', + value: 610621, + }, + { + children: [], + label: '延川县', + value: 610622, + }, + { + children: [], + label: '子长县', + value: 610623, + }, + { + children: [], + label: '志丹县', + value: 610625, + }, + { + children: [], + label: '吴起县', + value: 610626, + }, + { + children: [], + label: '甘泉县', + value: 610627, + }, + { + children: [], + label: '富县', + value: 610628, + }, + { + children: [], + label: '洛川县', + value: 610629, + }, + { + children: [], + label: '宜川县', + value: 610630, + }, + { + children: [], + label: '黄龙县', + value: 610631, + }, + { + children: [], + label: '黄陵县', + value: 610632, + }, + ], + label: '延安市', + value: 610600, + }, + { + children: [ + { + children: [], + label: '汉台区', + value: 610702, + }, + { + children: [], + label: '南郑区', + value: 610703, + }, + { + children: [], + label: '城固县', + value: 610722, + }, + { + children: [], + label: '洋县', + value: 610723, + }, + { + children: [], + label: '西乡县', + value: 610724, + }, + { + children: [], + label: '勉县', + value: 610725, + }, + { + children: [], + label: '宁强县', + value: 610726, + }, + { + children: [], + label: '略阳县', + value: 610727, + }, + { + children: [], + label: '镇巴县', + value: 610728, + }, + { + children: [], + label: '留坝县', + value: 610729, + }, + { + children: [], + label: '佛坪县', + value: 610730, + }, + ], + label: '汉中市', + value: 610700, + }, + { + children: [ + { + children: [], + label: '榆阳区', + value: 610802, + }, + { + children: [], + label: '横山区', + value: 610803, + }, + { + children: [], + label: '府谷县', + value: 610822, + }, + { + children: [], + label: '靖边县', + value: 610824, + }, + { + children: [], + label: '定边县', + value: 610825, + }, + { + children: [], + label: '绥德县', + value: 610826, + }, + { + children: [], + label: '米脂县', + value: 610827, + }, + { + children: [], + label: '佳县', + value: 610828, + }, + { + children: [], + label: '吴堡县', + value: 610829, + }, + { + children: [], + label: '清涧县', + value: 610830, + }, + { + children: [], + label: '子洲县', + value: 610831, + }, + { + children: [], + label: '神木市', + value: 610881, + }, + ], + label: '榆林市', + value: 610800, + }, + { + children: [ + { + children: [], + label: '汉滨区', + value: 610902, + }, + { + children: [], + label: '汉阴县', + value: 610921, + }, + { + children: [], + label: '石泉县', + value: 610922, + }, + { + children: [], + label: '宁陕县', + value: 610923, + }, + { + children: [], + label: '紫阳县', + value: 610924, + }, + { + children: [], + label: '岚皋县', + value: 610925, + }, + { + children: [], + label: '平利县', + value: 610926, + }, + { + children: [], + label: '镇坪县', + value: 610927, + }, + { + children: [], + label: '旬阳县', + value: 610928, + }, + { + children: [], + label: '白河县', + value: 610929, + }, + ], + label: '安康市', + value: 610900, + }, + { + children: [ + { + children: [], + label: '商州区', + value: 611002, + }, + { + children: [], + label: '洛南县', + value: 611021, + }, + { + children: [], + label: '丹凤县', + value: 611022, + }, + { + children: [], + label: '商南县', + value: 611023, + }, + { + children: [], + label: '山阳县', + value: 611024, + }, + { + children: [], + label: '镇安县', + value: 611025, + }, + { + children: [], + label: '柞水县', + value: 611026, + }, + ], + label: '商洛市', + value: 611000, + }, + ], + label: '陕西省', + value: 610000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '城关区', + value: 620102, + }, + { + children: [], + label: '七里河区', + value: 620103, + }, + { + children: [], + label: '西固区', + value: 620104, + }, + { + children: [], + label: '安宁区', + value: 620105, + }, + { + children: [], + label: '红古区', + value: 620111, + }, + { + children: [], + label: '永登县', + value: 620121, + }, + { + children: [], + label: '皋兰县', + value: 620122, + }, + { + children: [], + label: '榆中县', + value: 620123, + }, + ], + label: '兰州市', + value: 620100, + }, + { + children: [], + label: '嘉峪关市', + value: 620200, + }, + { + children: [ + { + children: [], + label: '金川区', + value: 620302, + }, + { + children: [], + label: '永昌县', + value: 620321, + }, + ], + label: '金昌市', + value: 620300, + }, + { + children: [ + { + children: [], + label: '白银区', + value: 620402, + }, + { + children: [], + label: '平川区', + value: 620403, + }, + { + children: [], + label: '靖远县', + value: 620421, + }, + { + children: [], + label: '会宁县', + value: 620422, + }, + { + children: [], + label: '景泰县', + value: 620423, + }, + ], + label: '白银市', + value: 620400, + }, + { + children: [ + { + children: [], + label: '秦州区', + value: 620502, + }, + { + children: [], + label: '麦积区', + value: 620503, + }, + { + children: [], + label: '清水县', + value: 620521, + }, + { + children: [], + label: '秦安县', + value: 620522, + }, + { + children: [], + label: '甘谷县', + value: 620523, + }, + { + children: [], + label: '武山县', + value: 620524, + }, + { + children: [], + label: '张家川回族自治县', + value: 620525, + }, + ], + label: '天水市', + value: 620500, + }, + { + children: [ + { + children: [], + label: '凉州区', + value: 620602, + }, + { + children: [], + label: '民勤县', + value: 620621, + }, + { + children: [], + label: '古浪县', + value: 620622, + }, + { + children: [], + label: '天祝藏族自治县', + value: 620623, + }, + ], + label: '武威市', + value: 620600, + }, + { + children: [ + { + children: [], + label: '甘州区', + value: 620702, + }, + { + children: [], + label: '肃南裕固族自治县', + value: 620721, + }, + { + children: [], + label: '民乐县', + value: 620722, + }, + { + children: [], + label: '临泽县', + value: 620723, + }, + { + children: [], + label: '高台县', + value: 620724, + }, + { + children: [], + label: '山丹县', + value: 620725, + }, + ], + label: '张掖市', + value: 620700, + }, + { + children: [ + { + children: [], + label: '崆峒区', + value: 620802, + }, + { + children: [], + label: '泾川县', + value: 620821, + }, + { + children: [], + label: '灵台县', + value: 620822, + }, + { + children: [], + label: '崇信县', + value: 620823, + }, + { + children: [], + label: '庄浪县', + value: 620825, + }, + { + children: [], + label: '静宁县', + value: 620826, + }, + { + children: [], + label: '华亭市', + value: 620881, + }, + ], + label: '平凉市', + value: 620800, + }, + { + children: [ + { + children: [], + label: '肃州区', + value: 620902, + }, + { + children: [], + label: '金塔县', + value: 620921, + }, + { + children: [], + label: '瓜州县', + value: 620922, + }, + { + children: [], + label: '肃北蒙古族自治县', + value: 620923, + }, + { + children: [], + label: '阿克塞哈萨克族自治县', + value: 620924, + }, + { + children: [], + label: '玉门市', + value: 620981, + }, + { + children: [], + label: '敦煌市', + value: 620982, + }, + ], + label: '酒泉市', + value: 620900, + }, + { + children: [ + { + children: [], + label: '西峰区', + value: 621002, + }, + { + children: [], + label: '庆城县', + value: 621021, + }, + { + children: [], + label: '环县', + value: 621022, + }, + { + children: [], + label: '华池县', + value: 621023, + }, + { + children: [], + label: '合水县', + value: 621024, + }, + { + children: [], + label: '正宁县', + value: 621025, + }, + { + children: [], + label: '宁县', + value: 621026, + }, + { + children: [], + label: '镇原县', + value: 621027, + }, + ], + label: '庆阳市', + value: 621000, + }, + { + children: [ + { + children: [], + label: '安定区', + value: 621102, + }, + { + children: [], + label: '通渭县', + value: 621121, + }, + { + children: [], + label: '陇西县', + value: 621122, + }, + { + children: [], + label: '渭源县', + value: 621123, + }, + { + children: [], + label: '临洮县', + value: 621124, + }, + { + children: [], + label: '漳县', + value: 621125, + }, + { + children: [], + label: '岷县', + value: 621126, + }, + ], + label: '定西市', + value: 621100, + }, + { + children: [ + { + children: [], + label: '武都区', + value: 621202, + }, + { + children: [], + label: '成县', + value: 621221, + }, + { + children: [], + label: '文县', + value: 621222, + }, + { + children: [], + label: '宕昌县', + value: 621223, + }, + { + children: [], + label: '康县', + value: 621224, + }, + { + children: [], + label: '西和县', + value: 621225, + }, + { + children: [], + label: '礼县', + value: 621226, + }, + { + children: [], + label: '徽县', + value: 621227, + }, + { + children: [], + label: '两当县', + value: 621228, + }, + ], + label: '陇南市', + value: 621200, + }, + { + children: [ + { + children: [], + label: '临夏市', + value: 622901, + }, + { + children: [], + label: '临夏县', + value: 622921, + }, + { + children: [], + label: '康乐县', + value: 622922, + }, + { + children: [], + label: '永靖县', + value: 622923, + }, + { + children: [], + label: '广河县', + value: 622924, + }, + { + children: [], + label: '和政县', + value: 622925, + }, + { + children: [], + label: '东乡族自治县', + value: 622926, + }, + { + children: [], + label: '积石山保安族东乡族撒拉族自治县', + value: 622927, + }, + ], + label: '临夏回族自治州', + value: 622900, + }, + { + children: [ + { + children: [], + label: '合作市', + value: 623001, + }, + { + children: [], + label: '临潭县', + value: 623021, + }, + { + children: [], + label: '卓尼县', + value: 623022, + }, + { + children: [], + label: '舟曲县', + value: 623023, + }, + { + children: [], + label: '迭部县', + value: 623024, + }, + { + children: [], + label: '玛曲县', + value: 623025, + }, + { + children: [], + label: '碌曲县', + value: 623026, + }, + { + children: [], + label: '夏河县', + value: 623027, + }, + ], + label: '甘南藏族自治州', + value: 623000, + }, + ], + label: '甘肃省', + value: 620000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '城东区', + value: 630102, + }, + { + children: [], + label: '城中区', + value: 630103, + }, + { + children: [], + label: '城西区', + value: 630104, + }, + { + children: [], + label: '城北区', + value: 630105, + }, + { + children: [], + label: '大通回族土族自治县', + value: 630121, + }, + { + children: [], + label: '湟中县', + value: 630122, + }, + { + children: [], + label: '湟源县', + value: 630123, + }, + ], + label: '西宁市', + value: 630100, + }, + { + children: [ + { + children: [], + label: '乐都区', + value: 630202, + }, + { + children: [], + label: '平安区', + value: 630203, + }, + { + children: [], + label: '民和回族土族自治县', + value: 630222, + }, + { + children: [], + label: '互助土族自治县', + value: 630223, + }, + { + children: [], + label: '化隆回族自治县', + value: 630224, + }, + { + children: [], + label: '循化撒拉族自治县', + value: 630225, + }, + ], + label: '海东市', + value: 630200, + }, + { + children: [ + { + children: [], + label: '门源回族自治县', + value: 632221, + }, + { + children: [], + label: '祁连县', + value: 632222, + }, + { + children: [], + label: '海晏县', + value: 632223, + }, + { + children: [], + label: '刚察县', + value: 632224, + }, + ], + label: '海北藏族自治州', + value: 632200, + }, + { + children: [ + { + children: [], + label: '同仁县', + value: 632321, + }, + { + children: [], + label: '尖扎县', + value: 632322, + }, + { + children: [], + label: '泽库县', + value: 632323, + }, + { + children: [], + label: '河南蒙古族自治县', + value: 632324, + }, + ], + label: '黄南藏族自治州', + value: 632300, + }, + { + children: [ + { + children: [], + label: '共和县', + value: 632521, + }, + { + children: [], + label: '同德县', + value: 632522, + }, + { + children: [], + label: '贵德县', + value: 632523, + }, + { + children: [], + label: '兴海县', + value: 632524, + }, + { + children: [], + label: '贵南县', + value: 632525, + }, + ], + label: '海南藏族自治州', + value: 632500, + }, + { + children: [ + { + children: [], + label: '玛沁县', + value: 632621, + }, + { + children: [], + label: '班玛县', + value: 632622, + }, + { + children: [], + label: '甘德县', + value: 632623, + }, + { + children: [], + label: '达日县', + value: 632624, + }, + { + children: [], + label: '久治县', + value: 632625, + }, + { + children: [], + label: '玛多县', + value: 632626, + }, + ], + label: '果洛藏族自治州', + value: 632600, + }, + { + children: [ + { + children: [], + label: '玉树市', + value: 632701, + }, + { + children: [], + label: '杂多县', + value: 632722, + }, + { + children: [], + label: '称多县', + value: 632723, + }, + { + children: [], + label: '治多县', + value: 632724, + }, + { + children: [], + label: '囊谦县', + value: 632725, + }, + { + children: [], + label: '曲麻莱县', + value: 632726, + }, + ], + label: '玉树藏族自治州', + value: 632700, + }, + { + children: [ + { + children: [], + label: '格尔木市', + value: 632801, + }, + { + children: [], + label: '德令哈市', + value: 632802, + }, + { + children: [], + label: '茫崖市', + value: 632803, + }, + { + children: [], + label: '乌兰县', + value: 632821, + }, + { + children: [], + label: '都兰县', + value: 632822, + }, + { + children: [], + label: '天峻县', + value: 632823, + }, + { + children: [], + label: '海西蒙古族藏族自治州直辖', + value: 632824, + }, + ], + label: '海西蒙古族藏族自治州', + value: 632800, + }, + ], + label: '青海省', + value: 630000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '兴庆区', + value: 640104, + }, + { + children: [], + label: '西夏区', + value: 640105, + }, + { + children: [], + label: '金凤区', + value: 640106, + }, + { + children: [], + label: '永宁县', + value: 640121, + }, + { + children: [], + label: '贺兰县', + value: 640122, + }, + { + children: [], + label: '灵武市', + value: 640181, + }, + ], + label: '银川市', + value: 640100, + }, + { + children: [ + { + children: [], + label: '大武口区', + value: 640202, + }, + { + children: [], + label: '惠农区', + value: 640205, + }, + { + children: [], + label: '平罗县', + value: 640221, + }, + ], + label: '石嘴山市', + value: 640200, + }, + { + children: [ + { + children: [], + label: '利通区', + value: 640302, + }, + { + children: [], + label: '红寺堡区', + value: 640303, + }, + { + children: [], + label: '盐池县', + value: 640323, + }, + { + children: [], + label: '同心县', + value: 640324, + }, + { + children: [], + label: '青铜峡市', + value: 640381, + }, + ], + label: '吴忠市', + value: 640300, + }, + { + children: [ + { + children: [], + label: '原州区', + value: 640402, + }, + { + children: [], + label: '西吉县', + value: 640422, + }, + { + children: [], + label: '隆德县', + value: 640423, + }, + { + children: [], + label: '泾源县', + value: 640424, + }, + { + children: [], + label: '彭阳县', + value: 640425, + }, + ], + label: '固原市', + value: 640400, + }, + { + children: [ + { + children: [], + label: '沙坡头区', + value: 640502, + }, + { + children: [], + label: '中宁县', + value: 640521, + }, + { + children: [], + label: '海原县', + value: 640522, + }, + ], + label: '中卫市', + value: 640500, + }, + ], + label: '宁夏回族自治区', + value: 640000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '天山区', + value: 650102, + }, + { + children: [], + label: '沙依巴克区', + value: 650103, + }, + { + children: [], + label: '新市区', + value: 650104, + }, + { + children: [], + label: '水磨沟区', + value: 650105, + }, + { + children: [], + label: '头屯河区', + value: 650106, + }, + { + children: [], + label: '达坂城区', + value: 650107, + }, + { + children: [], + label: '米东区', + value: 650109, + }, + { + children: [], + label: '乌鲁木齐县', + value: 650121, + }, + ], + label: '乌鲁木齐市', + value: 650100, + }, + { + children: [ + { + children: [], + label: '独山子区', + value: 650202, + }, + { + children: [], + label: '克拉玛依区', + value: 650203, + }, + { + children: [], + label: '白碱滩区', + value: 650204, + }, + { + children: [], + label: '乌尔禾区', + value: 650205, + }, + ], + label: '克拉玛依市', + value: 650200, + }, + { + children: [ + { + children: [], + label: '高昌区', + value: 650402, + }, + { + children: [], + label: '鄯善县', + value: 650421, + }, + { + children: [], + label: '托克逊县', + value: 650422, + }, + ], + label: '吐鲁番市', + value: 650400, + }, + { + children: [ + { + children: [], + label: '伊州区', + value: 650502, + }, + { + children: [], + label: '巴里坤哈萨克自治县', + value: 650521, + }, + { + children: [], + label: '伊吾县', + value: 650522, + }, + ], + label: '哈密市', + value: 650500, + }, + { + children: [ + { + children: [], + label: '昌吉市', + value: 652301, + }, + { + children: [], + label: '阜康市', + value: 652302, + }, + { + children: [], + label: '呼图壁县', + value: 652323, + }, + { + children: [], + label: '玛纳斯县', + value: 652324, + }, + { + children: [], + label: '奇台县', + value: 652325, + }, + { + children: [], + label: '吉木萨尔县', + value: 652327, + }, + { + children: [], + label: '木垒哈萨克自治县', + value: 652328, + }, + ], + label: '昌吉回族自治州', + value: 652300, + }, + { + children: [ + { + children: [], + label: '博乐市', + value: 652701, + }, + { + children: [], + label: '阿拉山口市', + value: 652702, + }, + { + children: [], + label: '精河县', + value: 652722, + }, + { + children: [], + label: '温泉县', + value: 652723, + }, + ], + label: '博尔塔拉蒙古自治州', + value: 652700, + }, + { + children: [ + { + children: [], + label: '库尔勒市', + value: 652801, + }, + { + children: [], + label: '轮台县', + value: 652822, + }, + { + children: [], + label: '尉犁县', + value: 652823, + }, + { + children: [], + label: '若羌县', + value: 652824, + }, + { + children: [], + label: '且末县', + value: 652825, + }, + { + children: [], + label: '焉耆回族自治县', + value: 652826, + }, + { + children: [], + label: '和静县', + value: 652827, + }, + { + children: [], + label: '和硕县', + value: 652828, + }, + { + children: [], + label: '博湖县', + value: 652829, + }, + ], + label: '巴音郭楞蒙古自治州', + value: 652800, + }, + { + children: [ + { + children: [], + label: '阿克苏市', + value: 652901, + }, + { + children: [], + label: '温宿县', + value: 652922, + }, + { + children: [], + label: '库车县', + value: 652923, + }, + { + children: [], + label: '沙雅县', + value: 652924, + }, + { + children: [], + label: '新和县', + value: 652925, + }, + { + children: [], + label: '拜城县', + value: 652926, + }, + { + children: [], + label: '乌什县', + value: 652927, + }, + { + children: [], + label: '阿瓦提县', + value: 652928, + }, + { + children: [], + label: '柯坪县', + value: 652929, + }, + ], + label: '阿克苏地区', + value: 652900, + }, + { + children: [ + { + children: [], + label: '阿图什市', + value: 653001, + }, + { + children: [], + label: '阿克陶县', + value: 653022, + }, + { + children: [], + label: '阿合奇县', + value: 653023, + }, + { + children: [], + label: '乌恰县', + value: 653024, + }, + ], + label: '克孜勒苏柯尔克孜自治州', + value: 653000, + }, + { + children: [ + { + children: [], + label: '喀什市', + value: 653101, + }, + { + children: [], + label: '疏附县', + value: 653121, + }, + { + children: [], + label: '疏勒县', + value: 653122, + }, + { + children: [], + label: '英吉沙县', + value: 653123, + }, + { + children: [], + label: '泽普县', + value: 653124, + }, + { + children: [], + label: '莎车县', + value: 653125, + }, + { + children: [], + label: '叶城县', + value: 653126, + }, + { + children: [], + label: '麦盖提县', + value: 653127, + }, + { + children: [], + label: '岳普湖县', + value: 653128, + }, + { + children: [], + label: '伽师县', + value: 653129, + }, + { + children: [], + label: '巴楚县', + value: 653130, + }, + { + children: [], + label: '塔什库尔干塔吉克自治县', + value: 653131, + }, + ], + label: '喀什地区', + value: 653100, + }, + { + children: [ + { + children: [], + label: '和田市', + value: 653201, + }, + { + children: [], + label: '和田县', + value: 653221, + }, + { + children: [], + label: '墨玉县', + value: 653222, + }, + { + children: [], + label: '皮山县', + value: 653223, + }, + { + children: [], + label: '洛浦县', + value: 653224, + }, + { + children: [], + label: '策勒县', + value: 653225, + }, + { + children: [], + label: '于田县', + value: 653226, + }, + { + children: [], + label: '民丰县', + value: 653227, + }, + ], + label: '和田地区', + value: 653200, + }, + { + children: [ + { + children: [], + label: '伊宁市', + value: 654002, + }, + { + children: [], + label: '奎屯市', + value: 654003, + }, + { + children: [], + label: '霍尔果斯市', + value: 654004, + }, + { + children: [], + label: '伊宁县', + value: 654021, + }, + { + children: [], + label: '察布查尔锡伯自治县', + value: 654022, + }, + { + children: [], + label: '霍城县', + value: 654023, + }, + { + children: [], + label: '巩留县', + value: 654024, + }, + { + children: [], + label: '新源县', + value: 654025, + }, + { + children: [], + label: '昭苏县', + value: 654026, + }, + { + children: [], + label: '特克斯县', + value: 654027, + }, + { + children: [], + label: '尼勒克县', + value: 654028, + }, + ], + label: '伊犁哈萨克自治州', + value: 654000, + }, + { + children: [ + { + children: [], + label: '塔城市', + value: 654201, + }, + { + children: [], + label: '乌苏市', + value: 654202, + }, + { + children: [], + label: '额敏县', + value: 654221, + }, + { + children: [], + label: '沙湾县', + value: 654223, + }, + { + children: [], + label: '托里县', + value: 654224, + }, + { + children: [], + label: '裕民县', + value: 654225, + }, + { + children: [], + label: '和布克赛尔蒙古自治县', + value: 654226, + }, + ], + label: '塔城地区', + value: 654200, + }, + { + children: [ + { + children: [], + label: '阿勒泰市', + value: 654301, + }, + { + children: [], + label: '布尔津县', + value: 654321, + }, + { + children: [], + label: '富蕴县', + value: 654322, + }, + { + children: [], + label: '福海县', + value: 654323, + }, + { + children: [], + label: '哈巴河县', + value: 654324, + }, + { + children: [], + label: '青河县', + value: 654325, + }, + { + children: [], + label: '吉木乃县', + value: 654326, + }, + ], + label: '阿勒泰地区', + value: 654300, + }, + { + children: [], + label: '石河子市', + value: 659001, + }, + { + children: [], + label: '阿拉尔市', + value: 659002, + }, + { + children: [], + label: '图木舒克市', + value: 659003, + }, + { + children: [], + label: '五家渠市', + value: 659004, + }, + { + children: [], + label: '北屯市', + value: 659005, + }, + { + children: [], + label: '铁门关市', + value: 659006, + }, + { + children: [], + label: '双河市', + value: 659007, + }, + { + children: [], + label: '可克达拉市', + value: 659008, + }, + { + children: [], + label: '昆玉市', + value: 659009, + }, + ], + label: '新疆维吾尔自治区', + value: 650000, + }, + { + children: [ + { + children: [ + { + children: [], + label: '北投区', + value: 710101, + }, + { + children: [], + label: '松山区', + value: 710102, + }, + { + children: [], + label: '大同区', + value: 710103, + }, + { + children: [], + label: '文山区', + value: 710104, + }, + { + children: [], + label: '信义区', + value: 710105, + }, + { + children: [], + label: '内湖区', + value: 710106, + }, + { + children: [], + label: '中正区', + value: 710107, + }, + { + children: [], + label: '万华区', + value: 710108, + }, + { + children: [], + label: '中山区', + value: 710109, + }, + { + children: [], + label: '士林区', + value: 710110, + }, + { + children: [], + label: '南港区', + value: 710111, + }, + { + children: [], + label: '大安区', + value: 710112, + }, + ], + label: '台北市', + value: 710100, + }, + { + children: [ + { + children: [], + label: '小港区', + value: 710201, + }, + { + children: [], + label: '左营区', + value: 710202, + }, + { + children: [], + label: '大寮区', + value: 710203, + }, + { + children: [], + label: '那玛夏区', + value: 710204, + }, + { + children: [], + label: '旗津区', + value: 710205, + }, + { + children: [], + label: '弥陀区', + value: 710206, + }, + { + children: [], + label: '燕巢区', + value: 710207, + }, + { + children: [], + label: '大树区', + value: 710208, + }, + { + children: [], + label: '阿莲区', + value: 710209, + }, + { + children: [], + label: '楠梓区', + value: 710210, + }, + { + children: [], + label: '鸟松区', + value: 710211, + }, + { + children: [], + label: '苓雅区', + value: 710212, + }, + { + children: [], + label: '桥头区', + value: 710213, + }, + { + children: [], + label: '梓官区', + value: 710214, + }, + { + children: [], + label: '美浓区', + value: 710215, + }, + { + children: [], + label: '仁武区', + value: 710216, + }, + { + children: [], + label: '凤山区', + value: 710217, + }, + { + children: [], + label: '甲仙区', + value: 710218, + }, + { + children: [], + label: '茄萣区', + value: 710219, + }, + { + children: [], + label: '大社区', + value: 710220, + }, + { + children: [], + label: '前镇区', + value: 710221, + }, + { + children: [], + label: '茂林区', + value: 710222, + }, + { + children: [], + label: '湖内区', + value: 710223, + }, + { + children: [], + label: '六龟区', + value: 710224, + }, + { + children: [], + label: '林园区', + value: 710225, + }, + { + children: [], + label: '内门区', + value: 710226, + }, + { + children: [], + label: '鼓山区', + value: 710227, + }, + { + children: [], + label: '杉林区', + value: 710228, + }, + { + children: [], + label: '三民区', + value: 710229, + }, + { + children: [], + label: '前金区', + value: 710230, + }, + { + children: [], + label: '冈山区', + value: 710231, + }, + { + children: [], + label: '田寮区', + value: 710232, + }, + { + children: [], + label: '桃源区', + value: 710233, + }, + { + children: [], + label: '盐埕区', + value: 710234, + }, + { + children: [], + label: '旗山区', + value: 710235, + }, + { + children: [], + label: '永安区', + value: 710236, + }, + { + children: [], + label: '路竹区', + value: 710237, + }, + { + children: [], + label: '新兴区', + value: 710238, + }, + ], + label: '高雄市', + value: 710200, + }, + { + children: [ + { + children: [], + label: '八里区', + value: 710301, + }, + { + children: [], + label: '三峡区', + value: 710302, + }, + { + children: [], + label: '新庄区', + value: 710303, + }, + { + children: [], + label: '坪林区', + value: 710304, + }, + { + children: [], + label: '莺歌区', + value: 710305, + }, + { + children: [], + label: '汐止区', + value: 710306, + }, + { + children: [], + label: '深坑区', + value: 710307, + }, + { + children: [], + label: '芦洲区', + value: 710308, + }, + { + children: [], + label: '三芝区', + value: 710309, + }, + { + children: [], + label: '三重区', + value: 710310, + }, + { + children: [], + label: '平溪区', + value: 710311, + }, + { + children: [], + label: '中和区', + value: 710312, + }, + { + children: [], + label: '永和区', + value: 710313, + }, + { + children: [], + label: '泰山区', + value: 710314, + }, + { + children: [], + label: '土城区', + value: 710315, + }, + { + children: [], + label: '石碇区', + value: 710316, + }, + { + children: [], + label: '五股区', + value: 710317, + }, + { + children: [], + label: '林口区', + value: 710318, + }, + { + children: [], + label: '双溪区', + value: 710319, + }, + { + children: [], + label: '树林区', + value: 710320, + }, + { + children: [], + label: '板桥区', + value: 710321, + }, + { + children: [], + label: '新店区', + value: 710322, + }, + { + children: [], + label: '乌来区', + value: 710323, + }, + { + children: [], + label: '贡寮区', + value: 710324, + }, + { + children: [], + label: '金山区', + value: 710325, + }, + { + children: [], + label: '万里区', + value: 710326, + }, + { + children: [], + label: '淡水区', + value: 710327, + }, + { + children: [], + label: '瑞芳区', + value: 710328, + }, + { + children: [], + label: '石门区', + value: 710329, + }, + ], + label: '新北市', + value: 710300, + }, + { + children: [ + { + children: [], + label: '东区', + value: 710401, + }, + { + children: [], + label: '新社区', + value: 710402, + }, + { + children: [], + label: '中区', + value: 710403, + }, + { + children: [], + label: '南屯区', + value: 710404, + }, + { + children: [], + label: '神冈区', + value: 710405, + }, + { + children: [], + label: '沙鹿区', + value: 710406, + }, + { + children: [], + label: '丰原区', + value: 710407, + }, + { + children: [], + label: '大里区', + value: 710408, + }, + { + children: [], + label: '龙井区', + value: 710409, + }, + { + children: [], + label: '西区', + value: 710410, + }, + { + children: [], + label: '南区', + value: 710411, + }, + { + children: [], + label: '西屯区', + value: 710412, + }, + { + children: [], + label: '太平区', + value: 710413, + }, + { + children: [], + label: '北屯区', + value: 710414, + }, + { + children: [], + label: '大雅区', + value: 710415, + }, + { + children: [], + label: '石冈区', + value: 710416, + }, + { + children: [], + label: '北区', + value: 710417, + }, + { + children: [], + label: '大甲区', + value: 710418, + }, + { + children: [], + label: '梧栖区', + value: 710419, + }, + { + children: [], + label: '东势区', + value: 710420, + }, + { + children: [], + label: '和平区', + value: 710421, + }, + { + children: [], + label: '雾峰区', + value: 710422, + }, + { + children: [], + label: '乌日区', + value: 710423, + }, + { + children: [], + label: '后里区', + value: 710424, + }, + { + children: [], + label: '潭子区', + value: 710425, + }, + { + children: [], + label: '大肚区', + value: 710426, + }, + { + children: [], + label: '外埔区', + value: 710427, + }, + { + children: [], + label: '清水区', + value: 710428, + }, + { + children: [], + label: '大安区', + value: 710429, + }, + ], + label: '台中市', + value: 710400, + }, + { + children: [ + { + children: [], + label: '安定区', + value: 710501, + }, + { + children: [], + label: '大内区', + value: 710502, + }, + { + children: [], + label: '东山区', + value: 710503, + }, + { + children: [], + label: '下营区', + value: 710504, + }, + { + children: [], + label: '山上区', + value: 710505, + }, + { + children: [], + label: '永康区', + value: 710506, + }, + { + children: [], + label: '新营区', + value: 710507, + }, + { + children: [], + label: '白河区', + value: 710508, + }, + { + children: [], + label: '盐水区', + value: 710509, + }, + { + children: [], + label: '归仁区', + value: 710510, + }, + { + children: [], + label: '龙崎区', + value: 710511, + }, + { + children: [], + label: '关庙区', + value: 710512, + }, + { + children: [], + label: '仁德区', + value: 710513, + }, + { + children: [], + label: '学甲区', + value: 710514, + }, + { + children: [], + label: '善化区', + value: 710515, + }, + { + children: [], + label: '新市区', + value: 710516, + }, + { + children: [], + label: '佳里区', + value: 710517, + }, + { + children: [], + label: '新化区', + value: 710518, + }, + { + children: [], + label: '西港区', + value: 710519, + }, + { + children: [], + label: '麻豆区', + value: 710520, + }, + { + children: [], + label: '安南区', + value: 710521, + }, + { + children: [], + label: '后壁区', + value: 710522, + }, + { + children: [], + label: '柳营区', + value: 710523, + }, + { + children: [], + label: '玉井区', + value: 710524, + }, + { + children: [], + label: '官田区', + value: 710525, + }, + { + children: [], + label: '东区', + value: 710526, + }, + { + children: [], + label: '六甲区', + value: 710527, + }, + { + children: [], + label: '中西区', + value: 710528, + }, + { + children: [], + label: '北区', + value: 710529, + }, + { + children: [], + label: '楠西区', + value: 710530, + }, + { + children: [], + label: '南化区', + value: 710531, + }, + { + children: [], + label: '左镇区', + value: 710532, + }, + { + children: [], + label: '南区', + value: 710533, + }, + { + children: [], + label: '安平区', + value: 710534, + }, + { + children: [], + label: '北门区', + value: 710535, + }, + { + children: [], + label: '七股区', + value: 710536, + }, + { + children: [], + label: '将军区', + value: 710537, + }, + ], + label: '台南市', + value: 710500, + }, + { + children: [ + { + children: [], + label: '平镇市', + value: 710601, + }, + { + children: [], + label: '杨梅市', + value: 710602, + }, + { + children: [], + label: '八德市', + value: 710603, + }, + { + children: [], + label: '桃园区', + value: 710604, + }, + { + children: [], + label: '龟山乡', + value: 710605, + }, + { + children: [], + label: '复兴乡', + value: 710606, + }, + { + children: [], + label: '芦竹乡', + value: 710607, + }, + { + children: [], + label: '观音乡', + value: 710608, + }, + { + children: [], + label: '龙潭乡', + value: 710609, + }, + { + children: [], + label: '大溪镇', + value: 710610, + }, + { + children: [], + label: '大园乡', + value: 710611, + }, + { + children: [], + label: '新屋乡', + value: 710612, + }, + { + children: [], + label: '中坜市', + value: 710613, + }, + ], + label: '桃园市', + value: 710600, + }, + { + children: [], + label: '基隆市', + value: 719001, + }, + { + children: [], + label: '新竹市', + value: 719002, + }, + { + children: [], + label: '嘉义市', + value: 719003, + }, + { + children: [], + label: '新竹县', + value: 719004, + }, + { + children: [], + label: '宜兰县', + value: 719005, + }, + { + children: [], + label: '苗栗县', + value: 719006, + }, + { + children: [], + label: '彰化县', + value: 719007, + }, + { + children: [], + label: '云林县', + value: 719008, + }, + { + children: [], + label: '南投县', + value: 719009, + }, + { + children: [], + label: '嘉义县', + value: 719010, + }, + { + children: [], + label: '屏东县', + value: 719011, + }, + { + children: [], + label: '台东县', + value: 719012, + }, + { + children: [], + label: '花莲县', + value: 719013, + }, + { + children: [], + label: '澎湖县', + value: 719014, + }, + ], + label: '台湾省', + value: 710000, + }, + { + children: [ + { + children: [], + label: '中西区', + value: 810101, + }, + { + children: [], + label: '东区', + value: 810102, + }, + { + children: [], + label: '九龙城区', + value: 810103, + }, + { + children: [], + label: '观塘区', + value: 810104, + }, + { + children: [], + label: '南区', + value: 810105, + }, + { + children: [], + label: '深水埗区', + value: 810106, + }, + { + children: [], + label: '湾仔区', + value: 810107, + }, + { + children: [], + label: '黄大仙区', + value: 810108, + }, + { + children: [], + label: '油尖旺区', + value: 810109, + }, + { + children: [], + label: '离岛区', + value: 810110, + }, + { + children: [], + label: '葵青区', + value: 810111, + }, + { + children: [], + label: '北区', + value: 810112, + }, + { + children: [], + label: '西贡区', + value: 810113, + }, + { + children: [], + label: '沙田区', + value: 810114, + }, + { + children: [], + label: '屯门区', + value: 810115, + }, + { + children: [], + label: '大埔区', + value: 810116, + }, + { + children: [], + label: '荃湾区', + value: 810117, + }, + { + children: [], + label: '元朗区', + value: 810118, + }, + ], + label: '香港', + value: 810000, + }, + { + children: [ + { + children: [], + label: '花王堂区', + value: 820001, + }, + { + children: [], + label: '望德堂区', + value: 820002, + }, + { + children: [], + label: '风顺堂区', + value: 820003, + }, + { + children: [], + label: '圣方济各堂区', + value: 820004, + }, + { + children: [], + label: '嘉模堂区', + value: 820005, + }, + { + children: [], + label: '大堂区', + value: 820006, + }, + { + children: [], + label: '路氹填海区', + value: 820007, + }, + { + children: [], + label: '花地玛堂区', + value: 820008, + }, + { + children: [], + label: '澳门特别行政区直辖', + value: 820010, + }, + ], + label: '澳门', + value: 820000, + }, +]; diff --git a/admin-web/typescript-ant-design-vue/src/components/smart-area-cascader/province-city.ts b/admin-web/typescript-ant-design-vue/src/components/smart-area-cascader/province-city.ts new file mode 100644 index 00000000..50ba58d1 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/components/smart-area-cascader/province-city.ts @@ -0,0 +1,1727 @@ +export const PROVINCE_CITY = [ + { + children: [ + { + value: 110100, + label: '北京', + }, + ], + value: 110000, + label: '北京市', + }, + { + children: [ + { + value: 120100, + label: '天津', + }, + ], + value: 120000, + label: '天津市', + }, + { + children: [ + { + value: 130100, + label: '石家庄', + }, + { + value: 130200, + label: '唐山', + }, + { + value: 130300, + label: '秦皇岛', + }, + { + value: 130400, + label: '邯郸', + }, + { + value: 130500, + label: '邢台', + }, + { + value: 130600, + label: '保定', + }, + { + value: 130700, + label: '张家口', + }, + { + value: 130800, + label: '承德', + }, + { + value: 130900, + label: '沧州', + }, + { + value: 131000, + label: '廊坊', + }, + { + value: 131100, + label: '衡水', + }, + ], + value: 130000, + label: '河北省', + }, + { + children: [ + { + value: 140100, + label: '太原', + }, + { + value: 140200, + label: '大同', + }, + { + value: 140300, + label: '阳泉', + }, + { + value: 140400, + label: '长治', + }, + { + value: 140500, + label: '晋城', + }, + { + value: 140600, + label: '朔州', + }, + { + value: 140700, + label: '晋中', + }, + { + value: 140800, + label: '运城', + }, + { + value: 140900, + label: '忻州', + }, + { + value: 141000, + label: '临汾', + }, + { + value: 141100, + label: '吕梁', + }, + ], + value: 140000, + label: '山西省', + }, + { + children: [ + { + value: 150100, + label: '呼和浩特', + }, + { + value: 150200, + label: '包头', + }, + { + value: 150300, + label: '乌海', + }, + { + value: 150400, + label: '赤峰', + }, + { + value: 150500, + label: '通辽', + }, + { + value: 150600, + label: '鄂尔多斯', + }, + { + value: 150700, + label: '呼伦贝尔', + }, + { + value: 150800, + label: '巴彦淖尔', + }, + { + value: 150900, + label: '乌兰察布', + }, + { + value: 152200, + label: '兴安盟', + }, + { + value: 152500, + label: '锡林郭勒盟', + }, + { + value: 152900, + label: '阿拉善盟', + }, + ], + value: 150000, + label: '内蒙古自治区', + }, + { + children: [ + { + value: 210100, + label: '沈阳', + }, + { + value: 210200, + label: '大连', + }, + { + value: 210300, + label: '鞍山', + }, + { + value: 210400, + label: '抚顺', + }, + { + value: 210500, + label: '本溪', + }, + { + value: 210600, + label: '丹东', + }, + { + value: 210700, + label: '锦州', + }, + { + value: 210800, + label: '营口', + }, + { + value: 210900, + label: '阜新', + }, + { + value: 211000, + label: '辽阳', + }, + { + value: 211100, + label: '盘锦', + }, + { + value: 211200, + label: '铁岭', + }, + { + value: 211300, + label: '朝阳', + }, + { + value: 211400, + label: '葫芦岛', + }, + ], + value: 210000, + label: '辽宁省', + }, + { + children: [ + { + value: 220100, + label: '长春', + }, + { + value: 220200, + label: '吉林', + }, + { + value: 220300, + label: '四平', + }, + { + value: 220400, + label: '辽源', + }, + { + value: 220500, + label: '通化', + }, + { + value: 220600, + label: '白山', + }, + { + value: 220700, + label: '松原', + }, + { + value: 220800, + label: '白城', + }, + { + value: 222400, + label: '延边', + }, + ], + value: 220000, + label: '吉林省', + }, + { + children: [ + { + value: 230100, + label: '哈尔滨', + }, + { + value: 230200, + label: '齐齐哈尔', + }, + { + value: 230300, + label: '鸡西', + }, + { + value: 230400, + label: '鹤岗', + }, + { + value: 230500, + label: '双鸭山', + }, + { + value: 230600, + label: '大庆', + }, + { + value: 230700, + label: '伊春', + }, + { + value: 230800, + label: '佳木斯', + }, + { + value: 230900, + label: '七台河', + }, + { + value: 231000, + label: '牡丹江', + }, + { + value: 231100, + label: '黑河', + }, + { + value: 231200, + label: '绥化', + }, + { + value: 232700, + label: '大兴安岭地区', + }, + ], + value: 230000, + label: '黑龙江省', + }, + { + children: [ + { + value: 310100, + label: '上海', + }, + ], + value: 310000, + label: '上海市', + }, + { + children: [ + { + value: 320100, + label: '南京', + }, + { + value: 320200, + label: '无锡', + }, + { + value: 320300, + label: '徐州', + }, + { + value: 320400, + label: '常州', + }, + { + value: 320500, + label: '苏州', + }, + { + value: 320600, + label: '南通', + }, + { + value: 320700, + label: '连云港', + }, + { + value: 320800, + label: '淮安', + }, + { + value: 320900, + label: '盐城', + }, + { + value: 321000, + label: '扬州', + }, + { + value: 321100, + label: '镇江', + }, + { + value: 321200, + label: '泰州', + }, + { + value: 321300, + label: '宿迁', + }, + ], + value: 320000, + label: '江苏省', + }, + { + children: [ + { + value: 330100, + label: '杭州', + }, + { + value: 330200, + label: '宁波', + }, + { + value: 330300, + label: '温州', + }, + { + value: 330400, + label: '嘉兴', + }, + { + value: 330500, + label: '湖州', + }, + { + value: 330600, + label: '绍兴', + }, + { + value: 330700, + label: '金华', + }, + { + value: 330800, + label: '衢州', + }, + { + value: 330900, + label: '舟山', + }, + { + value: 331000, + label: '台州', + }, + { + value: 331100, + label: '丽水', + }, + ], + value: 330000, + label: '浙江省', + }, + { + children: [ + { + value: 340100, + label: '合肥', + }, + { + value: 340200, + label: '芜湖', + }, + { + value: 340300, + label: '蚌埠', + }, + { + value: 340400, + label: '淮南', + }, + { + value: 340500, + label: '马鞍山', + }, + { + value: 340600, + label: '淮北', + }, + { + value: 340700, + label: '铜陵', + }, + { + value: 340800, + label: '安庆', + }, + { + value: 341000, + label: '黄山', + }, + { + value: 341100, + label: '滁州', + }, + { + value: 341200, + label: '阜阳', + }, + { + value: 341300, + label: '宿州', + }, + { + value: 341500, + label: '六安', + }, + { + value: 341600, + label: '亳州', + }, + { + value: 341700, + label: '池州', + }, + { + value: 341800, + label: '宣城', + }, + ], + value: 340000, + label: '安徽省', + }, + { + children: [ + { + value: 350100, + label: '福州', + }, + { + value: 350200, + label: '厦门', + }, + { + value: 350300, + label: '莆田', + }, + { + value: 350400, + label: '三明', + }, + { + value: 350500, + label: '泉州', + }, + { + value: 350600, + label: '漳州', + }, + { + value: 350700, + label: '南平', + }, + { + value: 350800, + label: '龙岩', + }, + { + value: 350900, + label: '宁德', + }, + ], + value: 350000, + label: '福建省', + }, + { + children: [ + { + value: 360100, + label: '南昌', + }, + { + value: 360200, + label: '景德镇', + }, + { + value: 360300, + label: '萍乡', + }, + { + value: 360400, + label: '九江', + }, + { + value: 360500, + label: '新余', + }, + { + value: 360600, + label: '鹰潭', + }, + { + value: 360700, + label: '赣州', + }, + { + value: 360800, + label: '吉安', + }, + { + value: 360900, + label: '宜春', + }, + { + value: 361000, + label: '抚州', + }, + { + value: 361100, + label: '上饶', + }, + ], + value: 360000, + label: '江西省', + }, + { + children: [ + { + value: 370100, + label: '济南', + }, + { + value: 370200, + label: '青岛', + }, + { + value: 370300, + label: '淄博', + }, + { + value: 370400, + label: '枣庄', + }, + { + value: 370500, + label: '东营', + }, + { + value: 370600, + label: '烟台', + }, + { + value: 370700, + label: '潍坊', + }, + { + value: 370800, + label: '济宁', + }, + { + value: 370900, + label: '泰安', + }, + { + value: 371000, + label: '威海', + }, + { + value: 371100, + label: '日照', + }, + { + value: 371300, + label: '临沂', + }, + { + value: 371400, + label: '德州', + }, + { + value: 371500, + label: '聊城', + }, + { + value: 371600, + label: '滨州', + }, + { + value: 371700, + label: '菏泽', + }, + { + value: 1072447, + label: '莱芜', + }, + ], + value: 370000, + label: '山东省', + }, + { + children: [ + { + value: 410100, + label: '郑州', + }, + { + value: 410200, + label: '开封', + }, + { + value: 410300, + label: '洛阳', + }, + { + value: 410400, + label: '平顶山', + }, + { + value: 410500, + label: '安阳', + }, + { + value: 410600, + label: '鹤壁', + }, + { + value: 410700, + label: '新乡', + }, + { + value: 410800, + label: '焦作', + }, + { + value: 410900, + label: '濮阳', + }, + { + value: 411000, + label: '许昌', + }, + { + value: 411100, + label: '漯河', + }, + { + value: 411200, + label: '三门峡', + }, + { + value: 411300, + label: '南阳', + }, + { + value: 411400, + label: '商丘', + }, + { + value: 411500, + label: '信阳', + }, + { + value: 411600, + label: '周口', + }, + { + value: 411700, + label: '驻马店', + }, + { + value: 419001, + label: '济源', + }, + ], + value: 410000, + label: '河南省', + }, + { + children: [ + { + value: 420100, + label: '武汉', + }, + { + value: 420200, + label: '黄石', + }, + { + value: 420300, + label: '十堰', + }, + { + value: 420500, + label: '宜昌', + }, + { + value: 420600, + label: '襄阳', + }, + { + value: 420700, + label: '鄂州', + }, + { + value: 420800, + label: '荆门', + }, + { + value: 420900, + label: '孝感', + }, + { + value: 421000, + label: '荆州', + }, + { + value: 421100, + label: '黄冈', + }, + { + value: 421200, + label: '咸宁', + }, + { + value: 421300, + label: '随州', + }, + { + value: 422800, + label: '恩施', + }, + { + value: 1072452, + label: '潜江', + }, + { + value: 1072453, + label: '仙桃', + }, + { + value: 1072457, + label: '大冶', + }, + { + value: 1072458, + label: '天门', + }, + { + value: 1072460, + label: '神农架', + }, + ], + value: 420000, + label: '湖北省', + }, + { + children: [ + { + value: 430100, + label: '长沙', + }, + { + value: 430200, + label: '株洲', + }, + { + value: 430300, + label: '湘潭', + }, + { + value: 430400, + label: '衡阳', + }, + { + value: 430500, + label: '邵阳', + }, + { + value: 430600, + label: '岳阳', + }, + { + value: 430700, + label: '常德', + }, + { + value: 430800, + label: '张家界', + }, + { + value: 430900, + label: '益阳', + }, + { + value: 431000, + label: '郴州', + }, + { + value: 431100, + label: '永州', + }, + { + value: 431200, + label: '怀化', + }, + { + value: 431300, + label: '娄底', + }, + { + value: 433100, + label: '湘西', + }, + ], + value: 430000, + label: '湖南省', + }, + { + children: [ + { + value: 440100, + label: '广州', + }, + { + value: 440200, + label: '韶关', + }, + { + value: 440300, + label: '深圳', + }, + { + value: 440400, + label: '珠海', + }, + { + value: 440500, + label: '汕头', + }, + { + value: 440600, + label: '佛山', + }, + { + value: 440700, + label: '江门', + }, + { + value: 440800, + label: '湛江', + }, + { + value: 440900, + label: '茂名', + }, + { + value: 441200, + label: '肇庆', + }, + { + value: 441300, + label: '惠州', + }, + { + value: 441400, + label: '梅州', + }, + { + value: 441500, + label: '汕尾', + }, + { + value: 441600, + label: '河源', + }, + { + value: 441700, + label: '阳江', + }, + { + value: 441800, + label: '清远', + }, + { + value: 441900, + label: '东莞', + }, + { + value: 442000, + label: '中山', + }, + { + value: 445100, + label: '潮州', + }, + { + value: 445200, + label: '揭阳', + }, + { + value: 445300, + label: '云浮', + }, + ], + value: 440000, + label: '广东省', + }, + { + children: [ + { + value: 450100, + label: '南宁', + }, + { + value: 450200, + label: '柳州', + }, + { + value: 450300, + label: '桂林', + }, + { + value: 450400, + label: '梧州', + }, + { + value: 450500, + label: '北海', + }, + { + value: 450600, + label: '防城港', + }, + { + value: 450700, + label: '钦州', + }, + { + value: 450800, + label: '贵港', + }, + { + value: 450900, + label: '玉林', + }, + { + value: 451000, + label: '百色', + }, + { + value: 451100, + label: '贺州', + }, + { + value: 451200, + label: '河池', + }, + { + value: 451300, + label: '来宾', + }, + { + value: 451400, + label: '崇左', + }, + ], + value: 450000, + label: '广西壮族自治区', + }, + { + children: [ + { + value: 460100, + label: '海口', + }, + { + value: 460200, + label: '三亚', + }, + { + value: 460300, + label: '三沙', + }, + { + value: 460400, + label: '儋州', + }, + { + value: 1072449, + label: '文昌', + }, + ], + value: 460000, + label: '海南省', + }, + { + children: [ + { + value: 500100, + label: '重庆', + }, + ], + value: 500000, + label: '重庆市', + }, + { + children: [ + { + value: 510100, + label: '成都', + }, + { + value: 510300, + label: '自贡', + }, + { + value: 510400, + label: '攀枝花', + }, + { + value: 510500, + label: '泸州', + }, + { + value: 510600, + label: '德阳', + }, + { + value: 510700, + label: '绵阳', + }, + { + value: 510800, + label: '广元', + }, + { + value: 510900, + label: '遂宁', + }, + { + value: 511000, + label: '内江', + }, + { + value: 511100, + label: '乐山', + }, + { + value: 511300, + label: '南充', + }, + { + value: 511400, + label: '眉山', + }, + { + value: 511500, + label: '宜宾', + }, + { + value: 511600, + label: '广安', + }, + { + value: 511700, + label: '达州', + }, + { + value: 511800, + label: '雅安', + }, + { + value: 511900, + label: '巴中', + }, + { + value: 512000, + label: '资阳', + }, + { + value: 513200, + label: '阿坝', + }, + { + value: 513300, + label: '甘孜', + }, + { + value: 513400, + label: '凉山', + }, + { + value: 1072456, + label: '西昌', + }, + ], + value: 510000, + label: '四川省', + }, + { + children: [ + { + value: 520100, + label: '贵阳', + }, + { + value: 520200, + label: '六盘水', + }, + { + value: 520300, + label: '遵义', + }, + { + value: 520400, + label: '安顺', + }, + { + value: 520500, + label: '毕节', + }, + { + value: 520600, + label: '铜仁', + }, + { + value: 522300, + label: '黔西南', + }, + { + value: 522600, + label: '黔东南', + }, + { + value: 522700, + label: '黔南', + }, + ], + value: 520000, + label: '贵州省', + }, + { + children: [ + { + value: 530100, + label: '昆明', + }, + { + value: 530300, + label: '曲靖', + }, + { + value: 530400, + label: '玉溪', + }, + { + value: 530500, + label: '保山', + }, + { + value: 530600, + label: '昭通', + }, + { + value: 530700, + label: '丽江', + }, + { + value: 530800, + label: '普洱', + }, + { + value: 530900, + label: '临沧', + }, + { + value: 532300, + label: '楚雄彝族自治州', + }, + { + value: 532500, + label: '红河哈尼族彝族自治州', + }, + { + value: 532600, + label: '文山壮族苗族自治州', + }, + { + value: 532800, + label: '西双版纳傣族自治州', + }, + { + value: 532900, + label: '大理', + }, + { + value: 533100, + label: '德宏傣族景颇族自治州', + }, + { + value: 533300, + label: '怒江傈僳族自治州', + }, + { + value: 533400, + label: '迪庆藏族自治州', + }, + ], + value: 530000, + label: '云南省', + }, + { + children: [ + { + value: 540100, + label: '拉萨', + }, + { + value: 540200, + label: '日喀则', + }, + { + value: 540300, + label: '昌都', + }, + { + value: 540400, + label: '林芝', + }, + { + value: 540500, + label: '山南', + }, + { + value: 540600, + label: '那曲', + }, + { + value: 542500, + label: '阿里', + }, + ], + value: 540000, + label: '西藏自治区', + }, + { + children: [ + { + value: 610100, + label: '西安', + }, + { + value: 610200, + label: '铜川', + }, + { + value: 610300, + label: '宝鸡', + }, + { + value: 610400, + label: '咸阳', + }, + { + value: 610500, + label: '渭南', + }, + { + value: 610600, + label: '延安', + }, + { + value: 610700, + label: '汉中', + }, + { + value: 610800, + label: '榆林', + }, + { + value: 610900, + label: '安康', + }, + { + value: 611000, + label: '商洛', + }, + { + value: 1072448, + label: '杨凌', + }, + ], + value: 610000, + label: '陕西省', + }, + { + children: [ + { + value: 620100, + label: '兰州', + }, + { + value: 620200, + label: '嘉峪关', + }, + { + value: 620300, + label: '金昌', + }, + { + value: 620400, + label: '白银', + }, + { + value: 620500, + label: '天水', + }, + { + value: 620600, + label: '武威', + }, + { + value: 620700, + label: '张掖', + }, + { + value: 620800, + label: '平凉', + }, + { + value: 620900, + label: '酒泉', + }, + { + value: 621000, + label: '庆阳', + }, + { + value: 621100, + label: '定西', + }, + { + value: 621200, + label: '陇南', + }, + { + value: 622900, + label: '临夏回族自治州', + }, + { + value: 623000, + label: '甘南藏族自治州', + }, + ], + value: 620000, + label: '甘肃省', + }, + { + children: [ + { + value: 630100, + label: '西宁', + }, + { + value: 630200, + label: '海东', + }, + { + value: 632200, + label: '海北', + }, + { + value: 632300, + label: '黄南', + }, + { + value: 632500, + label: '海南', + }, + { + value: 632600, + label: '果洛', + }, + { + value: 632700, + label: '玉树', + }, + { + value: 632800, + label: '海西', + }, + ], + value: 630000, + label: '青海省', + }, + { + children: [ + { + value: 640100, + label: '银川', + }, + { + value: 640200, + label: '石嘴山', + }, + { + value: 640300, + label: '吴忠', + }, + { + value: 640400, + label: '固原', + }, + { + value: 640500, + label: '中卫', + }, + ], + value: 640000, + label: '宁夏回族自治区', + }, + { + children: [ + { + value: 650100, + label: '乌鲁木齐', + }, + { + value: 650200, + label: '克拉玛依', + }, + { + value: 650400, + label: '吐鲁番', + }, + { + value: 650500, + label: '哈密', + }, + { + value: 652300, + label: '昌吉', + }, + { + value: 652700, + label: '博尔塔拉', + }, + { + value: 652800, + label: '巴音郭楞', + }, + { + value: 652900, + label: '阿克苏', + }, + { + value: 653000, + label: '克孜勒苏柯尔克孜', + }, + { + value: 653100, + label: '喀什地区', + }, + { + value: 653200, + label: '和田', + }, + { + value: 654000, + label: '伊犁', + }, + { + value: 654200, + label: '塔城', + }, + { + value: 654300, + label: '阿勒泰', + }, + { + value: 1072450, + label: '阿拉尔', + }, + { + value: 1072454, + label: '铁门关', + }, + { + value: 1072455, + label: '五家渠', + }, + { + value: 1072459, + label: '石河子', + }, + ], + value: 650000, + label: '新疆维吾尔自治区', + }, + { + children: [ + { + value: 8345963, + label: '台北', + }, + { + value: 8345964, + label: '高雄', + }, + ], + value: 710000, + label: '台湾省', + }, + { + children: [ + { + value: 810001, + label: '中西区', + }, + { + value: 810002, + label: '湾仔区', + }, + { + value: 810003, + label: '东区', + }, + { + value: 810004, + label: '南区', + }, + { + value: 810005, + label: '油尖旺区', + }, + { + value: 810006, + label: '深水埗区', + }, + { + value: 810007, + label: '九龙城区', + }, + { + value: 810008, + label: '黄大仙区', + }, + { + value: 810009, + label: '观塘区', + }, + { + value: 810010, + label: '荃湾区', + }, + { + value: 810011, + label: '屯门区', + }, + { + value: 810012, + label: '元朗区', + }, + { + value: 810013, + label: '北区', + }, + { + value: 810014, + label: '大埔区', + }, + { + value: 810015, + label: '西贡区', + }, + { + value: 810016, + label: '沙田区', + }, + { + value: 810017, + label: '葵青区', + }, + { + value: 810018, + label: '离岛区', + }, + ], + value: 810000, + label: '香港特别行政区', + }, + { + children: [ + { + value: 820001, + label: '花地玛堂区', + }, + { + value: 820002, + label: '花王堂区', + }, + { + value: 820003, + label: '望德堂区', + }, + { + value: 820004, + label: '大堂区', + }, + { + value: 820005, + label: '风顺堂区', + }, + { + value: 820006, + label: '嘉模堂区', + }, + { + value: 820007, + label: '路凼填海区', + }, + { + value: 820008, + label: '圣方济各堂区', + }, + ], + value: 820000, + label: '澳门特别行政区', + }, + { + children: [], + value: 900000, + label: '外国', + }, +]; diff --git a/admin-web/typescript-ant-design-vue/src/components/smart-area-cascader/smart-area-option.ts b/admin-web/typescript-ant-design-vue/src/components/smart-area-cascader/smart-area-option.ts new file mode 100644 index 00000000..02e1ffa5 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/components/smart-area-cascader/smart-area-option.ts @@ -0,0 +1,14 @@ +/* + * @Description:地区类型 + * @Author: zhuoda + * @Date: 2021-08-18 + * @LastEditTime: 2021-08-18 + * @LastEditors: zhuoda + */ + +export interface SmartAreaOption { + value: number; + label: string; + disabled?: boolean; + children?: SmartAreaOption[]; +} diff --git a/admin-web/typescript-ant-design-vue/src/components/smart-boolean-select/index.vue b/admin-web/typescript-ant-design-vue/src/components/smart-boolean-select/index.vue new file mode 100644 index 00000000..39926aa0 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/components/smart-boolean-select/index.vue @@ -0,0 +1,73 @@ + + + diff --git a/admin-web/typescript-ant-design-vue/src/components/smart-enum-select/index.vue b/admin-web/typescript-ant-design-vue/src/components/smart-enum-select/index.vue new file mode 100644 index 00000000..a9728d2c --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/components/smart-enum-select/index.vue @@ -0,0 +1,71 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/components/smart-loading/index.ts b/admin-web/typescript-ant-design-vue/src/components/smart-loading/index.ts new file mode 100644 index 00000000..452d9871 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/components/smart-loading/index.ts @@ -0,0 +1,21 @@ +import {useSpinStore} from "/@/store/modules/system/spin"; + +interface ISmartLoading { + + show(): void; + + hide(): void; + +} + + +export const SmartLoading: ISmartLoading = { + + show: () => { + useSpinStore().show(); + }, + + hide: () => { + useSpinStore().hide(); + } +}; \ No newline at end of file diff --git a/admin-web/typescript-ant-design-vue/src/components/smart-table-operator/index.vue b/admin-web/typescript-ant-design-vue/src/components/smart-table-operator/index.vue new file mode 100644 index 00000000..d94867ca --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/components/smart-table-operator/index.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/admin-web/typescript-ant-design-vue/src/components/upload/index.vue b/admin-web/typescript-ant-design-vue/src/components/upload/index.vue new file mode 100644 index 00000000..43e8f6b3 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/components/upload/index.vue @@ -0,0 +1,160 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/config/app-config.ts b/admin-web/typescript-ant-design-vue/src/config/app-config.ts new file mode 100644 index 00000000..a9144055 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/config/app-config.ts @@ -0,0 +1,38 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-03 10:27:11 + * @LastEditTime: 2021-08-25 17:01:33 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/config/app-config.ts + */ +import { AppConfig } from '/@/types/config'; + +/** + * 应用默认配置 + */ + +export const appDefaultConfig: AppConfig = { + // i18n 语言选择 + languageType: 'zh_CN', + // 布局: side 或者 side-expand + layout: 'side-expand', + // 主题 + theme: 'dark', + // 手机模式最大宽度 768px,如果少于768px,则手机自适应 + mobileMaxWidth: 768, + // 侧边菜单宽度 , 默认为256px + sideMenuWidth: 256, + // 标签页 + multiPageTagFlag: true, + // 标签页缓存, keep-alive, true 开启缓存; false 不开启 + multiPageTagKeepAliveFlag: true, + // 固定头部状态栏,true:固定,false:不固定 + headerFixedFlag: true, + // 固定侧边栏,true:固定,false:不固定 + sideBarFixedFlag: true, + // 隐藏设置,true:隐藏,false:不隐藏 + hideSettingFlag: false, + // 首页页面Name + homePageName: 'Home', +}; diff --git a/admin-web/typescript-ant-design-vue/src/config/project-config.ts b/admin-web/typescript-ant-design-vue/src/config/project-config.ts new file mode 100644 index 00000000..641ab8b9 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/config/project-config.ts @@ -0,0 +1,27 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-03 10:27:11 + * @LastEditTime: 2021-09-01 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/config/project-config.ts + */ +import { ProjectConfig } from '/@/types/config'; +import moment from 'moment'; + +/** + * 项目默认配置 + */ + +export const projectDefaultConfig: ProjectConfig = { + // 项目名称 + projectName: 'SmartAdmin', + // 版权信息 + copyright: 'Copyright ©2015-' + moment().format('YYYY') + '版权所有: 1024创新实验室 ', + // 点击版权的跳转 + copyrightUrl: 'http://www.1024lab.net', + // 版本: 1.0.0 + version: '2.0.0-beta', + // build时间戳 + buildTime: moment().format('YYYY-MM-DD HH:mm:ss'), +}; diff --git a/admin-web/typescript-ant-design-vue/src/constants/business/category.ts b/admin-web/typescript-ant-design-vue/src/constants/business/category.ts new file mode 100644 index 00000000..829de63c --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/constants/business/category.ts @@ -0,0 +1,22 @@ +/* + * @Description: + * @Author: zhuoda + * @Date: 2021-08-12 16:46:21 + * @LastEditTime: 2021-09-01 21:58:45 + * @LastEditors: zhuoda + */ +// 分类类型 +export const CATEGORY_TYPE_ENUM = { + GOODS: { + value: 1, + desc: '商品', + }, + DEMO: { + value: 2, + desc: '演示分类', + }, +}; + +export default { + CATEGORY_TYPE_ENUM, +}; diff --git a/admin-web/typescript-ant-design-vue/src/constants/business/file.ts b/admin-web/typescript-ant-design-vue/src/constants/business/file.ts new file mode 100644 index 00000000..f986e223 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/constants/business/file.ts @@ -0,0 +1,30 @@ +/* + * @Description: + * @version: + * @Author: zhuoda + * @Date: 2021-08-18 14:31:29 + * @LastEditors: zhuoda + * @LastEditTime: 2021-08-18 14:33:30 + */ +// 文件上传类型 +export const FILE_FOLDER_TYPE_ENUM = { + COMMON: { + value: 1, + desc: '通用文件夹', + }, + PIC: { + value: 2, + desc: '轮播图', + }, + CONTRACT: { + value: 3, + desc: '合同', + }, + FOLLOW_UP: { + value: 4, + desc: '跟进', + }, +}; +export default { + FILE_FOLDER_TYPE_ENUM, +}; diff --git a/admin-web/typescript-ant-design-vue/src/constants/business/goods.ts b/admin-web/typescript-ant-design-vue/src/constants/business/goods.ts new file mode 100644 index 00000000..aed4d37a --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/constants/business/goods.ts @@ -0,0 +1,23 @@ +/* + * @Description: + * @Author: zhuoda + * @Date: 2021-08-11 + * @LastEditTime: 2021-09-01 22:31:37 + * @LastEditors: zhuoda + */ +import { SmartEnum } from '/@/types/smart-enum'; + +// 商品分类 +export const GOODS_TYPE_ENUM: SmartEnum = { + BOOK: { + value: 1, + desc: '图书', + }, + COURSE: { + value: 2, + desc: '课程', + }, +}; +export default { + GOODS_TYPE_ENUM, +}; diff --git a/admin-web/typescript-ant-design-vue/src/constants/common.ts b/admin-web/typescript-ant-design-vue/src/constants/common.ts new file mode 100644 index 00000000..556cbefc --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/constants/common.ts @@ -0,0 +1,38 @@ +/* + * @Description: + * @Author: zhuoda + * @Date: 2021-08-03 + * @LastEditTime: 2021-08-27 + * @LastEditors: zhuoda + */ +import { SmartEnum } from '/@/types/smart-enum'; + +export const PAGE_SIZE: number = 15; + +export const PAGE_SIZE_OPTIONS: string[] = ['10', '15', '25', '35', '45', '55', '100', '150', '200', '300', '500']; + +export const FLAG_NUMBER_ENUM: SmartEnum = { + TRUE: { + value: 1, + desc: '是', + }, + FALSE: { + value: 0, + desc: '否', + }, +}; + +export const GenderEnum: SmartEnum = { + UNKNOWN: { + value: 0, + desc: '未知', + }, + MAN: { + value: 1, + desc: '男', + }, + WOMAN: { + value: 2, + desc: '女', + }, +}; diff --git a/admin-web/typescript-ant-design-vue/src/constants/index.ts b/admin-web/typescript-ant-design-vue/src/constants/index.ts new file mode 100644 index 00000000..0a71ed3f --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/constants/index.ts @@ -0,0 +1,22 @@ +/* + * @Description: + * @version: + * @Author: zhuoda + * @Date: 2021-08-11 18:14:13 + * @LastEditors: zhuoda + * @LastEditTime: 2021-09-01 20:55:07 + */ +import menu from './system/menu/menu-enum'; +import goods from './business/goods'; +import category from './business/category'; +import { FLAG_NUMBER_ENUM, GenderEnum } from './common'; +import file from './business/file'; + +export default { + FLAG_NUMBER_ENUM, + GenderEnum, + ...menu, + ...goods, + ...category, + ...file +}; diff --git a/admin-web/typescript-ant-design-vue/src/constants/regular.ts b/admin-web/typescript-ant-design-vue/src/constants/regular.ts new file mode 100644 index 00000000..f2d59181 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/constants/regular.ts @@ -0,0 +1,26 @@ +/* + * @Description: + * @Author: zhuoda + * @Date: 2021-08-17 + * @LastEditTime: 2021-08-26 + * @LastEditors: zhuoda + */ +export const regular = { + phone: /^(13|14|15|16|17|18|19)\d{9}$/, + qq: /^[1-9]\d{3,}$/, + linkUrl: + /^(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.,?'\\+&%$#=~_-]+))*$/, + // eslint-disable-next-line no-useless-escape + isNumber: /(^[\-1-9][1-9]*(.[1-9]+)?)$/, // 判断是否为数字,除了0 外 + isLandlineOrPhone: /^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/, // 验证 座机 或者手机 + account: /^[a-z0-9]{3,16}$/, // 请输入3-16位(小写字母|数字)的账号 + mobileAccount: /^[a-z0-9]{6,16}$/, // 请输入6-16位(小写字母|数字)的账号(和移动端保持一致) + accountDesc: '请输入3-16位(小写字母|数字)的账号', + pwd: /^[A-Za-z0-9._]{6,16}$/, // 请输入6-16位(大小写字母|数字|小数点|下划线)的密码 + pwdDesc: '请输入6-16位(大小写字母|数字|小数点|下划线)的密码', + delBlankSpace: /\s+/g, // 删除空格 + isPdfReg: new RegExp(/\.(pdf|PDF)/), + isElseFileReg: new RegExp(/\.(doc|docx|xls|xlsx|txt|ppt|pptx|pps|ppxs)/), + isIdentityCard: /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X|x)$/, // 验证身份证号 + isChinese: /^[\u4e00-\u9fa5]+$/gi, // 验证是否汉字 +}; diff --git a/admin-web/typescript-ant-design-vue/src/constants/system/employee.ts b/admin-web/typescript-ant-design-vue/src/constants/system/employee.ts new file mode 100644 index 00000000..2a14e183 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/constants/system/employee.ts @@ -0,0 +1,28 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-16 15:12:42 + * @LastEditTime: 2021-08-27 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/constants/system/employee.ts + */ +import { SmartEnum } from '/@/types/smart-enum'; + +export const GENDER_ENUM: SmartEnum = { + UNKNOWN: { + value: 0, + desc: '未知', + }, + MAN: { + value: 1, + desc: '男', + }, + WOMAN: { + value: 2, + desc: '女', + }, +}; + +export default { + GENDER_ENUM, +}; diff --git a/admin-web/typescript-ant-design-vue/src/constants/system/local-storage-key.ts b/admin-web/typescript-ant-design-vue/src/constants/system/local-storage-key.ts new file mode 100644 index 00000000..c66921b4 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/constants/system/local-storage-key.ts @@ -0,0 +1,25 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-09 08:58:11 + * @LastEditTime: 2021-08-18 20:13:28 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/constants/system/local-storage-key.ts + */ +/** + * key前缀 + */ +const KEY_PREFIX:string = 'crm_'; +/** + * localStorageKey集合 + */ +export default { + // 用户信息 + USER_INFO: `${KEY_PREFIX}user_info`, + // 用户菜单路由 + USER_MENU: `${KEY_PREFIX}user_menu`, + // 用户权限点 + USER_POINTS:`${KEY_PREFIX}user_points`, + // 用户的tag列表 + USER_TAG_NAV:`${KEY_PREFIX}user_tag_nav`, +} diff --git a/admin-web/typescript-ant-design-vue/src/constants/system/menu/menu-enum.ts b/admin-web/typescript-ant-design-vue/src/constants/system/menu/menu-enum.ts new file mode 100644 index 00000000..f84a981f --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/constants/system/menu/menu-enum.ts @@ -0,0 +1,25 @@ +/* + * @Description: + * @Author: zhuoda + * @Date: 2021-08-03 + * @LastEditTime: 2021-08-28 15:09:06 + * @LastEditors: zhuoda + */ +export const MENU_TYPE_ENUM = { + CATALOG: { + value: 1, + desc: '目录', + }, + MENU: { + value: 2, + desc: '菜单', + }, + POINTS: { + value: 3, + desc: '功能点', + }, +}; + +export default { + MENU_TYPE_ENUM, +}; diff --git a/admin-web/typescript-ant-design-vue/src/i18n/index.ts b/admin-web/typescript-ant-design-vue/src/i18n/index.ts new file mode 100644 index 00000000..88d0e15c --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/index.ts @@ -0,0 +1,19 @@ +import {LanguageType} from "/@/types/config"; + +// i18n 选项 +interface I18nSelectOption { + text: String, + value: LanguageType +} + +// 语言选择数组 +export const i18nList: I18nSelectOption[] = [ + { + text: '简体中文', + value: 'zh_CN', + }, + { + text: 'English', + value: 'en', + }, +] \ No newline at end of file diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/account.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/account.js new file mode 100644 index 00000000..65a4774b --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/account.js @@ -0,0 +1,5 @@ +import settings from './account/settings' + +export default { + ...settings + } diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/account/settings.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/account/settings.js new file mode 100644 index 00000000..74ec4302 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/account/settings.js @@ -0,0 +1,62 @@ +export default { + 'account.settings.menuMap.basic': 'Basic Settings', + 'account.settings.menuMap.security': 'Security Settings', + 'account.settings.menuMap.custom': 'Custom Settings', + 'account.settings.menuMap.binding': 'Account Binding', + 'account.settings.menuMap.notification': 'New Message Notification', + 'account.settings.basic.avatar': 'Avatar', + 'account.settings.basic.change-avatar': 'Change avatar', + 'account.settings.basic.email': 'Email', + 'account.settings.basic.email-message': 'Please input your email!', + 'account.settings.basic.nickname': 'Nickname', + 'account.settings.basic.nickname-message': 'Please input your Nickname!', + 'account.settings.basic.profile': 'Personal profile', + 'account.settings.basic.profile-message': 'Please input your personal profile!', + 'account.settings.basic.profile-placeholder': 'Brief introduction to yourself', + 'account.settings.basic.country': 'Country/Region', + 'account.settings.basic.country-message': 'Please input your country!', + 'account.settings.basic.geographic': 'Province or city', + 'account.settings.basic.geographic-message': 'Please input your geographic info!', + 'account.settings.basic.address': 'Street Address', + 'account.settings.basic.address-message': 'Please input your address!', + 'account.settings.basic.phone': 'Phone Number', + 'account.settings.basic.phone-message': 'Please input your phone!', + 'account.settings.basic.update': 'Update Information', + 'account.settings.basic.update.success': 'Update basic information successfully', + 'account.settings.security.strong': 'Strong', + 'account.settings.security.medium': 'Medium', + 'account.settings.security.weak': 'Weak', + 'account.settings.security.password': 'Account Password', + 'account.settings.security.password-description': 'Current password strength:', + 'account.settings.security.phone': 'Security Phone', + 'account.settings.security.phone-description': 'Bound phone:', + 'account.settings.security.question': 'Security Question', + 'account.settings.security.question-description': + 'The security question is not set, and the security policy can effectively protect the account security', + 'account.settings.security.email': 'Backup Email', + 'account.settings.security.email-description': 'Bound Email:', + 'account.settings.security.mfa': 'MFA Device', + 'account.settings.security.mfa-description': + 'Unbound MFA device, after binding, can be confirmed twice', + 'account.settings.security.modify': 'Modify', + 'account.settings.security.set': 'Set', + 'account.settings.security.bind': 'Bind', + 'account.settings.binding.taobao': 'Binding Taobao', + 'account.settings.binding.taobao-description': 'Currently unbound Taobao account', + 'account.settings.binding.alipay': 'Binding Alipay', + 'account.settings.binding.alipay-description': 'Currently unbound Alipay account', + 'account.settings.binding.dingding': 'Binding DingTalk', + 'account.settings.binding.dingding-description': 'Currently unbound DingTalk account', + 'account.settings.binding.bind': 'Bind', + 'account.settings.notification.password': 'Account Password', + 'account.settings.notification.password-description': + 'Messages from other users will be notified in the form of a station letter', + 'account.settings.notification.messages': 'System Messages', + 'account.settings.notification.messages-description': + 'System messages will be notified in the form of a station letter', + 'account.settings.notification.todo': 'To-do Notification', + 'account.settings.notification.todo-description': + 'The to-do list will be notified in the form of a letter from the station', + 'account.settings.settings.open': 'Open', + 'account.settings.settings.close': 'Close' +} diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/dashboard.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/dashboard.js new file mode 100644 index 00000000..9d408927 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/dashboard.js @@ -0,0 +1,5 @@ +import analysis from './dashboard/analysis' + +export default { + ...analysis + } diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/dashboard/analysis.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/dashboard/analysis.js new file mode 100644 index 00000000..6738d12b --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/dashboard/analysis.js @@ -0,0 +1,36 @@ +export default { + 'dashboard.analysis.test': 'Gongzhuan No.{no} shop', + 'dashboard.analysis.introduce': 'Introduce', + 'dashboard.analysis.total-sales': 'Total Sales', + 'dashboard.analysis.day-sales': 'Daily Sales', + 'dashboard.analysis.visits': 'Visits', + 'dashboard.analysis.visits-trend': 'Visits Trend', + 'dashboard.analysis.visits-ranking': 'Visits Ranking', + 'dashboard.analysis.day-visits': 'Daily Visits', + 'dashboard.analysis.week': 'WoW Change', + 'dashboard.analysis.day': 'DoD Change', + 'dashboard.analysis.payments': 'Payments', + 'dashboard.analysis.conversion-rate': 'Conversion Rate', + 'dashboard.analysis.operational-effect': 'Operational Effect', + 'dashboard.analysis.sales-trend': 'Stores Sales Trend', + 'dashboard.analysis.sales-ranking': 'Sales Ranking', + 'dashboard.analysis.all-year': 'All Year', + 'dashboard.analysis.all-month': 'All Month', + 'dashboard.analysis.all-week': 'All Week', + 'dashboard.analysis.all-day': 'All day', + 'dashboard.analysis.search-users': 'Search Users', + 'dashboard.analysis.per-capita-search': 'Per Capita Search', + 'dashboard.analysis.online-top-search': 'Online Top Search', + 'dashboard.analysis.the-proportion-of-sales': 'The Proportion Of Sales', + 'dashboard.analysis.dropdown-option-one': 'Operation one', + 'dashboard.analysis.dropdown-option-two': 'Operation two', + 'dashboard.analysis.channel.all': 'ALL', + 'dashboard.analysis.channel.online': 'Online', + 'dashboard.analysis.channel.stores': 'Stores', + 'dashboard.analysis.sales': 'Sales', + 'dashboard.analysis.traffic': 'Traffic', + 'dashboard.analysis.table.rank': 'Rank', + 'dashboard.analysis.table.search-keyword': 'Keyword', + 'dashboard.analysis.table.users': 'Users', + 'dashboard.analysis.table.weekly-range': 'Weekly Range' +} diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/form.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/form.js new file mode 100644 index 00000000..d004e527 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/form.js @@ -0,0 +1,5 @@ +import basicForm from './form/basicForm' + +export default { + ...basicForm + } diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/form/basicForm.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/form/basicForm.js new file mode 100644 index 00000000..3ef4bc0b --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/form/basicForm.js @@ -0,0 +1,61 @@ +export default { + 'form.basic-form.basic.title': 'Basic form', + 'form.basic-form.basic.description': + 'Form pages are used to collect or verify information to users, and basic forms are common in scenarios where there are fewer data items.', + 'form.basic-form.title.label': 'Title', + 'form.basic-form.title.placeholder': 'Give the target a name', + 'form.basic-form.title.required': 'Please enter a title', + 'form.basic-form.date.label': 'Start and end date', + 'form.basic-form.placeholder.start': 'Start date', + 'form.basic-form.placeholder.end': 'End date', + 'form.basic-form.date.required': 'Please select the start and end date', + 'form.basic-form.goal.label': 'Goal description', + 'form.basic-form.goal.placeholder': 'Please enter your work goals', + 'form.basic-form.goal.required': 'Please enter a description of the goal', + 'form.basic-form.standard.label': 'Metrics', + 'form.basic-form.standard.placeholder': 'Please enter a metric', + 'form.basic-form.standard.required': 'Please enter a metric', + 'form.basic-form.client.label': 'Client', + 'form.basic-form.label.tooltip': 'Target service object', + 'form.basic-form.client.placeholder': + 'Please describe your customer service, internal customers directly @ Name / job number', + 'form.basic-form.client.required': 'Please describe the customers you serve', + 'form.basic-form.invites.label': 'Inviting critics', + 'form.basic-form.invites.placeholder': + 'Please direct @ Name / job number, you can invite up to 5 people', + 'form.basic-form.weight.label': 'Weight', + 'form.basic-form.weight.placeholder': 'Please enter weight', + 'form.basic-form.public.label': 'Target disclosure', + 'form.basic-form.label.help': 'Customers and invitees are shared by default', + 'form.basic-form.radio.public': 'Public', + 'form.basic-form.radio.partially-public': 'Partially public', + 'form.basic-form.radio.private': 'Private', + 'form.basic-form.publicUsers.placeholder': 'Open to', + 'form.basic-form.option.A': 'Colleague A', + 'form.basic-form.option.B': 'Colleague B', + 'form.basic-form.option.C': 'Colleague C', + 'form.basic-form.email.required': 'Please enter your email!', + 'form.basic-form.email.wrong-format': 'The email address is in the wrong format!', + 'form.basic-form.userName.required': 'Please enter your userName!', + 'form.basic-form.password.required': 'Please enter your password!', + 'form.basic-form.password.twice': 'The passwords entered twice do not match!', + 'form.basic-form.strength.msg': + "Please enter at least 6 characters and don't use passwords that are easy to guess.", + 'form.basic-form.strength.strong': 'Strength: strong', + 'form.basic-form.strength.medium': 'Strength: medium', + 'form.basic-form.strength.short': 'Strength: too short', + 'form.basic-form.confirm-password.required': 'Please confirm your password!', + 'form.basic-form.phone-number.required': 'Please enter your phone number!', + 'form.basic-form.phone-number.wrong-format': 'Malformed phone number!', + 'form.basic-form.verification-code.required': 'Please enter the verification code!', + 'form.basic-form.form.get-captcha': 'Get Captcha', + 'form.basic-form.captcha.second': 'sec', + 'form.basic-form.form.optional': ' (optional) ', + 'form.basic-form.form.submit': 'Submit', + 'form.basic-form.form.save': 'Save', + 'form.basic-form.email.placeholder': 'Email', + 'form.basic-form.password.placeholder': 'Password', + 'form.basic-form.confirm-password.placeholder': 'Confirm password', + 'form.basic-form.phone-number.placeholder': 'Phone number', + 'form.basic-form.verification-code.placeholder': 'Verification code' +} diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/global.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/global.js new file mode 100644 index 00000000..1b0a940e --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/global.js @@ -0,0 +1,6 @@ +export default { + submit: 'Submit', + save: 'Save', + 'submit.ok': 'Submit successfully', + 'save.ok': 'Saved successfully' +} diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/index.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/index.js new file mode 100644 index 00000000..120b786e --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/index.js @@ -0,0 +1,35 @@ +import antdEnUS from 'ant-design-vue/es/locale-provider/en_US' +import momentEU from 'moment/locale/eu' +import global from './global' + +import menu from './menu' +import setting from './setting' +import user from './user' + +import dashboard from './dashboard' +import form from './form' +import result from './result' +import account from './account' + +const components = { + antLocale: antdEnUS, + momentName: 'eu', + momentLocale: momentEU +} + +export default { + message: '-', + + 'layouts.usermenu.dialog.title': 'Message', + 'layouts.usermenu.dialog.content': 'Are you sure you would like to logout?', + 'layouts.userLayout.title': 'Ant Design is the most influential web design specification in Xihu district', + ...components, + ...global, + ...menu, + ...setting, + ...user, + ...dashboard, + ...form, + ...result, + ...account +} diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/menu.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/menu.js new file mode 100644 index 00000000..b3d73eae --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/menu.js @@ -0,0 +1,39 @@ +export default { + 'menu.welcome': 'Welcome', + 'menu.home': 'Home', + 'menu.dashboard': 'Dashboard', + 'menu.dashboard.analysis': 'Analysis', + 'menu.dashboard.monitor': 'Monitor', + 'menu.dashboard.workplace': 'Workplace', + 'menu.form': 'Form', + 'menu.form.basic-form': 'Basic Form', + 'menu.form.step-form': 'Step Form', + 'menu.form.step-form.info': 'Step Form(write transfer information)', + 'menu.form.step-form.confirm': 'Step Form(confirm transfer information)', + 'menu.form.step-form.result': 'Step Form(finished)', + 'menu.form.advanced-form': 'Advanced Form', + 'menu.list': 'List', + 'menu.list.table-list': 'Search Table', + 'menu.list.basic-list': 'Basic List', + 'menu.list.card-list': 'Card List', + 'menu.list.search-list': 'Search List', + 'menu.list.search-list.articles': 'Search List(articles)', + 'menu.list.search-list.projects': 'Search List(projects)', + 'menu.list.search-list.applications': 'Search List(applications)', + 'menu.profile': 'Profile', + 'menu.profile.basic': 'Basic Profile', + 'menu.profile.advanced': 'Advanced Profile', + 'menu.result': 'Result', + 'menu.result.success': 'Success', + 'menu.result.fail': 'Fail', + 'menu.exception': 'Exception', + 'menu.exception.not-permission': '403', + 'menu.exception.not-find': '404', + 'menu.exception.server-error': '500', + 'menu.exception.trigger': 'Trigger', + 'menu.account': 'Account', + 'menu.account.center': 'Account Center', + 'menu.account.settings': 'Account Settings', + 'menu.account.trigger': 'Trigger Error', + 'menu.account.logout': 'Logout' +} diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/result.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/result.js new file mode 100644 index 00000000..75d3a4d6 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/result.js @@ -0,0 +1,7 @@ +import success from './result/success' +import fail from './result/fail' + +export default { + ...success, + ...fail + } diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/result/fail.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/result/fail.js new file mode 100644 index 00000000..168909c3 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/result/fail.js @@ -0,0 +1,11 @@ +export default { + 'result.fail.error.title': 'Submission Failed', + 'result.fail.error.description': + 'Please check and modify the following information before resubmitting.', + 'result.fail.error.hint-title': 'The content you submitted has the following error:', + 'result.fail.error.hint-text1': 'Your account has been frozen', + 'result.fail.error.hint-btn1': 'Thaw immediately', + 'result.fail.error.hint-text2': 'Your account is not yet eligible to apply', + 'result.fail.error.hint-btn2': 'Upgrade immediately', + 'result.fail.error.btn-text': 'Return to modify' +} diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/result/success.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/result/success.js new file mode 100644 index 00000000..fad6c1d2 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/result/success.js @@ -0,0 +1,19 @@ +export default { + 'result.success.title': 'Submission Success', + 'result.success.description': + 'The submission results page is used to feed back the results of a series of operational tasks. If it is a simple operation, use the Message global prompt feedback. This text area can show a simple supplementary explanation. If there is a similar requirement for displaying “documents”, the following gray area can present more complicated content.', + 'result.success.operate-title': 'Project Name', + 'result.success.operate-id': 'Project ID', + 'result.success.principal': 'Principal', + 'result.success.operate-time': 'Effective time', + 'result.success.step1-title': 'Create project', + 'result.success.step1-operator': 'Qu Lili', + 'result.success.step2-title': 'Departmental preliminary review', + 'result.success.step2-operator': 'Zhou Maomao', + 'result.success.step2-extra': 'Urge', + 'result.success.step3-title': 'Financial review', + 'result.success.step4-title': 'Finish', + 'result.success.btn-return': 'Back List', + 'result.success.btn-project': 'View Project', + 'result.success.btn-print': 'Print' +} diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/setting.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/setting.js new file mode 100644 index 00000000..f42ce9fe --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/setting.js @@ -0,0 +1,29 @@ +export default { + 'app.setting.pagestyle': 'Page style setting', + 'app.setting.pagestyle.light': 'Light style', + 'app.setting.pagestyle.dark': 'Dark style', + 'app.setting.pagestyle.realdark': 'RealDark style', + 'app.setting.themecolor': 'Theme Color', + 'app.setting.navigationmode': 'Navigation Mode', + 'app.setting.content-width': 'Content Width', + 'app.setting.fixedheader': 'Fixed Header', + 'app.setting.fixedsidebar': 'Fixed Sidebar', + 'app.setting.sidemenu': 'Side Menu Layout', + 'app.setting.topmenu': 'Top Menu Layout', + 'app.setting.content-width.fixed': 'Fixed', + 'app.setting.content-width.fluid': 'Fluid', + 'app.setting.othersettings': 'Other Settings', + 'app.setting.weakmode': 'Weak Mode', + 'app.setting.copy': 'Copy Setting', + 'app.setting.loading': 'Loading theme', + 'app.setting.copyinfo': 'copy success,please replace defaultSettings in src/config/defaultSettings.js', + 'app.setting.production.hint': 'Setting panel shows in development environment only, please manually modify', + 'app.setting.themecolor.daybreak': 'Daybreak Blue', + 'app.setting.themecolor.dust': 'Dust Red', + 'app.setting.themecolor.volcano': 'Volcano', + 'app.setting.themecolor.sunset': 'Sunset Orange', + 'app.setting.themecolor.cyan': 'Cyan', + 'app.setting.themecolor.green': 'Polar Green', + 'app.setting.themecolor.geekblue': 'Geek Blue', + 'app.setting.themecolor.purple': 'Golden Purple' +} diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/user.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/user.js new file mode 100644 index 00000000..561210ce --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/en-US/user.js @@ -0,0 +1,45 @@ +export default { + 'user.login.userName': 'userName', + 'user.login.password': 'password', + 'user.login.username.placeholder': 'Account: admin', + 'user.login.password.placeholder': 'password: admin or ant.design', + 'user.login.message-invalid-credentials': + 'Invalid username or password(admin/ant.design)', + 'user.login.message-invalid-verification-code': 'Invalid verification code', + 'user.login.tab-login-credentials': 'Credentials', + 'user.login.tab-login-mobile': 'Mobile number', + 'user.login.mobile.placeholder': 'Mobile number', + 'user.login.mobile.verification-code.placeholder': 'Verification code', + 'user.login.remember-me': 'Remember me', + 'user.login.forgot-password': 'Forgot your password?', + 'user.login.sign-in-with': 'Sign in with', + 'user.login.signup': 'Sign up', + 'user.login.login': 'Login', + 'user.register.register': 'Register', + 'user.register.email.placeholder': 'Email', + 'user.register.password.placeholder': 'Password ', + 'user.register.password.popover-message': 'Please enter at least 6 characters. Please do not use passwords that are easy to guess. ', + 'user.register.confirm-password.placeholder': 'Confirm password', + 'user.register.get-verification-code': 'Get code', + 'user.register.sign-in': 'Already have an account?', + 'user.register-result.msg': 'Account:registered at {email}', + 'user.register-result.activation-email': + 'The activation email has been sent to your email address and is valid for 24 hours. Please log in to the email in time and click on the link in the email to activate the account.', + 'user.register-result.back-home': 'Back to home', + 'user.register-result.view-mailbox': 'View mailbox', + 'user.email.required': 'Please enter your email!', + 'user.email.wrong-format': 'The email address is in the wrong format!', + 'user.userName.required': 'Please enter account name or email address', + 'user.password.required': 'Please enter your password!', + 'user.password.twice.msg': 'The passwords entered twice do not match!', + 'user.password.strength.msg': + 'The password is not strong enough', + 'user.password.strength.strong': 'Strength: strong', + 'user.password.strength.medium': 'Strength: medium', + 'user.password.strength.low': 'Strength: low', + 'user.password.strength.short': 'Strength: too short', + 'user.confirm-password.required': 'Please confirm your password!', + 'user.phone-number.required': 'Please enter your phone number!', + 'user.phone-number.wrong-format': 'Please enter a valid phone number', + 'user.verification-code.required': 'Please enter the verification code!' +} diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/account.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/account.js new file mode 100644 index 00000000..65a4774b --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/account.js @@ -0,0 +1,5 @@ +import settings from './account/settings' + +export default { + ...settings + } diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/account/settings.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/account/settings.js new file mode 100644 index 00000000..c6c2eac1 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/account/settings.js @@ -0,0 +1,57 @@ +export default { + 'account.settings.menuMap.basic': '基本设置', + 'account.settings.menuMap.security': '安全设置', + 'account.settings.menuMap.custom': '个性化', + 'account.settings.menuMap.binding': '账号绑定', + 'account.settings.menuMap.notification': '新消息通知', + 'account.settings.basic.avatar': '头像', + 'account.settings.basic.change-avatar': '更换头像', + 'account.settings.basic.email': '邮箱', + 'account.settings.basic.email-message': '请输入您的邮箱!', + 'account.settings.basic.nickname': '昵称', + 'account.settings.basic.nickname-message': '请输入您的昵称!', + 'account.settings.basic.profile': '个人简介', + 'account.settings.basic.profile-message': '请输入个人简介!', + 'account.settings.basic.profile-placeholder': '个人简介', + 'account.settings.basic.country': '国家/地区', + 'account.settings.basic.country-message': '请输入您的国家或地区!', + 'account.settings.basic.geographic': '所在省市', + 'account.settings.basic.geographic-message': '请输入您的所在省市!', + 'account.settings.basic.address': '街道地址', + 'account.settings.basic.address-message': '请输入您的街道地址!', + 'account.settings.basic.phone': '联系电话', + 'account.settings.basic.phone-message': '请输入您的联系电话!', + 'account.settings.basic.update': '更新基本信息', + 'account.settings.basic.update.success': '更新基本信息成功', + 'account.settings.security.strong': '强', + 'account.settings.security.medium': '中', + 'account.settings.security.weak': '弱', + 'account.settings.security.password': '账户密码', + 'account.settings.security.password-description': '当前密码强度:', + 'account.settings.security.phone': '密保手机', + 'account.settings.security.phone-description': '已绑定手机:', + 'account.settings.security.question': '密保问题', + 'account.settings.security.question-description': '未设置密保问题,密保问题可有效保护账户安全', + 'account.settings.security.email': '备用邮箱', + 'account.settings.security.email-description': '已绑定邮箱:', + 'account.settings.security.mfa': 'MFA 设备', + 'account.settings.security.mfa-description': '未绑定 MFA 设备,绑定后,可以进行二次确认', + 'account.settings.security.modify': '修改', + 'account.settings.security.set': '设置', + 'account.settings.security.bind': '绑定', + 'account.settings.binding.taobao': '绑定淘宝', + 'account.settings.binding.taobao-description': '当前未绑定淘宝账号', + 'account.settings.binding.alipay': '绑定支付宝', + 'account.settings.binding.alipay-description': '当前未绑定支付宝账号', + 'account.settings.binding.dingding': '绑定钉钉', + 'account.settings.binding.dingding-description': '当前未绑定钉钉账号', + 'account.settings.binding.bind': '绑定', + 'account.settings.notification.password': '账户密码', + 'account.settings.notification.password-description': '其他用户的消息将以站内信的形式通知', + 'account.settings.notification.messages': '系统消息', + 'account.settings.notification.messages-description': '系统消息将以站内信的形式通知', + 'account.settings.notification.todo': '待办任务', + 'account.settings.notification.todo-description': '待办任务将以站内信的形式通知', + 'account.settings.settings.open': '开', + 'account.settings.settings.close': '关' +} diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/dashboard.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/dashboard.js new file mode 100644 index 00000000..9d408927 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/dashboard.js @@ -0,0 +1,5 @@ +import analysis from './dashboard/analysis' + +export default { + ...analysis + } diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/dashboard/analysis.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/dashboard/analysis.js new file mode 100644 index 00000000..b34f6a6d --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/dashboard/analysis.js @@ -0,0 +1,36 @@ +export default { + 'dashboard.analysis.test': '工专路 {no} 号店', + 'dashboard.analysis.introduce': '指标说明', + 'dashboard.analysis.total-sales': '总销售额', + 'dashboard.analysis.day-sales': '日均销售额¥', + 'dashboard.analysis.visits': '访问量', + 'dashboard.analysis.visits-trend': '访问量趋势', + 'dashboard.analysis.visits-ranking': '门店访问量排名', + 'dashboard.analysis.day-visits': '日访问量', + 'dashboard.analysis.week': '周同比', + 'dashboard.analysis.day': '日同比', + 'dashboard.analysis.payments': '支付笔数', + 'dashboard.analysis.conversion-rate': '转化率', + 'dashboard.analysis.operational-effect': '运营活动效果', + 'dashboard.analysis.sales-trend': '销售趋势', + 'dashboard.analysis.sales-ranking': '门店销售额排名', + 'dashboard.analysis.all-year': '全年', + 'dashboard.analysis.all-month': '本月', + 'dashboard.analysis.all-week': '本周', + 'dashboard.analysis.all-day': '今日', + 'dashboard.analysis.search-users': '搜索用户数', + 'dashboard.analysis.per-capita-search': '人均搜索次数', + 'dashboard.analysis.online-top-search': '线上热门搜索', + 'dashboard.analysis.the-proportion-of-sales': '销售额类别占比', + 'dashboard.analysis.dropdown-option-one': '操作一', + 'dashboard.analysis.dropdown-option-two': '操作二', + 'dashboard.analysis.channel.all': '全部渠道', + 'dashboard.analysis.channel.online': '线上', + 'dashboard.analysis.channel.stores': '门店', + 'dashboard.analysis.sales': '销售额', + 'dashboard.analysis.traffic': '客流量', + 'dashboard.analysis.table.rank': '排名', + 'dashboard.analysis.table.search-keyword': '搜索关键词', + 'dashboard.analysis.table.users': '用户数', + 'dashboard.analysis.table.weekly-range': '周涨幅' +} diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/form.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/form.js new file mode 100644 index 00000000..d004e527 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/form.js @@ -0,0 +1,5 @@ +import basicForm from './form/basicForm' + +export default { + ...basicForm + } diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/form/basicForm.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/form/basicForm.js new file mode 100644 index 00000000..7941075e --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/form/basicForm.js @@ -0,0 +1,58 @@ +export default { + 'form.basic-form.basic.title': '基础表单', + 'form.basic-form.basic.description': + '表单页用于向用户收集或验证信息,基础表单常见于数据项较少的表单场景。', + 'form.basic-form.title.label': '标题', + 'form.basic-form.title.placeholder': '给目标起个名字', + 'form.basic-form.title.required': '请输入标题', + 'form.basic-form.date.label': '起止日期', + 'form.basic-form.placeholder.start': '开始日期', + 'form.basic-form.placeholder.end': '结束日期', + 'form.basic-form.date.required': '请选择起止日期', + 'form.basic-form.goal.label': '目标描述', + 'form.basic-form.goal.placeholder': '请输入你的阶段性工作目标', + 'form.basic-form.goal.required': '请输入目标描述', + 'form.basic-form.standard.label': '衡量标准', + 'form.basic-form.standard.placeholder': '请输入衡量标准', + 'form.basic-form.standard.required': '请输入衡量标准', + 'form.basic-form.client.label': '客户', + 'form.basic-form.client.required': '请描述你服务的客户', + 'form.basic-form.label.tooltip': '目标的服务对象', + 'form.basic-form.client.placeholder': '请描述你服务的客户,内部客户直接 @姓名/工号', + 'form.basic-form.invites.label': '邀评人', + 'form.basic-form.invites.placeholder': '请直接 @姓名/工号,最多可邀请 5 人', + 'form.basic-form.weight.label': '权重', + 'form.basic-form.weight.placeholder': '请输入', + 'form.basic-form.public.label': '目标公开', + 'form.basic-form.label.help': '客户、邀评人默认被分享', + 'form.basic-form.radio.public': '公开', + 'form.basic-form.radio.partially-public': '部分公开', + 'form.basic-form.radio.private': '不公开', + 'form.basic-form.publicUsers.placeholder': '公开给', + 'form.basic-form.option.A': '同事一', + 'form.basic-form.option.B': '同事二', + 'form.basic-form.option.C': '同事三', + 'form.basic-form.email.required': '请输入邮箱地址!', + 'form.basic-form.email.wrong-format': '邮箱地址格式错误!', + 'form.basic-form.userName.required': '请输入用户名!', + 'form.basic-form.password.required': '请输入密码!', + 'form.basic-form.password.twice': '两次输入的密码不匹配!', + 'form.basic-form.strength.msg': '请至少输入 6 个字符。请不要使用容易被猜到的密码。', + 'form.basic-form.strength.strong': '强度:强', + 'form.basic-form.strength.medium': '强度:中', + 'form.basic-form.strength.short': '强度:太短', + 'form.basic-form.confirm-password.required': '请确认密码!', + 'form.basic-form.phone-number.required': '请输入手机号!', + 'form.basic-form.phone-number.wrong-format': '手机号格式错误!', + 'form.basic-form.verification-code.required': '请输入验证码!', + 'form.basic-form.form.get-captcha': '获取验证码', + 'form.basic-form.captcha.second': '秒', + 'form.basic-form.form.optional': '(选填)', + 'form.basic-form.form.submit': '提交', + 'form.basic-form.form.save': '保存', + 'form.basic-form.email.placeholder': '邮箱', + 'form.basic-form.password.placeholder': '至少6位密码,区分大小写', + 'form.basic-form.confirm-password.placeholder': '确认密码', + 'form.basic-form.phone-number.placeholder': '手机号', + 'form.basic-form.verification-code.placeholder': '验证码' +} diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/global.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/global.js new file mode 100644 index 00000000..d4a32d6c --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/global.js @@ -0,0 +1,6 @@ +export default { + submit: '提交', + save: '保存', + 'submit.ok': '提交成功', + 'save.ok': '保存成功' +} diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/index.ts b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/index.ts new file mode 100644 index 00000000..6997b1a2 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/index.ts @@ -0,0 +1,34 @@ +import antd from 'ant-design-vue/es/locale-provider/zh_CN' +import momentCN from 'moment/locale/zh-cn' +import global from './zh-CN/global' + +import menu from './zh-CN/menu' +import setting from './zh-CN/setting' +import user from './zh-CN/user' +import dashboard from './zh-CN/dashboard' +import form from './zh-CN/form' +import result from './zh-CN/result' +import account from './zh-CN/account' + +const components = { + antLocale: antd, + momentName: 'zh-cn', + momentLocale: momentCN +} + +export default { + message: '-', + + 'layouts.usermenu.dialog.title': '信息', + 'layouts.usermenu.dialog.content': '您确定要注销吗?', + 'layouts.userLayout.title': 'Ant Design 是西湖区最具影响力的 Web 设计规范', + ...components, + ...global, + ...menu, + ...setting, + ...user, + ...dashboard, + ...form, + ...result, + ...account +} diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/menu.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/menu.js new file mode 100644 index 00000000..8900c44c --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/menu.js @@ -0,0 +1,39 @@ +export default { + 'menu.welcome': '欢迎', + 'menu.home': '主页', + 'menu.dashboard': '仪表盘', + 'menu.dashboard.analysis': '分析页', + 'menu.dashboard.monitor': '监控页', + 'menu.dashboard.workplace': '工作台', + 'menu.form': '表单页', + 'menu.form.basic-form': '基础表单', + 'menu.form.step-form': '分步表单', + 'menu.form.step-form.info': '分步表单(填写转账信息)', + 'menu.form.step-form.confirm': '分步表单(确认转账信息)', + 'menu.form.step-form.result': '分步表单(完成)', + 'menu.form.advanced-form': '高级表单', + 'menu.list': '列表页', + 'menu.list.table-list': '查询表格', + 'menu.list.basic-list': '标准列表', + 'menu.list.card-list': '卡片列表', + 'menu.list.search-list': '搜索列表', + 'menu.list.search-list.articles': '搜索列表(文章)', + 'menu.list.search-list.projects': '搜索列表(项目)', + 'menu.list.search-list.applications': '搜索列表(应用)', + 'menu.profile': '详情页', + 'menu.profile.basic': '基础详情页', + 'menu.profile.advanced': '高级详情页', + 'menu.result': '结果页', + 'menu.result.success': '成功页', + 'menu.result.fail': '失败页', + 'menu.exception': '异常页', + 'menu.exception.not-permission': '403', + 'menu.exception.not-find': '404', + 'menu.exception.server-error': '500', + 'menu.exception.trigger': '触发错误', + 'menu.account': '个人页', + 'menu.account.center': '个人中心', + 'menu.account.settings': '个人设置', + 'menu.account.trigger': '触发报错', + 'menu.account.logout': '退出登录' +} diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/result.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/result.js new file mode 100644 index 00000000..75d3a4d6 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/result.js @@ -0,0 +1,7 @@ +import success from './result/success' +import fail from './result/fail' + +export default { + ...success, + ...fail + } diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/result/fail.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/result/fail.js new file mode 100644 index 00000000..a9279e10 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/result/fail.js @@ -0,0 +1,10 @@ +export default { + 'result.fail.error.title': '提交失败', + 'result.fail.error.description': '请核对并修改以下信息后,再重新提交。', + 'result.fail.error.hint-title': '您提交的内容有如下错误:', + 'result.fail.error.hint-text1': '您的账户已被冻结', + 'result.fail.error.hint-btn1': '立即解冻', + 'result.fail.error.hint-text2': '您的账户还不具备申请资格', + 'result.fail.error.hint-btn2': '立即升级', + 'result.fail.error.btn-text': '返回修改' +} diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/result/success.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/result/success.js new file mode 100644 index 00000000..bd18f9fb --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/result/success.js @@ -0,0 +1,19 @@ +export default { + 'result.success.title': '提交成功', + 'result.success.description': + '提交结果页用于反馈一系列操作任务的处理结果, 如果仅是简单操作,使用 Message 全局提示反馈即可。 本文字区域可以展示简单的补充说明,如果有类似展示 “单据”的需求,下面这个灰色区域可以呈现比较复杂的内容。', + 'result.success.operate-title': '项目名称', + 'result.success.operate-id': '项目 ID', + 'result.success.principal': '负责人', + 'result.success.operate-time': '生效时间', + 'result.success.step1-title': '创建项目', + 'result.success.step1-operator': '曲丽丽', + 'result.success.step2-title': '部门初审', + 'result.success.step2-operator': '周毛毛', + 'result.success.step2-extra': '催一下', + 'result.success.step3-title': '财务复核', + 'result.success.step4-title': '完成', + 'result.success.btn-return': '返回列表', + 'result.success.btn-project': '查看项目', + 'result.success.btn-print': '打印' +} diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/setting.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/setting.js new file mode 100644 index 00000000..0166d0b2 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/setting.js @@ -0,0 +1,29 @@ +export default { + 'app.setting.pagestyle': '整体风格设置', + 'app.setting.pagestyle.light': '亮色菜单风格', + 'app.setting.pagestyle.dark': '暗色菜单风格', + 'app.setting.pagestyle.realdark': '暗黑模式', + 'app.setting.themecolor': '主题色', + 'app.setting.navigationmode': '导航模式', + 'app.setting.content-width': '内容区域宽度', + 'app.setting.fixedheader': '固定 Header', + 'app.setting.fixedsidebar': '固定侧边栏', + 'app.setting.sidemenu': '侧边菜单布局', + 'app.setting.topmenu': '顶部菜单布局', + 'app.setting.content-width.fixed': 'Fixed', + 'app.setting.content-width.fluid': 'Fluid', + 'app.setting.othersettings': '其他设置', + 'app.setting.weakmode': '色弱模式', + 'app.setting.copy': '拷贝设置', + 'app.setting.loading': '加载主题中', + 'app.setting.copyinfo': '拷贝设置成功 src/config/defaultSettings.js', + 'app.setting.production.hint': '配置栏只在开发环境用于预览,生产环境不会展现,请拷贝后手动修改配置文件', + 'app.setting.themecolor.daybreak': '拂晓蓝', + 'app.setting.themecolor.dust': '薄暮', + 'app.setting.themecolor.volcano': '火山', + 'app.setting.themecolor.sunset': '日暮', + 'app.setting.themecolor.cyan': '明青', + 'app.setting.themecolor.green': '极光绿', + 'app.setting.themecolor.geekblue': '极客蓝', + 'app.setting.themecolor.purple': '酱紫' +} diff --git a/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/user.js b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/user.js new file mode 100644 index 00000000..37731d9e --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/i18n/lang/zh-CN/user.js @@ -0,0 +1,43 @@ +export default { + 'user.login.userName': '用户名', + 'user.login.password': '密码', + 'user.login.username.placeholder': '账户: admin', + 'user.login.password.placeholder': '密码: admin or ant.design', + 'user.login.message-invalid-credentials': '账户或密码错误(admin/ant.design)', + 'user.login.message-invalid-verification-code': '验证码错误', + 'user.login.tab-login-credentials': '账户密码登录', + 'user.login.tab-login-mobile': '手机号登录', + 'user.login.mobile.placeholder': '手机号', + 'user.login.mobile.verification-code.placeholder': '验证码', + 'user.login.remember-me': '自动登录', + 'user.login.forgot-password': '忘记密码', + 'user.login.sign-in-with': '其他登录方式', + 'user.login.signup': '注册账户', + 'user.login.login': '登录', + 'user.register.register': '注册', + 'user.register.email.placeholder': '邮箱', + 'user.register.password.placeholder': '请至少输入 6 个字符。请不要使用容易被猜到的密码。', + 'user.register.password.popover-message': '请至少输入 6 个字符。请不要使用容易被猜到的密码。', + 'user.register.confirm-password.placeholder': '确认密码', + 'user.register.get-verification-code': '获取验证码', + 'user.register.sign-in': '使用已有账户登录', + 'user.register-result.msg': '你的账户:{email} 注册成功', + 'user.register-result.activation-email': + '激活邮件已发送到你的邮箱中,邮件有效期为24小时。请及时登录邮箱,点击邮件中的链接激活帐户。', + 'user.register-result.back-home': '返回首页', + 'user.register-result.view-mailbox': '查看邮箱', + 'user.email.required': '请输入邮箱地址!', + 'user.email.wrong-format': '邮箱地址格式错误!', + 'user.userName.required': '请输入帐户名或邮箱地址', + 'user.password.required': '请输入密码!', + 'user.password.twice.msg': '两次输入的密码不匹配!', + 'user.password.strength.msg': '密码强度不够 ', + 'user.password.strength.strong': '强度:强', + 'user.password.strength.medium': '强度:中', + 'user.password.strength.low': '强度:低', + 'user.password.strength.short': '强度:太短', + 'user.confirm-password.required': '请确认密码!', + 'user.phone-number.required': '请输入正确的手机号', + 'user.phone-number.wrong-format': '手机号格式错误!', + 'user.verification-code.required': '请输入验证码!' +} diff --git a/admin-web/typescript-ant-design-vue/src/layout/components/smart-footer/index.vue b/admin-web/typescript-ant-design-vue/src/layout/components/smart-footer/index.vue new file mode 100644 index 00000000..6fda25b8 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/layout/components/smart-footer/index.vue @@ -0,0 +1,44 @@ + + + + + + diff --git a/admin-web/typescript-ant-design-vue/src/layout/components/smart-header-user-space/header-avatar.vue b/admin-web/typescript-ant-design-vue/src/layout/components/smart-header-user-space/header-avatar.vue new file mode 100644 index 00000000..6a8fd5b4 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/layout/components/smart-header-user-space/header-avatar.vue @@ -0,0 +1,96 @@ + + + + + diff --git a/admin-web/typescript-ant-design-vue/src/layout/components/smart-header-user-space/header-notice.vue b/admin-web/typescript-ant-design-vue/src/layout/components/smart-header-user-space/header-notice.vue new file mode 100644 index 00000000..e2ce02aa --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/layout/components/smart-header-user-space/header-notice.vue @@ -0,0 +1,111 @@ + + + + + diff --git a/admin-web/typescript-ant-design-vue/src/layout/components/smart-header-user-space/i18n-selector.vue b/admin-web/typescript-ant-design-vue/src/layout/components/smart-header-user-space/i18n-selector.vue new file mode 100644 index 00000000..39b9c6ad --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/layout/components/smart-header-user-space/i18n-selector.vue @@ -0,0 +1,39 @@ + + + \ No newline at end of file diff --git a/admin-web/typescript-ant-design-vue/src/layout/components/smart-header-user-space/index.vue b/admin-web/typescript-ant-design-vue/src/layout/components/smart-header-user-space/index.vue new file mode 100644 index 00000000..a8d36b11 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/layout/components/smart-header-user-space/index.vue @@ -0,0 +1,47 @@ + + + + + + diff --git a/admin-web/typescript-ant-design-vue/src/layout/components/smart-header/components/header-avatar.vue b/admin-web/typescript-ant-design-vue/src/layout/components/smart-header/components/header-avatar.vue new file mode 100644 index 00000000..b5ea6878 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/layout/components/smart-header/components/header-avatar.vue @@ -0,0 +1,73 @@ + + + + + + diff --git a/admin-web/typescript-ant-design-vue/src/layout/components/smart-header/components/header-notice.vue b/admin-web/typescript-ant-design-vue/src/layout/components/smart-header/components/header-notice.vue new file mode 100644 index 00000000..e8dd2f6f --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/layout/components/smart-header/components/header-notice.vue @@ -0,0 +1,123 @@ + + + + + diff --git a/admin-web/typescript-ant-design-vue/src/layout/components/smart-header/components/header-search.vue b/admin-web/typescript-ant-design-vue/src/layout/components/smart-header/components/header-search.vue new file mode 100644 index 00000000..650268b8 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/layout/components/smart-header/components/header-search.vue @@ -0,0 +1,91 @@ + + + + + + diff --git a/admin-web/typescript-ant-design-vue/src/layout/components/smart-header/index.less b/admin-web/typescript-ant-design-vue/src/layout/components/smart-header/index.less new file mode 100644 index 00000000..b68320f1 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/layout/components/smart-header/index.less @@ -0,0 +1,92 @@ +.admin-header { + padding: 0; + z-index: 2; + box-shadow: @shadow-down; + position: relative; + background: @base-bg-color; + .head-menu { + height: 64px; + line-height: 64px; + vertical-align: middle; + box-shadow: none; + } + &.dark { + background: @header-bg-color-dark; + color: white; + } + &.night { + .head-menu { + background: @base-bg-color; + } + } + .admin-header-wide { + padding-left: 24px; + &.head.fixed { + max-width: 1400px; + margin: auto; + padding-left: 0; + } + &.side { + padding-right: 12px; + } + .logo { + height: 64px; + line-height: 58px; + vertical-align: top; + display: inline-block; + padding: 0 12px 0 24px; + cursor: pointer; + font-size: 20px; + color: inherit; + &.pc { + padding: 0 12px 0 0; + } + img { + vertical-align: middle; + } + h1 { + color: inherit; + display: inline-block; + font-size: 16px; + } + } + .trigger { + font-size: 20px; + line-height: 64px; + padding: 0 24px; + cursor: pointer; + transition: color 0.3s; + &:hover { + color: @primary-color; + } + } + .admin-header-menu { + display: inline-block; + } + .admin-header-right { + float: right; + display: flex; + color: inherit; + .header-item { + color: inherit; + padding: 0 12px; + cursor: pointer; + align-self: center; + a { + color: inherit; + i { + font-size: 16px; + } + } + } + each(@theme-list, { + &.@{value} .header-item{ + &:hover{ + @class: ~'hover-bg-color-@{value}'; + background-color: @@class; + } + } + }); + } + } +} diff --git a/admin-web/typescript-ant-design-vue/src/layout/components/smart-header/index.vue b/admin-web/typescript-ant-design-vue/src/layout/components/smart-header/index.vue new file mode 100644 index 00000000..c2ac6b07 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/layout/components/smart-header/index.vue @@ -0,0 +1,150 @@ + + + + + diff --git a/admin-web/typescript-ant-design-vue/src/layout/components/smart-page-tag/index.vue b/admin-web/typescript-ant-design-vue/src/layout/components/smart-page-tag/index.vue new file mode 100644 index 00000000..462e9352 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/layout/components/smart-page-tag/index.vue @@ -0,0 +1,236 @@ + + + + + diff --git a/admin-web/typescript-ant-design-vue/src/layout/smart-layout.vue b/admin-web/typescript-ant-design-vue/src/layout/smart-layout.vue new file mode 100644 index 00000000..a10814f2 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/layout/smart-layout.vue @@ -0,0 +1,23 @@ + + + diff --git a/admin-web/typescript-ant-design-vue/src/layout/smart-parent-view.vue b/admin-web/typescript-ant-design-vue/src/layout/smart-parent-view.vue new file mode 100644 index 00000000..7bf61489 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/layout/smart-parent-view.vue @@ -0,0 +1,3 @@ + diff --git a/admin-web/typescript-ant-design-vue/src/layout/smart-side-expand-layout.vue b/admin-web/typescript-ant-design-vue/src/layout/smart-side-expand-layout.vue new file mode 100644 index 00000000..74b8b42a --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/layout/smart-side-expand-layout.vue @@ -0,0 +1,160 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/layout/smart-side-layout.vue b/admin-web/typescript-ant-design-vue/src/layout/smart-side-layout.vue new file mode 100644 index 00000000..44a552d5 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/layout/smart-side-layout.vue @@ -0,0 +1,175 @@ + + + + + diff --git a/admin-web/typescript-ant-design-vue/src/lib/axios.ts b/admin-web/typescript-ant-design-vue/src/lib/axios.ts new file mode 100644 index 00000000..5c318004 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/lib/axios.ts @@ -0,0 +1,116 @@ +import axios, { AxiosRequestConfig } from 'axios'; +import { useUserStore } from '/@/store/modules/system/user'; +import { message } from 'ant-design-vue'; +import { clearAllCoolies } from '/@/utils/cookie-util'; +import { smartSentry } from '/@/lib/smart-sentry'; + +const TOKEN_HEADER: string = 'x-access-token'; + +const smartAxios = axios.create({ + baseURL: import.meta.env.VITE_APP_API_URL, +}); + +// ================================= 请求拦截器 ================================= + +smartAxios.interceptors.request.use( + (config) => { + // 在发送请求之前消息头加入token token + const token = useUserStore().getToken; + if (token) { + config.headers[TOKEN_HEADER] = token; + } else { + delete config.headers[TOKEN_HEADER]; + } + return config; + }, + (error) => { + // 对请求错误做些什么 + return Promise.reject(error); + } +); + +// ================================= 响应拦截器 ================================= + +// 添加响应拦截器 +smartAxios.interceptors.response.use( + (response) => { + // 对响应数据做点什么 + const res = response.data; + if (res.code && res.code !== 1) { + // `token` 过期或者账号已在别处登录 + if (res.code === 1001) { + message.error('您没有登录,请重新登录'); + //TODO 跳转到登录页面 + setTimeout(() => { + clearAllCoolies(); + location.href = '/'; + }); + return Promise.reject(response); + } + message.error(res.msg); + return Promise.reject(response); + } else { + return Promise.resolve(res); + } + }, + (error) => { + // 对响应错误做点什么 + if (error.message.indexOf('timeout') != -1) { + message.error('网络超时'); + } else if (error.message == 'Network Error') { + message.error('网络连接错误'); + } + return Promise.reject(error); + } +); + +// ================================= 对外提供请求方法:通用请求,get, post, 下载download等 ================================= + +/** + * 通用请求封装 + * @param config + */ +export const request = (config: AxiosRequestConfig): Promise => { + return smartAxios.request(config); +}; + +/** + * post请求 + */ +export const postRequest = (url: string, data: any): Promise => { + return request({ data, url, method: 'post' }); +}; + +/** + * get请求 + */ +export const getRequest = (url: string, params?: any): Promise => { + return request({ url, method: 'get', params }); +}; + +/** + * 下载 + */ +export const download = function (fileName: string, url: string, params?: any): void { + request({ + method: 'get', + url: url, + params: params, + responseType: 'blob', + }) + .then((data) => { + if (!data) { + return; + } + let url = window.URL.createObjectURL(new Blob([data])); + let link = document.createElement('a'); + link.style.display = 'none'; + link.href = url; + link.setAttribute('download', fileName); + document.body.appendChild(link); + link.click(); + }) + .catch((error) => { + smartSentry.captureException(error); + }); +}; diff --git a/admin-web/typescript-ant-design-vue/src/lib/smart-sentry.ts b/admin-web/typescript-ant-design-vue/src/lib/smart-sentry.ts new file mode 100644 index 00000000..d9573b2c --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/lib/smart-sentry.ts @@ -0,0 +1,22 @@ +/* + * @Description:报错收集 + * @Author: zhuoda + * @Date: 2021-08-27 + * @LastEditTime: 2021-08-27 + * @LastEditors: zhuoda + */ + +// import * as Sentry from '@sentry/browser'; +export const smartSentry = { + /** + * sentry 主动上报 + * @param {error} error 错误信息 + */ + captureException: (error: any) => { + if (error.config && error.data && error && error.headers && error.request && error.status) { + return; + } + // Sentry.captureException(error); + console.log(error); + }, +}; diff --git a/admin-web/typescript-ant-design-vue/src/lib/smart-wartermark.ts b/admin-web/typescript-ant-design-vue/src/lib/smart-wartermark.ts new file mode 100644 index 00000000..dcbda0e5 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/lib/smart-wartermark.ts @@ -0,0 +1,93 @@ +/* + * @Description:水印 + * @Author: zhuoda + * @Date: 2021-08-28 + * @LastEditTime: 2021-08-31 + * @LastEditors: zhuoda + */ + +import moment from 'moment'; + +/** + * 水印DOM id + */ +const WATER_MARK_DOM_ID = 'smart_admin_water_mark'; +let smartAdminWaterMarkIntervalId: NodeJS.Timer | null = null; + +/** + * + * 因为modal的z-index为1000,所以为了modal的黑色背景隐藏掉,z-index为 999 + * + * @param id + * @param str + * @param watermarkId + * @returns + */ + +function setWatermark(id: string, str: string): void { + //删掉之前的水印 + if (document.getElementById(WATER_MARK_DOM_ID) !== null) { + document.getElementById(WATER_MARK_DOM_ID)?.remove(); + } + + str = str + ' ' + moment().format('YYYY-MM-DD HH:mm'); + + //创建一个画布 + const can = document.createElement('canvas'); + //设置画布的长宽 + can.width = 400; + can.height = 200; + + const cans: any = can.getContext('2d'); + //旋转角度 + cans.rotate((-15 * Math.PI) / 150); + cans.font = '16px Microsoft JhengHei'; + //设置填充绘画的颜色、渐变或者模式 + cans.fillStyle = 'rgba(190, 190, 190, 0.30)'; + //设置文本内容的当前对齐方式 + cans.textAlign = 'left'; + //设置在绘制文本时使用的当前文本基线 + cans.textBaseline = 'Middle'; + //在画布上绘制填色的文本(输出的文本,开始绘制文本的X坐标位置,开始绘制文本的Y坐标位置) + cans.fillText(str, can.width / 8, can.height / 2); + const div = document.createElement('div'); + div.id = WATER_MARK_DOM_ID; + div.style.pointerEvents = 'none'; + div.style.top = '80px'; + div.style.left = '0px'; + div.style.position = 'absolute'; + div.style.zIndex = '999'; + div.style.width = '100%'; + div.style.height = '100%'; + div.style.background = 'url(' + can.toDataURL('image/png') + ') left top repeat'; + document.getElementById(id)?.appendChild(div); +} + +const watermark = { + // 该方法只允许调用一次 + set: function (id: string, str: string): void { + // 如果存在水印,则不允许再调用了 + if (document.getElementById(WATER_MARK_DOM_ID) !== null) { + alert('已经添加过全局水印了,请不要再重复添加!'); + return; + } + + setWatermark(id, str); + smartAdminWaterMarkIntervalId = setInterval(() => { + setWatermark(id, str); + }, 60000); + + window.onresize = () => { + setWatermark(id, str); + }; + }, + // 清空水印 + clear: function () { + document.getElementById(WATER_MARK_DOM_ID)?.remove(); + window.removeEventListener('resize', setWatermark); + if (smartAdminWaterMarkIntervalId) { + clearInterval(smartAdminWaterMarkIntervalId); + } + }, +}; +export default watermark; diff --git a/admin-web/typescript-ant-design-vue/src/main.ts b/admin-web/typescript-ant-design-vue/src/main.ts new file mode 100644 index 00000000..cc0c8ddb --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/main.ts @@ -0,0 +1,34 @@ +/* + * @Description: 主方法 + * @Author: zhuoda + * @Date: 2021-08-03 + * @LastEditTime: 2021-08-27 + * @LastEditors: zhuoda + */ +import { createApp } from 'vue'; +import { router } from '/@/router/index'; +import { store } from '/@/store/index'; +import Antd from 'ant-design-vue'; +import './theme/index.less'; +import constantsInfo from '/@/constants/index'; +import smartEnumPlugin from '/@/plugins/smart-enums-plugin'; +import * as antIcons from '@ant-design/icons-vue'; +import lodash from 'lodash'; +import moment from 'moment'; +import 'moment/dist/locale/zh-cn'; +import App from './App.vue'; + +moment.locale('zh-cn'); + +let vueApp = createApp(App); +let app = vueApp.use(router).use(store).use(Antd).use(smartEnumPlugin, constantsInfo); + +// 注册图标组件 +Object.keys(antIcons).forEach((key) => { + app.component(key, antIcons[key as keyof typeof antIcons]); +}); +//全局 +app.config.globalProperties.$antIcons = antIcons; +app.config.globalProperties.$lodash = lodash; +//挂载 +app.mount('#app'); diff --git a/admin-web/typescript-ant-design-vue/src/plugins/smart-enums-plugin.ts b/admin-web/typescript-ant-design-vue/src/plugins/smart-enums-plugin.ts new file mode 100644 index 00000000..cc8e897e --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/plugins/smart-enums-plugin.ts @@ -0,0 +1,77 @@ +/* + * @Description: + * @Author: zhuoda + * @Date: 2021-08-03 + * @LastEditTime: 2021-08-27 + * @LastEditors: zhuoda + */ +import _ from 'lodash'; +import { App } from 'vue'; +import { FLAG_NUMBER_ENUM } from '../constants/common'; +import { SmartEnum, SmartEnumWrapper, SmartEnumItem, SmartEnumPlugin } from '/@/types/smart-enum'; + +export default { + install: (app: App, smartEnumWrapper: SmartEnumWrapper): void => { + const smartEnumPlugin = {} as SmartEnumPlugin; + /** + * 根据枚举值获取描述 + * @param {*} constantName 枚举名 + * @param {*} value 枚举值 + * @returns + */ + smartEnumPlugin.getDescByValue = function (constantName: string, value: any): string { + if (!smartEnumWrapper || !Object.prototype.hasOwnProperty.call(smartEnumWrapper, constantName)) { + return ''; + } + // boolean类型需要做特殊处理 + if (constantName === 'FLAG_NUMBER_ENUM' && !_.isUndefined(value) && typeof value === 'boolean') { + value = value ? FLAG_NUMBER_ENUM.TRUE.value : FLAG_NUMBER_ENUM.FALSE.value; + } + + let smartEnum: SmartEnum = smartEnumWrapper[constantName]; + for (let item in smartEnum) { + if (smartEnum[item].value === value) { + return smartEnum[item].desc; + } + } + return ''; + }; + /** + * 根据枚举名获取对应的描述键值对[{value:desc}] + * @param {*} constantName 枚举名 + * @returns + */ + smartEnumPlugin.getValueDescList = function (constantName: string): SmartEnumItem[] { + if (!Object.prototype.hasOwnProperty.call(smartEnumWrapper, constantName)) { + return []; + } + const result: SmartEnumItem[] = []; + let targetSmartEnum = smartEnumWrapper[constantName]; + for (let item in targetSmartEnum) { + result.push(targetSmartEnum[item] as any); + } + return result; + }; + + /** + * 根据枚举名获取对应的value描述键值对{value:desc} + * @param {*} constantName 枚举名 + * @returns + */ + smartEnumPlugin.getValueDesc = function (constantName: string): { [key: string]: string } { + if (!Object.prototype.hasOwnProperty.call(smartEnumWrapper, constantName)) { + return {}; + } + let smartEnum = smartEnumWrapper[constantName]; + let result = {} as { [key: string]: string }; + for (let item in smartEnum) { + let key: string = smartEnum[item].value + ''; + result[key] = smartEnum[item].desc; + } + return result; + }; + + app.config.globalProperties.$smartEnumPlugin = smartEnumPlugin; + app.provide('smartEnumPlugin', smartEnumPlugin); + }, +}; diff --git a/admin-web/typescript-ant-design-vue/src/router/index.ts b/admin-web/typescript-ant-design-vue/src/router/index.ts new file mode 100644 index 00000000..84528cf4 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/router/index.ts @@ -0,0 +1,145 @@ +import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'; +import { routerArray } from './routers'; +import nProgress from 'nprogress'; +import 'nprogress/nprogress.css'; +import { clearAllCoolies, getTokenFromCookie } from '/@/utils/cookie-util'; +import { useUserStore } from '/@/store/modules/system/user'; +import { MenuTreeVo } from '/@/api/system/menu/model/menu-tree-vo'; +import _ from 'lodash'; +import SmartLayout from '/@/layout/smart-layout.vue'; +import SmartParentView from '/@/layout/smart-parent-view.vue'; +import { MENU_TYPE_ENUM } from '/@/constants/system/menu/menu-enum'; + +const LOGIN_PAGE_NAME = 'Login'; + +export const router = createRouter({ + history: createWebHashHistory(), + routes: routerArray, + strict: true, + scrollBehavior: () => ({ left: 0, top: 0 }), +}); + +// ----------------------- 路由加载前 ----------------------- +router.beforeEach(async (to, from, next) => { + console.log(from.path); + + nProgress.configure({ showSpinner: false }); + if (to.meta.title) { + nProgress.start(); + } + + // 公共页面,任何时候都可以跳转 + if (to.path === '/login' || to.path === '/403' || to.path === '/404') { + next(); + nProgress.done(); + return; + } + + // 非公共页面,就需要验证token了 + const token = getTokenFromCookie(); + if (!token) { + // 跳转到 登录页面 + clearAllCoolies(); + nProgress.done(); + next({ + name: LOGIN_PAGE_NAME, + }); + return; + } + + + // 设置tagNav + useUserStore().setTagNav(to, from); + + let serverRoutes = router.getRoutes().filter((e) => e.meta.fromServer); + if (!_.isEmpty(serverRoutes)) { + next(); + return; + } + + // 判断是否获取有用户菜单 + let menuTree = useUserStore().getMenuTree || []; + if (!_.isEmpty(menuTree)) { + let routeList = buildRoutes(menuTree, 1, []); + routeList.forEach((e) => { + router.addRoute(e); + }); + } + next({ ...to, replace: true }); +}); + +// ----------------------- 路由加载后 ----------------------- +router.afterEach(() => { + nProgress.done(); +}); + +// ----------------------- 构建router对象 ----------------------- +function buildRoutes(menuList: Array, level: number, parentMenuList: Array>): Array { + const resList: Array = []; + // 获取所有vue组件 + const modules = import.meta.glob('../views/**/**.vue'); + for (let e of menuList) { + if (level == 1) { + parentMenuList = []; + } + // @ts-ignore + let menuIdStr = e.menuId.toString(); + let route: RouteRecordRaw = { + // @ts-ignore + path: e.path.startsWith('/') ? e.path : `/${e.path}`, + // 使用menuId作为name唯一标识 + name: menuIdStr, + meta: { + // 菜单展示 + title: e.menuName, + // 菜单图标展示 + icon: e.icon, + // 是否在菜单隐藏 + hideInMenu: !e.visibleFlag, + // 页面是否keep-alive缓存 + noKeepAlive: e.cacheFlag, + // 菜单类型 由于router.getRoutes()会把所有路由全部返回(目录以及菜单) 需要一个标识过滤出目录类型 + menuType: e.menuType, + // 是否来自服务器 用于在beforeEach中判断router是否已经加载了来自服务器的路由 以此跳过重复addRoute + fromServer: true, + // 上级菜单目录唯一标识集合 用于a-menu展开菜单目录 + parentMenuList: parentMenuList, + }, + component: level == 1 ? SmartLayout : SmartParentView, + }; + if (e.menuType == MENU_TYPE_ENUM.MENU.value) { + let componentPath = e.component && e.component.startsWith('/') ? e.component : '/' + e.component; + let relativePath = `../views${componentPath}`; + // eslint-disable-next-line no-prototype-builtins + if (modules.hasOwnProperty(relativePath)) { + route.component = modules[relativePath]; + } + } + if (!_.isEmpty(e.children)) { + // 递归 + parentMenuList.push({ name: menuIdStr, title: e.menuName }); + route.children = buildRoutes(e.children || [], level + 1, parentMenuList); + } + // 如果当前是一级且是菜单 需要在外面包一层虚拟路由承载SmartLayout + if (level == 1 && e.menuType == MENU_TYPE_ENUM.MENU.value) { + if (!route.meta) { + continue; + } + route.meta.parentMenuList.push({ name: menuIdStr, title: e.menuName }); + let virtualRoute: RouteRecordRaw = { + // @ts-ignore + // path: e.path.startsWith('/') ? e.path : `/${e.path}`, + path: `/virtual-${menuIdStr}`, + // 使用menuId作为name唯一标识 + name: `virtual${menuIdStr}`, + meta: {}, + component: SmartLayout, + children: [route], + }; + resList.push(virtualRoute); + continue; + } + resList.push(route); + } + return resList; +} diff --git a/admin-web/typescript-ant-design-vue/src/router/routers.ts b/admin-web/typescript-ant-design-vue/src/router/routers.ts new file mode 100644 index 00000000..acb64a3c --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/router/routers.ts @@ -0,0 +1,9 @@ +import {loginRouters} from './system/login'; +import {homeRouters} from './system/home'; +import type {RouteRecordRaw} from "vue-router"; + +export const routerArray: RouteRecordRaw[] = [ + ...loginRouters, + ...homeRouters, + +] diff --git a/admin-web/typescript-ant-design-vue/src/router/system/home.ts b/admin-web/typescript-ant-design-vue/src/router/system/home.ts new file mode 100644 index 00000000..430bb942 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/router/system/home.ts @@ -0,0 +1,38 @@ +/* + * @Description: + * @version: + * @Author: zhuoda + * @Date: 2021-08-20 15:06:57 + * @LastEditors: zhuoda + * @LastEditTime: 2021-08-25 21:02:29 + */ +import { RouteRecordRaw } from 'vue-router'; +import SmartLayout from '/@/layout/smart-layout.vue'; +import { MENU_TYPE_ENUM } from '/@/constants/system/menu/menu-enum'; + +export const homeRouters: Array = [ + { + path: '/', + name: '_home', + redirect: '/home', + component: SmartLayout, + meta: { + title: '首页', + menuType: MENU_TYPE_ENUM.CATALOG.value, + icon: 'HomeOutlined', + }, + children: [ + { + path: '/home', + name: 'Home', + meta: { + title: '首页', + menuType: MENU_TYPE_ENUM.MENU.value, + icon: 'HomeOutlined', + parentMenuList: [{ name: '_home', title: '首页' }], + }, + component: () => import('/@/views/system/home/index.vue'), + }, + ], + }, +]; diff --git a/admin-web/typescript-ant-design-vue/src/router/system/login.ts b/admin-web/typescript-ant-design-vue/src/router/system/login.ts new file mode 100644 index 00000000..8993d593 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/router/system/login.ts @@ -0,0 +1,20 @@ +/* + * @Description: + * @Author: zhuoda + * @Date: 2021-08-03 + * @LastEditTime: 2021-08-30 17:51:22 + * @LastEditors: zhuoda + */ +import { RouteRecordRaw } from 'vue-router'; + +export const loginRouters: Array = [ + { + path: '/login', + name: 'Login', + component: () => import('/@/views/system/login/login.vue'), + meta: { + title: '登录', + hideInMenu: true, + }, + }, +]; diff --git a/admin-web/typescript-ant-design-vue/src/shims-vue.d.ts b/admin-web/typescript-ant-design-vue/src/shims-vue.d.ts new file mode 100644 index 00000000..0b350f62 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/shims-vue.d.ts @@ -0,0 +1,27 @@ +/* + * @Description: + * @Author: zhuoda + * @Date: 2021-08-03 + * @LastEditTime: 2021-08-27 + * @LastEditors: zhuoda + */ +import { SmartEnumPlugin } from '/@/types/smart-enum'; +import * as lodash from 'lodash'; + +declare module '*.vue' { + import { Component } from 'vue'; + const component: Component; + export default component; +} + +// 对vue进行类型补充说明 +declare module '@vue/runtime-core' { + interface ComponentCustomProperties { + // 常量插件 + $smartEnumPlugin: SmartEnumPlugin; + // 常量图标 + $antIcons: Object; + // lodash工具类 + $lodash: lodash; + } +} diff --git a/admin-web/typescript-ant-design-vue/src/store/index.ts b/admin-web/typescript-ant-design-vue/src/store/index.ts new file mode 100644 index 00000000..12443cd0 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/store/index.ts @@ -0,0 +1,3 @@ +import { createPinia } from 'pinia'; + +export const store = createPinia(); diff --git a/admin-web/typescript-ant-design-vue/src/store/modules/model/UserTagNav.ts b/admin-web/typescript-ant-design-vue/src/store/modules/model/UserTagNav.ts new file mode 100644 index 00000000..4de99944 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/store/modules/model/UserTagNav.ts @@ -0,0 +1,36 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-09 17:11:01 + * @LastEditTime: 2021-08-19 17:53:36 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/store/modules/model/UserTagNav.ts + */ + +import { LocationQueryRaw } from 'vue-router'; + +/** + * 用户的tag列表 + */ +export interface UserTagNav { + /** + * 菜单名称-ID + */ + menuName: string; + /** + * 菜单标题 + */ + menuTitle: string; + /** + * 菜单请求参数 + */ + menuQuery?: LocationQueryRaw; + /** + * 从哪个菜单过来的 + */ + fromMenuName?: string; + /** + * 从哪个菜单过来的 请求参数 + */ + fromMenuQuery?: LocationQueryRaw; +} diff --git a/admin-web/typescript-ant-design-vue/src/store/modules/system/app-config.ts b/admin-web/typescript-ant-design-vue/src/store/modules/system/app-config.ts new file mode 100644 index 00000000..faa56f9f --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/store/modules/system/app-config.ts @@ -0,0 +1,52 @@ +/* + * @Description: + * @Author: zhuoda + * @Date: 2021-08-03 + * @LastEditTime: 2021-08-27 + * @LastEditors: zhuoda + */ +import { defineStore } from 'pinia'; +import { AppConfig } from '/@/types/config'; +import { appDefaultConfig } from '/@/config/app-config'; + +/** + * app 所有状态 + */ +interface AppConfigState extends AppConfig { + currentScreenWidth: number; // 当前屏幕宽度 + isMobile: boolean; // 是否为手机端模式; 是:true, 不是 false +} + +export const useAppConfigStore = defineStore({ + id: 'appConfig', + state: (): AppConfigState => ({ + //当前屏幕宽度 + currentScreenWidth: document.body.clientWidth, + // 是否为手机端模式,默认不是 + isMobile: false, + // 读取config下的默认配置 + ...appDefaultConfig, + }), + getters: { + /** + * 只有在头部header 固定的时候,才会把标签固定 + * @param state + */ + getPageTagFixedFlag(state): Boolean { + return state.headerFixedFlag; + }, + }, + + actions: { + // 更新当前屏幕宽度 + setCurrentScreenWidth(clientWidth: number): void { + this.currentScreenWidth = clientWidth; + // 如果当前宽度小于设置的手机最大宽度,则为手机css适配模式 + this.isMobile = this.currentScreenWidth < this.mobileMaxWidth; + }, + // 更新语言 + setLanguage(language: string): void { + console.log(language); + }, + }, +}); diff --git a/admin-web/typescript-ant-design-vue/src/store/modules/system/project-config.ts b/admin-web/typescript-ant-design-vue/src/store/modules/system/project-config.ts new file mode 100644 index 00000000..6b7c4d27 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/store/modules/system/project-config.ts @@ -0,0 +1,13 @@ +import {defineStore} from 'pinia'; +import {ProjectConfig} from "/@/types/config"; +import {projectDefaultConfig} from "/@/config/project-config"; + + +export const useProjectConfigStore = defineStore({ + id: 'projectConfig', + state: (): ProjectConfig => ({ + ...projectDefaultConfig + }), + getters: {}, + actions: {}, +}); diff --git a/admin-web/typescript-ant-design-vue/src/store/modules/system/role.ts b/admin-web/typescript-ant-design-vue/src/store/modules/system/role.ts new file mode 100644 index 00000000..54aeef4e --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/store/modules/system/role.ts @@ -0,0 +1,98 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-28 14:28:18 + * @LastEditTime: 2021-08-28 16:37:27 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/store/modules/system/role.ts + */ +import _ from 'lodash'; +import { defineStore } from 'pinia'; +import { MenuSimpleTreeVo } from '/@/api/system/menu/model/menu-simple-tree-vo'; + +export const useRoleStore = defineStore({ + id: 'role', + state: (): { + checkedData: number[]; + treeMap: Map; + } => ({ + checkedData: [], + treeMap: new Map(), + }), + + actions: { + // 初始化权限树选中数据 + initCheckedData(data: number[]) { + this.checkedData = [...new Set(data)]; + }, + // 选中 + addCheckedData(data: number) { + if (this.checkedData.some((e) => e == data)) { + return; + } + this.checkedData.push(data); + }, + // 选中本级以及子级 + addCheckedDataAndChildren(data: MenuSimpleTreeVo) { + let findIndex = this.checkedData.findIndex((val) => val == data.menuId); + if (data.menuId && findIndex == -1) { + this.addCheckedData(data.menuId); + } + if (data.children) { + data.children.forEach((item) => { + this.addCheckedDataAndChildren(item); + }); + } + }, + // 取消选中 + deleteCheckedData(index: number) { + this.checkedData.splice(index, 1); + }, + // 取消选中本级以及子级 + deleteCheckedDataAndChildren(data: MenuSimpleTreeVo) { + let findIndex = this.checkedData.findIndex((val) => val == data.menuId); + if (findIndex != -1) { + this.deleteCheckedData(findIndex); + } + if (data.children) { + data.children.forEach((item) => { + this.deleteCheckedDataAndChildren(item); + }); + } + }, + // 初始化权限树对象 + initTreeMap(tree: MenuSimpleTreeVo[]) { + for (let treeElement of tree) { + if (!treeElement.menuId) { + continue; + } + this.treeMap.set(treeElement.menuId, treeElement); + if (treeElement.children && !_.isEmpty(treeElement.children)) { + this.initTreeMap(treeElement.children); + } + } + }, + // 选中上一级 + selectUpperLevel(module: MenuSimpleTreeVo) { + // 拿到上级key + let parentId = module.parentId; + if (!parentId) { + return; + } + // 从权限树对象 获取该父级对象 + let parentModule = this.treeMap.get(parentId); + if (!parentModule) { + return; + } + // 选中父级 + let parentIndex = this.checkedData.findIndex((e) => parentModule?.menuId === e); + if (parentModule.menuId && parentIndex == -1) { + this.addCheckedData(parentModule.menuId); + } + // 如果上级还有上级 则进行递归 + if (parentModule.parentId) { + this.selectUpperLevel(parentModule); + } + }, + }, +}); diff --git a/admin-web/typescript-ant-design-vue/src/store/modules/system/spin.ts b/admin-web/typescript-ant-design-vue/src/store/modules/system/spin.ts new file mode 100644 index 00000000..a2230608 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/store/modules/system/spin.ts @@ -0,0 +1,17 @@ +import {defineStore} from "pinia"; + +export const useSpinStore = defineStore({ + id: "spin", + state: () => ({ + loading: false + }), + + actions: { + hide(): void { + this.loading = false; + }, + show(): void { + this.loading = true; + } + } +}); diff --git a/admin-web/typescript-ant-design-vue/src/store/modules/system/user.ts b/admin-web/typescript-ant-design-vue/src/store/modules/system/user.ts new file mode 100644 index 00000000..5322efda --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/store/modules/system/user.ts @@ -0,0 +1,160 @@ +import { defineStore } from 'pinia'; +import { UserState } from '/@/types/user'; +import { getTokenFromCookie } from '/@/utils/cookie-util'; +import localKey from '/@/constants/system/local-storage-key'; +import { localSave, localRead } from '/@/utils/local-util'; +import { RouteLocationNormalized, RouteLocationNormalizedLoaded, Router } from 'vue-router'; +import { UserTagNav } from '/@/store/modules/model/UserTagNav'; +import _ from 'lodash'; +import { appDefaultConfig } from '/@/config/app-config'; +import { MenuTreeVo } from '/@/api/system/menu/model/menu-tree-vo'; +import { EmployeeLoginVo } from '/@/api/system/login/model/employee-login-vo'; +import { localClear } from "/@/utils/local-util"; + +export const useUserStore = defineStore({ + id: 'userStore', + state: (): UserState => ({ + token: '', + pointsList: [], + menuTree: [], + tagNav: [], + userInfo: {}, + }), + getters: { + getToken(state: UserState): string | undefined { + if (state.token) { + return state.token; + } + return getTokenFromCookie(); + }, + getUserInfo(state: UserState): EmployeeLoginVo { + if (_.isEmpty(state.userInfo)) { + let localUserInfo = localRead(localKey.USER_INFO) || ''; + state.userInfo = localUserInfo ? JSON.parse(localUserInfo) : {}; + } + return state.userInfo; + }, + getMenuTree(state: UserState): Array | undefined { + if (_.isEmpty(state.menuTree)) { + let localUserMenu = localRead(localKey.USER_MENU) || ''; + state.menuTree = localUserMenu ? JSON.parse(localUserMenu) : []; + } + return state.menuTree; + }, + getPointList(state: UserState): Array | undefined { + if (_.isEmpty(state.pointsList)) { + let localUserPoints = localRead(localKey.USER_POINTS) || ''; + state.pointsList = localUserPoints ? JSON.parse(localUserPoints) : []; + } + return state.pointsList; + }, + getTagNav(state: UserState): Array | undefined { + if (_.isEmpty(state.tagNav)) { + let localTagNav = localRead(localKey.USER_TAG_NAV) || ''; + state.tagNav = localTagNav ? JSON.parse(localTagNav) : []; + } + let tagNavList = _.cloneDeep(state.tagNav) || []; + tagNavList.unshift({ + menuName: appDefaultConfig.homePageName, + menuTitle: '首页', + }); + return tagNavList; + }, + }, + + actions: { + logout(){ + this.token = ''; + this.pointsList = []; + this.menuTree = []; + this.tagNav = []; + this.userInfo = {}; + localClear(); + }, + setUserSession(data: EmployeeLoginVo): void { + this.token = data.token; + this.pointsList = data.pointsList; + this.menuTree = data.menuTree; + this.userInfo = data; + this.setUserMenu(data); + localSave(localKey.USER_INFO, JSON.stringify(data)); + }, + setUserMenu(data: EmployeeLoginVo): void { + this.pointsList = []; + this.menuTree = []; + localSave(localKey.USER_MENU, JSON.stringify(data.menuTree)); + localSave(localKey.USER_POINTS, JSON.stringify(data.pointsList)); + }, + setToken(token: string): void { + this.token = token; + }, + setTagNav(route: RouteLocationNormalized, from: RouteLocationNormalized) { + if (_.isEmpty(this.getTagNav)) this.tagNav = []; + // name唯一标识 + let name = route.name; + if (!name || name == appDefaultConfig.homePageName) { + return; + } + let findTag = (this.tagNav || []).find((e) => e.menuName == name); + if (findTag) { + // @ts-ignore + findTag.fromMenuName = from.name; + findTag.fromMenuQuery = from.query; + } else { + // @ts-ignore + this.tagNav.push({ + // @ts-ignore + menuName: name, + // @ts-ignore + menuTitle: route.meta.title, + menuQuery: route.query, + // @ts-ignore + fromMenuName: from.name, + fromMenuQuery: from.query, + }); + } + localSave(localKey.USER_TAG_NAV, JSON.stringify(this.tagNav)); + }, + closeTagNav(menuName: string | null, closeAll: boolean) { + if (_.isEmpty(this.getTagNav)) return; + if (closeAll && !menuName) { + this.tagNav = []; + } else { + let findIndex = (this.tagNav || []).findIndex((e) => e.menuName == menuName); + if (closeAll) { + if (findIndex == -1) { + this.tagNav = []; + } else { + let tagNavElement = (this.tagNav || [])[findIndex]; + this.tagNav = [tagNavElement]; + } + } else { + (this.tagNav || []).splice(findIndex, 1); + } + } + localSave(localKey.USER_TAG_NAV, JSON.stringify(this.tagNav)); + }, + closePage(route: RouteLocationNormalizedLoaded, router: Router, path?: string) { + if (!this.getTagNav || _.isEmpty(this.getTagNav)) return; + if (path) { + router.push({ path }); + } else { + // 寻找tagNav + let index = this.getTagNav.findIndex((e) => e.menuName == route.name); + if (index == -1) { + router.push({ name: appDefaultConfig.homePageName }); + } else { + let tagNav = this.getTagNav[index]; + if (tagNav.fromMenuName && this.getTagNav.some((e) => e.menuName == tagNav.fromMenuName)) { + router.push({ name: tagNav.fromMenuName, query: tagNav.fromMenuQuery }); + } else { + // 查询左侧tag + let leftTagNav = this.getTagNav[index - 1]; + router.push({ name: leftTagNav.menuName, query: leftTagNav.menuQuery }); + } + } + } + this.closeTagNav(route.name, false); + }, + }, +}); diff --git a/admin-web/typescript-ant-design-vue/src/theme/index.less b/admin-web/typescript-ant-design-vue/src/theme/index.less new file mode 100644 index 00000000..490510ec --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/theme/index.less @@ -0,0 +1,87 @@ +@import '~ant-design-vue/dist/antd.less'; +@import './smart-admin.less'; + +@gray-1: #ffffff; +@gray-2: #fafafa; +@gray-3: #f5f5f5; +@gray-4: #f0f0f0; +@gray-5: #d9d9d9; +@gray-6: #bfbfbf; +@gray-7: #8c8c8c; +@gray-8: #595959; +@gray-9: #434343; +@gray-10: #262626; +@gray-11: #1f1f1f; +@gray-12: #141414; +@gray-13: #000000; + +@title-color: @heading-color; + +@layout-bg-color: @layout-body-background; +@base-bg-color: @body-background; +@hover-bg-color: rgba(0, 0, 0, 0.025); +@border-color: @border-color-split; + +@hover-bg-color-light: @hover-bg-color; +@hover-bg-color-dark: @primary-7; +@hover-bg-color-night: rgba(255, 255, 255, 0.025); +@header-bg-color-dark: @layout-header-background; + +@header-light-bg-hover-color: #f6f6f6; +@header-height: 80px; +@header-user-height: 40px; +@page-tag-height: 40px; + +@shadow-down: @shadow-1-down; +@shadow-up: @shadow-1-up; +@shadow-left: @shadow-1-left; +@shadow-right: @shadow-1-right; + +@theme-list: light, dark, night; + +/********************************** 基础样式 **********************************/ +* { + margin: 0; + padding: 0; + box-sizing: border-box; + outline: none !important; +} + +html, +body { + margin: 0; + padding: 0; + width: 100%; + height: 100%; + -webkit-font-smoothing: antialiased; + -webkit-tap-highlight-color: transparent; + background-color: #f8f8f8; + font-size: 14px; + position: relative; +} + +#app { + width: 100%; + height: 100%; +} + +/********************************** ant design table **********************************/ +.ant-table-tbody :deep(.smart-table-striped) { + background-color: #fafafa; +} + +/********************************** ant design form **********************************/ +.ant-form-inline .ant-form-item-with-help { + margin-bottom: 0px !important; +} + +/********************************** ant design spin **********************************/ +.ant-spin-nested-loading { + width: 100%; + height: 100%; +} + +.ant-spin-container { + width: 100%; + height: 100%; +} diff --git a/admin-web/typescript-ant-design-vue/src/theme/smart-admin.less b/admin-web/typescript-ant-design-vue/src/theme/smart-admin.less new file mode 100644 index 00000000..10ac0af9 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/theme/smart-admin.less @@ -0,0 +1,84 @@ +/********************************** 滚动条 **********************************/ +.smart-scroll { + scrollbar-color: @primary-color @primary-2; + scrollbar-width: thin; + -ms-overflow-style: none; + position: relative; + &::-webkit-scrollbar { + width: 3px; + height: 1px; + } + &::-webkit-scrollbar-thumb { + border-radius: 3px; + background: @primary-color; + } + &::-webkit-scrollbar-track { + border-radius: 3px; + background: @primary-3; + } +} +/********************************** 宽度 **********************************/ +.smart-width-100 { + width: 100%; +} + +/********************************** 左间距 **********************************/ +.smart-margin-left5 { + margin-left: 5px; +} + +.smart-margin-left10 { + margin-left: 10px; +} + +.smart-margin-left15 { + margin-left: 15px; +} + +.smart-margin-left20 { + margin-left: 20px; +} + +/******************************** 上间距 ********************************/ +.smart-margin-top5 { + margin-top: 5px; +} + +.smart-margin-top10 { + margin-top: 10px; +} + +/******************************** 查询表格样式 ********************************/ +.smart-query-form { + background-color: #ffffff; + padding: 5px 10px; + margin-bottom: 10px; +} + +.smart-query-form-row:not(:first-child) { + margin-top: 8px; +} + +.smart-query-form-row .smart-query-form-item { + margin-right: 8px; + margin-top: 5px; + margin-bottom: 5px; +} + +.smart-query-table-page { + margin-top: 10px; + display: flex; + justify-content: flex-end; +} + +.smart-table-btn-block { + margin-bottom: 15px; + display: flex; + flex-direction: row; + justify-content: space-between; + .smart-table-operate-block { + .ant-btn { + margin-right: 12px; + } + } +} diff --git a/admin-web/typescript-ant-design-vue/src/types/config.d.ts b/admin-web/typescript-ant-design-vue/src/types/config.d.ts new file mode 100644 index 00000000..29331054 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/types/config.d.ts @@ -0,0 +1,65 @@ +/* + * @Description: + * @Author: zhuoda + * @Date: 2021-08-03 + * @LastEditTime: 2021-09-01 + * @LastEditors: zhuoda + */ +/** + * 语言 i18n + */ +export type LanguageType = 'zh_CN' | 'en' | 'ru' | 'ja' | 'ko'; + +/** + * 四种布局: 左侧、左侧展开、顶部、混合 + */ +export type LayoutType = 'side' | 'side-expand' | 'top' | 'mix'; + +/** + * 主题: 亮色,暗色,夜色 + */ +export type ThemeType = 'light' | 'dark'; + +/** + * 项目信息配置 + */ +export interface ProjectConfig { + // 项目名称, eg : SmartAdmin + projectName: String; + // 版权信息 'Copyright © 2015-2021 1024lab.net 1024创新实验室版权所有' + copyright: String; + // 点击版权的跳转 'http://1024lab.net' + copyrightUrl: String; + // 版本: 2.0.0 + version: String; + // build时间戳 + buildTime: String; +} + +/** + * 应用信息配置 + */ +export interface AppConfig { + // i18n 语言选择 + languageType: LanguageType; + // 布局 + layout: string; + // 主题 + theme: ThemeType; + // 手机模式最大宽度 768px,如果少于768px,则手机自适应 + mobileMaxWidth: number; + // 侧边菜单宽度 , 默认为256px + sideMenuWidth: number; + // 标签页 + multiPageTagFlag: boolean; + // 标签页缓存, keep-alive, true 开启缓存; false 不开启 + multiPageTagKeepAliveFlag: boolean; + // 固定头部状态栏,true:固定,false:不固定 + headerFixedFlag: boolean; + // 固定侧边栏,true:固定,false:不固定 + sideBarFixedFlag: boolean; + // 隐藏设置,true:隐藏,false:不隐藏 + hideSettingFlag: false; + // 首页页面Name + homePageName: string; +} diff --git a/admin-web/typescript-ant-design-vue/src/types/env.d.ts b/admin-web/typescript-ant-design-vue/src/types/env.d.ts new file mode 100644 index 00000000..665ab3fe --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/types/env.d.ts @@ -0,0 +1,18 @@ +/* + * @Description: + * @Author: zhuoda + * @Date: 2021-08-03 + * @LastEditTime: 2021-08-26 + * @LastEditors: zhuoda + */ +/** + * 不同环境下的配置信息 + */ +interface ImportMetaEnv { + // 后端接口地址 + VITE_APP_API_URL: string; + // 项目标题 + VITE_APP_PROJECT_TITLE: string; + // 项目环境:dev, sit, pre, prod + VITE_APP_PROFILE: string; +} diff --git a/admin-web/typescript-ant-design-vue/src/types/smart-enum.d.ts b/admin-web/typescript-ant-design-vue/src/types/smart-enum.d.ts new file mode 100644 index 00000000..963b68c8 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/types/smart-enum.d.ts @@ -0,0 +1,28 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-18 16:58:28 + * @LastEditTime: 2021-08-26 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/types/base.d.ts + */ +export interface SmartEnumWrapper { + [key: string]: SmartEnum; +} + +export interface SmartEnum { + [key: string]: SmartEnumItem; +} + +interface SmartEnumItem { + value: T; + desc: string; +} + +interface SmartEnumPlugin { + getDescByValue(constantName: string, value: string | number | undefined): string; + + getValueDescList(constantName: string): SmartEnumItem[]; + + getValueDesc(constantName: string): { [key: string]: string }; +} diff --git a/admin-web/typescript-ant-design-vue/src/types/user.d.ts b/admin-web/typescript-ant-design-vue/src/types/user.d.ts new file mode 100644 index 00000000..26425784 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/types/user.d.ts @@ -0,0 +1,44 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-03 10:27:11 + * @LastEditTime: 2021-08-18 20:14:20 + * @LastEditors: zhuoda + * @Description: + * @FilePath: /smart-admin/src/types/user.d.ts + */ +import { MenuTreeVo } from '@/api/system/login/login-model.ts'; +import { UserTagNav } from '/@/store/modules/model/UserTagNav'; +import { EmployeeLoginVo } from '/@/api/system/login/model/employee-login-vo'; + +export interface UserState { + /** + * @description: token + * @param {*} + * @return {*} + */ + token?: string; + /** + * @description: 用户信息 + * @param {*} + * @return {*} + */ + userInfo: EmployeeLoginVo; + /** + * @description: 功能点权限列表 + * @param {*} + * @return {*} + */ + pointsList?: Array; + /** + * @description: 菜单树 + * @param {*} + * @return {*} + */ + menuTree?: Array; + /** + * @description: tag列表 + * @param {*} + * @return {*} + */ + tagNav?: Array; +} diff --git a/admin-web/typescript-ant-design-vue/src/utils/cookie-util.ts b/admin-web/typescript-ant-design-vue/src/utils/cookie-util.ts new file mode 100644 index 00000000..828d7ef4 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/utils/cookie-util.ts @@ -0,0 +1,27 @@ +/* + * @Description + * @Author: zhuoda + * @Date: 2021-08-03 + * @LastEditTime: 2021-08-27 + * @LastEditors: zhuoda + */ +import Cookies from 'js-cookie'; + +export const COOKIE_TOKEN_KEY = 'user_token'; + +export const clearAllCoolies = (): void => { + Cookies.remove(COOKIE_TOKEN_KEY); +}; + +export const getTokenFromCookie = (): string | undefined => { + return Cookies.get(COOKIE_TOKEN_KEY); +}; + +/** + * 7 天后cookie过期 + * + * @param token + */ +export const saveTokenToCookie = (token: string): void => { + Cookies.set(COOKIE_TOKEN_KEY, token, { expires: 7 }); +}; diff --git a/admin-web/typescript-ant-design-vue/src/utils/local-util.ts b/admin-web/typescript-ant-design-vue/src/utils/local-util.ts new file mode 100644 index 00000000..28ef30f5 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/utils/local-util.ts @@ -0,0 +1,16 @@ +/** + * localStorage存取 + * @param key + * @param value + */ +export const localSave = (key: string, value: string) => { + localStorage.setItem(key, value); +}; + +export const localRead = (key: string): string | null => { + return localStorage.getItem(key) || ''; +}; + +export const localClear = (): void => { + localStorage.clear(); +}; diff --git a/admin-web/typescript-ant-design-vue/src/views/business/goods/components/goods-operate-modal.vue b/admin-web/typescript-ant-design-vue/src/views/business/goods/components/goods-operate-modal.vue new file mode 100644 index 00000000..42f5dd0f --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/business/goods/components/goods-operate-modal.vue @@ -0,0 +1,167 @@ + + diff --git a/admin-web/typescript-ant-design-vue/src/views/business/goods/goods-list.vue b/admin-web/typescript-ant-design-vue/src/views/business/goods/goods-list.vue new file mode 100644 index 00000000..e2d4bf4d --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/business/goods/goods-list.vue @@ -0,0 +1,243 @@ + + diff --git a/admin-web/typescript-ant-design-vue/src/views/business/setting/components/category-operate-modal.vue b/admin-web/typescript-ant-design-vue/src/views/business/setting/components/category-operate-modal.vue new file mode 100644 index 00000000..07047761 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/business/setting/components/category-operate-modal.vue @@ -0,0 +1,116 @@ + + + diff --git a/admin-web/typescript-ant-design-vue/src/views/business/setting/components/category-tree-table.vue b/admin-web/typescript-ant-design-vue/src/views/business/setting/components/category-tree-table.vue new file mode 100644 index 00000000..c2b26c84 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/business/setting/components/category-tree-table.vue @@ -0,0 +1,156 @@ + + diff --git a/admin-web/typescript-ant-design-vue/src/views/business/setting/demo-setting.vue b/admin-web/typescript-ant-design-vue/src/views/business/setting/demo-setting.vue new file mode 100644 index 00000000..88b28afd --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/business/setting/demo-setting.vue @@ -0,0 +1,11 @@ + + diff --git a/admin-web/typescript-ant-design-vue/src/views/business/setting/goods-setting.vue b/admin-web/typescript-ant-design-vue/src/views/business/setting/goods-setting.vue new file mode 100644 index 00000000..944a1b2f --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/business/setting/goods-setting.vue @@ -0,0 +1,11 @@ + + diff --git a/admin-web/typescript-ant-design-vue/src/views/system/employee/department/components/child-department-list/index.vue b/admin-web/typescript-ant-design-vue/src/views/system/employee/department/components/child-department-list/index.vue new file mode 100644 index 00000000..85d4c637 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/employee/department/components/child-department-list/index.vue @@ -0,0 +1,59 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/views/system/employee/department/components/department-tree/index.vue b/admin-web/typescript-ant-design-vue/src/views/system/employee/department/components/department-tree/index.vue new file mode 100644 index 00000000..0d156bdd --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/employee/department/components/department-tree/index.vue @@ -0,0 +1,268 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/views/system/employee/department/components/employee-list/index.vue b/admin-web/typescript-ant-design-vue/src/views/system/employee/department/components/employee-list/index.vue new file mode 100644 index 00000000..3b01b79b --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/employee/department/components/employee-list/index.vue @@ -0,0 +1,308 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/views/system/employee/department/components/operate-department-modal/index.vue b/admin-web/typescript-ant-design-vue/src/views/system/employee/department/components/operate-department-modal/index.vue new file mode 100644 index 00000000..d6464109 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/employee/department/components/operate-department-modal/index.vue @@ -0,0 +1,146 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/views/system/employee/department/components/operate-employee-modal/index.vue b/admin-web/typescript-ant-design-vue/src/views/system/employee/department/components/operate-employee-modal/index.vue new file mode 100644 index 00000000..1db0126a --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/employee/department/components/operate-employee-modal/index.vue @@ -0,0 +1,227 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/views/system/employee/department/components/update-employee-department-modal/index.vue b/admin-web/typescript-ant-design-vue/src/views/system/employee/department/components/update-employee-department-modal/index.vue new file mode 100644 index 00000000..39df21c7 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/employee/department/components/update-employee-department-modal/index.vue @@ -0,0 +1,96 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/views/system/employee/department/department-mitt.ts b/admin-web/typescript-ant-design-vue/src/views/system/employee/department/department-mitt.ts new file mode 100644 index 00000000..5c5a8493 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/employee/department/department-mitt.ts @@ -0,0 +1,13 @@ +/* + * @Author: zhuoda + * @Date: 2021-08-13 17:55:09 + * @LastEditTime: 2021-08-13 18:01:32 + * @LastEditors: zhuoda + * @Description: eventBus + * @FilePath: /smart-admin/src/views/system/employee/department/department-mitt.ts + */ +import mitt from "mitt" +type Events = { + selectTree: number; + }; +export default mitt(); diff --git a/admin-web/typescript-ant-design-vue/src/views/system/employee/department/index.vue b/admin-web/typescript-ant-design-vue/src/views/system/employee/department/index.vue new file mode 100644 index 00000000..8fae29b7 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/employee/department/index.vue @@ -0,0 +1,73 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/operate-role-modal/index.vue b/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/operate-role-modal/index.vue new file mode 100644 index 00000000..918fe68b --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/operate-role-modal/index.vue @@ -0,0 +1,119 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-data-scope/index.vue b/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-data-scope/index.vue new file mode 100644 index 00000000..5f906e81 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-data-scope/index.vue @@ -0,0 +1,150 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-employee-list/index.vue b/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-employee-list/index.vue new file mode 100644 index 00000000..52742173 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-employee-list/index.vue @@ -0,0 +1,226 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-list/index.vue b/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-list/index.vue new file mode 100644 index 00000000..cde488d2 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-list/index.vue @@ -0,0 +1,108 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-setting/index.vue b/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-setting/index.vue new file mode 100644 index 00000000..44f5aa7e --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-setting/index.vue @@ -0,0 +1,50 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-tree/index.less b/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-tree/index.less new file mode 100644 index 00000000..1dbad70d --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-tree/index.less @@ -0,0 +1,78 @@ +:deep(.ant-checkbox-group) { + width: 100%; +} +.tree-header { + display: flex; + align-items: center; + justify-content: space-between; + margin: 20px 0; +} +.col-desc { + margin: 20px 0; + font-size: 15px; + color: #95a5a6; + padding: 0 20px; +} +.button-style { + margin: 20px 0 20px 0; + padding-left: 20px; + text-align: right; +} +.check-right { + margin-right: 20px; +} +.row-border { + border: 1px solid #f0f0f0; +} +.col-border { + line-height: 50px; + padding-left: 20px; + border-right: 1px solid #f0f0f0; +} +.col-left { + line-height: 50px; + padding-left: 40px; + border-right: 1px solid #f0f0f0; +} +.col-right { + padding-left: 20px; + border-right: 1px solid #f0f0f0; +} +.checked-box { + padding: 0 15px; + :deep(ul li::marker) { + content: ''; + } + :deep(ul) { + padding: 0; + margin: 0; + + li { + list-style: none; + padding: 0; + margin: 10px 0; + + .menu { + border-bottom: 1px solid rgb(240, 240, 240); + display: flex; + align-items: center; + line-height: 40px; + } + + .point { + display: flex; + align-items: center; + + .point-label { + flex: 1; + padding-left: 40px; + border-left: 1px rgb(240, 240, 240) solid; + } + } + + .checked-box-label { + min-width: 150px; + } + } + } +} diff --git a/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-tree/index.vue b/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-tree/index.vue new file mode 100644 index 00000000..256d7310 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-tree/index.vue @@ -0,0 +1,79 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-tree/role-tree-checkbox.vue b/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-tree/role-tree-checkbox.vue new file mode 100644 index 00000000..149ab80d --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-tree/role-tree-checkbox.vue @@ -0,0 +1,54 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-tree/role-tree-menu.vue b/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-tree/role-tree-menu.vue new file mode 100644 index 00000000..c533ea7b --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-tree/role-tree-menu.vue @@ -0,0 +1,71 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-tree/role-tree-point.vue b/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-tree/role-tree-point.vue new file mode 100644 index 00000000..8314cbcf --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/employee/role/components/role-tree/role-tree-point.vue @@ -0,0 +1,43 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/views/system/employee/role/index.vue b/admin-web/typescript-ant-design-vue/src/views/system/employee/role/index.vue new file mode 100644 index 00000000..e9e9235e --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/employee/role/index.vue @@ -0,0 +1,53 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/views/system/home/components/gauge.vue b/admin-web/typescript-ant-design-vue/src/views/system/home/components/gauge.vue new file mode 100644 index 00000000..58aa84da --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/home/components/gauge.vue @@ -0,0 +1,117 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/views/system/home/index.less b/admin-web/typescript-ant-design-vue/src/views/system/home/index.less new file mode 100644 index 00000000..a4ff1b59 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/home/index.less @@ -0,0 +1,68 @@ +:deep(.ant-col) { + margin-bottom: 24px; +} +.no-footer { + :deep(.ant-card-body) { + padding-bottom: 0; + } +} +.content { + height: 150px; + + &.large { + height: 360px; + } + + &.statistice { + display: flex; + flex-direction: column; + justify-content: space-between; + } + &.app { + display: flex; + align-items: center; + padding-bottom: 24px; + .app-qr { + display: flex; + align-items: center; + flex-direction: column; + margin-right: 40px; + > img { + height: 120px; + } + > span { + font-size: 14px; + } + } + } + + &.gauge { + display: flex; + align-items: center; + } + + &.wait-handle { + padding-bottom: 24px; + overflow-y: auto; + >p { + font-size: 18px; + } + :deep(.ant-tag){ + padding: 1px 8px; + font-size: 15px; + } + } + + .count { + font-size: 30px; + font-weight: 700; + margin-bottom: 10px; + } +} +.footer { + width: 100%; + border-top: 1px solid #e9e9e9; + padding: 10px 0; + background: #fff; + z-index: 1; +} diff --git a/admin-web/typescript-ant-design-vue/src/views/system/home/index.vue b/admin-web/typescript-ant-design-vue/src/views/system/home/index.vue new file mode 100644 index 00000000..50114d06 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/home/index.vue @@ -0,0 +1,258 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/views/system/login/login.less b/admin-web/typescript-ant-design-vue/src/views/system/login/login.less new file mode 100644 index 00000000..f071d84e --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/login/login.less @@ -0,0 +1,152 @@ +.login-container { + width: 100%; + height: 100%; + background: url(/images/login-bg.png) no-repeat center; + background-size: cover; + + .logo-box { + margin: auto; + width: 60%; + .logo { + width: 180px; + height: 40px; + align-self: start; + margin-top: 54px; + } + } + + .login-box { + display: flex; + align-items: center; + justify-content: space-between; + margin: auto; + width: 60%; + height: calc(100% - 94px); + } + + .box-item { + &.login { + background: #ffffff; + border-radius: 6px; + padding: 60px 42px; + position: relative; + width: 434px; + height: 540px; + box-shadow: 0px 8px 16px 2px rgba(15, 65, 249, 0.04); + } + .login-qr { + position: absolute; + top: 0; + right: 0; + width: 66px; + height: 66px; + } + .welcome { + margin-top: 44px; + font-size: 42px; + font-weight: bold; + color: #ffffff; + p { + margin-bottom: 0; + } + .desc { + font-size: 14px; + font-weight: 500; + margin: 5px 0 0; + } + } + .login-person { + .img-box { + width: 312px; + height: 312px; + text-align: center; + line-height: 312px; + > img { + width: 290px; + height: 257px; + opacity: 1; + } + } + + .qr-desc { + margin-top: 3px; + font-size: 14px; + text-align: center; + color: #ffffff; + opacity: 0.3; + } + } + .login-title { + font-size: 30px; + font-weight: 700; + text-align: center; + color: #1e1e1e; + } + .login-form { + margin-top: 37px; + } + .ant-input, + .ant-input-affix-wrapper { + height: 44px; + border: 1px solid #ededed; + border-radius: 4px; + } + + .eye-box { + position: absolute; + right: 15px; + top: 10px; + .eye-icon { + width: 20px; + height: 20px; + cursor: pointer; + } + } + .btn { + width: 350px; + height: 50px; + background: #1890ff; + border-radius: 4px; + font-size: 16px; + font-weight: 700; + text-align: center; + color: #ffffff; + line-height: 50px; + cursor: pointer; + } + } + + .more { + margin-top: 50px; + .title-box { + display: flex; + align-items: center; + justify-content: center; + > p { + margin-bottom: 0; + } + } + .line { + width: 114px; + height: 1px; + background: #e6e6e6; + } + .title { + font-size: 14px; + font-weight: 500; + color: #a1aebe; + margin: 0 19px; + } + .login-type { + padding: 0 50px; + margin-top: 25px; + display: flex; + align-items: center; + justify-content: space-between; + > img { + width: 22px; + height: 22px; + } + } + } +} diff --git a/admin-web/typescript-ant-design-vue/src/views/system/login/login.vue b/admin-web/typescript-ant-design-vue/src/views/system/login/login.vue new file mode 100644 index 00000000..f2730970 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/login/login.vue @@ -0,0 +1,128 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/views/system/menu/components/menu-operate-modal.vue b/admin-web/typescript-ant-design-vue/src/views/system/menu/components/menu-operate-modal.vue new file mode 100644 index 00000000..f24fe39d --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/menu/components/menu-operate-modal.vue @@ -0,0 +1,280 @@ + + + + diff --git a/admin-web/typescript-ant-design-vue/src/views/system/menu/components/menu-tree-select.vue b/admin-web/typescript-ant-design-vue/src/views/system/menu/components/menu-tree-select.vue new file mode 100644 index 00000000..25b56d75 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/menu/components/menu-tree-select.vue @@ -0,0 +1,73 @@ + + + diff --git a/admin-web/typescript-ant-design-vue/src/views/system/menu/menu-list-table-columns.ts b/admin-web/typescript-ant-design-vue/src/views/system/menu/menu-list-table-columns.ts new file mode 100644 index 00000000..ee35fa04 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/menu/menu-list-table-columns.ts @@ -0,0 +1,72 @@ +/* + * @Description:表格列 + * @Author: zhuoda + * @Date: 2021-08-26 + * @LastEditTime: 2021-09-01 20:59:53 + * @LastEditors: zhuoda + */ + +import { reactive } from 'vue'; +export const columns = reactive([ + { + title: '名称', + dataIndex: 'menuName', + key: 'ID', + }, + { + title: '类型', + dataIndex: 'menuType', + slots: { customRender: 'type' }, + }, + { + title: '图标', + dataIndex: 'icon', + slots: { customRender: 'icon' }, + width: 50, + }, + { + title: '组件', + dataIndex: 'component', + ellipsis: true, + }, + { + title: '路由', + dataIndex: 'path', + ellipsis: true, + }, + { + title: '权限', + dataIndex: 'perms', + ellipsis: true, + }, + { + title: '外链', + dataIndex: 'frameFlag', + slots: { customRender: 'frameFlag' }, + }, + { + title: '缓存', + dataIndex: 'cacheFlag', + slots: { customRender: 'cacheFlag' }, + }, + { + title: '禁用', + dataIndex: 'disabledFlag', + slots: { customRender: 'disabledFlag' }, + }, + { + title: '顺序', + dataIndex: 'sort', + }, + { + title: '创建时间', + dataIndex: 'createTime', + width: 150, + }, + { + title: '操作', + dataIndex: 'menuId', + slots: { customRender: 'operate' }, + width: 150, + }, +]); diff --git a/admin-web/typescript-ant-design-vue/src/views/system/menu/menu-list.vue b/admin-web/typescript-ant-design-vue/src/views/system/menu/menu-list.vue new file mode 100644 index 00000000..b7da553c --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/views/system/menu/menu-list.vue @@ -0,0 +1,402 @@ + + diff --git a/admin-web/typescript-ant-design-vue/src/vite-env.d.ts b/admin-web/typescript-ant-design-vue/src/vite-env.d.ts new file mode 100644 index 00000000..11f02fe2 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/admin-web/typescript-ant-design-vue/tsconfig.json b/admin-web/typescript-ant-design-vue/tsconfig.json new file mode 100644 index 00000000..30aadf2c --- /dev/null +++ b/admin-web/typescript-ant-design-vue/tsconfig.json @@ -0,0 +1,42 @@ +/* 具体查看 https://aka.ms/tsconfig.json 网址配置 */ +/* 中文网址 https://www.staging-typescript.org/zh/tsconfig 网址配置 */ + +{ + "compilerOptions": { + "target": "esnext", + "module": "esnext", + "moduleResolution": "node", + "strict": true, + "forceConsistentCasingInFileNames": true, + "allowSyntheticDefaultImports": true, + "jsx": "preserve", + "baseUrl": ".", + "sourceMap": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "experimentalDecorators": true, + "lib": ["esnext", "dom"], + "types": ["vite/client","node"], + "typeRoots": ["./node_modules/@types/", "./types"], + "skipLibCheck": true, + "paths": { + "/@/*": ["src/*"] + } + }, + "include": [ + "src/**/*.ts", + "src/**/*.tsx", + "src/**/*.vue", + "tests/**/*.ts", + "src/utils/path.js", + "types/**/*.d.ts", + "types/**/*.ts", + "types/global.d.ts", + "types/shims-tsx.d.ts", + "types/shims-vue.d.ts", + "mock/asyncRoutes.ts" + ], + "exclude": ["node_modules", "dist", "**/*.js"] +} diff --git a/admin-web/typescript-ant-design-vue/vite.config.ts b/admin-web/typescript-ant-design-vue/vite.config.ts new file mode 100644 index 00000000..f65172d5 --- /dev/null +++ b/admin-web/typescript-ant-design-vue/vite.config.ts @@ -0,0 +1,70 @@ +/* + * @Description: vite配置 + * @Author: zhuoda + * @Date: 2021-08-03 + * @LastEditTime: 2021-08-27 + * @LastEditors: zhuoda + */ +import { resolve } from 'path'; +import vue from '@vitejs/plugin-vue'; + +const pathResolve = (dir: string): any => { + return resolve(__dirname, '.', dir); +}; + +export default { + base: process.env.NODE_ENV === 'production' ? '/manages/' : '/', + root: process.cwd(), + resolve: { + alias: [ + // 国际化替换 + { + find: 'vue-i18n', + replacement: 'vue-i18n/dist/vue-i18n.cjs.js', + }, + // 绝对路径重命名:/@/xxxx => src/xxxx + { + find: /\/@\//, + replacement: pathResolve('src') + '/', + }, + { + find: /^~/, + replacement: '', + }, + ], + }, + // 服务端渲染 + server: { + host: '0.0.0.0', + port: 8081, + }, + plugins: [vue()], + optimizeDeps: { + include: ['ant-design-vue/es/locale/zh_CN', 'moment/dist/locale/zh-cn', 'ant-design-vue/es/locale/en_US', 'moment/dist/locale/eu'], + exclude: ['vue-demi'], + }, + build: { + terserOptions: { + compress: { + keep_infinity: true, + drop_console: true, + }, + }, + brotliSize: false, + chunkSizeWarningLimit: 2000, + }, + css: { + preprocessorOptions: { + less: { + modifyVars: { + hack: `true; @import (reference) "${resolve('/@/theme/index.less')}";`, + }, + javascriptEnabled: true, + }, + }, + }, + define: { + __INTLIFY_PROD_DEVTOOLS__: false, + 'process.env': process.env, + }, +}; diff --git a/smart-admin-h5/.browserslistrc b/smart-admin-h5/.browserslistrc deleted file mode 100644 index d6471a38..00000000 --- a/smart-admin-h5/.browserslistrc +++ /dev/null @@ -1,2 +0,0 @@ -> 1% -last 2 versions diff --git a/smart-admin-h5/.editorconfig b/smart-admin-h5/.editorconfig deleted file mode 100644 index 4881e66d..00000000 --- a/smart-admin-h5/.editorconfig +++ /dev/null @@ -1,15 +0,0 @@ -root = true - -[*] -# 字符 -charset = utf-8 -# 空格 -indent_style = space -# 2个空格缩进 -indent_size = 2 -# 换行符 -end_of_line = lf -# 文件的最后插入一个空行 -insert_final_newline = true -# 删除行尾的空格 -trim_trailing_whitespace = true diff --git a/smart-admin-h5/.env.development b/smart-admin-h5/.env.development deleted file mode 100644 index b698907c..00000000 --- a/smart-admin-h5/.env.development +++ /dev/null @@ -1,3 +0,0 @@ -NODE_ENV = development -VUE_APP_ENV = dev -VUE_APP_URL = http://127.0.0.1:10086/smart-admin-api diff --git a/smart-admin-h5/.env.local b/smart-admin-h5/.env.local deleted file mode 100644 index 6d07d04c..00000000 --- a/smart-admin-h5/.env.local +++ /dev/null @@ -1,3 +0,0 @@ -NODE_ENV = development -VUE_APP_ENV = local -VUE_APP_URL = http://127.0.0.1:10086/smart-admin-api diff --git a/smart-admin-h5/.env.pre b/smart-admin-h5/.env.pre deleted file mode 100644 index 80c46b0e..00000000 --- a/smart-admin-h5/.env.pre +++ /dev/null @@ -1,3 +0,0 @@ -NODE_ENV = production -VUE_APP_ENV = pre -VUE_APP_URL = http://smartadmin.1024lab.net/smart-admin-api diff --git a/smart-admin-h5/.env.prod b/smart-admin-h5/.env.prod deleted file mode 100644 index 0e1616d4..00000000 --- a/smart-admin-h5/.env.prod +++ /dev/null @@ -1,3 +0,0 @@ -NODE_ENV = production -VUE_APP_ENV = prod -VUE_APP_URL = http://smartadmin.1024lab.net/smart-admin-api diff --git a/smart-admin-h5/.env.sit b/smart-admin-h5/.env.sit deleted file mode 100644 index 411bc968..00000000 --- a/smart-admin-h5/.env.sit +++ /dev/null @@ -1,3 +0,0 @@ -NODE_ENV = production -VUE_APP_ENV = sit -VUE_APP_URL = http://smartadmin.1024lab.net/smart-admin-api diff --git a/smart-admin-h5/.eslintignore b/smart-admin-h5/.eslintignore deleted file mode 100644 index 7c435adc..00000000 --- a/smart-admin-h5/.eslintignore +++ /dev/null @@ -1,7 +0,0 @@ - -# 忽略项目中某些文件的提交代码规范 - -build/*.js -src/assets -public -dist diff --git a/smart-admin-h5/.eslintrc.js b/smart-admin-h5/.eslintrc.js deleted file mode 100644 index 27350869..00000000 --- a/smart-admin-h5/.eslintrc.js +++ /dev/null @@ -1,232 +0,0 @@ -module.exports = { - root: true, - env: { - node: true - }, - extends: [ - 'plugin:vue/essential', - 'eslint:recommended' - ], - parserOptions: { - parser: 'babel-eslint' - }, - rules: { - // 具体请看 https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/max-attributes-per-line.md - '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', - // JS/JSX中的组件名应该 大写驼峰 命名法 - 'vue/name-property-casing': ['error', 'PascalCase'], - // 给v-for设置键值,与key结合使用,可以高效的更新虚拟DOM - "vue/require-v-for-key": 1, - 'vue/no-v-html': 'off', - // 在对象中强制使用getter/setter - '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'], - // 构建方法中使用super方法 - 'constructor-super': 2, - curly: [2, 'multi-line'], - // 在dot之前和之后强制换行 - 'dot-location': [2, 'property'], - // 在文件末尾要求或禁止换行 - 'eol-last': 2, - // 是否使用全等 - eqeqeq: ['error', 'always', { null: 'ignore' }], - // 在生成器函数中强制执行*周围的间距 - 'generator-star-spacing': [2, { - 'before': true, - 'after': true - }], - // 强制执行回调错误处理 - 'handle-callback-err': [1, '^(err|error)$'], - // 强制执行一致的缩进 - 'indent': [2, 2, { - 'SwitchCase': 1 - }], - // 强制在JSX文件中一致使用单引号 - '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, // 禁止修改使用const声明的变量 - '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, // 禁止使用eval() - 'no-ex-assign': 2, // 禁止在catch子句中重新分配异常 - '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, // 禁止在RegExp中使用无效的正则表达式字符串 - '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': 0, - '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, // 禁止finally块中的控制流语句 - 'no-unused-vars': [2, { // 禁止使用未声明的变量 - 'vars': 'all', - 'args': 'none' - }], - 'no-useless-call': 2, // 禁止不必要的call()和apply()方法 - '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: ["error", "always"], - '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': 1, - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - 'object-curly-spacing': [2, 'always', { - objectsInObjects: false - }], - 'array-bracket-spacing': [2, 'never'] - } -} diff --git a/smart-admin-h5/.gitignore b/smart-admin-h5/.gitignore deleted file mode 100644 index 24d694ca..00000000 --- a/smart-admin-h5/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -node_modules -/dist - -# Log files -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Editor directories and files -.DS_Store -.idea -.vscode -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? - -package-lock.json -yarn.lock - -build/env.js diff --git a/smart-admin-h5/.postcssrc.js b/smart-admin-h5/.postcssrc.js deleted file mode 100644 index e2783a57..00000000 --- a/smart-admin-h5/.postcssrc.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - plugins: { - autoprefixer: { - overrideBrowserslist: ['Android 4.1', 'iOS 7.1', 'Chrome > 31', 'ff > 31', 'ie >= 8'] - }, - 'postcss-pxtorem': { - rootValue: 37.5, - propList: ['*'], - } - } -} diff --git a/smart-admin-h5/.prettierrc.js b/smart-admin-h5/.prettierrc.js deleted file mode 100644 index c19422ec..00000000 --- a/smart-admin-h5/.prettierrc.js +++ /dev/null @@ -1,31 +0,0 @@ -module.exports = { - // 缩进字节数 - tabWidth: 2, - // 使用单引号代替双引号 - singleQuote: true, - // 在对象或数组最后一个元素后面是否加逗号(在ES5中加尾逗号) - trailingComma: 'none', - // 句尾添加分号 - semi: true, - // 默认值。因为使用了一些折行敏感型的渲染器(如GitHub comment)而按照markdown文本样式进行折行 - proseWrap: 'always', - // (x) => {} 箭头函数参数只有一个时是否要有小括号。avoid:省略括号 - arrowParens: 'avoid', - // 在对象,数组括号与文字之间加空格 "{ foo: bar }" - bracketSpacing: true, - // 在jsx中把'>' 是否单独放一行 - jsxBracketSameLine: false, - // 缩进不使用tab,使用空格 - useTabs: false, - // 不让prettier使用eslint的代码格式进行校验 - eslintIntegration: true, - overrides: [ - { - files: '.prettierrc', - options: { - parser: 'json' - } - } - ], - endOfLine: 'auto' -} diff --git a/smart-admin-h5/.sentryclirc b/smart-admin-h5/.sentryclirc deleted file mode 100644 index b6f61dbd..00000000 --- a/smart-admin-h5/.sentryclirc +++ /dev/null @@ -1,7 +0,0 @@ -[defaults] -url = https://sentry.1024lab.net/ -org = 1024lab-sentry -project = smart-admin-h5 - -[auth] -token = 8dflijsldjkasdo3u49230948pkjdasoia8023jl3k4jr29o81029i40534p545ke diff --git a/smart-admin-h5/README.md b/smart-admin-h5/README.md deleted file mode 100644 index c5f8fa10..00000000 --- a/smart-admin-h5/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# SmartAdmin-H5 - -#### 介绍 -SmartAdmin-H5 是SmartAdmin 平台的移动端web项目 diff --git a/smart-admin-h5/babel.config.js b/smart-admin-h5/babel.config.js deleted file mode 100644 index 58b18fe8..00000000 --- a/smart-admin-h5/babel.config.js +++ /dev/null @@ -1,16 +0,0 @@ - -module.exports = { - presets: [['@vue/cli-plugin-babel/preset', {useBuiltIns: 'usage', corejs: 3}]], - plugins:[ - // vant-ui 按需引入,详情:https://github.com/ElementUI/babel-plugin-component - // [ - // 'import', - // { - // libraryName: 'vant', - // libraryDirectory: 'es', - // style: true - // }, - // 'vant' - // ] - ] -}; diff --git a/smart-admin-h5/package.json b/smart-admin-h5/package.json deleted file mode 100644 index cd09ecb3..00000000 --- a/smart-admin-h5/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "smart-admin-h5", - "version": "1.0.0", - "description": "基于vue和vant的h5模板", - "author": "zhuoluodada@qq.com", - "private": true, - "scripts": { - "local": "vue-cli-service serve --open --mode local", - "dev": "vue-cli-service serve --open", - "build": "vue-cli-service build", - "build:sit": "vue-cli-service build --mode sit", - "build:pre": "vue-cli-service build --mode pre", - "build:prod": "vue-cli-service build --mode prod", - "stage": "vue-cli-service build --mode staging", - "lint": "vue-cli-service lint" - }, - "dependencies": { - "@sentry/browser": "^5.13.2", - "@sentry/integrations": "^5.13.2", - "axios": "^0.19.2", - "core-js": "^3.6.5", - "fastclick": "^1.0.6", - "js-cookie": "^2.2.1", - "lib-flexible": "^0.3.2", - "lodash": "^4.17.20", - "moment": "^2.29.0", - "nprogress": "^0.2.0", - "regenerator-runtime": "^0.13.5", - "vant": "^2.11.1", - "vue": "^2.6.12", - "vue-enum": "^1.0.5", - "vue-loading-overlay": "^3.4.2", - "vue-router": "^3.4.0", - "vuex": "^3.6.0" - }, - "devDependencies": { - "@sentry/webpack-plugin": "^1.11.1", - "@vue/cli-plugin-babel": "~4.5.0", - "@vue/cli-plugin-eslint": "~4.5.0", - "@vue/cli-plugin-router": "~4.5.0", - "@vue/cli-plugin-vuex": "~4.5.0", - "@vue/cli-service": "~4.5.0", - "babel-eslint": "^10.1.0", - "babel-plugin-import": "^1.13.0", - "babel-plugin-transform-remove-console": "^6.9.4", - "compression-webpack-plugin": "^3.1.0", - "eslint": "^6.7.2", - "eslint-plugin-vue": "^6.2.2", - "node-sass": "^4.14.1", - "postcss-pxtorem": "^5.1.1", - "sass": "^1.3.0", - "sass-loader": "^9.0.3", - "script-ext-html-webpack-plugin": "^2.1.5", - "uglifyjs-webpack-plugin": "^2.2.0", - "vue-template-compiler": "^2.6.12", - "webpack-bundle-analyzer": "^4.2.0" - } -} diff --git a/smart-admin-h5/public/index.html b/smart-admin-h5/public/index.html deleted file mode 100644 index 5f5a1f86..00000000 --- a/smart-admin-h5/public/index.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - <% if (process.env.NODE_ENV === 'production') { %> - <% for(var css of htmlWebpackPlugin.options.cdn.css) { %> - - - <% } %> <% for(var js of htmlWebpackPlugin.options.cdn.js) { %> - - - <% } %> <% } %> - - - - <% if (process.env.NODE_ENV === 'development') { %> - - <% } %> - - - - - - <%= htmlWebpackPlugin.options.title %> - - - - - -
- - - diff --git a/smart-admin-h5/src/App.vue b/smart-admin-h5/src/App.vue deleted file mode 100644 index f3b5bda4..00000000 --- a/smart-admin-h5/src/App.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - - diff --git a/smart-admin-h5/src/api/employee.js b/smart-admin-h5/src/api/employee.js deleted file mode 100644 index 76f30459..00000000 --- a/smart-admin-h5/src/api/employee.js +++ /dev/null @@ -1,43 +0,0 @@ -import { postAxios, getAxios } from '@/lib/http'; -export const employeeApi = { - // 员工管理查询 - getEmployeeList: (data) => { - return postAxios('admin/employee/query', data); - }, - // 添加员工 - addEmployee: (data) => { - return postAxios('admin/employee/add', data); - }, - // 更新员工信息 - updateEmployee: (data) => { - return postAxios('admin/employee/update', data); - }, - // 禁用启用单个员工 - updateStatus: (employeeId, status) => { - return getAxios('admin/employee/updateStatus/' + employeeId + '/' + status); - }, - // 批量禁用 - updateStatusBatch: (data) => { - return postAxios('admin/employee/batchUpdateStatus', data); - }, - // 单个员工角色授权 - updateRoles: (data) => { - return postAxios('admin/employee/updateRoles', data); - }, - // 修改密码 - updatePwd: (data) => { - return postAxios('admin/employee/updatePwd', data); - }, - // 重置密码 - resetPassword: (employeeId) => { - return getAxios('admin/employee/resetPasswd/' + employeeId); - }, - // 通过部门id获取当前部门的人员&没有部门的人 - getListEmployeeByDeptId: (departmentId) => { - return getAxios('admin/employee/listEmployeeByDeptId/' + departmentId); - }, - // 删除员工 - deleteEmployee: (employeeId) => { - return postAxios('admin/employee/delete/' + employeeId); - } -}; diff --git a/smart-admin-h5/src/api/file.js b/smart-admin-h5/src/api/file.js deleted file mode 100644 index 2bc1a85a..00000000 --- a/smart-admin-h5/src/api/file.js +++ /dev/null @@ -1,14 +0,0 @@ -import { postAxios, getAxios } from '@/lib/http'; -import config from '@/config'; -import Cookies from '@/lib/cookie'; -const baseUrl = config.baseUrl.apiUrl; - -export const fileApi = { - // 文件上传 - fileUpload: (folder, data) => { - const url = baseUrl + '/common/file/upload/' + folder + '?x-access-token=' + Cookies.getToken(); - return postAxios(url, data, { - headers: { 'Content-Type': 'multipart/form-data' } - }); - } -}; diff --git a/smart-admin-h5/src/api/login.js b/smart-admin-h5/src/api/login.js deleted file mode 100644 index aad9ae16..00000000 --- a/smart-admin-h5/src/api/login.js +++ /dev/null @@ -1,10 +0,0 @@ -import { getAxios, postAxios } from '@/lib/http'; - -export const loginApi = { - login: (data) => { - return postAxios('/session/login', data); - }, - logout: (token) => { - return getAxios(`/session/logOut?x-access-token=${token}`); - } -}; diff --git a/smart-admin-h5/src/api/system-config.js b/smart-admin-h5/src/api/system-config.js deleted file mode 100644 index a9384d21..00000000 --- a/smart-admin-h5/src/api/system-config.js +++ /dev/null @@ -1,31 +0,0 @@ -// 系统参数API -import { - postAxios, - getAxios -} from '@/lib/http'; -export const systemConfigApi = { - // 查询系统参数列表 - getSystemConfigList: (data) => { - return postAxios('/admin/systemConfig/getListPage', data); - }, - // 添加系统参数 - addSystemConfig: (data) => { - return postAxios('/admin/systemConfig/add', data); - }, - // 更新单条系统参数 - updateSystemConfig: (data) => { - return postAxios('/admin/systemConfig/update', data); - }, - // 通过key获取对应的信息 - getConfigListByKey: (key) => { - return getAxios(`/admin/systemConfig/selectByKey?configKey=${key}`); - }, - // 根据分组查询所有系统配置 - getListByGroup: (group) => { - return getAxios(`/admin/systemConfig/getListByGroup?group=${group}`); - }, - // 获取系统版本信息 - getCodeVersion: () => { - return getAxios('/admin/codeVersion'); - } -}; diff --git a/smart-admin-h5/src/api/user.js b/smart-admin-h5/src/api/user.js deleted file mode 100644 index 7d2b2a83..00000000 --- a/smart-admin-h5/src/api/user.js +++ /dev/null @@ -1,7 +0,0 @@ -import { getAxios } from '@/lib/http'; - -export const userApi = { - getSession: () => { - return getAxios('/session/get'); - } -}; diff --git a/smart-admin-h5/src/assets/css/index.scss b/smart-admin-h5/src/assets/css/index.scss deleted file mode 100644 index 27597440..00000000 --- a/smart-admin-h5/src/assets/css/index.scss +++ /dev/null @@ -1,5 +0,0 @@ -$text-color: #323233; -$border-color: #ebedf0; -$active-color: #f2f3f5; -$background-color: #f7f8fa; -$background-color-light: #fafafa; diff --git a/smart-admin-h5/src/components/employee/department-employee-selector.vue b/smart-admin-h5/src/components/employee/department-employee-selector.vue deleted file mode 100644 index 7889136a..00000000 --- a/smart-admin-h5/src/components/employee/department-employee-selector.vue +++ /dev/null @@ -1,121 +0,0 @@ -/** -* @description:department-employee-selector -* @author: zhuoda -* @date: 2020/10/30 13:56 -*/ - - - - - - diff --git a/smart-admin-h5/src/components/form/select-picker/SmartEnumSelectPicker.vue b/smart-admin-h5/src/components/form/select-picker/SmartEnumSelectPicker.vue deleted file mode 100644 index 976211d1..00000000 --- a/smart-admin-h5/src/components/form/select-picker/SmartEnumSelectPicker.vue +++ /dev/null @@ -1,61 +0,0 @@ - - - - diff --git a/smart-admin-h5/src/components/form/select-picker/SmartSelectPicker b/smart-admin-h5/src/components/form/select-picker/SmartSelectPicker deleted file mode 100644 index c15bf200..00000000 --- a/smart-admin-h5/src/components/form/select-picker/SmartSelectPicker +++ /dev/null @@ -1,59 +0,0 @@ - - - - - diff --git a/smart-admin-h5/src/components/mixin/session-mixin.js b/smart-admin-h5/src/components/mixin/session-mixin.js deleted file mode 100644 index 94026bb0..00000000 --- a/smart-admin-h5/src/components/mixin/session-mixin.js +++ /dev/null @@ -1,25 +0,0 @@ -import cookie from '@/lib/cookie'; -import { userApi } from 'api/user'; - -/** - * 此 mixin为登录以后的页面用的,因为所有的有效路由(排除登录、注册、404,500 这个几个特殊页面)都会走 App.vue里的router - * @author zhuoda - */ -export default { - created: function() { - const token = cookie.getToken(); - // 如果登录过,获取token - if (token && !this.$store.state.user.isHaveGotSessionInfo) { - (async() => { - try { - console.debug(' request session info '); - const res = await userApi.getSession(); - const loginInfo = res.data; - this.$store.commit('user/updateSession', loginInfo); - } catch (e) { - this.$smartSentry.captureException(e); - } - })(); - } - } -}; diff --git a/smart-admin-h5/src/components/van-bar/BackNavBar.vue b/smart-admin-h5/src/components/van-bar/BackNavBar.vue deleted file mode 100644 index bca0b99e..00000000 --- a/smart-admin-h5/src/components/van-bar/BackNavBar.vue +++ /dev/null @@ -1,24 +0,0 @@ - - - diff --git a/smart-admin-h5/src/components/van-bar/RouterNavBar.vue b/smart-admin-h5/src/components/van-bar/RouterNavBar.vue deleted file mode 100644 index 355a57d6..00000000 --- a/smart-admin-h5/src/components/van-bar/RouterNavBar.vue +++ /dev/null @@ -1,27 +0,0 @@ - - - diff --git a/smart-admin-h5/src/config/index.js b/smart-admin-h5/src/config/index.js deleted file mode 100644 index dafb4212..00000000 --- a/smart-admin-h5/src/config/index.js +++ /dev/null @@ -1,46 +0,0 @@ -console.log('project api url : ', process.env.VUE_APP_URL); - -const isProductionEnv = ['production'].includes(process.env.NODE_ENV); - -module.exports = { - // 配置显示在浏览器标签的title - title: 'Smart-Admin-H5', - // token在Cookie中存储的天数,默认7天 - cookieExpires: 7, - /** - * @description api请求基础路径 - */ - baseUrl: { - apiUrl: process.env.VUE_APP_URL, - erpApiUrl: process.env.VUE_APP_ERP_URL, - webSocketUrl: process.env.VUE_APP_SOCKET_URL - }, - /** - * 打包后静态资源地址;如果是走cdn的话,可以配置如下: - * publicPath: isProd ? 'https://cdn.1024lab.net/static/smart-h5/' : '/' - */ - publicPath: isProductionEnv ? '/manage-h5/' : '/', - - // ==================== cdn 相关 begin ==================== - cdn: { - cdnResource: { - css: [], - js: [ - 'https://cdn.bootcss.com/vue/2.6.11/vue.min.js', - 'https://cdn.bootcss.com/vue-router/3.2.0/vue-router.min.js', - 'https://cdn.bootcdn.net/ajax/libs/vuex/3.5.1/vuex.min.js', - 'https://cdn.bootcss.com/axios/0.19.2/axios.min.js', - 'https://cdn.bootcdn.net/ajax/libs/lodash.js/4.17.20/lodash.min.js' - ] - }, - // 指定资源加载cdn - externals: { - vue: 'Vue', - 'vue-router': 'VueRouter', - vuex: 'Vuex', - axios: 'axios', - lodash: '_' - } - } - // ==================== cdn 相关 end ==================== -}; diff --git a/smart-admin-h5/src/constants/area.js b/smart-admin-h5/src/constants/area.js deleted file mode 100644 index 26e2ca99..00000000 --- a/smart-admin-h5/src/constants/area.js +++ /dev/null @@ -1,4047 +0,0 @@ -export default { - province_list: { - 110000: '北京市', - 120000: '天津市', - 130000: '河北省', - 140000: '山西省', - 150000: '内蒙古自治区', - 210000: '辽宁省', - 220000: '吉林省', - 230000: '黑龙江省', - 310000: '上海市', - 320000: '江苏省', - 330000: '浙江省', - 340000: '安徽省', - 350000: '福建省', - 360000: '江西省', - 370000: '山东省', - 410000: '河南省', - 420000: '湖北省', - 430000: '湖南省', - 440000: '广东省', - 450000: '广西壮族自治区', - 460000: '海南省', - 500000: '重庆市', - 510000: '四川省', - 520000: '贵州省', - 530000: '云南省', - 540000: '西藏自治区', - 610000: '陕西省', - 620000: '甘肃省', - 630000: '青海省', - 640000: '宁夏回族自治区', - 650000: '新疆维吾尔自治区', - 710000: '台湾省', - 810000: '香港特别行政区', - 820000: '澳门特别行政区', - 900000: '海外' - }, - city_list: { - 110100: '北京市', - 120100: '天津市', - 130100: '石家庄市', - 130200: '唐山市', - 130300: '秦皇岛市', - 130400: '邯郸市', - 130500: '邢台市', - 130600: '保定市', - 130700: '张家口市', - 130800: '承德市', - 130900: '沧州市', - 131000: '廊坊市', - 131100: '衡水市', - 140100: '太原市', - 140200: '大同市', - 140300: '阳泉市', - 140400: '长治市', - 140500: '晋城市', - 140600: '朔州市', - 140700: '晋中市', - 140800: '运城市', - 140900: '忻州市', - 141000: '临汾市', - 141100: '吕梁市', - 150100: '呼和浩特市', - 150200: '包头市', - 150300: '乌海市', - 150400: '赤峰市', - 150500: '通辽市', - 150600: '鄂尔多斯市', - 150700: '呼伦贝尔市', - 150800: '巴彦淖尔市', - 150900: '乌兰察布市', - 152200: '兴安盟', - 152500: '锡林郭勒盟', - 152900: '阿拉善盟', - 210100: '沈阳市', - 210200: '大连市', - 210300: '鞍山市', - 210400: '抚顺市', - 210500: '本溪市', - 210600: '丹东市', - 210700: '锦州市', - 210800: '营口市', - 210900: '阜新市', - 211000: '辽阳市', - 211100: '盘锦市', - 211200: '铁岭市', - 211300: '朝阳市', - 211400: '葫芦岛市', - 220100: '长春市', - 220200: '吉林市', - 220300: '四平市', - 220400: '辽源市', - 220500: '通化市', - 220600: '白山市', - 220700: '松原市', - 220800: '白城市', - 222400: '延边朝鲜族自治州', - 230100: '哈尔滨市', - 230200: '齐齐哈尔市', - 230300: '鸡西市', - 230400: '鹤岗市', - 230500: '双鸭山市', - 230600: '大庆市', - 230700: '伊春市', - 230800: '佳木斯市', - 230900: '七台河市', - 231000: '牡丹江市', - 231100: '黑河市', - 231200: '绥化市', - 232700: '大兴安岭地区', - 310100: '上海市', - 320100: '南京市', - 320200: '无锡市', - 320300: '徐州市', - 320400: '常州市', - 320500: '苏州市', - 320600: '南通市', - 320700: '连云港市', - 320800: '淮安市', - 320900: '盐城市', - 321000: '扬州市', - 321100: '镇江市', - 321200: '泰州市', - 321300: '宿迁市', - 330100: '杭州市', - 330200: '宁波市', - 330300: '温州市', - 330400: '嘉兴市', - 330500: '湖州市', - 330600: '绍兴市', - 330700: '金华市', - 330800: '衢州市', - 330900: '舟山市', - 331000: '台州市', - 331100: '丽水市', - 340100: '合肥市', - 340200: '芜湖市', - 340300: '蚌埠市', - 340400: '淮南市', - 340500: '马鞍山市', - 340600: '淮北市', - 340700: '铜陵市', - 340800: '安庆市', - 341000: '黄山市', - 341100: '滁州市', - 341200: '阜阳市', - 341300: '宿州市', - 341500: '六安市', - 341600: '亳州市', - 341700: '池州市', - 341800: '宣城市', - 350100: '福州市', - 350200: '厦门市', - 350300: '莆田市', - 350400: '三明市', - 350500: '泉州市', - 350600: '漳州市', - 350700: '南平市', - 350800: '龙岩市', - 350900: '宁德市', - 360100: '南昌市', - 360200: '景德镇市', - 360300: '萍乡市', - 360400: '九江市', - 360500: '新余市', - 360600: '鹰潭市', - 360700: '赣州市', - 360800: '吉安市', - 360900: '宜春市', - 361000: '抚州市', - 361100: '上饶市', - 370100: '济南市', - 370200: '青岛市', - 370300: '淄博市', - 370400: '枣庄市', - 370500: '东营市', - 370600: '烟台市', - 370700: '潍坊市', - 370800: '济宁市', - 370900: '泰安市', - 371000: '威海市', - 371100: '日照市', - 371300: '临沂市', - 371400: '德州市', - 371500: '聊城市', - 371600: '滨州市', - 371700: '菏泽市', - 410100: '郑州市', - 410200: '开封市', - 410300: '洛阳市', - 410400: '平顶山市', - 410500: '安阳市', - 410600: '鹤壁市', - 410700: '新乡市', - 410800: '焦作市', - 410900: '濮阳市', - 411000: '许昌市', - 411100: '漯河市', - 411200: '三门峡市', - 411300: '南阳市', - 411400: '商丘市', - 411500: '信阳市', - 411600: '周口市', - 411700: '驻马店市', - 419000: '省直辖县', - 420100: '武汉市', - 420200: '黄石市', - 420300: '十堰市', - 420500: '宜昌市', - 420600: '襄阳市', - 420700: '鄂州市', - 420800: '荆门市', - 420900: '孝感市', - 421000: '荆州市', - 421100: '黄冈市', - 421200: '咸宁市', - 421300: '随州市', - 422800: '恩施土家族苗族自治州', - 429000: '省直辖县', - 430100: '长沙市', - 430200: '株洲市', - 430300: '湘潭市', - 430400: '衡阳市', - 430500: '邵阳市', - 430600: '岳阳市', - 430700: '常德市', - 430800: '张家界市', - 430900: '益阳市', - 431000: '郴州市', - 431100: '永州市', - 431200: '怀化市', - 431300: '娄底市', - 433100: '湘西土家族苗族自治州', - 440100: '广州市', - 440200: '韶关市', - 440300: '深圳市', - 440400: '珠海市', - 440500: '汕头市', - 440600: '佛山市', - 440700: '江门市', - 440800: '湛江市', - 440900: '茂名市', - 441200: '肇庆市', - 441300: '惠州市', - 441400: '梅州市', - 441500: '汕尾市', - 441600: '河源市', - 441700: '阳江市', - 441800: '清远市', - 441900: '东莞市', - 442000: '中山市', - 445100: '潮州市', - 445200: '揭阳市', - 445300: '云浮市', - 450100: '南宁市', - 450200: '柳州市', - 450300: '桂林市', - 450400: '梧州市', - 450500: '北海市', - 450600: '防城港市', - 450700: '钦州市', - 450800: '贵港市', - 450900: '玉林市', - 451000: '百色市', - 451100: '贺州市', - 451200: '河池市', - 451300: '来宾市', - 451400: '崇左市', - 460100: '海口市', - 460200: '三亚市', - 460300: '三沙市', - 460400: '儋州市', - 469000: '省直辖县', - 500100: '重庆市', - 500200: '县', - 510100: '成都市', - 510300: '自贡市', - 510400: '攀枝花市', - 510500: '泸州市', - 510600: '德阳市', - 510700: '绵阳市', - 510800: '广元市', - 510900: '遂宁市', - 511000: '内江市', - 511100: '乐山市', - 511300: '南充市', - 511400: '眉山市', - 511500: '宜宾市', - 511600: '广安市', - 511700: '达州市', - 511800: '雅安市', - 511900: '巴中市', - 512000: '资阳市', - 513200: '阿坝藏族羌族自治州', - 513300: '甘孜藏族自治州', - 513400: '凉山彝族自治州', - 520100: '贵阳市', - 520200: '六盘水市', - 520300: '遵义市', - 520400: '安顺市', - 520500: '毕节市', - 520600: '铜仁市', - 522300: '黔西南布依族苗族自治州', - 522600: '黔东南苗族侗族自治州', - 522700: '黔南布依族苗族自治州', - 530100: '昆明市', - 530300: '曲靖市', - 530400: '玉溪市', - 530500: '保山市', - 530600: '昭通市', - 530700: '丽江市', - 530800: '普洱市', - 530900: '临沧市', - 532300: '楚雄彝族自治州', - 532500: '红河哈尼族彝族自治州', - 532600: '文山壮族苗族自治州', - 532800: '西双版纳傣族自治州', - 532900: '大理白族自治州', - 533100: '德宏傣族景颇族自治州', - 533300: '怒江傈僳族自治州', - 533400: '迪庆藏族自治州', - 540100: '拉萨市', - 540200: '日喀则市', - 540300: '昌都市', - 540400: '林芝市', - 540500: '山南市', - 540600: '那曲市', - 542500: '阿里地区', - 610100: '西安市', - 610200: '铜川市', - 610300: '宝鸡市', - 610400: '咸阳市', - 610500: '渭南市', - 610600: '延安市', - 610700: '汉中市', - 610800: '榆林市', - 610900: '安康市', - 611000: '商洛市', - 620100: '兰州市', - 620200: '嘉峪关市', - 620300: '金昌市', - 620400: '白银市', - 620500: '天水市', - 620600: '武威市', - 620700: '张掖市', - 620800: '平凉市', - 620900: '酒泉市', - 621000: '庆阳市', - 621100: '定西市', - 621200: '陇南市', - 622900: '临夏回族自治州', - 623000: '甘南藏族自治州', - 630100: '西宁市', - 630200: '海东市', - 632200: '海北藏族自治州', - 632300: '黄南藏族自治州', - 632500: '海南藏族自治州', - 632600: '果洛藏族自治州', - 632700: '玉树藏族自治州', - 632800: '海西蒙古族藏族自治州', - 640100: '银川市', - 640200: '石嘴山市', - 640300: '吴忠市', - 640400: '固原市', - 640500: '中卫市', - 650100: '乌鲁木齐市', - 650200: '克拉玛依市', - 650400: '吐鲁番市', - 650500: '哈密市', - 652300: '昌吉回族自治州', - 652700: '博尔塔拉蒙古自治州', - 652800: '巴音郭楞蒙古自治州', - 652900: '阿克苏地区', - 653000: '克孜勒苏柯尔克孜自治州', - 653100: '喀什地区', - 653200: '和田地区', - 654000: '伊犁哈萨克自治州', - 654200: '塔城地区', - 654300: '阿勒泰地区', - 659000: '自治区直辖县级行政区划', - 710100: '台北市', - 710200: '高雄市', - 710300: '台南市', - 710400: '台中市', - 710500: '金门县', - 710600: '南投县', - 710700: '基隆市', - 710800: '新竹市', - 710900: '嘉义市', - 711100: '新北市', - 711200: '宜兰县', - 711300: '新竹县', - 711400: '桃园县', - 711500: '苗栗县', - 711700: '彰化县', - 711900: '嘉义县', - 712100: '云林县', - 712400: '屏东县', - 712500: '台东县', - 712600: '花莲县', - 712700: '澎湖县', - 712800: '连江县', - 810100: '香港岛', - 810200: '九龙', - 810300: '新界', - 820100: '澳门半岛', - 820200: '离岛', - 900400: '阿富汗', - 900800: '阿尔巴尼亚', - 901000: '南极洲', - 901200: '阿尔及利亚', - 901600: '美属萨摩亚', - 902000: '安道尔', - 902400: '安哥拉', - 902800: '安提瓜和巴布达', - 903100: '阿塞拜疆', - 903200: '阿根廷', - 903600: '澳大利亚', - 904000: '奥地利', - 904400: '巴哈马', - 904800: '巴林', - 905000: '孟加拉', - 905100: '亚美尼亚', - 905200: '巴巴多斯', - 905600: '比利时', - 906000: '百慕大', - 906400: '不丹', - 906800: '玻利维亚', - 907000: '波黑', - 907200: '博茨瓦纳', - 907400: '布韦岛', - 907600: '巴西', - 908400: '伯利兹', - 908600: '英属印度洋领地', - 909000: '所罗门群岛', - 909200: '英属维尔京群岛', - 909600: '文莱', - 910000: '保加利亚', - 910400: '缅甸', - 910800: '布隆迪', - 911200: '白俄罗斯', - 911600: '柬埔寨', - 912000: '喀麦隆', - 912400: '加拿大', - 913200: '佛得角', - 913600: '开曼群岛', - 914000: '中非', - 914400: '斯里兰卡', - 914800: '乍得', - 915200: '智利', - 916200: '圣诞岛', - 916600: '科科斯群岛', - 917000: '哥伦比亚', - 917400: '科摩罗', - 917500: '马约特', - 917800: '刚果(布)', - 918000: '刚果(金)', - 918400: '库克群岛', - 918800: '哥斯达黎加', - 919100: '克罗地亚', - 919200: '古巴', - 919600: '塞浦路斯', - 920300: '捷克', - 920400: '贝宁', - 920800: '丹麦', - 921200: '多米尼克', - 921400: '多米尼加', - 921800: '厄瓜多尔', - 922200: '萨尔瓦多', - 922600: '赤道几内亚', - 923100: '埃塞俄比亚', - 923200: '厄立特里亚', - 923300: '爱沙尼亚', - 923400: '法罗群岛', - 923800: '马尔维纳斯群岛( 福克兰)', - 923900: '南乔治亚岛和南桑威奇群岛', - 924200: '斐济群岛', - 924600: '芬兰', - 924800: '奥兰群岛', - 925000: '法国', - 925400: '法属圭亚那', - 925800: '法属波利尼西亚', - 926000: '法属南部领地', - 926200: '吉布提', - 926600: '加蓬', - 926800: '格鲁吉亚', - 927000: '冈比亚', - 927500: '巴勒斯坦', - 927600: '德国', - 928800: '加纳', - 929200: '直布罗陀', - 929600: '基里巴斯', - 930000: '希腊', - 930400: '格陵兰', - 930800: '格林纳达', - 931200: '瓜德罗普', - 931600: '关岛', - 932000: '危地马拉', - 932400: '几内亚', - 932800: '圭亚那', - 933200: '海地', - 933400: '赫德岛和麦克唐纳群岛', - 933600: '梵蒂冈', - 934000: '洪都拉斯', - 934800: '匈牙利', - 935200: '冰岛', - 935600: '印度', - 936000: '印尼', - 936400: '伊朗', - 936800: '伊拉克', - 937200: '爱尔兰', - 937600: '以色列', - 938000: '意大利', - 938400: '科特迪瓦', - 938800: '牙买加', - 939200: '日本', - 939800: '哈萨克斯坦', - 940000: '约旦', - 940400: '肯尼亚', - 940800: '朝鲜 北朝鲜', - 941000: '韩国', - 941400: '科威特', - 941700: '吉尔吉斯斯坦', - 941800: '老挝', - 942200: '黎巴嫩', - 942600: '莱索托', - 942800: '拉脱维亚', - 943000: '利比里亚', - 943400: '利比亚', - 943800: '列支敦士登', - 944000: '立陶宛', - 944200: '卢森堡', - 945000: '马达加斯加', - 945400: '马拉维', - 945800: '马来西亚', - 946200: '马尔代夫', - 946600: '马里', - 947000: '马耳他', - 947400: '马提尼克', - 947800: '毛里塔尼亚', - 948000: '毛里求斯', - 948400: '墨西哥', - 949200: '摩纳哥', - 949600: '蒙古国', - 949800: '摩尔多瓦', - 949900: '黑山', - 950000: '蒙塞拉特岛', - 950400: '摩洛哥', - 950800: '莫桑比克', - 951200: '阿曼', - 951600: '纳米比亚', - 952000: '瑙鲁', - 952400: '尼泊尔', - 952800: '荷兰', - 953300: '阿鲁巴', - 953500: '荷兰加勒比区', - 954000: '新喀里多尼亚', - 954800: '瓦努阿图', - 955400: '新西兰', - 955800: '尼加拉瓜', - 956200: '尼日尔', - 956600: '尼日利亚', - 957000: '纽埃', - 957400: '诺福克岛', - 957800: '挪威', - 958000: '北马里亚纳群岛', - 958100: '美国本土外小岛屿', - 958300: '密克罗尼西亚联邦', - 958400: '马绍尔群岛', - 958500: '帕劳', - 958600: '巴基斯坦', - 959100: '巴拿马', - 959800: '巴布亚新几内亚', - 960000: '巴拉圭', - 960400: '秘鲁', - 960800: '菲律宾', - 961200: '皮特凯恩群岛', - 961600: '波兰', - 962000: '葡萄牙', - 962400: '几内亚比绍', - 962600: '东帝汶', - 963000: '波多黎各', - 963400: '卡塔尔', - 963800: '留尼汪', - 964200: '罗马尼亚', - 964300: '俄罗斯', - 964600: '卢旺达', - 965200: '圣巴泰勒米岛', - 965400: '圣赫勒拿', - 965900: '圣基茨和尼维斯', - 966000: '安圭拉', - 966200: '圣卢西亚', - 966300: '法属圣马丁', - 966600: '圣皮埃尔和密克隆', - 967000: '圣文森特和格林纳丁斯', - 967400: '圣马力诺', - 967800: '圣多美和普林西比', - 968200: '沙特阿拉伯', - 968600: '塞内加尔', - 968800: '塞尔维亚', - 969000: '塞舌尔', - 969400: '塞拉利昂', - 970200: '新加坡', - 970300: '斯洛伐克', - 970400: '越南', - 970500: '斯洛文尼亚', - 970600: '索马里', - 971000: '南非', - 971600: '津巴布韦', - 972400: '西班牙', - 972800: '南苏丹', - 972900: '苏丹', - 973200: '西撒哈拉', - 974000: '苏里南', - 974400: '斯瓦尔巴群岛和 扬马延岛', - 974800: '斯威士兰', - 975200: '瑞典', - 975600: '瑞士', - 976000: '叙利亚', - 976200: '塔吉克斯坦', - 976400: '泰国', - 976800: '多哥', - 977200: '托克劳', - 977600: '汤加', - 978000: '特立尼达和多巴哥', - 978400: '阿联酋', - 978800: '突尼斯', - 979200: '土耳其', - 979500: '土库曼斯坦', - 979600: '特克斯和凯科斯群岛', - 979800: '图瓦卢', - 980000: '乌干达', - 980400: '乌克兰', - 980700: '马其顿', - 981800: '埃及', - 982600: '英国', - 983100: '根西岛', - 983200: '泽西岛', - 983300: '马恩岛', - 983400: '坦桑尼亚', - 984000: '美国', - 985000: '美属维尔京群岛', - 985400: '布基纳法索', - 985800: '乌拉圭', - 986000: '乌兹别克斯坦', - 986200: '委内瑞拉', - 987600: '瓦利斯和富图纳', - 988200: '萨摩亚', - 988700: '也门', - 989400: '赞比亚' - }, - county_list: { - 110101: '东城区', - 110102: '西城区', - 110105: '朝阳区', - 110106: '丰台区', - 110107: '石景山区', - 110108: '海淀区', - 110109: '门头沟区', - 110111: '房山区', - 110112: '通州区', - 110113: '顺义区', - 110114: '昌平区', - 110115: '大兴区', - 110116: '怀柔区', - 110117: '平谷区', - 110118: '密云区', - 110119: '延庆区', - 120101: '和平区', - 120102: '河东区', - 120103: '河西区', - 120104: '南开区', - 120105: '河北区', - 120106: '红桥区', - 120110: '东丽区', - 120111: '西青区', - 120112: '津南区', - 120113: '北辰区', - 120114: '武清区', - 120115: '宝坻区', - 120116: '滨海新区', - 120117: '宁河区', - 120118: '静海区', - 120119: '蓟州区', - 130102: '长安区', - 130104: '桥西区', - 130105: '新华区', - 130107: '井陉矿区', - 130108: '裕华区', - 130109: '藁城区', - 130110: '鹿泉区', - 130111: '栾城区', - 130121: '井陉县', - 130123: '正定县', - 130125: '行唐县', - 130126: '灵寿县', - 130127: '高邑县', - 130128: '深泽县', - 130129: '赞皇县', - 130130: '无极县', - 130131: '平山县', - 130132: '元氏县', - 130133: '赵县', - 130181: '辛集市', - 130183: '晋州市', - 130184: '新乐市', - 130202: '路南区', - 130203: '路北区', - 130204: '古冶区', - 130205: '开平区', - 130207: '丰南区', - 130208: '丰润区', - 130209: '曹妃甸区', - 130224: '滦南县', - 130225: '乐亭县', - 130227: '迁西县', - 130229: '玉田县', - 130281: '遵化市', - 130283: '迁安市', - 130284: '滦州市', - 130302: '海港区', - 130303: '山海关区', - 130304: '北戴河区', - 130306: '抚宁区', - 130321: '青龙满族自治县', - 130322: '昌黎县', - 130324: '卢龙县', - 130390: '经济技术开发区', - 130402: '邯山区', - 130403: '丛台区', - 130404: '复兴区', - 130406: '峰峰矿区', - 130407: '肥乡区', - 130408: '永年区', - 130423: '临漳县', - 130424: '成安县', - 130425: '大名县', - 130426: '涉县', - 130427: '磁县', - 130430: '邱县', - 130431: '鸡泽县', - 130432: '广平县', - 130433: '馆陶县', - 130434: '魏县', - 130435: '曲周县', - 130481: '武安市', - 130502: '桥东区', - 130503: '桥西区', - 130521: '邢台县', - 130522: '临城县', - 130523: '内丘县', - 130524: '柏乡县', - 130525: '隆尧县', - 130526: '任县', - 130527: '南和县', - 130528: '宁晋县', - 130529: '巨鹿县', - 130530: '新河县', - 130531: '广宗县', - 130532: '平乡县', - 130533: '威县', - 130534: '清河县', - 130535: '临西县', - 130581: '南宫市', - 130582: '沙河市', - 130602: '竞秀区', - 130606: '莲池区', - 130607: '满城区', - 130608: '清苑区', - 130609: '徐水区', - 130623: '涞水县', - 130624: '阜平县', - 130626: '定兴县', - 130627: '唐县', - 130628: '高阳县', - 130629: '容城县', - 130630: '涞源县', - 130631: '望都县', - 130632: '安新县', - 130633: '易县', - 130634: '曲阳县', - 130635: '蠡县', - 130636: '顺平县', - 130637: '博野县', - 130638: '雄县', - 130681: '涿州市', - 130682: '定州市', - 130683: '安国市', - 130684: '高碑店市', - 130702: '桥东区', - 130703: '桥西区', - 130705: '宣化区', - 130706: '下花园区', - 130708: '万全区', - 130709: '崇礼区', - 130722: '张北县', - 130723: '康保县', - 130724: '沽源县', - 130725: '尚义县', - 130726: '蔚县', - 130727: '阳原县', - 130728: '怀安县', - 130730: '怀来县', - 130731: '涿鹿县', - 130732: '赤城县', - 130802: '双桥区', - 130803: '双滦区', - 130804: '鹰手营子矿区', - 130821: '承德县', - 130822: '兴隆县', - 130824: '滦平县', - 130825: '隆化县', - 130826: '丰宁满族自治县', - 130827: '宽城满族自治县', - 130828: '围场满族蒙古族自治县', - 130881: '平泉市', - 130902: '新华区', - 130903: '运河区', - 130921: '沧县', - 130922: '青县', - 130923: '东光县', - 130924: '海兴县', - 130925: '盐山县', - 130926: '肃宁县', - 130927: '南皮县', - 130928: '吴桥县', - 130929: '献县', - 130930: '孟村回族自治县', - 130981: '泊头市', - 130982: '任丘市', - 130983: '黄骅市', - 130984: '河间市', - 131002: '安次区', - 131003: '广阳区', - 131022: '固安县', - 131023: '永清县', - 131024: '香河县', - 131025: '大城县', - 131026: '文安县', - 131028: '大厂回族自治县', - 131081: '霸州市', - 131082: '三河市', - 131090: '开发区', - 131102: '桃城区', - 131103: '冀州区', - 131121: '枣强县', - 131122: '武邑县', - 131123: '武强县', - 131124: '饶阳县', - 131125: '安平县', - 131126: '故城县', - 131127: '景县', - 131128: '阜城县', - 131182: '深州市', - 140105: '小店区', - 140106: '迎泽区', - 140107: '杏花岭区', - 140108: '尖草坪区', - 140109: '万柏林区', - 140110: '晋源区', - 140121: '清徐县', - 140122: '阳曲县', - 140123: '娄烦县', - 140181: '古交市', - 140212: '新荣区', - 140213: '平城区', - 140214: '云冈区', - 140215: '云州区', - 140221: '阳高县', - 140222: '天镇县', - 140223: '广灵县', - 140224: '灵丘县', - 140225: '浑源县', - 140226: '左云县', - 140302: '城区', - 140303: '矿区', - 140311: '郊区', - 140321: '平定县', - 140322: '盂县', - 140403: '潞州区', - 140404: '上党区', - 140405: '屯留区', - 140406: '潞城区', - 140423: '襄垣县', - 140425: '平顺县', - 140426: '黎城县', - 140427: '壶关县', - 140428: '长子县', - 140429: '武乡县', - 140430: '沁县', - 140431: '沁源县', - 140502: '城区', - 140521: '沁水县', - 140522: '阳城县', - 140524: '陵川县', - 140525: '泽州县', - 140581: '高平市', - 140602: '朔城区', - 140603: '平鲁区', - 140621: '山阴县', - 140622: '应县', - 140623: '右玉县', - 140681: '怀仁市', - 140702: '榆次区', - 140721: '榆社县', - 140722: '左权县', - 140723: '和顺县', - 140724: '昔阳县', - 140725: '寿阳县', - 140726: '太谷县', - 140727: '祁县', - 140728: '平遥县', - 140729: '灵石县', - 140781: '介休市', - 140802: '盐湖区', - 140821: '临猗县', - 140822: '万荣县', - 140823: '闻喜县', - 140824: '稷山县', - 140825: '新绛县', - 140826: '绛县', - 140827: '垣曲县', - 140828: '夏县', - 140829: '平陆县', - 140830: '芮城县', - 140881: '永济市', - 140882: '河津市', - 140902: '忻府区', - 140921: '定襄县', - 140922: '五台县', - 140923: '代县', - 140924: '繁峙县', - 140925: '宁武县', - 140926: '静乐县', - 140927: '神池县', - 140928: '五寨县', - 140929: '岢岚县', - 140930: '河曲县', - 140931: '保德县', - 140932: '偏关县', - 140981: '原平市', - 141002: '尧都区', - 141021: '曲沃县', - 141022: '翼城县', - 141023: '襄汾县', - 141024: '洪洞县', - 141025: '古县', - 141026: '安泽县', - 141027: '浮山县', - 141028: '吉县', - 141029: '乡宁县', - 141030: '大宁县', - 141031: '隰县', - 141032: '永和县', - 141033: '蒲县', - 141034: '汾西县', - 141081: '侯马市', - 141082: '霍州市', - 141102: '离石区', - 141121: '文水县', - 141122: '交城县', - 141123: '兴县', - 141124: '临县', - 141125: '柳林县', - 141126: '石楼县', - 141127: '岚县', - 141128: '方山县', - 141129: '中阳县', - 141130: '交口县', - 141181: '孝义市', - 141182: '汾阳市', - 150102: '新城区', - 150103: '回民区', - 150104: '玉泉区', - 150105: '赛罕区', - 150121: '土默特左旗', - 150122: '托克托县', - 150123: '和林格尔县', - 150124: '清水河县', - 150125: '武川县', - 150202: '东河区', - 150203: '昆都仑区', - 150204: '青山区', - 150205: '石拐区', - 150206: '白云鄂博矿区', - 150207: '九原区', - 150221: '土默特右旗', - 150222: '固阳县', - 150223: '达尔罕茂明安联合旗', - 150302: '海勃湾区', - 150303: '海南区', - 150304: '乌达区', - 150402: '红山区', - 150403: '元宝山区', - 150404: '松山区', - 150421: '阿鲁科尔沁旗', - 150422: '巴林左旗', - 150423: '巴林右旗', - 150424: '林西县', - 150425: '克什克腾旗', - 150426: '翁牛特旗', - 150428: '喀喇沁旗', - 150429: '宁城县', - 150430: '敖汉旗', - 150502: '科尔沁区', - 150521: '科尔沁左翼中旗', - 150522: '科尔沁左翼后旗', - 150523: '开鲁县', - 150524: '库伦旗', - 150525: '奈曼旗', - 150526: '扎鲁特旗', - 150581: '霍林郭勒市', - 150602: '东胜区', - 150603: '康巴什区', - 150621: '达拉特旗', - 150622: '准格尔旗', - 150623: '鄂托克前旗', - 150624: '鄂托克旗', - 150625: '杭锦旗', - 150626: '乌审旗', - 150627: '伊金霍洛旗', - 150702: '海拉尔区', - 150703: '扎赉诺尔区', - 150721: '阿荣旗', - 150722: '莫力达瓦达斡尔族自治旗', - 150723: '鄂伦春自治旗', - 150724: '鄂温克族自治旗', - 150725: '陈巴尔虎旗', - 150726: '新巴尔虎左旗', - 150727: '新巴尔虎右旗', - 150781: '满洲里市', - 150782: '牙克石市', - 150783: '扎兰屯市', - 150784: '额尔古纳市', - 150785: '根河市', - 150802: '临河区', - 150821: '五原县', - 150822: '磴口县', - 150823: '乌拉特前旗', - 150824: '乌拉特中旗', - 150825: '乌拉特后旗', - 150826: '杭锦后旗', - 150902: '集宁区', - 150921: '卓资县', - 150922: '化德县', - 150923: '商都县', - 150924: '兴和县', - 150925: '凉城县', - 150926: '察哈尔右翼前旗', - 150927: '察哈尔右翼中旗', - 150928: '察哈尔右翼后旗', - 150929: '四子王旗', - 150981: '丰镇市', - 152201: '乌兰浩特市', - 152202: '阿尔山市', - 152221: '科尔沁右翼前旗', - 152222: '科尔沁右翼中旗', - 152223: '扎赉特旗', - 152224: '突泉县', - 152501: '二连浩特市', - 152502: '锡林浩特市', - 152522: '阿巴嘎旗', - 152523: '苏尼特左旗', - 152524: '苏尼特右旗', - 152525: '东乌珠穆沁旗', - 152526: '西乌珠穆沁旗', - 152527: '太仆寺旗', - 152528: '镶黄旗', - 152529: '正镶白旗', - 152530: '正蓝旗', - 152531: '多伦县', - 152921: '阿拉善左旗', - 152922: '阿拉善右旗', - 152923: '额济纳旗', - 210102: '和平区', - 210103: '沈河区', - 210104: '大东区', - 210105: '皇姑区', - 210106: '铁西区', - 210111: '苏家屯区', - 210112: '浑南区', - 210113: '沈北新区', - 210114: '于洪区', - 210115: '辽中区', - 210123: '康平县', - 210124: '法库县', - 210181: '新民市', - 210190: '经济技术开发区', - 210202: '中山区', - 210203: '西岗区', - 210204: '沙河口区', - 210211: '甘井子区', - 210212: '旅顺口区', - 210213: '金州区', - 210214: '普兰店区', - 210224: '长海县', - 210281: '瓦房店市', - 210283: '庄河市', - 210302: '铁东区', - 210303: '铁西区', - 210304: '立山区', - 210311: '千山区', - 210321: '台安县', - 210323: '岫岩满族自治县', - 210381: '海城市', - 210390: '高新区', - 210402: '新抚区', - 210403: '东洲区', - 210404: '望花区', - 210411: '顺城区', - 210421: '抚顺县', - 210422: '新宾满族自治县', - 210423: '清原满族自治县', - 210502: '平山区', - 210503: '溪湖区', - 210504: '明山区', - 210505: '南芬区', - 210521: '本溪满族自治县', - 210522: '桓仁满族自治县', - 210602: '元宝区', - 210603: '振兴区', - 210604: '振安区', - 210624: '宽甸满族自治县', - 210681: '东港市', - 210682: '凤城市', - 210702: '古塔区', - 210703: '凌河区', - 210711: '太和区', - 210726: '黑山县', - 210727: '义县', - 210781: '凌海市', - 210782: '北镇市', - 210793: '经济技术开发区', - 210802: '站前区', - 210803: '西市区', - 210804: '鲅鱼圈区', - 210811: '老边区', - 210881: '盖州市', - 210882: '大石桥市', - 210902: '海州区', - 210903: '新邱区', - 210904: '太平区', - 210905: '清河门区', - 210911: '细河区', - 210921: '阜新蒙古族自治县', - 210922: '彰武县', - 211002: '白塔区', - 211003: '文圣区', - 211004: '宏伟区', - 211005: '弓长岭区', - 211011: '太子河区', - 211021: '辽阳县', - 211081: '灯塔市', - 211102: '双台子区', - 211103: '兴隆台区', - 211104: '大洼区', - 211122: '盘山县', - 211202: '银州区', - 211204: '清河区', - 211221: '铁岭县', - 211223: '西丰县', - 211224: '昌图县', - 211281: '调兵山市', - 211282: '开原市', - 211302: '双塔区', - 211303: '龙城区', - 211321: '朝阳县', - 211322: '建平县', - 211324: '喀喇沁左翼蒙古族自治县', - 211381: '北票市', - 211382: '凌源市', - 211402: '连山区', - 211403: '龙港区', - 211404: '南票区', - 211421: '绥中县', - 211422: '建昌县', - 211481: '兴城市', - 220102: '南关区', - 220103: '宽城区', - 220104: '朝阳区', - 220105: '二道区', - 220106: '绿园区', - 220112: '双阳区', - 220113: '九台区', - 220122: '农安县', - 220182: '榆树市', - 220183: '德惠市', - 220192: '经济技术开发区', - 220202: '昌邑区', - 220203: '龙潭区', - 220204: '船营区', - 220211: '丰满区', - 220221: '永吉县', - 220281: '蛟河市', - 220282: '桦甸市', - 220283: '舒兰市', - 220284: '磐石市', - 220302: '铁西区', - 220303: '铁东区', - 220322: '梨树县', - 220323: '伊通满族自治县', - 220381: '公主岭市', - 220382: '双辽市', - 220402: '龙山区', - 220403: '西安区', - 220421: '东丰县', - 220422: '东辽县', - 220502: '东昌区', - 220503: '二道江区', - 220521: '通化县', - 220523: '辉南县', - 220524: '柳河县', - 220581: '梅河口市', - 220582: '集安市', - 220602: '浑江区', - 220605: '江源区', - 220621: '抚松县', - 220622: '靖宇县', - 220623: '长白朝鲜族自治县', - 220681: '临江市', - 220702: '宁江区', - 220721: '前郭尔罗斯蒙古族自治县', - 220722: '长岭县', - 220723: '乾安县', - 220781: '扶余市', - 220802: '洮北区', - 220821: '镇赉县', - 220822: '通榆县', - 220881: '洮南市', - 220882: '大安市', - 222401: '延吉市', - 222402: '图们市', - 222403: '敦化市', - 222404: '珲春市', - 222405: '龙井市', - 222406: '和龙市', - 222424: '汪清县', - 222426: '安图县', - 230102: '道里区', - 230103: '南岗区', - 230104: '道外区', - 230108: '平房区', - 230109: '松北区', - 230110: '香坊区', - 230111: '呼兰区', - 230112: '阿城区', - 230113: '双城区', - 230123: '依兰县', - 230124: '方正县', - 230125: '宾县', - 230126: '巴彦县', - 230127: '木兰县', - 230128: '通河县', - 230129: '延寿县', - 230183: '尚志市', - 230184: '五常市', - 230202: '龙沙区', - 230203: '建华区', - 230204: '铁锋区', - 230205: '昂昂溪区', - 230206: '富拉尔基区', - 230207: '碾子山区', - 230208: '梅里斯达斡尔族区', - 230221: '龙江县', - 230223: '依安县', - 230224: '泰来县', - 230225: '甘南县', - 230227: '富裕县', - 230229: '克山县', - 230230: '克东县', - 230231: '拜泉县', - 230281: '讷河市', - 230302: '鸡冠区', - 230303: '恒山区', - 230304: '滴道区', - 230305: '梨树区', - 230306: '城子河区', - 230307: '麻山区', - 230321: '鸡东县', - 230381: '虎林市', - 230382: '密山市', - 230402: '向阳区', - 230403: '工农区', - 230404: '南山区', - 230405: '兴安区', - 230406: '东山区', - 230407: '兴山区', - 230421: '萝北县', - 230422: '绥滨县', - 230502: '尖山区', - 230503: '岭东区', - 230505: '四方台区', - 230506: '宝山区', - 230521: '集贤县', - 230522: '友谊县', - 230523: '宝清县', - 230524: '饶河县', - 230602: '萨尔图区', - 230603: '龙凤区', - 230604: '让胡路区', - 230605: '红岗区', - 230606: '大同区', - 230621: '肇州县', - 230622: '肇源县', - 230623: '林甸县', - 230624: '杜尔伯特蒙古族自治县', - 230702: '伊春区', - 230703: '南岔区', - 230704: '友好区', - 230705: '西林区', - 230706: '翠峦区', - 230707: '新青区', - 230708: '美溪区', - 230709: '金山屯区', - 230710: '五营区', - 230711: '乌马河区', - 230712: '汤旺河区', - 230713: '带岭区', - 230714: '乌伊岭区', - 230715: '红星区', - 230716: '上甘岭区', - 230722: '嘉荫县', - 230781: '铁力市', - 230803: '向阳区', - 230804: '前进区', - 230805: '东风区', - 230811: '郊区', - 230822: '桦南县', - 230826: '桦川县', - 230828: '汤原县', - 230881: '同江市', - 230882: '富锦市', - 230883: '抚远市', - 230902: '新兴区', - 230903: '桃山区', - 230904: '茄子河区', - 230921: '勃利县', - 231002: '东安区', - 231003: '阳明区', - 231004: '爱民区', - 231005: '西安区', - 231025: '林口县', - 231081: '绥芬河市', - 231083: '海林市', - 231084: '宁安市', - 231085: '穆棱市', - 231086: '东宁市', - 231102: '爱辉区', - 231121: '嫩江县', - 231123: '逊克县', - 231124: '孙吴县', - 231181: '北安市', - 231182: '五大连池市', - 231202: '北林区', - 231221: '望奎县', - 231222: '兰西县', - 231223: '青冈县', - 231224: '庆安县', - 231225: '明水县', - 231226: '绥棱县', - 231281: '安达市', - 231282: '肇东市', - 231283: '海伦市', - 232701: '漠河市', - 232721: '呼玛县', - 232722: '塔河县', - 232790: '松岭区', - 232791: '呼中区', - 232792: '加格达奇区', - 232793: '新林区', - 310101: '黄浦区', - 310104: '徐汇区', - 310105: '长宁区', - 310106: '静安区', - 310107: '普陀区', - 310109: '虹口区', - 310110: '杨浦区', - 310112: '闵行区', - 310113: '宝山区', - 310114: '嘉定区', - 310115: '浦东新区', - 310116: '金山区', - 310117: '松江区', - 310118: '青浦区', - 310120: '奉贤区', - 310151: '崇明区', - 320102: '玄武区', - 320104: '秦淮区', - 320105: '建邺区', - 320106: '鼓楼区', - 320111: '浦口区', - 320113: '栖霞区', - 320114: '雨花台区', - 320115: '江宁区', - 320116: '六合区', - 320117: '溧水区', - 320118: '高淳区', - 320205: '锡山区', - 320206: '惠山区', - 320211: '滨湖区', - 320213: '梁溪区', - 320214: '新吴区', - 320281: '江阴市', - 320282: '宜兴市', - 320302: '鼓楼区', - 320303: '云龙区', - 320305: '贾汪区', - 320311: '泉山区', - 320312: '铜山区', - 320321: '丰县', - 320322: '沛县', - 320324: '睢宁县', - 320381: '新沂市', - 320382: '邳州市', - 320391: '工业园区', - 320402: '天宁区', - 320404: '钟楼区', - 320411: '新北区', - 320412: '武进区', - 320413: '金坛区', - 320481: '溧阳市', - 320505: '虎丘区', - 320506: '吴中区', - 320507: '相城区', - 320508: '姑苏区', - 320509: '吴江区', - 320581: '常熟市', - 320582: '张家港市', - 320583: '昆山市', - 320585: '太仓市', - 320590: '工业园区', - 320591: '高新区', - 320602: '崇川区', - 320611: '港闸区', - 320612: '通州区', - 320623: '如东县', - 320681: '启东市', - 320682: '如皋市', - 320684: '海门市', - 320685: '海安市', - 320691: '高新区', - 320703: '连云区', - 320706: '海州区', - 320707: '赣榆区', - 320722: '东海县', - 320723: '灌云县', - 320724: '灌南县', - 320803: '淮安区', - 320804: '淮阴区', - 320812: '清江浦区', - 320813: '洪泽区', - 320826: '涟水县', - 320830: '盱眙县', - 320831: '金湖县', - 320890: '经济开发区', - 320902: '亭湖区', - 320903: '盐都区', - 320904: '大丰区', - 320921: '响水县', - 320922: '滨海县', - 320923: '阜宁县', - 320924: '射阳县', - 320925: '建湖县', - 320981: '东台市', - 321002: '广陵区', - 321003: '邗江区', - 321012: '江都区', - 321023: '宝应县', - 321081: '仪征市', - 321084: '高邮市', - 321090: '经济开发区', - 321102: '京口区', - 321111: '润州区', - 321112: '丹徒区', - 321181: '丹阳市', - 321182: '扬中市', - 321183: '句容市', - 321202: '海陵区', - 321203: '高港区', - 321204: '姜堰区', - 321281: '兴化市', - 321282: '靖江市', - 321283: '泰兴市', - 321302: '宿城区', - 321311: '宿豫区', - 321322: '沭阳县', - 321323: '泗阳县', - 321324: '泗洪县', - 330102: '上城区', - 330103: '下城区', - 330104: '江干区', - 330105: '拱墅区', - 330106: '西湖区', - 330108: '滨江区', - 330109: '萧山区', - 330110: '余杭区', - 330111: '富阳区', - 330112: '临安区', - 330122: '桐庐县', - 330127: '淳安县', - 330182: '建德市', - 330203: '海曙区', - 330205: '江北区', - 330206: '北仑区', - 330211: '镇海区', - 330212: '鄞州区', - 330213: '奉化区', - 330225: '象山县', - 330226: '宁海县', - 330281: '余姚市', - 330282: '慈溪市', - 330302: '鹿城区', - 330303: '龙湾区', - 330304: '瓯海区', - 330305: '洞头区', - 330324: '永嘉县', - 330326: '平阳县', - 330327: '苍南县', - 330328: '文成县', - 330329: '泰顺县', - 330381: '瑞安市', - 330382: '乐清市', - 330402: '南湖区', - 330411: '秀洲区', - 330421: '嘉善县', - 330424: '海盐县', - 330481: '海宁市', - 330482: '平湖市', - 330483: '桐乡市', - 330502: '吴兴区', - 330503: '南浔区', - 330521: '德清县', - 330522: '长兴县', - 330523: '安吉县', - 330602: '越城区', - 330603: '柯桥区', - 330604: '上虞区', - 330624: '新昌县', - 330681: '诸暨市', - 330683: '嵊州市', - 330702: '婺城区', - 330703: '金东区', - 330723: '武义县', - 330726: '浦江县', - 330727: '磐安县', - 330781: '兰溪市', - 330782: '义乌市', - 330783: '东阳市', - 330784: '永康市', - 330802: '柯城区', - 330803: '衢江区', - 330822: '常山县', - 330824: '开化县', - 330825: '龙游县', - 330881: '江山市', - 330902: '定海区', - 330903: '普陀区', - 330921: '岱山县', - 330922: '嵊泗县', - 331002: '椒江区', - 331003: '黄岩区', - 331004: '路桥区', - 331022: '三门县', - 331023: '天台县', - 331024: '仙居县', - 331081: '温岭市', - 331082: '临海市', - 331083: '玉环市', - 331102: '莲都区', - 331121: '青田县', - 331122: '缙云县', - 331123: '遂昌县', - 331124: '松阳县', - 331125: '云和县', - 331126: '庆元县', - 331127: '景宁畲族自治县', - 331181: '龙泉市', - 340102: '瑶海区', - 340103: '庐阳区', - 340104: '蜀山区', - 340111: '包河区', - 340121: '长丰县', - 340122: '肥东县', - 340123: '肥西县', - 340124: '庐江县', - 340181: '巢湖市', - 340190: '高新技术开发区', - 340191: '经济技术开发区', - 340202: '镜湖区', - 340203: '弋江区', - 340207: '鸠江区', - 340208: '三山区', - 340221: '芜湖县', - 340222: '繁昌县', - 340223: '南陵县', - 340225: '无为县', - 340302: '龙子湖区', - 340303: '蚌山区', - 340304: '禹会区', - 340311: '淮上区', - 340321: '怀远县', - 340322: '五河县', - 340323: '固镇县', - 340402: '大通区', - 340403: '田家庵区', - 340404: '谢家集区', - 340405: '八公山区', - 340406: '潘集区', - 340421: '凤台县', - 340422: '寿县', - 340503: '花山区', - 340504: '雨山区', - 340506: '博望区', - 340521: '当涂县', - 340522: '含山县', - 340523: '和县', - 340602: '杜集区', - 340603: '相山区', - 340604: '烈山区', - 340621: '濉溪县', - 340705: '铜官区', - 340706: '义安区', - 340711: '郊区', - 340722: '枞阳县', - 340802: '迎江区', - 340803: '大观区', - 340811: '宜秀区', - 340822: '怀宁县', - 340824: '潜山县', - 340825: '太湖县', - 340826: '宿松县', - 340827: '望江县', - 340828: '岳西县', - 340881: '桐城市', - 341002: '屯溪区', - 341003: '黄山区', - 341004: '徽州区', - 341021: '歙县', - 341022: '休宁县', - 341023: '黟县', - 341024: '祁门县', - 341102: '琅琊区', - 341103: '南谯区', - 341122: '来安县', - 341124: '全椒县', - 341125: '定远县', - 341126: '凤阳县', - 341181: '天长市', - 341182: '明光市', - 341202: '颍州区', - 341203: '颍东区', - 341204: '颍泉区', - 341221: '临泉县', - 341222: '太和县', - 341225: '阜南县', - 341226: '颍上县', - 341282: '界首市', - 341302: '埇桥区', - 341321: '砀山县', - 341322: '萧县', - 341323: '灵璧县', - 341324: '泗县', - 341390: '经济开发区', - 341502: '金安区', - 341503: '裕安区', - 341504: '叶集区', - 341522: '霍邱县', - 341523: '舒城县', - 341524: '金寨县', - 341525: '霍山县', - 341602: '谯城区', - 341621: '涡阳县', - 341622: '蒙城县', - 341623: '利辛县', - 341702: '贵池区', - 341721: '东至县', - 341722: '石台县', - 341723: '青阳县', - 341802: '宣州区', - 341821: '郎溪县', - 341822: '广德县', - 341823: '泾县', - 341824: '绩溪县', - 341825: '旌德县', - 341881: '宁国市', - 350102: '鼓楼区', - 350103: '台江区', - 350104: '仓山区', - 350105: '马尾区', - 350111: '晋安区', - 350112: '长乐区', - 350121: '闽侯县', - 350122: '连江县', - 350123: '罗源县', - 350124: '闽清县', - 350125: '永泰县', - 350128: '平潭县', - 350181: '福清市', - 350203: '思明区', - 350205: '海沧区', - 350206: '湖里区', - 350211: '集美区', - 350212: '同安区', - 350213: '翔安区', - 350302: '城厢区', - 350303: '涵江区', - 350304: '荔城区', - 350305: '秀屿区', - 350322: '仙游县', - 350402: '梅列区', - 350403: '三元区', - 350421: '明溪县', - 350423: '清流县', - 350424: '宁化县', - 350425: '大田县', - 350426: '尤溪县', - 350427: '沙县', - 350428: '将乐县', - 350429: '泰宁县', - 350430: '建宁县', - 350481: '永安市', - 350502: '鲤城区', - 350503: '丰泽区', - 350504: '洛江区', - 350505: '泉港区', - 350521: '惠安县', - 350524: '安溪县', - 350525: '永春县', - 350526: '德化县', - 350527: '金门县', - 350581: '石狮市', - 350582: '晋江市', - 350583: '南安市', - 350602: '芗城区', - 350603: '龙文区', - 350622: '云霄县', - 350623: '漳浦县', - 350624: '诏安县', - 350625: '长泰县', - 350626: '东山县', - 350627: '南靖县', - 350628: '平和县', - 350629: '华安县', - 350681: '龙海市', - 350702: '延平区', - 350703: '建阳区', - 350721: '顺昌县', - 350722: '浦城县', - 350723: '光泽县', - 350724: '松溪县', - 350725: '政和县', - 350781: '邵武市', - 350782: '武夷山市', - 350783: '建瓯市', - 350802: '新罗区', - 350803: '永定区', - 350821: '长汀县', - 350823: '上杭县', - 350824: '武平县', - 350825: '连城县', - 350881: '漳平市', - 350902: '蕉城区', - 350921: '霞浦县', - 350922: '古田县', - 350923: '屏南县', - 350924: '寿宁县', - 350925: '周宁县', - 350926: '柘荣县', - 350981: '福安市', - 350982: '福鼎市', - 360102: '东湖区', - 360103: '西湖区', - 360104: '青云谱区', - 360105: '湾里区', - 360111: '青山湖区', - 360112: '新建区', - 360121: '南昌县', - 360123: '安义县', - 360124: '进贤县', - 360190: '经济技术开发区', - 360192: '高新区', - 360202: '昌江区', - 360203: '珠山区', - 360222: '浮梁县', - 360281: '乐平市', - 360302: '安源区', - 360313: '湘东区', - 360321: '莲花县', - 360322: '上栗县', - 360323: '芦溪县', - 360402: '濂溪区', - 360403: '浔阳区', - 360404: '柴桑区', - 360423: '武宁县', - 360424: '修水县', - 360425: '永修县', - 360426: '德安县', - 360428: '都昌县', - 360429: '湖口县', - 360430: '彭泽县', - 360481: '瑞昌市', - 360482: '共青城市', - 360483: '庐山市', - 360490: '经济技术开发区', - 360502: '渝水区', - 360521: '分宜县', - 360602: '月湖区', - 360603: '余江区', - 360681: '贵溪市', - 360702: '章贡区', - 360703: '南康区', - 360704: '赣县区', - 360722: '信丰县', - 360723: '大余县', - 360724: '上犹县', - 360725: '崇义县', - 360726: '安远县', - 360727: '龙南县', - 360728: '定南县', - 360729: '全南县', - 360730: '宁都县', - 360731: '于都县', - 360732: '兴国县', - 360733: '会昌县', - 360734: '寻乌县', - 360735: '石城县', - 360781: '瑞金市', - 360802: '吉州区', - 360803: '青原区', - 360821: '吉安县', - 360822: '吉水县', - 360823: '峡江县', - 360824: '新干县', - 360825: '永丰县', - 360826: '泰和县', - 360827: '遂川县', - 360828: '万安县', - 360829: '安福县', - 360830: '永新县', - 360881: '井冈山市', - 360902: '袁州区', - 360921: '奉新县', - 360922: '万载县', - 360923: '上高县', - 360924: '宜丰县', - 360925: '靖安县', - 360926: '铜鼓县', - 360981: '丰城市', - 360982: '樟树市', - 360983: '高安市', - 361002: '临川区', - 361003: '东乡区', - 361021: '南城县', - 361022: '黎川县', - 361023: '南丰县', - 361024: '崇仁县', - 361025: '乐安县', - 361026: '宜黄县', - 361027: '金溪县', - 361028: '资溪县', - 361030: '广昌县', - 361102: '信州区', - 361103: '广丰区', - 361121: '上饶县', - 361123: '玉山县', - 361124: '铅山县', - 361125: '横峰县', - 361126: '弋阳县', - 361127: '余干县', - 361128: '鄱阳县', - 361129: '万年县', - 361130: '婺源县', - 361181: '德兴市', - 370102: '历下区', - 370103: '市中区', - 370104: '槐荫区', - 370105: '天桥区', - 370112: '历城区', - 370113: '长清区', - 370114: '章丘区', - 370115: '济阳区', - 370116: '莱芜区', - 370117: '钢城区', - 370124: '平阴县', - 370126: '商河县', - 370190: '高新区', - 370202: '市南区', - 370203: '市北区', - 370211: '黄岛区', - 370212: '崂山区', - 370213: '李沧区', - 370214: '城阳区', - 370215: '即墨区', - 370281: '胶州市', - 370283: '平度市', - 370285: '莱西市', - 370290: '开发区', - 370302: '淄川区', - 370303: '张店区', - 370304: '博山区', - 370305: '临淄区', - 370306: '周村区', - 370321: '桓台县', - 370322: '高青县', - 370323: '沂源县', - 370402: '市中区', - 370403: '薛城区', - 370404: '峄城区', - 370405: '台儿庄区', - 370406: '山亭区', - 370481: '滕州市', - 370502: '东营区', - 370503: '河口区', - 370505: '垦利区', - 370522: '利津县', - 370523: '广饶县', - 370602: '芝罘区', - 370611: '福山区', - 370612: '牟平区', - 370613: '莱山区', - 370634: '长岛县', - 370681: '龙口市', - 370682: '莱阳市', - 370683: '莱州市', - 370684: '蓬莱市', - 370685: '招远市', - 370686: '栖霞市', - 370687: '海阳市', - 370690: '开发区', - 370702: '潍城区', - 370703: '寒亭区', - 370704: '坊子区', - 370705: '奎文区', - 370724: '临朐县', - 370725: '昌乐县', - 370781: '青州市', - 370782: '诸城市', - 370783: '寿光市', - 370784: '安丘市', - 370785: '高密市', - 370786: '昌邑市', - 370790: '开发区', - 370791: '高新区', - 370811: '任城区', - 370812: '兖州区', - 370826: '微山县', - 370827: '鱼台县', - 370828: '金乡县', - 370829: '嘉祥县', - 370830: '汶上县', - 370831: '泗水县', - 370832: '梁山县', - 370881: '曲阜市', - 370883: '邹城市', - 370890: '高新区', - 370902: '泰山区', - 370911: '岱岳区', - 370921: '宁阳县', - 370923: '东平县', - 370982: '新泰市', - 370983: '肥城市', - 371002: '环翠区', - 371003: '文登区', - 371082: '荣成市', - 371083: '乳山市', - 371091: '经济技术开发区', - 371102: '东港区', - 371103: '岚山区', - 371121: '五莲县', - 371122: '莒县', - 371302: '兰山区', - 371311: '罗庄区', - 371312: '河东区', - 371321: '沂南县', - 371322: '郯城县', - 371323: '沂水县', - 371324: '兰陵县', - 371325: '费县', - 371326: '平邑县', - 371327: '莒南县', - 371328: '蒙阴县', - 371329: '临沭县', - 371402: '德城区', - 371403: '陵城区', - 371422: '宁津县', - 371423: '庆云县', - 371424: '临邑县', - 371425: '齐河县', - 371426: '平原县', - 371427: '夏津县', - 371428: '武城县', - 371481: '乐陵市', - 371482: '禹城市', - 371502: '东昌府区', - 371521: '阳谷县', - 371522: '莘县', - 371523: '茌平县', - 371524: '东阿县', - 371525: '冠县', - 371526: '高唐县', - 371581: '临清市', - 371602: '滨城区', - 371603: '沾化区', - 371621: '惠民县', - 371622: '阳信县', - 371623: '无棣县', - 371625: '博兴县', - 371681: '邹平市', - 371702: '牡丹区', - 371703: '定陶区', - 371721: '曹县', - 371722: '单县', - 371723: '成武县', - 371724: '巨野县', - 371725: '郓城县', - 371726: '鄄城县', - 371728: '东明县', - 410102: '中原区', - 410103: '二七区', - 410104: '管城回族区', - 410105: '金水区', - 410106: '上街区', - 410108: '惠济区', - 410122: '中牟县', - 410181: '巩义市', - 410182: '荥阳市', - 410183: '新密市', - 410184: '新郑市', - 410185: '登封市', - 410190: '高新技术开发区', - 410191: '经济技术开发区', - 410202: '龙亭区', - 410203: '顺河回族区', - 410204: '鼓楼区', - 410205: '禹王台区', - 410212: '祥符区', - 410221: '杞县', - 410222: '通许县', - 410223: '尉氏县', - 410225: '兰考县', - 410302: '老城区', - 410303: '西工区', - 410304: '瀍河回族区', - 410305: '涧西区', - 410306: '吉利区', - 410311: '洛龙区', - 410322: '孟津县', - 410323: '新安县', - 410324: '栾川县', - 410325: '嵩县', - 410326: '汝阳县', - 410327: '宜阳县', - 410328: '洛宁县', - 410329: '伊川县', - 410381: '偃师市', - 410402: '新华区', - 410403: '卫东区', - 410404: '石龙区', - 410411: '湛河区', - 410421: '宝丰县', - 410422: '叶县', - 410423: '鲁山县', - 410425: '郏县', - 410481: '舞钢市', - 410482: '汝州市', - 410502: '文峰区', - 410503: '北关区', - 410505: '殷都区', - 410506: '龙安区', - 410522: '安阳县', - 410523: '汤阴县', - 410526: '滑县', - 410527: '内黄县', - 410581: '林州市', - 410590: '开发区', - 410602: '鹤山区', - 410603: '山城区', - 410611: '淇滨区', - 410621: '浚县', - 410622: '淇县', - 410702: '红旗区', - 410703: '卫滨区', - 410704: '凤泉区', - 410711: '牧野区', - 410721: '新乡县', - 410724: '获嘉县', - 410725: '原阳县', - 410726: '延津县', - 410727: '封丘县', - 410728: '长垣县', - 410781: '卫辉市', - 410782: '辉县市', - 410802: '解放区', - 410803: '中站区', - 410804: '马村区', - 410811: '山阳区', - 410821: '修武县', - 410822: '博爱县', - 410823: '武陟县', - 410825: '温县', - 410882: '沁阳市', - 410883: '孟州市', - 410902: '华龙区', - 410922: '清丰县', - 410923: '南乐县', - 410926: '范县', - 410927: '台前县', - 410928: '濮阳县', - 411002: '魏都区', - 411003: '建安区', - 411024: '鄢陵县', - 411025: '襄城县', - 411081: '禹州市', - 411082: '长葛市', - 411102: '源汇区', - 411103: '郾城区', - 411104: '召陵区', - 411121: '舞阳县', - 411122: '临颍县', - 411202: '湖滨区', - 411203: '陕州区', - 411221: '渑池县', - 411224: '卢氏县', - 411281: '义马市', - 411282: '灵宝市', - 411302: '宛城区', - 411303: '卧龙区', - 411321: '南召县', - 411322: '方城县', - 411323: '西峡县', - 411324: '镇平县', - 411325: '内乡县', - 411326: '淅川县', - 411327: '社旗县', - 411328: '唐河县', - 411329: '新野县', - 411330: '桐柏县', - 411381: '邓州市', - 411402: '梁园区', - 411403: '睢阳区', - 411421: '民权县', - 411422: '睢县', - 411423: '宁陵县', - 411424: '柘城县', - 411425: '虞城县', - 411426: '夏邑县', - 411481: '永城市', - 411502: '浉河区', - 411503: '平桥区', - 411521: '罗山县', - 411522: '光山县', - 411523: '新县', - 411524: '商城县', - 411525: '固始县', - 411526: '潢川县', - 411527: '淮滨县', - 411528: '息县', - 411602: '川汇区', - 411621: '扶沟县', - 411622: '西华县', - 411623: '商水县', - 411624: '沈丘县', - 411625: '郸城县', - 411626: '淮阳县', - 411627: '太康县', - 411628: '鹿邑县', - 411681: '项城市', - 411690: '经济开发区', - 411702: '驿城区', - 411721: '西平县', - 411722: '上蔡县', - 411723: '平舆县', - 411724: '正阳县', - 411725: '确山县', - 411726: '泌阳县', - 411727: '汝南县', - 411728: '遂平县', - 411729: '新蔡县', - 419001: '济源市', - 420102: '江岸区', - 420103: '江汉区', - 420104: '硚口区', - 420105: '汉阳区', - 420106: '武昌区', - 420107: '青山区', - 420111: '洪山区', - 420112: '东西湖区', - 420113: '汉南区', - 420114: '蔡甸区', - 420115: '江夏区', - 420116: '黄陂区', - 420117: '新洲区', - 420202: '黄石港区', - 420203: '西塞山区', - 420204: '下陆区', - 420205: '铁山区', - 420222: '阳新县', - 420281: '大冶市', - 420302: '茅箭区', - 420303: '张湾区', - 420304: '郧阳区', - 420322: '郧西县', - 420323: '竹山县', - 420324: '竹溪县', - 420325: '房县', - 420381: '丹江口市', - 420502: '西陵区', - 420503: '伍家岗区', - 420504: '点军区', - 420505: '猇亭区', - 420506: '夷陵区', - 420525: '远安县', - 420526: '兴山县', - 420527: '秭归县', - 420528: '长阳土家族自治县', - 420529: '五峰土家族自治县', - 420581: '宜都市', - 420582: '当阳市', - 420583: '枝江市', - 420590: '经济开发区', - 420602: '襄城区', - 420606: '樊城区', - 420607: '襄州区', - 420624: '南漳县', - 420625: '谷城县', - 420626: '保康县', - 420682: '老河口市', - 420683: '枣阳市', - 420684: '宜城市', - 420702: '梁子湖区', - 420703: '华容区', - 420704: '鄂城区', - 420802: '东宝区', - 420804: '掇刀区', - 420822: '沙洋县', - 420881: '钟祥市', - 420882: '京山市', - 420902: '孝南区', - 420921: '孝昌县', - 420922: '大悟县', - 420923: '云梦县', - 420981: '应城市', - 420982: '安陆市', - 420984: '汉川市', - 421002: '沙市区', - 421003: '荆州区', - 421022: '公安县', - 421023: '监利县', - 421024: '江陵县', - 421081: '石首市', - 421083: '洪湖市', - 421087: '松滋市', - 421102: '黄州区', - 421121: '团风县', - 421122: '红安县', - 421123: '罗田县', - 421124: '英山县', - 421125: '浠水县', - 421126: '蕲春县', - 421127: '黄梅县', - 421181: '麻城市', - 421182: '武穴市', - 421202: '咸安区', - 421221: '嘉鱼县', - 421222: '通城县', - 421223: '崇阳县', - 421224: '通山县', - 421281: '赤壁市', - 421303: '曾都区', - 421321: '随县', - 421381: '广水市', - 422801: '恩施市', - 422802: '利川市', - 422822: '建始县', - 422823: '巴东县', - 422825: '宣恩县', - 422826: '咸丰县', - 422827: '来凤县', - 422828: '鹤峰县', - 429004: '仙桃市', - 429005: '潜江市', - 429006: '天门市', - 429021: '神农架林区', - 430102: '芙蓉区', - 430103: '天心区', - 430104: '岳麓区', - 430105: '开福区', - 430111: '雨花区', - 430112: '望城区', - 430121: '长沙县', - 430181: '浏阳市', - 430182: '宁乡市', - 430202: '荷塘区', - 430203: '芦淞区', - 430204: '石峰区', - 430211: '天元区', - 430212: '渌口区', - 430223: '攸县', - 430224: '茶陵县', - 430225: '炎陵县', - 430281: '醴陵市', - 430302: '雨湖区', - 430304: '岳塘区', - 430321: '湘潭县', - 430381: '湘乡市', - 430382: '韶山市', - 430405: '珠晖区', - 430406: '雁峰区', - 430407: '石鼓区', - 430408: '蒸湘区', - 430412: '南岳区', - 430421: '衡阳县', - 430422: '衡南县', - 430423: '衡山县', - 430424: '衡东县', - 430426: '祁东县', - 430481: '耒阳市', - 430482: '常宁市', - 430502: '双清区', - 430503: '大祥区', - 430511: '北塔区', - 430521: '邵东县', - 430522: '新邵县', - 430523: '邵阳县', - 430524: '隆回县', - 430525: '洞口县', - 430527: '绥宁县', - 430528: '新宁县', - 430529: '城步苗族自治县', - 430581: '武冈市', - 430602: '岳阳楼区', - 430603: '云溪区', - 430611: '君山区', - 430621: '岳阳县', - 430623: '华容县', - 430624: '湘阴县', - 430626: '平江县', - 430681: '汨罗市', - 430682: '临湘市', - 430702: '武陵区', - 430703: '鼎城区', - 430721: '安乡县', - 430722: '汉寿县', - 430723: '澧县', - 430724: '临澧县', - 430725: '桃源县', - 430726: '石门县', - 430781: '津市市', - 430802: '永定区', - 430811: '武陵源区', - 430821: '慈利县', - 430822: '桑植县', - 430902: '资阳区', - 430903: '赫山区', - 430921: '南县', - 430922: '桃江县', - 430923: '安化县', - 430981: '沅江市', - 431002: '北湖区', - 431003: '苏仙区', - 431021: '桂阳县', - 431022: '宜章县', - 431023: '永兴县', - 431024: '嘉禾县', - 431025: '临武县', - 431026: '汝城县', - 431027: '桂东县', - 431028: '安仁县', - 431081: '资兴市', - 431102: '零陵区', - 431103: '冷水滩区', - 431121: '祁阳县', - 431122: '东安县', - 431123: '双牌县', - 431124: '道县', - 431125: '江永县', - 431126: '宁远县', - 431127: '蓝山县', - 431128: '新田县', - 431129: '江华瑶族自治县', - 431202: '鹤城区', - 431221: '中方县', - 431222: '沅陵县', - 431223: '辰溪县', - 431224: '溆浦县', - 431225: '会同县', - 431226: '麻阳苗族自治县', - 431227: '新晃侗族自治县', - 431228: '芷江侗族自治县', - 431229: '靖州苗族侗族自治县', - 431230: '通道侗族自治县', - 431281: '洪江市', - 431302: '娄星区', - 431321: '双峰县', - 431322: '新化县', - 431381: '冷水江市', - 431382: '涟源市', - 433101: '吉首市', - 433122: '泸溪县', - 433123: '凤凰县', - 433124: '花垣县', - 433125: '保靖县', - 433126: '古丈县', - 433127: '永顺县', - 433130: '龙山县', - 440103: '荔湾区', - 440104: '越秀区', - 440105: '海珠区', - 440106: '天河区', - 440111: '白云区', - 440112: '黄埔区', - 440113: '番禺区', - 440114: '花都区', - 440115: '南沙区', - 440117: '从化区', - 440118: '增城区', - 440203: '武江区', - 440204: '浈江区', - 440205: '曲江区', - 440222: '始兴县', - 440224: '仁化县', - 440229: '翁源县', - 440232: '乳源瑶族自治县', - 440233: '新丰县', - 440281: '乐昌市', - 440282: '南雄市', - 440303: '罗湖区', - 440304: '福田区', - 440305: '南山区', - 440306: '宝安区', - 440307: '龙岗区', - 440308: '盐田区', - 440309: '龙华区', - 440310: '坪山区', - 440311: '光明区', - 440402: '香洲区', - 440403: '斗门区', - 440404: '金湾区', - 440507: '龙湖区', - 440511: '金平区', - 440512: '濠江区', - 440513: '潮阳区', - 440514: '潮南区', - 440515: '澄海区', - 440523: '南澳县', - 440604: '禅城区', - 440605: '南海区', - 440606: '顺德区', - 440607: '三水区', - 440608: '高明区', - 440703: '蓬江区', - 440704: '江海区', - 440705: '新会区', - 440781: '台山市', - 440783: '开平市', - 440784: '鹤山市', - 440785: '恩平市', - 440802: '赤坎区', - 440803: '霞山区', - 440804: '坡头区', - 440811: '麻章区', - 440823: '遂溪县', - 440825: '徐闻县', - 440881: '廉江市', - 440882: '雷州市', - 440883: '吴川市', - 440890: '经济技术开发区', - 440902: '茂南区', - 440904: '电白区', - 440981: '高州市', - 440982: '化州市', - 440983: '信宜市', - 441202: '端州区', - 441203: '鼎湖区', - 441204: '高要区', - 441223: '广宁县', - 441224: '怀集县', - 441225: '封开县', - 441226: '德庆县', - 441284: '四会市', - 441302: '惠城区', - 441303: '惠阳区', - 441322: '博罗县', - 441323: '惠东县', - 441324: '龙门县', - 441402: '梅江区', - 441403: '梅县区', - 441422: '大埔县', - 441423: '丰顺县', - 441424: '五华县', - 441426: '平远县', - 441427: '蕉岭县', - 441481: '兴宁市', - 441502: '城区', - 441521: '海丰县', - 441523: '陆河县', - 441581: '陆丰市', - 441602: '源城区', - 441621: '紫金县', - 441622: '龙川县', - 441623: '连平县', - 441624: '和平县', - 441625: '东源县', - 441702: '江城区', - 441704: '阳东区', - 441721: '阳西县', - 441781: '阳春市', - 441802: '清城区', - 441803: '清新区', - 441821: '佛冈县', - 441823: '阳山县', - 441825: '连山壮族瑶族自治县', - 441826: '连南瑶族自治县', - 441881: '英德市', - 441882: '连州市', - 441901: '中堂镇', - 441903: '南城街道办事处', - 441904: '长安镇', - 441905: '东坑镇', - 441906: '樟木头镇', - 441907: '莞城街道办事处', - 441908: '石龙镇', - 441909: '桥头镇', - 441910: '万江街道办事处', - 441911: '麻涌镇', - 441912: '虎门镇', - 441913: '谢岗镇', - 441914: '石碣镇', - 441915: '茶山镇', - 441916: '东城街道办事处', - 441917: '洪梅镇', - 441918: '道滘镇', - 441919: '高埗镇', - 441920: '企石镇', - 441921: '凤岗镇', - 441922: '大岭山镇', - 441923: '松山湖管委会', - 441924: '清溪镇', - 441925: '望牛墩镇', - 441926: '厚街镇', - 441927: '常平镇', - 441928: '寮步镇', - 441929: '石排镇', - 441930: '横沥镇', - 441931: '塘厦镇', - 441932: '黄江镇', - 441933: '大朗镇', - 441934: '东莞港', - 441935: '东莞生态园', - 441990: '沙田镇', - 442001: '南头镇', - 442002: '神湾镇', - 442003: '东凤镇', - 442004: '五桂山街道办事处', - 442005: '黄圃镇', - 442006: '小榄镇', - 442007: '石岐区街道办事处', - 442008: '横栏镇', - 442009: '三角镇', - 442010: '三乡镇', - 442011: '港口镇', - 442012: '沙溪镇', - 442013: '板芙镇', - 442015: '东升镇', - 442016: '阜沙镇', - 442017: '民众镇', - 442018: '东区街道办事处', - 442019: '火炬开发区街道办事处', - 442020: '西区街道办事处', - 442021: '南区街道办事处', - 442022: '古镇镇', - 442023: '坦洲镇', - 442024: '大涌镇', - 442025: '南朗镇', - 445102: '湘桥区', - 445103: '潮安区', - 445122: '饶平县', - 445202: '榕城区', - 445203: '揭东区', - 445222: '揭西县', - 445224: '惠来县', - 445281: '普宁市', - 445302: '云城区', - 445303: '云安区', - 445321: '新兴县', - 445322: '郁南县', - 445381: '罗定市', - 450102: '兴宁区', - 450103: '青秀区', - 450105: '江南区', - 450107: '西乡塘区', - 450108: '良庆区', - 450109: '邕宁区', - 450110: '武鸣区', - 450123: '隆安县', - 450124: '马山县', - 450125: '上林县', - 450126: '宾阳县', - 450127: '横县', - 450202: '城中区', - 450203: '鱼峰区', - 450204: '柳南区', - 450205: '柳北区', - 450206: '柳江区', - 450222: '柳城县', - 450223: '鹿寨县', - 450224: '融安县', - 450225: '融水苗族自治县', - 450226: '三江侗族自治县', - 450302: '秀峰区', - 450303: '叠彩区', - 450304: '象山区', - 450305: '七星区', - 450311: '雁山区', - 450312: '临桂区', - 450321: '阳朔县', - 450323: '灵川县', - 450324: '全州县', - 450325: '兴安县', - 450326: '永福县', - 450327: '灌阳县', - 450328: '龙胜各族自治县', - 450329: '资源县', - 450330: '平乐县', - 450332: '恭城瑶族自治县', - 450381: '荔浦市', - 450403: '万秀区', - 450405: '长洲区', - 450406: '龙圩区', - 450421: '苍梧县', - 450422: '藤县', - 450423: '蒙山县', - 450481: '岑溪市', - 450502: '海城区', - 450503: '银海区', - 450512: '铁山港区', - 450521: '合浦县', - 450602: '港口区', - 450603: '防城区', - 450621: '上思县', - 450681: '东兴市', - 450702: '钦南区', - 450703: '钦北区', - 450721: '灵山县', - 450722: '浦北县', - 450802: '港北区', - 450803: '港南区', - 450804: '覃塘区', - 450821: '平南县', - 450881: '桂平市', - 450902: '玉州区', - 450903: '福绵区', - 450921: '容县', - 450922: '陆川县', - 450923: '博白县', - 450924: '兴业县', - 450981: '北流市', - 451002: '右江区', - 451021: '田阳县', - 451022: '田东县', - 451023: '平果县', - 451024: '德保县', - 451026: '那坡县', - 451027: '凌云县', - 451028: '乐业县', - 451029: '田林县', - 451030: '西林县', - 451031: '隆林各族自治县', - 451081: '靖西市', - 451102: '八步区', - 451103: '平桂区', - 451121: '昭平县', - 451122: '钟山县', - 451123: '富川瑶族自治县', - 451202: '金城江区', - 451203: '宜州区', - 451221: '南丹县', - 451222: '天峨县', - 451223: '凤山县', - 451224: '东兰县', - 451225: '罗城仫佬族自治县', - 451226: '环江毛南族自治县', - 451227: '巴马瑶族自治县', - 451228: '都安瑶族自治县', - 451229: '大化瑶族自治县', - 451302: '兴宾区', - 451321: '忻城县', - 451322: '象州县', - 451323: '武宣县', - 451324: '金秀瑶族自治县', - 451381: '合山市', - 451402: '江州区', - 451421: '扶绥县', - 451422: '宁明县', - 451423: '龙州县', - 451424: '大新县', - 451425: '天等县', - 451481: '凭祥市', - 460105: '秀英区', - 460106: '龙华区', - 460107: '琼山区', - 460108: '美兰区', - 460202: '海棠区', - 460203: '吉阳区', - 460204: '天涯区', - 460205: '崖州区', - 460321: '西沙群岛', - 460322: '南沙群岛', - 460323: '中沙群岛的岛礁及其海域', - 460401: '那大镇', - 460402: '和庆镇', - 460403: '南丰镇', - 460404: '大成镇', - 460405: '雅星镇', - 460406: '兰洋镇', - 460407: '光村镇', - 460408: '木棠镇', - 460409: '海头镇', - 460410: '峨蔓镇', - 460411: '王五镇', - 460412: '白马井镇', - 460413: '中和镇', - 460414: '排浦镇', - 460415: '东成镇', - 460416: '新州镇', - 460417: '洋浦经济开发区', - 460418: '华南热作学院', - 469001: '五指山市', - 469002: '琼海市', - 469005: '文昌市', - 469006: '万宁市', - 469007: '东方市', - 469021: '定安县', - 469022: '屯昌县', - 469023: '澄迈县', - 469024: '临高县', - 469025: '白沙黎族自治县', - 469026: '昌江黎族自治县', - 469027: '乐东黎族自治县', - 469028: '陵水黎族自治县', - 469029: '保亭黎族苗族自治县', - 469030: '琼中黎族苗族自治县', - 500101: '万州区', - 500102: '涪陵区', - 500103: '渝中区', - 500104: '大渡口区', - 500105: '江北区', - 500106: '沙坪坝区', - 500107: '九龙坡区', - 500108: '南岸区', - 500109: '北碚区', - 500110: '綦江区', - 500111: '大足区', - 500112: '渝北区', - 500113: '巴南区', - 500114: '黔江区', - 500115: '长寿区', - 500116: '江津区', - 500117: '合川区', - 500118: '永川区', - 500119: '南川区', - 500120: '璧山区', - 500151: '铜梁区', - 500152: '潼南区', - 500153: '荣昌区', - 500154: '开州区', - 500155: '梁平区', - 500156: '武隆区', - 500229: '城口县', - 500230: '丰都县', - 500231: '垫江县', - 500233: '忠县', - 500235: '云阳县', - 500236: '奉节县', - 500237: '巫山县', - 500238: '巫溪县', - 500240: '石柱土家族自治县', - 500241: '秀山土家族苗族自治县', - 500242: '酉阳土家族苗族自治县', - 500243: '彭水苗族土家族自治县', - 510104: '锦江区', - 510105: '青羊区', - 510106: '金牛区', - 510107: '武侯区', - 510108: '成华区', - 510112: '龙泉驿区', - 510113: '青白江区', - 510114: '新都区', - 510115: '温江区', - 510116: '双流区', - 510117: '郫都区', - 510121: '金堂县', - 510129: '大邑县', - 510131: '蒲江县', - 510132: '新津县', - 510181: '都江堰市', - 510182: '彭州市', - 510183: '邛崃市', - 510184: '崇州市', - 510185: '简阳市', - 510191: '高新区', - 510302: '自流井区', - 510303: '贡井区', - 510304: '大安区', - 510311: '沿滩区', - 510321: '荣县', - 510322: '富顺县', - 510402: '东区', - 510403: '西区', - 510411: '仁和区', - 510421: '米易县', - 510422: '盐边县', - 510502: '江阳区', - 510503: '纳溪区', - 510504: '龙马潭区', - 510521: '泸县', - 510522: '合江县', - 510524: '叙永县', - 510525: '古蔺县', - 510603: '旌阳区', - 510604: '罗江区', - 510623: '中江县', - 510681: '广汉市', - 510682: '什邡市', - 510683: '绵竹市', - 510703: '涪城区', - 510704: '游仙区', - 510705: '安州区', - 510722: '三台县', - 510723: '盐亭县', - 510725: '梓潼县', - 510726: '北川羌族自治县', - 510727: '平武县', - 510781: '江油市', - 510791: '高新区', - 510802: '利州区', - 510811: '昭化区', - 510812: '朝天区', - 510821: '旺苍县', - 510822: '青川县', - 510823: '剑阁县', - 510824: '苍溪县', - 510903: '船山区', - 510904: '安居区', - 510921: '蓬溪县', - 510922: '射洪县', - 510923: '大英县', - 511002: '市中区', - 511011: '东兴区', - 511024: '威远县', - 511025: '资中县', - 511083: '隆昌市', - 511102: '市中区', - 511111: '沙湾区', - 511112: '五通桥区', - 511113: '金口河区', - 511123: '犍为县', - 511124: '井研县', - 511126: '夹江县', - 511129: '沐川县', - 511132: '峨边彝族自治县', - 511133: '马边彝族自治县', - 511181: '峨眉山市', - 511302: '顺庆区', - 511303: '高坪区', - 511304: '嘉陵区', - 511321: '南部县', - 511322: '营山县', - 511323: '蓬安县', - 511324: '仪陇县', - 511325: '西充县', - 511381: '阆中市', - 511402: '东坡区', - 511403: '彭山区', - 511421: '仁寿县', - 511423: '洪雅县', - 511424: '丹棱县', - 511425: '青神县', - 511502: '翠屏区', - 511503: '南溪区', - 511504: '叙州区', - 511523: '江安县', - 511524: '长宁县', - 511525: '高县', - 511526: '珙县', - 511527: '筠连县', - 511528: '兴文县', - 511529: '屏山县', - 511602: '广安区', - 511603: '前锋区', - 511621: '岳池县', - 511622: '武胜县', - 511623: '邻水县', - 511681: '华蓥市', - 511702: '通川区', - 511703: '达川区', - 511722: '宣汉县', - 511723: '开江县', - 511724: '大竹县', - 511725: '渠县', - 511781: '万源市', - 511802: '雨城区', - 511803: '名山区', - 511822: '荥经县', - 511823: '汉源县', - 511824: '石棉县', - 511825: '天全县', - 511826: '芦山县', - 511827: '宝兴县', - 511902: '巴州区', - 511903: '恩阳区', - 511921: '通江县', - 511922: '南江县', - 511923: '平昌县', - 512002: '雁江区', - 512021: '安岳县', - 512022: '乐至县', - 513201: '马尔康市', - 513221: '汶川县', - 513222: '理县', - 513223: '茂县', - 513224: '松潘县', - 513225: '九寨沟县', - 513226: '金川县', - 513227: '小金县', - 513228: '黑水县', - 513230: '壤塘县', - 513231: '阿坝县', - 513232: '若尔盖县', - 513233: '红原县', - 513301: '康定市', - 513322: '泸定县', - 513323: '丹巴县', - 513324: '九龙县', - 513325: '雅江县', - 513326: '道孚县', - 513327: '炉霍县', - 513328: '甘孜县', - 513329: '新龙县', - 513330: '德格县', - 513331: '白玉县', - 513332: '石渠县', - 513333: '色达县', - 513334: '理塘县', - 513335: '巴塘县', - 513336: '乡城县', - 513337: '稻城县', - 513338: '得荣县', - 513401: '西昌市', - 513422: '木里藏族自治县', - 513423: '盐源县', - 513424: '德昌县', - 513425: '会理县', - 513426: '会东县', - 513427: '宁南县', - 513428: '普格县', - 513429: '布拖县', - 513430: '金阳县', - 513431: '昭觉县', - 513432: '喜德县', - 513433: '冕宁县', - 513434: '越西县', - 513435: '甘洛县', - 513436: '美姑县', - 513437: '雷波县', - 520102: '南明区', - 520103: '云岩区', - 520111: '花溪区', - 520112: '乌当区', - 520113: '白云区', - 520115: '观山湖区', - 520121: '开阳县', - 520122: '息烽县', - 520123: '修文县', - 520181: '清镇市', - 520201: '钟山区', - 520203: '六枝特区', - 520221: '水城县', - 520281: '盘州市', - 520302: '红花岗区', - 520303: '汇川区', - 520304: '播州区', - 520322: '桐梓县', - 520323: '绥阳县', - 520324: '正安县', - 520325: '道真仡佬族苗族自治县', - 520326: '务川仡佬族苗族自治县', - 520327: '凤冈县', - 520328: '湄潭县', - 520329: '余庆县', - 520330: '习水县', - 520381: '赤水市', - 520382: '仁怀市', - 520402: '西秀区', - 520403: '平坝区', - 520422: '普定县', - 520423: '镇宁布依族苗族自治县', - 520424: '关岭布依族苗族自治县', - 520425: '紫云苗族布依族自治县', - 520502: '七星关区', - 520521: '大方县', - 520522: '黔西县', - 520523: '金沙县', - 520524: '织金县', - 520525: '纳雍县', - 520526: '威宁彝族回族苗族自治县', - 520527: '赫章县', - 520602: '碧江区', - 520603: '万山区', - 520621: '江口县', - 520622: '玉屏侗族自治县', - 520623: '石阡县', - 520624: '思南县', - 520625: '印江土家族苗族自治县', - 520626: '德江县', - 520627: '沿河土家族自治县', - 520628: '松桃苗族自治县', - 522301: '兴义市', - 522302: '兴仁市', - 522323: '普安县', - 522324: '晴隆县', - 522325: '贞丰县', - 522326: '望谟县', - 522327: '册亨县', - 522328: '安龙县', - 522601: '凯里市', - 522622: '黄平县', - 522623: '施秉县', - 522624: '三穗县', - 522625: '镇远县', - 522626: '岑巩县', - 522627: '天柱县', - 522628: '锦屏县', - 522629: '剑河县', - 522630: '台江县', - 522631: '黎平县', - 522632: '榕江县', - 522633: '从江县', - 522634: '雷山县', - 522635: '麻江县', - 522636: '丹寨县', - 522701: '都匀市', - 522702: '福泉市', - 522722: '荔波县', - 522723: '贵定县', - 522725: '瓮安县', - 522726: '独山县', - 522727: '平塘县', - 522728: '罗甸县', - 522729: '长顺县', - 522730: '龙里县', - 522731: '惠水县', - 522732: '三都水族自治县', - 530102: '五华区', - 530103: '盘龙区', - 530111: '官渡区', - 530112: '西山区', - 530113: '东川区', - 530114: '呈贡区', - 530115: '晋宁区', - 530124: '富民县', - 530125: '宜良县', - 530126: '石林彝族自治县', - 530127: '嵩明县', - 530128: '禄劝彝族苗族自治县', - 530129: '寻甸回族彝族自治县', - 530181: '安宁市', - 530302: '麒麟区', - 530303: '沾益区', - 530304: '马龙区', - 530322: '陆良县', - 530323: '师宗县', - 530324: '罗平县', - 530325: '富源县', - 530326: '会泽县', - 530381: '宣威市', - 530402: '红塔区', - 530403: '江川区', - 530422: '澄江县', - 530423: '通海县', - 530424: '华宁县', - 530425: '易门县', - 530426: '峨山彝族自治县', - 530427: '新平彝族傣族自治县', - 530428: '元江哈尼族彝族傣族自治县', - 530502: '隆阳区', - 530521: '施甸县', - 530523: '龙陵县', - 530524: '昌宁县', - 530581: '腾冲市', - 530602: '昭阳区', - 530621: '鲁甸县', - 530622: '巧家县', - 530623: '盐津县', - 530624: '大关县', - 530625: '永善县', - 530626: '绥江县', - 530627: '镇雄县', - 530628: '彝良县', - 530629: '威信县', - 530681: '水富市', - 530702: '古城区', - 530721: '玉龙纳西族自治县', - 530722: '永胜县', - 530723: '华坪县', - 530724: '宁蒗彝族自治县', - 530802: '思茅区', - 530821: '宁洱哈尼族彝族自治县', - 530822: '墨江哈尼族自治县', - 530823: '景东彝族自治县', - 530824: '景谷傣族彝族自治县', - 530825: '镇沅彝族哈尼族拉祜族自治县', - 530826: '江城哈尼族彝族自治县', - 530827: '孟连傣族拉祜族佤族自治县', - 530828: '澜沧拉祜族自治县', - 530829: '西盟佤族自治县', - 530902: '临翔区', - 530921: '凤庆县', - 530922: '云县', - 530923: '永德县', - 530924: '镇康县', - 530925: '双江拉祜族佤族布朗族傣族自治县', - 530926: '耿马傣族佤族自治县', - 530927: '沧源佤族自治县', - 532301: '楚雄市', - 532322: '双柏县', - 532323: '牟定县', - 532324: '南华县', - 532325: '姚安县', - 532326: '大姚县', - 532327: '永仁县', - 532328: '元谋县', - 532329: '武定县', - 532331: '禄丰县', - 532501: '个旧市', - 532502: '开远市', - 532503: '蒙自市', - 532504: '弥勒市', - 532523: '屏边苗族自治县', - 532524: '建水县', - 532525: '石屏县', - 532527: '泸西县', - 532528: '元阳县', - 532529: '红河县', - 532530: '金平苗族瑶族傣族自治县', - 532531: '绿春县', - 532532: '河口瑶族自治县', - 532601: '文山市', - 532622: '砚山县', - 532623: '西畴县', - 532624: '麻栗坡县', - 532625: '马关县', - 532626: '丘北县', - 532627: '广南县', - 532628: '富宁县', - 532801: '景洪市', - 532822: '勐海县', - 532823: '勐腊县', - 532901: '大理市', - 532922: '漾濞彝族自治县', - 532923: '祥云县', - 532924: '宾川县', - 532925: '弥渡县', - 532926: '南涧彝族自治县', - 532927: '巍山彝族回族自治县', - 532928: '永平县', - 532929: '云龙县', - 532930: '洱源县', - 532931: '剑川县', - 532932: '鹤庆县', - 533102: '瑞丽市', - 533103: '芒市', - 533122: '梁河县', - 533123: '盈江县', - 533124: '陇川县', - 533301: '泸水市', - 533323: '福贡县', - 533324: '贡山独龙族怒族自治县', - 533325: '兰坪白族普米族自治县', - 533401: '香格里拉市', - 533422: '德钦县', - 533423: '维西傈僳族自治县', - 540102: '城关区', - 540103: '堆龙德庆区', - 540104: '达孜区', - 540121: '林周县', - 540122: '当雄县', - 540123: '尼木县', - 540124: '曲水县', - 540127: '墨竹工卡县', - 540202: '桑珠孜区', - 540221: '南木林县', - 540222: '江孜县', - 540223: '定日县', - 540224: '萨迦县', - 540225: '拉孜县', - 540226: '昂仁县', - 540227: '谢通门县', - 540228: '白朗县', - 540229: '仁布县', - 540230: '康马县', - 540231: '定结县', - 540232: '仲巴县', - 540233: '亚东县', - 540234: '吉隆县', - 540235: '聂拉木县', - 540236: '萨嘎县', - 540237: '岗巴县', - 540302: '卡若区', - 540321: '江达县', - 540322: '贡觉县', - 540323: '类乌齐县', - 540324: '丁青县', - 540325: '察雅县', - 540326: '八宿县', - 540327: '左贡县', - 540328: '芒康县', - 540329: '洛隆县', - 540330: '边坝县', - 540402: '巴宜区', - 540421: '工布江达县', - 540422: '米林县', - 540423: '墨脱县', - 540424: '波密县', - 540425: '察隅县', - 540426: '朗县', - 540502: '乃东区', - 540521: '扎囊县', - 540522: '贡嘎县', - 540523: '桑日县', - 540524: '琼结县', - 540525: '曲松县', - 540526: '措美县', - 540527: '洛扎县', - 540528: '加查县', - 540529: '隆子县', - 540530: '错那县', - 540531: '浪卡子县', - 540602: '色尼区', - 540621: '嘉黎县', - 540622: '比如县', - 540623: '聂荣县', - 540624: '安多县', - 540625: '申扎县', - 540626: '索县', - 540627: '班戈县', - 540628: '巴青县', - 540629: '尼玛县', - 540630: '双湖县', - 542521: '普兰县', - 542522: '札达县', - 542523: '噶尔县', - 542524: '日土县', - 542525: '革吉县', - 542526: '改则县', - 542527: '措勤县', - 610102: '新城区', - 610103: '碑林区', - 610104: '莲湖区', - 610111: '灞桥区', - 610112: '未央区', - 610113: '雁塔区', - 610114: '阎良区', - 610115: '临潼区', - 610116: '长安区', - 610117: '高陵区', - 610118: '鄠邑区', - 610122: '蓝田县', - 610124: '周至县', - 610202: '王益区', - 610203: '印台区', - 610204: '耀州区', - 610222: '宜君县', - 610302: '渭滨区', - 610303: '金台区', - 610304: '陈仓区', - 610322: '凤翔县', - 610323: '岐山县', - 610324: '扶风县', - 610326: '眉县', - 610327: '陇县', - 610328: '千阳县', - 610329: '麟游县', - 610330: '凤县', - 610331: '太白县', - 610402: '秦都区', - 610403: '杨陵区', - 610404: '渭城区', - 610422: '三原县', - 610423: '泾阳县', - 610424: '乾县', - 610425: '礼泉县', - 610426: '永寿县', - 610428: '长武县', - 610429: '旬邑县', - 610430: '淳化县', - 610431: '武功县', - 610481: '兴平市', - 610482: '彬州市', - 610502: '临渭区', - 610503: '华州区', - 610522: '潼关县', - 610523: '大荔县', - 610524: '合阳县', - 610525: '澄城县', - 610526: '蒲城县', - 610527: '白水县', - 610528: '富平县', - 610581: '韩城市', - 610582: '华阴市', - 610602: '宝塔区', - 610603: '安塞区', - 610621: '延长县', - 610622: '延川县', - 610623: '子长县', - 610625: '志丹县', - 610626: '吴起县', - 610627: '甘泉县', - 610628: '富县', - 610629: '洛川县', - 610630: '宜川县', - 610631: '黄龙县', - 610632: '黄陵县', - 610702: '汉台区', - 610703: '南郑区', - 610722: '城固县', - 610723: '洋县', - 610724: '西乡县', - 610725: '勉县', - 610726: '宁强县', - 610727: '略阳县', - 610728: '镇巴县', - 610729: '留坝县', - 610730: '佛坪县', - 610802: '榆阳区', - 610803: '横山区', - 610822: '府谷县', - 610824: '靖边县', - 610825: '定边县', - 610826: '绥德县', - 610827: '米脂县', - 610828: '佳县', - 610829: '吴堡县', - 610830: '清涧县', - 610831: '子洲县', - 610881: '神木市', - 610902: '汉滨区', - 610921: '汉阴县', - 610922: '石泉县', - 610923: '宁陕县', - 610924: '紫阳县', - 610925: '岚皋县', - 610926: '平利县', - 610927: '镇坪县', - 610928: '旬阳县', - 610929: '白河县', - 611002: '商州区', - 611021: '洛南县', - 611022: '丹凤县', - 611023: '商南县', - 611024: '山阳县', - 611025: '镇安县', - 611026: '柞水县', - 620102: '城关区', - 620103: '七里河区', - 620104: '西固区', - 620105: '安宁区', - 620111: '红古区', - 620121: '永登县', - 620122: '皋兰县', - 620123: '榆中县', - 620201: '市辖区', - 620290: '雄关区', - 620291: '长城区', - 620292: '镜铁区', - 620293: '新城镇', - 620294: '峪泉镇', - 620295: '文殊镇', - 620302: '金川区', - 620321: '永昌县', - 620402: '白银区', - 620403: '平川区', - 620421: '靖远县', - 620422: '会宁县', - 620423: '景泰县', - 620502: '秦州区', - 620503: '麦积区', - 620521: '清水县', - 620522: '秦安县', - 620523: '甘谷县', - 620524: '武山县', - 620525: '张家川回族自治县', - 620602: '凉州区', - 620621: '民勤县', - 620622: '古浪县', - 620623: '天祝藏族自治县', - 620702: '甘州区', - 620721: '肃南裕固族自治县', - 620722: '民乐县', - 620723: '临泽县', - 620724: '高台县', - 620725: '山丹县', - 620802: '崆峒区', - 620821: '泾川县', - 620822: '灵台县', - 620823: '崇信县', - 620825: '庄浪县', - 620826: '静宁县', - 620881: '华亭市', - 620902: '肃州区', - 620921: '金塔县', - 620922: '瓜州县', - 620923: '肃北蒙古族自治县', - 620924: '阿克塞哈萨克族自治县', - 620981: '玉门市', - 620982: '敦煌市', - 621002: '西峰区', - 621021: '庆城县', - 621022: '环县', - 621023: '华池县', - 621024: '合水县', - 621025: '正宁县', - 621026: '宁县', - 621027: '镇原县', - 621102: '安定区', - 621121: '通渭县', - 621122: '陇西县', - 621123: '渭源县', - 621124: '临洮县', - 621125: '漳县', - 621126: '岷县', - 621202: '武都区', - 621221: '成县', - 621222: '文县', - 621223: '宕昌县', - 621224: '康县', - 621225: '西和县', - 621226: '礼县', - 621227: '徽县', - 621228: '两当县', - 622901: '临夏市', - 622921: '临夏县', - 622922: '康乐县', - 622923: '永靖县', - 622924: '广河县', - 622925: '和政县', - 622926: '东乡族自治县', - 622927: '积石山保安族东乡族撒拉族自治县', - 623001: '合作市', - 623021: '临潭县', - 623022: '卓尼县', - 623023: '舟曲县', - 623024: '迭部县', - 623025: '玛曲县', - 623026: '碌曲县', - 623027: '夏河县', - 630102: '城东区', - 630103: '城中区', - 630104: '城西区', - 630105: '城北区', - 630121: '大通回族土族自治县', - 630122: '湟中县', - 630123: '湟源县', - 630202: '乐都区', - 630203: '平安区', - 630222: '民和回族土族自治县', - 630223: '互助土族自治县', - 630224: '化隆回族自治县', - 630225: '循化撒拉族自治县', - 632221: '门源回族自治县', - 632222: '祁连县', - 632223: '海晏县', - 632224: '刚察县', - 632321: '同仁县', - 632322: '尖扎县', - 632323: '泽库县', - 632324: '河南蒙古族自治县', - 632521: '共和县', - 632522: '同德县', - 632523: '贵德县', - 632524: '兴海县', - 632525: '贵南县', - 632621: '玛沁县', - 632622: '班玛县', - 632623: '甘德县', - 632624: '达日县', - 632625: '久治县', - 632626: '玛多县', - 632701: '玉树市', - 632722: '杂多县', - 632723: '称多县', - 632724: '治多县', - 632725: '囊谦县', - 632726: '曲麻莱县', - 632801: '格尔木市', - 632802: '德令哈市', - 632803: '茫崖市', - 632821: '乌兰县', - 632822: '都兰县', - 632823: '天峻县', - 640104: '兴庆区', - 640105: '西夏区', - 640106: '金凤区', - 640121: '永宁县', - 640122: '贺兰县', - 640181: '灵武市', - 640202: '大武口区', - 640205: '惠农区', - 640221: '平罗县', - 640302: '利通区', - 640303: '红寺堡区', - 640323: '盐池县', - 640324: '同心县', - 640381: '青铜峡市', - 640402: '原州区', - 640422: '西吉县', - 640423: '隆德县', - 640424: '泾源县', - 640425: '彭阳县', - 640502: '沙坡头区', - 640521: '中宁县', - 640522: '海原县', - 650102: '天山区', - 650103: '沙依巴克区', - 650104: '新市区', - 650105: '水磨沟区', - 650106: '头屯河区', - 650107: '达坂城区', - 650109: '米东区', - 650121: '乌鲁木齐县', - 650202: '独山子区', - 650203: '克拉玛依区', - 650204: '白碱滩区', - 650205: '乌尔禾区', - 650402: '高昌区', - 650421: '鄯善县', - 650422: '托克逊县', - 650502: '伊州区', - 650521: '巴里坤哈萨克自治县', - 650522: '伊吾县', - 652301: '昌吉市', - 652302: '阜康市', - 652323: '呼图壁县', - 652324: '玛纳斯县', - 652325: '奇台县', - 652327: '吉木萨尔县', - 652328: '木垒哈萨克自治县', - 652701: '博乐市', - 652702: '阿拉山口市', - 652722: '精河县', - 652723: '温泉县', - 652801: '库尔勒市', - 652822: '轮台县', - 652823: '尉犁县', - 652824: '若羌县', - 652825: '且末县', - 652826: '焉耆回族自治县', - 652827: '和静县', - 652828: '和硕县', - 652829: '博湖县', - 652901: '阿克苏市', - 652922: '温宿县', - 652923: '库车县', - 652924: '沙雅县', - 652925: '新和县', - 652926: '拜城县', - 652927: '乌什县', - 652928: '阿瓦提县', - 652929: '柯坪县', - 653001: '阿图什市', - 653022: '阿克陶县', - 653023: '阿合奇县', - 653024: '乌恰县', - 653101: '喀什市', - 653121: '疏附县', - 653122: '疏勒县', - 653123: '英吉沙县', - 653124: '泽普县', - 653125: '莎车县', - 653126: '叶城县', - 653127: '麦盖提县', - 653128: '岳普湖县', - 653129: '伽师县', - 653130: '巴楚县', - 653131: '塔什库尔干塔吉克自治县', - 653201: '和田市', - 653221: '和田县', - 653222: '墨玉县', - 653223: '皮山县', - 653224: '洛浦县', - 653225: '策勒县', - 653226: '于田县', - 653227: '民丰县', - 654002: '伊宁市', - 654003: '奎屯市', - 654004: '霍尔果斯市', - 654021: '伊宁县', - 654022: '察布查尔锡伯自治县', - 654023: '霍城县', - 654024: '巩留县', - 654025: '新源县', - 654026: '昭苏县', - 654027: '特克斯县', - 654028: '尼勒克县', - 654201: '塔城市', - 654202: '乌苏市', - 654221: '额敏县', - 654223: '沙湾县', - 654224: '托里县', - 654225: '裕民县', - 654226: '和布克赛尔蒙古自治县', - 654301: '阿勒泰市', - 654321: '布尔津县', - 654322: '富蕴县', - 654323: '福海县', - 654324: '哈巴河县', - 654325: '青河县', - 654326: '吉木乃县', - 659001: '石河子市', - 659002: '阿拉尔市', - 659003: '图木舒克市', - 659004: '五家渠市', - 659005: '北屯市', - 659006: '铁门关市', - 659007: '双河市', - 659008: '可克达拉市', - 659009: '昆玉市', - 710101: '中正区', - 710102: '大同区', - 710103: '中山区', - 710104: '松山区', - 710105: '大安区', - 710106: '万华区', - 710107: '信义区', - 710108: '士林区', - 710109: '北投区', - 710110: '内湖区', - 710111: '南港区', - 710112: '文山区', - 710199: '其它区', - 710201: '新兴区', - 710202: '前金区', - 710203: '芩雅区', - 710204: '盐埕区', - 710205: '鼓山区', - 710206: '旗津区', - 710207: '前镇区', - 710208: '三民区', - 710209: '左营区', - 710210: '楠梓区', - 710211: '小港区', - 710241: '苓雅区', - 710242: '仁武区', - 710243: '大社区', - 710244: '冈山区', - 710245: '路竹区', - 710246: '阿莲区', - 710247: '田寮区', - 710248: '燕巢区', - 710249: '桥头区', - 710250: '梓官区', - 710251: '弥陀区', - 710252: '永安区', - 710253: '湖内区', - 710254: '凤山区', - 710255: '大寮区', - 710256: '林园区', - 710257: '鸟松区', - 710258: '大树区', - 710259: '旗山区', - 710260: '美浓区', - 710261: '六龟区', - 710262: '内门区', - 710263: '杉林区', - 710264: '甲仙区', - 710265: '桃源区', - 710266: '那玛夏区', - 710267: '茂林区', - 710268: '茄萣区', - 710299: '其它区', - 710301: '中西区', - 710302: '东区', - 710303: '南区', - 710304: '北区', - 710305: '安平区', - 710306: '安南区', - 710339: '永康区', - 710340: '归仁区', - 710341: '新化区', - 710342: '左镇区', - 710343: '玉井区', - 710344: '楠西区', - 710345: '南化区', - 710346: '仁德区', - 710347: '关庙区', - 710348: '龙崎区', - 710349: '官田区', - 710350: '麻豆区', - 710351: '佳里区', - 710352: '西港区', - 710353: '七股区', - 710354: '将军区', - 710355: '学甲区', - 710356: '北门区', - 710357: '新营区', - 710358: '后壁区', - 710359: '白河区', - 710360: '东山区', - 710361: '六甲区', - 710362: '下营区', - 710363: '柳营区', - 710364: '盐水区', - 710365: '善化区', - 710366: '大内区', - 710367: '山上区', - 710368: '新市区', - 710369: '安定区', - 710399: '其它区', - 710401: '中区', - 710402: '东区', - 710403: '南区', - 710404: '西区', - 710405: '北区', - 710406: '北屯区', - 710407: '西屯区', - 710408: '南屯区', - 710431: '太平区', - 710432: '大里区', - 710433: '雾峰区', - 710434: '乌日区', - 710435: '丰原区', - 710436: '后里区', - 710437: '石冈区', - 710438: '东势区', - 710439: '和平区', - 710440: '新社区', - 710441: '潭子区', - 710442: '大雅区', - 710443: '神冈区', - 710444: '大肚区', - 710445: '沙鹿区', - 710446: '龙井区', - 710447: '梧栖区', - 710448: '清水区', - 710449: '大甲区', - 710450: '外埔区', - 710451: '大安区', - 710499: '其它区', - 710507: '金沙镇', - 710508: '金湖镇', - 710509: '金宁乡', - 710510: '金城镇', - 710511: '烈屿乡', - 710512: '乌坵乡', - 710614: '南投市', - 710615: '中寮乡', - 710616: '草屯镇', - 710617: '国姓乡', - 710618: '埔里镇', - 710619: '仁爱乡', - 710620: '名间乡', - 710621: '集集镇', - 710622: '水里乡', - 710623: '鱼池乡', - 710624: '信义乡', - 710625: '竹山镇', - 710626: '鹿谷乡', - 710701: '仁爱区', - 710702: '信义区', - 710703: '中正区', - 710704: '中山区', - 710705: '安乐区', - 710706: '暖暖区', - 710707: '七堵区', - 710799: '其它区', - 710801: '东区', - 710802: '北区', - 710803: '香山区', - 710899: '其它区', - 710901: '东区', - 710902: '西区', - 710999: '其它区', - 711130: '万里区', - 711132: '板桥区', - 711133: '汐止区', - 711134: '深坑区', - 711135: '石碇区', - 711136: '瑞芳区', - 711137: '平溪区', - 711138: '双溪区', - 711139: '贡寮区', - 711140: '新店区', - 711141: '坪林区', - 711142: '乌来区', - 711143: '永和区', - 711144: '中和区', - 711145: '土城区', - 711146: '三峡区', - 711147: '树林区', - 711148: '莺歌区', - 711149: '三重区', - 711150: '新庄区', - 711151: '泰山区', - 711152: '林口区', - 711153: '芦洲区', - 711154: '五股区', - 711155: '八里区', - 711156: '淡水区', - 711157: '三芝区', - 711158: '石门区', - 711287: '宜兰市', - 711288: '头城镇', - 711289: '礁溪乡', - 711290: '壮围乡', - 711291: '员山乡', - 711292: '罗东镇', - 711293: '三星乡', - 711294: '大同乡', - 711295: '五结乡', - 711296: '冬山乡', - 711297: '苏澳镇', - 711298: '南澳乡', - 711299: '钓鱼台', - 711387: '竹北市', - 711388: '湖口乡', - 711389: '新丰乡', - 711390: '新埔镇', - 711391: '关西镇', - 711392: '芎林乡', - 711393: '宝山乡', - 711394: '竹东镇', - 711395: '五峰乡', - 711396: '横山乡', - 711397: '尖石乡', - 711398: '北埔乡', - 711399: '峨眉乡', - 711414: '中坜区', - 711415: '平镇区', - 711417: '杨梅区', - 711418: '新屋区', - 711419: '观音区', - 711420: '桃园区', - 711421: '龟山区', - 711422: '八德区', - 711423: '大溪区', - 711425: '大园区', - 711426: '芦竹区', - 711487: '中坜市', - 711488: '平镇市', - 711489: '龙潭乡', - 711490: '杨梅市', - 711491: '新屋乡', - 711492: '观音乡', - 711493: '桃园市', - 711494: '龟山乡', - 711495: '八德市', - 711496: '大溪镇', - 711497: '复兴乡', - 711498: '大园乡', - 711499: '芦竹乡', - 711520: '头份市', - 711582: '竹南镇', - 711583: '头份镇', - 711584: '三湾乡', - 711585: '南庄乡', - 711586: '狮潭乡', - 711587: '后龙镇', - 711588: '通霄镇', - 711589: '苑里镇', - 711590: '苗栗市', - 711591: '造桥乡', - 711592: '头屋乡', - 711593: '公馆乡', - 711594: '大湖乡', - 711595: '泰安乡', - 711596: '铜锣乡', - 711597: '三义乡', - 711598: '西湖乡', - 711599: '卓兰镇', - 711736: '员林市', - 711774: '彰化市', - 711775: '芬园乡', - 711776: '花坛乡', - 711777: '秀水乡', - 711778: '鹿港镇', - 711779: '福兴乡', - 711780: '线西乡', - 711781: '和美镇', - 711782: '伸港乡', - 711783: '员林镇', - 711784: '社头乡', - 711785: '永靖乡', - 711786: '埔心乡', - 711787: '溪湖镇', - 711788: '大村乡', - 711789: '埔盐乡', - 711790: '田中镇', - 711791: '北斗镇', - 711792: '田尾乡', - 711793: '埤头乡', - 711794: '溪州乡', - 711795: '竹塘乡', - 711796: '二林镇', - 711797: '大城乡', - 711798: '芳苑乡', - 711799: '二水乡', - 711982: '番路乡', - 711983: '梅山乡', - 711984: '竹崎乡', - 711985: '阿里山乡', - 711986: '中埔乡', - 711987: '大埔乡', - 711988: '水上乡', - 711989: '鹿草乡', - 711990: '太保市', - 711991: '朴子市', - 711992: '东石乡', - 711993: '六脚乡', - 711994: '新港乡', - 711995: '民雄乡', - 711996: '大林镇', - 711997: '溪口乡', - 711998: '义竹乡', - 711999: '布袋镇', - 712180: '斗南镇', - 712181: '大埤乡', - 712182: '虎尾镇', - 712183: '土库镇', - 712184: '褒忠乡', - 712185: '东势乡', - 712186: '台西乡', - 712187: '仑背乡', - 712188: '麦寮乡', - 712189: '斗六市', - 712190: '林内乡', - 712191: '古坑乡', - 712192: '莿桐乡', - 712193: '西螺镇', - 712194: '二仑乡', - 712195: '北港镇', - 712196: '水林乡', - 712197: '口湖乡', - 712198: '四湖乡', - 712199: '元长乡', - 712451: '崁顶乡', - 712467: '屏东市', - 712468: '三地门乡', - 712469: '雾台乡', - 712470: '玛家乡', - 712471: '九如乡', - 712472: '里港乡', - 712473: '高树乡', - 712474: '盐埔乡', - 712475: '长治乡', - 712476: '麟洛乡', - 712477: '竹田乡', - 712478: '内埔乡', - 712479: '万丹乡', - 712480: '潮州镇', - 712481: '泰武乡', - 712482: '来义乡', - 712483: '万峦乡', - 712484: '莰顶乡', - 712485: '新埤乡', - 712486: '南州乡', - 712487: '林边乡', - 712488: '东港镇', - 712489: '琉球乡', - 712490: '佳冬乡', - 712491: '新园乡', - 712492: '枋寮乡', - 712493: '枋山乡', - 712494: '春日乡', - 712495: '狮子乡', - 712496: '车城乡', - 712497: '牡丹乡', - 712498: '恒春镇', - 712499: '满州乡', - 712584: '台东市', - 712585: '绿岛乡', - 712586: '兰屿乡', - 712587: '延平乡', - 712588: '卑南乡', - 712589: '鹿野乡', - 712590: '关山镇', - 712591: '海端乡', - 712592: '池上乡', - 712593: '东河乡', - 712594: '成功镇', - 712595: '长滨乡', - 712596: '金峰乡', - 712597: '大武乡', - 712598: '达仁乡', - 712599: '太麻里乡', - 712686: '花莲市', - 712687: '新城乡', - 712688: '太鲁阁', - 712689: '秀林乡', - 712690: '吉安乡', - 712691: '寿丰乡', - 712692: '凤林镇', - 712693: '光复乡', - 712694: '丰滨乡', - 712695: '瑞穗乡', - 712696: '万荣乡', - 712697: '玉里镇', - 712698: '卓溪乡', - 712699: '富里乡', - 712794: '马公市', - 712795: '西屿乡', - 712796: '望安乡', - 712797: '七美乡', - 712798: '白沙乡', - 712799: '湖西乡', - 712896: '南竿乡', - 712897: '北竿乡', - 712898: '东引乡', - 712899: '莒光乡', - 810101: '中西区', - 810102: '湾仔区', - 810103: '东区', - 810104: '南区', - 810201: '九龙城区', - 810202: '油尖旺区', - 810203: '深水埗区', - 810204: '黄大仙区', - 810205: '观塘区', - 810301: '北区', - 810302: '大埔区', - 810303: '沙田区', - 810304: '西贡区', - 810305: '元朗区', - 810306: '屯门区', - 810307: '荃湾区', - 810308: '葵青区', - 810309: '离岛区', - 820102: '花地玛堂区', - 820103: '花王堂区', - 820104: '望德堂区', - 820105: '大堂区', - 820106: '风顺堂区', - 820202: '嘉模堂区', - 820203: '路氹填海区', - 820204: '圣方济各堂区' - } -}; diff --git a/smart-admin-h5/src/constants/erp/contact-company.js b/smart-admin-h5/src/constants/erp/contact-company.js deleted file mode 100644 index b3730d9b..00000000 --- a/smart-admin-h5/src/constants/erp/contact-company.js +++ /dev/null @@ -1,165 +0,0 @@ -/** - * 往来单位性质 - * @type {{ENTERPRISE: {value: number, desc: string}, PERSONAL: {value: number, desc: string}}} - */ -export const CONTACT_COMPANY_NATURE_ENUM = - { - ENTERPRISE: { - value: 0, - desc: '企业' - }, - PERSONAL: { - value: 1, - desc: '个人' - } - }; -/** - * 往来机构类型 - * @type {{CUSTOMER: {value: number, desc: string}, SUPPLIER: {value: number, desc: string}}} - */ -export const - CONTACT_COMPANY_TYPE_ENUM = - { - CUSTOMER: { - value: 0, - desc: '客户' - }, - SUPPLIER: { - value: 1, - desc: '供应商' - }, - SCHOOL: { - value: 2, - desc: '分校' - }, - COOPERATIVE_ORG: { - value: 3, - desc: '合作机构' - } - }; - -/** - * 付款方式 - * @type {{BANK: {value: number, desc: string}, ZHI_FU_BAO: {value: number, desc: string}, WE_CHAT: {value: number, desc: string}}} - */ -export const - PAYMENT_TYPE_ENUM = - { - BANK: { - value: 0, - desc: '银行卡' - }, - WE_CHAT: { - value: 1, - desc: '微信' - }, - ZHI_FU_BAO: { - value: 2, - desc: '支付宝' - } - }; - -/** - * 往来机构余额类型 - * @type {{RECEIVE_BALANCE: {value: number, desc: string}, PAY_BALANCE: {value: number, desc: string}}} - */ -export const - CONTACT_COMPANY_BALANCE_TYPE = - { - PAY_BALANCE: { - value: 0, - desc: '应付款余额' - }, - RECEIVE_BALANCE: { - value: 1, - desc: '应收款余额' - } - }; - -/** - * 往来单位等级 - * @type {{CORE: {value: number, desc: string}, POTENTIAL: {value: number, desc: string}, BAD: {value: number, desc: string}, GENERAL: {value: number, desc: string}}} - */ -export const CONTACT_COMPANY_GRADE_ENUM = { - CORE: { - value: 1, - desc: '核心', - color: 'green' - }, - POTENTIAL: { - value: 2, - desc: '有潜力', - color: 'cyan' - }, - GENERAL: { - value: 3, - desc: '普通', - color: 'blue' - }, - BAD: { - value: 4, - desc: '较差', - color: 'purple' - } -}; - -/** - * 往来单位等级 - * @type {{OWNER: {value: number, desc: string}, SHARER: {value: number, desc: string}, COMMON: {value: number, desc: string}}} - */ -export const CONTACT_COMPANY_SHARE_TYPE_ENUM = { - OWNER: { - value: 0, - desc: '属于我的' - }, - SHARER: { - value: 1, - desc: '共享的' - }, - COMMON: { - value: 2, - desc: '公共的' - } -}; - -/** - * 往来单位标签 - * @type {{OWNER: {value: number, desc: string}, SHARER: {value: number, desc: string}, COMMON: {value: number, desc: string}}} - */ -export const CONTACT_COMPANY_TAG_ENUM = { - POTENTIAL: { - value: 0, - desc: '潜在', - color: 'green' - }, - INTENTION: { - value: 1, - desc: '意向', - color: 'cyan' - }, - NEGOTIATION: { - value: 2, - desc: '洽谈', - color: 'blue' - }, - DEAL: { - value: 3, - desc: '成交', - color: 'geekblue' - }, - LOSS: { - value: 4, - desc: '流失', - color: 'red' - } -}; - -export default { - CONTACT_COMPANY_NATURE_ENUM, - CONTACT_COMPANY_TYPE_ENUM, - PAYMENT_TYPE_ENUM, - CONTACT_COMPANY_BALANCE_TYPE, - CONTACT_COMPANY_GRADE_ENUM, - CONTACT_COMPANY_SHARE_TYPE_ENUM, - CONTACT_COMPANY_TAG_ENUM -}; diff --git a/smart-admin-h5/src/constants/erp/index.js b/smart-admin-h5/src/constants/erp/index.js deleted file mode 100644 index b14cb861..00000000 --- a/smart-admin-h5/src/constants/erp/index.js +++ /dev/null @@ -1,6 +0,0 @@ -import contactCompany from './contact-company'; - -export default { - ...contactCompany -}; - diff --git a/smart-admin-h5/src/constants/file.js b/smart-admin-h5/src/constants/file.js deleted file mode 100644 index cc72166b..00000000 --- a/smart-admin-h5/src/constants/file.js +++ /dev/null @@ -1,92 +0,0 @@ -export const COMMON_FILE_FOLDER_TYPE_ENUM = { - DISPLAY_PIC: { - value: 1, - desc: '轮播展示图' - }, - RESOURCE_LECTURER: { - value: 2, - desc: '资源-讲师图片' - }, - RESOURCE_FILE: { - value: 3, - desc: '资源-文件资源' - }, - USER_AVATAR: { - value: 4, - desc: '用户头像' - }, - STOCK_BASIC: { - value: 5, - desc: '货物基本信息图片' - }, - PUBLICATION_QR_CODE: { - value: 6, - desc: '出版物二维码图片' - }, - RESOURCE_PAGE_QR_CODE: { - value: 7, - desc: '资源页面链接二维码图片' - }, - FINANCE_RECEIVE_QR_CODE: { - value: 8, - desc: '财务收款二维码' - }, - FINANCE_WX_PAY_CERT: { - value: 9, - desc: '财务-微信支付证书' - }, - GOODS: { - value: 10, - desc: '商品图片-公用文件夹' - }, - EXCEL_EXPORT: { - value: 11, - desc: 'excel导出-私有文件夹' - }, - FINANCE_WAIT_PAYMENT_PAYMENT_PROOF: { - value: 12, - desc: '财务待支付支付凭证' - }, - FEEDBACK: { - value: 99, - desc: '用户反馈图片' - }, - EDITOR: { - value: 100, - desc: '文本编辑器' - }, - EDITOR_IMG: { - value: 100, - desc: '文本编辑器' - }, - INTERNAL_INFORMATION: { - value: 14, - desc: '内部资料' - }, - CRM_USER: { - value: 111, - desc: 'CRM学员跟进附件' - }, - CRM_SCHOOL: { - value: 112, - desc: 'CRM分校跟进附件' - }, - // = =======erp 相关 begin============ - ERP_STOCK_IMG: { - value: 201, - desc: '货物图片' - }, - ERP_CONTACT_COMPANY_RECEIVE_IMAGE: { - value: 210, - desc: '往来单位收款二维码' - }, - ERP_CONTACT_COMPANY_ATTACHMENT: { - value: 211, - desc: '往来单位附件' - } - // = =======erp 相关 end ============ -}; - -export default { - COMMON_FILE_FOLDER_TYPE_ENUM -}; diff --git a/smart-admin-h5/src/constants/index.js b/smart-admin-h5/src/constants/index.js deleted file mode 100644 index 384b7029..00000000 --- a/smart-admin-h5/src/constants/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import school from '@/constants/school'; -import erp from './erp'; - -export default { - ...school, - ...erp -}; diff --git a/smart-admin-h5/src/constants/school.js b/smart-admin-h5/src/constants/school.js deleted file mode 100644 index aa69bd01..00000000 --- a/smart-admin-h5/src/constants/school.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * 分校标签 - */ -export const SCHOOL_TAG_ENUM = { - POTENTIAL: { - value: 0, - desc: '潜在' - }, - INTENTION: { - value: 1, - desc: '意向' - }, - NEGOTIATION: { - value: 2, - desc: '洽谈' - }, - DEAL: { - value: 3, - desc: '成交' - }, - LOSS: { - value: 4, - desc: '流失' - } -}; - -/** - * 分校等级 - */ -export const SCHOOL_GRADE_ENUM = { - CORE: { - value: 1, - desc: '核心' - }, - POTENTIAL: { - value: 2, - desc: '有潜力' - }, - GENERAL: { - value: 3, - desc: '普通' - }, - BAD: { - value: 4, - desc: '较差' - } -}; - -/** - * 共享类型 - */ -export const SCHOOL_SHARE_TYPE_ENUM = { - OWNER: { - value: 0, - desc: '属于我的' - }, - SHARER: { - value: 1, - desc: '共享的' - }, - COMMON: { - value: 2, - desc: '公共的' - } -}; - -export default { - SCHOOL_TAG_ENUM, - SCHOOL_GRADE_ENUM, - SCHOOL_SHARE_TYPE_ENUM -}; diff --git a/smart-admin-h5/src/filters/filter.js b/smart-admin-h5/src/filters/filter.js deleted file mode 100644 index 5bb102f2..00000000 --- a/smart-admin-h5/src/filters/filter.js +++ /dev/null @@ -1,298 +0,0 @@ -import Vue from 'vue'; - -function ellipsis(value, length) { - if (!value) return ''; - if (value.length > length) { - return value.slice(0, length) + '...'; - } - return value; -} - -/** - * 去除空格 type 1-所有空格 2-前后空格 3-前空格 4-后空格 - */ -function trim(value, trim) { - switch (trim) { - case 1: - return value.replace(/\s+/g, ''); - case 2: - return value.replace(/(^\s*)|(\s*$)/g, ''); - case 3: - return value.replace(/(^\s*)/g, ''); - case 4: - return value.replace(/(\s*$)/g, ''); - default: - return value; - } -} - -/** - * 任意格式日期处理 - 使用格式: - {{ '2018-09-14 01:05' | formatDate(yyyy-MM-dd hh:mm:ss) }} - {{ '2018-09-14 01:05' | formatDate(yyyy-MM-dd) }} - {{ '2018-09-14 01:05' | formatDate(MM/dd) }} 等 - - * @param value - * @param fmt - * @returns {*} - */ -function formatDate(value, fmt) { - var date = new Date(value); - var o = { - 'M+': date.getMonth() + 1, // 月份 - 'd+': date.getDate(), // 日 - 'h+': date.getHours(), // 小时 - 'm+': date.getMinutes(), // 分 - 's+': date.getSeconds(), // 秒 - 'w+': date.getDay(), // 星期 - 'q+': Math.floor((date.getMonth() + 3) / 3), // 季度 - 'S': date.getMilliseconds() // 毫秒 - }; - if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length)); - for (var k in o) { - if (k === 'w+') { - if (o[k] === 0) { - fmt = fmt.replace('w', '周日'); - } else if (o[k] === 1) { - fmt = fmt.replace('w', '周一'); - } else if (o[k] === 2) { - fmt = fmt.replace('w', '周二'); - } else if (o[k] === 3) { - fmt = fmt.replace('w', '周三'); - } else if (o[k] === 4) { - fmt = fmt.replace('w', '周四'); - } else if (o[k] === 5) { - fmt = fmt.replace('w', '周五'); - } else if (o[k] === 6) { - fmt = fmt.replace('w', '周六'); - } - } else if (new RegExp('(' + k + ')').test(fmt)) { - fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length))); - } - } - return fmt; -} - -/** - * 字母大小写切换 - type - 1:首字母大写 - 2:首页母小写 - 3:大小写转换 - 4:全部大写 - 5:全部小写 - * @param str - * @param type - * @returns {string|*} - */ -function changeCase(str, type) { - function ToggleCase(str) { - var itemText = ''; - str.split('').forEach( - function(item) { - if (/^([a-z]+)/.test(item)) { - itemText += item.toUpperCase(); - } else if (/^([A-Z]+)/.test(item)) { - itemText += item.toLowerCase(); - } else { - itemText += item; - } - }); - return itemText; - } - - switch (type) { - case 1: - return str.replace(/\b\w+\b/g, function(word) { - return word.substring(0, 1).toUpperCase() + word.substring(1).toLowerCase(); - }); - case 2: - return str.replace(/\b\w+\b/g, function(word) { - return word.substring(0, 1).toLowerCase() + word.substring(1).toUpperCase(); - }); - case 3: - return ToggleCase(str); - case 4: - return str.toUpperCase(); - case 5: - return str.toLowerCase(); - default: - return str; - } -} - -/** - * 字符串循环复制,count->次数 - */ -function repeatStr(str, count) { - var text = ''; - for (var i = 0; i < count; i++) { - text += str; - } - return text; -} - -/** - * 字符串替换 - */ -function replaceAll(str, AFindText, ARepText) { - const raRegExp = new RegExp(AFindText, 'g'); - return str.replace(raRegExp, ARepText); -} - -/** - * - * 字符替换*,隐藏手机号或者身份证号等 - replaceStr(字符串,字符格式, 替换方式,替换的字符(默认*)) - ecDo.replaceStr('18819322663',[3,5,3],0) - result:188*****663 - ecDo.replaceStr('asdasdasdaa',[3,5,3],1) - result:***asdas*** - ecDo.replaceStr('1asd88465asdwqe3',[5],0) - result:*****8465asdwqe3 - ecDo.replaceStr('1asd88465asdwqe3',[5],1,'+') - result:"1asd88465as+++++" - * - * @param str - * @param regArr - * @param type - * @param ARepText - * @returns {*} - */ -function replaceStr(str, regArr, type, ARepText) { - var regtext = ''; - var Reg = null; - var replaceText = ARepText || '*'; - // repeatStr是在上面定义过的(字符串循环复制),大家注意哦 - if (regArr.length === 3 && type === 0) { - regtext = '(\\w{' + regArr[0] + '})\\w{' + regArr[1] + '}(\\w{' + regArr[2] + '})'; - Reg = new RegExp(regtext); - var replaceCount = this.repeatStr(replaceText, regArr[1]); - return str.replace(Reg, '$1' + replaceCount + '$2'); - } else if (regArr.length === 3 && type === 1) { - regtext = '\\w{' + regArr[0] + '}(\\w{' + regArr[1] + '})\\w{' + regArr[2] + '}'; - Reg = new RegExp(regtext); - var replaceCount1 = this.repeatStr(replaceText, regArr[0]); - var replaceCount2 = this.repeatStr(replaceText, regArr[2]); - return str.replace(Reg, replaceCount1 + '$1' + replaceCount2); - } else if (regArr.length === 1 && type === 0) { - regtext = '(^\\w{' + regArr[0] + '})'; - Reg = new RegExp(regtext); - var replaceCount = this.repeatStr(replaceText, regArr[0]); - return str.replace(Reg, replaceCount); - } else if (regArr.length === 1 && type === 1) { - regtext = '(\\w{' + regArr[0] + '}$)'; - Reg = new RegExp(regtext); - var replaceCount = this.repeatStr(replaceText, regArr[0]); - return str.replace(Reg, replaceCount); - } -} - -/** - * 格式化处理字符串 - ecDo.formatText('1234asda567asd890') - result:"12,34a,sda,567,asd,890" - ecDo.formatText('1234asda567asd890',4,' ') - result:"1 234a sda5 67as d890" - ecDo.formatText('1234asda567asd890',4,'-') - result:"1-234a-sda5-67as-d890" - - * @param str - * @param size - * @param delimiter - * @returns {*} - */ -function formatText(str, size, delimiter) { - var _size = size || 3; - var _delimiter = delimiter || ','; - var regText = '\\B(?=(\\w{' + _size + '})+(?!\\w))'; - var reg = new RegExp(regText, 'g'); - return str.replace(reg, _delimiter); -} - -/** - * 现金额大写转换函数 - ecDo.upDigit(168752632) - result:"人民币壹亿陆仟捌佰柒拾伍万贰仟陆佰叁拾贰元整" - ecDo.upDigit(1682) - result:"人民币壹仟陆佰捌拾贰元整" - ecDo.upDigit(-1693) - result:"欠人民币壹仟陆佰玖拾叁元整" - * @param n - * @returns {string} - */ -function upDigit(n) { - var fraction = ['角', '分', '厘']; - var digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']; - var unit = [ - ['元', '万', '亿'], - ['', '拾', '佰', '仟'] - ]; - var head = n < 0 ? '欠人民币' : '人民币'; - n = Math.abs(n); - var s = ''; - for (var i = 0; i < fraction.length; i++) { - s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, ''); - } - s = s || '整'; - n = Math.floor(n); - for (var i = 0; i < unit[0].length && n > 0; i++) { - var p = ''; - for (var j = 0; j < unit[1].length && n > 0; j++) { - p = digit[n % 10] + unit[1][j] + p; - n = Math.floor(n / 10); - } - s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s; - // s = p + unit[0][i] + s; - } - return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整'); -} - -// 保留2位小数 -function toFixed(val, acc) { - let num = parseFloat(val); - if (isNaN(num)) { - num = 0; - } - let accuracy = parseInt(acc); - if (isNaN(accuracy) || accuracy < 0 || accuracy > 10) { - accuracy = 2; - } - return num.toFixed(accuracy); -} - -// 转百分比 -function toPercent(val, acc) { - let num = parseFloat(val); - if (isNaN(num)) { - num = 0; - } - let accuracy = parseInt(acc); - if (isNaN(accuracy) || accuracy < 0 || accuracy > 10) { - accuracy = 2; - } - return (num * 100).toFixed(accuracy) + '%'; -} - -// ------------ enum begin ------------ -function getEnumDescByValue(value, enumName) { - return Vue.prototype.$enum.getDescByValue(enumName, value); -} - -// ------------ enum end ------------ - -export { - trim, - changeCase, - repeatStr, - replaceAll, - replaceStr, - formatText, - upDigit, - toFixed, - formatDate, - toPercent, - getEnumDescByValue, - ellipsis -}; diff --git a/smart-admin-h5/src/filters/index.js b/smart-admin-h5/src/filters/index.js deleted file mode 100644 index 484c0dc0..00000000 --- a/smart-admin-h5/src/filters/index.js +++ /dev/null @@ -1,5 +0,0 @@ -import Vue from 'vue' - -import * as filter from './filter' - -Object.keys(filter).forEach(key => Vue.filter(key, filter[key])) diff --git a/smart-admin-h5/src/lib/cookie.js b/smart-admin-h5/src/lib/cookie.js deleted file mode 100644 index 83386119..00000000 --- a/smart-admin-h5/src/lib/cookie.js +++ /dev/null @@ -1,21 +0,0 @@ -import Cookies from 'js-cookie'; -import config from '@/config'; -const { cookieExpires } = config; -export const TOKEN_KEY = 'token'; - -export default { - setToken: token => { - Cookies.set(TOKEN_KEY, token, { - // token在Cookie中存储的天数,默认1天 - expires: cookieExpires || 7 - }); - }, - getToken: () => { - const token = Cookies.get(TOKEN_KEY); - if (token) return token; - else return null; - }, - clearToken: () => { - Cookies.remove(TOKEN_KEY); - } -}; diff --git a/smart-admin-h5/src/lib/erp-http.js b/smart-admin-h5/src/lib/erp-http.js deleted file mode 100644 index 3f4766f8..00000000 --- a/smart-admin-h5/src/lib/erp-http.js +++ /dev/null @@ -1,65 +0,0 @@ -import Axios from 'axios'; -import config from '@/config'; -import cookie from '@/lib/cookie'; -import { Toast } from 'vant'; - -export const baseUrl = config.baseUrl.erpApiUrl; - -const axios = Axios.create({ - baseURL: baseUrl, - timeout: 30000, - headers: { - 'Content-Type': 'application/json; charset=utf-8' - } -}); - -// 添加请求拦截器 -axios.interceptors.request.use( - function(config) { - const token = cookie.getToken(); - if (token) { - config.headers['x-access-token'] = token; - } - return config; - }, - function(error) { - return Promise.reject(error); - } -); - -// 添加响应拦截器 -axios.interceptors.response.use( - res => { - const { data } = res; - if (data && data.code && data.code !== 1) { - if (data.code === 121) { - cookie.clearToken(); - localStorage.clear(); - window.location.href = window.location.pathname + '#/login'; - Toast.fail('未登录,或登录失效,请登录'); - return; - } else if (data.code === 502) { - window.location.href = window.location.pathname + '#/500'; - return; - } else { - Toast.fail(data.msg); - return Promise.reject(res); - } - } - return Promise.resolve(data); - }, - error => { - Toast.fail('服务内部错误'); - return Promise.reject(error); - } -); - -export const postAxios = (url, data, config) => { - return axios.post(url, data, config); -}; - -export const getAxios = (url, data) => { - return axios.get(url, { - params: data - }); -}; diff --git a/smart-admin-h5/src/lib/http.js b/smart-admin-h5/src/lib/http.js deleted file mode 100644 index b4c86937..00000000 --- a/smart-admin-h5/src/lib/http.js +++ /dev/null @@ -1,65 +0,0 @@ -import Axios from 'axios'; -import config from '@/config'; -import cookie from '@/lib/cookie'; -import { Toast } from 'vant'; - -export const baseUrl = config.baseUrl.apiUrl; - -const axios = Axios.create({ - baseURL: baseUrl, - timeout: 30000, - headers: { - 'Content-Type': 'application/json; charset=utf-8' - } -}); - -// 添加请求拦截器 -axios.interceptors.request.use( - function(config) { - const token = cookie.getToken(); - if (token) { - config.headers['x-access-token'] = token; - } - return config; - }, - function(error) { - return Promise.reject(error); - } -); - -// 添加响应拦截器 -axios.interceptors.response.use( - res => { - const { data } = res; - if (data && data.code && data.code !== 1) { - if (data.code === 1001) { - cookie.clearToken(); - localStorage.clear(); - window.location.href = window.location.pathname + '#/login'; - Toast.fail('未登录,或登录失效,请登录'); - return; - } else if (data.code === 502) { - window.location.href = window.location.pathname + '#/500'; - return; - } else { - Toast.fail(data.msg); - return Promise.reject(res); - } - } - return Promise.resolve(data); - }, - error => { - Toast.fail('服务内部错误'); - return Promise.reject(error); - } -); - -export const postAxios = (url, data, config) => { - return axios.post(url, data, config); -}; - -export const getAxios = (url, data) => { - return axios.get(url, { - params: data - }); -}; diff --git a/smart-admin-h5/src/lib/local.js b/smart-admin-h5/src/lib/local.js deleted file mode 100644 index c19d7e3d..00000000 --- a/smart-admin-h5/src/lib/local.js +++ /dev/null @@ -1,8 +0,0 @@ -export const localSave = (key, value) => { - localStorage.setItem(key, value); -}; - -export const localRead = key => { - return localStorage.getItem(key) || ''; -}; - diff --git a/smart-admin-h5/src/lib/menu-func.js b/smart-admin-h5/src/lib/menu-func.js deleted file mode 100644 index 914d5379..00000000 --- a/smart-admin-h5/src/lib/menu-func.js +++ /dev/null @@ -1,276 +0,0 @@ -import { forEach, hasOneOf, objEqual } from '@/lib/util'; -import config from '@/config'; -import { localRead, localSave } from '@/lib/local'; -const { title, useI18n } = config; -export const hasChild = item => { - return item.children && item.children.length !== 0; -}; - -/** - * 通过权限过滤菜单 - * @param {Object} map 权限对象 - * @param {Array} menuList 菜单列表 - * @returns {Array} - */ -export const getShowMenu = (map = {}, menuList, access = false) => { - // 判断是否为超级管理员 - if (access) { - return menuList; - } - // 返回的菜单列表 - let result = []; - for (let menuItem of menuList) { - let routerObj = JSON.parse(JSON.stringify(menuItem)); - if ( - map.hasOwnProperty(menuItem.name) && - (menuItem.name !== 'home' && menuItem.name !== '_home') - ) { - // 判断该菜单权限下是否为数组,若为数组,则为功能点权限否则为子菜单 - if (getType(map[routerObj.name]) === 'array') { - let funcPrivilege = localRead('funcPrivilegeInfo') - ? JSON.parse(localRead('funcPrivilegeInfo')) - : {}; - localSave( - 'funcPrivilegeInfo', - JSON.stringify({ - ...funcPrivilege, - [routerObj.name]: map[routerObj.name] - }) - ); - } else if ( - getType(map[routerObj.name]) !== 'array' && - !routerObj.children - ) { - // 判断是否为二级菜单,若是则需要多枚举一层赋值 - let funcPrivilege = localRead('funcPrivilegeInfo') - ? JSON.parse(localRead('funcPrivilegeInfo')) - : {}; - localSave( - 'funcPrivilegeInfo', - JSON.stringify({ - ...funcPrivilege, - [routerObj.name]: map[routerObj.name][routerObj.name] - }) - ); - } else if ( - getType(map[routerObj.name]) !== 'array' && - routerObj.children - ) { - // 循环子菜单权限 - routerObj.children = getShowMenu( - map[routerObj.name], - routerObj.children - ); - } - result.push(routerObj); - } - } - return result; -}; -// 获取数据类型 -export const getType = obj => { - return {}.toString - .call(obj) - .match(/\s([a-zA-Z]+)/)[1] - .toLowerCase(); -}; - -/** - * @description 本地存储和获取标签导航列表 - */ -export const setTagNavListInLocalStorage = list => { - localStorage.tagNaveList = JSON.stringify(list); -}; -/** - * @returns {Array} 其中的每个元素只包含路由原信息中的name, path, meta三项 - */ -export const getTagNavListFromLocalStorage = () => { - const list = localStorage.tagNaveList; - return list ? JSON.parse(list) : []; -}; -export const getBreadCrumbList = (route, homeRoute) => { - let homeItem = { - ...homeRoute, - icon: homeRoute.meta.icon - }; - let routeMatched = route.matched; - if (routeMatched.some(item => item.name === homeRoute.name)) { - return [homeItem]; - } - let res = routeMatched - .filter(item => { - return item.meta === undefined || !item.meta.hideInBread; - }) - .map(item => { - let meta = { - ...item.meta - }; - if (meta.title && typeof meta.title === 'function') { - meta.__titleIsFunction__ = true; - meta.title = meta.title(route); - } - let obj = { - icon: (item.meta && item.meta.icon) || '', - name: item.name, - meta: meta - }; - return obj; - }); - res = res.filter(item => { - return !item.meta.hideInMenu; - }); - return [...res]; -}; -/** - * @param {Array} routers 路由列表数组 - * @description 用于找到路由列表中name为home的对象 - */ -export const getHomeRoute = (routers, homeName = 'Home') => { - let i = -1; - let len = routers.length; - let homeRoute = {}; - while (++i < len) { - let item = routers[i]; - if (item.children && item.children.length) { - let res = getHomeRoute(item.children, homeName); - if (res.name) return res; - } else { - if (item.name === homeName) homeRoute = item; - } - } - return homeRoute; -}; -/** - * @param {Array} list 标签列表 - * @param {String} name 当前关闭的标签的name - */ -export const getNextRoute = (list, route) => { - let res = {}; - if (list.length === 2) { - res = getHomeRoute(list); - } else { - const index = list.findIndex(item => routeEqual(item, route)); - if (index === list.length - 1) res = list[list.length - 2]; - else res = list[index + 1]; - } - return res; -}; - -/** - * 判断打开的标签列表里是否已存在这个新添加的路由对象 - */ -export const routeHasExist = (tagNavList, routeItem) => { - let len = tagNavList.length; - let res = false; - doCustomTimes(len, index => { - if (routeEqual(tagNavList[index], routeItem)) res = true; - }); - return res; -}; -/** - * @param {*} list 现有标签导航列表 - * @param {*} newRoute 新添加的路由原信息对象 - * @description 如果该newRoute已经存在则不再添加 - */ -export const getNewTagList = (list, newRoute) => { - const { name, path, meta, query } = newRoute; - let newList = [...list]; - let index = newList.findIndex(item => item.name === name); - if (index >= 0) { - newList[index] = { name, path, meta, query }; - } else newList.push({ name, path, meta, query }); - return newList; -}; -export const routeEqual = (route1, route2) => { - return route1.name === route2.name; -}; -export const getRouteTitleHandled = route => { - let router = { - ...route - }; - let meta = { - ...route.meta - }; - let title = ''; - if (meta.title) { - if (typeof meta.title === 'function') { - meta.__titleIsFunction__ = true; - title = meta.title(router); - } else title = meta.title; - } - meta.title = title; - router.meta = meta; - return router; -}; -/** - * @param {Number} times 回调函数需要执行的次数 - * @param {Function} callback 回调函数 - */ -export const doCustomTimes = (times, callback) => { - let i = -1; - while (++i < times) { - callback(i); - } -}; -export const showTitle = (item, vm) => { - let { title, __titleIsFunction__ } = item.meta; - if (!title) return; - if (useI18n) { - if (title.includes('{{') && title.includes('}}') && useI18n) { - title = title.replace(/({{[\s\S]+?}})/, (m, str) => - str.replace(/{{([\s\S]*)}}/, (m, _) => vm.$t(_.trim())) - ); - } else if (__titleIsFunction__) title = item.meta.title; - else title = vm.$t(item.name); - } else title = (item.meta && item.meta.title) || item.name; - return title; -}; -/** - * @description 根据当前跳转的路由设置显示在浏览器标签的title - * @param {Object} routeItem 路由对象 - * @param {Object} vm Vue实例 - */ -export const setTitle = (routeItem, vm) => { - const handledRoute = getRouteTitleHandled(routeItem); - const pageTitle = showTitle(handledRoute, vm); - const resTitle = pageTitle ? `${pageTitle} - ${title}` : title; - window.document.title = resTitle; -}; - -export const findNodeUpper = (ele, tag) => { - if (ele.parentNode) { - if (ele.parentNode.tagName === tag.toUpperCase()) { - return ele.parentNode; - } else { - return findNodeUpper(ele.parentNode, tag); - } - } -}; - -export const findNodeUpperByClasses = (ele, classes) => { - let parentNode = ele.parentNode; - if (parentNode) { - let classList = parentNode.classList; - if ( - classList && - classes.every(className => classList.contains(className)) - ) { - return parentNode; - } else { - return findNodeUpperByClasses(parentNode, classes); - } - } -}; - -export const findNodeDownward = (ele, tag) => { - const tagName = tag.toUpperCase(); - if (ele.childNodes.length) { - let i = -1; - let len = ele.childNodes.length; - while (++i < len) { - let child = ele.childNodes[i]; - if (child.tagName === tagName) return child; - else return findNodeDownward(child, tag); - } - } -}; diff --git a/smart-admin-h5/src/lib/printPlugs.js b/smart-admin-h5/src/lib/printPlugs.js deleted file mode 100644 index 9c4295dd..00000000 --- a/smart-admin-h5/src/lib/printPlugs.js +++ /dev/null @@ -1,133 +0,0 @@ -// 打印类属性、方法定义 -/* eslint-disable */ -//第二个参数表明是否要关闭当前窗口 -const Print = function(dom, close, options) { - if (!(this instanceof Print)) return new Print(dom, close, options); - - this.options = this.extend( - { - noPrint: '.no-print' - }, - options - ); - - if (typeof dom === 'string') { - this.dom = document.querySelector(dom); - } else { - this.dom = dom; - } - - this.init(close); -}; -Print.prototype = { - init: function(close) { - var content = this.getStyle() + this.getHtml(); - this.writeIframe(content, close); - }, - extend: function(obj, obj2) { - for (var k in obj2) { - obj[k] = obj2[k]; - } - return obj; - }, - - getStyle: function() { - var str = '', - styles = document.querySelectorAll('style,link'); - for (var i = 0; i < styles.length; i++) { - str += styles[i].outerHTML; - } - str += - ''; - - return str; - }, - - getHtml: function() { - var inputs = document.querySelectorAll('input'); - var textareas = document.querySelectorAll('textarea'); - var selects = document.querySelectorAll('select'); - - for (var k in inputs) { - if (inputs[k].type == 'checkbox' || inputs[k].type == 'radio') { - if (inputs[k].checked == true) { - inputs[k].setAttribute('checked', 'checked'); - } else { - inputs[k].removeAttribute('checked'); - } - } else if (inputs[k].type == 'text') { - inputs[k].setAttribute('value', inputs[k].value); - } - } - - for (var k2 in textareas) { - if (textareas[k2].type == 'textarea') { - textareas[k2].innerHTML = textareas[k2].value; - } - } - - for (var k3 in selects) { - if (selects[k3].type == 'select-one') { - var child = selects[k3].children; - for (var i in child) { - if (child[i].tagName == 'OPTION') { - if (child[i].selected == true) { - child[i].setAttribute('selected', 'selected'); - } else { - child[i].removeAttribute('selected'); - } - } - } - } - } - return this.dom.outerHTML; - }, - - writeIframe: function(content, close) { - var w, - doc, - iframe = document.createElement('iframe'), - f = document.body.appendChild(iframe); - iframe.id = 'myIframe'; - iframe.style = 'position:absolute;'; - - w = f.contentWindow || f.contentDocument; - doc = f.contentDocument || f.contentWindow.document; - doc.open(); - doc.write(content); - doc.close(); - this.toPrint(w, close); - setTimeout(function() { - document.body.removeChild(iframe); - }, 500); - }, - - toPrint: function(frameWindow, close) { - try { - setTimeout(function() { - frameWindow.focus(); - try { - if (!frameWindow.document.execCommand('print', false, null)) { - frameWindow.print(); - } - } catch (e) { - frameWindow.print(); - } - frameWindow.close(); - if (close) { - window.close(); - } - }, 500); - } catch (err) { - console.log('err', err); - } - } -}; -const MyPlugin = {}; -MyPlugin.install = function(Vue, options) { - // 4. 添加实例方法 - Vue.prototype.$print = Print; -}; -export default MyPlugin; diff --git a/smart-admin-h5/src/lib/render-dom.js b/smart-admin-h5/src/lib/render-dom.js deleted file mode 100644 index 1cad207e..00000000 --- a/smart-admin-h5/src/lib/render-dom.js +++ /dev/null @@ -1,10 +0,0 @@ -export default { - name: 'RenderDom', - functional: true, - props: { - render: Function - }, - render: (h, ctx) => { - return ctx.props.render(h); - } -}; diff --git a/smart-admin-h5/src/lib/smart-sentry.js b/smart-admin-h5/src/lib/smart-sentry.js deleted file mode 100644 index 2ccd8f0a..00000000 --- a/smart-admin-h5/src/lib/smart-sentry.js +++ /dev/null @@ -1,21 +0,0 @@ -/* - * @Description: - * @Author: hanyu - * @Date: 2020-05-28 12:46:06 - * @LastEditTime: 2020-07-08 09:16:15 - * @LastEditors: hy - */ -// smart sentry -import * as Sentry from '@sentry/browser'; -export default { - /** - * sentry 主动上报 - * @param {error} error 错误信息 - */ - captureException: (error) => { - if (error.config && error.data && error && error.headers && error.request && error.status) { - return; - } - Sentry.captureException(error); - } -}; diff --git a/smart-admin-h5/src/lib/util.js b/smart-admin-h5/src/lib/util.js deleted file mode 100644 index 6a3845b0..00000000 --- a/smart-admin-h5/src/lib/util.js +++ /dev/null @@ -1,515 +0,0 @@ -import moment from 'moment'; -/** - * @param {String} url - * @description 从URL中解析参数 - */ -export const getParams = url => { - const keyValueArr = url.split('?')[1].split('&'); - let paramObj = {}; - keyValueArr.forEach(item => { - const keyValue = item.split('='); - paramObj[keyValue[0]] = keyValue[1]; - }); - return paramObj; -}; - -/** - * @param {Any} obj - * @description 获取数据类型 - */ -export const getType = obj => { - return {}.toString - .call(obj) - .match(/\s([a-zA-Z]+)/)[1] - .toLowerCase(); -}; -// 日期格式 -export const dateFormat = { - YMD: 'YMD', - YMDHM: 'YMDHM', - YMDHMS: 'YMDHMS' -}; -export const forEach = (arr, fn) => { - if (!arr.length || !fn) return; - let i = -1; - let len = arr.length; - while (++i < len) { - let item = arr[i]; - fn(item, i, arr); - } -}; - -/** - * @param {Array} arr1 - * @param {Array} arr2 - * @description 得到两个数组的交集, 两个数组的元素为数值或字符串 - */ -export const getIntersection = (arr1, arr2) => { - let len = Math.min(arr1.length, arr2.length); - let i = -1; - let res = []; - while (++i < len) { - const item = arr2[i]; - if (arr1.indexOf(item) > -1) res.push(item); - } - return res; -}; - -/** - * @param {Array} arr1 - * @param {Array} arr2 - * @description 得到两个数组的并集, 两个数组的元素为数值或字符串 - */ -export const getUnion = (arr1, arr2) => { - return Array.from(new Set([...arr1, ...arr2])); -}; - -/** - * @param {Array} target 目标数组 - * @param {Array} arr 需要查询的数组 - * @description 判断要查询的数组是否至少有一个元素包含在目标数组中 - */ -export const hasOneOf = (targetarr, arr) => { - return targetarr.some(_ => arr.indexOf(_) > -1); -}; - -/** - * @param {String|Number} value 要验证的字符串或数值 - * @param {*} validList 用来验证的列表 - */ -export function oneOf (value, validList) { - for (let i = 0; i < validList.length; i++) { - if (value === validList[i]) { - return true; - } - } - return false; -} - -/** - * @param {Number} timeStamp 判断时间戳格式是否是毫秒 - * @returns {Boolean} - */ -const isMillisecond = timeStamp => { - const timeStr = String(timeStamp); - return timeStr.length > 10; -}; - -/** - * @param {Number} timeStamp 传入的时间戳 - * @param {Number} currentTime 当前时间时间戳 - * @returns {Boolean} 传入的时间戳是否早于当前时间戳 - */ -const isEarly = (timeStamp, currentTime) => { - return timeStamp < currentTime; -}; - -/** - * @param {Number} num 数值 - * @returns {String} 处理后的字符串 - * @description 如果传入的数值小于10,即位数只有1位,则在前面补充0 - */ -const getHandledValue = num => { - return num < 10 ? '0' + num : num; -}; - -/** - * @param {Number} timeStamp 传入的时间戳 - * @param {Number} startType 要返回的时间字符串的格式类型,传入'year'则返回年开头的完整时间 - */ -const getDate = (timeStamp, startType) => { - const d = new Date(timeStamp * 1000); - const year = d.getFullYear(); - const month = getHandledValue(d.getMonth() + 1); - const date = getHandledValue(d.getDate()); - const hours = getHandledValue(d.getHours()); - const minutes = getHandledValue(d.getMinutes()); - const second = getHandledValue(d.getSeconds()); - let resStr = ''; - if (startType === 'year') { - resStr = - year + - '-' + - month + - '-' + - date + - ' ' + - hours + - ':' + - minutes + - ':' + - second; - } - else resStr = month + '-' + date + ' ' + hours + ':' + minutes; - return resStr; -}; - -/** - * @param {String|Number} timeStamp 时间戳 - * @returns {String} 相对时间字符串 - */ -export const getRelativeTime = timeStamp => { - // 判断当前传入的时间戳是秒格式还是毫秒 - const IS_MILLISECOND = isMillisecond(timeStamp); - // 如果是毫秒格式则转为秒格式 - if (IS_MILLISECOND) Math.floor((timeStamp /= 1000)); - // 传入的时间戳可以是数值或字符串类型,这里统一转为数值类型 - timeStamp = Number(timeStamp); - // 获取当前时间时间戳 - const currentTime = Math.floor(Date.parse(new Date()) / 1000); - // 判断传入时间戳是否早于当前时间戳 - const IS_EARLY = isEarly(timeStamp, currentTime); - // 获取两个时间戳差值 - let diff = currentTime - timeStamp; - // 如果IS_EARLY为false则差值取反 - if (!IS_EARLY) diff = -diff; - let resStr = ''; - const dirStr = IS_EARLY ? '前' : '后'; - // 少于等于59秒 - if (diff <= 59) resStr = diff + '秒' + dirStr; - // 多于59秒,少于等于59分钟59秒 - else if (diff > 59 && diff <= 3599) { resStr = Math.floor(diff / 60) + '分钟' + dirStr; } - // 多于59分钟59秒,少于等于23小时59分钟59秒 - else if (diff > 3599 && diff <= 86399) { resStr = Math.floor(diff / 3600) + '小时' + dirStr; } - // 多于23小时59分钟59秒,少于等于29天59分钟59秒 - else if (diff > 86399 && diff <= 2623859) { resStr = Math.floor(diff / 86400) + '天' + dirStr; } - // 多于29天59分钟59秒,少于364天23小时59分钟59秒,且传入的时间戳早于当前 - else if (diff > 2623859 && diff <= 31567859 && IS_EARLY) { resStr = getDate(timeStamp); } - else resStr = getDate(timeStamp, 'year'); - return resStr; -}; - -/** - * @returns {String} 当前浏览器名称 - */ -export const getExplorer = () => { - const ua = window.navigator.userAgent; - const isExplorer = exp => { - return ua.indexOf(exp) > -1; - }; - if (isExplorer('MSIE')) return 'IE'; - else if (isExplorer('Firefox')) return 'Firefox'; - else if (isExplorer('Chrome')) return 'Chrome'; - else if (isExplorer('Opera')) return 'Opera'; - else if (isExplorer('Safari')) return 'Safari'; -}; - -/** - * @description 绑定事件 on(element, event, handler) - */ -export const on = (function () { - if (document.addEventListener) { - return function (element, event, handler) { - if (element && event && handler) { - element.addEventListener(event, handler, false); - } - }; - } else { - return function (element, event, handler) { - if (element && event && handler) { - element.attachEvent('on' + event, handler); - } - }; - } -})(); - -/** - * @description 解绑事件 off(element, event, handler) - */ -export const off = (function () { - if (document.removeEventListener) { - return function (element, event, handler) { - if (element && event) { - element.removeEventListener(event, handler, false); - } - }; - } else { - return function (element, event, handler) { - if (element && event) { - element.detachEvent('on' + event, handler); - } - }; - } -})(); - -/** - * 判断一个对象是否存在key,如果传入第二个参数key,则是判断这个obj对象是否存在key这个属性 - * 如果没有传入key这个参数,则判断obj对象是否有键值对 - */ -export const hasKey = (obj, key) => { - if (key) return key in obj; - else { - let keysArr = Object.keys(obj); - return keysArr.length; - } -}; - -/** - * @param {*} obj1 对象 - * @param {*} obj2 对象 - * @description 判断两个对象是否相等,这两个对象的值只能是数字或字符串 - */ -export const objEqual = (obj1, obj2) => { - const keysArr1 = Object.keys(obj1); - const keysArr2 = Object.keys(obj2); - if (keysArr1.length !== keysArr2.length) return false; - else if (keysArr1.length === 0 && keysArr2.length === 0) return true; - /* eslint-disable-next-line */ else { return !keysArr1.some(key => obj1[key] != obj2[key]); } -}; - -// 相关工具类 -export const utils = { - /** - * @description table实现反选 - * @param {Object} vm Vue实例 - * @param {Array} tableSelectDate 选中的数据 - * @param {Array} allData 所有数据 - * @param {Array} key 数据中的唯一值 - */ - reverseSelect (vm, tableSelectDate, allData, key) { - let copyMess = JSON.parse(JSON.stringify(tableSelectDate)); - // 流程:先全部选中->再部分选中 - vm.handleSelectAll(false); - // 选中的idList - let idList = copyMess.map(item => item[key]); - console.log(idList); - for (let item of allData) { - if (idList.every(id => id !== item.id)) { - vm.$set(item, '_checked', true); - tableSelectDate.push(item); - } else { - vm.$set(item, '_checked', false); - } - } - }, - // 校验字符串是否相同 合同使用 - contrastString (originStr, changeStr) { - let origin = originStr - .replace(/\s*/g, '') - .replace(/"/g, '\'') - .replace(/ /g, '') - .replace(/disabled=\/'\/'/g, 'disabled'); - let change = changeStr - .replace(/\s*/g, '') - .replace(/"/g, '\'') - .replace(/ /g, '') - .replace(/disabled=\/'\/'/g, 'disabled'); - return origin === change; - }, - // 获取当前日期getDateStr(0)、前几天getDateStr(-10)、后几天getDateStr(20) - getDateStr (AddDayCount, format) { - let date = new Date(); - // 获取AddDayCount天后的日期 - date.setDate(date.getDate() + AddDayCount); - return this.getDate(date, format); - }, - getDate (date, format) { - let year = date.getFullYear(); - // day获取当前几号,不足10补0 - let day = date.getDate() > 9 ? date.getDate() : '0' + date.getDate(); - // month获取当前月份的日期,不足10补0 - let month = - date.getMonth() + 1 > 9 - ? date.getMonth() + 1 - : '0' + (date.getMonth() + 1); - // h获取当前小时,不足10补0 - let h = date.getHours() > 9 ? date.getHours() : '0' + date.getHours(); - // s获取当前分钟,不足10补0 - let m = date.getMinutes() > 9 ? date.getMinutes() : '0' + date.getMinutes(); - // s获取当前秒数,不足10补0 - let s = date.getSeconds() > 9 ? date.getSeconds() : '0' + date.getSeconds(); - let resultDate = ''; - if (format === dateFormat.YMD) { - resultDate = year + '-' + month + '-' + day; - } - if (format === dateFormat.YMDHM) { - resultDate = year + '-' + month + '-' + day + ' ' + h + ':' + m; - } - if (format === dateFormat.YMDHMS) { - resultDate = year + '-' + month + '-' + day + ' ' + h + ':' + m + ':' + s; - } - return resultDate; - }, - // 获取周一和周日日期,返回两种格式时间 - getDateWeek () { - let now = new Date(); - let nowTime = now.getTime(); - let day = now.getDay(); - let oneDayLong = 1000 * 60 * 60 * 24; - let MondayTime = nowTime - (day - 1) * oneDayLong; - let SundayTime = nowTime + (7 - day) * oneDayLong; - let monday = new Date(MondayTime); - let sunday = new Date(SundayTime); - return { - // first: this.getDateAll(monday), - // last: this.getDateAll(sunday), - firstDate: monday, - lastDate: sunday - }; - }, - // 获取月初与月末日期,返回两种时间格式 - getDateMonth () { - let dateFirter = new Date(); - let dateLast = new Date(); - dateFirter.setDate(1); - - let currentMonth = dateLast.getMonth(); - let nextMonth = ++currentMonth; - let nextMonthFirstDay = new Date(dateLast.getFullYear(), nextMonth, 1); - let oneDay = 1000 * 60 * 60 * 24; - dateLast = new Date(nextMonthFirstDay - oneDay); - - return { - // first: this.getDateAll(dateFirter), - // last: this.getDateAll(dateLast), - firstDate: dateFirter, - lastDate: dateLast - }; - }, - // 计算天数 - getDayBetweenDate (date) { - date = this.getDate(new Date(date), 'YMD'); - let startTime = Date.parse(new Date(date)); // IE支持“yyyy/MM/dd”格式 - let endTime = Date.parse(this.getDate(new Date(), 'YMD')); - let day = parseInt((endTime - startTime) / (1000 * 60 * 60 * 24)); - return day; - }, - getDateIntervalYear (firstDate, secondDate) { - if (!firstDate || !secondDate) { - return 0; - } - let first = new Date(firstDate); - let second = new Date(secondDate); - let firstYear = first.getFullYear(); - let secondYear = second.getFullYear(); - let intervalYear = secondYear - firstYear; - return intervalYear < 0 ? 0 : intervalYear; - }, - getDateIntervalYearFixed2 (firstDate, secondDate) { - if (!firstDate || !secondDate) { - return 0; - } - // 格式化时间 - let startDate = new Date(this.getDate(new Date(firstDate), 'YMD')); - let endDate = new Date(this.getDate(new Date(secondDate), 'YMD')); - // 得到毫秒值 - let startTime = Date.parse(startDate); - let endTime = Date.parse(endDate); - // 得到差了多少天 - let day = parseInt((endTime - startTime) / (1000 * 60 * 60 * 24)); - if (day <= 0) { - return 0; - } - // 得到差的多少年 保留两位小数 - let resultYear = parseFloat((day / (30 * 12)).toFixed(2)); - return resultYear; - }, - // 数字转化为中文大写 - // 代码如下所示: - convertCurrency (money) { - // 汉字的数字 - let cnNums = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']; - // 基本单位 - let cnIntRadice = ['', '拾', '佰', '仟']; - // 对应整数部分扩展单位 - let cnIntUnits = ['', '万', '亿', '兆']; - // 对应小数部分单位 - let cnDecUnits = ['角', '分', '毫', '厘']; - // 整数金额时后面跟的字符 - let cnInteger = '整'; - // 整型完以后的单位 - let cnIntLast = '元'; - // 最大处理的数字 - let maxNum = 999999999999999.9999; - // 金额整数部分 - let integerNum; - // 金额小数部分 - let decimalNum; - // 输出的中文金额字符串 - let chineseStr = ''; - // 分离金额后用的数组,预定义 - let parts; - if (money === '') { - return ''; - } - money = parseFloat(money); - if (money >= maxNum) { - // 超出最大处理数字 - return ''; - } - if (money === 0) { - chineseStr = cnNums[0] + cnIntLast + cnInteger; - return chineseStr; - } - // 转换为字符串 - money = money.toString(); - if (money.indexOf('.') === -1) { - integerNum = money; - decimalNum = ''; - } else { - parts = money.split('.'); - integerNum = parts[0]; - decimalNum = parts[1].substr(0, 4); - } - // 获取整型部分转换 - if (parseInt(integerNum, 10) > 0) { - let zeroCount = 0; - let IntLen = integerNum.length; - for (let i = 0; i < IntLen; i++) { - let n = integerNum.substr(i, 1); - let p = IntLen - i - 1; - let q = p / 4; - let m = p % 4; - if (n === '0') { - zeroCount++; - } else { - if (zeroCount > 0) { - chineseStr += cnNums[0]; - } - // 归零 - zeroCount = 0; - chineseStr += cnNums[parseInt(n)] + cnIntRadice[m]; - } - if (m === 0 && zeroCount < 4) { - chineseStr += cnIntUnits[q]; - } - } - chineseStr += cnIntLast; - } - // 小数部分 - if (decimalNum !== '') { - let decLen = decimalNum.length; - for (let i = 0; i < decLen; i++) { - let n = decimalNum.substr(i, 1); - if (n !== '0') { - chineseStr += cnNums[Number(n)] + cnDecUnits[i]; - } - } - } - if (chineseStr === '') { - chineseStr += cnNums[0] + cnIntLast + cnInteger; - } else if (decimalNum === '') { - chineseStr += cnInteger; - } - return chineseStr; - } -}; - - -export const dateTimeRangeConvert = (timerange) => { - // timerange - let arr = []; - if (timerange[0] === '') { - arr.push(null); - } else { - arr.push(moment(timerange[0]).format("YYYY-MM-DD 00:00:00")); - } - - if (timerange[1] === '') { - arr.push(null); - } else { - arr.push(moment(timerange[1]).format("YYYY-MM-DD 23:59:59")); - } - return arr; -} - diff --git a/smart-admin-h5/src/lib/watermark.js b/smart-admin-h5/src/lib/watermark.js deleted file mode 100644 index 30747309..00000000 --- a/smart-admin-h5/src/lib/watermark.js +++ /dev/null @@ -1,49 +0,0 @@ -const watermark = {}; - -const setWatermark = (str) => { - const id = '1.23452384164.123412415'; - - if (document.getElementById(id) !== null) { - document.body.removeChild(document.getElementById(id)); - } - - const can = document.createElement('canvas'); - can.width = 150; - can.height = 120; - - const cans = can.getContext('2d'); - cans.rotate(-20 * Math.PI / 180); - cans.font = '15px Vedana'; - cans.fillStyle = 'rgba(0, 0, 0, 0.15)'; - cans.textAlign = 'left'; - cans.textBaseline = 'Middle'; - cans.fillText(str, can.width / 20, can.height); - - const div = document.createElement('div'); - div.id = id; - div.style.pointerEvents = 'none'; - div.style.top = '3px'; - div.style.left = '0px'; - div.style.position = 'fixed'; - div.style.zIndex = '100000'; - div.style.width = document.documentElement.clientWidth + 'px'; - div.style.height = document.documentElement.clientHeight + 'px'; - div.style.background = 'url(' + can.toDataURL('image/png') + ') left top repeat'; - document.body.appendChild(div); - return id; -}; - -// 该方法只允许调用一次 -watermark.set = (str) => { - let id = setWatermark(str); - setInterval(() => { - if (document.getElementById(id) === null) { - id = setWatermark(str); - } - }, 2000); - window.onresize = () => { - setWatermark(str); - }; -}; - -export default watermark; diff --git a/smart-admin-h5/src/main.js b/smart-admin-h5/src/main.js deleted file mode 100644 index 887c9198..00000000 --- a/smart-admin-h5/src/main.js +++ /dev/null @@ -1,62 +0,0 @@ -// vue 三大核心 -import Vue from 'vue'; -import router from '@/router'; -import store from '@/store'; - -// 更好的兼容性 -import 'core-js/stable'; -import 'regenerator-runtime/runtime'; -// 移动端适配 -import 'lib-flexible/flexible.js'; -import 'vant/lib/index.css'; -// 引入首个组件 -import App from './App.vue'; -// 引入自定义主题样式 -import './themes/index.scss'; -// 引入过滤器 -import './filters'; -// 引入配置信息 -import config from '@/config'; -// 引入自定义smart 插件 -import SmartPlugin from './plugins/smart'; -// Import component -import Loading from 'vue-loading-overlay'; -// Import stylesheet -import 'vue-loading-overlay/dist/vue-loading.css'; - -import Vant from 'vant'; -import 'vant/lib/index.css'; - -// sentry错误预警 -import SmartSentry from './plugins/smart-sentry'; - -import Enum from 'vue-enum'; - -import enumInfo from '@/constants'; - -import _ from 'lodash'; - -Vue.use(Vant); - -Vue.use(Loading); - -Vue.use(SmartPlugin); - -Vue.use(SmartSentry); - -Vue.prototype.$config = config; - -Vue.config.productionTip = false; - -Vue.use(Enum, { - enumInfo -}); - -window._ = _; - -new Vue({ - el: '#app', - router, - store, - render: h => h(App) -}); diff --git a/smart-admin-h5/src/plugins/smart-sentry.js b/smart-admin-h5/src/plugins/smart-sentry.js deleted file mode 100644 index b4ad2b09..00000000 --- a/smart-admin-h5/src/plugins/smart-sentry.js +++ /dev/null @@ -1,17 +0,0 @@ -import * as Sentry from '@sentry/browser'; - -const SmartSentry = {}; - -SmartSentry.install = function(Vue, options) { - Vue.prototype.$smartSentry = { - captureException: (error) => { - console.error(error); - if (error.config && error.data && error && error.headers && error.request && error.status) { - return; - } - Sentry.captureException(error); - } - }; -}; - -export default SmartSentry; diff --git a/smart-admin-h5/src/plugins/smart.js b/smart-admin-h5/src/plugins/smart.js deleted file mode 100644 index 5567acca..00000000 --- a/smart-admin-h5/src/plugins/smart.js +++ /dev/null @@ -1,24 +0,0 @@ -let loader = null; - -const SmartPlugin = {}; - -SmartPlugin.install = function(Vue, options) { - Vue.prototype.$smart = { - loading: (message) => { - if (loader) { - loader.hide(); - } - - loader = Vue.$loading.show({ - // Optional parameters - lockScroll: true, - color: '#1989fa' - }); - }, - loadingClear: () => { - loader.hide(); - } - }; -}; - -export default SmartPlugin; diff --git a/smart-admin-h5/src/plugins/vant.js b/smart-admin-h5/src/plugins/vant.js deleted file mode 100644 index 8daa8e3e..00000000 --- a/smart-admin-h5/src/plugins/vant.js +++ /dev/null @@ -1,8 +0,0 @@ -// 按需全局引入 vant组件 -import Vue from 'vue'; -import { Button, List, Cell, Tabbar, TabbarItem } from 'vant'; - -Vue.use(Button); -Vue.use(Cell); -Vue.use(List); -Vue.use(Tabbar).use(TabbarItem); diff --git a/smart-admin-h5/src/router/dashboard/index.js b/smart-admin-h5/src/router/dashboard/index.js deleted file mode 100644 index 69506bbe..00000000 --- a/smart-admin-h5/src/router/dashboard/index.js +++ /dev/null @@ -1,42 +0,0 @@ -import { ROUTER_PERMISSION_TYPE } from '@/router/router-const'; - -/** - * dashboard首页 - */ -export const dashboardRouter = [ - { - path: '/', - // redirect: '/dashboard/contact-company', - redirect: '/dashboard/user', - meta: { - title: '首页', - keepAlive: true, - permissionType: ROUTER_PERMISSION_TYPE.NEED_LOGIN.value - }, - component: () => import('@/views/dashboard/dashboard'), - children: [ - // { - // path: '/dashboard/contact-company', - // name: 'ContactCompany', - // meta: { - // title: '往来单位', - // keepAlive: true, - // showTabbar: true, - // permissionType: ROUTER_PERMISSION_TYPE.NEED_LOGIN.value - // }, - // component: () => import('@/views/erp/contact-company/contact-company') - // }, - { - path: '/dashboard/user', - name: 'Mine', - meta: { - title: '我的', - keepAlive: false, - showTabbar: true, - permissionType: ROUTER_PERMISSION_TYPE.NEED_LOGIN.value - }, - component: () => import('@/views/user/index') - } - ] - } -]; diff --git a/smart-admin-h5/src/router/develop/develop.js b/smart-admin-h5/src/router/develop/develop.js deleted file mode 100644 index a3220405..00000000 --- a/smart-admin-h5/src/router/develop/develop.js +++ /dev/null @@ -1,21 +0,0 @@ -import { ROUTER_PERMISSION_TYPE } from '@/router/router-const'; - -export const developRouter = [ - { - path: '/develop', - component: () => import('@/views/dashboard/dashboard'), - children: [ - { - path: '/develop/config', - name: 'DevelopConfig', - meta: { - title: '开发专用配置', - permissionType: ROUTER_PERMISSION_TYPE.NEED_LOGIN.value - }, - component: () => import('views/develop/config') - } - ] - } - -]; - diff --git a/smart-admin-h5/src/router/error/error.js b/smart-admin-h5/src/router/error/error.js deleted file mode 100644 index 982c0f96..00000000 --- a/smart-admin-h5/src/router/error/error.js +++ /dev/null @@ -1,26 +0,0 @@ -// 错误页 -import { ROUTER_PERMISSION_TYPE } from '@/router/router-const'; - -export const errorRouter = [ - { - path: '/404', - name: 'Error404', - meta: { - hideInMenu: true, - access: true, - permissionType: ROUTER_PERMISSION_TYPE.NO_VALID.value - }, - component: () => import('views/error/404.vue') - }, - { - path: '/500', - name: 'Error500', - meta: { - hideInMenu: true, - access: true, - noValidatePrivilege: true, - permissionType: ROUTER_PERMISSION_TYPE.NO_VALID.value - }, - component: () => import('views/error/404.vue') - } -]; diff --git a/smart-admin-h5/src/router/index.js b/smart-admin-h5/src/router/index.js deleted file mode 100644 index c47e1a4a..00000000 --- a/smart-admin-h5/src/router/index.js +++ /dev/null @@ -1,150 +0,0 @@ -import Vue from 'vue'; -import Router from 'vue-router'; -import { routers } from './routers'; -import cookie from '@/lib/cookie'; -import { ROUTER_PERMISSION_TYPE } from './router-const'; -import NProgress from 'nprogress'; -import 'nprogress/nprogress.css'; - -const projectConfig = require('@/config/index.js'); - -Vue.use(Router); - -/** - * 导入所有的router - * @type {VueRouter} - */ -const router = new Router({ - routes: routers -}); - -// 解决路由跳转相同的地址报错 -const originalPush = Router.prototype.push; -Router.prototype.push = function(location) { - try { - return originalPush.call(this, location).catch(err => err); - } catch (error) { - // TODO zhuoda sentry - console.error(error); - } -}; - -const LOGIN_PAGE_NAME = 'Login'; - -// --------------------- router 守卫 begin --------------------- - -router.beforeEach((to, from, next) => { - // 加载进度条 - NProgress.start(); - - // 权限 - const permissionType = to.meta.permissionType; - // 不需要验证,直接放行 - if (permissionType === ROUTER_PERMISSION_TYPE.NO_VALID.value) { - next(); - return; - } - - const token = cookie.getToken(); - // 需要登录 - if (permissionType === ROUTER_PERMISSION_TYPE.NEED_LOGIN.value) { - if (token) { - next(); - } else { - next({ - name: LOGIN_PAGE_NAME - }); - } - return; - } - - // 需要登录,且验证权限 - if (permissionType === ROUTER_PERMISSION_TYPE.VALIDATE_PERMISSION.value) { - if (!token) { - // TODO 验证权限 - next({ - name: LOGIN_PAGE_NAME - }); - return; - } - } - - next({ - name: 'Error404' - }); -}); - -router.afterEach(to => { - NProgress.done(); - window.scrollTo(0, 0); - if (to.meta.title) { - console.log(to.meta); - document.title = to.meta.title + ' ' + projectConfig.title; - } -}); - -// --------------------- router 守卫 end --------------------- - -/** - * router 检测 - * - * 如果存在相同的 path 或者 name 是一件非常恐怖的事情,所以在develop环境将所有router进行一次遍历
- * 检测内容如下:
- * 1、相同的router name - * 2、相同的router name - * 3、path没有以 / 开头 - * - */ - -const tempCheckObj = { - checkRouterNameMap: new Map(), - checkRouterPathMap: new Map() -}; - -function recursionCheckRouter(routerArray) { - for (const routerItem of routerArray) { - if (!routerItem.name) { - console.error('没有配置router name', routerItem); - } else { - const existNameRouter = tempCheckObj.checkRouterNameMap.get( - routerItem.name - ); - if (typeof existNameRouter !== 'undefined') { - console.error('存在相同的router name', routerItem, existNameRouter); - } else { - tempCheckObj.checkRouterNameMap.set(routerItem.name, routerItem); - } - } - - if (!routerItem.path) { - console.error('没有配置router path', routerItem); - } else { - // path必须以 / 开头 - if (routerItem.path !== '*' && routerItem.path.indexOf('/') !== 0) { - console.error('path 没有以/开头 ', routerItem); - } - - const existPathRouter = tempCheckObj.checkRouterPathMap.get( - routerItem.path - ); - if (typeof existPathRouter !== 'undefined') { - console.error('存在相同的router path', routerItem, existPathRouter); - } else { - tempCheckObj.checkRouterPathMap.set(routerItem.path, routerItem); - } - } - - if (routerItem.children) { - recursionCheckRouter(routerItem.children); - } - } -} - -// 如果是开发环境,需要检测router的规范性 -if (process.env.NODE_ENV === 'development') { - recursionCheckRouter(routers); - delete tempCheckObj.checkRouterNameMap; - delete tempCheckObj.checkRouterPathMap; -} - -export default router; diff --git a/smart-admin-h5/src/router/login/login.js b/smart-admin-h5/src/router/login/login.js deleted file mode 100644 index 7c9b6a53..00000000 --- a/smart-admin-h5/src/router/login/login.js +++ /dev/null @@ -1,15 +0,0 @@ -import { ROUTER_PERMISSION_TYPE } from '@/router/router-const'; - -export const loginRouter = [ - { - path: '/login', - name: 'Login', - meta: { - title: '登录', - keepAlive: false, - permissionType: ROUTER_PERMISSION_TYPE.NO_VALID.value - }, - component: () => import('@/views/login/login.vue') - } - -]; diff --git a/smart-admin-h5/src/router/router-const.js b/smart-admin-h5/src/router/router-const.js deleted file mode 100644 index 4d509cf8..00000000 --- a/smart-admin-h5/src/router/router-const.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * 权限类型 - */ -export const ROUTER_PERMISSION_TYPE = { - /** - * 不 验 证 - */ - NO_VALID: { - value: 1 - }, - /** - * 需要登录 - */ - NEED_LOGIN: { - value: 2 - }, - /** - * 需要验证权限 - */ - VALIDATE_PERMISSION: { - value: 3 - } -}; diff --git a/smart-admin-h5/src/router/routers.js b/smart-admin-h5/src/router/routers.js deleted file mode 100644 index e1c106e9..00000000 --- a/smart-admin-h5/src/router/routers.js +++ /dev/null @@ -1,32 +0,0 @@ -// 全局错误页面 -import { errorRouter } from './error/error'; -// 登录注册模块 -import { loginRouter } from './login/login'; -// tabbar dashboard 框架页面 -import { dashboardRouter } from './dashboard'; -// 用户相关 -import { userRouter } from './user/user'; -// 开发相关 -import { developRouter } from './develop/develop'; - -/** - * router meta 说明:
- * - * title: 为页面的title,会显示到浏览器的title上 - * permissionType: 具体使用 router-const.js中的 ROUTER_PERMISSION_TYPE 常量;情况有: 1)不验证 2)校验登录 3)登录后校验权限 - * keepAlive: true or false ; 是否进行页面keepalive, 如果想删除keepalive,可以使用vuex中的app module里有mutation - * showTabbar: true or false ; 是否展示 tabbar, 如果是true, 则会展示tabbar - * - */ -export const routers = [ - // 登录、注册 - ...loginRouter, - // 404、500、403等 - ...errorRouter, - // tab bar 页面 - ...dashboardRouter, - // 用户 - ...userRouter, - // 开发相关 - ...developRouter -]; diff --git a/smart-admin-h5/src/router/user/user.js b/smart-admin-h5/src/router/user/user.js deleted file mode 100644 index 901e5708..00000000 --- a/smart-admin-h5/src/router/user/user.js +++ /dev/null @@ -1,21 +0,0 @@ -import { ROUTER_PERMISSION_TYPE } from '@/router/router-const'; - -export const userRouter = [ - { - path: '/user', - component: () => import('@/views/dashboard/dashboard'), - children: [ - { - path: '/user/change-password', - name: 'UserChangePassword', - meta: { - title: '修改密码', - permissionType: ROUTER_PERMISSION_TYPE.NEED_LOGIN.value - }, - component: () => - import('views/user/change-password') - } - ] - } -]; - diff --git a/smart-admin-h5/src/store/index.js b/smart-admin-h5/src/store/index.js deleted file mode 100644 index 11c4962b..00000000 --- a/smart-admin-h5/src/store/index.js +++ /dev/null @@ -1,23 +0,0 @@ -import Vue from 'vue'; -import Vuex from 'vuex'; - -import user from './module/user'; -import app from './module/app'; - -Vue.use(Vuex); - -export default new Vuex.Store({ - state: { - // - }, - mutations: { - // - }, - actions: { - // - }, - modules: { - app, - user - } -}); diff --git a/smart-admin-h5/src/store/module/app.js b/smart-admin-h5/src/store/module/app.js deleted file mode 100644 index 486defe1..00000000 --- a/smart-admin-h5/src/store/module/app.js +++ /dev/null @@ -1,32 +0,0 @@ -/** - * 整个应用相关的状态信息 - * - * 比如: keepalive等 - */ -export default { - namespaced: true, - state: { - // 缓存路由 - keepAliveIncludes: [] - }, - - mutations: { - // 加入keep-alive缓存 - pushKeepAliveIncludes(state, val) { - if (state.keepAliveIncludes.length < 30) { - const number = state.keepAliveIncludes.findIndex(e => e === val); - if (number === -1) { - state.keepAliveIncludes.push(val); - } - } - }, - // 删除缓存 - deleteKeepAliveIncludes(state, val) { - const number = state.keepAliveIncludes.findIndex(e => e === val); - if (number !== -1) { - state.keepAliveIncludes.splice(number, 1); - } - } - } - -}; diff --git a/smart-admin-h5/src/store/module/user.js b/smart-admin-h5/src/store/module/user.js deleted file mode 100644 index 5f64b72e..00000000 --- a/smart-admin-h5/src/store/module/user.js +++ /dev/null @@ -1,41 +0,0 @@ -import cookie from '@/lib/cookie.js'; - -export default { - namespaced: true, - state: { - token: cookie.getToken(), - // session 信息 - sessionInfo: {}, - // 是否获取了session - isHaveGotSessionInfo: false, - // 权限集合 - privilegeKeySet: new Set() - - }, - mutations: { - clearSession() { - state.token = null; - state.sessionInfo = null; - state.privilegeKeySet = new Set(); - }, - updateSession(state, userLoginInfo) { - state.isHaveGotSessionInfo = true; - state.sessionInfo = userLoginInfo; - if (userLoginInfo.privilegeList) { - state.privilegeKeySet = new Set(userLoginInfo.privilegeList.map(e => e.key)); - } - } - }, - getters: { - // 用户菜单权限 - privilegeKeySet: state => state.privilegeKeySet, - isSuperMan: state => state.sessionInfo.isSuperMan, - actualName: state => state.sessionInfo.actualName, - loginUserId: state => state.sessionInfo.id - }, - actions: { - // 登录 - handleLogin({ commit }, params) { - } - } -}; diff --git a/smart-admin-h5/src/themes/index.scss b/smart-admin-h5/src/themes/index.scss deleted file mode 100644 index b540e422..00000000 --- a/smart-admin-h5/src/themes/index.scss +++ /dev/null @@ -1,6 +0,0 @@ - -html, -body { - font-family: Arial, Helvetica, 'STHeiti STXihei', 'Microsoft YaHei', Tohoma, sans-serif; - background-color: $background-color; -} diff --git a/smart-admin-h5/src/utils/index.js b/smart-admin-h5/src/utils/index.js deleted file mode 100644 index 37d915fc..00000000 --- a/smart-admin-h5/src/utils/index.js +++ /dev/null @@ -1,110 +0,0 @@ -/** - * Created by PanJiaChen on 16/11/18. - */ - -/** - * Parse the time to string - * @param {(Object|string|number)} time - * @param {string} cFormat - * @returns {string} - */ -export function parseTime(time, cFormat) { - if (arguments.length === 0) { - return null - } - const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}' - let date - if (typeof time === 'object') { - date = time - } else { - if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { - time = parseInt(time) - } - if ((typeof time === 'number') && (time.toString().length === 10)) { - time = time * 1000 - } - date = new Date(time) - } - const formatObj = { - y: date.getFullYear(), - m: date.getMonth() + 1, - d: date.getDate(), - h: date.getHours(), - i: date.getMinutes(), - s: date.getSeconds(), - a: date.getDay() - } - const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { - let value = formatObj[key] - // Note: getDay() returns 0 on Sunday - if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] } - if (result.length > 0 && value < 10) { - value = '0' + value - } - return value || 0 - }) - return time_str -} - -/** - * @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 param2Obj(url) { - const search = url.split('?')[1] - if (!search) { - return {} - } - return JSON.parse( - '{"' + - decodeURIComponent(search) - .replace(/"/g, '\\"') - .replace(/&/g, '","') - .replace(/=/g, '":"') - .replace(/\+/g, ' ') + - '"}' - ) -} diff --git a/smart-admin-h5/src/utils/request.js b/smart-admin-h5/src/utils/request.js deleted file mode 100644 index 6788f91b..00000000 --- a/smart-admin-h5/src/utils/request.js +++ /dev/null @@ -1,58 +0,0 @@ -import axios from 'axios' -import store from '@/store' -import { Toast } from 'vant' -// 根据环境不同引入不同api地址 -import { baseApi } from '@/config' -// create an axios instance -const service = axios.create({ - baseURL: baseApi, // url = base api url + request url - withCredentials: true, // send cookies when cross-domain requests - timeout: 5000 // request timeout -}) - -// request拦截器 request interceptor -service.interceptors.request.use( - config => { - // 不传递默认开启loading - if (!config.hideloading) { - // loading - Toast.loading({ - forbidClick: true - }) - } - if (store.getters.token) { - config.headers['X-Token'] = '' - } - return config - }, - error => { - // do something with request error - console.log(error) // for debug - return Promise.reject(error) - } -) -// respone拦截器 -service.interceptors.response.use( - response => { - Toast.clear() - const res = response.data - if (res.status && res.status !== 200) { - // 登录超时,重新登录 - if (res.status === 401) { - store.dispatch('FedLogOut').then(() => { - location.reload() - }) - } - return Promise.reject(res || 'error') - } else { - return Promise.resolve(res) - } - }, - error => { - Toast.clear() - console.log('err' + error) // for debug - return Promise.reject(error) - } -) - -export default service diff --git a/smart-admin-h5/src/utils/validate.js b/smart-admin-h5/src/utils/validate.js deleted file mode 100644 index e9bd1bab..00000000 --- a/smart-admin-h5/src/utils/validate.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Created by Sunnie on 19/06/04. - */ - -/** - * @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 -} diff --git a/smart-admin-h5/src/views/dashboard/dashboard.vue b/smart-admin-h5/src/views/dashboard/dashboard.vue deleted file mode 100644 index 47b1ab24..00000000 --- a/smart-admin-h5/src/views/dashboard/dashboard.vue +++ /dev/null @@ -1,99 +0,0 @@ - - - - diff --git a/smart-admin-h5/src/views/develop/config.vue b/smart-admin-h5/src/views/develop/config.vue deleted file mode 100644 index 18b2ec08..00000000 --- a/smart-admin-h5/src/views/develop/config.vue +++ /dev/null @@ -1,47 +0,0 @@ - - - - diff --git a/smart-admin-h5/src/views/error/404.vue b/smart-admin-h5/src/views/error/404.vue deleted file mode 100644 index 66168409..00000000 --- a/smart-admin-h5/src/views/error/404.vue +++ /dev/null @@ -1,23 +0,0 @@ - - - - diff --git a/smart-admin-h5/src/views/login/login.vue b/smart-admin-h5/src/views/login/login.vue deleted file mode 100644 index 8fd8806f..00000000 --- a/smart-admin-h5/src/views/login/login.vue +++ /dev/null @@ -1,68 +0,0 @@ - - - - - diff --git a/smart-admin-h5/src/views/user/change-password.vue b/smart-admin-h5/src/views/user/change-password.vue deleted file mode 100644 index 08f4c4e8..00000000 --- a/smart-admin-h5/src/views/user/change-password.vue +++ /dev/null @@ -1,76 +0,0 @@ - - - - diff --git a/smart-admin-h5/src/views/user/index.vue b/smart-admin-h5/src/views/user/index.vue deleted file mode 100644 index be177fff..00000000 --- a/smart-admin-h5/src/views/user/index.vue +++ /dev/null @@ -1,79 +0,0 @@ - - - - diff --git a/smart-admin-h5/vue.config.js b/smart-admin-h5/vue.config.js deleted file mode 100644 index a31f3a23..00000000 --- a/smart-admin-h5/vue.config.js +++ /dev/null @@ -1,200 +0,0 @@ -const path = require('path'); -const CompressionWebpackPlugin = require('compression-webpack-plugin'); -const UglifyjsWebpackPlugin = require('uglifyjs-webpack-plugin'); -const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer'); -const ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin'); -const SentryPlugin = require('@sentry/webpack-plugin'); -const resolve = dir => path.join(__dirname, dir); -// 项目配置 -const projectConfig = require('./src/config/index.js'); - -// 生产环境,测试和正式 -const isProductionEnv = ['production'].includes(process.env.NODE_ENV); -const isProductionAppEnv = ['prod', 'pre'].includes(process.env.VUE_APP_ENV); - -module.exports = { - publicPath: projectConfig.publicPath, - // 生产环境构建文件的目录 - outputDir: 'dist', - // outputDir的静态资源(js、css、img、fonts)目录 - assetsDir: 'static', - // eslint检测 按需开启 - lintOnSave: !isProductionEnv, - // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。 - productionSourceMap: false, - devServer: { - // 设置主机地址 - host: '0.0.0.0', - // 设置默认端口 - port: 8090, - // 禁用host验证 - disableHostCheck: true, - // 启动后打开浏览器 - open: true, - overlay: { - // 当出现编译器错误或警告时,在浏览器中显示全屏覆盖层 - warnings: false, - errors: true - } - // proxy: { - // //配置跨域 - // '/api': { - // // 接口前缀 - // target: "https://sit.smart-h5.1024lab.net/api", - // // ws:true, - // changOrigin:true, - // // 改写规则,把/api 替换为/ - // pathRewrite:{ - // '^/api':'/' - // } - // } - // } - }, - css: { - // 是否使用css分离插件 ExtractTextPlugin 是否将组件中的 CSS 提取至一个独立的 CSS 文件中 (而不是动态注入到 JavaScript 中的 inline 代码)。 - extract: isProductionEnv, - // 开启 CSS source maps - sourceMap: false, - // 使用vw布局去掉这个 - requireModuleExtension: true, - loaderOptions: { - // 引入全局变量 - scss: { - additionalData: `@import "@/assets/css/index";` // 全局引入 - } - } - }, - configureWebpack: config => { - config.name = projectConfig.title; - }, - - chainWebpack: config => { - // 移除资源预加载(路由懒加载才能正常使用) - config.plugins.delete('preload'); - config.plugins.delete('prefetch'); - - // 别名 alias - config.resolve.alias - .set('@', resolve('src')) - .set('assets', resolve('src/assets')) - .set('api', resolve('src/api')) - .set('views', resolve('src/views')) - .set('components', resolve('src/components')); - - // 应用名字 - config.plugin('html').tap(args => { - args[0].title = projectConfig.title; - return args; - }); - - // 设置保留空格 - config.module - .rule('vue') - .use('vue-loader') - .loader('vue-loader') - .tap(options => { - options.compilerOptions.preserveWhitespace = true; - return options; - }) - .end(); - - // ==================== 生产环境配置 begin ==================== - if (isProductionEnv) { - // 打包分析 - config.plugin('webpack-report').use(BundleAnalyzerPlugin, [ - { - analyzerMode: 'static' - } - ]); - // 不显示源码 - config.devtool('cheap-source-map'); - - // cdn - config.plugin('html').tap(args => { - args[0].cdn = projectConfig.cdn.cdnResource; - // 压缩html中的css - args[0].minify.minifyCSS = true; - return args; - }); - // 指定资源加载cdn - config.externals(projectConfig.cdn.externals); - - // 开启gzip , Nginx上也需要配置gzip才会生效 - config - .plugin('compression') - .use(CompressionWebpackPlugin) - .tap(() => [ - { - // 压缩 js 与 css - test: new RegExp( - '\\.(js|css)$' - ), - // 资源文件大于10240B=10kB时会被压缩 - threshold: 10240, - // 最小压缩比达到0.8时才会被压缩 - minRatio: 0.8 - } - ]); - - // sentry - if (isProductionAppEnv) { - config.plugin('sentry').use(SentryPlugin, [{ - ignore: ['node_modules'], - include: './dist', // 上传dist文件的js - configFile: './.sentryclirc' // 配置文件地址 - }]); - } - - config.optimization.minimizer = [ - new UglifyjsWebpackPlugin({ - // 生产环境推荐关闭 sourcemap 防止源码泄漏 - // 服务端通过前端发送的行列,根据 sourcemap 转为源文件位置 - sourceMap: false, - uglifyOptions: { - warnings: false, - compress: { - drop_console: true, - drop_debugger: true - } - } - }) - ]; - - config - .plugin('ScriptExtHtmlWebpackPlugin') - .after('html') - .use(ScriptExtHtmlWebpackPlugin, [ - { - // 将 runtime 作为内联引入不单独存在 - inline: /runtime\..*\.js$/ - } - ]) - .end(); - - config.optimization.splitChunks({ - chunks: 'all', - cacheGroups: { - commons: { - name: 'chunk-commons', - test: resolve('src/components'), - minChunks: 3, // 模块至少使用次数 - priority: 5, - reuseExistingChunk: true // 模块嵌套引入时,判断是否复用已经被打包的模块 - }, - node_vendors: { - name: 'chunk-libs', - chunks: 'initial', - test: /[\\/]node_modules[\\/]/, - priority: 10 - }, - vantUI: { - name: 'chunk-vantUI', - priority: 20, - test: /[\\/]node_modules[\\/]_?vant(.*)/ - } - } - }); - } - // ==================== 生产环境配置 end ==================== - } -}; diff --git a/smart-admin-service/.gitignore b/smart-admin-service/.gitignore deleted file mode 100644 index a2a3040a..00000000 --- a/smart-admin-service/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -HELP.md -target/ -!.mvn/wrapper/maven-wrapper.jar -!**/src/main/** -!**/src/test/** - -### STS ### -.apt_generated -.classpath -.factorypath -.project -.settings -.springBeans -.sts4-cache - -### IntelliJ IDEA ### -.idea -*.iws -*.iml -*.ipr - -### NetBeans ### -/nbproject/private/ -/nbbuild/ -/dist/ -/nbdist/ -/.nb-gradle/ -build/ - -### VS Code ### -.vscode/ diff --git a/smart-admin-service/README.md b/smart-admin-service/README.md deleted file mode 100644 index 19273c14..00000000 --- a/smart-admin-service/README.md +++ /dev/null @@ -1,17 +0,0 @@ -### 部署说明 - -#### 下载代码 - -smart-admin-service - -将两个项目导入idea - -#### 创建数据库 - -先执行:src/main/resources/sql/smart-admin.sql - -再执行:src/main/resources/sql/quartz_mysql_2.3.0.sql - -#### 启动 - -运行 smart-admin-api项目 SmartAdminApplication类 diff --git a/smart-admin-service/pom.xml b/smart-admin-service/pom.xml deleted file mode 100644 index 39a6f3ce..00000000 --- a/smart-admin-service/pom.xml +++ /dev/null @@ -1,349 +0,0 @@ - - - 4.0.0 - - net.1024lab - smart-admin-service-parent - 1.0.0 - pom - - - smart-admin-api - - - - UTF-8 - UTF-8 - 1.8 - 3.1.1 - 2.10.0 - 2.2.5.RELEASE - 1.7 - 2.0 - 2.7.0 - 2.0.4 - 3.3.1 - 1.2.73 - 28.2-jre - 2.7.0 - [7.2.0, 7.2.99] - 0.9.1 - 1.1.21 - 3.9.1 - 1.4.2 - 4.1.2 - 1.3.1 - 3.3.2 - 1.9.3 - 2.8.0 - 2.3.2 - 4.2.2 - 8.0.19 - 1.21 - 1.18.8 - - - - - - - org.springframework.boot - spring-boot-dependencies - ${smartadmin.springboot.version} - pom - import - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - com.baomidou - mybatis-plus-boot-starter - ${mybatis-plus-boot.version} - - - - - velocity - org.apache.velocity - ${velocity.version} - - - org.apache.velocity - velocity-engine-core - ${velocity-engine-core.version} - - - - - - com.alibaba - fastjson - ${fastjson.version} - - - - - com.alibaba - druid - ${druid.version} - - - - - p6spy - p6spy - ${p6spy.version} - - - - - io.springfox - springfox-swagger2 - ${swagger.version} - - - io.springfox - springfox-swagger-ui - ${swagger.version} - - - - - - com.github.xiaoymin - knife4j-spring-boot-starter - ${knife4j.version} - - - - - - com.google.guava - guava - ${guava.version} - - - - - com.aliyun.oss - aliyun-sdk-oss - ${aliyun-oss.version} - - - com.qiniu - qiniu-java-sdk - ${qiniu-oss.version} - - - commons-fileupload - commons-fileupload - ${commons-fileupload.version} - - - - - - io.jsonwebtoken - jjwt - ${jjwt.version} - - - - - cn.afterturn - easypoi-spring-boot-starter - ${easypoi.version} - - - - - - mysql - mysql-connector-java - ${mysql.version} - - - - commons-beanutils - commons-beanutils - ${commons-beanutils.version} - - - - org.apache.commons - commons-pool2 - ${commons-pool2.version} - - - - com.github.penggle - kaptcha - ${kaptcha.version} - - - - com.googlecode.concurrentlinkedhashmap - concurrentlinkedhashmap-lru - ${concurrentlinkedhashmap.version} - - - - com.squareup.okhttp3 - okhttp - ${okhttp.version} - - - - eu.bitwalker - UserAgentUtils - ${user-agent-util.version} - - - - org.projectlombok - lombok - ${lombok.version} - provided - - - - - - - - - src/main/java - - **/*.* - - - - false - src/main/resources - - dev/* - sit/* - pre/* - prod/* - - - - src/main/resources/${profiles.active} - true - - *.properties - - - - src/main/resources/${profiles.active} - false - - *.* - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${java.version} - ${java.version} - UTF-8 - - - - org.springframework.boot - spring-boot-maven-plugin - ${smartadmin.springboot.version} - - ${main-class} - - - - - repackage - - - - - - - - - - - - dev - - dev - - - true - - - - telework - - telework - - - - sit - - sit - - - - pre - - pre - - - - prod - - prod - - - - \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/doc/readme.txt b/smart-admin-service/smart-admin-api/doc/readme.txt deleted file mode 100644 index f586e4b8..00000000 --- a/smart-admin-service/smart-admin-api/doc/readme.txt +++ /dev/null @@ -1,15 +0,0 @@ -1 超管默认账号 -sa/123456 - -2 执行脚本: -先执行:src/main/resources/sql/smart-admin.sql -再执行:src/main/resources/sql/quartz_mysql_2.3.0.sql - -3 除dev之外文件 - -4 刷新页面,获取权限是否走缓存 -LoginService.getSession - -5 test类中去掉代码生成run - -6 前端百度统计 \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/pom.xml b/smart-admin-service/smart-admin-api/pom.xml deleted file mode 100644 index f7ec8db4..00000000 --- a/smart-admin-service/smart-admin-api/pom.xml +++ /dev/null @@ -1,276 +0,0 @@ - - - net.1024lab - smart-admin-service-parent - 1.0.0 - ../pom.xml - - - 4.0.0 - smart-admin-api - jar - - smart-admin-api - - - UTF-8 - UTF-8 - 1.8 - - - - - - - org.springframework.boot - spring-boot-starter-log4j2 - - - org.springframework.boot - spring-boot-starter-aop - - - spring-boot-starter-logging - org.springframework.boot - - - - - org.springframework.boot - spring-boot-starter-quartz - - - org.springframework.boot - spring-boot-starter-validation - - - org.springframework.boot - spring-boot-starter-data-redis - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-websocket - - - org.springframework.boot - spring-boot-starter-mail - - - org.springframework.boot - spring-boot-starter-test - test - - - org.springframework.boot - spring-boot-starter-actuator - - - logback-classic - ch.qos.logback - - - spring-boot-starter-logging - org.springframework.boot - - - - - - - com.baomidou - mybatis-plus-boot-starter - - - - - velocity - org.apache.velocity - - - commons-collections - commons-collections - - - - - org.apache.velocity - velocity-engine-core - - - - - - com.alibaba - fastjson - - - - - com.alibaba - druid - - - - - p6spy - p6spy - - - - - io.springfox - springfox-swagger2 - - - io.springfox - springfox-swagger-ui - - - - - - com.github.xiaoymin - knife4j-spring-boot-starter - ${knife4j.version} - - - - - - com.google.guava - guava - - - - - com.aliyun.oss - aliyun-sdk-oss - - - commons-logging - commons-logging - - - - - com.qiniu - qiniu-java-sdk - - - commons-fileupload - commons-fileupload - - - - - - io.jsonwebtoken - jjwt - - - - - cn.afterturn - easypoi-spring-boot-starter - - - - - commons-beanutils - commons-beanutils - - - commons-logging - commons-logging - - - - - - org.apache.commons - commons-pool2 - - - - mysql - mysql-connector-java - - - - com.github.penggle - kaptcha - - - - com.googlecode.concurrentlinkedhashmap - concurrentlinkedhashmap-lru - - - - com.squareup.okhttp3 - okhttp - - - - eu.bitwalker - UserAgentUtils - - - - org.projectlombok - lombok - provided - - - - - - - - src/main/java - - **/*.* - - - - false - src/main/resources - - dev/* - sit/* - pre/* - prod/* - - - - src/main/resources/${profiles.active} - true - - *.properties - *.xml - - - - - - org.springframework.boot - spring-boot-maven-plugin - - true - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - - \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/anno/NoNeedLogin.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/anno/NoNeedLogin.java deleted file mode 100644 index 3957937a..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/anno/NoNeedLogin.java +++ /dev/null @@ -1,22 +0,0 @@ -package net.lab1024.smartadmin.common.anno; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * - * [ 不需要登陆 ] - * - * @version 1.0 - * @since JDK1.8 - * @author yandanyang - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.METHOD) -public @interface NoNeedLogin { -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/anno/NoValidPrivilege.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/anno/NoValidPrivilege.java deleted file mode 100644 index d37e63c2..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/anno/NoValidPrivilege.java +++ /dev/null @@ -1,20 +0,0 @@ -package net.lab1024.smartadmin.common.anno; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -/** - * - * [ 不需要权限验证 ] - * - * @version 1.0 - * @since JDK1.8 - * @author yandanyang - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - */ -@Retention(RetentionPolicy.RUNTIME) -public @interface NoValidPrivilege { - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/constant/CommentSortTypeEnum.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/constant/CommentSortTypeEnum.java deleted file mode 100644 index 1a4de4e4..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/constant/CommentSortTypeEnum.java +++ /dev/null @@ -1,57 +0,0 @@ -package net.lab1024.smartadmin.common.constant; - - -import net.lab1024.smartadmin.common.domain.BaseEnum; - -/** - * 全局排序枚举类 - * - * @author listen - * @date 2018/01/13 14:24 - */ -public enum CommentSortTypeEnum implements BaseEnum { - - /** - * 正序 ASC 1 - */ - ASC(1, "ASC"), - - /** - * 倒序 DESC 2 - */ - DESC(2, "DESC"); - - private Integer value; - - private String desc; - - /** - * 排序类型:1正序 | 2倒序 - */ - public static final String INFO = "排序类型:1正序 | 2倒序"; - - CommentSortTypeEnum(Integer value, String desc) { - this.value = value; - this.desc = desc; - } - - /** - * 获取枚举类的值 - * - * @return Integer - */ - @Override - public Integer getValue() { - return value; - } - - /** - * 获取枚举类的说明 - * - * @return String - */ - @Override - public String getDesc() { - return desc; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/constant/JudgeEnum.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/constant/JudgeEnum.java deleted file mode 100644 index d7c55429..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/constant/JudgeEnum.java +++ /dev/null @@ -1,52 +0,0 @@ -package net.lab1024.smartadmin.common.constant; - -import net.lab1024.smartadmin.common.domain.BaseEnum; - -import java.util.Arrays; -import java.util.Optional; - -/** - * - * [ 是与否] - * - * @version 1.0 - * @since JDK1.8 - * @author yandanyang - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - */ -public enum JudgeEnum implements BaseEnum { - - NO(0, "否"), - - YES(1, "是"); - - private Integer value; - private String desc; - - JudgeEnum(Integer value, String desc) { - this.value = value; - this.desc = desc; - } - - @Override - public Integer getValue() { - return value; - } - @Override - public String getDesc() { - return desc; - } - - public static JudgeEnum valueOf(Integer status) { - JudgeEnum[] values = JudgeEnum.values(); - Optional first = Arrays.stream(values).filter(e -> e.getValue().equals(status)).findFirst(); - return !first.isPresent() ? null : first.get(); - } - - public static boolean isExist(Integer status) { - JudgeEnum judgeEnum = valueOf(status); - return judgeEnum != null; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/constant/ResponseCodeConst.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/constant/ResponseCodeConst.java deleted file mode 100644 index c572eecd..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/constant/ResponseCodeConst.java +++ /dev/null @@ -1,181 +0,0 @@ -package net.lab1024.smartadmin.common.constant; - -import net.lab1024.smartadmin.module.system.department.DepartmentResponseCodeConst; -import net.lab1024.smartadmin.module.system.employee.constant.EmployeeResponseCodeConst; -import net.lab1024.smartadmin.module.support.file.constant.FileResponseCodeConst; -import net.lab1024.smartadmin.module.business.log.orderoperatelog.constant.OrderOperateLogOperateTypeConst; -import net.lab1024.smartadmin.module.system.login.LoginResponseCodeConst; -import net.lab1024.smartadmin.module.system.position.PositionResponseCodeConst; -import net.lab1024.smartadmin.module.system.privilege.constant.PrivilegeResponseCodeConst; -import net.lab1024.smartadmin.module.system.role.basic.RoleResponseCodeConst; -import net.lab1024.smartadmin.module.system.systemconfig.constant.SystemConfigResponseCodeConst; -import lombok.extern.slf4j.Slf4j; - -import java.lang.reflect.Field; -import java.util.HashMap; -import java.util.Map; - -/** - * 每个业务,100个范围值就够了. - */ -@Slf4j -public class ResponseCodeConst { - - // 范围声明 - static { - // 系统功能,从0开始,step=1000 - ResponseCodeContainer.register(ResponseCodeConst.class, 0, 1000); - ResponseCodeContainer.register(LoginResponseCodeConst.class, 1001, 1999); - ResponseCodeContainer.register(DepartmentResponseCodeConst.class, 2001, 2999); - ResponseCodeContainer.register(EmployeeResponseCodeConst.class, 3001, 3999); - ResponseCodeContainer.register(FileResponseCodeConst.class, 4001, 4999); - ResponseCodeContainer.register(SystemConfigResponseCodeConst.class, 5001, 5999); - ResponseCodeContainer.register(RoleResponseCodeConst.class, 6001, 6999); - ResponseCodeContainer.register(PrivilegeResponseCodeConst.class, 7001, 7999); - ResponseCodeContainer.register(OrderOperateLogOperateTypeConst.class, 8001, 8999); - ResponseCodeContainer.register(PositionResponseCodeConst.class, 13000, 13999); - - } - - public static final ResponseCodeConst SUCCESS = new ResponseCodeConst(1, "操作成功!", true); - - public static final ResponseCodeConst ERROR_PARAM = new ResponseCodeConst(101, "参数异常!"); - - public static final ResponseCodeConst ERROR_PARAM_ANY = new ResponseCodeConst(102, "%s参数异常!"); - - public static final ResponseCodeConst SYSTEM_ERROR = new ResponseCodeConst(111, "系统错误"); - - public static final ResponseCodeConst DEVELOPMENT = new ResponseCodeConst(112, "此功能正在开发中"); - - public static final ResponseCodeConst NOT_EXISTS = new ResponseCodeConst(113, "数据不存在"); - - public static ResponseCodeConst REQUEST_METHOD_ERROR = new ResponseCodeConst(114, "请求方式错误"); - - public static ResponseCodeConst JSON_FORMAT_ERROR = new ResponseCodeConst(115, "JSON格式错误"); - - protected int code; - - protected String msg; - - protected boolean success; - - public ResponseCodeConst() { - } - - protected ResponseCodeConst(int code, String msg) { - super(); - this.code = code; - this.msg = msg; - ResponseCodeContainer.put(this); - } - - protected ResponseCodeConst(int code, String msg, boolean success) { - super(); - this.code = code; - this.msg = msg; - this.success = success; - ResponseCodeContainer.put(this); - } - - protected ResponseCodeConst(int code) { - super(); - this.code = code; - ResponseCodeContainer.put(this); - } - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public String getMsg() { - return msg; - } - - public void setMsg(String msg) { - this.msg = msg; - } - - public boolean isSuccess() { - return success; - } - - public void setSuccess(boolean success) { - this.success = success; - } - - public static void init() { - log.info("ResponseCodeConst init...."); - } - - // =======================分割======================= - - /** - * 内部类,用于检测code范围 - * - * @author Anders - */ - @Slf4j - private static class ResponseCodeContainer { - - private static final Map RESPONSE_CODE_MAP = new HashMap<>(); - - private static final Map, int[]> RESPONSE_CODE_RANGE_MAP = new HashMap<>(); - - /** - * id的范围:[start, end]左闭右闭 - * - * @param clazz - * @param start - * @param end - */ - private static void register(Class clazz, int start, int end) { - if (start > end) { - throw new IllegalArgumentException(" start > end!"); - } - - if (RESPONSE_CODE_RANGE_MAP.containsKey(clazz)) { - throw new IllegalArgumentException(String.format(" Class:%s already exist!", clazz.getSimpleName())); - } - RESPONSE_CODE_RANGE_MAP.forEach((k, v) -> { - if ((start >= v[0] && start <= v[1]) || (end >= v[0] && end <= v[1])) { - throw new IllegalArgumentException(String.format(" Class:%s 's id range[%d,%d] has " + "intersection with " + "class:%s", clazz.getSimpleName(), start, end, - k.getSimpleName())); - } - }); - - RESPONSE_CODE_RANGE_MAP.put(clazz, new int[]{start, end}); - - // 提前初始化static变量,进行范围检测 - Field[] fields = clazz.getFields(); - if (fields.length != 0) { - try { - fields[0].get(clazz); - } catch (IllegalArgumentException | IllegalAccessException e) { - log.error("", e); - } - } - } - - public static void put(ResponseCodeConst codeConst) { - int[] idRange = RESPONSE_CODE_RANGE_MAP.get(codeConst.getClass()); - if (idRange == null) { - throw new IllegalArgumentException(String.format(" Class:%s has not been registered!", codeConst.getClass().getSimpleName())); - } - int code = codeConst.code; - if (code < idRange[0] || code > idRange[1]) { - throw new IllegalArgumentException(String.format(" Id(%d) out of range[%d,%d], " + "class:%s", code, idRange[0], idRange[1], codeConst.getClass().getSimpleName())); - } - if (RESPONSE_CODE_MAP.keySet().contains(code)) { - log.error(String.format(" Id(%d) out of range[%d,%d], " + "class:%s code is repeat!", code, idRange[0], idRange[1], codeConst.getClass().getSimpleName())); - System.exit(0); - } - RESPONSE_CODE_MAP.put(code, codeConst); - } - - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/controller/BaseController.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/controller/BaseController.java deleted file mode 100644 index 47b321aa..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/controller/BaseController.java +++ /dev/null @@ -1,42 +0,0 @@ -package net.lab1024.smartadmin.common.controller; - -import lombok.extern.slf4j.Slf4j; -import org.apache.poi.ss.usermodel.Workbook; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; - -/** - * @author: zhuoda - * @create: 2020-03-31 08:54 PM from win10 - */ - -@Slf4j -public class BaseController { - - /** - * 下载 Excel 消息头 - * @param fileName - * @param workbook - * @param response - */ - public void downloadExcel(String fileName, Workbook workbook, HttpServletResponse response) { - try { - fileName = URLEncoder.encode(fileName, "UTF-8"); - } catch (UnsupportedEncodingException e) { - log.error("", e); - } - response.setCharacterEncoding("utf-8"); - response.setHeader("Content-Type", "application/vnd.ms-excel"); - response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xls"); - try { - workbook.write(response.getOutputStream()); - workbook.close(); - } catch (IOException e) { - log.error("", e); - } - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/domain/BaseEntity.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/domain/BaseEntity.java deleted file mode 100644 index e6724c94..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/domain/BaseEntity.java +++ /dev/null @@ -1,39 +0,0 @@ -package net.lab1024.smartadmin.common.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import lombok.Data; - -import java.time.LocalDateTime; -import java.util.Date; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/3/27 0027 上午 11:15 - * @since JDK1.8 - */ -@Data -public class BaseEntity { - - /** - * 主键id - */ - @TableId(type = IdType.AUTO) - private Long id; - - /** - * 更新时间 - */ - private Date updateTime; - - /** - * 创建时间 - */ - private Date createTime; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/domain/ITask.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/domain/ITask.java deleted file mode 100644 index b6427c8e..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/domain/ITask.java +++ /dev/null @@ -1,16 +0,0 @@ -package net.lab1024.smartadmin.common.domain; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/13 0013 下午 14:23 - * @since JDK1.8 - */ -public interface ITask { - - void execute(String paramJson) throws Exception; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/domain/OrderItemDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/domain/OrderItemDTO.java deleted file mode 100644 index 759bb93d..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/domain/OrderItemDTO.java +++ /dev/null @@ -1,16 +0,0 @@ -package net.lab1024.smartadmin.common.domain; - -import lombok.Data; -import lombok.extern.slf4j.Slf4j; - -/** - * @author: zhuoda - * @create: 2020-03-20 09:07 PM from win10 - */ - -@Slf4j -@Data -public class OrderItemDTO { - private String column; - private boolean asc = true; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/domain/PageParamDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/domain/PageParamDTO.java deleted file mode 100644 index 73590fc5..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/domain/PageParamDTO.java +++ /dev/null @@ -1,33 +0,0 @@ -package net.lab1024.smartadmin.common.domain; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.Max; -import javax.validation.constraints.NotNull; -import java.util.List; - -/** - * 分页基础参数 - * - * @author lihaifan - * @Date Created in 2017/10/28 16:19 - */ -@Data -public class PageParamDTO { - - @NotNull(message = "分页参数不能为空") - @ApiModelProperty(value = "页码(不能为空)", example = "1") - protected Integer pageNum; - - @NotNull(message = "每页数量不能为空") - @ApiModelProperty(value = "每页数量(不能为空)", example = "10") - @Max(value = 500, message = "每页最大为500") - protected Integer pageSize; - - @ApiModelProperty("是否查询总条数") - protected Boolean searchCount; - - @ApiModelProperty("排序") - protected List orders; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/exception/SmartResponseCodeException.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/exception/SmartResponseCodeException.java deleted file mode 100644 index f3c37ed2..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/exception/SmartResponseCodeException.java +++ /dev/null @@ -1,24 +0,0 @@ -package net.lab1024.smartadmin.common.exception; - -/** - * [ 全局异常拦截后保留ResponseCode码的异常] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/8/7 0007 下午 16:11 - * @since JDK1.8 - */ -public class SmartResponseCodeException extends RuntimeException{ - private Integer code; - - public SmartResponseCodeException(Integer code, String message) { - super(message); - this.code = code; - } - - public Integer getCode() { - return code; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/heartbeat/HeartBeatLogger.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/heartbeat/HeartBeatLogger.java deleted file mode 100644 index 0376b0f0..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/heartbeat/HeartBeatLogger.java +++ /dev/null @@ -1,20 +0,0 @@ -package net.lab1024.smartadmin.common.heartbeat; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/8/8 0008 下午 16:23 - * @since JDK1.8 - */ -public interface HeartBeatLogger { - - void error(String string); - - void error(String string, Throwable e); - - void info(String string); -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/heartbeat/HeartBeatRecordCommendInterface.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/heartbeat/HeartBeatRecordCommendInterface.java deleted file mode 100644 index e94369e3..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/heartbeat/HeartBeatRecordCommendInterface.java +++ /dev/null @@ -1,17 +0,0 @@ -package net.lab1024.smartadmin.common.heartbeat; - - - -/** -* @Description: -* @Author: simajinqiang -* @Date: 2018/7/9 14:06 -*/ -public interface HeartBeatRecordCommendInterface { - /** - * 处理 - * @param heartBeatRecord - */ - void handler(HeartBeatRecordDTO heartBeatRecord); - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/heartbeat/IpUtil.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/heartbeat/IpUtil.java deleted file mode 100644 index e250f074..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/heartbeat/IpUtil.java +++ /dev/null @@ -1,81 +0,0 @@ -package net.lab1024.smartadmin.common.heartbeat; - -import java.net.InetAddress; -import java.net.NetworkInterface; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.List; - -/** -* @Description: ip工具类 -* @Author: sbq -* @CreateDate: 2019/8/8 10:33 -* @Version: 1.0 -*/ -public class IpUtil { - /** - * 获得服务器的IP地址 - */ - public static String getLocalIP() { - String sIP = ""; - InetAddress ip = null; - try { - boolean bFindIP = false; - Enumeration netInterfaces = (Enumeration) NetworkInterface - .getNetworkInterfaces(); - while (netInterfaces.hasMoreElements()) { - if (bFindIP) { - break; - } - NetworkInterface ni = (NetworkInterface) netInterfaces - .nextElement(); - Enumeration ips = ni.getInetAddresses(); - while (ips.hasMoreElements()) { - ip = (InetAddress) ips.nextElement(); - if (!ip.isLoopbackAddress() - && ip.getHostAddress().matches( - "(\\d{1,3}\\.){3}\\d{1,3}")) { - bFindIP = true; - break; - } - } - } - } catch (Exception e) { - } - if (null != ip) { - sIP = ip.getHostAddress(); - } - return sIP; - } - - /** - * @Description: 获得服务器的IP地址(多网卡) - * @Author: sbq - * @CreateDate: 2019/8/8 10:34 - * @Version: 1.0 - */ - public static List getLocalIPS() { - InetAddress ip = null; - List ipList = new ArrayList(); - try { - Enumeration netInterfaces = (Enumeration) NetworkInterface - .getNetworkInterfaces(); - while (netInterfaces.hasMoreElements()) { - NetworkInterface ni = (NetworkInterface) netInterfaces - .nextElement(); - Enumeration ips = ni.getInetAddresses(); - while (ips.hasMoreElements()) { - ip = (InetAddress) ips.nextElement(); - if (!ip.isLoopbackAddress() - && ip.getHostAddress().matches( - "(\\d{1,3}\\.){3}\\d{1,3}")) { - ipList.add(ip.getHostAddress()); - } - } - } - } catch (Exception e) { - } - return ipList; - } - -} \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/heartbeat/StringUtil.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/heartbeat/StringUtil.java deleted file mode 100644 index 9e0842ec..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/heartbeat/StringUtil.java +++ /dev/null @@ -1,60 +0,0 @@ -package net.lab1024.smartadmin.common.heartbeat; - -import java.util.Iterator; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/8/8 0008 下午 16:27 - * @since JDK1.8 - */ -public class StringUtil { - - - - public static String join(Iterable iterable, String separator) { - return iterable == null ? null : join(iterable.iterator(), separator); - } - - - public static String join(Iterator iterator, String separator) { - if (iterator == null) { - return null; - } else if (!iterator.hasNext()) { - return ""; - } else { - Object first = iterator.next(); - if (!iterator.hasNext()) { - String result = toString(first); - return result; - } else { - StringBuilder buf = new StringBuilder(256); - if (first != null) { - buf.append(first); - } - - while(iterator.hasNext()) { - if (separator != null) { - buf.append(separator); - } - - Object obj = iterator.next(); - if (obj != null) { - buf.append(obj); - } - } - - return buf.toString(); - } - } - } - - public static String toString(Object obj) { - return obj == null ? "" : obj.toString(); - } - -} \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/json/LongJsonDeserializer.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/json/LongJsonDeserializer.java deleted file mode 100644 index 0dc8e315..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/json/LongJsonDeserializer.java +++ /dev/null @@ -1,21 +0,0 @@ -package net.lab1024.smartadmin.common.json; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; - -import java.io.IOException; - -public class LongJsonDeserializer extends JsonDeserializer { - - @Override - public Long deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException { - String value = jsonParser.getText(); - try { - return value == null ? null : Long.parseLong(value); - } catch (NumberFormatException e) { - return null; - } - } -} \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/json/LongJsonSerializer.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/json/LongJsonSerializer.java deleted file mode 100644 index 75442925..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/json/LongJsonSerializer.java +++ /dev/null @@ -1,19 +0,0 @@ -package net.lab1024.smartadmin.common.json; - - -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonSerializer; -import com.fasterxml.jackson.databind.SerializerProvider; - -import java.io.IOException; - -public class LongJsonSerializer extends JsonSerializer { - @Override - public void serialize(Long value, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException, JsonProcessingException { - String text = (value == null ? null : String.valueOf(value)); - if (text != null) { - jsonGenerator.writeString(text); - } - } -} \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/SmartReloadManager.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/SmartReloadManager.java deleted file mode 100644 index 1d4770c4..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/SmartReloadManager.java +++ /dev/null @@ -1,134 +0,0 @@ -package net.lab1024.smartadmin.common.reload; - -import net.lab1024.smartadmin.common.reload.annotation.SmartReload; -import net.lab1024.smartadmin.common.reload.domain.AbstractSmartReloadObject; -import net.lab1024.smartadmin.common.reload.domain.AnnotationReloadObject; -import net.lab1024.smartadmin.common.reload.domain.InterfaceReloadObject; -import net.lab1024.smartadmin.common.reload.domain.entity.ReloadItem; -import net.lab1024.smartadmin.common.reload.domain.entity.SmartReloadResult; -import net.lab1024.smartadmin.common.reload.interfaces.SmartReloadCommandInterface; -import net.lab1024.smartadmin.common.reload.interfaces.SmartReloadThreadLogger; -import net.lab1024.smartadmin.common.reload.interfaces.SmartReloadable; - -import java.lang.reflect.Method; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.TimeUnit; - -import static java.util.Objects.requireNonNull; - -/** - * SmartReloadManager 管理器 - *

- * 可以在此类中添加 检测任务 以及注册 处理程序 - * - * @author zhuoda - */ -public class SmartReloadManager { - - private Map tagReloadObject; - - private SmartReloadScheduler reloadScheduler; - - private SmartReloadThreadLogger logger; - - public SmartReloadManager(SmartReloadThreadLogger logger, int threadCount) { - this.tagReloadObject = new ConcurrentHashMap<>(); - if (logger == null) { - throw new ExceptionInInitializerError("SmartReloadLoggerImp cannot be null"); - } - - if (threadCount < 1) { - throw new ExceptionInInitializerError("threadCount must be greater than 1"); - } - - this.logger = logger; - this.reloadScheduler = new SmartReloadScheduler(this.logger, threadCount); - } - - /** - * 默认创建单个线程 - * - * @param logger - */ - public SmartReloadManager(SmartReloadThreadLogger logger) { - this(logger, 1); - } - - /** - * 停止 - */ - public void shutdown() { - reloadScheduler.shutdown(); - } - - /** - * 添加任务 - * - * @param command SmartReloadCommand实现类 - * @param initialDelay 第一次执行前的延迟时间 - * @param delay 任务间隔时间 - * @param unit 延迟单位 TimeUnit 天、小时、分、秒等 - */ - public void addCommand(SmartReloadCommandInterface command, long initialDelay, long delay, TimeUnit unit) { - reloadScheduler.addCommand(command, initialDelay, delay, unit); - } - - /** - * 注册 实现接口的方式 - * - * @param tag - * @param reloadable - */ - public void register(String tag, SmartReloadable reloadable) { - requireNonNull(reloadable); - requireNonNull(tag); - if (tagReloadObject.containsKey(tag)) { - logger.error("<> register duplicated tag reload : " + tag + " , and it will be cover!"); - } - tagReloadObject.put(tag, new InterfaceReloadObject(reloadable)); - } - - /** - * 注册 要求此类必须包含使用了SmartReload注解的方法 - * - * @param reloadObject - */ - public void register(Object reloadObject) { - requireNonNull(reloadObject); - Method[] declaredMethods = reloadObject.getClass().getDeclaredMethods(); - if (declaredMethods != null) { - for (int i = 0; i < declaredMethods.length; i++) { - Method method = declaredMethods[i]; - SmartReload annotation = method.getAnnotation(SmartReload.class); - if (annotation != null) { - String reloadTag = annotation.value(); - this.register(reloadTag, new AnnotationReloadObject(reloadObject, method)); - } - } - } - } - - private void register(String tag, AbstractSmartReloadObject reloadObject) { - if (tagReloadObject.containsKey(tag)) { - logger.error("<> register duplicated tag reload : " + tag + " , and it will be cover!"); - } - tagReloadObject.put(tag, reloadObject); - } - - /** - * Reload 已注册的ReloadItem - * - * @param reloadItem - * @return SmartReloadResult - */ - public SmartReloadResult doReload(ReloadItem reloadItem) { - AbstractSmartReloadObject reloadObject = tagReloadObject.get(reloadItem.getTag()); - if (reloadObject != null) { - return reloadObject.reload(reloadItem); - } - // 返回注册结果 - return new SmartReloadResult(reloadItem.getTag(), reloadItem.getArgs(), reloadItem.getIdentification(), false, "No registered reload handler was found"); - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/SmartReloadScheduler.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/SmartReloadScheduler.java deleted file mode 100644 index 121c3056..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/SmartReloadScheduler.java +++ /dev/null @@ -1,87 +0,0 @@ -package net.lab1024.smartadmin.common.reload; - -import net.lab1024.smartadmin.common.reload.interfaces.SmartReloadCommandInterface; -import net.lab1024.smartadmin.common.reload.interfaces.SmartReloadThreadLogger; - -import java.util.concurrent.ScheduledThreadPoolExecutor; -import java.util.concurrent.ThreadFactory; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; - -/** - * Reload 调度器 - * - * @author zhuoda - */ -public class SmartReloadScheduler { - - private ScheduledThreadPoolExecutor executor; - - private SmartReloadThreadLogger logger; - - SmartReloadScheduler(SmartReloadThreadLogger logger, int threadCount) { - this.executor = new ScheduledThreadPoolExecutor(threadCount, new SmartReloadSchedulerThreadFactory()); - this.logger = logger; - } - - void shutdown() { - try { - executor.shutdown(); - } catch (Throwable e) { - logger.error("<> shutdown ", e); - } - } - - void addCommand(SmartReloadCommandInterface command, long initialDelay, long delay, TimeUnit unit) { - executor.scheduleWithFixedDelay(new ScheduleRunnable(command, this.logger), initialDelay, delay, unit); - } - - static class ScheduleRunnable implements Runnable { - - private SmartReloadCommandInterface command; - - private SmartReloadThreadLogger logger; - - public ScheduleRunnable(SmartReloadCommandInterface command, SmartReloadThreadLogger logger) { - this.command = command; - this.logger = logger; - } - - @Override - public void run() { - try { - command.doTask(); - } catch (Throwable e) { - logger.error("", e); - } - } - } - - static class SmartReloadSchedulerThreadFactory implements ThreadFactory { - - private static final AtomicInteger poolNumber = new AtomicInteger(1); - - private final ThreadGroup group; - - private final AtomicInteger threadNumber = new AtomicInteger(1); - - private final String namePrefix; - - SmartReloadSchedulerThreadFactory() { - SecurityManager s = System.getSecurityManager(); - group = (s != null) ? s.getThreadGroup() : Thread.currentThread().getThreadGroup(); - namePrefix = "smartreload-" + poolNumber.getAndIncrement() + "-thread-"; - } - - @Override - public Thread newThread(Runnable r) { - Thread t = new Thread(group, r, namePrefix + threadNumber.getAndIncrement(), 0); - if (t.isDaemon()) - t.setDaemon(false); - if (t.getPriority() != Thread.NORM_PRIORITY) - t.setPriority(Thread.NORM_PRIORITY); - return t; - } - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/abstracts/AbstractSmartReloadCommand.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/abstracts/AbstractSmartReloadCommand.java deleted file mode 100644 index 8e1dc3ed..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/abstracts/AbstractSmartReloadCommand.java +++ /dev/null @@ -1,66 +0,0 @@ -package net.lab1024.smartadmin.common.reload.abstracts; - -import net.lab1024.smartadmin.common.reload.SmartReloadManager; -import net.lab1024.smartadmin.common.reload.domain.entity.ReloadItem; -import net.lab1024.smartadmin.common.reload.interfaces.SmartReloadCommandInterface; - -import java.util.List; -import java.util.concurrent.ConcurrentHashMap; - -/** - * 检测是否 Reload 的类 - * - * @author zhuoda - */ -public abstract class AbstractSmartReloadCommand implements SmartReloadCommandInterface { - - /** - * 当前ReloadItem的存储器 - */ - private ConcurrentHashMap currentTags = null; - - /** - * Reload的执行类 - */ - private SmartReloadManager reloadManager; - - public AbstractSmartReloadCommand(SmartReloadManager reloadManager) { - this.reloadManager = reloadManager; - this.currentTags = new ConcurrentHashMap<>(); - // 初始获取ReloadItem数据 - List readTagStatesFromDb = readReloadItem(); - if (readTagStatesFromDb != null) { - for (ReloadItem reloadItem : readTagStatesFromDb) { - String tag = reloadItem.getTag(); - String tagChangeIdentifier = reloadItem.getIdentification(); - this.currentTags.put(tag, tagChangeIdentifier); - } - } - } - /** - * 任务: - * 读取数据库中 ReloadItem 数据 - * 校验是否发生变化 - * 执行重加载动作 - */ - @Override - public void doTask() { - // 获取数据库数据 - List readTagStatesFromDb = readReloadItem(); - String tag; - String tagIdentifier; - String preTagChangeIdentifier; - for (ReloadItem reloadItem : readTagStatesFromDb) { - tag = reloadItem.getTag(); - tagIdentifier = reloadItem.getIdentification(); - preTagChangeIdentifier = currentTags.get(tag); - // 数据不一致 - if (preTagChangeIdentifier == null || ! preTagChangeIdentifier.equals(tagIdentifier)) { - // 更新map数据 - currentTags.put(tag, tagIdentifier); - // 执行重新加载此项的动作 - handleReloadResult(this.reloadManager.doReload(reloadItem)); - } - } - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/abstracts/AbstractSmartReloadCommand4Spring.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/abstracts/AbstractSmartReloadCommand4Spring.java deleted file mode 100644 index 60f34a9c..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/abstracts/AbstractSmartReloadCommand4Spring.java +++ /dev/null @@ -1,67 +0,0 @@ -package net.lab1024.smartadmin.common.reload.abstracts; - -import net.lab1024.smartadmin.common.reload.SmartReloadManager; -import net.lab1024.smartadmin.common.reload.domain.entity.ReloadItem; -import net.lab1024.smartadmin.common.reload.interfaces.SmartReloadCommandInterface; -import org.springframework.beans.factory.annotation.Autowired; - -import java.util.List; -import java.util.concurrent.ConcurrentHashMap; - -/** - * 检测是否 Reload 的类 - * - * @author zhuoda - */ -public abstract class AbstractSmartReloadCommand4Spring implements SmartReloadCommandInterface { - - /** - * 当前ReloadItem的存储器 - */ - protected ConcurrentHashMap currentTags = new ConcurrentHashMap<>(); - - /** - * Reload的执行类 - */ - @Autowired - protected SmartReloadManager reloadManager; - -// @PostConstruct - public void init() { - List readTagStatesFromDb = readReloadItem(); - if (readTagStatesFromDb != null) { - for (ReloadItem reloadItem : readTagStatesFromDb) { - String tag = reloadItem.getTag(); - String tagChangeIdentifier = reloadItem.getIdentification(); - this.currentTags.put(tag, tagChangeIdentifier); - } - } - } - - /** - * 任务: - * 读取数据库中 ReloadItem 数据 - * 校验是否发生变化 - * 执行重加载动作 - */ - @Override - public void doTask() { - // 获取数据库数据 - List readTagStatesFromDb = readReloadItem(); - String tag; - String tagIdentifier; - String preTagChangeIdentifier; - for (ReloadItem reloadItem : readTagStatesFromDb) { - tag = reloadItem.getTag(); - tagIdentifier = reloadItem.getIdentification(); - preTagChangeIdentifier = currentTags.get(tag); - // 数据不一致 - if (preTagChangeIdentifier == null || ! preTagChangeIdentifier.equals(tagIdentifier)) { - // 更新map数据 - currentTags.put(tag, tagIdentifier); - // 执行重新加载此项的动作 - handleReloadResult(this.reloadManager.doReload(reloadItem)); - } - } - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/domain/AbstractSmartReloadObject.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/domain/AbstractSmartReloadObject.java deleted file mode 100644 index 907d37da..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/domain/AbstractSmartReloadObject.java +++ /dev/null @@ -1,31 +0,0 @@ -package net.lab1024.smartadmin.common.reload.domain; - -import net.lab1024.smartadmin.common.reload.domain.entity.ReloadItem; -import net.lab1024.smartadmin.common.reload.domain.entity.SmartReloadResult; - -import java.io.PrintWriter; -import java.io.StringWriter; -/** - * AbstractSmartReloadObject 处理程序的抽象类 - * - * @author zhuoda - */ -public abstract class AbstractSmartReloadObject { - - protected String getStackTrace(Throwable e) { - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw); - e.printStackTrace(pw); - return sw.toString(); - } - - /** - * 通过reloadItem参数reload,获得结果 - * - * @param reloadItem - * @return boolean - * @author zhuokongming - * @date 2016年10月21日 下午2:09:44 - */ - public abstract SmartReloadResult reload(ReloadItem reloadItem); -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/domain/AnnotationReloadObject.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/domain/AnnotationReloadObject.java deleted file mode 100644 index da19bcb9..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/domain/AnnotationReloadObject.java +++ /dev/null @@ -1,44 +0,0 @@ -package net.lab1024.smartadmin.common.reload.domain; - -import net.lab1024.smartadmin.common.reload.annotation.SmartReload; -import net.lab1024.smartadmin.common.reload.domain.entity.ReloadItem; -import net.lab1024.smartadmin.common.reload.domain.entity.SmartReloadResult; - -import java.lang.reflect.Method; - -/** - * Reload 处理程序的实现类 - * 用于包装以注解 SmartReload 实现的处理类 - * - * @author zhuoda - */ -public class AnnotationReloadObject extends AbstractSmartReloadObject { - - private Object reloadObject; - - private Method method; - - public AnnotationReloadObject(Object reloadObject, Method method) { - super(); - this.reloadObject = reloadObject; - this.method = method; - this.method.setAccessible(true); - } - - @Override - public SmartReloadResult reload(ReloadItem reloadItem) { - SmartReloadResult result = new SmartReloadResult(); - String tag = method.getAnnotation(SmartReload.class).value(); - result.setTag(tag); - result.setArgs(reloadItem.getArgs()); - result.setIdentification(reloadItem.getIdentification()); - try { - Object invoke = method.invoke(reloadObject, reloadItem.getArgs()); - result.setResult((Boolean) invoke); - } catch (Throwable e) { - result.setException(getStackTrace(e)); - } - return result; - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/domain/InterfaceReloadObject.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/domain/InterfaceReloadObject.java deleted file mode 100644 index e0f75ba0..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/domain/InterfaceReloadObject.java +++ /dev/null @@ -1,37 +0,0 @@ -package net.lab1024.smartadmin.common.reload.domain; - -import net.lab1024.smartadmin.common.reload.domain.entity.ReloadItem; -import net.lab1024.smartadmin.common.reload.domain.entity.SmartReloadResult; -import net.lab1024.smartadmin.common.reload.interfaces.SmartReloadable; - -/** - * Reload 处理程序的实现类 - * 用于处理以接口实现的处理类 - * - * @author zhuoda - */ -public class InterfaceReloadObject extends AbstractSmartReloadObject { - - private SmartReloadable object; - - public InterfaceReloadObject(SmartReloadable object) { - super(); - this.object = object; - } - - @Override - public SmartReloadResult reload(ReloadItem reloadItem) { - SmartReloadResult reloadResult = new SmartReloadResult(); - reloadResult.setArgs(reloadItem.getArgs()); - reloadResult.setIdentification(reloadItem.getIdentification()); - reloadResult.setTag(reloadItem.getTag()); - try { - boolean res = object.reload(reloadItem); - reloadResult.setResult(res); - } catch (Throwable e) { - reloadResult.setException(getStackTrace(e)); - } - return reloadResult; - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/domain/entity/ReloadItem.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/domain/entity/ReloadItem.java deleted file mode 100644 index 66a89b60..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/domain/entity/ReloadItem.java +++ /dev/null @@ -1,55 +0,0 @@ -package net.lab1024.smartadmin.common.reload.domain.entity; -/** - * ReloadItem 类 - * - * @author zhuoda - */ -public class ReloadItem { - - /** - * 项名称 - */ - private String tag; - - /** - * 参数 - */ - private String args; - - /** - * 标识 - */ - private String identification; - - public ReloadItem() { - - } - public ReloadItem(String tag, String identification, String args) { - this.tag = tag; - this.identification = identification; - this.args = args; - } - - public String getTag() { - return tag; - } - public void setTag(String tag) { - this.tag = tag; - } - public String getIdentification() { - return identification; - } - public void setIdentification(String identification) { - this.identification = identification; - } - public String getArgs() { - return args; - } - public void setArgs(String args) { - this.args = args; - } - @Override - public String toString() { - return "ReloadItem{" + "tag='" + tag + '\'' + ", identification='" + identification + '\'' + ", args='" + args + '\'' + '}'; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/domain/entity/SmartReloadResult.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/domain/entity/SmartReloadResult.java deleted file mode 100644 index 07c6d2d5..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/domain/entity/SmartReloadResult.java +++ /dev/null @@ -1,102 +0,0 @@ -package net.lab1024.smartadmin.common.reload.domain.entity; -/** - * t_reload_result 表 实体类 - * - * @author zhuoda - */ -public class SmartReloadResult { - - /** - * 项名称 - */ - private String tag; - - /** - * 参数 - */ - private String args; - - /** - * 标识 - */ - private String identification; - - /** - * 处理结果 - */ - private boolean result; - - /** - * 异常说明 - */ - private String exception; - - public SmartReloadResult() { - } - - public SmartReloadResult(String tag, String args, boolean result, String exception) { - this.tag = tag; - this.args = args; - this.result = result; - this.exception = exception; - } - - public SmartReloadResult(String tag, String args, String identification, boolean result, String exception) { - this.tag = tag; - this.args = args; - this.identification = identification; - this.result = result; - this.exception = exception; - } - - public void setTag(String tag) { - this.tag = tag; - } - - public void setArgs(String args) { - this.args = args; - } - - public void setIdentification(String identification) { - this.identification = identification; - } - - public void setResult(boolean result) { - this.result = result; - } - - public void setException(String exception) { - this.exception = exception; - } - - public String getTag() { - return tag; - } - - public String getArgs() { - return args; - } - - public String getIdentification() { - return identification; - } - - public boolean isResult() { - return result; - } - - public String getException() { - return exception; - } - - @Override - public String toString() { - return "SmartReloadResult{" + - "tag='" + tag + '\'' + - ", args='" + args + '\'' + - ", identification='" + identification + '\'' + - ", result=" + result + - ", exception='" + exception + '\'' + - '}'; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/interfaces/SmartReloadCommandInterface.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/interfaces/SmartReloadCommandInterface.java deleted file mode 100644 index c9e04237..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/interfaces/SmartReloadCommandInterface.java +++ /dev/null @@ -1,38 +0,0 @@ -package net.lab1024.smartadmin.common.reload.interfaces; - -import net.lab1024.smartadmin.common.reload.domain.entity.ReloadItem; -import net.lab1024.smartadmin.common.reload.domain.entity.SmartReloadResult; - -import java.util.List; - -/** - * 检测是否 Reload 的类 - * - * @author zhuoda - */ -public interface SmartReloadCommandInterface { - - /** - * 任务: - * 读取数据库中 ReloadItem 数据 - * 校验是否发生变化 - * 执行重加载动作 - */ - void doTask(); - - /** - * 该方法返回一个List:
- * ReloadItem对象的tagIdentify为:该tag的 状态(状态其实就是个字符串,如果该字符串跟上次有变化则进行reload操作)
- * ReloadItem对象的args为: reload操作需要的参数

- * - * @return List - */ - List readReloadItem(); - - /** - * 处理Reload结果 - * - * @param reloadResult - */ - void handleReloadResult(SmartReloadResult reloadResult); -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/interfaces/SmartReloadThreadLogger.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/interfaces/SmartReloadThreadLogger.java deleted file mode 100644 index e03c9ad7..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/interfaces/SmartReloadThreadLogger.java +++ /dev/null @@ -1,12 +0,0 @@ -package net.lab1024.smartadmin.common.reload.interfaces; - -/** - * SmartReloadThreadLogger 日志类 - */ -public interface SmartReloadThreadLogger { - - void error(String string); - - void error(String string, Throwable e); - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/interfaces/SmartReloadable.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/interfaces/SmartReloadable.java deleted file mode 100644 index 85473d5f..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/common/reload/interfaces/SmartReloadable.java +++ /dev/null @@ -1,19 +0,0 @@ -package net.lab1024.smartadmin.common.reload.interfaces; - -import net.lab1024.smartadmin.common.reload.domain.entity.ReloadItem; - -/** - * reload 接口
- * 需要reload的业务实现类 - */ -@FunctionalInterface -public interface SmartReloadable { - - /** - * reload - * - * @param reloadItem - * @return boolean - */ - boolean reload(ReloadItem reloadItem); -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartAdminWebAppConfig.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartAdminWebAppConfig.java deleted file mode 100644 index 04d30c67..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartAdminWebAppConfig.java +++ /dev/null @@ -1,25 +0,0 @@ -package net.lab1024.smartadmin.config; - -import net.lab1024.smartadmin.interceptor.SmartAuthenticationInterceptor; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.servlet.config.annotation.*; - -@Configuration -public class SmartAdminWebAppConfig implements WebMvcConfigurer { - - @Autowired - private SmartAuthenticationInterceptor smartAuthenticationInterceptor; - - @Override - public void addInterceptors(InterceptorRegistry registry) { - registry.addInterceptor(smartAuthenticationInterceptor).addPathPatterns("/**"); - } - - - @Override - public void addViewControllers(ViewControllerRegistry registry) { - registry.addViewController("/druidMonitor").setViewName("redirect:/druid/index.html"); - registry.addViewController("/swaggerApi").setViewName("redirect:/swagger-ui.html"); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartHeartBeatConfig.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartHeartBeatConfig.java deleted file mode 100644 index 14517a8f..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartHeartBeatConfig.java +++ /dev/null @@ -1,33 +0,0 @@ -package net.lab1024.smartadmin.config; - -import lombok.Data; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Configuration; - -/** - * - * [ ] - * - * @version 1.0 - * @since JDK1.8 - * @author yandanyang - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - */ -@Data -@Configuration -public class SmartHeartBeatConfig { - - /** - * 延迟执行时间 - */ - @Value("${heart-beat.delayHandlerTime}") - private Long delayHandlerTime; - - /** - * 间隔执行时间 - */ - @Value("${heart-beat.intervalTime}") - private Long intervalTime; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartMybatisPlusConfig.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartMybatisPlusConfig.java deleted file mode 100644 index 6bdcfb08..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartMybatisPlusConfig.java +++ /dev/null @@ -1,27 +0,0 @@ -package net.lab1024.smartadmin.config; - -import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; -import com.baomidou.mybatisplus.extension.plugins.pagination.optimize.JsqlParserCountOptimize; -import org.mybatis.spring.annotation.MapperScan; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.transaction.annotation.EnableTransactionManagement; - -/** - * @author zhuoda - */ -@EnableTransactionManagement -@Configuration -@MapperScan(basePackages = {"net.lab1024.smartadmin.module.*"}) -public class SmartMybatisPlusConfig { - - /** - * 分页插件 - */ - @Bean - public PaginationInterceptor paginationInterceptor() { - // 开启 count 的 join 优化,只针对 left join !!! - return new PaginationInterceptor().setCountSqlParser(new JsqlParserCountOptimize(true)); - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartReloadConfig.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartReloadConfig.java deleted file mode 100644 index bf5defdd..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartReloadConfig.java +++ /dev/null @@ -1,45 +0,0 @@ -package net.lab1024.smartadmin.config; - -import net.lab1024.smartadmin.common.reload.SmartReloadManager; -import net.lab1024.smartadmin.common.reload.interfaces.SmartReloadThreadLogger; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/3/28 0028 下午 20:15 - * @since JDK1.8 - */ -@Slf4j -@Configuration -public class SmartReloadConfig { - - @Value("${smart-reload.thread-count}") - private Integer threadCount; - - @Bean - public SmartReloadManager initSmartReloadManager() { - /** - * 创建 Reload Manager 调度器 - */ - SmartReloadManager smartReloadManager = new SmartReloadManager(new SmartReloadThreadLogger() { - @Override - public void error(String string) { - log.error(string); - } - - @Override - public void error(String string, Throwable e) { - log.error(string, e); - } - }, threadCount); - return smartReloadManager; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartRestTemplateConfig.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartRestTemplateConfig.java deleted file mode 100644 index 70d9624c..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartRestTemplateConfig.java +++ /dev/null @@ -1,109 +0,0 @@ -package net.lab1024.smartadmin.config; - -import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter; -import org.apache.http.client.HttpClient; -import org.apache.http.client.config.RequestConfig; -import org.apache.http.config.Registry; -import org.apache.http.config.RegistryBuilder; -import org.apache.http.conn.socket.ConnectionSocketFactory; -import org.apache.http.conn.socket.PlainConnectionSocketFactory; -import org.apache.http.conn.ssl.SSLConnectionSocketFactory; -import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.http.MediaType; -import org.springframework.http.client.ClientHttpRequestFactory; -import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; -import org.springframework.http.converter.FormHttpMessageConverter; -import org.springframework.http.converter.HttpMessageConverter; -import org.springframework.http.converter.StringHttpMessageConverter; -import org.springframework.web.client.RestTemplate; - -import java.nio.charset.Charset; -import java.util.ArrayList; -import java.util.List; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 - */ -@Configuration -public class SmartRestTemplateConfig { - - - @Value("${http.pool.max-total}") - private Integer maxTotal; - @Value("${http.pool.default-max-per-route}") - private Integer defaultMaxPerRoute; - @Value("${http.pool.socket-timeout}") - private Integer socketTimeout; - @Value("${http.pool.connect-timeout}") - private Integer connectTimeout; - @Value("${http.pool.connection-request-timeout}") - private Integer connectionRequestTimeout; - - - @Bean - public RestTemplate restTemplate(ClientHttpRequestFactory factory) { - return new RestTemplate(factory); - } - - @Bean - public ClientHttpRequestFactory httpRequestFactory() { - HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory(httpClient()); - return factory; - } - - /** - * fastJsonRestTemplate - * - * @return - */ - @Bean(name = "fastJsonRestTemplate") - public RestTemplate fastJsonRestTemplate() { - RestTemplate restTemplate = new RestTemplate(httpRequestFactory()); - - HttpMessageConverter converter = new StringHttpMessageConverter(Charset.forName("UTF-8")); - - FastJsonHttpMessageConverter fastConverter = new FastJsonHttpMessageConverter(); - List fastMediaTypes = new ArrayList<>(); - fastMediaTypes.add(MediaType.APPLICATION_FORM_URLENCODED); - fastMediaTypes.add(MediaType.APPLICATION_JSON_UTF8); - fastConverter.setSupportedMediaTypes(fastMediaTypes); - List> converters = restTemplate.getMessageConverters(); - converters.add(1,converter); - converters.add(fastConverter); - return restTemplate; - } - - - @Bean - public HttpClient httpClient() { - Registry registry = RegistryBuilder.create() - .register("http", PlainConnectionSocketFactory.getSocketFactory()) - .register("https", SSLConnectionSocketFactory.getSocketFactory()) - .build(); - PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(registry); - connectionManager.setMaxTotal(maxTotal); - connectionManager.setDefaultMaxPerRoute(defaultMaxPerRoute); - - RequestConfig requestConfig = RequestConfig.custom() - .setSocketTimeout(socketTimeout) - .setConnectTimeout(connectTimeout) - .setConnectionRequestTimeout(connectionRequestTimeout) - .build(); - return HttpClientBuilder.create() - .setDefaultRequestConfig(requestConfig) - .setConnectionManager(connectionManager) - .build(); - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartSwaggerApiModelEnumConfig.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartSwaggerApiModelEnumConfig.java deleted file mode 100644 index 93e45791..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartSwaggerApiModelEnumConfig.java +++ /dev/null @@ -1,29 +0,0 @@ -package net.lab1024.smartadmin.config; - -import net.lab1024.smartadmin.common.swagger.SmartSwaggerApiModelEnumPlugin; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Profile; -import org.springframework.core.annotation.Order; -import springfox.documentation.swagger.common.SwaggerPluginSupport; - -/** - * [ 对于枚举类进行swagger注解,与前端的vue-enum相匹配 ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/8/9 0009 上午 9:46 - * @since JDK1.8 - */ -@Configuration -@Profile({"dev", "sit", "pre", "prod"}) -public class SmartSwaggerApiModelEnumConfig { - - @Bean - @Order(SwaggerPluginSupport.SWAGGER_PLUGIN_ORDER + 1) - public SmartSwaggerApiModelEnumPlugin swaggerEnum(){ - return new SmartSwaggerApiModelEnumPlugin(); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartWebSocketConfig.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartWebSocketConfig.java deleted file mode 100644 index f431fdac..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SmartWebSocketConfig.java +++ /dev/null @@ -1,25 +0,0 @@ -package net.lab1024.smartadmin.config; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.socket.server.standard.ServerEndpointExporter; - -/** - * [ WebSocketConfig ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/7/10 0010 下午 16:07 - * @since JDK1.8 - */ -@Configuration -public class SmartWebSocketConfig { - - @Bean - public ServerEndpointExporter serverEndpointExporter() { - return new ServerEndpointExporter(); - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SystemEnvironmentCondition.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SystemEnvironmentCondition.java deleted file mode 100644 index 63c2a5ed..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/config/SystemEnvironmentCondition.java +++ /dev/null @@ -1,22 +0,0 @@ -package net.lab1024.smartadmin.config; -import net.lab1024.smartadmin.constant.SystemEnvironmentEnum; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Condition; -import org.springframework.context.annotation.ConditionContext; -import org.springframework.core.type.AnnotatedTypeMetadata; -/** - * 是否是正式环境 - * - * @author listen - * @date 2019/08/27 08:56 - */ -public class SystemEnvironmentCondition implements Condition { - - @Value("${spring.profiles.active}") - private String systemEnvironment; - - @Override - public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) { - return ! SystemEnvironmentEnum.PROD.equalsValue(systemEnvironment); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/constant/CommonConst.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/constant/CommonConst.java deleted file mode 100644 index b2c4a63f..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/constant/CommonConst.java +++ /dev/null @@ -1,51 +0,0 @@ -package net.lab1024.smartadmin.constant; - -import com.google.common.collect.ImmutableSet; -import org.apache.commons.collections4.CollectionUtils; - -import java.util.Set; - -/** - * - * [ 通用常量 ] - * - * @version 1.0 - * @since JDK1.8 - * @author yandanyang - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - */ -public class CommonConst { - - - public static final class Page { - public static final Integer SIZE = 10; - } - - public static final class Password { - public static final String DEFAULT = "123456"; - public static final String SALT_FORMAT = "smart_%s_admin"; - } - - public static final String IGNORE_H5_URL_MAPPING = "/h5/api"; - - public static final class CommonCollection { - public static final Set IGNORE_URL = ImmutableSet.of("/swagger", "Excel"); - - public static final Set IGNORE_URL_MAPPING = ImmutableSet.of(IGNORE_H5_URL_MAPPING); - - public static Boolean contain(Set ignores, String uri) { - if (CollectionUtils.isEmpty(ignores)) { - return false; - } - for (String ignoreUrl : ignores) { - if (uri.startsWith(ignoreUrl)) { - return true; - } - } - return false; - } - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/constant/SmartReloadTagConst.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/constant/SmartReloadTagConst.java deleted file mode 100644 index 0799bd66..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/constant/SmartReloadTagConst.java +++ /dev/null @@ -1,16 +0,0 @@ -package net.lab1024.smartadmin.constant; -/** - * smart initDefines 项 常量 - * - * @author listen - * @date 2018/02/10 14:29 - */ -public class SmartReloadTagConst { - - /** - * 系统环境设置 DEMO - */ - public static final String SYSTEM_CONFIG = "system_config"; - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/constant/SwaggerTagConst.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/constant/SwaggerTagConst.java deleted file mode 100644 index 559f9a30..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/constant/SwaggerTagConst.java +++ /dev/null @@ -1,69 +0,0 @@ -package net.lab1024.smartadmin.constant; - -/** - * [] - * - * @author yandanyang - * @version 1.0 - * @since JDK1.8 - */ -public class SwaggerTagConst { - - - public static class Admin { - public static final String MANAGER_SYSTEM_CONFIG = "管理端-系统配置"; - - public static final String MANAGER_USER = "管理端-用户"; - - public static final String MANAGER_USER_LOGIN = "管理端-用户登录"; - - public static final String MANAGER_DEPARTMENT = "管理端-部门"; - - public static final String MANAGER_ROLE = "管理端-角色"; - - public static final String MANAGER_ROLE_USER = "管理端-角色用户"; - - public static final String MANAGER_ROLE_PRIVILEGE = "管理端-角色权限"; - - public static final String MANAGER_SMART_RELOAD = "管理端-smart reload"; - - public static final String MANAGER_ORDER_OPERATE_LOG = "管理端-单据操作日志"; - - public static final String MANAGER_TASK_SCHEDULER = "管理端-任务调度"; - - public static final String MANAGER_USER_LOGIN_LOG = "管理端-用户登录日志"; - - public static final String MANAGER_USER_OPERATE_LOG = "管理端-用户操作日志"; - - public static final String MANAGER_DATA_SCOPE = "管理端-数据范围"; - - public static final String MANAGER_JOB = "管理端-岗位"; - - public static final String MANAGER_NOTICE = "管理端-系统通知"; - - public static final String MANAGER_FILE = "通用-文件服务"; - - public static final String MANAGER_PRIVILEGE = "通用-权限"; - - public static final String MANAGER_EMAIL = "通用-邮件发送"; - - public static final String MANAGER_HEART_BEAT = "通用-心跳服务"; - } - - /** - * 自定义分组2 - */ - public static class Group2 { - - - } - - /** - * 自定义分组2 - */ - public static class Group3 { - - } - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/handler/SmartGlobalExceptionHandler.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/handler/SmartGlobalExceptionHandler.java deleted file mode 100644 index dabd6fd9..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/handler/SmartGlobalExceptionHandler.java +++ /dev/null @@ -1,73 +0,0 @@ -package net.lab1024.smartadmin.handler; - -import net.lab1024.smartadmin.common.constant.ResponseCodeConst; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.common.exception.SmartBusinessException; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.TypeMismatchException; -import org.springframework.http.converter.HttpMessageNotReadableException; -import org.springframework.validation.FieldError; -import org.springframework.web.HttpRequestMethodNotSupportedException; -import org.springframework.web.bind.MethodArgumentNotValidException; -import org.springframework.web.bind.annotation.ControllerAdvice; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.ResponseBody; - -import java.util.List; -import java.util.stream.Collectors; - -/** - * [ 全局异常拦截 ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 - */ -@Slf4j -@ControllerAdvice -public class SmartGlobalExceptionHandler { - - /** - * 添加全局异常处理流程 - * - * @param e - * @return - * @throws Exception - */ - @ResponseBody - @ExceptionHandler(Exception.class) - public ResponseDTO exceptionHandler(Exception e) { - log.error("error:", e); - - // http 请求方式错误 - if (e instanceof HttpRequestMethodNotSupportedException) { - return ResponseDTO.wrap(ResponseCodeConst.REQUEST_METHOD_ERROR); - } - - // 参数类型错误 - if (e instanceof TypeMismatchException) { - return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM); - } - - // json 格式错误 - if (e instanceof HttpMessageNotReadableException) { - return ResponseDTO.wrap(ResponseCodeConst.JSON_FORMAT_ERROR); - } - - // 参数校验未通过 - if (e instanceof MethodArgumentNotValidException) { - List fieldErrors = ((MethodArgumentNotValidException) e).getBindingResult().getFieldErrors(); - List msgList = fieldErrors.stream().map(FieldError :: getDefaultMessage).collect(Collectors.toList()); - return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM, String.join(",", msgList)); - } - - if (e instanceof SmartBusinessException) { - return ResponseDTO.wrap(ResponseCodeConst.SYSTEM_ERROR); - } - - return ResponseDTO.wrap(ResponseCodeConst.SYSTEM_ERROR); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/handler/SmartOperateLogAspect.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/handler/SmartOperateLogAspect.java deleted file mode 100644 index 0dd49cd2..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/handler/SmartOperateLogAspect.java +++ /dev/null @@ -1,167 +0,0 @@ -package net.lab1024.smartadmin.handler; - -import com.alibaba.fastjson.JSON; -import net.lab1024.smartadmin.common.anno.OperateLog; -import net.lab1024.smartadmin.common.constant.JudgeEnum; -import net.lab1024.smartadmin.module.business.log.LogService; -import net.lab1024.smartadmin.module.business.log.useroperatelog.domain.UserOperateLogEntity; -import net.lab1024.smartadmin.module.system.login.domain.RequestTokenBO; -import net.lab1024.smartadmin.util.SmartRequestTokenUtil; -import net.lab1024.smartadmin.util.SmartStringUtil; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.extern.slf4j.Slf4j; -import org.aspectj.lang.JoinPoint; -import org.aspectj.lang.Signature; -import org.aspectj.lang.annotation.AfterReturning; -import org.aspectj.lang.annotation.AfterThrowing; -import org.aspectj.lang.annotation.Aspect; -import org.aspectj.lang.annotation.Pointcut; -import org.aspectj.lang.reflect.MethodSignature; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.core.annotation.AnnotationUtils; -import org.springframework.stereotype.Component; -import org.springframework.web.context.request.RequestContextHolder; -import org.springframework.web.context.request.ServletRequestAttributes; - -import javax.servlet.http.HttpServletRequest; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.lang.reflect.Method; -/** - * [ 操作日志记录处理,对所有OperateLog注解的Controller进行操作日志监控 ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 - */ -@Slf4j -@Aspect -@Component -public class SmartOperateLogAspect { - - @Autowired - private LogService logService; - - @Pointcut("execution(* net.lab1024.smartadmin.module..*Controller.*(..)))") - public void logPointCut() { - } - - @AfterReturning(pointcut = "logPointCut()") - public void doAfterReturning(JoinPoint joinPoint) { - handleLog(joinPoint, null); - } - - @AfterThrowing(value = "logPointCut()", throwing = "e") - public void doAfterThrowing(JoinPoint joinPoint, Exception e) { - handleLog(joinPoint, e); - } - - protected void handleLog(final JoinPoint joinPoint, final Exception e) { - try { - HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); - OperateLog operateLog = this.getAnnotationLog(joinPoint); - if (operateLog == null) { - return; - } - RequestTokenBO requestToken = SmartRequestTokenUtil.getRequestUser(); - if (requestToken == null) { - return; - } - // 设置方法名称 - String className = joinPoint.getTarget().getClass().getName(); - String methodName = joinPoint.getSignature().getName(); - String operateMethod = className + "." + methodName; - Object[] args = joinPoint.getArgs(); - StringBuilder sb = new StringBuilder(); - for (Object obj : args) { - sb.append(obj.getClass().getSimpleName()); - sb.append("["); - sb.append(JSON.toJSONString(obj)); - sb.append("]"); - } - String params = sb.toString(); - String failReason = null; - Integer result = JudgeEnum.YES.getValue(); - if (e != null) { - result = JudgeEnum.NO.getValue(); - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw, true); - e.printStackTrace(pw); - failReason = sw.toString(); - pw.flush(); - pw.close(); - sw.flush(); - sw.close(); - } - UserOperateLogEntity operateLogEntity = - UserOperateLogEntity.builder().userId(requestToken.getRequestUserId()).userName(requestToken.getEmployeeBO().getActualName()).url(request.getRequestURI()).method(operateMethod).param(params).failReason(failReason).result(result).build(); - ApiOperation apiOperation = this.getApiOperation(joinPoint); - if (apiOperation != null) { - operateLogEntity.setContent(apiOperation.value()); - } - Api api = this.getApi(joinPoint); - if (api != null) { - String[] tags = api.tags(); - operateLogEntity.setModule(SmartStringUtil.join(tags, ",")); - } - logService.addLog(operateLogEntity); - } catch (Exception exp) { - log.error("保存操作日志异常:{}", exp.getMessage()); - exp.printStackTrace(); - } - } - - private OperateLog getAnnotationLog(JoinPoint joinPoint) throws Exception { - Signature signature = joinPoint.getSignature(); - MethodSignature methodSignature = (MethodSignature) signature; - Method method = methodSignature.getMethod(); - OperateLog classAnnotation = AnnotationUtils.findAnnotation(method.getDeclaringClass(), OperateLog.class); - - if (method != null) { - return classAnnotation; - } - return null; - } - - /** - * swagger API - * - * @param joinPoint - * @return - * @throws Exception - */ - private Api getApi(JoinPoint joinPoint) { - Signature signature = joinPoint.getSignature(); - MethodSignature methodSignature = (MethodSignature) signature; - Method method = methodSignature.getMethod(); - Api classAnnotation = AnnotationUtils.findAnnotation(method.getDeclaringClass(), Api.class); - - if (method != null) { - return classAnnotation; - } - return null; - } - - /** - * swagger ApiOperation - * - * @param joinPoint - * @return - * @throws Exception - */ - private ApiOperation getApiOperation(JoinPoint joinPoint) { - Signature signature = joinPoint.getSignature(); - MethodSignature methodSignature = (MethodSignature) signature; - Method method = methodSignature.getMethod(); - - if (method != null) { - return method.getAnnotation(ApiOperation.class); - } - return null; - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/interceptor/SmartAuthenticationInterceptor.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/interceptor/SmartAuthenticationInterceptor.java deleted file mode 100644 index 30f299f9..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/interceptor/SmartAuthenticationInterceptor.java +++ /dev/null @@ -1,158 +0,0 @@ -package net.lab1024.smartadmin.interceptor; - -import com.alibaba.fastjson.JSONObject; -import net.lab1024.smartadmin.common.anno.NoNeedLogin; -import net.lab1024.smartadmin.common.anno.NoValidPrivilege; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.constant.CommonConst; -import net.lab1024.smartadmin.module.system.login.LoginResponseCodeConst; -import net.lab1024.smartadmin.module.system.login.LoginTokenService; -import net.lab1024.smartadmin.module.system.login.domain.RequestTokenBO; -import net.lab1024.smartadmin.module.system.privilege.service.PrivilegeEmployeeService; -import net.lab1024.smartadmin.util.SmartRequestTokenUtil; -import net.lab1024.smartadmin.util.SmartStringUtil; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; -import org.springframework.web.method.HandlerMethod; -import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.lang.reflect.Method; -import java.util.List; - -/** - * [ 登录拦截器 ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 - */ -@Component -public class SmartAuthenticationInterceptor extends HandlerInterceptorAdapter { - - public static final String TOKEN_NAME = "x-access-token"; - - @Value("${access-control-allow-origin}") - private String accessControlAllowOrigin; - - @Autowired - private LoginTokenService loginTokenService; - - @Autowired - private PrivilegeEmployeeService privilegeEmployeeService; - - /** - * 拦截服务器端响应处理ajax请求返回结果 - * - * @param request - * @param response - * @param handler - * @return - * @throws Exception - */ - @Override - public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { - //跨域设置 - this.crossDomainConfig(response); - boolean isHandlerMethod = handler instanceof HandlerMethod; - if (! isHandlerMethod) { - return true; - } - - //不需要登录的注解 - Boolean isNoNeedLogin = ((HandlerMethod) handler).getMethodAnnotation(NoNeedLogin.class) != null; - if (isNoNeedLogin) { - return true; - } - - //放行的Uri前缀 - String uri = request.getRequestURI(); - String contextPath = request.getContextPath(); - String target = uri.replaceFirst(contextPath, ""); - if (CommonConst.CommonCollection.contain(CommonConst.CommonCollection.IGNORE_URL, target)) { - return true; - } - - //需要做token校验, 消息头的token优先于请求query参数的token - String xHeaderToken = request.getHeader(TOKEN_NAME); - String xRequestToken = request.getParameter(TOKEN_NAME); - String xAccessToken = null != xHeaderToken ? xHeaderToken : xRequestToken; - if (null == xAccessToken) { - this.outputResult(response, LoginResponseCodeConst.LOGIN_ERROR); - return false; - } - - //根据token获取登录用户 - RequestTokenBO requestToken = loginTokenService.getEmployeeTokenInfo(xAccessToken); - if (null == requestToken) { - this.outputResult(response, LoginResponseCodeConst.LOGIN_ERROR); - return false; - } - - //判断接口权限 - String methodName = ((HandlerMethod) handler).getMethod().getName(); - String className = ((HandlerMethod) handler).getBeanType().getName(); - List list = SmartStringUtil.splitConvertToList(className, "\\."); - String controllerName = list.get(list.size() - 1); - Method m = ((HandlerMethod) handler).getMethod(); - Class cls = ((HandlerMethod) handler).getBeanType(); - boolean isClzAnnotation = cls.isAnnotationPresent(NoValidPrivilege.class); - boolean isMethodAnnotation = m.isAnnotationPresent(NoValidPrivilege.class); - NoValidPrivilege noValidPrivilege = null; - if (isClzAnnotation) { - noValidPrivilege = cls.getAnnotation(NoValidPrivilege.class); - } else if (isMethodAnnotation) { - noValidPrivilege = m.getAnnotation(NoValidPrivilege.class); - } - //不需验证权限 - if (noValidPrivilege != null) { - SmartRequestTokenUtil.setUser(request, requestToken); - return true; - } - //需要验证权限 - Boolean privilegeValidPass = privilegeEmployeeService.checkEmployeeHavePrivilege(requestToken, controllerName, methodName); - if (! privilegeValidPass) { - this.outputResult(response, LoginResponseCodeConst.NOT_HAVE_PRIVILEGES); - return false; - } - SmartRequestTokenUtil.setUser(request, requestToken); - return true; - } - - /** - * 配置跨域 - * - * @param response - */ - private void crossDomainConfig(HttpServletResponse response) { - response.setHeader("Access-Control-Allow-Origin", accessControlAllowOrigin); - response.setHeader("Access-Control-Allow-Credentials", "true"); - response.setHeader("Access-Control-Allow-Methods", "POST, GET, PUT, OPTIONS, DELETE, PATCH"); - response.setHeader("Access-Control-Expose-Headers", "*"); - response.setHeader("Access-Control-Allow-Headers", "Authentication,Origin, X-Requested-With, Content-Type, " + "Accept, x-access-token"); - response.setHeader("Cache-Control", "no-cache"); - response.setHeader("Pragma", "no-cache"); - response.setHeader("Expires ", "-1"); - } - - /** - * 错误输出 - * - * @param response - * @param responseCodeConst - * @throws IOException - */ - private void outputResult(HttpServletResponse response, LoginResponseCodeConst responseCodeConst) throws IOException { - ResponseDTO wrap = ResponseDTO.wrap(responseCodeConst); - String msg = JSONObject.toJSONString(wrap); - response.setContentType("application/json;charset=UTF-8"); - response.getWriter().write(msg); - response.flushBuffer(); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/listener/SmartAdminStartupRunner.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/listener/SmartAdminStartupRunner.java deleted file mode 100644 index 9205fa5b..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/listener/SmartAdminStartupRunner.java +++ /dev/null @@ -1,22 +0,0 @@ -package net.lab1024.smartadmin.listener; - -import net.lab1024.smartadmin.common.constant.ResponseCodeConst; -import org.springframework.boot.CommandLineRunner; -import org.springframework.stereotype.Component; - -/** - * 应用启动以后检测code码 - * - * @author zhuo - * @version 1.0 - * @since JDK1.8 - */ - -@Component -public class SmartAdminStartupRunner implements CommandLineRunner { - - @Override - public void run(String... args) { - ResponseCodeConst.init(); - } -} \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/EmailController.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/EmailController.java deleted file mode 100644 index b7e350bd..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/EmailController.java +++ /dev/null @@ -1,81 +0,0 @@ -package net.lab1024.smartadmin.module.business.email; - -import net.lab1024.smartadmin.common.anno.NoValidPrivilege; -import net.lab1024.smartadmin.common.anno.OperateLog; -import net.lab1024.smartadmin.common.domain.PageResultDTO; -import net.lab1024.smartadmin.constant.SwaggerTagConst; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.module.business.email.domain.dto.EmailDTO; -import net.lab1024.smartadmin.module.business.email.domain.dto.EmailQueryDTO; -import net.lab1024.smartadmin.module.business.email.domain.dto.EmailVO; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import javax.validation.Valid; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date 2019-05-13 17:10:16 - * @since JDK1.8 - */ -@RestController -@OperateLog -@Api(tags = {SwaggerTagConst.Admin.MANAGER_EMAIL}) -public class EmailController { - - @Autowired - private EmailService emailService; - - @ApiOperation(value = "分页查询",notes = "@author yandanyang") - @PostMapping("/email/page/query") - @NoValidPrivilege - public ResponseDTO> queryByPage(@RequestBody @Validated EmailQueryDTO queryDTO) { - return emailService.queryByPage(queryDTO); - } - - @ApiOperation(value = "添加",notes = "@author yandanyang") - @PostMapping("/email/add") - @NoValidPrivilege - public ResponseDTO add(@RequestBody @Valid EmailDTO addTO){ - return emailService.add(addTO); - } - - @ApiOperation(value="修改",notes = "@author yandanyang") - @PostMapping("/email/update") - @NoValidPrivilege - public ResponseDTO update(@RequestBody @Valid EmailDTO updateDTO){ - return emailService.update(updateDTO); - } - - - @ApiOperation(value="删除",notes = "@author yandanyang") - @GetMapping("/email/delete/{id}") - @NoValidPrivilege - public ResponseDTO delete(@PathVariable("id") Long id){ - return emailService.delete(id); - } - - - @ApiOperation(value="详情",notes = "@author yandanyang") - @GetMapping("/email/detail/{id}") - @NoValidPrivilege - public ResponseDTO detail(@PathVariable("id") Long id){ - return emailService.detail(id); - } - - - @ApiOperation(value="发送",notes = "@author yandanyang") - @GetMapping("/email/send/{id}") - @NoValidPrivilege - public ResponseDTO send(@PathVariable("id") Long id){ - return emailService.send(id); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/EmailSendStatusEnum.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/EmailSendStatusEnum.java deleted file mode 100644 index a6cf0c44..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/EmailSendStatusEnum.java +++ /dev/null @@ -1,37 +0,0 @@ -package net.lab1024.smartadmin.module.business.email; - - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/28 0028 下午 15:37 - * @since JDK1.8 - */ -public enum EmailSendStatusEnum { - - NOT_SEND(0,"未发送"), - - SEND(1,"已发送"); - - private Integer type; - private String desc; - - EmailSendStatusEnum(Integer type, String desc) { - this.type = type; - this.desc = desc; - } - - public Integer getType() { - return type; - } - - public String getDesc() { - return desc; - } - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/EmailService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/EmailService.java deleted file mode 100644 index 6b7e5b7d..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/EmailService.java +++ /dev/null @@ -1,122 +0,0 @@ -package net.lab1024.smartadmin.module.business.email; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import net.lab1024.smartadmin.common.constant.ResponseCodeConst; -import net.lab1024.smartadmin.common.domain.PageResultDTO; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.module.business.email.domain.dto.EmailConfigDTO; -import net.lab1024.smartadmin.module.business.email.domain.dto.EmailDTO; -import net.lab1024.smartadmin.module.business.email.domain.dto.EmailQueryDTO; -import net.lab1024.smartadmin.module.business.email.domain.dto.EmailVO; -import net.lab1024.smartadmin.module.business.email.domain.entity.EmailEntity; -import net.lab1024.smartadmin.module.system.systemconfig.SystemConfigService; -import net.lab1024.smartadmin.module.system.systemconfig.constant.SystemConfigEnum; -import net.lab1024.smartadmin.util.SmartBeanUtil; -import net.lab1024.smartadmin.util.SmartPageUtil; -import net.lab1024.smartadmin.util.SmartSendMailUtil; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date 2019-05-13 17:10:16 - * @since JDK1.8 - */ -@Service -public class EmailService { - - @Autowired - private EmailDao emailDao; - - @Autowired - private SystemConfigService systemConfigService; - - /** - * @author yandanyang - * @description 分页查询 - * @date 2019-05-13 17:10:16 - */ - public ResponseDTO> queryByPage(EmailQueryDTO queryDTO) { - Page page = SmartPageUtil.convert2QueryPage(queryDTO); - List entities = emailDao.queryByPage(page, queryDTO); - List dtoList = SmartBeanUtil.copyList(entities, EmailVO.class); - page.setRecords(dtoList); - PageResultDTO pageResultDTO = SmartPageUtil.convert2PageResult(page); - return ResponseDTO.succData(pageResultDTO); - } - - /** - * @author yandanyang - * @description 添加 - * @date 2019-05-13 17:10:16 - */ - public ResponseDTO add(EmailDTO addDTO) { - EmailEntity entity = SmartBeanUtil.copy(addDTO, EmailEntity.class); - emailDao.insert(entity); - return ResponseDTO.succData(entity.getId()); - } - - /** - * @author yandanyang - * @description 编辑 - * @date 2019-05-13 17:10:16 - */ - @Transactional(rollbackFor = Exception.class) - public ResponseDTO update(EmailDTO updateDTO) { - EmailEntity entity = SmartBeanUtil.copy(updateDTO, EmailEntity.class); - emailDao.updateById(entity); - return ResponseDTO.succData(entity.getId()); - } - - /** - * @author yandanyang - * @description 删除 - * @date 2019-05-13 17:10:16 - */ - @Transactional(rollbackFor = Exception.class) - public ResponseDTO delete(Long id) { - emailDao.deleteById(id); - return ResponseDTO.succ(); - } - - /** - * @author yandanyang - * @description 根据ID查询 - * @date 2019-05-13 17:10:16 - */ - public ResponseDTO detail(Long id) { - EmailEntity entity = emailDao.selectById(id); - EmailVO dto = SmartBeanUtil.copy(entity, EmailVO.class); - return ResponseDTO.succData(dto); - } - - /** - * 发送某个已创建的邮件 - * - * @param id - * @return - */ - public ResponseDTO send(Long id) { - EmailEntity entity = emailDao.selectById(id); - EmailConfigDTO emailConfig = systemConfigService.selectByKey2Obj(SystemConfigEnum.Key.EMAIL_CONFIG.name(), EmailConfigDTO.class); - String toEmails = entity.getToEmails(); - if (StringUtils.isEmpty(toEmails)) { - return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM, "收件人信息为空"); - } - String[] emails = toEmails.split(";"); - SmartSendMailUtil.sendMail(emailConfig.getUsername(), emailConfig.getPassword(), emailConfig.getUsername(), emails, "", emailConfig.getSmtpHost(), entity.getTitle(), entity.getContent()); - entity.setSendStatus(EmailSendStatusEnum.SEND.getType()); - emailDao.updateById(entity); - return ResponseDTO.succ(); - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/domain/dto/EmailConfigDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/domain/dto/EmailConfigDTO.java deleted file mode 100644 index 87f0e413..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/domain/dto/EmailConfigDTO.java +++ /dev/null @@ -1,30 +0,0 @@ -package net.lab1024.smartadmin.module.business.email.domain.dto; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/5/13 0013 下午 16:52 - * @since JDK1.8 - */ -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class EmailConfigDTO { - - private String smtpHost; - - private String username; - - private String password; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/domain/dto/EmailDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/domain/dto/EmailDTO.java deleted file mode 100644 index 8300a3f5..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/domain/dto/EmailDTO.java +++ /dev/null @@ -1,44 +0,0 @@ -package net.lab1024.smartadmin.module.business.email.domain.dto; -import lombok.Data; -import java.util.Date; -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModelProperty; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/3/27 0027 下午 12:27 - * @since JDK1.8 - */ -@Data -public class EmailDTO { - - @ApiModelProperty("主键") - private Long id; - - @ApiModelProperty("标题") - private String title; - - @ApiModelProperty("收件人") - private String toEmails; - - @ApiModelProperty("发送状态 0未发送 1已发送") - private Integer sendStatus; - - @ApiModelProperty("邮件内容") - private String content; - - @ApiModelProperty("创建时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date createTime; - - @ApiModelProperty("更新时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date updateTime; - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/domain/dto/EmailQueryDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/domain/dto/EmailQueryDTO.java deleted file mode 100644 index 6768dc4f..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/domain/dto/EmailQueryDTO.java +++ /dev/null @@ -1,35 +0,0 @@ -package net.lab1024.smartadmin.module.business.email.domain.dto; - -import net.lab1024.smartadmin.common.domain.PageParamDTO; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date 2019-05-13 17:10:16 - * @since JDK1.8 - */ -@Data -public class EmailQueryDTO extends PageParamDTO { - - - @ApiModelProperty("开始日期") - private String startDate; - - @ApiModelProperty("结束日期") - private String endDate; - - - @ApiModelProperty("标题") - private String title; - - - @ApiModelProperty("发送状态 0未发送 1已发送") - private Integer sendStatus; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/domain/dto/EmailVO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/domain/dto/EmailVO.java deleted file mode 100644 index 4686efad..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/domain/dto/EmailVO.java +++ /dev/null @@ -1,45 +0,0 @@ -package net.lab1024.smartadmin.module.business.email.domain.dto; - -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.Date; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/3/27 0027 下午 12:27 - * @since JDK1.8 - */ -@Data -public class EmailVO { - - @ApiModelProperty("主键") - private Long id; - - @ApiModelProperty("标题") - private String title; - - @ApiModelProperty("收件人") - private String toEmails; - - @ApiModelProperty("发送状态 0未发送 1已发送") - private Integer sendStatus; - - @ApiModelProperty("邮件内容") - private String content; - - @ApiModelProperty("创建时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date createTime; - - @ApiModelProperty("更新时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date updateTime; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/domain/entity/EmailEntity.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/domain/entity/EmailEntity.java deleted file mode 100644 index d7c0da18..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/email/domain/entity/EmailEntity.java +++ /dev/null @@ -1,40 +0,0 @@ -package net.lab1024.smartadmin.module.business.email.domain.entity; -import com.baomidou.mybatisplus.annotation.TableName; -import net.lab1024.smartadmin.common.domain.BaseEntity; -import lombok.Data; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019-05-13 17:10:16 - * @since JDK1.8 - */ -@Data -@TableName("t_email") -public class EmailEntity extends BaseEntity { - - /** - * 标题 - */ - private String title; - - /** - * 收件人 - */ - private String toEmails; - - /** - * 发送状态 0未发送 1已发送 - */ - private Integer sendStatus; - - /** - * 邮件内容 - */ - private String content; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/LogService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/LogService.java deleted file mode 100644 index 9aae836c..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/LogService.java +++ /dev/null @@ -1,75 +0,0 @@ -package net.lab1024.smartadmin.module.business.log; - -import net.lab1024.smartadmin.module.business.log.orderoperatelog.OrderOperateLogDao; -import net.lab1024.smartadmin.module.business.log.orderoperatelog.domain.entity.OrderOperateLogEntity; -import net.lab1024.smartadmin.module.business.log.userloginlog.UserLoginLogDao; -import net.lab1024.smartadmin.module.business.log.userloginlog.domain.UserLoginLogEntity; -import net.lab1024.smartadmin.module.business.log.useroperatelog.UserOperateLogDao; -import net.lab1024.smartadmin.module.business.log.useroperatelog.domain.UserOperateLogEntity; -import net.lab1024.smartadmin.util.SmartThreadFactory; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.TimeUnit; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/4 0004 下午 16:19 - * @since JDK1.8 - */ -@Slf4j -@Service -public class LogService { - - private ThreadPoolExecutor threadPoolExecutor; - - @Autowired - private UserLoginLogDao userLoginLogDao; - - @Autowired - private OrderOperateLogDao orderOperateLogDao; - - @Autowired - private UserOperateLogDao userOperateLogDao; - - @PostConstruct - void init() { - if (threadPoolExecutor == null) { - threadPoolExecutor = new ThreadPoolExecutor(1, 1, 10L, TimeUnit.SECONDS, new LinkedBlockingQueue<>(2000), SmartThreadFactory.create("LogAspect")); - } - } - - @PreDestroy - void destroy() { - if (threadPoolExecutor != null) { - threadPoolExecutor.shutdown(); - threadPoolExecutor = null; - } - } - - public void addLog(Object object) { - try { - if (object instanceof UserLoginLogEntity) { - threadPoolExecutor.execute(() -> userLoginLogDao.insert((UserLoginLogEntity) object)); - } - if (object instanceof OrderOperateLogEntity) { - threadPoolExecutor.execute(() -> orderOperateLogDao.insert((OrderOperateLogEntity) object)); - } - if (object instanceof UserOperateLogEntity) { - threadPoolExecutor.execute(() -> userOperateLogDao.insert((UserOperateLogEntity) object)); - } - } catch (Throwable e) { - log.error("userLogAfterAdvice:{}", e); - } - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/OrderOperateLogController.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/OrderOperateLogController.java deleted file mode 100644 index 5f84c7ab..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/OrderOperateLogController.java +++ /dev/null @@ -1,44 +0,0 @@ -package net.lab1024.smartadmin.module.business.log.orderoperatelog; - -import net.lab1024.smartadmin.common.anno.OperateLog; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.constant.SwaggerTagConst; -import net.lab1024.smartadmin.module.business.log.orderoperatelog.constant.OrderOperateLogOrderTypeEnum; -import net.lab1024.smartadmin.module.business.log.orderoperatelog.domain.vo.OrderOperateLogVO; -import net.lab1024.smartadmin.util.SmartStringUtil; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RestController; - -import java.util.List; -import java.util.stream.Collectors; - -/** - * 单据操作记录Controller - * - * @author lidoudou - * @date: 2018/1/31 16:56 - */ - -@Api(tags = {SwaggerTagConst.Admin.MANAGER_ORDER_OPERATE_LOG}) -@OperateLog -@RestController -public class OrderOperateLogController { - - @Autowired - private OrderOperateLogService orderOperateLogService; - - @ApiOperation(value = "查询单据操作日志", notes = "查询单据操作日志") - @GetMapping("/orderOperateLog/list/{orderId}") - @ApiImplicitParams({@ApiImplicitParam(name = "orderId", value = "业务id", paramType = "path"), @ApiImplicitParam(name = "orderType", value = "业务类型" + OrderOperateLogOrderTypeEnum.INFO, paramType - = "query")}) - public ResponseDTO> list(@PathVariable Long orderId, String orderType) { - List orderTypeList = SmartStringUtil.splitConverToIntSet(orderType, ",").stream().collect(Collectors.toList()); - return orderOperateLogService.listOrderOperateLogsByOrderTypeAndOrderId(orderId, orderTypeList); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/OrderOperateLogDao.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/OrderOperateLogDao.java deleted file mode 100644 index a720f5c5..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/OrderOperateLogDao.java +++ /dev/null @@ -1,30 +0,0 @@ -package net.lab1024.smartadmin.module.business.log.orderoperatelog; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import net.lab1024.smartadmin.module.business.log.orderoperatelog.domain.entity.OrderOperateLogEntity; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Component; - -import java.util.List; - -/** - *

- * 各种单据操作记录 - * Mapper 接口 - *

- * - * @author anders - * @since 2018-01-09 - */ -@Mapper -@Component -public interface OrderOperateLogDao extends BaseMapper { - - List listOrderOperateLogsByOrderTypeAndOrderId(@Param("orderId") Long orderId, @Param("orderTypeList") List orderTypeList); - - List listOrderOperateLogsByOrderTypeAndOrderIds(@Param("orderIds") List orderIds, @Param("orderTypeList") List orderTypeList); - - void batchInsert(List list); - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/OrderOperateLogService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/OrderOperateLogService.java deleted file mode 100644 index 601b8cef..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/OrderOperateLogService.java +++ /dev/null @@ -1,64 +0,0 @@ -package net.lab1024.smartadmin.module.business.log.orderoperatelog; - -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.module.business.log.orderoperatelog.domain.dto.OrderOperateLogSaveDTO; -import net.lab1024.smartadmin.module.business.log.orderoperatelog.domain.entity.OrderOperateLogEntity; -import net.lab1024.smartadmin.module.business.log.orderoperatelog.domain.vo.OrderOperateLogVO; -import net.lab1024.smartadmin.util.SmartBeanUtil; -import net.lab1024.smartadmin.util.SmartStringUtil; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.stream.Collectors; - -/** - *

- * 各种单据操作记录 - * 服务实现类 - *

- * - * @author anders - * @since 2018-01-09 - */ -@Service -public class OrderOperateLogService { - - @Autowired - private OrderOperateLogDao orderOperateLogDao; - - public void batchSaveOrderOperateLog(List orderOperateLogSaveDTOList) { - List entityList = new ArrayList<>(); - orderOperateLogSaveDTOList.forEach(e -> { - OrderOperateLogEntity orderOperateLogEntity = SmartBeanUtil.copy(e, OrderOperateLogEntity.class); - orderOperateLogEntity.setOperateType(e.getOperateType().getCode()); - if (SmartStringUtil.isNotBlank(e.getOperateContent())) { - orderOperateLogEntity.setOperateContent(e.getOperateContent()); - } else { - orderOperateLogEntity.setOperateContent(e.getOperateType().getMsg()); - } - orderOperateLogEntity.setOperateRemark(e.getOperateRemark()); - orderOperateLogEntity.setExtData(e.getExtData()); - orderOperateLogEntity.setCreateTime(new Date()); - orderOperateLogEntity.setOrderType(e.getOrderType().getType()); - entityList.add(orderOperateLogEntity); - }); - //批量添加 - orderOperateLogDao.batchInsert(entityList); - } - - public ResponseDTO> listOrderOperateLogsByOrderTypeAndOrderId(Long orderId, List orderTypeList) { - List orderOperateLogEntities = orderOperateLogDao.listOrderOperateLogsByOrderTypeAndOrderId(orderId, orderTypeList); - List dtoList = orderOperateLogEntities.stream().map(e -> SmartBeanUtil.copy(e, OrderOperateLogVO.class)).collect(Collectors.toList()); - return ResponseDTO.succData(dtoList); - } - - public ResponseDTO> listOrderOperateLogsByOrderTypeAndOrderIds(List orderIds, List orderTypeList) { - List orderOperateLogEntities = orderOperateLogDao.listOrderOperateLogsByOrderTypeAndOrderIds(orderIds, orderTypeList); - List dtoList = orderOperateLogEntities.stream().map(e -> SmartBeanUtil.copy(e, OrderOperateLogVO.class)).collect(Collectors.toList()); - return ResponseDTO.succData(dtoList); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/constant/OrderOperateLogDefaultEmpEnum.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/constant/OrderOperateLogDefaultEmpEnum.java deleted file mode 100644 index c088322d..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/constant/OrderOperateLogDefaultEmpEnum.java +++ /dev/null @@ -1,37 +0,0 @@ -package net.lab1024.smartadmin.module.business.log.orderoperatelog.constant; - -/** - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 - */ -public enum OrderOperateLogDefaultEmpEnum { - - DEFAULT_EMP(0,"系统"); - - - private Integer empId; - - private String empName; - - OrderOperateLogDefaultEmpEnum(Integer empId,String empName) { - this.empId = empId; - this.empName = empName; - } - - public int getEmpId() { - return empId; - } - - public String getEmpName() { - return empName; - } - - - -} - diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/constant/OrderOperateLogOperateTypeConst.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/constant/OrderOperateLogOperateTypeConst.java deleted file mode 100644 index d5d14b63..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/constant/OrderOperateLogOperateTypeConst.java +++ /dev/null @@ -1,30 +0,0 @@ -package net.lab1024.smartadmin.module.business.log.orderoperatelog.constant; - -import net.lab1024.smartadmin.common.constant.ResponseCodeConst; - -/** - * [ 8001 -8999 ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 - */ -public class OrderOperateLogOperateTypeConst extends ResponseCodeConst { - - - public static final OrderOperateLogOperateTypeConst ADD = new OrderOperateLogOperateTypeConst(8001, "创建并提交"); - - public static final OrderOperateLogOperateTypeConst UPDATE = new OrderOperateLogOperateTypeConst(8002, "修改并提交"); - - public static final OrderOperateLogOperateTypeConst DELETE = new OrderOperateLogOperateTypeConst(8003, "删除"); - - - private OrderOperateLogOperateTypeConst(int code, String msg) { - super(code, msg); - } - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/constant/OrderOperateLogOrderTypeEnum.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/constant/OrderOperateLogOrderTypeEnum.java deleted file mode 100644 index 9674836e..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/constant/OrderOperateLogOrderTypeEnum.java +++ /dev/null @@ -1,51 +0,0 @@ -package net.lab1024.smartadmin.module.business.log.orderoperatelog.constant; - -import java.util.Arrays; -import java.util.Optional; - -/** - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 - */ -public enum OrderOperateLogOrderTypeEnum { - - EXAMPLE(1, "样例"); - - - public static final String INFO = ""; - - private int type; - - private String typeName; - - OrderOperateLogOrderTypeEnum(int type, String typeName) { - this.type = type; - this.typeName = typeName; - } - - public int getType() { - return type; - } - - public String getTypeName() { - return typeName; - } - - public static OrderOperateLogOrderTypeEnum getValueByName(String name) { - OrderOperateLogOrderTypeEnum[] values = OrderOperateLogOrderTypeEnum.values(); - Optional first = Arrays.stream(values).filter(e -> e.getTypeName().equals(name)).findFirst(); - if (!first.isPresent()) { - return null; - } - if (!first.isPresent()) { - return null; - } - OrderOperateLogOrderTypeEnum orderType = first.get(); - return orderType; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/domain/dto/OrderOperateLogSaveDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/domain/dto/OrderOperateLogSaveDTO.java deleted file mode 100644 index a9861bdc..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/domain/dto/OrderOperateLogSaveDTO.java +++ /dev/null @@ -1,80 +0,0 @@ -package net.lab1024.smartadmin.module.business.log.orderoperatelog.domain.dto; - - -import net.lab1024.smartadmin.module.business.log.orderoperatelog.constant.OrderOperateLogOperateTypeConst; -import net.lab1024.smartadmin.module.business.log.orderoperatelog.constant.OrderOperateLogOrderTypeEnum; -import lombok.Data; - -/** - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 - */ -@Data -public class OrderOperateLogSaveDTO { - - /** - * 各种单据的id - */ - private Long orderId; - - /** - * 单据类型 - */ - private OrderOperateLogOrderTypeEnum orderType; - - /** - * 操作类型 - */ - private OrderOperateLogOperateTypeConst operateType; - - /** - *操作类型 对应的中文 - */ - private String operateContent; - - /** - * 操作备注 - */ - private String operateRemark; - - /** - * 员工id - */ - private Long employeeId; - - /** - * 员工名称 - */ - private String employeeName; - - /** - * 额外信息 - */ - private String extData; - - public OrderOperateLogSaveDTO() { - } - - public OrderOperateLogSaveDTO(Long orderId, OrderOperateLogOrderTypeEnum orderType, OrderOperateLogOperateTypeConst operateType, String - operateRemark, Long employeeId, String employeeName, String extData) { - this.orderId = orderId; - this.orderType = orderType; - this.operateType = operateType; - this.operateRemark = operateRemark; - this.employeeId = employeeId; - this.employeeName = employeeName; - this.extData = extData; - } - - @Override - public String toString() { - return "OrderOperateLogSaveDTO{" + "orderId=" + orderId + ", orderType=" + orderType + ", operateType=" + operateType + ", operateRemark='" - + operateRemark + '\'' + ", employeeId=" + employeeId + ", employeeName='" + employeeName + '\'' + ", extData='" + extData + '\'' + '}'; - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/domain/dto/SupplierOrderOperateVO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/domain/dto/SupplierOrderOperateVO.java deleted file mode 100644 index 9633527f..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/domain/dto/SupplierOrderOperateVO.java +++ /dev/null @@ -1,44 +0,0 @@ -package net.lab1024.smartadmin.module.business.log.orderoperatelog.domain.dto; - -import lombok.Data; - -import java.math.BigDecimal; -import java.util.Date; - -/** - * 预存款申请/提取单流水临时文件 - * @author zzr - */ -@Data -public class SupplierOrderOperateVO { - - /** - * 流水类型 - */ - private Integer tradingType; - - /** - * 总重 - */ - private BigDecimal totalWeight; - - /** - * 金额 - */ - private BigDecimal amount; - - /** - * 操作人名称 - */ - private String buyerName; - - /** - * 备注 - */ - private String remark; - - /** - * 创建时间 - */ - private Date createTime; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/domain/entity/OrderOperateLogEntity.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/domain/entity/OrderOperateLogEntity.java deleted file mode 100644 index 8f61f3ec..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/domain/entity/OrderOperateLogEntity.java +++ /dev/null @@ -1,58 +0,0 @@ -package net.lab1024.smartadmin.module.business.log.orderoperatelog.domain.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import net.lab1024.smartadmin.common.domain.BaseEntity; -import lombok.Builder; -import lombok.Data; - -/** - *

- * 各种单据操作记录 - * - *

- * - * @author anders - * @since 2018-01-09 - */ - -@Data -@Builder -@TableName("t_order_operate_log") -public class OrderOperateLogEntity extends BaseEntity { - - /** - * 各种单据的id - */ - private Long orderId; - /** - * 单据类型 - */ - private Integer orderType; - /** - * 操作类型 - */ - private Integer operateType; - /** - * 操作类型 对应的中文 - */ - private String operateContent; - /** - * 操作备注 - */ - private String operateRemark; - /** - * 员工id - */ - private Long employeeId; - /** - * 员工名称 - */ - private String employeeName; - /** - * 额外信息 - */ - private String extData; - - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/domain/vo/OrderOperateLogVO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/domain/vo/OrderOperateLogVO.java deleted file mode 100644 index ab565691..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/orderoperatelog/domain/vo/OrderOperateLogVO.java +++ /dev/null @@ -1,69 +0,0 @@ -package net.lab1024.smartadmin.module.business.log.orderoperatelog.domain.vo; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.Date; - -/** - * @author bhr - * @Description: 操作日志 - * @date 2019/8/28 9:31 - */ -@Data -public class OrderOperateLogVO { - - private Long id; - /** - * 各种单据的id - */ - @ApiModelProperty("各种单据的id") - private Long orderId; - /** - * 单据类型 - */ - @ApiModelProperty("单据类型") - private Integer orderType; - /** - * 操作类型 - */ - @ApiModelProperty("操作类型") - private Integer operateType; - /** - * 操作类型 对应的中文 - */ - @ApiModelProperty("操作类型 对应的中文") - private String operateContent; - /** - * 操作备注 - */ - @ApiModelProperty("操作备注") - private String operateRemark; - @ApiModelProperty("操作备注,包含审批人名使用别名显示") - private String operateSecondRemark; - /** - * 员工id - */ - @ApiModelProperty("员工id") - private Long employeeId; - /** - * 员工名称 - */ - @ApiModelProperty("员工名称") - private String employeeName; - /** - * 员工名称 - */ - @ApiModelProperty("员工别名") - private String employeeSecondName; - /** - * 额外信息 - */ - @ApiModelProperty("额外信息") - private String extData; - /** - * 创建时间 - */ - @ApiModelProperty("创建时间") - private Date createTime; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/userloginlog/UserLoginLogController.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/userloginlog/UserLoginLogController.java deleted file mode 100644 index eccf2e69..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/userloginlog/UserLoginLogController.java +++ /dev/null @@ -1,54 +0,0 @@ -package net.lab1024.smartadmin.module.business.log.userloginlog; - -import net.lab1024.smartadmin.common.anno.OperateLog; -import net.lab1024.smartadmin.common.domain.PageResultDTO; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.constant.SwaggerTagConst; -import net.lab1024.smartadmin.module.system.employee.domain.dto.EmployeeQueryDTO; -import net.lab1024.smartadmin.module.system.employee.domain.vo.EmployeeVO; -import net.lab1024.smartadmin.module.business.log.userloginlog.domain.UserLoginLogDTO; -import net.lab1024.smartadmin.module.business.log.userloginlog.domain.UserLoginLogQueryDTO; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.validation.Valid; - -/** - * [ 用户登录日志 ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date 2019-05-15 10:25:21 - * @since JDK1.8 - */ -@RestController -@Api(tags = {SwaggerTagConst.Admin.MANAGER_USER_LOGIN_LOG}) -@OperateLog -public class UserLoginLogController { - - @Autowired - private UserLoginLogService userLoginLogService; - - @ApiOperation(value = "分页查询用户登录日志", notes = "@author yandanyang") - @PostMapping("/userLoginLog/page/query") - public ResponseDTO> queryByPage(@RequestBody UserLoginLogQueryDTO queryDTO) { - return userLoginLogService.queryByPage(queryDTO); - } - - @ApiOperation(value = "删除用户登录日志", notes = "@author yandanyang") - @GetMapping("/userLoginLog/delete/{id}") - public ResponseDTO delete(@PathVariable("id") Long id) { - return userLoginLogService.delete(id); - } - - @ApiOperation(value = "查询员工在线状态", notes = "@author zzr") - @PostMapping("/userOnLine/query") - public ResponseDTO> queryUserOnLine(@RequestBody @Valid EmployeeQueryDTO queryDTO) { - return userLoginLogService.queryUserOnLine(queryDTO); - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/userloginlog/UserLoginLogDao.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/userloginlog/UserLoginLogDao.java deleted file mode 100644 index ab585690..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/userloginlog/UserLoginLogDao.java +++ /dev/null @@ -1,47 +0,0 @@ -package net.lab1024.smartadmin.module.business.log.userloginlog; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import net.lab1024.smartadmin.module.business.log.userloginlog.domain.UserLoginLogQueryDTO; -import net.lab1024.smartadmin.module.business.log.userloginlog.domain.UserLoginLogEntity; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Component; - -import java.util.List; - -/** - * [ 用户登录日志 ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019-05-15 10:25:21 - * @since JDK1.8 - */ -@Mapper -@Component -public interface UserLoginLogDao extends BaseMapper { - - /** - * 分页查询 - * @param queryDTO - * @return UserLoginLogEntity - */ - List queryByPage(Page page, @Param("queryDTO") UserLoginLogQueryDTO queryDTO); - - /** - * 根据id删除 - * @param id - * @return - */ - void deleteById(@Param("id") Long id); - - /** - * 批量删除 - * @param idList - * @return - */ - void deleteByIds(@Param("idList") List idList); -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/userloginlog/UserLoginLogService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/userloginlog/UserLoginLogService.java deleted file mode 100644 index 0d096fe3..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/userloginlog/UserLoginLogService.java +++ /dev/null @@ -1,82 +0,0 @@ -package net.lab1024.smartadmin.module.business.log.userloginlog; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import net.lab1024.smartadmin.common.domain.PageResultDTO; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.module.system.employee.EmployeeService; -import net.lab1024.smartadmin.module.system.employee.domain.dto.EmployeeQueryDTO; -import net.lab1024.smartadmin.module.system.employee.domain.vo.EmployeeVO; -import net.lab1024.smartadmin.module.business.log.userloginlog.domain.UserLoginLogDTO; -import net.lab1024.smartadmin.module.business.log.userloginlog.domain.UserLoginLogEntity; -import net.lab1024.smartadmin.module.business.log.userloginlog.domain.UserLoginLogQueryDTO; -import net.lab1024.smartadmin.module.support.websocket.WebSocketServer; -import net.lab1024.smartadmin.util.SmartBeanUtil; -import net.lab1024.smartadmin.util.SmartPageUtil; -import org.apache.commons.collections.CollectionUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -/** - * [ 用户登录日志 ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date 2019-05-15 10:25:21 - * @since JDK1.8 - */ -@Service -public class UserLoginLogService { - - @Autowired - private UserLoginLogDao userLoginLogDao; - - @Autowired - private EmployeeService employeeService; - - /** - * @author yandanyang - * @description 分页查询 - * @date 2019-05-15 10:25:21 - */ - public ResponseDTO> queryByPage(UserLoginLogQueryDTO queryDTO) { - Page page = SmartPageUtil.convert2QueryPage(queryDTO); - List entities = userLoginLogDao.queryByPage(page, queryDTO); - List dtoList = SmartBeanUtil.copyList(entities, UserLoginLogDTO.class); - page.setRecords(dtoList); - PageResultDTO pageResultDTO = SmartPageUtil.convert2PageResult(page); - return ResponseDTO.succData(pageResultDTO); - } - - /** - * @author yandanyang - * @description 删除 - * @date 2019-05-15 10:25:21 - */ - @Transactional(rollbackFor = Exception.class) - public ResponseDTO delete(Long id) { - userLoginLogDao.deleteById(id); - return ResponseDTO.succ(); - } - - /** - * 查询员工在线状态 - * - * @param queryDTO - * @return - */ - public ResponseDTO> queryUserOnLine(EmployeeQueryDTO queryDTO) { - List onLineUserList = WebSocketServer.getOnLineUserList(); - if (CollectionUtils.isEmpty(onLineUserList)) { - return ResponseDTO.succ(); - } - queryDTO.setEmployeeIds(onLineUserList); - ResponseDTO> employeeList = employeeService.selectEmployeeList(queryDTO); - return employeeList; - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/userloginlog/domain/UserLoginLogDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/userloginlog/domain/UserLoginLogDTO.java deleted file mode 100644 index efeb14de..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/userloginlog/domain/UserLoginLogDTO.java +++ /dev/null @@ -1,53 +0,0 @@ -package net.lab1024.smartadmin.module.business.log.userloginlog.domain; -import lombok.Data; -import java.util.Date; -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModelProperty; - -/** - * [ 用户登录日志 ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/3/27 0027 下午 12:27 - * @since JDK1.8 - */ -@Data -public class UserLoginLogDTO { - - @ApiModelProperty("主键") - private Long id; - - @ApiModelProperty("员工id") - private Long userId; - - @ApiModelProperty("用户名") - private String userName; - - @ApiModelProperty("用户ip") - private String remoteIp; - - @ApiModelProperty("用户端口") - private Integer remotePort; - - @ApiModelProperty("浏览器") - private String remoteBrowser; - - @ApiModelProperty("操作系统") - private String remoteOs; - - @ApiModelProperty("登录状态") - private Integer loginStatus; - - @ApiModelProperty("更新时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date updateTime; - - @ApiModelProperty("创建时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date createTime; - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/userloginlog/domain/UserLoginLogEntity.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/userloginlog/domain/UserLoginLogEntity.java deleted file mode 100644 index b0d02ac9..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/userloginlog/domain/UserLoginLogEntity.java +++ /dev/null @@ -1,60 +0,0 @@ -package net.lab1024.smartadmin.module.business.log.userloginlog.domain; -import com.baomidou.mybatisplus.annotation.TableName; -import net.lab1024.smartadmin.common.domain.BaseEntity; -import lombok.*; - - -/** - * [ 用户登录日志] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019-05-15 10:25:21 - * @since JDK1.8 - */ -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -@TableName("t_user_login_log") -public class UserLoginLogEntity extends BaseEntity { - - /** - * 员工id - */ - private Long userId; - - /** - * 用户名 - */ - private String userName; - /** - * 用户ip - */ - private String remoteIp; - - /** - * 用户端口 - */ - private Integer remotePort; - - /** - * 浏览器 - */ - private String remoteBrowser; - - /** - * 操作系统 - */ - private String remoteOs; - - /** - * 登录状态 - */ - private Integer loginStatus; - - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/userloginlog/domain/UserLoginLogQueryDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/userloginlog/domain/UserLoginLogQueryDTO.java deleted file mode 100644 index 726797cc..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/userloginlog/domain/UserLoginLogQueryDTO.java +++ /dev/null @@ -1,31 +0,0 @@ -package net.lab1024.smartadmin.module.business.log.userloginlog.domain; - -import net.lab1024.smartadmin.common.domain.PageParamDTO; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * [ 用户登录日志 ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date 2019-05-15 10:25:21 - * @since JDK1.8 - */ -@Data -public class UserLoginLogQueryDTO extends PageParamDTO { - - - @ApiModelProperty("开始日期") - private String startDate; - - @ApiModelProperty("结束日期") - private String endDate; - - - @ApiModelProperty("用户名") - private String userName; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/useroperatelog/UserOperateLogController.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/useroperatelog/UserOperateLogController.java deleted file mode 100644 index e1c2d775..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/useroperatelog/UserOperateLogController.java +++ /dev/null @@ -1,50 +0,0 @@ -package net.lab1024.smartadmin.module.business.log.useroperatelog; - -import net.lab1024.smartadmin.common.anno.OperateLog; -import net.lab1024.smartadmin.common.domain.PageResultDTO; -import net.lab1024.smartadmin.constant.SwaggerTagConst; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.module.business.log.useroperatelog.domain.UserOperateLogDTO; -import net.lab1024.smartadmin.module.business.log.useroperatelog.domain.UserOperateLogQueryDTO; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date 2019-05-15 11:32:14 - * @since JDK1.8 - */ -@RestController -@Api(tags = {SwaggerTagConst.Admin.MANAGER_USER_OPERATE_LOG}) -@OperateLog -public class UserOperateLogController { - - @Autowired - private UserOperateLogService userOperateLogService; - - @ApiOperation(value = "分页查询",notes = "@author yandanyang") - @PostMapping("/userOperateLog/page/query") - public ResponseDTO> queryByPage(@RequestBody UserOperateLogQueryDTO queryDTO) { - return userOperateLogService.queryByPage(queryDTO); - } - - @ApiOperation(value="删除",notes = "@author yandanyang") - @GetMapping("/userOperateLog/delete/{id}") - public ResponseDTO delete(@PathVariable("id") Long id){ - return userOperateLogService.delete(id); - } - - - @ApiOperation(value="详情",notes = "@author yandanyang") - @GetMapping("/userOperateLog/detail/{id}") - public ResponseDTO detail(@PathVariable("id") Long id){ - return userOperateLogService.detail(id); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/useroperatelog/UserOperateLogDao.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/useroperatelog/UserOperateLogDao.java deleted file mode 100644 index 8959bbed..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/useroperatelog/UserOperateLogDao.java +++ /dev/null @@ -1,47 +0,0 @@ -package net.lab1024.smartadmin.module.business.log.useroperatelog; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import net.lab1024.smartadmin.module.business.log.useroperatelog.domain.UserOperateLogQueryDTO; -import net.lab1024.smartadmin.module.business.log.useroperatelog.domain.UserOperateLogEntity; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Component; - -import java.util.List; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019-05-15 11:32:14 - * @since JDK1.8 - */ -@Mapper -@Component -public interface UserOperateLogDao extends BaseMapper { - - /** - * 分页查询 - * @param queryDTO - * @return UserOperateLogEntity - */ - List queryByPage(Page page, @Param("queryDTO") UserOperateLogQueryDTO queryDTO); - - /** - * 根据id删除 - * @param id - * @return - */ - void deleteById(@Param("id") Long id); - - /** - * 批量删除 - * @param idList - * @return - */ - void deleteByIds(@Param("idList") List idList); -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/useroperatelog/UserOperateLogService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/useroperatelog/UserOperateLogService.java deleted file mode 100644 index 772504ce..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/log/useroperatelog/UserOperateLogService.java +++ /dev/null @@ -1,91 +0,0 @@ -package net.lab1024.smartadmin.module.business.log.useroperatelog; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import net.lab1024.smartadmin.common.domain.PageResultDTO; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.module.business.log.useroperatelog.domain.UserOperateLogDTO; -import net.lab1024.smartadmin.module.business.log.useroperatelog.domain.UserOperateLogEntity; -import net.lab1024.smartadmin.module.business.log.useroperatelog.domain.UserOperateLogQueryDTO; -import net.lab1024.smartadmin.util.SmartBeanUtil; -import net.lab1024.smartadmin.util.SmartPageUtil; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date 2019-05-15 11:32:14 - * @since JDK1.8 - */ -@Service -public class UserOperateLogService { - - @Autowired - private UserOperateLogDao userOperateLogDao; - - /** - * @author yandanyang - * @description 分页查询 - * @date 2019-05-15 11:32:14 - */ - public ResponseDTO> queryByPage(UserOperateLogQueryDTO queryDTO) { - Page page = SmartPageUtil.convert2QueryPage(queryDTO); - List entities = userOperateLogDao.queryByPage(page, queryDTO); - List dtoList = SmartBeanUtil.copyList(entities, UserOperateLogDTO.class); - page.setRecords(dtoList); - PageResultDTO pageResultDTO = SmartPageUtil.convert2PageResult(page); - return ResponseDTO.succData(pageResultDTO); - } - - /** - * @author yandanyang - * @description 添加 - * @date 2019-05-15 11:32:14 - */ - public ResponseDTO add(UserOperateLogDTO addDTO) { - UserOperateLogEntity entity = SmartBeanUtil.copy(addDTO, UserOperateLogEntity.class); - userOperateLogDao.insert(entity); - return ResponseDTO.succ(); - } - - /** - * @author yandanyang - * @description 编辑 - * @date 2019-05-15 11:32:14 - */ - @Transactional(rollbackFor = Exception.class) - public ResponseDTO update(UserOperateLogDTO updateDTO) { - UserOperateLogEntity entity = SmartBeanUtil.copy(updateDTO, UserOperateLogEntity.class); - userOperateLogDao.updateById(entity); - return ResponseDTO.succ(); - } - - /** - * @author yandanyang - * @description 删除 - * @date 2019-05-15 11:32:14 - */ - @Transactional(rollbackFor = Exception.class) - public ResponseDTO delete(Long id) { - userOperateLogDao.deleteById(id); - return ResponseDTO.succ(); - } - - /** - * @author yandanyang - * @description 根据ID查询 - * @date 2019-05-15 11:32:14 - */ - public ResponseDTO detail(Long id) { - UserOperateLogEntity entity = userOperateLogDao.selectById(id); - UserOperateLogDTO dto = SmartBeanUtil.copy(entity, UserOperateLogDTO.class); - return ResponseDTO.succData(dto); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/NoticeManage.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/NoticeManage.java deleted file mode 100644 index 7f65e416..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/NoticeManage.java +++ /dev/null @@ -1,97 +0,0 @@ -package net.lab1024.smartadmin.module.business.notice; - -import net.lab1024.smartadmin.common.constant.JudgeEnum; -import net.lab1024.smartadmin.module.system.login.domain.RequestTokenBO; -import net.lab1024.smartadmin.module.business.notice.dao.NoticeDao; -import net.lab1024.smartadmin.module.business.notice.dao.NoticeReceiveRecordDao; -import net.lab1024.smartadmin.module.business.notice.domain.dto.NoticeUpdateDTO; -import net.lab1024.smartadmin.module.business.notice.domain.entity.NoticeEntity; -import net.lab1024.smartadmin.module.business.notice.domain.entity.NoticeReceiveRecordEntity; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.time.LocalDateTime; -import java.util.Date; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/7/13 0013 下午 17:33 - * @since JDK1.8 - */ -@Service -public class NoticeManage { - - @Autowired - private NoticeDao noticeDao; - @Autowired - private NoticeReceiveRecordDao noticeReceiveRecordDao; - - /** - * 发送消息 - * @param entity - * @param requestToken - */ - @Transactional(rollbackFor = Exception.class) - public void send(NoticeEntity entity, RequestTokenBO requestToken){ - - entity.setSendStatus(JudgeEnum.YES.getValue()); - noticeDao.updateById(entity); - //默认发件人 已读此消息 - NoticeReceiveRecordEntity recordEntity = new NoticeReceiveRecordEntity(); - recordEntity.setEmployeeId(requestToken.getRequestUserId()); - recordEntity.setNoticeId(entity.getId()); - recordEntity.setCreateTime(new Date()); - recordEntity.setUpdateTime(new Date()); - noticeReceiveRecordDao.insert(recordEntity); - } - - - /** - * 保存读取记录 - * @param noticeId - * @param requestToken - */ - public void saveReadRecord(Long noticeId, RequestTokenBO requestToken){ - NoticeReceiveRecordEntity recordEntity = new NoticeReceiveRecordEntity(); - recordEntity.setEmployeeId(requestToken.getRequestUserId()); - recordEntity.setNoticeId(noticeId); - recordEntity.setCreateTime(new Date()); - recordEntity.setUpdateTime(new Date()); - noticeReceiveRecordDao.insert(recordEntity); - } - - - /** - * 消息删除 - * @param entity - */ - @Transactional(rollbackFor = Exception.class) - public void delete(NoticeEntity entity) { - if(JudgeEnum.YES.getValue().equals(entity.getSendStatus())){ - //消息已发送 执行逻辑删除 - noticeDao.logicDeleteById(entity.getId(),JudgeEnum.YES.getValue()); - }else{ - //消息未发送 执行真实删除 - noticeDao.deleteById(entity.getId()); - } - } - - /** - * 更新消息 - * @param entity - * @param updateDTO - */ - public void update(NoticeEntity entity,NoticeUpdateDTO updateDTO) { - entity.setTitle(updateDTO.getTitle()); - entity.setContent(updateDTO.getContent()); - entity.setSendStatus(JudgeEnum.NO.getValue()); - entity.setDeleted(JudgeEnum.NO.getValue()); - noticeDao.updateById(entity); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/NoticeService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/NoticeService.java deleted file mode 100644 index 113c285c..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/NoticeService.java +++ /dev/null @@ -1,235 +0,0 @@ -package net.lab1024.smartadmin.module.business.notice; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import net.lab1024.smartadmin.common.constant.JudgeEnum; -import net.lab1024.smartadmin.common.constant.ResponseCodeConst; -import net.lab1024.smartadmin.common.domain.PageParamDTO; -import net.lab1024.smartadmin.common.domain.PageResultDTO; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.module.system.login.domain.RequestTokenBO; -import net.lab1024.smartadmin.module.business.notice.dao.NoticeDao; -import net.lab1024.smartadmin.module.business.notice.dao.NoticeReceiveRecordDao; -import net.lab1024.smartadmin.module.business.notice.domain.dto.*; -import net.lab1024.smartadmin.module.business.notice.domain.entity.NoticeEntity; -import net.lab1024.smartadmin.module.business.notice.domain.entity.NoticeReceiveRecordEntity; -import net.lab1024.smartadmin.module.support.websocket.WebSocketServer; -import net.lab1024.smartadmin.util.SmartBeanUtil; -import net.lab1024.smartadmin.util.SmartPageUtil; -import org.apache.commons.collections.CollectionUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.time.LocalDateTime; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date 2019-07-11 16:19:48 - * @since JDK1.8 - */ -@Service -public class NoticeService { - - @Autowired - private NoticeDao noticeDao; - - @Autowired - private NoticeReceiveRecordDao noticeReceiveRecordDao; - - @Autowired - private NoticeManage noticeManage; - - /** - * @author yandanyang - * @description 分页查询 - * @date 2019-07-11 16:19:48 - */ - public ResponseDTO> queryByPage(NoticeQueryDTO queryDTO) { - queryDTO.setDeleted(JudgeEnum.NO.getValue()); - Page page = SmartPageUtil.convert2QueryPage(queryDTO); - List dtoList = noticeDao.queryByPage(page, queryDTO); - page.setRecords(dtoList); - PageResultDTO pageResultDTO = SmartPageUtil.convert2PageResult(page); - return ResponseDTO.succData(pageResultDTO); - } - - /** - * 获取当前登录人的消息列表 - * - * @param queryDTO - * @param requestToken - * @return - */ - public ResponseDTO> queryReceiveByPage(NoticeReceiveQueryDTO queryDTO, RequestTokenBO requestToken) { - queryDTO.setEmployeeId(requestToken.getRequestUserId()); - queryDTO.setSendStatus(JudgeEnum.YES.getValue()); - Page page = SmartPageUtil.convert2QueryPage(queryDTO); - List dtoList = noticeDao.queryReceiveByPage(page, queryDTO); - dtoList.forEach(e -> { - if (e.getReceiveTime() == null) { - e.setReadStatus(JudgeEnum.NO.getValue()); - } else { - e.setReadStatus(JudgeEnum.YES.getValue()); - } - }); - page.setRecords(dtoList); - PageResultDTO pageResultDTO = SmartPageUtil.convert2PageResult(page); - return ResponseDTO.succData(pageResultDTO); - } - - /** - * 获取我的未读消息 - * - * @param queryDTO - * @param requestToken - * @return - */ - public ResponseDTO> queryUnreadByPage(PageParamDTO queryDTO, RequestTokenBO requestToken) { - Page page = SmartPageUtil.convert2QueryPage(queryDTO); - List dtoList = noticeDao.queryUnreadByPage(page, requestToken.getRequestUserId(), JudgeEnum.YES.getValue()); - page.setRecords(dtoList); - PageResultDTO pageResultDTO = SmartPageUtil.convert2PageResult(page); - return ResponseDTO.succData(pageResultDTO); - } - - /** - * @author yandanyang - * @description 添加 - * @date 2019-07-11 16:19:48 - */ - public ResponseDTO add(NoticeAddDTO addDTO, RequestTokenBO requestToken) { - NoticeEntity entity = SmartBeanUtil.copy(addDTO, NoticeEntity.class); - entity.setCreateTime(new Date()); - entity.setUpdateTime(new Date()); - entity.setCreateUser(requestToken.getRequestUserId()); - entity.setSendStatus(JudgeEnum.NO.getValue()); - entity.setDeleted(JudgeEnum.NO.getValue()); - noticeDao.insert(entity); - return ResponseDTO.succ(); - } - - /** - * @author yandanyang - * @description 编辑 - * @date 2019-07-11 16:19:48 - */ - @Transactional(rollbackFor = Exception.class) - public ResponseDTO update(NoticeUpdateDTO updateDTO) { - NoticeEntity entity = noticeDao.selectById(updateDTO.getId()); - if (entity == null) { - return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM, "此系统通知不存在"); - } - if (JudgeEnum.YES.getValue().equals(entity.getSendStatus())) { - return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM, "此系统通知已发送无法修改"); - } - noticeManage.update(entity, updateDTO); - return ResponseDTO.succ(); - } - - /** - * @author yandanyang - * @description 删除 - * @date 2019-07-11 16:19:48 - */ - public ResponseDTO delete(Long id) { - NoticeEntity entity = noticeDao.selectById(id); - if (entity == null) { - return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM, "此系统通知不存在"); - } - noticeManage.delete(entity); - return ResponseDTO.succ(); - } - - /** - * @author yandanyang - * @description 根据ID查询 - * @date 2019-07-11 16:19:48 - */ - public ResponseDTO detail(Long id) { - NoticeDetailVO noticeDTO = noticeDao.detail(id); - return ResponseDTO.succData(noticeDTO); - } - - /** - * 获取某人的未读消息数 - * - * @param employeeId - * @return - */ - private Integer getUnreadCount(Long employeeId) { - return noticeDao.noticeUnreadCount(employeeId, JudgeEnum.YES.getValue()); - } - - /** - * 发送给所有在线用户未读消息数 - * - * @param id - * @param requestToken - * @return - */ - public ResponseDTO send(Long id, RequestTokenBO requestToken) { - NoticeEntity entity = noticeDao.selectById(id); - if (entity == null) { - return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM, "此系统通知不存在"); - } - noticeManage.send(entity, requestToken); - this.sendMessage(requestToken); - return ResponseDTO.succ(); - } - - /** - * 发送系统通知 ,发送人不进行接收,需再事务外调用 以防止数据隔离级别不同造成未读消息数异常 - * - * @param requestToken - */ - private void sendMessage(RequestTokenBO requestToken) { - List onLineEmployeeIds = WebSocketServer.getOnLineUserList(); - if (CollectionUtils.isEmpty(onLineEmployeeIds)) { - return; - } - //在线用户已读消息数 - Map readCountMap = new HashMap<>(); - List readCountList = noticeDao.readCount(onLineEmployeeIds); - if (CollectionUtils.isNotEmpty(readCountList)) { - readCountMap = readCountList.stream().collect(Collectors.toMap(NoticeReadCountDTO :: getEmployeeId, NoticeReadCountDTO :: getReadCount)); - } - //已发送消息数 - Integer noticeCount = noticeDao.noticeCount(JudgeEnum.YES.getValue()); - for (Long employeeId : onLineEmployeeIds) { - Integer readCount = readCountMap.get(employeeId) == null ? 0 : readCountMap.get(employeeId); - Integer unReadCount = noticeCount - readCount; - if (! requestToken.getRequestUserId().equals(employeeId)) { - WebSocketServer.sendOneOnLineUser(unReadCount.toString(), employeeId); - } - } - } - - /** - * 读取消息 - * - * @param id - * @param requestToken - * @return - */ - public ResponseDTO read(Long id, RequestTokenBO requestToken) { - NoticeDetailVO noticeDTO = noticeDao.detail(id); - - NoticeReceiveRecordEntity recordEntity = noticeReceiveRecordDao.selectByEmployeeAndNotice(requestToken.getRequestUserId(), id); - if (recordEntity != null) { - return ResponseDTO.succData(noticeDTO); - } - noticeManage.saveReadRecord(id, requestToken); - this.sendMessage(requestToken); - return ResponseDTO.succData(noticeDTO); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/dao/NoticeDao.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/dao/NoticeDao.java deleted file mode 100644 index de7caec5..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/dao/NoticeDao.java +++ /dev/null @@ -1,103 +0,0 @@ -package net.lab1024.smartadmin.module.business.notice.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import net.lab1024.smartadmin.common.anno.DataScope; -import net.lab1024.smartadmin.module.business.notice.domain.dto.*; -import net.lab1024.smartadmin.module.business.notice.domain.entity.NoticeEntity; -import net.lab1024.smartadmin.module.system.datascope.constant.DataScopeWhereInTypeEnum; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Component; - -import java.util.List; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019-07-11 16:19:48 - * @since JDK1.8 - */ -@Mapper -@Component -public interface NoticeDao extends BaseMapper { - - /** - * 分页查询 - * @param queryDTO - * @return NoticeEntity - */ - @DataScope(joinSql = "n.create_user in (#employeeIds)", whereInType = DataScopeWhereInTypeEnum.EMPLOYEE) - List queryByPage(Page page, @Param("queryDTO") NoticeQueryDTO queryDTO); - - - /** - * 获取某人的未读消息 - * @param page - * @param employeeId - * @return - */ - @DataScope(joinSql = "e.department_id in (#departmentIds)", whereInType = DataScopeWhereInTypeEnum.DEPARTMENT) - List queryUnreadByPage(Page page, @Param("employeeId") Long employeeId, @Param("sendStatus") Integer sendStatus); - - - /** - * 获取 - * @param page - * @param queryDTO - * @return - */ - List queryReceiveByPage(Page page, @Param("queryDTO") NoticeReceiveQueryDTO queryDTO); - - /** - * 详情 - * @param id - * @return - */ - NoticeDetailVO detail(@Param("id") Long id); - - /** - * 根据id删除 逻辑删除 - * @param id - * @param deletedFlag - */ - void logicDeleteById(@Param("id") Long id,@Param("deletedFlag") Integer deletedFlag); - - - - /** - * 批量逻辑删除 - * @param idList - * @param deletedFlag - * @return - */ - void logicDeleteByIds(@Param("idList") List idList,@Param("deletedFlag") Integer deletedFlag); - - /** - * 获取消息总数 - * @return - */ - Integer noticeCount(@Param("sendStatus") Integer sendStatus); - - - /** - * 获取已读消息数 - * @param employeeIds - * @return - */ - List readCount(@Param("employeeIds") List employeeIds); - - - /** - * 获取某人的未读消息数 - * @param employeeId - * @param sendStatus - * @return - */ - Integer noticeUnreadCount(@Param("employeeId") Long employeeId, @Param("sendStatus") Integer sendStatus); - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/dto/NoticeDetailVO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/dto/NoticeDetailVO.java deleted file mode 100644 index 097317cd..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/dto/NoticeDetailVO.java +++ /dev/null @@ -1,30 +0,0 @@ -package net.lab1024.smartadmin.module.business.notice.domain.dto; - -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.Date; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/3/27 0027 下午 12:27 - * @since JDK1.8 - */ -@Data -public class NoticeDetailVO extends NoticeVO { - - - @ApiModelProperty("消息内容") - private String content; - - @ApiModelProperty("更新时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date updateTime; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/dto/NoticeQueryDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/dto/NoticeQueryDTO.java deleted file mode 100644 index b68feb4f..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/dto/NoticeQueryDTO.java +++ /dev/null @@ -1,34 +0,0 @@ -package net.lab1024.smartadmin.module.business.notice.domain.dto; - -import net.lab1024.smartadmin.common.domain.PageParamDTO; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date 2019-07-11 16:19:48 - * @since JDK1.8 - */ -@Data -public class NoticeQueryDTO extends PageParamDTO { - - - @ApiModelProperty("开始日期") - private String startDate; - - @ApiModelProperty("结束日期") - private String endDate; - - - @ApiModelProperty("消息标题") - private String title; - - @ApiModelProperty(value = "是否删除",hidden = true) - private Integer deleted; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/dto/NoticeReadCountDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/dto/NoticeReadCountDTO.java deleted file mode 100644 index 7821cf76..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/dto/NoticeReadCountDTO.java +++ /dev/null @@ -1,26 +0,0 @@ -package net.lab1024.smartadmin.module.business.notice.domain.dto; - -import lombok.Data; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/7/12 0012 上午 8:11 - * @since JDK1.8 - */ -@Data -public class NoticeReadCountDTO { - /** - * 员工id - */ - private Long employeeId; - /** - * 已读消息数 - */ - private Integer readCount; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/dto/NoticeReceiveDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/dto/NoticeReceiveDTO.java deleted file mode 100644 index aa4aa7ad..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/dto/NoticeReceiveDTO.java +++ /dev/null @@ -1,43 +0,0 @@ -package net.lab1024.smartadmin.module.business.notice.domain.dto; - -import com.fasterxml.jackson.annotation.JsonFormat; -import net.lab1024.smartadmin.common.anno.ApiModelPropertyEnum; -import net.lab1024.smartadmin.common.constant.JudgeEnum; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.Date; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/7/12 0012 上午 11:53 - * @since JDK1.8 - */ -@Data -public class NoticeReceiveDTO{ - - @ApiModelProperty("id") - private Long id; - - @ApiModelProperty("消息标题") - private String title; - - - @ApiModelProperty("消息创建人") - private Long createUser; - - @ApiModelProperty("消息创建人名称") - private String createUserName; - - @ApiModelProperty("结束时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date receiveTime; - - @ApiModelPropertyEnum(enumDesc = "读取状态",value = JudgeEnum.class) - private Integer readStatus; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/dto/NoticeReceiveQueryDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/dto/NoticeReceiveQueryDTO.java deleted file mode 100644 index 63bbc87b..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/dto/NoticeReceiveQueryDTO.java +++ /dev/null @@ -1,25 +0,0 @@ -package net.lab1024.smartadmin.module.business.notice.domain.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/7/12 0012 下午 12:32 - * @since JDK1.8 - */ -@Data -public class NoticeReceiveQueryDTO extends NoticeQueryDTO{ - - @ApiModelProperty(value = "当前登录人",hidden = true) - private Long employeeId; - - @ApiModelProperty(value = "发送状态",hidden = true) - private Integer sendStatus; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/dto/NoticeUpdateDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/dto/NoticeUpdateDTO.java deleted file mode 100644 index d62c00ca..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/dto/NoticeUpdateDTO.java +++ /dev/null @@ -1,21 +0,0 @@ -package net.lab1024.smartadmin.module.business.notice.domain.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/7/11 0011 下午 16:24 - * @since JDK1.8 - */ -@Data -public class NoticeUpdateDTO extends NoticeAddDTO{ - - @ApiModelProperty("id") - private Long id; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/dto/NoticeVO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/dto/NoticeVO.java deleted file mode 100644 index 04fc5fbb..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/dto/NoticeVO.java +++ /dev/null @@ -1,42 +0,0 @@ -package net.lab1024.smartadmin.module.business.notice.domain.dto; -import net.lab1024.smartadmin.common.anno.ApiModelPropertyEnum; -import net.lab1024.smartadmin.common.constant.JudgeEnum; -import lombok.Data; -import java.util.Date; -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModelProperty; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/3/27 0027 下午 12:27 - * @since JDK1.8 - */ -@Data -public class NoticeVO { - - @ApiModelProperty("id") - private Long id; - - @ApiModelProperty("消息标题") - private String title; - - - @ApiModelProperty("消息创建人") - private Long createUser; - - @ApiModelPropertyEnum(enumDesc = "发送状态",value = JudgeEnum.class) - private Integer sendStatus; - - @ApiModelProperty("消息创建人名称") - private String createUserName; - - @ApiModelProperty("创建时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date createTime; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/entity/NoticeEntity.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/entity/NoticeEntity.java deleted file mode 100644 index 4caeca22..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/entity/NoticeEntity.java +++ /dev/null @@ -1,45 +0,0 @@ -package net.lab1024.smartadmin.module.business.notice.domain.entity; -import com.baomidou.mybatisplus.annotation.TableName; -import net.lab1024.smartadmin.common.domain.BaseEntity; -import lombok.Data; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019-07-11 16:19:48 - * @since JDK1.8 - */ -@Data -@TableName("t_notice") -public class NoticeEntity extends BaseEntity { - - /** - * 消息标题 - */ - private String title; - - /** - * 消息内容 - */ - private String content; - - /** - * 消息创建人 - */ - private Long createUser; - - /** - * 发送状态 - */ - private Integer sendStatus; - - /** - * 删除状态 - */ - private Integer deleted; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/entity/NoticeReceiveRecordEntity.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/entity/NoticeReceiveRecordEntity.java deleted file mode 100644 index 74f5f3e7..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/notice/domain/entity/NoticeReceiveRecordEntity.java +++ /dev/null @@ -1,33 +0,0 @@ -package net.lab1024.smartadmin.module.business.notice.domain.entity; -import com.baomidou.mybatisplus.annotation.TableName; -import net.lab1024.smartadmin.common.domain.BaseEntity; -import lombok.Data; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019-07-11 16:19:48 - * @since JDK1.8 - */ -@Data -@TableName("t_notice_receive_record") -public class NoticeReceiveRecordEntity extends BaseEntity { - - - /** - * 消息id - */ - private Long noticeId; - - /** - * 消息接收人 - */ - private Long employeeId; - - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/controller/PeonyController.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/controller/PeonyController.java deleted file mode 100644 index 08b12c62..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/controller/PeonyController.java +++ /dev/null @@ -1,88 +0,0 @@ -package net.lab1024.smartadmin.module.business.peony.controller; - -import net.lab1024.smartadmin.common.domain.PageResultDTO; -import net.lab1024.smartadmin.common.controller.BaseController; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.common.domain.ValidateList; -import net.lab1024.smartadmin.module.business.peony.domain.dto.PeonyAddDTO; -import net.lab1024.smartadmin.module.business.peony.domain.dto.PeonyUpdateDTO; -import net.lab1024.smartadmin.module.business.peony.domain.dto.PeonyQueryDTO; -import net.lab1024.smartadmin.module.business.peony.domain.vo.PeonyVO; -import net.lab1024.smartadmin.module.business.peony.domain.vo.PeonyExcelVO; -import net.lab1024.smartadmin.module.business.peony.service.PeonyService; -import cn.afterturn.easypoi.excel.ExcelExportUtil; -import cn.afterturn.easypoi.excel.entity.ExportParams; -import org.apache.poi.ss.usermodel.Workbook; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; - -/** - * [ 牡丹花 ] - * - * @author 卓大 - * @version 1.0 - * @company 1024创新实验室( www.1024lab.net ) - * @copyright (c) 1024创新实验室( www.1024lab.net )Inc. All rights reserved. - * @date 2020-04-06 18:17:56 - * @since JDK1.8 - */ -@RestController -@Api(tags = {"牡丹花"}) -public class PeonyController extends BaseController { - - @Autowired - private PeonyService peonyService; - - @ApiOperation(value = "分页查询牡丹花",notes = "@author 卓大") - @PostMapping("/peony/page/query") - public ResponseDTO> queryByPage(@RequestBody PeonyQueryDTO queryDTO) { - return peonyService.queryByPage(queryDTO); - } - - @ApiOperation(value = "添加牡丹花",notes = "@author 卓大") - @PostMapping("/peony/add") - public ResponseDTO add(@RequestBody @Validated PeonyAddDTO addTO){ - return peonyService.add(addTO); - } - - @ApiOperation(value="修改牡丹花",notes = "@author 卓大") - @PostMapping("/peony/update") - public ResponseDTO update(@RequestBody @Validated PeonyUpdateDTO updateDTO){ - return peonyService.update(updateDTO); - } - - @ApiOperation(value="批量删除牡丹花",notes = "@author 卓大") - @PostMapping("/peony/deleteByIds") - public ResponseDTO delete(@RequestBody @Validated ValidateList idList) { - return peonyService.deleteByIds(idList); - } - - @ApiOperation(value = "批量导出", notes = "@author 卓大") - @PostMapping("/peony/export/batch") - public void batchExport(@RequestBody @Validated ValidateList idList, HttpServletResponse response) { - //查询数据 - List peonyList = peonyService.queryBatchExportData(idList); - //导出操作 - ExportParams ex = new ExportParams("牡丹花", "Sheet1"); - Workbook workbook = ExcelExportUtil.exportExcel(ex, PeonyExcelVO.class, peonyList); - downloadExcel("牡丹花", workbook, response); - } - - @ApiOperation(value = "导出全部", notes = "@author 卓大") - @PostMapping("/peony/export/all") - public void exportAll(@RequestBody @Validated PeonyQueryDTO queryDTO, HttpServletResponse response) { - //查询数据 - List peonyList = peonyService.queryAllExportData(queryDTO); - //导出操作 - ExportParams ex = new ExportParams("牡丹花", "Sheet1"); - Workbook workbook = ExcelExportUtil.exportExcel(ex, PeonyExcelVO.class, peonyList); - downloadExcel("牡丹花", workbook, response); - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/dao/PeonyDao.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/dao/PeonyDao.java deleted file mode 100644 index bc131bb3..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/dao/PeonyDao.java +++ /dev/null @@ -1,64 +0,0 @@ -package net.lab1024.smartadmin.module.business.peony.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.core.metadata.IPage; -import net.lab1024.smartadmin.module.business.peony.domain.dto.PeonyQueryDTO; -import net.lab1024.smartadmin.module.business.peony.domain.entity.PeonyEntity; -import net.lab1024.smartadmin.module.business.peony.domain.vo.PeonyVO; -import net.lab1024.smartadmin.module.business.peony.domain.vo.PeonyExcelVO; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Component; - -import java.util.List; - -/** - * [ 牡丹花 ] - * - * @author 卓大 - * @version 1.0 - * @company 1024创新实验室( www.1024lab.net ) - * @copyright (c) 1024创新实验室( www.1024lab.net )Inc. All rights reserved. - * @date 2020-04-06 18:17:56 - * @since JDK1.8 - */ -@Mapper -@Component -public interface PeonyDao extends BaseMapper { - - /** - * 分页查询 - * @param queryDTO - * @return PeonyVO - */ - IPage queryByPage(Page page, @Param("queryDTO") PeonyQueryDTO queryDTO); - - /** - * 根据id删除 - * @param id - * @return - */ - void deleteById(@Param("id") Long id); - - /** - * 根据id批量删除 - * @param idList - * @return - */ - void deleteByIdList(@Param("idList") List idList); - - /** - * 查询所有导出数据 - * @param queryDTO - * @return - */ - List queryAllExportData(@Param("queryDTO") PeonyQueryDTO queryDTO); - - /** - * 查询批量导出数据 - * @param idList - * @return - */ - List queryBatchExportData(@Param("idList") List idList); -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/domain/dto/PeonyAddDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/domain/dto/PeonyAddDTO.java deleted file mode 100644 index 976a2593..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/domain/dto/PeonyAddDTO.java +++ /dev/null @@ -1,41 +0,0 @@ -package net.lab1024.smartadmin.module.business.peony.domain.dto; - -import lombok.Data; -import java.util.Date; -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModelProperty; - -/** - * 新建 [ 牡丹花 ] - * - * @author 卓大 - * @version 1.0 - * @company 1024创新实验室( www.1024lab.net ) - * @copyright (c) 2018 1024创新实验室( www.1024lab.net )Inc. All rights reserved. - * @date 2020-04-06 18:17:56 - * @since JDK1.8 - */ -@Data -public class PeonyAddDTO { - @ApiModelProperty("品种") - private String kind; - - @ApiModelProperty("名字") - private String name; - - @ApiModelProperty("颜色") - private String color; - - @ApiModelProperty("图片链接") - private String imageUrl; - - @ApiModelProperty("创建时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date createTime; - - @ApiModelProperty("更新时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date updateTime; - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/domain/dto/PeonyQueryDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/domain/dto/PeonyQueryDTO.java deleted file mode 100644 index 9841f01d..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/domain/dto/PeonyQueryDTO.java +++ /dev/null @@ -1,44 +0,0 @@ -package net.lab1024.smartadmin.module.business.peony.domain.dto; - -import net.lab1024.smartadmin.common.domain.PageParamDTO; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import java.util.Date; - -/** - * [ 牡丹花 ] - * - * @author 卓大 - * @version 1.0 - * @company 1024创新实验室( www.1024lab.net ) - * @copyright (c) 1024创新实验室( www.1024lab.net )Inc. All rights reserved. - * @date 2020-04-06 18:17:56 - * @since JDK1.8 - */ -@Data -public class PeonyQueryDTO extends PageParamDTO { - - @ApiModelProperty("ID") - private Long id; - - @ApiModelProperty("品种") - private String kind; - - @ApiModelProperty("名字") - private String name; - - @ApiModelProperty("颜色") - private String color; - - @ApiModelProperty("创建时间-开始") - private Date createTimeBegin; - - @ApiModelProperty("创建时间-截止") - private Date createTimeEnd; - - @ApiModelProperty("上次更新时间-开始") - private Date updateTimeBegin; - - @ApiModelProperty("上次更新创建时间-开始") - private Date updateTimeEnd; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/domain/dto/PeonyUpdateDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/domain/dto/PeonyUpdateDTO.java deleted file mode 100644 index 7d7ca820..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/domain/dto/PeonyUpdateDTO.java +++ /dev/null @@ -1,20 +0,0 @@ -package net.lab1024.smartadmin.module.business.peony.domain.dto; - -import lombok.Data; - -/** - * 更新 [ 牡丹花 ] - * - * @author 卓大 - * @version 1.0 - * @company 1024创新实验室( www.1024lab.net ) - * @copyright (c) 2018 1024创新实验室( www.1024lab.net )Inc. All rights reserved. - * @date 2020-04-06 18:17:56 - * @since JDK1.8 - */ -@Data -public class PeonyUpdateDTO extends PeonyAddDTO { - - private Long id; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/domain/entity/PeonyEntity.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/domain/entity/PeonyEntity.java deleted file mode 100644 index 48eb9d56..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/domain/entity/PeonyEntity.java +++ /dev/null @@ -1,44 +0,0 @@ -package net.lab1024.smartadmin.module.business.peony.domain.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import net.lab1024.smartadmin.common.domain.BaseEntity; -import lombok.Data; - -/** - * [ 牡丹花 ] - * - * @author 卓大 - * @version 1.0 - * @company 1024创新实验室( www.1024lab.net ) - * @copyright (c) 1024创新实验室( www.1024lab.net )Inc. All rights reserved. - * @date 2020-04-06 18:17:56 - * @since JDK1.8 - */ -@Data -@TableName("t_peony") -public class PeonyEntity extends BaseEntity{ - - - /** - * 品种 - */ - private String kind; - - /** - * 名字 - */ - private String name; - - /** - * 颜色 - */ - private String color; - - /** - * 图片链接 - */ - private String imageUrl; - - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/domain/vo/PeonyExcelVO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/domain/vo/PeonyExcelVO.java deleted file mode 100644 index 8964433f..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/domain/vo/PeonyExcelVO.java +++ /dev/null @@ -1,42 +0,0 @@ -package net.lab1024.smartadmin.module.business.peony.domain.vo; - -import cn.afterturn.easypoi.excel.annotation.Excel; -import lombok.Data; -import java.util.Date; - -/** - * [ 牡丹花 ] - * - * @author 卓大 - * @version 1.0 - * @company 1024创新实验室( www.1024lab.net ) - * @copyright (c) 1024创新实验室( www.1024lab.net )Inc. All rights reserved. - * @date 2020-04-06 18:17:56 - * @since JDK1.8 - */ -@Data -public class PeonyExcelVO { - @Excel(name = "ID") - private Long id; - - @Excel(name = "品种") - private String kind; - - @Excel(name = "名字") - private String name; - - @Excel(name = "颜色") - private String color; - - @Excel(name = "图片链接") - private String imageUrl; - - @Excel(name = "创建时间", format = "yyyy-MM-dd HH:mm:ss") - private Date createTime; - - @Excel(name = "更新时间", format = "yyyy-MM-dd HH:mm:ss") - private Date updateTime; - - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/domain/vo/PeonyVO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/domain/vo/PeonyVO.java deleted file mode 100644 index 06590916..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/domain/vo/PeonyVO.java +++ /dev/null @@ -1,45 +0,0 @@ -package net.lab1024.smartadmin.module.business.peony.domain.vo; - -import lombok.Data; -import java.util.Date; -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModelProperty; - -/** - * [ 牡丹花 ] - * - * @author 卓大 - * @version 1.0 - * @company 1024创新实验室( www.1024lab.net ) - * @copyright (c) 1024创新实验室( www.1024lab.net )Inc. All rights reserved. - * @date 2020-04-06 18:17:56 - * @since JDK1.8 - */ -@Data -public class PeonyVO { - @ApiModelProperty("ID") - private Long id; - - @ApiModelProperty("品种") - private String kind; - - @ApiModelProperty("名字") - private String name; - - @ApiModelProperty("颜色") - private String color; - - @ApiModelProperty("图片链接") - private String imageUrl; - - @ApiModelProperty("创建时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date createTime; - - @ApiModelProperty("更新时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date updateTime; - - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/service/PeonyService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/service/PeonyService.java deleted file mode 100644 index 50bfbb44..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/business/peony/service/PeonyService.java +++ /dev/null @@ -1,108 +0,0 @@ -package net.lab1024.smartadmin.module.business.peony.service; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import net.lab1024.smartadmin.common.domain.PageResultDTO; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.module.business.peony.dao.PeonyDao; -import net.lab1024.smartadmin.module.business.peony.domain.dto.PeonyAddDTO; -import net.lab1024.smartadmin.module.business.peony.domain.dto.PeonyUpdateDTO; -import net.lab1024.smartadmin.module.business.peony.domain.dto.PeonyQueryDTO; -import net.lab1024.smartadmin.module.business.peony.domain.entity.PeonyEntity; -import net.lab1024.smartadmin.module.business.peony.domain.vo.PeonyVO; -import net.lab1024.smartadmin.module.business.peony.domain.vo.PeonyExcelVO; -import net.lab1024.smartadmin.util.SmartPageUtil; -import net.lab1024.smartadmin.util.SmartBeanUtil; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -/** - * [ 牡丹花 ] - * - * @author 卓大 - * @version 1.0 - * @company 1024创新实验室( www.1024lab.net ) - * @copyright (c) 1024创新实验室( www.1024lab.net )Inc. All rights reserved. - * @date 2020-04-06 18:17:56 - * @since JDK1.8 - */ -@Service -public class PeonyService { - - @Autowired - private PeonyDao peonyDao; - - /** - * 根据id查询 - */ - public PeonyEntity getById(Long id){ - return peonyDao.selectById(id); - } - - /** - * 分页查询 - * @author 卓大 - * @date 2020-04-06 18:17:56 - */ - public ResponseDTO> queryByPage(PeonyQueryDTO queryDTO) { - Page page = SmartPageUtil.convert2QueryPage(queryDTO); - IPage voList = peonyDao.queryByPage(page, queryDTO); - PageResultDTO pageResultDTO = SmartPageUtil.convert2PageResult(voList); - return ResponseDTO.succData(pageResultDTO); - } - - /** - * 添加 - * @author 卓大 - * @date 2020-04-06 18:17:56 - */ - public ResponseDTO add(PeonyAddDTO addDTO) { - PeonyEntity entity = SmartBeanUtil.copy(addDTO, PeonyEntity.class); - peonyDao.insert(entity); - return ResponseDTO.succ(); - } - - /** - * 编辑 - * @author 卓大 - * @date 2020-04-06 18:17:56 - */ - @Transactional(rollbackFor = Exception.class) - public ResponseDTO update(PeonyUpdateDTO updateDTO) { - PeonyEntity entity = SmartBeanUtil.copy(updateDTO, PeonyEntity.class); - peonyDao.updateById(entity); - return ResponseDTO.succ(); - } - - /** - * 删除 - * @author 卓大 - * @date 2020-04-06 18:17:56 - */ - @Transactional(rollbackFor = Exception.class) - public ResponseDTO deleteByIds(List idList) { - peonyDao.deleteByIdList(idList); - return ResponseDTO.succ(); - } - - /** - * 查询全部导出对象 - * @author 卓大 - * @date 2020-04-06 18:17:56 - */ - public List queryAllExportData(PeonyQueryDTO queryDTO) { - return peonyDao.queryAllExportData( queryDTO); - } - - /** - * 批量查询导出对象 - * @author 卓大 - * @date 2020-04-06 18:17:56 - */ - public List queryBatchExportData(List idList) { - return peonyDao.queryBatchExportData(idList); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/codegenerator/constant/SqlOperateTypeEnum.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/codegenerator/constant/SqlOperateTypeEnum.java deleted file mode 100644 index 943e1c36..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/codegenerator/constant/SqlOperateTypeEnum.java +++ /dev/null @@ -1,34 +0,0 @@ -package net.lab1024.smartadmin.module.support.codegenerator.constant; - - -/** - * [ gt,lt 目前只支持Date] - * - * @author yandanyang - * @version 1.0 - * @since JDK1.8 - */ -public enum SqlOperateTypeEnum{ - - - LIKE(1, "like"), - EQUALS(2, "equals"), - IN(3, "in"); - - private Integer type; - - private String name; - - SqlOperateTypeEnum(Integer type, String name) { - this.type = type; - this.name = name; - } - - public Integer getType() { - return type; - } - - public String getName() { - return name; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/codegenerator/dao/TableDao.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/codegenerator/dao/TableDao.java deleted file mode 100644 index f8d005ab..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/codegenerator/dao/TableDao.java +++ /dev/null @@ -1,40 +0,0 @@ -package net.lab1024.smartadmin.module.support.codegenerator.dao; - -import net.lab1024.smartadmin.module.support.codegenerator.domain.ColumnVO; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Component; - -import java.util.List; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/5/10 0010 下午 18:59 - * @since JDK1.8 - */ -@Mapper -@Component -public interface TableDao { - - - /** - * 查询表描述 - * @param tableName - * @return - */ - String selectTableDesc(@Param("tableName") String tableName); - - /** - * 查询表列信息 - * @param tableName - * @return - */ - List selectTableColumn(@Param("tableName") String tableName); - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/codegenerator/domain/CodeGeneratorDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/codegenerator/domain/CodeGeneratorDTO.java deleted file mode 100644 index 4995aa57..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/codegenerator/domain/CodeGeneratorDTO.java +++ /dev/null @@ -1,56 +0,0 @@ -package net.lab1024.smartadmin.module.support.codegenerator.domain; - -import lombok.Builder; -import lombok.Data; - -import java.util.List; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/5/11 0011 上午 10:12 - * @since JDK1.8 - */ -@Data -@Builder -public class CodeGeneratorDTO { - - /** - * 需要生成代码的表名 - */ - private String tableName; - - /** - * 表前缀 - */ - private String tablePrefix; - - /** - * 基础包路径 - */ - private String basePackage; - - /** - * module下的子包 - */ - private String modulePackage; - - /** - * 公司 - */ - private String company; - - /** - * 作者 - */ - private String author; - - /** - * 需要构建查询方法的列 - */ - private List queryColumnList; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/codegenerator/domain/CodeGeneratorQueryColumnDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/codegenerator/domain/CodeGeneratorQueryColumnDTO.java deleted file mode 100644 index 9e1bd054..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/codegenerator/domain/CodeGeneratorQueryColumnDTO.java +++ /dev/null @@ -1,30 +0,0 @@ -package net.lab1024.smartadmin.module.support.codegenerator.domain; - -import net.lab1024.smartadmin.module.support.codegenerator.constant.SqlOperateTypeEnum; -import lombok.Builder; -import lombok.Data; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/5/11 0011 上午 10:13 - * @since JDK1.8 - */ -@Data -@Builder -public class CodeGeneratorQueryColumnDTO { - - /** - * 生成查询方法的查询列名 - */ - private String columnName; - - /** - * 此列的查询动作 - */ - private SqlOperateTypeEnum sqlOperate; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/codegenerator/domain/ColumnVO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/codegenerator/domain/ColumnVO.java deleted file mode 100644 index 9bec4d9f..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/codegenerator/domain/ColumnVO.java +++ /dev/null @@ -1,36 +0,0 @@ -package net.lab1024.smartadmin.module.support.codegenerator.domain; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/5/10 0010 下午 17:55 - * @since JDK1.8 - */ -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class ColumnVO { - - private String columnName; - - private String columnType; - - private String columnDesc; - - private String fieldType; - - private String fieldName; - - private Boolean isNumber; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/codegenerator/domain/QueryFieldVO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/codegenerator/domain/QueryFieldVO.java deleted file mode 100644 index c2afcc53..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/codegenerator/domain/QueryFieldVO.java +++ /dev/null @@ -1,30 +0,0 @@ -package net.lab1024.smartadmin.module.support.codegenerator.domain; - -import lombok.Builder; -import lombok.Data; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/5/10 0010 下午 17:56 - * @since JDK1.8 - */ -@Data -@Builder -public class QueryFieldVO { - - private String fieldName; - - private String columnName; - - private String columnDesc; - - private String fieldType; - - private String sqlOperate; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/codegenerator/service/CodeGeneratorComponent.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/codegenerator/service/CodeGeneratorComponent.java deleted file mode 100644 index 37ee4e87..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/codegenerator/service/CodeGeneratorComponent.java +++ /dev/null @@ -1,92 +0,0 @@ -package net.lab1024.smartadmin.module.support.codegenerator.service; - -import com.google.common.base.CaseFormat; -import org.springframework.stereotype.Component; - -import java.io.File; -import java.util.HashMap; -import java.util.Map; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/5/11 0011 上午 8:33 - * @since JDK1.8 - */ -@Component -public class CodeGeneratorComponent { - - private static Map dataMap = new HashMap<>(16); - private static Map numberTypeMap = new HashMap<>(16); - - static { - dataMap(); - } - - public static void dataMap() { - numberTypeMap.put("int", "Integer"); - numberTypeMap.put("tinyint", "Integer"); - numberTypeMap.put("smallint", "Integer"); - numberTypeMap.put("integer", "Integer"); - numberTypeMap.put("bigint", "Long"); - numberTypeMap.put("float", "Float"); - numberTypeMap.put("double", "Double"); - numberTypeMap.put("decimal", "BigDecimal"); - - dataMap.put("char", "String"); - dataMap.put("varchar", "String"); - dataMap.put("tinytext", "String"); - dataMap.put("text", "String"); - dataMap.put("longtext", "String"); - - dataMap.put("date", "Date"); - dataMap.put("datetime", "Date"); - dataMap.put("timestamp", "Date"); - - } - - - public Map codeTemplates(String moduleClass, String basePackage, String modulePackage) { - String modulePath = modulePackage.replaceAll("\\.", "/"); - String javaPackagePath = "java/" + modulePath + File.separator; - String xmlPackagePath = "mapper/" + modulePath + File.separator; - String frontPackagePath = "web" + File.separator; - Map templateMap = new HashMap<>(); - //后端 - templateMap.put("templates/codegenerator/java/Controller.java.vm", javaPackagePath + "controller" + File.separator + moduleClass + "Controller.java"); - templateMap.put("templates/codegenerator/java/Dao.java.vm", javaPackagePath + "dao" + File.separator + moduleClass + "Dao.java"); - templateMap.put("templates/codegenerator/java/Dao.xml.vm", xmlPackagePath + moduleClass + "Mapper.xml"); - templateMap.put("templates/codegenerator/java/AddDTO.java.vm", javaPackagePath + "domain" + File.separator + "dto" + File.separator + moduleClass + "AddDTO.java"); - templateMap.put("templates/codegenerator/java/UpdateDTO.java.vm", javaPackagePath + "domain" + File.separator + "dto" + File.separator + moduleClass + "UpdateDTO.java"); - templateMap.put("templates/codegenerator/java/Entity.java.vm", javaPackagePath + "domain" + File.separator + "entity" + File.separator + moduleClass + "Entity.java"); - templateMap.put("templates/codegenerator/java/VO.java.vm", javaPackagePath + "domain" + File.separator + "vo" + File.separator + moduleClass + "VO.java"); - templateMap.put("templates/codegenerator/java/ExcelVO.java.vm", javaPackagePath + "domain" + File.separator + "vo" + File.separator + moduleClass + "ExcelVO.java"); - templateMap.put("templates/codegenerator/java/QueryDTO.java.vm", javaPackagePath + "domain" + File.separator + "dto" + File.separator + moduleClass + "QueryDTO.java"); - templateMap.put("templates/codegenerator/java/Service.java.vm", javaPackagePath + "service" + File.separator + moduleClass + "Service.java"); - //前端 - String webPackageName = CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, moduleClass).replaceAll("_", "-"); - templateMap.put("templates/codegenerator/web/Api.js.vm", frontPackagePath + "api" + File.separator + webPackageName + ".js"); - templateMap.put("templates/codegenerator/web/Router.js.vm", frontPackagePath + "router" + File.separator + webPackageName + ".js"); - templateMap.put("templates/codegenerator/web/List.vue.vm", frontPackagePath + webPackageName + File.separator + webPackageName + "-list.vue"); - templateMap.put("templates/codegenerator/web/ListForm.vue.vm", frontPackagePath + webPackageName + File.separator + "components" + File.separator + webPackageName + "-list-form.vue"); - return templateMap; - } - - public String getJavaType(String mysqlType) { - String javaType = dataMap.get(mysqlType); - if (javaType == null) { - javaType = numberTypeMap.get(mysqlType); - } - return javaType; - } - - public boolean isNumber(String mysqlType) { - return numberTypeMap.containsKey(mysqlType); - } - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/codegenerator/service/CodeGeneratorService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/codegenerator/service/CodeGeneratorService.java deleted file mode 100644 index b2b6585d..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/codegenerator/service/CodeGeneratorService.java +++ /dev/null @@ -1,336 +0,0 @@ -package net.lab1024.smartadmin.module.support.codegenerator.service; - -import com.google.common.base.CaseFormat; -import net.lab1024.smartadmin.module.support.codegenerator.dao.TableDao; -import net.lab1024.smartadmin.module.support.codegenerator.domain.CodeGeneratorDTO; -import net.lab1024.smartadmin.module.support.codegenerator.domain.CodeGeneratorQueryColumnDTO; -import net.lab1024.smartadmin.module.support.codegenerator.domain.ColumnVO; -import net.lab1024.smartadmin.module.support.codegenerator.domain.QueryFieldVO; -import net.lab1024.smartadmin.util.SmartDateUtil; -import com.google.common.collect.Lists; -import lombok.extern.slf4j.Slf4j; -import net.lab1024.smartadmin.util.SmartStringUtil; -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.lang.WordUtils; -import org.apache.commons.lang3.StringUtils; -import org.apache.velocity.Template; -import org.apache.velocity.VelocityContext; -import org.apache.velocity.app.Velocity; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.ResourceUtils; - -import javax.swing.filechooser.FileSystemView; -import java.io.File; -import java.io.FileWriter; -import java.util.*; -import java.util.Map.Entry; -import java.util.stream.Collectors; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/5/11 0011 上午 9:36 - * @since JDK1.8 - */ -@Slf4j -@Service -public class CodeGeneratorService { - - @Autowired - private TableDao tableDao; - - @Autowired - private CodeGeneratorComponent codeGeneratorComponent; - - /** - * 大家注意了开始生成代码了 - * - * @param codeGenerator - * @throws Exception - */ - public void codeGenerator(CodeGeneratorDTO codeGenerator) throws Exception { - this.basicValid(codeGenerator); - String date = SmartDateUtil.formatYMDHMS(new Date()); - String tableDesc = this.getTableDesc(codeGenerator.getTableName()); - String author = codeGenerator.getAuthor(); - String basePackage = codeGenerator.getBasePackage(); - if (StringUtils.isEmpty(basePackage)) { - basePackage = "net.lab1024.smartadmin"; - } - String moduleClass = this.tableName2Class(codeGenerator.getTableName(), codeGenerator.getTablePrefix()); - String moduleVar = this.tableName2Var(codeGenerator.getTableName(), codeGenerator.getTablePrefix()); - String modulePackage = codeGenerator.getModulePackage(); - - List columnList = this.columnList(codeGenerator.getTableName()); - List queryFieldList = this.buildQueryField(codeGenerator, columnList); - Map codeTemplates = codeGeneratorComponent.codeTemplates(moduleClass, basePackage, modulePackage); - List queryImports = this.buildQueryImport(queryFieldList); - List dtoImports = this.buildDTOImport(columnList); - List entityImports = this.buildEntityImport(columnList); - Properties p = new Properties(); - p.put("file.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader"); - p.put("directive.foreach.counter.name", "velocityCount"); - p.put("directive.foreach.counter.initial.value", "1"); - Velocity.init(p); - Map map = new HashMap<>(); - map.put("company", codeGenerator.getCompany()); - map.put("tableName", codeGenerator.getTableName()); - map.put("basePackage", basePackage); - map.put("modulePackage", modulePackage); - map.put("moduleClass", moduleClass); - map.put("tableDesc", tableDesc); - map.put("author", author); - map.put("date", date); - map.put("moduleVar", moduleVar); - map.put("columnList", columnList); - map.put("queryFieldList", queryFieldList); - map.put("queryImports", queryImports); - map.put("dtoImports", dtoImports); - map.put("entityImports", entityImports); - map.put("webModuleName", CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, moduleClass).replaceAll("_", "-")); - map.put("upperCamel", CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_CAMEL, moduleClass)); - //前端的变量 - map.put("ViewUIMessage", "$Message"); - map.put("VueRefs", "$refs"); - VelocityContext context = new VelocityContext(map); - this.codeGenerator(context, codeTemplates); - } - - private List buildQueryImport(List queryFieldList) { - List queryImports = Lists.newArrayList(); - if (CollectionUtils.isNotEmpty(queryFieldList)) { - queryFieldList.forEach(e -> { - importPackage(queryImports, e.getFieldType()); - if ("in".equals(e.getSqlOperate())) { - queryImports.add("import java.util.List;"); - } - }); - } - return queryImports; - } - - private List buildDTOImport(List columnList) { - List dtoImports = Lists.newArrayList(); - if (CollectionUtils.isNotEmpty(columnList)) { - columnList.forEach(e -> { - importPackage(dtoImports, e.getFieldType()); - }); - } - return dtoImports; - } - - private List buildEntityImport(List columnList) { - List entityImports = Lists.newArrayList(); - if (CollectionUtils.isNotEmpty(columnList)) { - columnList.forEach(e -> { - if (!e.getFieldName().equals("createTime") && !e.getFieldName().equals("updateTime") && !e.getFieldName().equals("id")) { - importPackage(entityImports, e.getFieldType()); - } - }); - } - return entityImports; - } - - private void importPackage(List imports, String fieldType) { - if ("Date".equals(fieldType) && !imports.contains("import java.util.Date;")) { - imports.add("import java.util.Date;"); - } - if ("BigDecimal".equals(fieldType) && !imports.contains("import java.math.BigDecimal;")) { - imports.add("import java.math.BigDecimal;"); - } - } - - private String getOutputDir() { - File desktopDir = FileSystemView.getFileSystemView().getHomeDirectory(); - return desktopDir.getAbsolutePath() + File.separator + "smart-admin" + File.separator; - } - - /** - * 生成代码 - * - * @param context - * @param codeTemplates - */ - private void codeGenerator(VelocityContext context, Map codeTemplates) throws Exception { - String projectPath = getOutputDir(); - - Velocity.setProperty("input.encoding", "UTF-8"); - Velocity.setProperty("output.encoding", "UTF-8"); - - for (Entry entry : codeTemplates.entrySet()) { - String template = entry.getKey(); - String filePath = projectPath + entry.getValue(); - String fileName = filePath.substring(filePath.lastIndexOf(File.separator) + 1); - String fileDir = filePath.replace(fileName, ""); - File directory = new File(fileDir); - if (!directory.exists()) { - directory.mkdirs(); - } - FileWriter writer; - try { - writer = new FileWriter(filePath); - Template tpl = Velocity.getTemplate(template, "UTF-8"); - tpl.merge(context, writer); - writer.flush(); - writer.close(); - } catch (Exception e) { - log.error("", e); - } - } - - log.info("------------------------------ 代 码 生 成 完 毕 ! ------------------------------"); - log.info("代码目录:{}", projectPath); - log.info("------------------------------ 代 码 生 成 完 毕 ! ------------------------------"); - - } - - public static void main(String[] args) { - try { - int i = 1 / 0; - } catch (Exception e) { - log.error("", e); - } - } - - private void basicValid(CodeGeneratorDTO codeGenerator) throws Exception { - if (StringUtils.isEmpty(codeGenerator.getTableName())) { - throw new Exception("你没建表吗?"); - } - if (StringUtils.isEmpty(codeGenerator.getTablePrefix())) { - throw new Exception("你的表没前缀吗?"); - } - if (StringUtils.isEmpty(codeGenerator.getAuthor())) { - throw new Exception("输入下你的大名"); - } - } - - /** - * 构建查询集合 - * - * @param codeGenerator - * @param columnList - * @return - * @throws Exception - */ - private List buildQueryField(CodeGeneratorDTO codeGenerator, List columnList) throws Exception { - List queryFieldList = Lists.newArrayList(); - Map storageMap = columnList.stream().collect(Collectors.toMap(ColumnVO::getColumnName, e -> e)); - List queryColumnList = codeGenerator.getQueryColumnList(); - if (CollectionUtils.isEmpty(queryColumnList)) { - return queryFieldList; - } - for (CodeGeneratorQueryColumnDTO queryColumn : queryColumnList) { - ColumnVO columnDTO = storageMap.get(queryColumn.getColumnName()); - if (columnDTO == null) { - String errorMsg = "sql列[" + queryColumn.getColumnName() + "]在表[" + codeGenerator.getTableName() + "]中不存在。"; - log.error(errorMsg); - throw new Exception(errorMsg); - } - QueryFieldVO queryField = - QueryFieldVO.builder().fieldName(columnDTO.getFieldName()).fieldType(columnDTO.getFieldType()).columnName(columnDTO.getColumnName()).columnDesc(columnDTO.getColumnDesc()).sqlOperate(queryColumn.getSqlOperate().getName()).build(); - queryFieldList.add(queryField); - } - return queryFieldList; - } - - /** - * 列数据 组合 - * - * @param tableName - * @return - * @throws Exception - */ - private List columnList(String tableName) throws Exception { - List list = tableDao.selectTableColumn(tableName); - for (ColumnVO column : list) { - String javaType = codeGeneratorComponent.getJavaType(column.getColumnType()); - if (StringUtils.isEmpty(javaType)) { - String errorMsg = "sql数据类型[" + column.getColumnType() + "]缺少对应的java类型。"; - log.error(errorMsg); - throw new Exception(errorMsg); - } - if ("Integer".equals(javaType) && column.getColumnName().contains("id")) { - column.setFieldType("Long"); - } else { - column.setFieldType(javaType); - } - column.setFieldName(this.columnName2Field(column.getColumnName())); - if (SmartStringUtil.isBlank(column.getColumnDesc())) { - column.setColumnDesc(column.getColumnName()); - } - - column.setIsNumber(codeGeneratorComponent.isNumber(column.getColumnType())); - } - return list; - } - - /** - * 获取列注释为类描述 - * - * @param tableName - * @return - */ - private String getTableDesc(String tableName) { - return tableDao.selectTableDesc(tableName); - } - - /** - * 列名转字段名 - * - * @param columnName - * @return - */ - private String columnName2Field(String columnName) { - String transName = WordUtils.capitalizeFully(columnName, new char[]{'_'}).replace("_", ""); - return WordUtils.uncapitalize(transName); - } - - /** - * 表名转类名前缀 - * - * @param tableName - * @param tablePrefix - * @return - */ - private String tableName2Class(String tableName, String tablePrefix) { - if (StringUtils.isNotBlank(tablePrefix)) { - tableName = tableName.replaceFirst(tablePrefix, ""); - } - return WordUtils.capitalizeFully(tableName, new char[]{'_'}).replace("_", ""); - } - - /** - * 表名转包名 - * - * @param tableName - * @param tablePrefix - * @return - */ - private String tableName2Package(String tableName, String tablePrefix) { - if (StringUtils.isNotBlank(tablePrefix)) { - tableName = tableName.replaceFirst(tablePrefix, ""); - } - return tableName.replace("_", ""); - } - - /** - * 表名转 java变量前缀 - * - * @param tableName - * @param tablePrefix - * @return - */ - private String tableName2Var(String tableName, String tablePrefix) { - if (StringUtils.isNotBlank(tablePrefix)) { - tableName = tableName.replaceFirst(tablePrefix, ""); - } - String transName = WordUtils.capitalizeFully(tableName, new char[]{'_'}).replace("_", ""); - return WordUtils.uncapitalize(transName); - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/FileController.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/FileController.java deleted file mode 100644 index 001e99d2..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/FileController.java +++ /dev/null @@ -1,93 +0,0 @@ -package net.lab1024.smartadmin.module.support.file; - -import net.lab1024.smartadmin.common.anno.NoNeedLogin; -import net.lab1024.smartadmin.common.domain.PageResultDTO; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.constant.SwaggerTagConst; -import net.lab1024.smartadmin.module.support.file.constant.FileServiceTypeEnum; -import net.lab1024.smartadmin.module.support.file.domain.dto.FileAddDTO; -import net.lab1024.smartadmin.module.support.file.domain.dto.FileQueryDTO; -import net.lab1024.smartadmin.module.support.file.domain.vo.FileVO; -import net.lab1024.smartadmin.module.support.file.domain.vo.UploadVO; -import net.lab1024.smartadmin.module.support.file.service.FileService; -import net.lab1024.smartadmin.module.system.login.domain.RequestTokenBO; -import net.lab1024.smartadmin.util.SmartRequestTokenUtil; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import javax.servlet.http.HttpServletRequest; -import javax.validation.Valid; - -/** - * @Description: 文件服务 - * @Author: sbq - * @CreateDate: 2019/7/18 9:36 - * @Version: 1.0 - */ -@RestController -@Api(tags = {SwaggerTagConst.Admin.MANAGER_FILE}) -public class FileController { - - @Autowired - private FileService fileService; - - @ApiOperation(value = "文件本地上传", notes = "文件本地上传") - @PostMapping("/api/file/localUpload/{moduleType}") - public ResponseDTO localUpload(MultipartFile file, @PathVariable Integer moduleType) throws Exception { - return fileService.fileUpload(file, FileServiceTypeEnum.LOCAL, moduleType); - } - - @ApiOperation(value = "获取本地文件URL", notes = "获取文件URL") - @PostMapping("/api/file/get") - public ResponseDTO localGetFile(String path) { - return fileService.getFileUrl(path, FileServiceTypeEnum.LOCAL); - } - - @ApiOperation(value = "文件阿里云上传", notes = "文件阿里云上传") - @PostMapping("/api/file/aliYunUpload/{moduleType}") - public ResponseDTO aliYunUpload(MultipartFile file, @PathVariable Integer moduleType) throws Exception { - return fileService.fileUpload(file, FileServiceTypeEnum.ALI_OSS, moduleType); - } - - @ApiOperation(value = "获取阿里云文件URL", notes = "获取阿里云文件URL") - @PostMapping("/api/file/aliYunGet") - public ResponseDTO aliYunGet(String path) { - return fileService.getFileUrl(path, FileServiceTypeEnum.ALI_OSS); - } - - @ApiOperation(value = "文件七牛云上传", notes = "文件七牛云上传") - @PostMapping("/api/file/qiNiuUpload/{moduleType}") - public ResponseDTO qiNiuUpload(MultipartFile file, @PathVariable Integer moduleType) throws Exception { - return fileService.fileUpload(file, FileServiceTypeEnum.QI_NIU_OSS, moduleType); - } - - @ApiOperation(value = "获取七牛云文件URL", notes = "获取七牛云URL") - @PostMapping("/api/file/qiNiuGet") - public ResponseDTO qiNiuGet(String path) { - return fileService.getFileUrl(path, FileServiceTypeEnum.QI_NIU_OSS); - } - - @ApiOperation(value = "系统文件查询") - @PostMapping("/api/file/query") - public ResponseDTO> queryListByPage(@RequestBody FileQueryDTO queryDTO) { - return fileService.queryListByPage(queryDTO); - } - - @ApiOperation(value = "系统文件下载通用接口(流下载)") - @GetMapping("/api/file/downLoad") - @NoNeedLogin - public ResponseEntity downLoadById(Long id, HttpServletRequest request) { - return fileService.downLoadById(id, request); - } - - @ApiOperation(value = "系统文件保存通用接口") - @PostMapping("/api/file/save") - public ResponseDTO saveFile(@Valid @RequestBody FileAddDTO addDTO) { - RequestTokenBO requestToken = SmartRequestTokenUtil.getRequestUser(); - return fileService.saveFile(addDTO,requestToken); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/FileDao.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/FileDao.java deleted file mode 100644 index 3155bf25..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/FileDao.java +++ /dev/null @@ -1,72 +0,0 @@ -package net.lab1024.smartadmin.module.support.file; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import net.lab1024.smartadmin.module.support.file.domain.dto.FileDTO; -import net.lab1024.smartadmin.module.support.file.domain.dto.FileQueryDTO; -import net.lab1024.smartadmin.module.support.file.domain.entity.FileEntity; -import net.lab1024.smartadmin.module.support.file.domain.vo.FileVO; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Component; - -import java.util.List; - -/** - * @author cyj - * @date 2018-01-05 上午 9:49 - */ -@Mapper -@Component -public interface FileDao extends BaseMapper { - - /** - * 批量添加上传文件 - * - * @param fileDTOList - * @return - */ - Integer insertFileBatch(List fileDTOList); - - - /** - * 批量添加上传文件 - * - * @param fileDTOList - * @return - */ - Integer insertFileEntityBatch(List fileDTOList); - - /** - * 批量删除 - * - * @param moduleId - * @return - */ - Integer deleteFilesByModuleId(@Param("moduleId") String moduleId); - - /** - * 批量删除 - * - * @param moduleId - * @param moduleType - * @return - */ - Integer deleteFilesByModuleIdAndModuleType(@Param("moduleId") String moduleId, @Param("moduleType") String moduleType); - - /** - * @param moduleId - * @return - */ - List listFilesByModuleId(@Param("moduleId") String moduleId); - - List listFilesByFileIds(@Param("fileIds") List fileIds); - - List listFilesByModuleIdAndModuleType(@Param("moduleId") String moduleId, @Param("moduleType") String moduleType); - - List listFilesByModuleIdAndModuleTypes(@Param("moduleId") String moduleId, @Param("moduleTypes") List moduleTypes); - - List listFilesByModuleIdsAndModuleType(@Param("moduleIds") List moduleIds, @Param("moduleType") String moduleType); - - List queryListByPage(Page page, @Param("queryDTO") FileQueryDTO queryDTO); -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/constant/FileModuleTypeEnum.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/constant/FileModuleTypeEnum.java deleted file mode 100644 index 8052b767..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/constant/FileModuleTypeEnum.java +++ /dev/null @@ -1,47 +0,0 @@ -package net.lab1024.smartadmin.module.support.file.constant; - -import net.lab1024.smartadmin.common.domain.BaseEnum; - -/** - * [] - * - * @author yandanyang - * @version 1.0 - * @since JDK1.8 - */ -public enum FileModuleTypeEnum implements BaseEnum { - - /** - * path 首字符不能包含\ 或者/ - */ - - BACK_USER(1, "backUser/config", "backUser"), - - CODE_REVIEW(2, "codeReview", "CodeReview"); - - private Integer value; - - private String path; - - private String desc; - - FileModuleTypeEnum(Integer value, String path, String desc) { - this.value = value; - this.path = path; - this.desc = desc; - } - - public String getPath() { - return path; - } - - @Override - public Integer getValue() { - return this.value; - } - - @Override - public String getDesc() { - return this.desc; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/constant/FileResponseCodeConst.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/constant/FileResponseCodeConst.java deleted file mode 100644 index fd5abfb9..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/constant/FileResponseCodeConst.java +++ /dev/null @@ -1,37 +0,0 @@ -package net.lab1024.smartadmin.module.support.file.constant; - -import net.lab1024.smartadmin.common.constant.ResponseCodeConst; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 - */ -public class FileResponseCodeConst extends ResponseCodeConst { - - /** - * 4001 -4999 - */ - public static final FileResponseCodeConst FILE_EMPTY = new FileResponseCodeConst(4001, "上传文件不存在!"); - - public static final FileResponseCodeConst FILE_SIZE_ERROR = new FileResponseCodeConst(4002, "上传文件超过%s,请重新上传!"); - - public static final FileResponseCodeConst UNKNOWN_FILE_TYPE = new FileResponseCodeConst(4003, "未知的文件类型!"); - - public static final FileResponseCodeConst LOCAL_UPDATE_PREFIX_ERROR = new FileResponseCodeConst(4004, "文件本地上传缺少URL前缀配置[local_upload_url_prefix]"); - - public static final FileResponseCodeConst UPLOAD_ERROR = new FileResponseCodeConst(4005, "上传失败"); - - public static final FileResponseCodeConst URL_ERROR = new FileResponseCodeConst(4006, "获取URL失败"); - - public static final FileResponseCodeConst FILE_MODULE_ERROR = new FileResponseCodeConst(4007, "文件目录类型错误"); - - public FileResponseCodeConst(int code, String msg) { - super(code, msg); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/constant/FileServiceNameConst.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/constant/FileServiceNameConst.java deleted file mode 100644 index 012cffbf..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/constant/FileServiceNameConst.java +++ /dev/null @@ -1,24 +0,0 @@ -package net.lab1024.smartadmin.module.support.file.constant; -/** - * 文件服务名称常量 - * - * @author listen - * @date 2019/08/27 15:24 - */ -public class FileServiceNameConst { - - /** - * 阿里OSS文件服务 - */ - public static final String ALI_OSS = "ali_oss"; - - /** - * 七牛文件服务 - */ - public static final String QI_NIU_OSS = "qi_niu_oss"; - - /** - * 本地文件服务 - */ - public static final String LOCAL = "local"; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/constant/FileServiceTypeEnum.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/constant/FileServiceTypeEnum.java deleted file mode 100644 index 793503fc..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/constant/FileServiceTypeEnum.java +++ /dev/null @@ -1,52 +0,0 @@ -package net.lab1024.smartadmin.module.support.file.constant; - -import net.lab1024.smartadmin.common.domain.BaseEnum; - -/** - * 文件服务枚举类 - * - * @author listen - * @date 2019年8月27日 14:27:16 - */ -public enum FileServiceTypeEnum implements BaseEnum { - - /** - * 本地文件服务 - */ - LOCAL(1, FileServiceNameConst.LOCAL, "本地文件服务"), - - /** - * 阿里OSS文件服务 - */ - ALI_OSS(2, FileServiceNameConst.ALI_OSS, "阿里OSS文件服务"), - - /** - * 七牛文件服务 - */ - QI_NIU_OSS(3, FileServiceNameConst.QI_NIU_OSS, "七牛文件服务"); - - private Integer locationType; - - private String serviceName; - - private String desc; - - FileServiceTypeEnum(Integer locationType, String serviceName, String desc) { - this.locationType = locationType; - this.serviceName = serviceName; - this.desc = desc; - } - - public String getServiceName() { - return serviceName; - } - @Override - public Integer getValue() { - return this.locationType; - } - - @Override - public String getDesc() { - return this.desc; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/domain/dto/FileAddDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/domain/dto/FileAddDTO.java deleted file mode 100644 index b097df0a..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/domain/dto/FileAddDTO.java +++ /dev/null @@ -1,39 +0,0 @@ -package net.lab1024.smartadmin.module.support.file.domain.dto; - -import net.lab1024.smartadmin.common.anno.ApiModelPropertyEnum; -import net.lab1024.smartadmin.common.validator.en.CheckEnum; -import net.lab1024.smartadmin.module.support.file.constant.FileServiceTypeEnum; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotBlank; - -/** -* @Description: 文件保存DTO -* @Author: sbq -* @CreateDate: 2019/9/11 15:05 -* @Version: 1.0 -*/ -@Data -public class FileAddDTO { - - @ApiModelProperty("相关业务id(无业务可写死一个id)") - @NotBlank(message = "相关业务id不能为空") - private String moduleId; - - @ApiModelProperty("相关业务类型(无模块写1)") - @NotBlank(message = "相关业务类型不能为空") - private String moduleType; - - @ApiModelPropertyEnum(enumDesc = "文件类型",value = FileServiceTypeEnum.class) - @CheckEnum(enumClazz = FileServiceTypeEnum.class,message = "文件类型错误") - private Integer fileLocationType; - - @ApiModelProperty("文件名称") - @NotBlank(message = "文件名称不能为空") - private String fileName; - - @ApiModelProperty("文件路径") - @NotBlank(message = "文件路径不能为空") - private String filePath; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/domain/dto/FileQueryDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/domain/dto/FileQueryDTO.java deleted file mode 100644 index 85df6375..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/domain/dto/FileQueryDTO.java +++ /dev/null @@ -1,33 +0,0 @@ -package net.lab1024.smartadmin.module.support.file.domain.dto; - -import net.lab1024.smartadmin.common.anno.ApiModelPropertyEnum; -import net.lab1024.smartadmin.common.domain.PageParamDTO; -import net.lab1024.smartadmin.common.validator.en.CheckEnum; -import net.lab1024.smartadmin.module.support.file.constant.FileModuleTypeEnum; -import net.lab1024.smartadmin.module.support.file.constant.FileServiceTypeEnum; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @Description: 文件信息查询dto - * @Author: sbq - * @CreateDate: 2019/7/3 17:38 - * @Version: 1.0 - */ -@Data -public class FileQueryDTO extends PageParamDTO { - - @ApiModelProperty(value = "文件名称") - private String fileName; - - @ApiModelProperty(value = "业务类型") - @ApiModelPropertyEnum(FileModuleTypeEnum.class) - @CheckEnum(enumClazz = FileModuleTypeEnum.class, message = "文件业务类型错误") - private Integer moduleType; - - @ApiModelProperty(value = "文件位置") - @ApiModelPropertyEnum(FileServiceTypeEnum.class) - @CheckEnum(enumClazz = FileServiceTypeEnum.class, message = "文件位置类型错误") - private Integer fileLocationType; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/domain/dto/OSSConfig.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/domain/dto/OSSConfig.java deleted file mode 100644 index 112ad4eb..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/domain/dto/OSSConfig.java +++ /dev/null @@ -1,35 +0,0 @@ -package net.lab1024.smartadmin.module.support.file.domain.dto; - -import lombok.Data; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/5/11 0011 下午 16:05 - * @since JDK1.8 - */ -@Data -public class OSSConfig { - - private String endpoint; - - private String accessKeyId; - - private String accessKeySecret; - - private String bucketName; - - @Override - public String toString() { - return "OSSConfig{" + - "endpoint='" + endpoint + '\'' + - ", accessKeyId='" + accessKeyId + '\'' + - ", accessKeySecret='" + accessKeySecret + '\'' + - ", bucketName='" + bucketName + '\'' + - '}'; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/domain/entity/FileEntity.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/domain/entity/FileEntity.java deleted file mode 100644 index 38b0db3d..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/domain/entity/FileEntity.java +++ /dev/null @@ -1,58 +0,0 @@ -package net.lab1024.smartadmin.module.support.file.domain.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import net.lab1024.smartadmin.common.domain.BaseEntity; -import lombok.Data; - - -/** - * - * [ ] - * - * @version 1.0 - * @since JDK1.8 - * @author yandanyang - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - */ -@Data -@TableName(value = "t_file") -public class FileEntity extends BaseEntity { - - - /** - * 相关业务id - */ - private String moduleId; - /** - * 相关业务类型 - */ - private String moduleType; - /** - * 文件位置类型 - */ - private Integer fileLocationType; - /** - * 文件名称 - */ - private String fileName; - /** - * 文件大小 - */ - private String fileSize; - /** - * 文件类型,程序中枚举控制,文件类型:如身份证正面,三证合一等等 - */ - private String fileType; - /** - * 文件key,用于文件下载 - */ - private String filePath; - /** - * 创建人,即上传人 - */ - private Long createrUser; - -} - diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/domain/vo/FileVO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/domain/vo/FileVO.java deleted file mode 100644 index 7f101482..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/domain/vo/FileVO.java +++ /dev/null @@ -1,58 +0,0 @@ -package net.lab1024.smartadmin.module.support.file.domain.vo; - -import net.lab1024.smartadmin.common.anno.ApiModelPropertyEnum; -import net.lab1024.smartadmin.module.support.file.constant.FileServiceTypeEnum; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.sql.Date; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 - */ -@Data -public class FileVO { - - @ApiModelProperty("主键") - private Long id; - - @ApiModelProperty("相关业务id") - private String moduleId; - - @ApiModelProperty("相关业务类型") - private String moduleType; - - @ApiModelPropertyEnum(FileServiceTypeEnum.class) - private Integer fileLocationType; - - @ApiModelProperty("文件名称") - private String fileName; - - @ApiModelProperty("文件大小") - private String fileSize; - - @ApiModelProperty("文件类型") - private String fileType; - - @ApiModelProperty("文件路径") - private String filePath; - - @ApiModelProperty("上传人") - private Long createUser; - - @ApiModelProperty("updateTime") - private Date updateTime; - - @ApiModelProperty("创建时间") - private Date createTime; - - @ApiModelProperty("文件展示url(可用于下载,注:七牛云下载url要拼接 ?attname=文件名.jpg)") - private String fileUrl; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/domain/vo/UploadVO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/domain/vo/UploadVO.java deleted file mode 100644 index f878e7a7..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/domain/vo/UploadVO.java +++ /dev/null @@ -1,27 +0,0 @@ -package net.lab1024.smartadmin.module.support.file.domain.vo; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2018/12/11 0011 上午 10:57 - * @since JDK1.8 - */ -@Data -public class UploadVO { - - @ApiModelProperty(value = "文件名称") - private String fileName; - @ApiModelProperty(value = "url") - private String url; - @ApiModelProperty(value = "filePath") - private String filePath; - @ApiModelProperty(value = "文件大小") - private Long fileSize; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/service/FileService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/service/FileService.java deleted file mode 100644 index 9f645620..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/service/FileService.java +++ /dev/null @@ -1,198 +0,0 @@ -package net.lab1024.smartadmin.module.support.file.service; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import net.lab1024.smartadmin.common.domain.PageResultDTO; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.module.support.file.FileDao; -import net.lab1024.smartadmin.module.support.file.constant.FileModuleTypeEnum; -import net.lab1024.smartadmin.module.support.file.constant.FileResponseCodeConst; -import net.lab1024.smartadmin.module.support.file.constant.FileServiceTypeEnum; -import net.lab1024.smartadmin.module.support.file.domain.dto.FileAddDTO; -import net.lab1024.smartadmin.module.support.file.domain.dto.FileDTO; -import net.lab1024.smartadmin.module.support.file.domain.dto.FileQueryDTO; -import net.lab1024.smartadmin.module.support.file.domain.entity.FileEntity; -import net.lab1024.smartadmin.module.support.file.domain.vo.FileVO; -import net.lab1024.smartadmin.module.support.file.domain.vo.UploadVO; -import net.lab1024.smartadmin.module.system.login.domain.RequestTokenBO; -import net.lab1024.smartadmin.util.SmartBaseEnumUtil; -import net.lab1024.smartadmin.util.SmartBeanUtil; -import net.lab1024.smartadmin.util.SmartPageUtil; -import com.google.common.collect.Lists; -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Service; -import org.springframework.web.multipart.MultipartFile; - -import javax.servlet.http.HttpServletRequest; -import java.time.LocalDateTime; -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.stream.Collectors; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 - */ -@Service -public class FileService { - - @Autowired - private FileDao fileDao; - - @Autowired - private java.util.Map fileServiceMap; - - /** - * 获取文件服务实现 - * - * @param typeEnum - * @return - */ - private IFileService getFileService(FileServiceTypeEnum typeEnum) { - /** - * 获取文件服务 - */ - String serviceName = typeEnum.getServiceName(); - IFileService fileService = fileServiceMap.get(serviceName); - if (null == fileService) { - throw new RuntimeException("未找到文件服务实现类:" + serviceName); - } - return fileService; - } - - /** - * 文件上传服务 - * - * @param file - * @param typeEnum 文件服务类型枚举类 - * @param moduleType 文件夹类型 - * @return - */ - public ResponseDTO fileUpload(MultipartFile file, FileServiceTypeEnum typeEnum, Integer moduleType) { - FileModuleTypeEnum moduleTypeEnum = SmartBaseEnumUtil.getEnumByValue(moduleType, FileModuleTypeEnum.class); - if (null == moduleTypeEnum) { - return ResponseDTO.wrap(FileResponseCodeConst.FILE_MODULE_ERROR); - } - // 获取文件服务 - IFileService fileService = this.getFileService(typeEnum); - ResponseDTO response = fileService.fileUpload(file, moduleTypeEnum.getPath()); - return response; - } - - /** - * 根据文件绝对路径 获取文件URL - * - * @param path - * @return - */ - public ResponseDTO getFileUrl(String path, FileServiceTypeEnum typeEnum) { - IFileService fileService = this.getFileService(typeEnum); - return fileService.getFileUrl(path); - } - - /** - * 批量插入 - * - * @param fileDTOList - */ - public void insertFileBatch(List fileDTOList) { - fileDao.insertFileBatch(fileDTOList); - } - - /** - * 根据module 删除文件信息 - * - * @param moduleId - * @return - */ - public void deleteFilesByModuleId(String moduleId) { - fileDao.deleteFilesByModuleId(moduleId); - } - - /** - * 根据module 获取文件信息 - * - * @param moduleId - * @return - */ - public List listFilesByModuleId(String moduleId) { - return fileDao.listFilesByModuleId(moduleId); - } - - /** - * @param filesStr 逗号分隔文件id字符串 - * @return - */ - public List getFileDTOList(String filesStr) { - if (StringUtils.isEmpty(filesStr)) { - return Lists.newArrayList(); - } - String[] fileIds = filesStr.split(","); - List fileIdList = Arrays.asList(fileIds).stream().map(e -> Long.valueOf(e)).collect(Collectors.toList()); - List files = fileDao.listFilesByFileIds(fileIdList); - return files; - } - - /** - * 分页查询文件列表 - * - * @param queryDTO - * @return - */ - public ResponseDTO> queryListByPage(FileQueryDTO queryDTO) { - Page page = SmartPageUtil.convert2QueryPage(queryDTO); - List fileList = fileDao.queryListByPage(page, queryDTO); - if (CollectionUtils.isNotEmpty(fileList)) { - fileList.forEach(e -> { - // 根据文件服务类 获取对应文件服务 查询 url - FileServiceTypeEnum serviceTypeEnum = SmartBaseEnumUtil.getEnumByValue(e.getFileLocationType(), FileServiceTypeEnum.class); - IFileService fileService = this.getFileService(serviceTypeEnum); - e.setFileUrl(fileService.getFileUrl(e.getFilePath()).getData()); - }); - } - PageResultDTO pageResultDTO = SmartPageUtil.convert2PageResult(page, fileList); - return ResponseDTO.succData(pageResultDTO); - } - - /** - * 根据id 下载文件 - * - * @param id - * @param request - * @return - */ - public ResponseEntity downLoadById(Long id, HttpServletRequest request) { - FileEntity entity = fileDao.selectById(id); - if (null == entity) { - throw new RuntimeException("文件信息不存在"); - } - - // 根据文件服务类 获取对应文件服务 查询 url - FileServiceTypeEnum serviceTypeEnum = SmartBaseEnumUtil.getEnumByValue(entity.getFileLocationType(), FileServiceTypeEnum.class); - IFileService fileService = this.getFileService(serviceTypeEnum); - ResponseEntity stream = fileService.fileDownload(entity.getFilePath(), entity.getFileName(), request); - return stream; - } - - /** - * 系统文件保存通用接口 - * @param addDTO - * @return - */ - public ResponseDTO saveFile(FileAddDTO addDTO, RequestTokenBO requestToken) { - FileEntity entity = SmartBeanUtil.copy(addDTO,FileEntity.class); - entity.setCreaterUser(requestToken.getRequestUserId()); - entity.setCreateTime(new Date()); - fileDao.insert(entity); - return ResponseDTO.succ(); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/service/FileServiceAliYun.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/service/FileServiceAliYun.java deleted file mode 100644 index 15ae3feb..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/service/FileServiceAliYun.java +++ /dev/null @@ -1,182 +0,0 @@ -package net.lab1024.smartadmin.module.support.file.service; - -import com.aliyun.oss.OSSClient; -import com.aliyun.oss.model.OSSObject; -import com.aliyun.oss.model.ObjectMetadata; -import com.aliyun.oss.model.PutObjectRequest; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.module.support.file.constant.FileResponseCodeConst; -import net.lab1024.smartadmin.module.support.file.constant.FileServiceNameConst; -import net.lab1024.smartadmin.module.support.file.domain.dto.OSSConfig; -import net.lab1024.smartadmin.module.support.file.domain.vo.UploadVO; -import net.lab1024.smartadmin.module.system.systemconfig.SystemConfigService; -import net.lab1024.smartadmin.module.system.systemconfig.constant.SystemConfigEnum; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Service; -import org.springframework.util.FileCopyUtils; -import org.springframework.web.multipart.MultipartFile; - -import javax.servlet.http.HttpServletRequest; -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/5/10 0010 上午 8:29 - * @since JDK1.8 - */ -@Slf4j -@Service(FileServiceNameConst.ALI_OSS) -public class FileServiceAliYun implements IFileService { - - @Autowired - private SystemConfigService systemConfigService; - - OSSClient ossClient = null; - - String accessConfig = null; - - @Override - public ResponseDTO fileUpload(MultipartFile multipartFile, String path) { - OSSConfig ossConfig = systemConfigService.selectByKey2Obj(SystemConfigEnum.Key.ALI_OSS.name(), OSSConfig.class); - try { - InputStream inputStream = new ByteArrayInputStream(multipartFile.getBytes()); - if (! ossConfig.toString().equals(accessConfig)) { - //accessKeyId 发生变动自动创建新的 - if (ossClient != null) { - ossClient.shutdown(); - } - ossClient = new OSSClient(ossConfig.getEndpoint(), ossConfig.getAccessKeyId(), ossConfig.getAccessKeySecret()); - accessConfig = ossConfig.toString(); - } - String uuid = UUID.randomUUID().toString().replace("-", ""); - String ossPath = path + "/" + uuid; - String fileName = multipartFile.getOriginalFilename(); - String fileExt = fileName.substring(fileName.lastIndexOf(".") + 1); - ObjectMetadata meta = new ObjectMetadata(); - meta.setContentDisposition("attachment;filename=" + fileName); - Map userMetadata = new HashMap(); - userMetadata.put("fileName", fileName); - userMetadata.put("fileExt", fileExt); - userMetadata.put("fileSize", String.valueOf(multipartFile.getSize())); - meta.setUserMetadata(userMetadata); - meta.setContentType(this.getContentType(fileExt)); - PutObjectRequest putObjectRequest = new PutObjectRequest(ossConfig.getBucketName(), ossPath, inputStream, meta); - ossClient.putObject(putObjectRequest); - UploadVO localUploadVO = new UploadVO(); - localUploadVO.setUrl(this.getUrl(ossPath, ossConfig.getBucketName(), ossClient)); - localUploadVO.setFileName(fileName); - localUploadVO.setFilePath(ossPath); - localUploadVO.setFileSize(multipartFile.getSize()); - return ResponseDTO.succData(localUploadVO); - } catch (Exception e) { - log.error("ALI UPLOAD ERROR : {}", e); - } - return ResponseDTO.wrap(FileResponseCodeConst.UPLOAD_ERROR); - } - - @Override - public ResponseDTO getFileUrl(String path) { - OSSConfig ossConfig = systemConfigService.selectByKey2Obj(SystemConfigEnum.Key.ALI_OSS.name(), OSSConfig.class); - try { - if (! ossConfig.toString().equals(accessConfig)) { - //accessKeyId 发生变动自动创建新的 - if (ossClient != null) { - ossClient.shutdown(); - } - ossClient = new OSSClient(ossConfig.getEndpoint(), ossConfig.getAccessKeyId(), ossConfig.getAccessKeySecret()); - accessConfig = ossConfig.toString(); - } - String url = this.getUrl(path, ossConfig.getBucketName(), ossClient); - return ResponseDTO.succData(url); - } catch (Exception e) { - log.error("ALI getFileUrl ERROR : {}", e); - } - return ResponseDTO.wrap(FileResponseCodeConst.URL_ERROR); - } - - private String getUrl(String path, String bucketName, OSSClient ossClient) { - Date expiration = new Date(System.currentTimeMillis() + (60 * 60 * 1000)); - URL url = ossClient.generatePresignedUrl(bucketName, path, expiration); - return url.toString(); - } - - /** - * 流式下载(名称为原文件) - */ - @Override - public ResponseEntity fileDownload(String key, String fileName, HttpServletRequest request) { - File file = this.getFile(key, fileName); - if (file == null) { - throw new RuntimeException("文件不存在"); - } - return this.downloadMethod(file, request); - } - - /** - * 根据osskey获取文件 - * - * @param key - * @return - */ - public File getFile(String key, String fileName) { - OSSConfig ossConfig = systemConfigService.selectByKey2Obj(SystemConfigEnum.Key.ALI_OSS.name(), OSSConfig.class); - if (! ossConfig.toString().equals(accessConfig)) { - //accessKeyId 发生变动自动创建新的 - if (ossClient != null) { - ossClient.shutdown(); - } - ossClient = new OSSClient(ossConfig.getEndpoint(), ossConfig.getAccessKeyId(), ossConfig.getAccessKeySecret()); - accessConfig = ossConfig.toString(); - } - //获取oss对象 - OSSObject ossObject = ossClient.getObject(ossConfig.getBucketName(), key); - if (StringUtils.isBlank(fileName)) { - // 获取元信息 - ObjectMetadata objectMetadata = ossObject.getObjectMetadata(); - // 获取下载时文件名 - Map userMetadata = objectMetadata.getUserMetadata(); - fileName = userMetadata == null ? "" : userMetadata.get("filename"); - if (StringUtils.isBlank(fileName)) { - fileName = objectMetadata.getContentDisposition(); - } - } - // 创建文件 - File file = new File(fileName); - // 获得输入流 - InputStream objectContent = ossObject.getObjectContent(); - try { - // 输入流转换为字节流 - byte[] buffer = FileCopyUtils.copyToByteArray(objectContent); - // 字节流写入文件 - FileCopyUtils.copy(buffer, file); - // 关闭输入流 - objectContent.close(); - } catch (IOException e) { - log.error("文件获取失败:" + e); - return null; - } finally { - try { - ossObject.close(); - } catch (IOException e) { - log.error("", e); - } - } - return file; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/service/FileServiceLocal.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/service/FileServiceLocal.java deleted file mode 100644 index 08aac36d..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/service/FileServiceLocal.java +++ /dev/null @@ -1,123 +0,0 @@ -package net.lab1024.smartadmin.module.support.file.service; - -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.module.support.file.constant.FileResponseCodeConst; -import net.lab1024.smartadmin.module.support.file.constant.FileServiceNameConst; -import net.lab1024.smartadmin.module.support.file.domain.vo.UploadVO; -import net.lab1024.smartadmin.module.system.systemconfig.SystemConfigDao; -import net.lab1024.smartadmin.module.system.systemconfig.constant.SystemConfigEnum; -import net.lab1024.smartadmin.module.system.systemconfig.domain.entity.SystemConfigEntity; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Service; -import org.springframework.web.multipart.MultipartFile; - -import javax.servlet.http.HttpServletRequest; -import java.io.File; -import java.io.IOException; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/5/11 0011 下午 16:15 - * @since JDK1.8 - */ -@Slf4j -@Service(FileServiceNameConst.LOCAL) -public class FileServiceLocal implements IFileService { - - @Autowired - private SystemConfigDao systemConfigDao; - - @Value("${spring.servlet.multipart.max-file-size}") - private String maxFileSize; - - @Value("${file-upload-service.path}") - private String fileParentPath; - - private static final Long DEFAULT_SIZE = 10 * 1024 * 1024L; - - @Override - public ResponseDTO fileUpload(MultipartFile multipartFile, String path) { - if (null == multipartFile) { - return ResponseDTO.wrap(FileResponseCodeConst.FILE_EMPTY); - } - Long maxSize = DEFAULT_SIZE; - if (StringUtils.isNotEmpty(maxFileSize)) { - String maxSizeStr = maxFileSize.toLowerCase().replace("mb", ""); - maxSize = Integer.valueOf(maxSizeStr) * 1024 * 1024L; - } - if (multipartFile.getSize() > maxSize) { - return ResponseDTO.wrap(FileResponseCodeConst.FILE_SIZE_ERROR, String.format(FileResponseCodeConst.FILE_SIZE_ERROR.getMsg(), maxFileSize)); - } - String filePath = fileParentPath; - String urlParent = this.localUrlPrefix(); - if (urlParent == null) { - return ResponseDTO.wrap(FileResponseCodeConst.LOCAL_UPDATE_PREFIX_ERROR); - } - if (StringUtils.isNotEmpty(path)) { - filePath = filePath + path + "/"; - urlParent = urlParent + path + "/"; - } - File directory = new File(filePath); - if (!directory.exists()) { - // 目录不存在,新建 - directory.mkdirs(); - } - UploadVO localUploadVO = new UploadVO(); - String newFileName; - File fileTemp; - String originalFileName; - originalFileName = multipartFile.getOriginalFilename(); - newFileName = this.generateFileName(originalFileName); - fileTemp = new File(new File(filePath + newFileName).getAbsolutePath()); - try { - multipartFile.transferTo(fileTemp); - localUploadVO.setUrl(urlParent + newFileName); - localUploadVO.setFileName(newFileName); - localUploadVO.setFilePath(path + "/" + newFileName); - localUploadVO.setFileSize(multipartFile.getSize()); - } catch (IOException e) { - if (fileTemp.exists() && fileTemp.isFile()) { - fileTemp.delete(); - } - log.error("", e); - return ResponseDTO.wrap(FileResponseCodeConst.UPLOAD_ERROR); - } - return ResponseDTO.succData(localUploadVO); - } - - @Override - public ResponseDTO getFileUrl(String path) { - String urlParent = this.localUrlPrefix(); - if (urlParent == null) { - return ResponseDTO.wrap(FileResponseCodeConst.LOCAL_UPDATE_PREFIX_ERROR); - } - String url = urlParent + path; - return ResponseDTO.succData(url); - } - - private String localUrlPrefix() { - SystemConfigEntity configEntity = systemConfigDao.getByKey(SystemConfigEnum.Key.LOCAL_UPLOAD_URL_PREFIX.name()); - if (configEntity == null) { - return null; - } - return configEntity.getConfigValue(); - } - - @Override - public ResponseEntity fileDownload(String key, String fileName, HttpServletRequest request) { - - String url = fileParentPath + key; - // 创建文件 - File file = new File(url); - return this.downloadMethod(file, request); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/service/FileServiceQiNiuYun.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/service/FileServiceQiNiuYun.java deleted file mode 100644 index 394b7af8..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/service/FileServiceQiNiuYun.java +++ /dev/null @@ -1,175 +0,0 @@ -package net.lab1024.smartadmin.module.support.file.service; - -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.module.support.file.constant.FileResponseCodeConst; -import net.lab1024.smartadmin.module.support.file.constant.FileServiceNameConst; -import net.lab1024.smartadmin.module.support.file.domain.dto.OSSConfig; -import net.lab1024.smartadmin.module.support.file.domain.vo.UploadVO; -import net.lab1024.smartadmin.module.system.systemconfig.SystemConfigService; -import net.lab1024.smartadmin.module.system.systemconfig.constant.SystemConfigEnum; -import com.qiniu.http.Response; -import com.qiniu.storage.Configuration; -import com.qiniu.storage.UploadManager; -import com.qiniu.util.Auth; -import lombok.extern.slf4j.Slf4j; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.ResponseBody; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Service; -import org.springframework.util.FileCopyUtils; -import org.springframework.web.multipart.MultipartFile; - -import javax.servlet.http.HttpServletRequest; -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.net.URLEncoder; -import java.util.UUID; - -/** - * [ 七牛云 ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/5/10 0010 上午 8:30 - * @since JDK1.8 - */ -@Slf4j -@Service(FileServiceNameConst.QI_NIU_OSS) -public class FileServiceQiNiuYun implements IFileService { - - //1小时,可以自定义链接过期时间 - private static final Long expireInSeconds = 3600L; - - @Autowired - private SystemConfigService systemConfigService; - - UploadManager ossClient = null; - - String accessConfig = null; - - String token = null; - - @Override - public ResponseDTO fileUpload(MultipartFile multipartFile, String path) { - OSSConfig ossConfig = systemConfigService.selectByKey2Obj(SystemConfigEnum.Key.QI_NIU_OSS.name(), OSSConfig.class); - try { - InputStream inputStream = new ByteArrayInputStream(multipartFile.getBytes()); - if (! ossConfig.toString().equals(accessConfig)) { - //accessKeyId 发生变动自动重新创建新的UploadManager - ossClient = new UploadManager(new Configuration()); - token = Auth.create(ossConfig.getAccessKeyId(), ossConfig.getAccessKeySecret()). - uploadToken(ossConfig.getBucketName()); - accessConfig = ossConfig.toString(); - } - String uuid = UUID.randomUUID().toString().replace("-", ""); - String ossPath = path + "/" + uuid; - String fileName = multipartFile.getOriginalFilename(); - String fileExt = fileName.substring(fileName.lastIndexOf(".") + 1); - String mime = this.getContentType(fileExt); - Response res = ossClient.put(inputStream, ossPath, token, null, mime); - if (! res.isOK()) { - log.error("QINIU fileUpload ERROR : {}", res.toString()); - return ResponseDTO.wrap(FileResponseCodeConst.UPLOAD_ERROR); - } - UploadVO localUploadVO = new UploadVO(); - localUploadVO.setUrl(this.getFileUrl(ossPath).getData()); - localUploadVO.setFileName(fileName); - localUploadVO.setFilePath(ossPath); - localUploadVO.setFileSize(multipartFile.getSize()); - return ResponseDTO.succData(localUploadVO); - } catch (Exception e) { - log.error("QINIU fileUpload ERROR : {}", e); - } - return ResponseDTO.wrap(FileResponseCodeConst.UPLOAD_ERROR); - } - - @Override - public ResponseDTO getFileUrl(String path) { - OSSConfig ossConfig = systemConfigService.selectByKey2Obj(SystemConfigEnum.Key.QI_NIU_OSS.name(), OSSConfig.class); - try { - if (! ossConfig.toString().equals(accessConfig)) { - //accessKeyId 发生变动自动重新创建新的UploadManager - ossClient = new UploadManager(new Configuration()); - token = Auth.create(ossConfig.getAccessKeyId(), ossConfig.getAccessKeySecret()). - uploadToken(ossConfig.getBucketName()); - accessConfig = ossConfig.toString(); - } - String encodedFileName = URLEncoder.encode(path, "utf-8"); - String domainOfBucket = ossConfig.getEndpoint(); - String publicUrl = String.format("%s/%s", domainOfBucket, encodedFileName); - String accessKey = ossConfig.getAccessKeyId(); - String secretKey = ossConfig.getAccessKeySecret(); - Auth auth = Auth.create(accessKey, secretKey); - //1小时,可以自定义链接过期时间 - long expireInSeconds = 3600; - String finalUrl = auth.privateDownloadUrl(publicUrl, expireInSeconds); - return ResponseDTO.succData(finalUrl); - } catch (Exception e) { - log.error("QINIU getFileUrl ERROR : {}", e); - } - return ResponseDTO.wrap(FileResponseCodeConst.URL_ERROR); - } - - @Override - public ResponseEntity fileDownload(String key, String fileName, HttpServletRequest request) { - File file = this.getFile(key, fileName); - if (file == null) { - throw new RuntimeException("文件不存在"); - } - return this.downloadMethod(file, request); - } - - /** - * 获取下载路径 - */ - public String getDownloadUrl(String key) { - OSSConfig ossConfig = systemConfigService.selectByKey2Obj(SystemConfigEnum.Key.QI_NIU_OSS.name(), OSSConfig.class); - String domainOfBucket = ossConfig.getEndpoint(); - String finalUrl = ""; - try { - String encodedFileName = URLEncoder.encode(key, "utf-8").replace("+", "%20"); - String publicUrl = String.format("%s/%s", domainOfBucket, encodedFileName); - Auth auth = Auth.create(ossConfig.getAccessKeyId(), ossConfig.getAccessKeySecret()); - finalUrl = auth.privateDownloadUrl(publicUrl, expireInSeconds); - } catch (Exception e) { - log.error("QINIU download ERROR : {}", e); - } - return finalUrl; - } - - /** - * 获取文件 - */ - public File getFile(String key, String fileName) { - String finalUrl = getDownloadUrl(key); - OkHttpClient client = new OkHttpClient(); - Request req = new Request.Builder().url(finalUrl).build(); - okhttp3.Response resp = null; - File file = new File(fileName); - try { - resp = client.newCall(req).execute(); - if (resp.isSuccessful()) { - ResponseBody body = resp.body(); - InputStream objectContent = body.byteStream(); - // 输入流转换为字节流 - byte[] buffer = FileCopyUtils.copyToByteArray(objectContent); - // 字节流写入文件 - FileCopyUtils.copy(buffer, file); - // 关闭输入流 - objectContent.close(); - } - - } catch (IOException e) { - log.error("文件获取失败:" + e); - return null; - } finally { - } - return file; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/service/IFileService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/service/IFileService.java deleted file mode 100644 index a818ae42..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/file/service/IFileService.java +++ /dev/null @@ -1,152 +0,0 @@ -package net.lab1024.smartadmin.module.support.file.service; - -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.module.support.file.domain.vo.UploadVO; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.util.FileCopyUtils; -import org.springframework.web.multipart.MultipartFile; - -import javax.servlet.http.HttpServletRequest; -import java.io.File; -import java.io.FileInputStream; -import java.io.InputStream; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; -import java.util.UUID; - -/** - * 文件服务接口 - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/5/11 0011 下午 16:42 - * @since JDK1.8 - */ -public interface IFileService { - - /** - * 文件上传 - * - * @param multipartFile - * @param path - * @return - */ - ResponseDTO fileUpload(MultipartFile multipartFile, String path); - - /** - * 获取文件url - * - * @param path - * @return - */ - ResponseDTO getFileUrl(String path); - - /** - * 文件下载 - * - * @param key - * @param fileName - * @param request - * @return - */ - ResponseEntity fileDownload(String key, String fileName, HttpServletRequest request); - - /** - * 生成文件名字 - * 当前年月日时分秒 +32位 uuid + 文件格式后缀 - * - * @param originalFileName - * @return String - */ - default String generateFileName(String originalFileName) { - String time = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddhhmms")); - String uuid = UUID.randomUUID().toString().replaceAll("-", ""); - String fileType = originalFileName.substring(originalFileName.lastIndexOf(".")); - return time + uuid + fileType; - } - - /** - * 获取文件类型 - * - * @param fileExt - * @return - */ - default String getContentType(String fileExt) { - // 文件的后缀名 - if ("bmp".equalsIgnoreCase(fileExt)) { - return "image/bmp"; - } - if ("gif".equalsIgnoreCase(fileExt)) { - return "image/gif"; - } - if ("jpeg".equalsIgnoreCase(fileExt) || "jpg".equalsIgnoreCase(fileExt) || ".png".equalsIgnoreCase(fileExt)) { - return "image/jpeg"; - } - if ("png".equalsIgnoreCase(fileExt)) { - return "image/png"; - } - if ("html".equalsIgnoreCase(fileExt)) { - return "text/html"; - } - if ("txt".equalsIgnoreCase(fileExt)) { - return "text/plain"; - } - if ("vsd".equalsIgnoreCase(fileExt)) { - return "application/vnd.visio"; - } - if ("ppt".equalsIgnoreCase(fileExt) || "pptx".equalsIgnoreCase(fileExt)) { - return "application/vnd.ms-powerpoint"; - } - if ("doc".equalsIgnoreCase(fileExt) || "docx".equalsIgnoreCase(fileExt)) { - return "application/msword"; - } - if ("xml".equalsIgnoreCase(fileExt)) { - return "text/xml"; - } - return ""; - } - - default ResponseEntity downloadMethod(File file, HttpServletRequest request) { - HttpHeaders heads = new HttpHeaders(); - heads.add(HttpHeaders.CONTENT_TYPE, "application/octet-stream; charset=utf-8"); - String fileName = file.getName(); - try { - if (request.getHeader("User-Agent").toLowerCase().indexOf("firefox") > 0) { - // firefox浏览器 - fileName = new String(fileName.getBytes("UTF-8"), "ISO8859-1"); - } else if (request.getHeader("User-Agent").toUpperCase().indexOf("MSIE") > 0) { - // IE浏览器 - fileName = URLEncoder.encode(fileName, "UTF-8"); - } else if (request.getHeader("User-Agent").toUpperCase().indexOf("EDGE") > 0) { - // WIN10浏览器 - fileName = URLEncoder.encode(fileName, "UTF-8"); - } else if (request.getHeader("User-Agent").toUpperCase().indexOf("CHROME") > 0) { - // 谷歌 - fileName = new String(fileName.getBytes("UTF-8"), "ISO8859-1"); - } else { - //万能乱码问题解决 - fileName = new String(fileName.getBytes("UTF-8"), "ISO-8859-1"); - } - } catch (UnsupportedEncodingException e) { - // log.error("", e); - } - heads.add(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + fileName); - try { - InputStream in = new FileInputStream(file); - // 输入流转换为字节流 - byte[] buffer = FileCopyUtils.copyToByteArray(in); - ResponseEntity responseEntity = new ResponseEntity<>(buffer, heads, HttpStatus.OK); - //file.delete(); - return responseEntity; - } catch (Exception e) { - // log.error("", e); - } - return null; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/heartbeat/HeartBeatController.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/heartbeat/HeartBeatController.java deleted file mode 100644 index a9671255..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/heartbeat/HeartBeatController.java +++ /dev/null @@ -1,32 +0,0 @@ -package net.lab1024.smartadmin.module.support.heartbeat; - -import net.lab1024.smartadmin.common.anno.OperateLog; -import net.lab1024.smartadmin.common.domain.PageParamDTO; -import net.lab1024.smartadmin.common.domain.PageResultDTO; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.constant.SwaggerTagConst; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RestController; - -import javax.validation.Valid; - - -@Api(tags = {SwaggerTagConst.Admin.MANAGER_HEART_BEAT}) -@OperateLog -@RestController -public class HeartBeatController { - - @Autowired - private HeartBeatService heartBeatService; - - @PostMapping("/heartBeat/query") - @ApiOperation("查询心跳记录 @author zhuoda") - public ResponseDTO> query(@RequestBody @Valid PageParamDTO pageParamDTO){ - return heartBeatService.pageQuery(pageParamDTO); - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/heartbeat/HeartBeatService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/heartbeat/HeartBeatService.java deleted file mode 100644 index b474c174..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/heartbeat/HeartBeatService.java +++ /dev/null @@ -1,90 +0,0 @@ -package net.lab1024.smartadmin.module.support.heartbeat; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import net.lab1024.smartadmin.common.domain.PageParamDTO; -import net.lab1024.smartadmin.common.domain.PageResultDTO; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.common.heartbeat.AbstractHeartBeatCommand; -import net.lab1024.smartadmin.common.heartbeat.HeartBeatConfig; -import net.lab1024.smartadmin.common.heartbeat.HeartBeatLogger; -import net.lab1024.smartadmin.common.heartbeat.HeartBeatRecordDTO; -import net.lab1024.smartadmin.config.SmartHeartBeatConfig; -import net.lab1024.smartadmin.util.SmartBeanUtil; -import net.lab1024.smartadmin.util.SmartPageUtil; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; -import java.util.List; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 - */ -@Slf4j -@Service -public class HeartBeatService extends AbstractHeartBeatCommand { - - @Autowired - private HeartBeatRecordDao heartBeatRecordDao; - - @Autowired - private SmartHeartBeatConfig heartBeatConfig; - - @PostConstruct - public void init() { - - HeartBeatConfig config = HeartBeatConfig.builder().delayHandlerTime(heartBeatConfig.getDelayHandlerTime()).intervalTime(heartBeatConfig.getIntervalTime()).build(); - - super.init(config, new HeartBeatLogger() { - @Override - public void error(String string) { - log.error(string); - } - - @Override - public void error(String string, Throwable e) { - log.error(string, e); - } - - @Override - public void info(String string) { - log.info(string); - } - }); - } - - @PreDestroy - @Override - public void destroy() { - super.destroy(); - } - - @Override - public void handler(HeartBeatRecordDTO heartBeatRecordDTO) { - HeartBeatRecordEntity heartBeatRecordEntity = SmartBeanUtil.copy(heartBeatRecordDTO, HeartBeatRecordEntity.class); - HeartBeatRecordEntity heartBeatRecordOld = heartBeatRecordDao.query(heartBeatRecordEntity); - if (heartBeatRecordOld == null) { - heartBeatRecordDao.insertHeartBeat(heartBeatRecordEntity); - } else { - heartBeatRecordDao.updateHeartBeatTimeById(heartBeatRecordOld.getId(), heartBeatRecordEntity.getHeartBeatTime()); - } - - } - - public ResponseDTO> pageQuery(PageParamDTO pageParamDTO) { - Page pageQueryInfo = SmartPageUtil.convert2QueryPage(pageParamDTO); - List recordVOList = heartBeatRecordDao.pageQuery(pageQueryInfo); - PageResultDTO pageResultDTO = SmartPageUtil.convert2PageResult(pageQueryInfo, recordVOList); - return ResponseDTO.succData(pageResultDTO); - - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/IdGeneratorDao.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/IdGeneratorDao.java deleted file mode 100644 index e6e1341e..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/IdGeneratorDao.java +++ /dev/null @@ -1,36 +0,0 @@ -package net.lab1024.smartadmin.module.support.idgenerator; - - -import net.lab1024.smartadmin.module.support.idgenerator.domain.IdGeneratorEntity; -import net.lab1024.smartadmin.module.support.idgenerator.domain.IdGeneratorLastNumberDTO; -import net.lab1024.smartadmin.module.support.idgenerator.domain.IdGeneratorRecordDTO; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * - * zhuo - */ -@Mapper -public interface IdGeneratorDao { - - IdGeneratorLastNumberDTO selectLastNumber(Long id); - - List selectAll(); - - void updateLastNumber(@Param("generatorId") Long generatorId, @Param("lastNumber") Long lastNumber); - - int replaceIdGeneratorRecord(@Param("generatorId") Long generatorId,// - @Param("year") int year,// - @Param("month") int month,// - @Param("day") int day,// - @Param("lastNumber") Long lastNumber); - - IdGeneratorRecordDTO selectHistoryLastNumber(@Param("generatorId") Long generatorId, - @Param("year") int year, - @Param("month") int month, - @Param("day") int day); - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/IdGeneratorManager.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/IdGeneratorManager.java deleted file mode 100644 index 1b2a926d..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/IdGeneratorManager.java +++ /dev/null @@ -1,66 +0,0 @@ -package net.lab1024.smartadmin.module.support.idgenerator; - -import net.lab1024.smartadmin.common.exception.SmartBusinessException; -import net.lab1024.smartadmin.module.support.idgenerator.domain.IdGeneratorLastNumberDTO; -import net.lab1024.smartadmin.module.support.idgenerator.domain.IdGeneratorPOJO; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.text.SimpleDateFormat; -import java.time.LocalDate; -import java.util.Date; - -/** - * 全局id生成器 - * zhuo - */ -@Service -public class IdGeneratorManager { - - @Autowired - private IdGeneratorDao idGeneratorDao; - - @Transactional(rollbackFor = Exception.class) - public long[] generate(IdGeneratorPOJO idGeneratorPOJO, int stepLength) { - IdGeneratorLastNumberDTO idGeneratorLastNumberDTO = idGeneratorDao.selectLastNumber(idGeneratorPOJO.getIdGeneratorEntity().getId()); - if (idGeneratorLastNumberDTO == null) { - throw new SmartBusinessException("IdGenerator, id 数据库不存在" + idGeneratorPOJO.getIdGeneratorEntity().getId()); - } - - Long lastNumber = idGeneratorLastNumberDTO.getLastNumber(); - if (lastNumber == null) { - lastNumber = idGeneratorPOJO.getIdGeneratorEntity().getInitNumber(); - } else { - lastNumber = lastNumber + 1; - } - - Date updateTime = idGeneratorLastNumberDTO.getUpdateTime(); - if (updateTime == null) { - updateTime = idGeneratorLastNumberDTO.getDatabaseTime(); - } - - Long startValue = -1L, endValue = -1L; - switch (idGeneratorPOJO.getIdGeneratorRuleTypeEnum()) { - case NO_CYCLE: - startValue = lastNumber.longValue(); - endValue = startValue + stepLength; - break; - default: - SimpleDateFormat format = new SimpleDateFormat(idGeneratorPOJO.getIdGeneratorRuleTypeEnum().getExt()); - if (format.format(idGeneratorLastNumberDTO.getDatabaseTime()).equals(format.format(updateTime))) { - startValue = lastNumber.longValue(); - endValue = startValue + stepLength; - } else { - startValue = idGeneratorPOJO.getIdGeneratorEntity().getInitNumber(); - endValue = startValue + stepLength; - } - break; - } - - idGeneratorDao.updateLastNumber(idGeneratorPOJO.getIdGeneratorEntity().getId(), endValue - 1); - LocalDate localDate = LocalDate.now(); - idGeneratorDao.replaceIdGeneratorRecord(idGeneratorPOJO.getIdGeneratorEntity().getId(), localDate.getYear(), localDate.getMonthValue(), localDate.getDayOfMonth(), endValue - 1); - return new long[]{startValue, endValue}; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/IdGeneratorService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/IdGeneratorService.java deleted file mode 100644 index ca5d581b..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/IdGeneratorService.java +++ /dev/null @@ -1,140 +0,0 @@ -package net.lab1024.smartadmin.module.support.idgenerator; - -import net.lab1024.smartadmin.common.exception.SmartBusinessException; -import net.lab1024.smartadmin.module.support.idgenerator.constant.IdGeneratorEnum; -import net.lab1024.smartadmin.module.support.idgenerator.constant.IdGeneratorRuleTypeEnum; -import net.lab1024.smartadmin.module.support.idgenerator.domain.IdGeneratorEntity; -import net.lab1024.smartadmin.module.support.idgenerator.domain.IdGeneratorPOJO; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import javax.annotation.PostConstruct; -import java.time.LocalDate; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -/** - * 全局id生成器 - * zhuo - */ -@Slf4j -@Service -public class IdGeneratorService { - - private Map idGeneratorMap; - - @Autowired - private IdGeneratorDao idGeneratorDao; - - @Autowired - private IdGeneratorManager idGeneratorManager; - - @PostConstruct - void init() { - this.idGeneratorMap = new ConcurrentHashMap<>(); - List idGeneratorEntities = idGeneratorDao.selectAll(); - if (idGeneratorEntities != null) { - idGeneratorEntities.forEach(e -> { - IdGeneratorRuleTypeEnum idGeneratorRuleTypeEnum = this.getIdGeneratorRuleTypeEnum(e.getRuleType()); - if (idGeneratorRuleTypeEnum != null) { - IdGeneratorPOJO idGeneratorPOJO = new IdGeneratorPOJO(idGeneratorRuleTypeEnum, e); - String ruleFormat = e.getRuleFormat(); - int startNInx = ruleFormat.indexOf("[n"); - int endNInx = ruleFormat.indexOf("n]"); - idGeneratorPOJO.setNumberCount(endNInx - startNInx); - idGeneratorPOJO.setHaveDay(ruleFormat.contains("[dd]")); - idGeneratorPOJO.setHaveMonth(ruleFormat.contains("[mm]")); - idGeneratorPOJO.setHaveYear(ruleFormat.contains("[yyyy]")); - this.idGeneratorMap.put(e.getId(), idGeneratorPOJO); - } else { - log.error("cannot find rule type , id : {}, key name : {} ", e.getId(), e.getKeyName()); - } - }); - } - } - - public String generate(IdGeneratorEnum idGeneratorEnum) { - return generate(idGeneratorEnum, 1).get(0); - } - - /** - * @param idGeneratorEnum - * @param stepLength - * @return - */ - public List generate(IdGeneratorEnum idGeneratorEnum, int stepLength) { - IdGeneratorPOJO idGeneratorPOJO = validateParams(idGeneratorEnum, stepLength); - long[] generateIds = idGeneratorManager.generate(idGeneratorPOJO, stepLength); - Long startValue = generateIds[0], endValue = generateIds[1]; - LocalDate now = LocalDate.now(); - String year = String.valueOf(now.getYear()); - String month = now.getMonthValue() > 9 ? String.valueOf(now.getMonthValue()) : "0" + now.getMonthValue(); - String day = now.getDayOfMonth() > 9 ? String.valueOf(now.getDayOfMonth()) : "0" + now.getDayOfMonth(); - ArrayList codeList = new ArrayList<>(); - for (long loop = startValue; loop < endValue; loop++) { - String generateBillCode = this.replaceAndFill(idGeneratorPOJO, loop, year, month, day); - codeList.add(generateBillCode); - } - return codeList; - } - - private IdGeneratorRuleTypeEnum getIdGeneratorRuleTypeEnum(String ruleType) { - for (IdGeneratorRuleTypeEnum en : IdGeneratorRuleTypeEnum.values()) { - if (en.name().equalsIgnoreCase(ruleType)) { - return en; - } - } - return null; - } - - private IdGeneratorPOJO validateParams(IdGeneratorEnum idGeneratorEnum, int stepLength) { - if (stepLength < 1) { - throw new SmartBusinessException("IdGenerator, step过短" + stepLength); - } - - IdGeneratorPOJO idGeneratorPOJO = this.idGeneratorMap.get(idGeneratorEnum.getId()); - if (idGeneratorPOJO == null) { - throw new SmartBusinessException("IdGenerator, id 不存在" + idGeneratorEnum); - } - return idGeneratorPOJO; - } - - /** - * 替换特殊rule,即替换[yyyy][mm][dd][nnn]等规则 - */ - private String replaceAndFill(IdGeneratorPOJO idGeneratorPOJO, Long number, String year, String month, String day) { - StringBuilder numberStringBuilder = new StringBuilder(); - int curNumberCount = String.valueOf(number).length(); - - if (idGeneratorPOJO.getNumberCount() > curNumberCount) { - int remain = idGeneratorPOJO.getNumberCount() - curNumberCount; - for (int i = 0; i < remain; i++) { - numberStringBuilder.append(0); - } - } - numberStringBuilder.append(number); - - StringBuilder nStringBuilder = new StringBuilder(); - nStringBuilder.append("\\["); - for (int i = 0; i < idGeneratorPOJO.getNumberCount(); i++) { - nStringBuilder.append("n"); - } - nStringBuilder.append("\\]"); - - String tempRuleFormat = new String(idGeneratorPOJO.getIdGeneratorEntity().getRuleFormat().getBytes()); - if (idGeneratorPOJO.isHaveYear()) { - tempRuleFormat = tempRuleFormat.replaceAll("\\[yyyy\\]", year); - } - if (idGeneratorPOJO.isHaveMonth()) { - tempRuleFormat = tempRuleFormat.replaceAll("\\[mm\\]", month); - } - if (idGeneratorPOJO.isHaveDay()) { - tempRuleFormat = tempRuleFormat.replaceAll("\\[dd\\]", day); - } - - return tempRuleFormat.replaceAll(nStringBuilder.toString(), numberStringBuilder.toString()); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/constant/IdGeneratorEnum.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/constant/IdGeneratorEnum.java deleted file mode 100644 index 79cebd0e..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/constant/IdGeneratorEnum.java +++ /dev/null @@ -1,45 +0,0 @@ -package net.lab1024.smartadmin.module.support.idgenerator.constant; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/3/8 0008 下午 13:43 - * @since JDK1.8 - */ -public enum IdGeneratorEnum { - - - /** - * 测试generate - */ - TEST_ID_GENERATOR(2, "testIdGenerator"), - - - ORDER(1, "order"); - - private long id; - private String keyName; - - IdGeneratorEnum(int id, String keyName) { - this.id = id; - this.keyName = keyName; - } - - @Override - public String toString() { - return "IdGeneratorEnum{" + "id=" + id + ", keyName='" + keyName + '\'' + '}'; - } - - public long getId() { - return id; - } - - public String getKeyName() { - return keyName; - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/domain/IdGeneratorEntity.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/domain/IdGeneratorEntity.java deleted file mode 100644 index e1d64ffc..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/domain/IdGeneratorEntity.java +++ /dev/null @@ -1,45 +0,0 @@ -package net.lab1024.smartadmin.module.support.idgenerator.domain; - -import com.baomidou.mybatisplus.annotation.TableName; -import net.lab1024.smartadmin.common.domain.BaseEntity; -import lombok.Data; - -import java.io.Serializable; -import java.util.Date; - -/** - * @author sun - * @Auther: anders - * @Date: 2018/8/7 0007 13:33 - * @Description: - */ -@Data -@TableName(value = "t_id_generator") -public class IdGeneratorEntity extends BaseEntity implements Serializable { - - private static final long serialVersionUID = 5582354131134766548L; - /** - * 英文key - */ - private String keyName; - /** - * 规则格式 - */ - private String ruleFormat; - /** - * 类型 - */ - private String ruleType; - /** - * 初始值 - */ - private Long initNumber; - /** - * 上次产生的id - */ - private Long lastNumber; - /** - * 备注 - */ - private String remark; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/domain/IdGeneratorLastNumberDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/domain/IdGeneratorLastNumberDTO.java deleted file mode 100644 index 69af325e..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/domain/IdGeneratorLastNumberDTO.java +++ /dev/null @@ -1,38 +0,0 @@ -package net.lab1024.smartadmin.module.support.idgenerator.domain; - -import java.util.Date; - -/** - * @Auther: yandanyang - * @Date: 2018/8/7 0007 13:33 - * @Description: - */ -public class IdGeneratorLastNumberDTO { - private Date updateTime; - private Long lastNumber; - private Date databaseTime; - - public Date getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Date updateTime) { - this.updateTime = updateTime; - } - - public Long getLastNumber() { - return lastNumber; - } - - public void setLastNumber(Long lastNumber) { - this.lastNumber = lastNumber; - } - - public Date getDatabaseTime() { - return databaseTime; - } - - public void setDatabaseTime(Date databaseTime) { - this.databaseTime = databaseTime; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/domain/IdGeneratorPOJO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/domain/IdGeneratorPOJO.java deleted file mode 100644 index 6cd93931..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/domain/IdGeneratorPOJO.java +++ /dev/null @@ -1,71 +0,0 @@ -package net.lab1024.smartadmin.module.support.idgenerator.domain; - -import net.lab1024.smartadmin.module.support.idgenerator.constant.IdGeneratorRuleTypeEnum; - -/** - * @Auther: yandanyang - * @Date: 2018/8/7 0007 13:33 - * @Description: - */ -public class IdGeneratorPOJO { - - private IdGeneratorRuleTypeEnum idGeneratorRuleTypeEnum; - private IdGeneratorEntity idGeneratorEntity; - private int numberCount = 0; - private boolean haveYear = false; - private boolean haveMonth = false; - private boolean haveDay = false; - - public IdGeneratorPOJO(IdGeneratorRuleTypeEnum idGeneratorRuleTypeEnum, IdGeneratorEntity idGeneratorEntity) { - this.idGeneratorRuleTypeEnum = idGeneratorRuleTypeEnum; - this.idGeneratorEntity = idGeneratorEntity; - } - - public IdGeneratorRuleTypeEnum getIdGeneratorRuleTypeEnum() { - return idGeneratorRuleTypeEnum; - } - - public void setIdGeneratorRuleTypeEnum(IdGeneratorRuleTypeEnum idGeneratorRuleTypeEnum) { - this.idGeneratorRuleTypeEnum = idGeneratorRuleTypeEnum; - } - - public IdGeneratorEntity getIdGeneratorEntity() { - return idGeneratorEntity; - } - - public void setIdGeneratorEntity(IdGeneratorEntity idGeneratorEntity) { - this.idGeneratorEntity = idGeneratorEntity; - } - - public int getNumberCount() { - return numberCount; - } - - public void setNumberCount(int numberCount) { - this.numberCount = numberCount; - } - - public boolean isHaveYear() { - return haveYear; - } - - public void setHaveYear(boolean haveYear) { - this.haveYear = haveYear; - } - - public boolean isHaveMonth() { - return haveMonth; - } - - public void setHaveMonth(boolean haveMonth) { - this.haveMonth = haveMonth; - } - - public boolean isHaveDay() { - return haveDay; - } - - public void setHaveDay(boolean haveDay) { - this.haveDay = haveDay; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/domain/IdGeneratorRecordDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/domain/IdGeneratorRecordDTO.java deleted file mode 100644 index 50f79b1e..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/idgenerator/domain/IdGeneratorRecordDTO.java +++ /dev/null @@ -1,22 +0,0 @@ -package net.lab1024.smartadmin.module.support.idgenerator.domain; - -import lombok.Data; - -/** - * @Auther: yandanyang - * @Date: 2018/8/7 0007 13:33 - * @Description: - */ -@Data -public class IdGeneratorRecordDTO { - - private Long generatorId; - - private Integer year; - - private Integer month; - - private Integer day; - - private Long lastNumber; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/constant/QuartzConst.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/constant/QuartzConst.java deleted file mode 100644 index 949da2bc..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/constant/QuartzConst.java +++ /dev/null @@ -1,17 +0,0 @@ -package net.lab1024.smartadmin.module.support.quartz.constant; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/13 0013 下午 15:21 - * @since JDK1.8 - */ -public class QuartzConst { - public static final String QUARTZ_PARAMS_KEY="TASK_PARAMS"; - public static final String JOB_KEY_PREFIX="TASK_"; - public static final String TRIGGER_KEY_PREFIX="TRIGGER_"; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/constant/TaskResultEnum.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/constant/TaskResultEnum.java deleted file mode 100644 index df5fbc5d..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/constant/TaskResultEnum.java +++ /dev/null @@ -1,47 +0,0 @@ -package net.lab1024.smartadmin.module.support.quartz.constant; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/13 0013 下午 14:19 - * @since JDK1.8 - */ -public enum TaskResultEnum { - - SUCCESS(0,"成功"), - /** - * - */ - FAIL(1,"失败"); - - public static final String INFO="0:成功,1:失败"; - - private Integer status; - - private String desc; - - TaskResultEnum(Integer status , String desc) { - this.status = status; - this.desc = desc; - } - - public Integer getStatus() { - return status; - } - - public void setStatus(Integer status) { - this.status = status; - } - - public String getDesc() { - return desc; - } - - public void setDesc(String desc) { - this.desc = desc; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/constant/TaskStatusEnum.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/constant/TaskStatusEnum.java deleted file mode 100644 index 9a7f9bd7..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/constant/TaskStatusEnum.java +++ /dev/null @@ -1,47 +0,0 @@ -package net.lab1024.smartadmin.module.support.quartz.constant; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/13 0013 下午 14:19 - * @since JDK1.8 - */ -public enum TaskStatusEnum { - - NORMAL(0,"正常"), - /** - * - */ - PAUSE(1,"暂停"); - - public static final String INFO="0:正常,1:暂停"; - - private Integer status; - - private String desc; - - TaskStatusEnum(Integer status ,String desc) { - this.status = status; - this.desc = desc; - } - - public Integer getStatus() { - return status; - } - - public void setStatus(Integer status) { - this.status = status; - } - - public String getDesc() { - return desc; - } - - public void setDesc(String desc) { - this.desc = desc; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/controller/QuartzController.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/controller/QuartzController.java deleted file mode 100644 index 59a71ad3..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/controller/QuartzController.java +++ /dev/null @@ -1,81 +0,0 @@ -package net.lab1024.smartadmin.module.support.quartz.controller; - -import net.lab1024.smartadmin.common.anno.NoValidPrivilege; -import net.lab1024.smartadmin.common.anno.OperateLog; -import net.lab1024.smartadmin.common.domain.PageResultDTO; -import net.lab1024.smartadmin.constant.SwaggerTagConst; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.module.support.quartz.service.QuartzTaskService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import net.lab1024.smartadmin.module.support.quartz.domain.dto.*; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.validation.Valid; - -/** - * - * [ ] - * - * @version 1.0 - * @since JDK1.8 - * @author yandanyang - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - */ -@OperateLog -@RestController -@Api(tags = {SwaggerTagConst.Admin.MANAGER_TASK_SCHEDULER}) -public class QuartzController { - - @Autowired - private QuartzTaskService quartzTaskService; - - - @PostMapping("/quartz/task/query") - @ApiOperation(value = "查询任务") - @NoValidPrivilege - public ResponseDTO> query(@RequestBody @Valid QuartzQueryDTO queryDTO){ - return quartzTaskService.query(queryDTO); - } - - - @PostMapping("/quartz/task/queryLog") - @ApiOperation(value = "查询任务运行日志") - @NoValidPrivilege - public ResponseDTO> queryLog(@RequestBody @Valid QuartzLogQueryDTO queryDTO){ - return quartzTaskService.queryLog(queryDTO); - } - - @PostMapping("/quartz/task/saveOrUpdate") - @ApiOperation(value = "新建更新任务") - public ResponseDTO saveOrUpdateTask(@RequestBody @Valid QuartzTaskDTO quartzTaskDTO)throws Exception{ - return quartzTaskService.saveOrUpdateTask(quartzTaskDTO); - } - - @GetMapping("/quartz/task/run/{taskId}") - @ApiOperation(value = "立即运行某个任务") - public ResponseDTO runTask(@PathVariable("taskId") Long taskId)throws Exception{ - return quartzTaskService.runTask(taskId); - } - - @GetMapping("/quartz/task/pause/{taskId}") - @ApiOperation(value = "暂停某个任务") - public ResponseDTO pauseTask(@PathVariable("taskId")Long taskId)throws Exception{ - return quartzTaskService.pauseTask(taskId); - } - - @GetMapping("/quartz/task/resume/{taskId}") - @ApiOperation(value = "恢复某个任务") - public ResponseDTO resumeTask(@PathVariable("taskId")Long taskId)throws Exception{ - return quartzTaskService.resumeTask(taskId); - } - - @GetMapping("/quartz/task/delete/{taskId}") - @ApiOperation(value = "删除某个任务") - public ResponseDTO deleteTask(@PathVariable("taskId")Long taskId)throws Exception{ - return quartzTaskService.deleteTask(taskId); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/dao/QuartzTaskDao.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/dao/QuartzTaskDao.java deleted file mode 100644 index f9153e9e..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/dao/QuartzTaskDao.java +++ /dev/null @@ -1,42 +0,0 @@ -package net.lab1024.smartadmin.module.support.quartz.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import net.lab1024.smartadmin.module.support.quartz.domain.dto.QuartzQueryDTO; -import net.lab1024.smartadmin.module.support.quartz.domain.dto.QuartzTaskVO; -import net.lab1024.smartadmin.module.support.quartz.domain.entity.QuartzTaskEntity; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Component; - -import java.util.List; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/13 0013 下午 14:35 - * @since JDK1.8 - */ -@Mapper -@Component -public interface QuartzTaskDao extends BaseMapper { - - /** - * 更新任务状态 - * @param taskId - * @param taskStatus - */ - void updateStatus(@Param("taskId") Integer taskId,@Param("taskStatus") Integer taskStatus); - - /** - * 查询列表 - * @param queryDTO - * @return - */ - List queryList(Page page, @Param("queryDTO")QuartzQueryDTO queryDTO); - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/dao/QuartzTaskLogDao.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/dao/QuartzTaskLogDao.java deleted file mode 100644 index b2e9cb04..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/dao/QuartzTaskLogDao.java +++ /dev/null @@ -1,35 +0,0 @@ -package net.lab1024.smartadmin.module.support.quartz.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import net.lab1024.smartadmin.module.support.quartz.domain.dto.QuartzLogQueryDTO; -import net.lab1024.smartadmin.module.support.quartz.domain.dto.QuartzTaskLogVO; -import net.lab1024.smartadmin.module.support.quartz.domain.entity.QuartzTaskLogEntity; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Component; - -import java.util.List; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/13 0013 下午 14:35 - * @since JDK1.8 - */ -@Mapper -@Component -public interface QuartzTaskLogDao extends BaseMapper{ - - - /** - * 查询列表 - * @param queryDTO - * @return - */ - List queryList(Page page, @Param("queryDTO")QuartzLogQueryDTO queryDTO); -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/domain/dto/QuartzLogQueryDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/domain/dto/QuartzLogQueryDTO.java deleted file mode 100644 index 84b8564e..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/domain/dto/QuartzLogQueryDTO.java +++ /dev/null @@ -1,25 +0,0 @@ -package net.lab1024.smartadmin.module.support.quartz.domain.dto; - -import net.lab1024.smartadmin.common.domain.PageParamDTO; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotNull; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/15 0015 上午 11:29 - * @since JDK1.8 - */ -@Data -public class QuartzLogQueryDTO extends PageParamDTO { - - @ApiModelProperty(value = "任务Id(不能为空)") - @NotNull(message = "任务Id不能为空") - private Integer taskId; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/domain/dto/QuartzQueryDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/domain/dto/QuartzQueryDTO.java deleted file mode 100644 index 51e6b584..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/domain/dto/QuartzQueryDTO.java +++ /dev/null @@ -1,16 +0,0 @@ -package net.lab1024.smartadmin.module.support.quartz.domain.dto; - -import net.lab1024.smartadmin.common.domain.PageParamDTO; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/15 0015 上午 11:29 - * @since JDK1.8 - */ -public class QuartzQueryDTO extends PageParamDTO { -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/domain/dto/QuartzTaskDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/domain/dto/QuartzTaskDTO.java deleted file mode 100644 index 5fb303fc..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/domain/dto/QuartzTaskDTO.java +++ /dev/null @@ -1,45 +0,0 @@ -package net.lab1024.smartadmin.module.support.quartz.domain.dto; - -import net.lab1024.smartadmin.module.support.quartz.constant.TaskStatusEnum; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotNull; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/13 0013 下午 15:42 - * @since JDK1.8 - */ -@Data -public class QuartzTaskDTO { - - @ApiModelProperty("id") - private Long id; - - @ApiModelProperty("任务名称") - @NotNull(message = "任务名称不能为空") - private String taskName; - - @ApiModelProperty("任务Bean") - @NotNull(message = "任务Bean不能为空") - private String taskBean; - - @ApiModelProperty("任务参数") - private String taskParams; - - @ApiModelProperty("cron") - @NotNull(message = "cron表达式不能为空") - private String taskCron; - - @ApiModelProperty("任务状态:"+ TaskStatusEnum.INFO) - private Integer taskStatus; - - @ApiModelProperty("任务备注") - private String remark; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/domain/dto/QuartzTaskLogVO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/domain/dto/QuartzTaskLogVO.java deleted file mode 100644 index 23cd35fc..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/domain/dto/QuartzTaskLogVO.java +++ /dev/null @@ -1,49 +0,0 @@ -package net.lab1024.smartadmin.module.support.quartz.domain.dto; - -import net.lab1024.smartadmin.module.support.quartz.constant.TaskResultEnum; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.Date; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/13 0013 下午 15:42 - * @since JDK1.8 - */ -@Data -public class QuartzTaskLogVO { - - @ApiModelProperty("id") - private Long id; - - @ApiModelProperty("任务id") - private Long taskId; - - @ApiModelProperty("任务名称") - private String taskName; - - @ApiModelProperty("任务参数") - private String taskParams; - - @ApiModelProperty("任务处理状态:"+ TaskResultEnum.INFO) - private Integer processStatus; - - @ApiModelProperty("任务时长ms") - private Long processDuration; - - @ApiModelProperty("处理日志") - private String processLog; - - @ApiModelProperty("创建时间") - private Date createTime; - - - @ApiModelProperty("主机ip") - private String ipAddress; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/domain/dto/QuartzTaskVO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/domain/dto/QuartzTaskVO.java deleted file mode 100644 index b588c532..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/domain/dto/QuartzTaskVO.java +++ /dev/null @@ -1,45 +0,0 @@ -package net.lab1024.smartadmin.module.support.quartz.domain.dto; - -import net.lab1024.smartadmin.module.support.quartz.constant.TaskStatusEnum; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotNull; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/13 0013 下午 15:42 - * @since JDK1.8 - */ -@Data -public class QuartzTaskVO { - - @ApiModelProperty("id") - private Long id; - - @ApiModelProperty("任务名称") - @NotNull(message = "任务名称不能为空") - private String taskName; - - @ApiModelProperty("任务Bean") - @NotNull(message = "任务Bean不能为空") - private String taskBean; - - @ApiModelProperty("任务参数") - private String taskParams; - - @ApiModelProperty("cron") - @NotNull(message = "cron表达式不能为空") - private String taskCron; - - @ApiModelProperty("任务状态:"+ TaskStatusEnum.INFO) - private Integer taskStatus; - - @ApiModelProperty("任务备注") - private String remark; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/domain/entity/QuartzTaskEntity.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/domain/entity/QuartzTaskEntity.java deleted file mode 100644 index cb419b84..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/domain/entity/QuartzTaskEntity.java +++ /dev/null @@ -1,50 +0,0 @@ -package net.lab1024.smartadmin.module.support.quartz.domain.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import net.lab1024.smartadmin.common.domain.BaseEntity; -import lombok.Data; - - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/13 0013 下午 13:45 - * @since JDK1.8 - */ -@Data -@TableName("t_quartz_task") -public class QuartzTaskEntity extends BaseEntity { - /** - * 任务名称参数 - */ - private String taskName; - /** - * 任务类 - */ - private String taskBean; - - /** - * 任务参数 - */ - private String taskParams; - - /** - * cron - */ - private String taskCron; - - /** - * 任务状态 - */ - private Integer taskStatus; - - /** - * 备注 - */ - private String remark; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/domain/entity/QuartzTaskLogEntity.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/domain/entity/QuartzTaskLogEntity.java deleted file mode 100644 index 9d728416..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/domain/entity/QuartzTaskLogEntity.java +++ /dev/null @@ -1,50 +0,0 @@ -package net.lab1024.smartadmin.module.support.quartz.domain.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import net.lab1024.smartadmin.common.domain.BaseEntity; -import lombok.Data; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/13 0013 下午 13:45 - * @since JDK1.8 - */ -@Data -@TableName("t_quartz_task_log") -public class QuartzTaskLogEntity extends BaseEntity { - /** - * 任务名称参数 - */ - private Long taskId; - /** - * 任务名称 - */ - private String taskName; - /** - * 任务参数 - */ - private String taskParams; - /** - * 任务处理状态 - */ - private Integer processStatus; - - /** - * 任务时长ms - */ - private Long processDuration; - - /** - * 处理日志 - */ - private String processLog; - - - private String ipAddress; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/service/QuartzTask.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/service/QuartzTask.java deleted file mode 100644 index 4b327d1f..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/service/QuartzTask.java +++ /dev/null @@ -1,85 +0,0 @@ -package net.lab1024.smartadmin.module.support.quartz.service; - -import lombok.extern.slf4j.Slf4j; -import net.lab1024.smartadmin.common.domain.ITask; -import net.lab1024.smartadmin.module.support.quartz.constant.QuartzConst; -import net.lab1024.smartadmin.module.support.quartz.constant.TaskResultEnum; -import net.lab1024.smartadmin.module.support.quartz.domain.entity.QuartzTaskEntity; -import net.lab1024.smartadmin.module.support.quartz.domain.entity.QuartzTaskLogEntity; -import net.lab1024.smartadmin.third.SmartApplicationContext; -import net.lab1024.smartadmin.util.SmartIPUtil; -import net.lab1024.smartadmin.util.SmartQuartzUtil; -import org.quartz.JobDetail; -import org.quartz.JobExecutionContext; -import org.quartz.JobExecutionException; -import org.quartz.JobKey; -import org.springframework.scheduling.quartz.QuartzJobBean; - -import java.io.PrintWriter; -import java.io.StringWriter; -import java.util.Date; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 - */ -@Slf4j -public class QuartzTask extends QuartzJobBean { - - @Override - protected void executeInternal(JobExecutionContext context) throws JobExecutionException { - JobDetail jobDetail = context.getJobDetail(); - Object params = context.getMergedJobDataMap().get(QuartzConst.QUARTZ_PARAMS_KEY); - JobKey jobKey = jobDetail.getKey(); - - Long taskId = SmartQuartzUtil.getTaskIdByJobKey(jobKey); - QuartzTaskService quartzTaskService = (QuartzTaskService) SmartApplicationContext.getBean("quartzTaskService"); - QuartzTaskEntity quartzTaskEntity = quartzTaskService.getByTaskId(taskId); - - QuartzTaskLogService quartzTaskLogService = (QuartzTaskLogService) SmartApplicationContext.getBean("quartzTaskLogService"); - - QuartzTaskLogEntity taskLogEntity = new QuartzTaskLogEntity(); - taskLogEntity.setTaskId(taskId); - taskLogEntity.setIpAddress(SmartIPUtil.getLocalHostIP()); - try { - taskLogEntity.setTaskName(quartzTaskEntity.getTaskName()); - } catch (Exception e) { - e.printStackTrace(); - } - String paramsStr = null; - if (params != null) { - paramsStr = params.toString(); - taskLogEntity.setTaskParams(paramsStr); - } - taskLogEntity.setUpdateTime(new Date()); - taskLogEntity.setCreateTime(new Date()); - //任务开始时间 - long startTime = System.currentTimeMillis(); - try { - ITask taskClass = (ITask) SmartApplicationContext.getBean(quartzTaskEntity.getTaskBean()); - taskClass.execute(paramsStr); - taskLogEntity.setProcessStatus(TaskResultEnum.SUCCESS.getStatus()); - } catch (Exception e) { - log.error("", e); - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw, true); - e.printStackTrace(pw); - pw.flush(); - sw.flush(); - taskLogEntity.setProcessStatus(TaskResultEnum.FAIL.getStatus()); - taskLogEntity.setProcessLog(sw.toString()); - } finally { - long times = System.currentTimeMillis() - startTime; - taskLogEntity.setProcessDuration(times); - quartzTaskLogService.save(taskLogEntity); - } - - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/service/QuartzTaskLogService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/service/QuartzTaskLogService.java deleted file mode 100644 index e54c483c..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/service/QuartzTaskLogService.java +++ /dev/null @@ -1,28 +0,0 @@ -package net.lab1024.smartadmin.module.support.quartz.service; - -import net.lab1024.smartadmin.module.support.quartz.dao.QuartzTaskLogDao; -import net.lab1024.smartadmin.module.support.quartz.domain.entity.QuartzTaskLogEntity; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/13 0013 下午 14:50 - * @since JDK1.8 - */ -@Service -public class QuartzTaskLogService { - - @Autowired - private QuartzTaskLogDao quartzTaskLogDao; - - - public void save(QuartzTaskLogEntity logEntity){ - quartzTaskLogDao.insert(logEntity); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/service/QuartzTaskService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/service/QuartzTaskService.java deleted file mode 100644 index 9f88132a..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/service/QuartzTaskService.java +++ /dev/null @@ -1,349 +0,0 @@ -package net.lab1024.smartadmin.module.support.quartz.service; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import net.lab1024.smartadmin.common.constant.ResponseCodeConst; -import net.lab1024.smartadmin.common.domain.PageResultDTO; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.module.support.quartz.constant.QuartzConst; -import net.lab1024.smartadmin.module.support.quartz.constant.TaskStatusEnum; -import net.lab1024.smartadmin.module.support.quartz.dao.QuartzTaskDao; -import net.lab1024.smartadmin.module.support.quartz.dao.QuartzTaskLogDao; -import net.lab1024.smartadmin.module.support.quartz.domain.entity.QuartzTaskEntity; -import net.lab1024.smartadmin.third.SmartApplicationContext; -import net.lab1024.smartadmin.util.SmartBeanUtil; -import net.lab1024.smartadmin.util.SmartPageUtil; -import net.lab1024.smartadmin.util.SmartQuartzUtil; -import lombok.extern.slf4j.Slf4j; -import net.lab1024.smartadmin.module.support.quartz.domain.dto.*; -import org.quartz.*; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.time.LocalDateTime; -import java.util.Date; -import java.util.List; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/13 0013 下午 14:50 - * @since JDK1.8 - */ -@Slf4j -@Service -public class QuartzTaskService { - - @Autowired - private QuartzTaskDao quartzTaskDao; - - @Autowired - private QuartzTaskLogDao quartzTaskLogDao; - - @Autowired - private Scheduler scheduler; - - /** - * 查询列表 - * - * @param queryDTO - * @return - */ - public ResponseDTO> query(QuartzQueryDTO queryDTO) { - Page pageParam = SmartPageUtil.convert2QueryPage(queryDTO); - List taskList = quartzTaskDao.queryList(pageParam, queryDTO); - pageParam.setRecords(taskList); - return ResponseDTO.succData(SmartPageUtil.convert2PageResult(pageParam)); - } - - /** - * 查询运行日志 - * - * @param queryDTO - * @return - */ - public ResponseDTO> queryLog(QuartzLogQueryDTO queryDTO) { - Page pageParam = SmartPageUtil.convert2QueryPage(queryDTO); - List taskList = quartzTaskLogDao.queryList(pageParam, queryDTO); - pageParam.setRecords(taskList); - return ResponseDTO.succData(SmartPageUtil.convert2PageResult(pageParam)); - } - - /** - * 保存或更新 - * - * @param quartzTaskDTO - * @return - * @throws Exception - */ - @Transactional(rollbackFor = Throwable.class) - public ResponseDTO saveOrUpdateTask(QuartzTaskDTO quartzTaskDTO) throws Exception { - ResponseDTO baseValid = this.baseValid(quartzTaskDTO); - if (!baseValid.isSuccess()) { - return baseValid; - } - Long taskId = quartzTaskDTO.getId(); - if (taskId == null) { - return this.saveTask(quartzTaskDTO); - } else { - return this.updateTask(quartzTaskDTO); - } - } - - private ResponseDTO baseValid(QuartzTaskDTO quartzTaskDTO) { - Object taskBean = null; - try { - taskBean = SmartApplicationContext.getBean(quartzTaskDTO.getTaskBean()); - } catch (Exception e) { - log.error("taskBean 不存在{}", e); - } - if (taskBean == null) { - return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM, "taskBean 不存在"); - } - if (!CronExpression.isValidExpression(quartzTaskDTO.getTaskCron())) { - return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM, "请传入正确的正则表达式"); - } - return ResponseDTO.succ(); - } - - private ResponseDTO saveTask(QuartzTaskDTO quartzTaskDTO) throws Exception { - QuartzTaskEntity taskEntity = SmartBeanUtil.copy(quartzTaskDTO, QuartzTaskEntity.class); - taskEntity.setTaskStatus(TaskStatusEnum.NORMAL.getStatus()); - taskEntity.setUpdateTime(new Date()); - taskEntity.setCreateTime(new Date()); - quartzTaskDao.insert(taskEntity); - this.createQuartzTask(scheduler, taskEntity); - return ResponseDTO.succ(); - } - - private ResponseDTO updateTask(QuartzTaskDTO quartzTaskDTO) throws Exception { - QuartzTaskEntity updateEntity = quartzTaskDao.selectById(quartzTaskDTO.getId()); - if (updateEntity == null) { - return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM, "task不存在"); - } - QuartzTaskEntity taskEntity = SmartBeanUtil.copy(quartzTaskDTO, QuartzTaskEntity.class); - //任务状态不能更新 - taskEntity.setTaskStatus(updateEntity.getTaskStatus()); - taskEntity.setUpdateTime(new Date()); - quartzTaskDao.updateById(taskEntity); - if(this.checkExist(taskEntity.getId())){ - this.updateQuartzTask(scheduler, taskEntity); - }else{ - this.createQuartzTask(scheduler,taskEntity); - } - - return ResponseDTO.succ(); - } - - /** - * 立即运行 - * - * @param taskId - * @return - * @throws Exception - */ - public ResponseDTO runTask(Long taskId) throws Exception { - QuartzTaskEntity quartzTaskEntity = quartzTaskDao.selectById(taskId); - if (quartzTaskEntity == null) { - return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM, "task不存在"); - } - this.runQuartzTask(scheduler, quartzTaskEntity); - return ResponseDTO.succ(); - } - - /** - * 暂停运行 - * - * @param taskId - * @return - * @throws Exception - */ - @Transactional(rollbackFor = Throwable.class) - public ResponseDTO pauseTask(Long taskId) throws Exception { - QuartzTaskEntity quartzTaskEntity = quartzTaskDao.selectById(taskId); - if (quartzTaskEntity == null) { - return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM, "task不存在"); - } - quartzTaskEntity.setTaskStatus(TaskStatusEnum.PAUSE.getStatus()); - quartzTaskDao.updateById(quartzTaskEntity); - this.pauseQuartzTask(scheduler, quartzTaskEntity); - return ResponseDTO.succ(); - } - - /** - * 恢复任务 - * - * @param taskId - * @return - * @throws Exception - */ - @Transactional(rollbackFor = Throwable.class) - public ResponseDTO resumeTask(Long taskId) throws Exception { - QuartzTaskEntity quartzTaskEntity = quartzTaskDao.selectById(taskId); - if (quartzTaskEntity == null) { - return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM, "task不存在"); - } - quartzTaskEntity.setTaskStatus(TaskStatusEnum.NORMAL.getStatus()); - quartzTaskDao.updateById(quartzTaskEntity); - this.resumeQuartzTask(scheduler, quartzTaskEntity); - return ResponseDTO.succ(); - } - - /** - * 删除任务 - * - * @param taskId - * @return - * @throws Exception - */ - public ResponseDTO deleteTask(Long taskId) throws Exception { - QuartzTaskEntity quartzTaskEntity = quartzTaskDao.selectById(taskId); - if (quartzTaskEntity == null) { - return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM, "task不存在"); - } - quartzTaskDao.deleteById(taskId); - this.deleteQuartzTask(scheduler, taskId); - return ResponseDTO.succ(); - } - - /** - * 通过任务Id 获取任务实体 - * - * @param taskId - * @return - */ - public QuartzTaskEntity getByTaskId(Long taskId) { - return quartzTaskDao.selectById(taskId); - } - - /** - * 创建任务 - * - * @param scheduler - * @param taskEntity - * @throws Exception - */ - public void createQuartzTask(Scheduler scheduler, QuartzTaskEntity taskEntity) throws Exception { - JobKey jobKey = SmartQuartzUtil.getJobKey(taskEntity.getId()); - JobDetail jobDetail = JobBuilder.newJob(QuartzTask.class).withIdentity(jobKey).build(); - - CronScheduleBuilder scheduleBuilder = CronScheduleBuilder.cronSchedule(taskEntity.getTaskCron()).withMisfireHandlingInstructionDoNothing(); - - TriggerKey triggerKey = SmartQuartzUtil.getTriggerKey(Long.valueOf(taskEntity.getId())); - CronTrigger trigger = TriggerBuilder.newTrigger().withIdentity(triggerKey).withSchedule(scheduleBuilder).build(); - - jobDetail.getJobDataMap().put(QuartzConst.QUARTZ_PARAMS_KEY, taskEntity.getTaskParams()); - scheduler.scheduleJob(jobDetail, trigger); - //如果任务是暂停状态,则暂停任务 - if (TaskStatusEnum.PAUSE.getStatus().equals(taskEntity.getTaskStatus())) { - this.pauseQuartzTask(scheduler, taskEntity); - } - } - - /** - * 更新任务 - * - * @param scheduler - * @param taskEntity - * @throws Exception - */ - private void updateQuartzTask(Scheduler scheduler, QuartzTaskEntity taskEntity) throws Exception { - TriggerKey triggerKey = SmartQuartzUtil.getTriggerKey(Long.valueOf(taskEntity.getId())); - - CronScheduleBuilder scheduleBuilder = CronScheduleBuilder.cronSchedule(taskEntity.getTaskCron()).withMisfireHandlingInstructionDoNothing(); - - CronTrigger trigger = this.getCronTrigger(scheduler, Long.valueOf(taskEntity.getId())); - - trigger = trigger.getTriggerBuilder().withIdentity(triggerKey).withSchedule(scheduleBuilder).build(); - - trigger.getJobDataMap().put(QuartzConst.QUARTZ_PARAMS_KEY, taskEntity.getTaskParams()); - - scheduler.rescheduleJob(triggerKey, trigger); - //如果更新之前任务是暂停状态,此时再次暂停任务 - if (TaskStatusEnum.PAUSE.getStatus().equals(taskEntity.getTaskStatus())) { - this.pauseQuartzTask(scheduler, taskEntity); - } - } - - private CronTrigger getCronTrigger(Scheduler scheduler, Long taskId) throws Exception { - TriggerKey triggerKey = SmartQuartzUtil.getTriggerKey(taskId); - return (CronTrigger) scheduler.getTrigger(triggerKey); - } - - /** - * 立即运行 - * - * @param scheduler - * @param taskEntity - * @throws Exception - */ - private void runQuartzTask(Scheduler scheduler, QuartzTaskEntity taskEntity) throws Exception { - JobDataMap dataMap = new JobDataMap(); - dataMap.put(QuartzConst.QUARTZ_PARAMS_KEY, taskEntity.getTaskParams()); - JobKey jobKey = SmartQuartzUtil.getJobKey(taskEntity.getId()); - if(!scheduler.checkExists(jobKey)){ - this.createQuartzTask(scheduler,taskEntity); - scheduler.triggerJob(jobKey, dataMap); - return; - } - scheduler.triggerJob(jobKey, dataMap); - } - - /** - * 暂停任务 - * - * @param scheduler - * @param quartzTaskEntity - * @throws Exception - */ - private void pauseQuartzTask(Scheduler scheduler, QuartzTaskEntity quartzTaskEntity) throws Exception { - JobKey jobKey = SmartQuartzUtil.getJobKey(quartzTaskEntity.getId()); - if(!scheduler.checkExists(jobKey)){ - this.createQuartzTask(scheduler,quartzTaskEntity); - scheduler.pauseJob(jobKey); - return; - } - scheduler.pauseJob(jobKey); - } - - /** - * 恢复任务 - * - * @param scheduler - * @param quartzTaskEntity - * @throws Exception - */ - private void resumeQuartzTask(Scheduler scheduler, QuartzTaskEntity quartzTaskEntity) throws Exception { - JobKey jobKey = SmartQuartzUtil.getJobKey(quartzTaskEntity.getId()); - if(!scheduler.checkExists(jobKey)){ - this.createQuartzTask(scheduler,quartzTaskEntity); - return; - } - scheduler.resumeJob(jobKey); - } - - /** - * 删除任务 - * - * @param scheduler - * @param taskId - * @throws Exception - */ - private void deleteQuartzTask(Scheduler scheduler, Long taskId) throws Exception { - JobKey jobKey = SmartQuartzUtil.getJobKey(taskId); - if(!scheduler.checkExists(jobKey)){ - return; - } - scheduler.deleteJob(jobKey); - } - - - private Boolean checkExist(Long taskId) throws Exception{ - JobKey jobKey = SmartQuartzUtil.getJobKey(taskId); - return scheduler.checkExists(jobKey); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/task/test/Example.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/task/test/Example.java deleted file mode 100644 index f62d22b5..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/quartz/task/test/Example.java +++ /dev/null @@ -1,28 +0,0 @@ -package net.lab1024.smartadmin.module.support.quartz.task.test; - -import lombok.extern.slf4j.Slf4j; -import net.lab1024.smartadmin.common.domain.ITask; -import net.lab1024.smartadmin.util.SmartDateUtil; -import org.springframework.stereotype.Component; - -import java.util.Date; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/13 0013 下午 14:26 - * @since JDK1.8 - */ -@Slf4j -@Component("exampleTask") -public class Example implements ITask { - - @Override - public void execute(String paramJson) throws Exception { - log.warn("{}-今天搬了{}块砖,paramJson:{}",SmartDateUtil.formatYMDHMS(new Date()),System.currentTimeMillis(),paramJson ); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/SmartReloadCommand.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/SmartReloadCommand.java deleted file mode 100644 index 2535efdd..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/SmartReloadCommand.java +++ /dev/null @@ -1,52 +0,0 @@ -package net.lab1024.smartadmin.module.support.smartreload; - -import net.lab1024.smartadmin.common.reload.abstracts.AbstractSmartReloadCommand4Spring; -import net.lab1024.smartadmin.common.reload.domain.entity.ReloadItem; -import net.lab1024.smartadmin.common.reload.domain.entity.SmartReloadResult; -import net.lab1024.smartadmin.module.support.smartreload.dao.ReloadItemDao; -import net.lab1024.smartadmin.module.support.smartreload.dao.ReloadResultDao; -import net.lab1024.smartadmin.module.support.smartreload.domain.entity.ReloadItemEntity; -import net.lab1024.smartadmin.module.support.smartreload.domain.entity.ReloadResultEntity; -import net.lab1024.smartadmin.util.SmartBeanUtil; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -import java.util.List; - -/** - * Smart Reload 业务 - * - * @author listen - * @date 2018/02/10 09:18 - */ -@Component -public class SmartReloadCommand extends AbstractSmartReloadCommand4Spring { - - @Autowired - private ReloadItemDao reloadItemDao; - - @Autowired - private ReloadResultDao reloadResultDao; - - /** - * 读取数据库中SmartReload项 - * - * @return List - */ - @Override - public List readReloadItem() { - List reloadItemEntityList = reloadItemDao.selectList(null); - return SmartBeanUtil.copyList(reloadItemEntityList, ReloadItem.class); - } - - /** - * 保存reload结果 - * - * @param smartReloadResult - */ - @Override - public void handleReloadResult(SmartReloadResult smartReloadResult) { - ReloadResultEntity reloadResultEntity = SmartBeanUtil.copy(smartReloadResult, ReloadResultEntity.class); - reloadResultDao.insert(reloadResultEntity); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/SmartReloadController.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/SmartReloadController.java deleted file mode 100644 index 2d6e9560..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/SmartReloadController.java +++ /dev/null @@ -1,52 +0,0 @@ -package net.lab1024.smartadmin.module.support.smartreload; - -import net.lab1024.smartadmin.common.anno.NoValidPrivilege; -import net.lab1024.smartadmin.common.anno.OperateLog; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.constant.SwaggerTagConst; -import net.lab1024.smartadmin.module.support.smartreload.domain.dto.ReloadItemUpdateDTO; -import net.lab1024.smartadmin.module.support.smartreload.domain.dto.ReloadItemVO; -import net.lab1024.smartadmin.module.support.smartreload.domain.dto.ReloadResultVO; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.validation.Valid; -import java.util.List; - -/** - * Smart Reload 路由 - * - * @author listen - * @date 2018/02/10 09:18 - */ -@Api(tags = {SwaggerTagConst.Admin.MANAGER_SMART_RELOAD}) -@OperateLog -@RestController -public class SmartReloadController { - - @Autowired - private SmartReloadService smartReloadService; - - @ApiOperation(value = "获取全部Smart-reload项", notes = "获取全部Smart-reload项") - @GetMapping("/smartReload/all") - @NoValidPrivilege - public ResponseDTO> listAllReloadItem() { - return smartReloadService.listAllReloadItem(); - } - - @ApiOperation(value = "获取reload result", notes = "获取reload result") - @GetMapping("/smartReload/result/{tag}") - @NoValidPrivilege - public ResponseDTO> queryReloadResult(@PathVariable("tag") String tag) { - return smartReloadService.listReloadItemResult(tag); - } - - @ApiOperation("通过tag更新标识") - @PostMapping("/smartReload/update") - @NoValidPrivilege - public ResponseDTO updateByTag(@RequestBody @Valid ReloadItemUpdateDTO updateDTO) { - return smartReloadService.updateByTag(updateDTO); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/SmartReloadService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/SmartReloadService.java deleted file mode 100644 index 78778659..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/SmartReloadService.java +++ /dev/null @@ -1,103 +0,0 @@ -package net.lab1024.smartadmin.module.support.smartreload; - -import net.lab1024.smartadmin.common.constant.ResponseCodeConst; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.common.reload.SmartReloadManager; -import net.lab1024.smartadmin.module.support.smartreload.dao.ReloadItemDao; -import net.lab1024.smartadmin.module.support.smartreload.dao.ReloadResultDao; -import net.lab1024.smartadmin.module.support.smartreload.domain.dto.ReloadItemUpdateDTO; -import net.lab1024.smartadmin.module.support.smartreload.domain.dto.ReloadItemVO; -import net.lab1024.smartadmin.module.support.smartreload.domain.dto.ReloadResultVO; -import net.lab1024.smartadmin.module.support.smartreload.domain.entity.ReloadItemEntity; -import net.lab1024.smartadmin.module.support.smartreload.domain.entity.ReloadResultEntity; -import net.lab1024.smartadmin.util.SmartBeanUtil; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Service; - -import javax.annotation.PostConstruct; -import java.sql.Timestamp; -import java.util.List; -import java.util.concurrent.TimeUnit; - -/** - * Smart initDefines 业务 - * - * @author listen - * @date 2018/02/10 13:49 - */ -@Service -public class SmartReloadService { - - @Autowired - private SmartReloadManager smartReloadManager; - - @Autowired - private SmartReloadCommand smartReloadCommand; - - @Autowired - private ReloadItemDao reloadItemDao; - - @Autowired - private ReloadResultDao reloadResultDao; - - @Value("${smart-reload.time-interval}") - private Long timeInterval; - - @PostConstruct - public void init() { - smartReloadManager.addCommand(smartReloadCommand, 10, timeInterval, TimeUnit.SECONDS); - } - - /** - * 注册到SmartReload里 - */ - public void register(Object reload) { - smartReloadManager.register(reload); - } - - /** - * 获取所有 initDefines 项 - * - * @return - */ - public ResponseDTO> listAllReloadItem() { - List reloadItemEntityList = reloadItemDao.selectList(null); - List reloadItemDTOList = SmartBeanUtil.copyList(reloadItemEntityList, ReloadItemVO.class); - return ResponseDTO.succData(reloadItemDTOList); - } - - /** - * 根据 tag - * 获取所有 initDefines 运行结果 - * - * @return ResponseDTO - */ - public ResponseDTO> listReloadItemResult(String tag) { - ReloadResultEntity query = new ReloadResultEntity(); - query.setTag(tag); - List reloadResultEntityList = reloadResultDao.query(tag); - List reloadResultDTOList = SmartBeanUtil.copyList(reloadResultEntityList, ReloadResultVO.class); - return ResponseDTO.succData(reloadResultDTOList); - } - - /** - * 通过标签更新标识符 - * - * @param updateDTO - * @return - */ - public ResponseDTO updateByTag(ReloadItemUpdateDTO updateDTO) { - ReloadItemEntity entity = new ReloadItemEntity(); - entity.setTag(updateDTO.getTag()); - ReloadItemEntity reloadItemEntity = reloadItemDao.selectById(entity.getTag()); - if (null == reloadItemEntity) { - return ResponseDTO.wrap(ResponseCodeConst.NOT_EXISTS); - } - reloadItemEntity.setIdentification(updateDTO.getIdentification()); - reloadItemEntity.setUpdateTime(new Timestamp(System.currentTimeMillis())); - reloadItemEntity.setArgs(updateDTO.getArgs()); - reloadItemDao.updateById(reloadItemEntity); - return ResponseDTO.succ(); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/dao/ReloadItemDao.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/dao/ReloadItemDao.java deleted file mode 100644 index c497ebbc..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/dao/ReloadItemDao.java +++ /dev/null @@ -1,15 +0,0 @@ -package net.lab1024.smartadmin.module.support.smartreload.dao; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import net.lab1024.smartadmin.module.support.smartreload.domain.entity.ReloadItemEntity; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Component; - -/** - * t_reload_item 数据表dao - * - * @author listen - * @date 2018/02/10 09:23 - */ -@Component -@Mapper -public interface ReloadItemDao extends BaseMapper {} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/dao/ReloadResultDao.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/dao/ReloadResultDao.java deleted file mode 100644 index dc4d2d69..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/dao/ReloadResultDao.java +++ /dev/null @@ -1,23 +0,0 @@ -package net.lab1024.smartadmin.module.support.smartreload.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import net.lab1024.smartadmin.module.support.smartreload.domain.entity.ReloadResultEntity; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Component; - -import java.util.List; - -/** - * t_reload_result 数据表dao - * - * @author listen - * @date 2018/02/10 09:23 - */ -@Component -@Mapper -public interface ReloadResultDao extends BaseMapper { - - - List query(@Param("tag") String tag); -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/domain/dto/ReloadItemUpdateDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/domain/dto/ReloadItemUpdateDTO.java deleted file mode 100644 index 20ad98f5..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/domain/dto/ReloadItemUpdateDTO.java +++ /dev/null @@ -1,29 +0,0 @@ -package net.lab1024.smartadmin.module.support.smartreload.domain.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotBlank; -/** - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 - */ -@Data -public class ReloadItemUpdateDTO { - - @ApiModelProperty("标签") - @NotBlank(message = "标签不能为空") - private String tag; - - @ApiModelProperty("状态标识") - @NotBlank(message = "状态标识不能为空") - private String identification; - - @ApiModelProperty("reload时传入的参数,可以为空") - private String args; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/domain/dto/ReloadItemVO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/domain/dto/ReloadItemVO.java deleted file mode 100644 index 8f462297..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/domain/dto/ReloadItemVO.java +++ /dev/null @@ -1,46 +0,0 @@ -package net.lab1024.smartadmin.module.support.smartreload.domain.dto; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.Date; - -/** - * initDefines 项 DTO 类 - * - * @author listen - * @date 2018/02/10 09:29 - */ -@Data -public class ReloadItemVO { - - /** - * 加载项标签 - */ - @ApiModelProperty("加载项标签") - private String tag; - - /** - * 参数 - */ - @ApiModelProperty("参数") - private String args; - - /** - * 状态标识 - */ - @ApiModelProperty("状态标识") - private String identification; - - /** - * 更新时间 - */ - @ApiModelProperty("最后更新时间") - private Date updateTime; - - /** - * 创建时间 - */ - @ApiModelProperty("创建时间") - private Date createTime; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/domain/dto/ReloadResultVO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/domain/dto/ReloadResultVO.java deleted file mode 100644 index 56b388a3..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/domain/dto/ReloadResultVO.java +++ /dev/null @@ -1,45 +0,0 @@ -package net.lab1024.smartadmin.module.support.smartreload.domain.dto; -import lombok.Data; - -import java.util.Date; - -/** - * reload_result DTO 类 - * - * @author listen - * @date 2018/02/10 09:29 - */ -@Data -public class ReloadResultVO { - - /** - * 加载项标签 - */ - private String tag; - - /** - * 参数 - */ - private String args; - - /** - * 状态标识 - */ - private String identification; - - /** - * 运行结果 - */ - private Boolean result; - - /** - * 异常 - */ - private String exception; - - /** - * 创建时间 - */ - private Date createTime; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/domain/entity/ReloadItemEntity.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/domain/entity/ReloadItemEntity.java deleted file mode 100644 index cbd264c1..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/domain/entity/ReloadItemEntity.java +++ /dev/null @@ -1,46 +0,0 @@ -package net.lab1024.smartadmin.module.support.smartreload.domain.entity; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; - -import java.util.Date; - -/** - * t_reload_item 数据表 实体类 - * - * @author listen - * @date 2018/02/10 09:29 - */ -@Data -@TableName("t_reload_item") -public class ReloadItemEntity { - - /** - * 加载项标签 - */ - @TableId(type = IdType.INPUT) - private String tag; - - /** - * 参数 - */ - private String args; - - /** - * 运行标识 - */ - private String identification; - - /** - * 更新时间 - */ - private Date updateTime; - - /** - * 创建时间 - */ - private Date createTime; - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/domain/entity/ReloadResultEntity.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/domain/entity/ReloadResultEntity.java deleted file mode 100644 index bb79c21e..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/smartreload/domain/entity/ReloadResultEntity.java +++ /dev/null @@ -1,48 +0,0 @@ -package net.lab1024.smartadmin.module.support.smartreload.domain.entity; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; - -import java.util.Date; - -/** - * t_reload_result 数据表 实体类 - * - * @author listen - * @date 2018/02/10 09:29 - */ -@Data -@TableName("t_reload_result") -public class ReloadResultEntity { - - /** - * 加载项标签 - */ - private String tag; - - /** - * 运行标识 - */ - private String identification; - - /** - * 参数 - */ - private String args; - - /** - * 运行结果 - */ - private Boolean result; - - /** - * 异常 - */ - private String exception; - - /** - * 创建时间 - */ - private Date createTime; - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/websocket/MessageTypeEnum.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/websocket/MessageTypeEnum.java deleted file mode 100644 index eda10334..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/websocket/MessageTypeEnum.java +++ /dev/null @@ -1,44 +0,0 @@ -package net.lab1024.smartadmin.module.support.websocket; - -import net.lab1024.smartadmin.common.domain.BaseEnum; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/7/10 0010 下午 19:11 - * @since JDK1.8 - */ -public enum MessageTypeEnum implements BaseEnum{ - - SYS_NOTICE(1,"系统通知"), - - PRIVATE_LETTER(2,"私信"), - - HEART_BEAT(3,"心跳"); - - - private Integer value; - - private String desc; - - - MessageTypeEnum(Integer value,String desc){ - this.value = value; - this.desc = desc; - } - - - @Override - public Integer getValue() { - return this.value; - } - - @Override - public String getDesc() { - return this.desc; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/websocket/WebSocketServer.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/websocket/WebSocketServer.java deleted file mode 100644 index a26489c8..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/websocket/WebSocketServer.java +++ /dev/null @@ -1,199 +0,0 @@ -package net.lab1024.smartadmin.module.support.websocket; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.TypeReference; -import net.lab1024.smartadmin.module.support.websocket.domain.MessageCommonDTO; -import net.lab1024.smartadmin.module.support.websocket.domain.MessageDTO; -import net.lab1024.smartadmin.module.support.websocket.domain.WebSocketHeartBeatDTO; -import com.google.common.collect.Lists; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.stereotype.Component; - -import javax.websocket.*; -import javax.websocket.server.PathParam; -import javax.websocket.server.ServerEndpoint; -import java.io.IOException; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.concurrent.ConcurrentHashMap; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/7/10 0010 下午 16:09 - * @since JDK1.8 - */ -@Slf4j -@ServerEndpoint("/webSocket/{employeeId}") -@Component -public class WebSocketServer { - - /** - * 当前在线用户 employee,expireTime - */ - private static ConcurrentHashMap onLineUser = new ConcurrentHashMap<>(); - - /** - * 当前在线用户所对应的 socket session信息 - */ - private static ConcurrentHashMap webSocketSession = new ConcurrentHashMap<>(); - - @OnOpen - public void onOpen(Session session, @PathParam("employeeId") Long employeeId) { - if (employeeId == null) { - return; - } - webSocketSession.put(employeeId, session); - log.info("连接打开"); - } - - /** - * 不做处理如果 前台可以监听到浏览器关闭 此处处理在线人数也可 - * - * @param session - */ - @OnClose - public void onClose(Session session) { - - log.info("连接关闭"); - } - - @OnError - public void onError(Session session, Throwable error) { - log.error("socket error,{}", error); - error.printStackTrace(); - } - - /** - * 此方法接收 前台信息 - * - * @param message - * @param session - */ - @OnMessage - public void onMessage(String message, Session session) { - if (StringUtils.isEmpty(message)) { - return; - } - MessageCommonDTO messageCommonDTO = JSON.parseObject(message, new TypeReference() {}); - if (MessageTypeEnum.HEART_BEAT.getValue().equals(messageCommonDTO.getMessageType())) { - this.heartBeatHandle(messageCommonDTO.getJsonStr()); - } - } - - /** - * 更新用户过期时间 - * - * @param json - */ - private void heartBeatHandle(String json) { - Long currentDate = System.currentTimeMillis(); - Long expireTime = currentDate + 5 * 1000; - WebSocketHeartBeatDTO heartBeatDTO = JSON.parseObject(json, new TypeReference() {}); - Long employeeId = heartBeatDTO.getEmployeeId(); - onLineUser.put(employeeId, expireTime); - } - - /** - * 移除过期用户,如果用户超过5s未获取到心跳列表则清除在线用户信息 - */ - @Scheduled(cron = "0/5 * * * * ?") - private void removeOnLineUser() { - Long currentDate = System.currentTimeMillis(); - Iterator> it = onLineUser.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry entry = it.next(); - Long key = entry.getKey(); - Long value = entry.getValue(); - Long userExpireTime = value + 5 * 1000; - if (currentDate > userExpireTime) { - onLineUser.remove(key); - webSocketSession.remove(key); - } - } - } - - /** - * 此方法用户后台发送消息 - * - * @param messageDTO - */ - public static void sendMessage(MessageDTO messageDTO) { - //系统通知 - if (MessageTypeEnum.SYS_NOTICE.getValue().equals(messageDTO.getMessageType())) { - sendAllOnLineUser(messageDTO.getMessage(), messageDTO.getFromUserId()); - } - //站内信 - if (MessageTypeEnum.PRIVATE_LETTER.getValue().equals(messageDTO.getMessageType())) { - sendOneOnLineUser(messageDTO.getMessage(), messageDTO.getToUserId()); - } - } - - /** - * 通知所有在线用户 - * - * @param message - */ - public static void sendAllOnLineUser(String message, Long fromUserId) { - for (Entry entry : webSocketSession.entrySet()) { - Session session = entry.getValue(); - Long userId = entry.getKey(); - try { - //不想消息创建人推送消息 - if (! userId.equals(fromUserId)) { - session.getBasicRemote().sendText(message); - } - } catch (IOException e) { - log.error("推送消息到{},发送错误{}", userId, e); - log.error("", e); - } - - } - } - - /** - * 通知某人 - * - * @param message - * @param toUserId - */ - public static void sendOneOnLineUser(String message, Long toUserId) { - Session session = webSocketSession.get(toUserId); - if (session == null) { - log.error("推送消息到{},用户不在线", toUserId); - } - try { - session.getBasicRemote().sendText(message); - } catch (IOException e) { - log.error("推送消息到{},发送错误{}", toUserId, e); - log.error("", e); - } - } - - /** - * 获取所有在线用户id - * - * @return - */ - public static List getOnLineUserList() { - return Lists.newArrayList(onLineUser.keySet()); - } - - /** - * 获取当前在线用户数 - * - * @return - */ - public static Integer getOnLineUserCount() { - return onLineUser.entrySet().size(); - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/websocket/domain/MessageCommonDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/websocket/domain/MessageCommonDTO.java deleted file mode 100644 index 43828b38..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/websocket/domain/MessageCommonDTO.java +++ /dev/null @@ -1,29 +0,0 @@ -package net.lab1024.smartadmin.module.support.websocket.domain; - -import net.lab1024.smartadmin.module.support.websocket.MessageTypeEnum; -import lombok.Data; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/7/13 0013 下午 14:37 - * @since JDK1.8 - */ -@Data -public class MessageCommonDTO { - /** - * 消息类型 {@link MessageTypeEnum} - */ - private Integer messageType; - - /** - * 具体消息内容 - */ - private String jsonStr; - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/websocket/domain/MessageDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/websocket/domain/MessageDTO.java deleted file mode 100644 index 23fc615f..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/websocket/domain/MessageDTO.java +++ /dev/null @@ -1,41 +0,0 @@ -package net.lab1024.smartadmin.module.support.websocket.domain; - -import net.lab1024.smartadmin.module.support.websocket.MessageTypeEnum; -import lombok.Builder; -import lombok.Data; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/7/10 0010 下午 18:50 - * @since JDK1.8 - */ -@Data -@Builder -public class MessageDTO { - - /** - * 消息类型 {@link MessageTypeEnum} - */ - private Integer messageType; - - /** - * 消息体 - */ - private String message; - - /** - * 发送者 - */ - private Long fromUserId; - - /** - * 接收者,系统通知可为null - */ - private Long toUserId; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/websocket/domain/WebSocketHeartBeatDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/websocket/domain/WebSocketHeartBeatDTO.java deleted file mode 100644 index 90f8c78f..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/support/websocket/domain/WebSocketHeartBeatDTO.java +++ /dev/null @@ -1,23 +0,0 @@ -package net.lab1024.smartadmin.module.support.websocket.domain; - -import lombok.Data; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/7/13 0013 下午 14:39 - * @since JDK1.8 - */ -@Data -public class WebSocketHeartBeatDTO { - - /** - * 当前登录人id - */ - private Long employeeId; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/constant/DataScopeViewTypeEnum.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/constant/DataScopeViewTypeEnum.java deleted file mode 100644 index 75ddf0c9..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/constant/DataScopeViewTypeEnum.java +++ /dev/null @@ -1,54 +0,0 @@ -package net.lab1024.smartadmin.module.system.datascope.constant; - - -import net.lab1024.smartadmin.common.domain.BaseEnum; - -import java.util.Arrays; -import java.util.Optional; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/28 0028 下午 15:37 - * @since JDK1.8 - */ -public enum DataScopeViewTypeEnum implements BaseEnum { - - ME(0,0,"本人"), - - DEPARTMENT(1,5,"本部门"), - - DEPARTMENT_AND_SUB(2,10,"本部门及下属子部门"), - - ALL(3,15,"全部"); - - private Integer value; - private Integer level; - private String desc; - - DataScopeViewTypeEnum(Integer value,Integer level, String desc) { - this.value = value; - this.level = level; - this.desc = desc; - } - - @Override - public Integer getValue() { - return value; - } - - public Integer getLevel() { - return level; - } - - @Override - public String getDesc() { - return desc; - } - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/domain/entity/DataScopeRoleEntity.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/domain/entity/DataScopeRoleEntity.java deleted file mode 100644 index 016f05bf..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/domain/entity/DataScopeRoleEntity.java +++ /dev/null @@ -1,33 +0,0 @@ -package net.lab1024.smartadmin.module.system.datascope.domain.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import net.lab1024.smartadmin.common.domain.BaseEntity; -import lombok.Data; - -/** - * [ 数据范围与角色关系 ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/27 0027 下午 14:43 - * @since JDK1.8 - */ -@Data -@TableName("t_role_data_scope") -public class DataScopeRoleEntity extends BaseEntity { - - /** - * 数据范围id - */ - private Integer dataScopeType; - /** - * 数据范围类型 - */ - private Integer viewType; - /** - * 角色id - */ - private Long roleId; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/strategy/DataScopePowerStrategy.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/strategy/DataScopePowerStrategy.java deleted file mode 100644 index d12cbf15..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/datascope/strategy/DataScopePowerStrategy.java +++ /dev/null @@ -1,24 +0,0 @@ -package net.lab1024.smartadmin.module.system.datascope.strategy; -import net.lab1024.smartadmin.module.system.datascope.constant.DataScopeViewTypeEnum; -import net.lab1024.smartadmin.module.system.datascope.domain.dto.DataScopeSqlConfigDTO; - -/** - * [ 数据范围策略 ,使用DataScopeWhereInTypeEnum.CUSTOM_STRATEGY类型,DataScope注解的joinSql属性无用] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2020/11/28 0008 下午 16:00 - * @since JDK1.8 - */ -public abstract class DataScopePowerStrategy { - - /** - * 获取joinsql 字符串 - * @param viewTypeEnum 查看的类型 - * @param sqlConfigDTO - * @return - */ - public abstract String getCondition(DataScopeViewTypeEnum viewTypeEnum, DataScopeSqlConfigDTO sqlConfigDTO); -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/DepartmentController.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/DepartmentController.java deleted file mode 100644 index 1a070773..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/DepartmentController.java +++ /dev/null @@ -1,99 +0,0 @@ -package net.lab1024.smartadmin.module.system.department; - -import net.lab1024.smartadmin.common.anno.OperateLog; -import net.lab1024.smartadmin.constant.SwaggerTagConst; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.module.system.department.domain.dto.DepartmentCreateDTO; -import net.lab1024.smartadmin.module.system.department.domain.dto.DepartmentUpdateDTO; -import net.lab1024.smartadmin.module.system.department.domain.dto.DepartmentVO; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.validation.Valid; -import java.util.List; - -/** - * 部门管理路由器 - * - * @author listen - * @date 2017/12/19 14:29 - */ -@Api(tags = {SwaggerTagConst.Admin.MANAGER_DEPARTMENT}) -@OperateLog -@RestController -public class DepartmentController { - - @Autowired - private DepartmentService departmentService; - - @ApiOperation(value = "查询部门树形列表", notes = "查询部门列表") - @GetMapping("/department/list") - public ResponseDTO> listDepartment() { - return departmentService.listDepartment(); - } - - @ApiOperation(value = "查询部门及员工列表", notes = "查询部门及员工列表") - @GetMapping("/department/listEmployee") - public ResponseDTO> listDepartmentEmployee() { - return departmentService.listAllDepartmentEmployee(null); - } - - @ApiOperation(value = "根据部门名称查询部门及员工列表", notes = "根据部门名称查询部门及员工列表") - @GetMapping("/department/listEmployeeByDepartmentName") - public ResponseDTO> listDepartmentEmployee(String departmentName) { - return departmentService.listAllDepartmentEmployee(departmentName); - } - - @ApiOperation(value = "添加部门", notes = "添加部门") - @PostMapping("/department/add") - public ResponseDTO addDepartment(@Valid @RequestBody DepartmentCreateDTO departmentCreateDTO) { - return departmentService.addDepartment(departmentCreateDTO); - } - - @ApiOperation(value = "更新部门信息", notes = "更新部门信息") - @PostMapping("/department/update") - public ResponseDTO updateDepartment(@Valid @RequestBody DepartmentUpdateDTO departmentUpdateDTO) { - return departmentService.updateDepartment(departmentUpdateDTO); - } - - @ApiOperation(value = "删除部门", notes = "删除部门") - @PostMapping("/department/delete/{deptId}") - public ResponseDTO delDepartment(@PathVariable Long deptId) { - return departmentService.delDepartment(deptId); - } - - @ApiOperation(value = "获取部门信息", notes = "获取部门") - @GetMapping("/department/query/{deptId}") - public ResponseDTO getDepartment(@PathVariable Long deptId) { - return departmentService.getDepartmentById(deptId); - } - - @ApiOperation(value = "查询部门列表", notes = "查询部门列表") - @GetMapping("/department/listAll") - public ResponseDTO> listAll() { - return departmentService.listAll(); - } - - - @ApiOperation(value = "上下移动") - @GetMapping("/department/upOrDown/{deptId}/{swapId}") - public ResponseDTO upOrDown(@PathVariable Long deptId, @PathVariable Long swapId) { - return departmentService.upOrDown(deptId, swapId); - } - - @ApiOperation(value = "升级") - @GetMapping("/department/upgrade/{deptId}") - public ResponseDTO upgrade(@PathVariable Long deptId) { - return departmentService.upgrade(deptId); - } - - @ApiOperation(value = "降级") - @GetMapping("/department/downgrade/{deptId}/{preId}") - public ResponseDTO downgrade(@PathVariable Long deptId, @PathVariable Long preId) { - return departmentService.downgrade(deptId, preId); - } - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/DepartmentService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/DepartmentService.java deleted file mode 100644 index b5b99ab0..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/DepartmentService.java +++ /dev/null @@ -1,285 +0,0 @@ -package net.lab1024.smartadmin.module.system.department; - -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.module.system.department.domain.dto.DepartmentCreateDTO; -import net.lab1024.smartadmin.module.system.department.domain.dto.DepartmentUpdateDTO; -import net.lab1024.smartadmin.module.system.department.domain.dto.DepartmentVO; -import net.lab1024.smartadmin.module.system.department.domain.entity.DepartmentEntity; -import net.lab1024.smartadmin.module.system.employee.EmployeeDao; -import net.lab1024.smartadmin.module.system.employee.domain.dto.EmployeeDTO; -import net.lab1024.smartadmin.util.SmartBeanUtil; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.function.Function; -import java.util.stream.Collectors; - -/** - * 部门管理业务类 - * - * @author listen - * @date 2017/12/19 14:25 - */ -@Service -public class DepartmentService { - - @Autowired - private DepartmentDao departmentDao; - - @Autowired - private EmployeeDao employeeDao; - - @Autowired - private DepartmentTreeService departmentTreeService; - - /** - * 获取部门树形结构 - * - * @return - */ - public ResponseDTO> listDepartment() { - List departmentVOList = departmentDao.listAll(); - List result = departmentTreeService.buildTree(departmentVOList); - return ResponseDTO.succData(result); - } - - /** - * 获取所有部门和员工信息 - * - * @param departmentName - * @return - */ - public ResponseDTO> listAllDepartmentEmployee(String departmentName) { - - // 获取全部部门列表 - List departmentVOList = departmentDao.listAll(); - if (StringUtils.isNotBlank(departmentName)) { - // 检索条件不为空的时候 过滤部门列表 - departmentVOList = filterDepartment(departmentVOList, departmentName); - } - - Map departmentMap = departmentVOList.stream().collect(Collectors.toMap(DepartmentVO::getId, Function.identity())); - // 获取全部员工列表 - List employeeList = employeeDao.listAll(); - employeeList.forEach(employeeDTO -> { - - DepartmentVO departmentVO = departmentMap.get(employeeDTO.getDepartmentId()); - if (null == departmentVO) { - return; - } - List employeeDTOList = departmentVO.getEmployees(); - if (null == employeeDTOList) { - employeeDTOList = new ArrayList<>(); - } - employeeDTOList.add(employeeDTO); - departmentVO.setEmployees(employeeDTOList); - }); - List result = departmentTreeService.buildTree(departmentVOList); - return ResponseDTO.succData(result); - } - - /** - * 过滤部门名称,获取过滤后的结果 - * - * @author lidoudou - * @date 2019/4/28 20:17 - */ - private List filterDepartment(List departmentVOList, String departmentName) { - Map departmentMap = new HashMap<>(); - departmentVOList.forEach(item -> { - if (item.getName().indexOf(departmentName) < 0) { - return; - } - // 当前部门包含关键字 - departmentMap.put(item.getId(), item); - Long parentId = item.getParentId(); - if (null != parentId) { - List filterResult = new ArrayList<>(); - getParentDepartment(departmentVOList, parentId, filterResult); - for (DepartmentVO dto : filterResult) { - if (!departmentMap.containsKey(dto.getId())) { - departmentMap.put(dto.getId(), dto); - } - } - } - }); - return departmentMap.values().stream().collect(Collectors.toList()); - } - - private List getParentDepartment(List departmentVOList, Long parentId, List result) { - List deptList = departmentVOList.stream().filter(e -> e.getId().equals(parentId)).collect(Collectors.toList()); - for (DepartmentVO item : deptList) { - result.add(item); - if (item.getParentId() != 0 && item.getParentId() != null) { - result.addAll(getParentDepartment(departmentVOList, item.getParentId(), result)); - } - } - return result; - } - - /** - * 新增添加部门 - * - * @param departmentCreateDTO - * @return AjaxResult - */ - @Transactional(rollbackFor = Exception.class) - public ResponseDTO addDepartment(DepartmentCreateDTO departmentCreateDTO) { - DepartmentEntity departmentEntity = SmartBeanUtil.copy(departmentCreateDTO, DepartmentEntity.class); - departmentEntity.setSort(0L); - departmentDao.insert(departmentEntity); - departmentEntity.setSort(departmentEntity.getId()); - departmentDao.updateById(departmentEntity); - return ResponseDTO.succ(); - } - - /** - * 更新部门信息 - * - * @param updateDTO - * @return AjaxResult - */ - @Transactional(rollbackFor = Exception.class) - public ResponseDTO updateDepartment(DepartmentUpdateDTO updateDTO) { - if (updateDTO.getParentId() == null) { - return ResponseDTO.wrap(DepartmentResponseCodeConst.PARENT_ID_ERROR); - } - DepartmentEntity entity = departmentDao.selectById(updateDTO.getId()); - if (entity == null) { - return ResponseDTO.wrap(DepartmentResponseCodeConst.NOT_EXISTS); - } - DepartmentEntity departmentEntity = SmartBeanUtil.copy(updateDTO, DepartmentEntity.class); - departmentEntity.setSort(entity.getSort()); - departmentDao.updateById(departmentEntity); - return ResponseDTO.succ(); - } - - /** - * 根据id删除部门 - * 1、需要判断当前部门是否有子部门,有子部门则不允许删除 - * 2、需要判断当前部门是否有员工,有员工则不能删除 - * - * @param deptId - * @return - */ - @Transactional(rollbackFor = Exception.class) - public ResponseDTO delDepartment(Long deptId) { - DepartmentEntity departmentEntity = departmentDao.selectById(deptId); - if (null == departmentEntity) { - return ResponseDTO.wrap(DepartmentResponseCodeConst.DEPT_NOT_EXISTS); - } - // 是否有子级部门 - int subDepartmentNum = departmentDao.countSubDepartment(deptId); - if (subDepartmentNum > 0) { - return ResponseDTO.wrap(DepartmentResponseCodeConst.CANNOT_DEL_DEPARTMENT_WITH_CHILD); - } - - // 是否有未删除员工 - int employeeNum = employeeDao.countByDepartmentId(deptId, false); - if (employeeNum > 0) { - return ResponseDTO.wrap(DepartmentResponseCodeConst.CANNOT_DEL_DEPARTMENT_WITH_EMPLOYEE); - } - departmentDao.deleteById(deptId); - return ResponseDTO.succ(); - } - - /** - * 根据id获取部门信息 - * - * @param departmentId - * @return AjaxResult - */ - public ResponseDTO getDepartmentById(Long departmentId) { - DepartmentEntity departmentEntity = departmentDao.selectById(departmentId); - if (departmentEntity == null) { - return ResponseDTO.wrap(DepartmentResponseCodeConst.DEPT_NOT_EXISTS); - } - DepartmentVO departmentVO = SmartBeanUtil.copy(departmentEntity, DepartmentVO.class); - return ResponseDTO.succData(departmentVO); - } - - /** - * 获取所有部门 - * - * @return - */ - public ResponseDTO> listAll() { - List departmentVOList = departmentDao.listAll(); - return ResponseDTO.succData(departmentVOList); - } - - /** - * 上下移动 - * - * @param departmentId - * @param swapId - * @return - */ - @Transactional(rollbackFor = Exception.class) - public ResponseDTO upOrDown(Long departmentId, Long swapId) { - DepartmentEntity departmentEntity = departmentDao.selectById(departmentId); - if (departmentEntity == null) { - return ResponseDTO.wrap(DepartmentResponseCodeConst.NOT_EXISTS); - } - DepartmentEntity swapEntity = departmentDao.selectById(swapId); - if (swapEntity == null) { - return ResponseDTO.wrap(DepartmentResponseCodeConst.NOT_EXISTS); - } - Long departmentSort = departmentEntity.getSort(); - departmentEntity.setSort(swapEntity.getSort()); - departmentDao.updateById(departmentEntity); - swapEntity.setSort(departmentSort); - departmentDao.updateById(swapEntity); - return ResponseDTO.succ(); - } - - /** - * 部门升级 - * - * @param departmentId - * @return - */ - @Transactional(rollbackFor = Exception.class) - public ResponseDTO upgrade(Long departmentId) { - DepartmentEntity departmentEntity = departmentDao.selectById(departmentId); - if (departmentEntity == null) { - return ResponseDTO.wrap(DepartmentResponseCodeConst.NOT_EXISTS); - } - if (departmentEntity.getParentId() == null || departmentEntity.getParentId().equals(0)) { - return ResponseDTO.wrap(DepartmentResponseCodeConst.ERROR_PARAM, "此部门已经是根节点无法移动"); - } - DepartmentEntity parentEntity = departmentDao.selectById(departmentEntity.getParentId()); - - departmentEntity.setParentId(parentEntity.getParentId()); - departmentDao.updateById(departmentEntity); - return ResponseDTO.succ(); - } - - /** - * 部门降级 - * - * @param departmentId - * @param preId - * @return - */ - @Transactional(rollbackFor = Exception.class) - public ResponseDTO downgrade(Long departmentId, Long preId) { - DepartmentEntity departmentEntity = departmentDao.selectById(departmentId); - if (departmentEntity == null) { - return ResponseDTO.wrap(DepartmentResponseCodeConst.NOT_EXISTS); - } - DepartmentEntity preEntity = departmentDao.selectById(preId); - if (preEntity == null) { - return ResponseDTO.wrap(DepartmentResponseCodeConst.NOT_EXISTS); - } - departmentEntity.setParentId(preEntity.getId()); - departmentDao.updateById(departmentEntity); - return ResponseDTO.succ(); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/DepartmentTreeService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/DepartmentTreeService.java deleted file mode 100644 index b34a2678..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/DepartmentTreeService.java +++ /dev/null @@ -1,99 +0,0 @@ -package net.lab1024.smartadmin.module.system.department; - -import net.lab1024.smartadmin.module.system.department.domain.dto.DepartmentVO; -import com.google.common.collect.Lists; -import org.apache.commons.collections.CollectionUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; -import java.util.stream.Collectors; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/29 0029 下午 13:52 - * @since JDK1.8 - */ -@Service -public class DepartmentTreeService { - - @Autowired - private DepartmentDao departmentDao; - - /** - * 构建部门树结构 - * @param departmentVOList - * @return - */ - public List buildTree(List departmentVOList) { - if(CollectionUtils.isEmpty(departmentVOList)){ - return Lists.newArrayList(); - } - List list = departmentVOList.stream().filter(e -> e.getParentId() == null || e.getParentId() == 0).collect(Collectors.toList()); - if(CollectionUtils.isEmpty(list)){ - return Lists.newArrayList(); - } - this.buildTree(list,departmentVOList); - return list; - } - - private void buildTree(List nodeList,List departmentVOList){ - int nodeSize = nodeList.size(); - for(int i =0 ;i< nodeSize;i++){ - int preIndex = i-1; - int nextIndex = i+1; - DepartmentVO node = nodeList.get(i); - if(preIndex>-1){ - node.setPreId(nodeList.get(preIndex).getId()); - } - if(nextIndex departmentVOList) { - List children = getChildren(node, departmentVOList); - if (CollectionUtils.isNotEmpty(children)) { - node.setChildrenDepartment(children); - this.buildTree(children,departmentVOList); - } - } - - private List getChildren(DepartmentVO node, List departmentVOList) { - Long id = node.getId(); - return departmentVOList.stream().filter(e -> id.equals(e.getParentId())).collect(Collectors.toList()); - } - - - - /** - * 通过部门id,获取当前以及下属部门 - */ - public void buildIdList(Long deptId, List result) { - List departmentVOList = departmentDao.listAll(); - result.add(deptId); - if (null == deptId) { - result.addAll(departmentVOList.stream().map(DepartmentVO::getId).collect(Collectors.toList())); - return; - } - List children = getChildrenIdList(deptId, departmentVOList); - if (!children.isEmpty()) { - result.addAll(children.stream().map(DepartmentVO::getId).collect(Collectors.toList())); - for (DepartmentVO child : children) { - buildTree(child, departmentVOList); - } - } - } - - private List getChildrenIdList(Long deptId, List departmentVOList) { - return departmentVOList.stream().filter(e -> deptId.equals(e.getParentId())).collect(Collectors.toList()); - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/domain/entity/DepartmentEntity.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/domain/entity/DepartmentEntity.java deleted file mode 100644 index 26023788..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/department/domain/entity/DepartmentEntity.java +++ /dev/null @@ -1,48 +0,0 @@ -package net.lab1024.smartadmin.module.system.department.domain.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import net.lab1024.smartadmin.common.domain.BaseEntity; -import lombok.Data; - -import java.io.Serializable; - -/** - * 部门实体类 - * t_department 数据表 - * - * @author listen - * @date 2017/12/19 10:45 - */ -@Data -@TableName(value = "t_department") -public class DepartmentEntity extends BaseEntity implements Serializable { - - private static final long serialVersionUID = -6787726615141147044L; - - /** - * 部门名称 - */ - private String name; - - /** - * 部门简称 - */ - private String shortName; - - /** - * 负责人员工 id - */ - private Long managerId; - - /** - * 部门父级id - */ - private Long parentId; - - /** - * 排序 - */ - private Long sort; - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/EmployeeController.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/EmployeeController.java deleted file mode 100644 index 33c788e1..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/EmployeeController.java +++ /dev/null @@ -1,103 +0,0 @@ -package net.lab1024.smartadmin.module.system.employee; - -import net.lab1024.smartadmin.common.anno.NoValidPrivilege; -import net.lab1024.smartadmin.common.anno.OperateLog; -import net.lab1024.smartadmin.common.domain.PageResultDTO; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.constant.SwaggerTagConst; -import net.lab1024.smartadmin.module.system.employee.domain.dto.*; -import net.lab1024.smartadmin.module.system.employee.domain.vo.EmployeeVO; -import net.lab1024.smartadmin.module.system.login.domain.RequestTokenBO; -import net.lab1024.smartadmin.util.SmartRequestTokenUtil; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.validation.Valid; -import java.util.List; - -/** - * 员工管理 - * - * @author lidoudou - * @date 2017年12月19日上午11:34:52 - */ -@RestController -@Api(tags = {SwaggerTagConst.Admin.MANAGER_USER}) -@OperateLog -public class EmployeeController { - - @Autowired - private EmployeeService employeeService; - - @PostMapping("/employee/query") - @ApiOperation(value = "员工管理查询", notes = "员工管理查询 @author lidoudou") - public ResponseDTO> query(@RequestBody EmployeeQueryDTO query) { - return employeeService.selectEmployeeList(query); - } - - @GetMapping("/employee/get/all") - @ApiOperation(value = "查询所有员工基本信息,用于选择框", notes = "查询所有员工基本信息,用于选择框") - @NoValidPrivilege - public ResponseDTO> getAll() { - return ResponseDTO.succData(employeeService.getAllEmployee()); - } - - @ApiOperation(value = "添加员工", notes = "@author yandanyang") - @PostMapping("/employee/add") - public ResponseDTO addEmployee(@Valid @RequestBody EmployeeAddDTO emp) { - RequestTokenBO requestToken = SmartRequestTokenUtil.getRequestUser(); - return employeeService.addEmployee(emp, requestToken); - } - - @ApiOperation(value = "禁用单个员工", notes = "@author yandanyang") - @GetMapping("/employee/updateStatus/{employeeId}/{status}") - public ResponseDTO updateStatus(@PathVariable("employeeId") Long employeeId, @PathVariable("status") Integer status) { - return employeeService.updateStatus(employeeId, status); - } - - @ApiOperation(value = "批量禁用", notes = "@author yandanyang") - @PostMapping("/employee/batchUpdateStatus") - public ResponseDTO batchUpdateStatus(@Valid @RequestBody EmployeeBatchUpdateStatusDTO batchUpdateStatusDTO) { - return employeeService.batchUpdateStatus(batchUpdateStatusDTO); - } - - @ApiOperation(value = "更新员工信息", notes = "@author yandanyang") - @PostMapping("/employee/update") - public ResponseDTO updateEmployee(@Valid @RequestBody EmployeeUpdateDTO employeeUpdateDto) { - return employeeService.updateEmployee(employeeUpdateDto); - } - - @ApiOperation(value = "删除员工信息", notes = "@author yandanyang") - @PostMapping("/employee/delete/{employeeId}") - public ResponseDTO deleteEmployeeById(@PathVariable("employeeId") Long employeeId) { - return employeeService.deleteEmployeeById(employeeId); - } - - @ApiOperation(value = "单个员工角色授权", notes = "@author yandanyang") - @PostMapping("/employee/updateRoles") - public ResponseDTO updateRoles(@Valid @RequestBody EmployeeUpdateRolesDTO updateRolesDTO) { - return employeeService.updateRoles(updateRolesDTO); - } - - @ApiOperation(value = "修改密码", notes = "@author yandanyang") - @PostMapping("/employee/updatePwd") - public ResponseDTO updatePwd(@Valid @RequestBody EmployeeUpdatePwdDTO updatePwdDTO) { - RequestTokenBO requestToken = SmartRequestTokenUtil.getRequestUser(); - return employeeService.updatePwd(updatePwdDTO, requestToken); - } - - @ApiOperation(value = "通过部门id获取当前部门的人员&没有部门的人", notes = "@author yandanyang") - @GetMapping("/employee/listEmployeeByDeptId/{deptId}") - public ResponseDTO> listEmployeeByDeptId(@PathVariable Long deptId) { - return employeeService.getEmployeeByDeptId(deptId); - } - - @ApiOperation(value = "员工重置密码", notes = "@author lizongliang") - @GetMapping("/employee/resetPasswd/{employeeId}") - public ResponseDTO resetPasswd(@PathVariable("employeeId") Integer employeeId) { - return employeeService.resetPasswd(employeeId); - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/EmployeeDao.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/EmployeeDao.java deleted file mode 100644 index d77779ea..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/EmployeeDao.java +++ /dev/null @@ -1,138 +0,0 @@ -package net.lab1024.smartadmin.module.system.employee; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import net.lab1024.smartadmin.module.system.employee.domain.dto.EmployeeDTO; -import net.lab1024.smartadmin.module.system.employee.domain.dto.EmployeeQueryDTO; -import net.lab1024.smartadmin.module.system.employee.domain.dto.EmployeeQueryExportDTO; -import net.lab1024.smartadmin.module.system.employee.domain.entity.EmployeeEntity; -import net.lab1024.smartadmin.module.system.employee.domain.vo.EmployeeVO; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Component; - -import java.util.Collection; -import java.util.List; - -/** - * 员工dao接口 - * - * @author lidoudou - * @date 2017年12月19日下午1:36:30 - */ -@Mapper -@Component -public interface EmployeeDao extends BaseMapper { - /** - * 查询员工列表 - * - * @param page - * @param queryDTO - * @return - */ - List selectEmployeeList(Page page, @Param("queryDTO") EmployeeQueryDTO queryDTO); - - /** - * 不带分页查询员工列表 - * - * @param queryDTO - * @return - */ - List selectEmployeeList(@Param("queryDTO") EmployeeQueryExportDTO queryDTO); - - /** - * 批量更新禁用状态 - * - * @param employeeIds - * @param isDisabled - */ - void batchUpdateStatus(@Param("employeeIds") List employeeIds, @Param("isDisabled") Integer isDisabled); - - /** - * 登录 - * - * @param loginName - * @param loginPwd - * @return - */ - EmployeeDTO login(@Param("loginName") String loginName, @Param("loginPwd") String loginPwd); - - /** - * 通过登录名查询 - * - * @param loginName - * @param isDisabled - * @return - */ - EmployeeDTO getByLoginName(@Param("loginName") String loginName, @Param("isDisabled") Integer isDisabled); - - /** - * 通过手机号查询 - * - * @param phone - * @param isDisabled - * @return - */ - EmployeeDTO getByPhone(@Param("phone") String phone, @Param("isDisabled") Integer isDisabled); - - /** - * 获取所有员工 - * - * @return - */ - List listAll(); - - /** - * 获取某个部门员工数 - * - * @param depId - * @param deleteFlag 可以null - * @return - */ - Integer countByDepartmentId(@Param("depId") Long depId, @Param("deleteFlag") Boolean deleteFlag); - - /** - * 获取一批员工 - * - * @param employeeIds - * @return - */ - List getEmployeeByIds(@Param("ids") Collection employeeIds); - - - EmployeeDTO getEmployeeById(@Param("id") Long employeeId); - - /** - * 获取某个部门的员工 - * - * @param departmentId - * @return - */ - List getEmployeeIdByDeptId(@Param("departmentId") Long departmentId); - - /** - * 获取某批部门的员工 - * - * @param departmentIds - * @return - */ - List getEmployeeIdByDeptIds(@Param("departmentIds") List departmentIds); - - - /** - * 员工重置密码 - * - * @param employeeId - * @param password - * @return - */ - Integer updatePassword(@Param("employeeId") Integer employeeId, @Param("password") String password); - - - /** - * 查询所有员工 - * - * @return - */ - List selectAll(); -} \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/EmployeeService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/EmployeeService.java deleted file mode 100644 index a689bea2..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/EmployeeService.java +++ /dev/null @@ -1,369 +0,0 @@ -package net.lab1024.smartadmin.module.system.employee; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.google.common.collect.Lists; -import net.lab1024.smartadmin.common.constant.JudgeEnum; -import net.lab1024.smartadmin.common.domain.PageResultDTO; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.constant.CommonConst; -import net.lab1024.smartadmin.module.system.department.DepartmentDao; -import net.lab1024.smartadmin.module.system.department.domain.entity.DepartmentEntity; -import net.lab1024.smartadmin.module.system.employee.constant.EmployeeResponseCodeConst; -import net.lab1024.smartadmin.module.system.employee.constant.EmployeeStatusEnum; -import net.lab1024.smartadmin.module.system.employee.domain.bo.EmployeeBO; -import net.lab1024.smartadmin.module.system.employee.domain.dto.*; -import net.lab1024.smartadmin.module.system.employee.domain.entity.EmployeeEntity; -import net.lab1024.smartadmin.module.system.employee.domain.vo.EmployeeVO; -import net.lab1024.smartadmin.module.system.login.domain.RequestTokenBO; -import net.lab1024.smartadmin.module.system.position.PositionDao; -import net.lab1024.smartadmin.module.system.position.PositionService; -import net.lab1024.smartadmin.module.system.position.domain.dto.PositionRelationAddDTO; -import net.lab1024.smartadmin.module.system.position.domain.dto.PositionRelationResultDTO; -import net.lab1024.smartadmin.module.system.privilege.service.PrivilegeEmployeeService; -import net.lab1024.smartadmin.module.system.role.roleemployee.RoleEmployeeDao; -import net.lab1024.smartadmin.module.system.role.roleemployee.domain.RoleEmployeeEntity; -import net.lab1024.smartadmin.util.SmartBeanUtil; -import net.lab1024.smartadmin.util.SmartDigestUtil; -import net.lab1024.smartadmin.util.SmartPageUtil; -import net.lab1024.smartadmin.util.SmartVerificationUtil; -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.collections.map.HashedMap; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.regex.Pattern; -import java.util.stream.Collectors; - -/** - * 员工管理 - * - * @author lidoudou - * @date 2017年12月21日上午11:54:52 - */ -@Service -public class EmployeeService { - - private static final String RESET_PASSWORD = "123456"; - - @Autowired - private EmployeeDao employeeDao; - - @Autowired - private DepartmentDao departmentDao; - - @Autowired - private RoleEmployeeDao roleEmployeeDao; - - @Autowired - private PositionService positionService; - - @Autowired - private PositionDao positionDao; - - @Autowired - private PrivilegeEmployeeService privilegeEmployeeService; - - /** - * 员工基本信息的缓存 - */ - private static final ConcurrentHashMap employeeCache = new ConcurrentHashMap<>(); - - public List getAllEmployee() { - return employeeDao.selectAll(); - } - - public EmployeeBO getById(Long id) { - EmployeeBO employeeBO = employeeCache.get(id); - if (employeeBO == null) { - EmployeeEntity employeeEntity = employeeDao.selectById(id); - if (employeeEntity != null) { - Boolean superman = privilegeEmployeeService.isSuperman(id); - employeeBO = new EmployeeBO(employeeEntity, superman); - employeeCache.put(employeeEntity.getId(), employeeBO); - } - } - return employeeBO; - } - - /** - * 查询员工列表 - * - * @param queryDTO - * @return - */ - public ResponseDTO> selectEmployeeList(EmployeeQueryDTO queryDTO) { - Page pageParam = SmartPageUtil.convert2QueryPage(queryDTO); - queryDTO.setIsDelete(JudgeEnum.NO.getValue()); - List employeeList = employeeDao.selectEmployeeList(pageParam, queryDTO); - List employeeIdList = employeeList.stream().map(EmployeeDTO::getId).collect(Collectors.toList()); - - if (CollectionUtils.isNotEmpty(employeeIdList)) { - List positionRelationResultDTOList = positionDao.selectEmployeesRelation(employeeIdList); - Map> employeePositionMap = new HashedMap(); - - for (PositionRelationResultDTO positionRelationResultDTO : positionRelationResultDTOList) { - List relationResultDTOList = employeePositionMap.get(positionRelationResultDTO.getEmployeeId()); - //匹配对应的岗位 - if (relationResultDTOList == null) { - relationResultDTOList = new ArrayList<>(); - employeePositionMap.put(positionRelationResultDTO.getEmployeeId(), relationResultDTOList); - } - relationResultDTOList.add(positionRelationResultDTO); - } - - for (EmployeeDTO employeeDTO : employeeList) { - List relationResultDTOList = employeePositionMap.get(employeeDTO.getId()); - if (relationResultDTOList != null) { - employeeDTO.setPositionRelationList(relationResultDTOList); - employeeDTO.setPositionName(relationResultDTOList.stream().map(PositionRelationResultDTO::getPositionName).collect(Collectors.joining(","))); - } - } - } - return ResponseDTO.succData(SmartPageUtil.convert2PageResult(pageParam, employeeList, EmployeeVO.class)); - } - - /** - * 新增员工 - * - * @param employeeAddDto - * @param requestToken - * @return - */ - public ResponseDTO addEmployee(EmployeeAddDTO employeeAddDto, RequestTokenBO requestToken) { - EmployeeEntity entity = SmartBeanUtil.copy(employeeAddDto, EmployeeEntity.class); - if (StringUtils.isNotEmpty(employeeAddDto.getIdCard())) { - boolean checkResult = Pattern.matches(SmartVerificationUtil.ID_CARD, employeeAddDto.getIdCard()); - if (!checkResult) { - return ResponseDTO.wrap(EmployeeResponseCodeConst.ID_CARD_ERROR); - } - } - if (StringUtils.isNotEmpty(employeeAddDto.getBirthday())) { - boolean checkResult = Pattern.matches(SmartVerificationUtil.DATE, employeeAddDto.getBirthday()); - if (!checkResult) { - return ResponseDTO.wrap(EmployeeResponseCodeConst.BIRTHDAY_ERROR); - } - } - //同名员工 - EmployeeDTO sameNameEmployee = employeeDao.getByLoginName(entity.getLoginName(), EmployeeStatusEnum.NORMAL.getValue()); - if (null != sameNameEmployee) { - return ResponseDTO.wrap(EmployeeResponseCodeConst.LOGIN_NAME_EXISTS); - } - //同电话员工 - EmployeeDTO samePhoneEmployee = employeeDao.getByPhone(entity.getPhone(), EmployeeStatusEnum.NORMAL.getValue()); - if (null != samePhoneEmployee) { - return ResponseDTO.wrap(EmployeeResponseCodeConst.PHONE_EXISTS); - } - Long departmentId = entity.getDepartmentId(); - DepartmentEntity department = departmentDao.selectById(departmentId); - if (department == null) { - return ResponseDTO.wrap(EmployeeResponseCodeConst.DEPT_NOT_EXIST); - } - - //如果没有密码 默认设置为123456 - String pwd = entity.getLoginPwd(); - if (StringUtils.isBlank(pwd)) { - entity.setLoginPwd(SmartDigestUtil.encryptPassword(CommonConst.Password.SALT_FORMAT, RESET_PASSWORD)); - } else { - entity.setLoginPwd(SmartDigestUtil.encryptPassword(CommonConst.Password.SALT_FORMAT, entity.getLoginPwd())); - } - - entity.setCreateUser(requestToken.getRequestUserId()); - if (StringUtils.isEmpty(entity.getBirthday())) { - entity.setBirthday(null); - } - employeeDao.insert(entity); - - PositionRelationAddDTO positionRelAddDTO = new PositionRelationAddDTO(employeeAddDto.getPositionIdList(), entity.getId()); - //存储所选岗位信息 - positionService.addPositionRelation(positionRelAddDTO); - - return ResponseDTO.succ(); - } - - /** - * 更新禁用状态 - * - * @param employeeId - * @param status - * @return - */ - public ResponseDTO updateStatus(Long employeeId, Integer status) { - if (null == employeeId) { - return ResponseDTO.wrap(EmployeeResponseCodeConst.EMP_NOT_EXISTS); - } - EmployeeBO entity = getById(employeeId); - if (null == entity) { - return ResponseDTO.wrap(EmployeeResponseCodeConst.EMP_NOT_EXISTS); - } - List empIds = Lists.newArrayList(); - empIds.add(employeeId); - employeeDao.batchUpdateStatus(empIds, status); - employeeCache.remove(employeeId); - return ResponseDTO.succ(); - } - - /** - * 批量更新员工状态 - * - * @param batchUpdateStatusDTO - * @return - */ - public ResponseDTO batchUpdateStatus(EmployeeBatchUpdateStatusDTO batchUpdateStatusDTO) { - employeeDao.batchUpdateStatus(batchUpdateStatusDTO.getEmployeeIds(), batchUpdateStatusDTO.getStatus()); - if (batchUpdateStatusDTO.getEmployeeIds() != null) { - batchUpdateStatusDTO.getEmployeeIds().forEach(e -> employeeCache.remove(e)); - } - return ResponseDTO.succ(); - } - - /** - * 更新员工 - * - * @param updateDTO - * @return - */ - public ResponseDTO updateEmployee(EmployeeUpdateDTO updateDTO) { - Long employeeId = updateDTO.getId(); - EmployeeEntity employeeEntity = employeeDao.selectById(employeeId); - if (null == employeeEntity) { - return ResponseDTO.wrap(EmployeeResponseCodeConst.EMP_NOT_EXISTS); - } - if (StringUtils.isNotBlank(updateDTO.getIdCard())) { - boolean checkResult = Pattern.matches(SmartVerificationUtil.ID_CARD, updateDTO.getIdCard()); - if (!checkResult) { - return ResponseDTO.wrap(EmployeeResponseCodeConst.ID_CARD_ERROR); - } - } - if (StringUtils.isNotEmpty(updateDTO.getBirthday())) { - boolean checkResult = Pattern.matches(SmartVerificationUtil.DATE, updateDTO.getBirthday()); - if (!checkResult) { - return ResponseDTO.wrap(EmployeeResponseCodeConst.BIRTHDAY_ERROR); - } - } - Long departmentId = updateDTO.getDepartmentId(); - DepartmentEntity departmentEntity = departmentDao.selectById(departmentId); - if (departmentEntity == null) { - return ResponseDTO.wrap(EmployeeResponseCodeConst.DEPT_NOT_EXIST); - } - EmployeeDTO sameNameEmployee = employeeDao.getByLoginName(updateDTO.getLoginName(), EmployeeStatusEnum.NORMAL.getValue()); - if (null != sameNameEmployee && !sameNameEmployee.getId().equals(employeeId)) { - return ResponseDTO.wrap(EmployeeResponseCodeConst.LOGIN_NAME_EXISTS); - } - EmployeeDTO samePhoneEmployee = employeeDao.getByPhone(updateDTO.getLoginName(), EmployeeStatusEnum.NORMAL.getValue()); - if (null != samePhoneEmployee && !samePhoneEmployee.getId().equals(employeeId)) { - return ResponseDTO.wrap(EmployeeResponseCodeConst.PHONE_EXISTS); - } - String newPwd = updateDTO.getLoginPwd(); - if (!StringUtils.isBlank(newPwd)) { - updateDTO.setLoginPwd(SmartDigestUtil.encryptPassword(CommonConst.Password.SALT_FORMAT, updateDTO.getLoginPwd())); - } else { - updateDTO.setLoginPwd(employeeEntity.getLoginPwd()); - } - EmployeeEntity entity = SmartBeanUtil.copy(updateDTO, EmployeeEntity.class); - entity.setUpdateTime(new Date()); - if (StringUtils.isEmpty(entity.getBirthday())) { - entity.setBirthday(null); - } - if (CollectionUtils.isNotEmpty(updateDTO.getPositionIdList())) { - //删除旧的关联关系 添加新的关联关系 - positionService.removePositionRelation(entity.getId()); - PositionRelationAddDTO positionRelAddDTO = new PositionRelationAddDTO(updateDTO.getPositionIdList(), entity.getId()); - positionService.addPositionRelation(positionRelAddDTO); - } - entity.setIsDisabled(employeeEntity.getIsDisabled()); - entity.setIsLeave(employeeEntity.getIsLeave()); - entity.setCreateUser(employeeEntity.getCreateUser()); - entity.setCreateTime(employeeEntity.getCreateTime()); - entity.setUpdateTime(new Date()); - employeeDao.updateById(entity); - employeeCache.remove(employeeId); - return ResponseDTO.succ(); - } - - /** - * 删除员工 - * - * @param employeeId 员工ID - * @return - */ - public ResponseDTO deleteEmployeeById(Long employeeId) { - EmployeeEntity employeeEntity = employeeDao.selectById(employeeId); - if (null == employeeEntity) { - return ResponseDTO.wrap(EmployeeResponseCodeConst.EMP_NOT_EXISTS); - } - //假删 - employeeEntity.setIsDelete(JudgeEnum.YES.getValue().longValue()); - employeeDao.updateById(employeeEntity); - employeeCache.remove(employeeId); - return ResponseDTO.succ(); - } - - /** - * 更新用户角色 - * - * @param updateRolesDTO - * @return - */ - public ResponseDTO updateRoles(EmployeeUpdateRolesDTO updateRolesDTO) { - roleEmployeeDao.deleteByEmployeeId(updateRolesDTO.getEmployeeId()); - if (CollectionUtils.isNotEmpty(updateRolesDTO.getRoleIds())) { - List roleEmployeeEntities = Lists.newArrayList(); - RoleEmployeeEntity roleEmployeeEntity; - for (Long roleId : updateRolesDTO.getRoleIds()) { - roleEmployeeEntity = new RoleEmployeeEntity(); - roleEmployeeEntity.setEmployeeId(updateRolesDTO.getEmployeeId()); - roleEmployeeEntity.setRoleId(roleId); - roleEmployeeEntities.add(roleEmployeeEntity); - } - roleEmployeeDao.batchInsert(roleEmployeeEntities); - } - return ResponseDTO.succ(); - } - - /** - * 更新密码 - * - * @param updatePwdDTO - * @param requestToken - * @return - */ - public ResponseDTO updatePwd(EmployeeUpdatePwdDTO updatePwdDTO, RequestTokenBO requestToken) { - Long employeeId = requestToken.getRequestUserId(); - EmployeeEntity employee = employeeDao.selectById(employeeId); - if (employee == null) { - return ResponseDTO.wrap(EmployeeResponseCodeConst.EMP_NOT_EXISTS); - } - if (!employee.getLoginPwd().equals(SmartDigestUtil.encryptPassword(CommonConst.Password.SALT_FORMAT, updatePwdDTO.getOldPwd()))) { - return ResponseDTO.wrap(EmployeeResponseCodeConst.PASSWORD_ERROR); - } - employee.setLoginPwd(SmartDigestUtil.encryptPassword(CommonConst.Password.SALT_FORMAT, updatePwdDTO.getPwd())); - employeeDao.updateById(employee); - employeeCache.remove(employeeId); - return ResponseDTO.succ(); - } - - public ResponseDTO> getEmployeeByDeptId(Long departmentId) { - List list = employeeDao.getEmployeeIdByDeptId(departmentId); - return ResponseDTO.succData(list); - } - - /** - * 重置密码 - * - * @param employeeId - * @return - */ - public ResponseDTO resetPasswd(Integer employeeId) { - String md5Password = SmartDigestUtil.encryptPassword(CommonConst.Password.SALT_FORMAT, RESET_PASSWORD); - employeeDao.updatePassword(employeeId, md5Password); - employeeCache.remove(employeeId); - return ResponseDTO.succ(); - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/constant/EmployeeStatusEnum.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/constant/EmployeeStatusEnum.java deleted file mode 100644 index 3c07ce72..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/constant/EmployeeStatusEnum.java +++ /dev/null @@ -1,56 +0,0 @@ -package net.lab1024.smartadmin.module.system.employee.constant; - -import net.lab1024.smartadmin.common.domain.BaseEnum; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/3/27 0027 下午 16:22 - * @since JDK1.8 - */ - -public enum EmployeeStatusEnum implements BaseEnum { - - /** - * 用户正常状态 1 - */ - NORMAL(0, "正常"), - - /** - * 用户已被禁用 0 - */ - DISABLED(1, "禁用"); - - private Integer value; - - private String desc; - - EmployeeStatusEnum(Integer value, String desc) { - this.value = value; - this.desc = desc; - } - - /** - * 获取枚举类的值 - * - * @return Integer - */ - @Override - public Integer getValue() { - return value; - } - - /** - * 获取枚举类的说明 - * - * @return String - */ - @Override - public String getDesc() { - return this.desc; - } -} \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/bo/EmployeeBO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/bo/EmployeeBO.java deleted file mode 100644 index 57050a5c..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/bo/EmployeeBO.java +++ /dev/null @@ -1,73 +0,0 @@ -package net.lab1024.smartadmin.module.system.employee.domain.bo; - -import net.lab1024.smartadmin.module.system.employee.domain.entity.EmployeeEntity; -import lombok.Getter; - - -@Getter -public class EmployeeBO { - - /** - * 主键id - */ - private Long id; - - /** - * 登录账号 - */ - private String loginName; - - /** - * 员工名称 - */ - private String actualName; - - /** - * 别名 - */ - private String nickName; - - /** - * 手机号码 - */ - private String phone; - - /** - * 部门id - */ - private Long departmentId; - - /** - * 是否离职 - */ - private Integer isLeave; - - /** - * 是否被禁用 - */ - private Integer isDisabled; - - /** - * 删除状态 0否 1是 - */ - private Long isDelete; - - /** - * 是否为超级管理员 - */ - private Boolean isSuperman; - - public EmployeeBO(EmployeeEntity employeeEntity, boolean isSuperman) { - this.id = employeeEntity.getId(); - this.loginName = employeeEntity.getLoginName(); - this.actualName = employeeEntity.getActualName(); - this.nickName = employeeEntity.getNickName(); - this.phone = employeeEntity.getPhone(); - this.departmentId = employeeEntity.getDepartmentId(); - this.isLeave = employeeEntity.getIsLeave(); - this.isDisabled = employeeEntity.getIsDisabled(); - this.isDelete = employeeEntity.getIsDelete(); - this.isSuperman = isSuperman; - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeAddDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeAddDTO.java deleted file mode 100644 index bb1ac368..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeAddDTO.java +++ /dev/null @@ -1,63 +0,0 @@ -package net.lab1024.smartadmin.module.system.employee.domain.dto; - -import net.lab1024.smartadmin.util.SmartVerificationUtil; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotEmpty; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Pattern; -import java.util.List; - -/** - * 添加员工 - * - * @author lidoudou - * @date 2017年12月19日下午2:06:31 - */ -@Data -public class EmployeeAddDTO { - - @ApiModelProperty("姓名") - @NotNull(message = "姓名不能为空") - private String actualName; - - @ApiModelProperty("登录名") - @NotNull(message = "姓名不能为空") - private String loginName; - - @ApiModelProperty("别名") - private String nickName; - - @ApiModelProperty("部门id") - @NotNull(message = "部门id不能为空") - private Long departmentId; - - @ApiModelProperty("是否启用") - @NotNull(message = "是否被禁用不能为空") - private Integer isDisabled; - - @ApiModelProperty("手机号") - @NotNull(message = "手机号不能为空") - @Pattern(regexp = SmartVerificationUtil.PHONE_REGEXP, message = "手机号格式不正确") - private String phone; - - @ApiModelProperty("身份证(可选)") - private String idCard; - - @ApiModelProperty("生日(可选)") - private String birthday; - - @ApiModelProperty("密码") - // @NotNull(message = "密码不能为空") - // @Length(min = 6, message = "密码最少为6位字符") - private String loginPwd; - - @ApiModelProperty("邮箱") - private String email; - - @ApiModelProperty("岗位ID 集合") - @NotEmpty(message = "岗位ID 集合不能为空") - private List positionIdList; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeBaseDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeBaseDTO.java deleted file mode 100644 index 0931bdb4..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeBaseDTO.java +++ /dev/null @@ -1,52 +0,0 @@ -package net.lab1024.smartadmin.module.system.employee.domain.dto; - -import net.lab1024.smartadmin.util.SmartVerificationUtil; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Pattern; - -/** - * 添加员工 - * - * @author lidoudou - * @date 2017年12月19日下午2:06:31 - */ -@Data -public class EmployeeBaseDTO { - - @ApiModelProperty("姓名") - @NotNull(message = "姓名不能为空") - private String actualName; - - @ApiModelProperty("登录名") - @NotNull(message = "姓名不能为空") - private String loginName; - - @ApiModelProperty("别名") - private String nickName; - - @ApiModelProperty("部门id") - @NotNull(message = "部门id不能为空") - private Long departmentId; - - @ApiModelProperty("是否启用") - @NotNull(message = "是否被禁用不能为空") - private Integer isDisabled; - - @ApiModelProperty("手机号") - @NotNull(message = "手机号不能为空") - @Pattern(regexp = SmartVerificationUtil.PHONE_REGEXP, message = "手机号格式不正确") - private String phone; - - @ApiModelProperty("身份证(可选)") - private String idCard; - - @ApiModelProperty("生日(可选)") - private String birthday; - - @ApiModelProperty("邮箱") - private String email; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeBatchUpdateStatusDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeBatchUpdateStatusDTO.java deleted file mode 100644 index 7d9db716..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeBatchUpdateStatusDTO.java +++ /dev/null @@ -1,26 +0,0 @@ -package net.lab1024.smartadmin.module.system.employee.domain.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotNull; -import java.util.List; - -/** - * 批量更新 - * - * @author lidoudou - * @date 2017年12月21日上午13:17:52 - */ -@Data -public class EmployeeBatchUpdateStatusDTO { - - @ApiModelProperty("员工ids") - @NotNull(message = "员工ids不能为空") - private List employeeIds; - - @ApiModelProperty("状态") - @NotNull(message = "状态不能为空") - private Integer status; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeDTO.java deleted file mode 100644 index 61b49e1a..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeDTO.java +++ /dev/null @@ -1,73 +0,0 @@ -package net.lab1024.smartadmin.module.system.employee.domain.dto; - -import com.fasterxml.jackson.annotation.JsonFormat; -import net.lab1024.smartadmin.module.system.position.domain.dto.PositionRelationResultDTO; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.Date; -import java.util.List; - -/** - * 员工列表DTO - * - * @author lidoudou - * @date 2017年12月21日上午09:09:31 - */ -@Data -public class EmployeeDTO { - - @ApiModelProperty("主键id") - private Long id; - - @ApiModelProperty("登录账号") - private String loginName; - - @ApiModelProperty("别名") - private String nickName; - - @ApiModelProperty("员工名称") - private String actualName; - - @ApiModelProperty("手机号码") - private String phone; - - @ApiModelProperty("身份证") - private String idCard; - - @ApiModelProperty("出生日期") - @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") - private Date birthday; - - @ApiModelProperty("创建者id") - private Long createUser; - - @ApiModelProperty("部门id") - private Long departmentId; - - @ApiModelProperty("是否离职") - private Integer isLeave; - - @ApiModelProperty("是否被禁用") - private Integer isDisabled; - - @ApiModelProperty("是否删除") - private Integer isDelete; - - @ApiModelProperty("部门名称") - private String departmentName; - - @ApiModelProperty("邮箱") - private String email; - - @ApiModelProperty("创建时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date createTime; - - @ApiModelProperty("岗位关联信息") - private List positionRelationList; - - @ApiModelProperty("岗位名称") - private String positionName; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeLoginFormDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeLoginFormDTO.java deleted file mode 100644 index 0bf1f1a3..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeLoginFormDTO.java +++ /dev/null @@ -1,31 +0,0 @@ -package net.lab1024.smartadmin.module.system.employee.domain.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotNull; - -/** - * 登录 - * - * @author lidoudou - * @date 2017年12月19日上午11:49:46 - */ -@Data -public class EmployeeLoginFormDTO { - - @NotNull(message = "登录名不能为空") - @ApiModelProperty(example = "sa") - private String loginName; - - @NotNull(message = "密码不能为空") - @ApiModelProperty(example = "123456") - private String loginPwd; - - @ApiModelProperty(value = "验证码uuid") - private String codeUuid; - - @ApiModelProperty(value = "验证码") - private String code; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeQueryDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeQueryDTO.java deleted file mode 100644 index e384a4da..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeQueryDTO.java +++ /dev/null @@ -1,39 +0,0 @@ -package net.lab1024.smartadmin.module.system.employee.domain.dto; - -import net.lab1024.smartadmin.common.domain.PageParamDTO; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.List; - -/** - * 员工列表DTO - * - * @author lidoudou - * @date 2017年12月21日上午09:09:31 - */ -@Data -public class EmployeeQueryDTO extends PageParamDTO { - - private String phone; - - private String actualName; - - private String keyword; - - private Long departmentId; - - private Integer isLeave; - - private Integer isDisabled; - - /** - * 删除状态 0否 1是 - */ - @ApiModelProperty("删除状态 0否 1是 不需要传") - private Integer isDelete; - - @ApiModelProperty("员工id集合") - private List employeeIds; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeUpdateDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeUpdateDTO.java deleted file mode 100644 index d835c522..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeUpdateDTO.java +++ /dev/null @@ -1,28 +0,0 @@ -package net.lab1024.smartadmin.module.system.employee.domain.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotNull; -import java.util.List; - -/** - * 添加员工 - * - * @author lidoudou - * @date 2017年12月19日下午2:06:31 - */ -@Data -public class EmployeeUpdateDTO extends EmployeeBaseDTO { - - @ApiModelProperty("员工id") - @NotNull(message = "员工id不能为空") - private Long id; - - @ApiModelProperty("密码") - private String loginPwd; - - @ApiModelProperty("岗位ID 集合") - private List positionIdList; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeUpdatePwdDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeUpdatePwdDTO.java deleted file mode 100644 index f5841c31..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/dto/EmployeeUpdatePwdDTO.java +++ /dev/null @@ -1,25 +0,0 @@ -package net.lab1024.smartadmin.module.system.employee.domain.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotNull; - -/** - * 修改密码所需参数 - * - * @author cyj - * @date 2018-02-23 下午 4:53 - */ -@Data -public class EmployeeUpdatePwdDTO { - - @ApiModelProperty("新密码") - @NotNull - private String pwd; - - @ApiModelProperty("原密码") - @NotNull - private String oldPwd; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/entity/EmployeeEntity.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/entity/EmployeeEntity.java deleted file mode 100644 index 1744ee1b..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/entity/EmployeeEntity.java +++ /dev/null @@ -1,91 +0,0 @@ -package net.lab1024.smartadmin.module.system.employee.domain.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import net.lab1024.smartadmin.common.domain.BaseEntity; -import lombok.Data; - -import java.io.Serializable; - -/** - * 员工实体类 - * - * @author lidoudou - * @date 2017年12月19日下午1:34:48 - */ -@Data -@TableName("t_employee") -public class EmployeeEntity extends BaseEntity implements Serializable { - - private static final long serialVersionUID = -8794328598524272806L; - - /** - * 登录账号 - */ - private String loginName; - - /** - * 登录密码 - */ - private String loginPwd; - - /** - * 员工名称 - */ - private String actualName; - - /** - * 别名 - */ - private String nickName; - - /** - * 手机号码 - */ - private String phone; - - /** - * 身份证 - */ - private String idCard; - - /** - * 出生日期 - */ - private String birthday; - - - /** - * 部门id - */ - private Long departmentId; - - /** - * 是否离职 - */ - private Integer isLeave; - - /** - * 是否被禁用 - */ - private Integer isDisabled; - /** - * 邮箱 - */ - private String email; - - /** - * 备注 - */ - private String remark; - - /** - * 创建者id - */ - private Long createUser; - - /** - * 删除状态 0否 1是 - */ - private Long isDelete; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/vo/EmployeeVO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/vo/EmployeeVO.java deleted file mode 100644 index a180d59b..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/employee/domain/vo/EmployeeVO.java +++ /dev/null @@ -1,72 +0,0 @@ -package net.lab1024.smartadmin.module.system.employee.domain.vo; - -import com.fasterxml.jackson.annotation.JsonFormat; -import net.lab1024.smartadmin.module.system.position.domain.dto.PositionRelationResultDTO; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.Date; -import java.util.List; - -/** - * @author bhr - * @Description: 员工信息 - * @date 2019/8/28 9:04 - */ - -@Data -public class EmployeeVO { - - @ApiModelProperty("主键id") - private Long id; - - @ApiModelProperty("登录账号") - private String loginName; - - @ApiModelProperty("别名") - private String nickName; - - @ApiModelProperty("员工名称") - private String actualName; - - @ApiModelProperty("手机号码") - private String phone; - - @ApiModelProperty("身份证") - private String idCard; - - @ApiModelProperty("出生日期") - @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") - private Date birthday; - - @ApiModelProperty("创建者id") - private Long createUser; - - @ApiModelProperty("部门id") - private Long departmentId; - - @ApiModelProperty("是否离职") - private Integer isLeave; - - @ApiModelProperty("是否被禁用") - private Integer isDisabled; - - @ApiModelProperty("是否删除") - private Integer isDelete; - - @ApiModelProperty("部门名称") - private String departmentName; - - @ApiModelProperty("邮箱") - private String email; - - @ApiModelProperty("创建时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date createTime; - - @ApiModelProperty("岗位关联信息") - private List positionRelationList; - - @ApiModelProperty("岗位名称") - private String positionName; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/LoginController.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/LoginController.java deleted file mode 100644 index 414c9ad4..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/LoginController.java +++ /dev/null @@ -1,71 +0,0 @@ -package net.lab1024.smartadmin.module.system.login; - -import net.lab1024.smartadmin.common.anno.NoNeedLogin; -import net.lab1024.smartadmin.common.anno.NoValidPrivilege; -import net.lab1024.smartadmin.common.anno.OperateLog; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.constant.SwaggerTagConst; -import net.lab1024.smartadmin.module.system.employee.domain.dto.EmployeeLoginFormDTO; -import net.lab1024.smartadmin.module.system.login.domain.KaptchaVO; -import net.lab1024.smartadmin.module.system.login.domain.LoginDetailVO; -import net.lab1024.smartadmin.module.system.login.domain.RequestTokenBO; -import net.lab1024.smartadmin.util.SmartRequestTokenUtil; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RestController; - -import javax.servlet.http.HttpServletRequest; -import javax.validation.Valid; - -/** - * 后台登录 - * - * @author lidoudou - * @date 2017年12月19日上午11:46:04 - */ -@RestController -@Api(tags = {SwaggerTagConst.Admin.MANAGER_USER_LOGIN}) -@OperateLog -public class LoginController { - - @Autowired - private LoginService loginService; - - @PostMapping("/session/login") - @ApiOperation(value = "登录", notes = "登录") - @NoNeedLogin - public ResponseDTO login(@Valid @RequestBody EmployeeLoginFormDTO loginForm, HttpServletRequest request) { - return loginService.login(loginForm, request); - } - - @GetMapping("/session/get") - @ApiOperation(value = "获取session", notes = "获取session") - @NoValidPrivilege - public ResponseDTO getSession() { - RequestTokenBO requestUser = SmartRequestTokenUtil.getRequestUser(); - return ResponseDTO.succData(loginService.getSession(requestUser)); - } - - @GetMapping("/session/logOut") - @ApiOperation(value = "退出登陆", notes = "退出登陆") - @NoValidPrivilege - public ResponseDTO logOut() { - RequestTokenBO requestToken = SmartRequestTokenUtil.getRequestUser(); - if (null == requestToken) { - return ResponseDTO.wrap(LoginResponseCodeConst.LOGIN_ERROR); - } - return loginService.logoutByToken(requestToken); - } - - @GetMapping("/session/verificationCode") - @ApiOperation(value = "获取验证码", notes = "获取验证码") - @NoNeedLogin - public ResponseDTO verificationCode() { - return loginService.verificationCode(); - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/LoginService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/LoginService.java deleted file mode 100644 index 070a9ff4..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/LoginService.java +++ /dev/null @@ -1,215 +0,0 @@ -package net.lab1024.smartadmin.module.system.login; - -import net.lab1024.smartadmin.common.constant.JudgeEnum; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.constant.CommonConst; -import net.lab1024.smartadmin.module.system.department.DepartmentDao; -import net.lab1024.smartadmin.module.system.department.domain.entity.DepartmentEntity; -import net.lab1024.smartadmin.module.system.employee.EmployeeDao; -import net.lab1024.smartadmin.module.system.employee.constant.EmployeeResponseCodeConst; -import net.lab1024.smartadmin.module.system.employee.constant.EmployeeStatusEnum; -import net.lab1024.smartadmin.module.system.employee.domain.dto.EmployeeDTO; -import net.lab1024.smartadmin.module.system.employee.domain.dto.EmployeeLoginFormDTO; -import net.lab1024.smartadmin.module.business.log.LogService; -import net.lab1024.smartadmin.module.business.log.userloginlog.domain.UserLoginLogEntity; -import net.lab1024.smartadmin.module.system.login.domain.KaptchaVO; -import net.lab1024.smartadmin.module.system.login.domain.LoginDetailVO; -import net.lab1024.smartadmin.module.system.login.domain.LoginPrivilegeDTO; -import net.lab1024.smartadmin.module.system.login.domain.RequestTokenBO; -import net.lab1024.smartadmin.module.system.privilege.domain.entity.PrivilegeEntity; -import net.lab1024.smartadmin.module.system.privilege.service.PrivilegeEmployeeService; -import net.lab1024.smartadmin.util.SmartBeanUtil; -import net.lab1024.smartadmin.util.SmartDigestUtil; -import net.lab1024.smartadmin.util.SmartIPUtil; -import com.google.code.kaptcha.impl.DefaultKaptcha; -import eu.bitwalker.useragentutils.UserAgent; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.codec.binary.Base64; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.redis.core.ValueOperations; -import org.springframework.stereotype.Service; - -import javax.imageio.ImageIO; -import javax.servlet.http.HttpServletRequest; -import javax.validation.Valid; -import java.awt.image.BufferedImage; -import java.io.ByteArrayOutputStream; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.TimeUnit; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/3/27 0027 下午 18:10 - * @since JDK1.8 - */ -@Slf4j -@Service -public class LoginService { - - private static final String VERIFICATION_CODE_REDIS_PREFIX = "vc_%s"; - - @Autowired - private EmployeeDao employeeDao; - - @Autowired - private DepartmentDao departmentDao; - - @Autowired - private PrivilegeEmployeeService privilegeEmployeeService; - - @Autowired - private LoginTokenService loginTokenService; - - @Autowired - private LogService logService; - - @Autowired - private DefaultKaptcha defaultKaptcha; - - @Autowired - private ValueOperations redisValueOperations; - - /** - * 登陆 - * - * @param loginForm 登录名 密码 - * @return 登录用户基本信息 - */ - public ResponseDTO login(@Valid EmployeeLoginFormDTO loginForm, HttpServletRequest request) { -// String redisVerificationCode = redisValueOperations.get(loginForm.getCodeUuid()); -// //增加删除已使用的验证码方式 频繁登录 -// redisValueOperations.getOperations().delete(loginForm.getCodeUuid()); -// if (StringUtils.isEmpty(redisVerificationCode)) { -// return ResponseDTO.wrap(EmployeeResponseCodeConst.VERIFICATION_CODE_INVALID); -// } -// if (!redisVerificationCode.equalsIgnoreCase(loginForm.getCode())) { -// return ResponseDTO.wrap(EmployeeResponseCodeConst.VERIFICATION_CODE_INVALID); -// } - String loginPwd = SmartDigestUtil.encryptPassword(CommonConst.Password.SALT_FORMAT, loginForm.getLoginPwd()); - EmployeeDTO employeeDTO = employeeDao.login(loginForm.getLoginName(), loginPwd); - if (null == employeeDTO) { - return ResponseDTO.wrap(EmployeeResponseCodeConst.LOGIN_FAILED); - } - if (EmployeeStatusEnum.DISABLED.equalsValue(employeeDTO.getIsDisabled())) { - return ResponseDTO.wrap(EmployeeResponseCodeConst.IS_DISABLED); - } - //jwt token赋值 - String compactJws = loginTokenService.generateToken(employeeDTO); - - LoginDetailVO loginDTO = SmartBeanUtil.copy(employeeDTO, LoginDetailVO.class); - - //获取前端功能权限 - loginDTO.setPrivilegeList(initEmployeePrivilege(employeeDTO.getId())); - - loginDTO.setXAccessToken(compactJws); - DepartmentEntity departmentEntity = departmentDao.selectById(employeeDTO.getDepartmentId()); - loginDTO.setDepartmentName(departmentEntity.getName()); - - //判断是否为超管 - Boolean isSuperman = privilegeEmployeeService.isSuperman(loginDTO.getId()); - loginDTO.setIsSuperMan(isSuperman); - //登陆操作日志 - UserAgent userAgent = UserAgent.parseUserAgentString(request.getHeader("User-Agent")); - UserLoginLogEntity logEntity = - UserLoginLogEntity.builder() - .userId(employeeDTO.getId()) - .userName(employeeDTO.getActualName()) - .remoteIp(SmartIPUtil.getRemoteIp(request)) - .remotePort(request.getRemotePort()) - .remoteBrowser(userAgent.getBrowser().getName()) - .remoteOs(userAgent.getOperatingSystem().getName()) - .loginStatus(JudgeEnum.YES.getValue()).build(); - logService.addLog(logEntity); - return ResponseDTO.succData(loginDTO); - } - - /** - * 手机端退出登陆,清除token缓存 - * - * @param requestToken - * @return 退出登陆是否成功,bool - */ - public ResponseDTO logoutByToken(RequestTokenBO requestToken) { - privilegeEmployeeService.removeCache(requestToken.getRequestUserId()); - return ResponseDTO.succ(); - } - - /** - * 获取验证码 - * - * @return - */ - public ResponseDTO verificationCode() { - KaptchaVO kaptchaVO = new KaptchaVO(); - String uuid = buildVerificationCodeRedisKey(UUID.randomUUID().toString()); - String kaptchaText = defaultKaptcha.createText(); - - String base64Code = ""; - - BufferedImage image = defaultKaptcha.createImage(kaptchaText); - ByteArrayOutputStream outputStream = null; - try { - outputStream = new ByteArrayOutputStream(); - ImageIO.write(image, "jpg", outputStream); - base64Code = Base64.encodeBase64String(outputStream.toByteArray()); - } catch (Exception e) { - log.error("verificationCode exception .{}", e); - } finally { - if (outputStream != null) { - try { - outputStream.close(); - } catch (Exception e) { - log.error("verificationCode outputStream close exception .{}", e); - } - } - } - kaptchaVO.setUuid(uuid); - kaptchaVO.setCode("data:image/png;base64," + base64Code); - redisValueOperations.set(uuid, kaptchaText, 60L, TimeUnit.SECONDS); - return ResponseDTO.succData(kaptchaVO); - } - - private String buildVerificationCodeRedisKey(String uuid) { - return String.format(VERIFICATION_CODE_REDIS_PREFIX, uuid); - } - - /** - * 初始化员工权限 - * - * @param employeeId - * @return - */ - public List initEmployeePrivilege(Long employeeId) { - List privilegeList = privilegeEmployeeService.getPrivilegesByEmployeeId(employeeId); - privilegeEmployeeService.updateCachePrivilege(employeeId, privilegeList); - return SmartBeanUtil.copyList(privilegeList, LoginPrivilegeDTO.class); - } - - public LoginDetailVO getSession(RequestTokenBO requestUser) { - LoginDetailVO loginDTO = SmartBeanUtil.copy(requestUser.getEmployeeBO(), LoginDetailVO.class); - List privilegeEntityList = privilegeEmployeeService.getEmployeeAllPrivilege(requestUser.getRequestUserId()); - //====== 开启缓存 ====== - if (privilegeEntityList == null) { - List loginPrivilegeDTOS = initEmployeePrivilege(requestUser.getRequestUserId()); - loginDTO.setPrivilegeList(loginPrivilegeDTOS); - } else { - loginDTO.setPrivilegeList(SmartBeanUtil.copyList(privilegeEntityList, LoginPrivilegeDTO.class)); - } - - //====== 不开启缓存 ====== -// List loginPrivilegeDTOS = initEmployeePrivilege(requestUser.getRequestUserId()); -// loginDTO.setPrivilegeList(loginPrivilegeDTOS); - - //判断是否为超管 - Boolean isSuperman = privilegeEmployeeService.isSuperman(loginDTO.getId()); - loginDTO.setIsSuperMan(isSuperman); - return loginDTO; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/LoginTokenService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/LoginTokenService.java deleted file mode 100644 index 56ec269a..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/LoginTokenService.java +++ /dev/null @@ -1,118 +0,0 @@ -package net.lab1024.smartadmin.module.system.login; - -import net.lab1024.smartadmin.common.constant.JudgeEnum; -import net.lab1024.smartadmin.module.system.employee.EmployeeService; -import net.lab1024.smartadmin.module.system.employee.constant.EmployeeStatusEnum; -import net.lab1024.smartadmin.module.system.employee.domain.bo.EmployeeBO; -import net.lab1024.smartadmin.module.system.employee.domain.dto.EmployeeDTO; -import net.lab1024.smartadmin.module.system.login.domain.RequestTokenBO; -import io.jsonwebtoken.Claims; -import io.jsonwebtoken.Jwts; -import io.jsonwebtoken.SignatureAlgorithm; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Service; - -import java.time.LocalDateTime; -import java.time.ZoneId; -import java.util.Date; -import java.util.UUID; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 - */ -@Slf4j -@Service -public class LoginTokenService { - - /** - * 过期时间一天 - */ - private static final int EXPIRE_SECONDS = 1 * 24 * 3600; - /** - * jwt加密字段 - */ - private static final String CLAIM_ID_KEY = "id"; - - @Value("${jwt.key}") - private String jwtKey; - - @Autowired - private EmployeeService employeeService; - - - /** - * 功能描述: 生成JWT TOKEN - * - * @param employeeDTO - * @return - * @auther yandanyang - * @date 2018/9/12 0012 上午 10:08 - */ - public String generateToken(EmployeeDTO employeeDTO) { - Long id = employeeDTO.getId(); - /**将token设置为jwt格式*/ - String baseToken = UUID.randomUUID().toString(); - LocalDateTime localDateTimeNow = LocalDateTime.now(); - LocalDateTime localDateTimeExpire = localDateTimeNow.plusSeconds(EXPIRE_SECONDS); - Date from = Date.from(localDateTimeNow.atZone(ZoneId.systemDefault()).toInstant()); - Date expire = Date.from(localDateTimeExpire.atZone(ZoneId.systemDefault()).toInstant()); - - Claims jwtClaims = Jwts.claims().setSubject(baseToken); - jwtClaims.put(CLAIM_ID_KEY, id); - String compactJws = Jwts.builder().setClaims(jwtClaims).setNotBefore(from).setExpiration(expire).signWith(SignatureAlgorithm.HS512, jwtKey).compact(); - - EmployeeBO employeeBO = employeeService.getById(id); - RequestTokenBO tokenBO = new RequestTokenBO(employeeBO); - - return compactJws; - } - - /** - * 功能描述: 根据登陆token获取登陆信息 - * - * @param - * @return - * @auther yandanyang - * @date 2018/9/12 0012 上午 10:11 - */ - public RequestTokenBO getEmployeeTokenInfo(String token) { - Long employeeId = -1L; - try { - Claims claims = Jwts.parser().setSigningKey(jwtKey).parseClaimsJws(token).getBody(); - String idStr = claims.get(CLAIM_ID_KEY).toString(); - employeeId = Long.valueOf(idStr); - } catch (Exception e) { - log.error("getEmployeeTokenInfo error:{}", e); - return null; - } - - EmployeeBO employeeBO = employeeService.getById(employeeId); - if (employeeBO == null) { - return null; - } - - if (EmployeeStatusEnum.DISABLED.getValue().equals(employeeBO.getIsDisabled())) { - return null; - } - - if (JudgeEnum.YES.equals(employeeBO.getIsLeave())) { - return null; - } - - if (JudgeEnum.YES.equals(employeeBO.getIsDelete())) { - return null; - } - - return new RequestTokenBO(employeeBO); - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/domain/KaptchaVO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/domain/KaptchaVO.java deleted file mode 100644 index 61814e63..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/domain/KaptchaVO.java +++ /dev/null @@ -1,28 +0,0 @@ -package net.lab1024.smartadmin.module.system.login.domain; - -import lombok.Data; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/7/4 0004 上午 10:11 - * @since JDK1.8 - */ -@Data -public class KaptchaVO { - - /** - * 验证码UUID - */ - private String uuid; - - /** - * base64 验证码 - */ - private String code; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/domain/LoginCacheDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/domain/LoginCacheDTO.java deleted file mode 100644 index c8e5f62f..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/domain/LoginCacheDTO.java +++ /dev/null @@ -1,28 +0,0 @@ -package net.lab1024.smartadmin.module.system.login.domain; - -import net.lab1024.smartadmin.module.system.employee.domain.dto.EmployeeDTO; -import lombok.Data; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/8/9 0009 下午 17:32 - * @since JDK1.8 - */ -@Data -public class LoginCacheDTO { - - /** - * 基本信息 - */ - private EmployeeDTO employeeDTO; - - /** - * 过期时间 - */ - private Long expireTime; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/domain/LoginDetailVO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/domain/LoginDetailVO.java deleted file mode 100644 index 72a27087..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/domain/LoginDetailVO.java +++ /dev/null @@ -1,68 +0,0 @@ -package net.lab1024.smartadmin.module.system.login.domain; - -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.Date; -import java.util.List; - -/** - * 登录返回DTO - * - * @author lidoudou - * @date 2017年12月21日上午09:06:31 - */ -@Data -public class LoginDetailVO { - - @ApiModelProperty("主键id") - private Long id; - - @ApiModelProperty("登录账号") - private String loginName; - - @ApiModelProperty("别名") - private String nickName; - - @ApiModelProperty("员工名称") - private String actualName; - - @ApiModelProperty("手机号码") - private String phone; - - @ApiModelProperty("身份证") - private String idCard; - - @ApiModelProperty("出生日期") - @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") - private Date birthday; - - @ApiModelProperty("创建者id") - private Long createUser; - - @ApiModelProperty("部门id") - private Long departmentId; - - @ApiModelProperty("是否离职") - private Integer isLeave; - - @ApiModelProperty("是否被禁用") - private Integer isDisabled; - - @ApiModelProperty("部门名称") - private String departmentName; - - @ApiModelProperty("邮箱") - private String email; - - @ApiModelProperty("登陆token") - private String xAccessToken; - - @ApiModelProperty("是否为超管") - private Boolean isSuperMan; - - @ApiModelProperty("权限列表") - private List privilegeList; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/domain/LoginPrivilegeDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/domain/LoginPrivilegeDTO.java deleted file mode 100644 index e1812b35..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/domain/LoginPrivilegeDTO.java +++ /dev/null @@ -1,33 +0,0 @@ -package net.lab1024.smartadmin.module.system.login.domain; - -import net.lab1024.smartadmin.common.anno.ApiModelPropertyEnum; -import net.lab1024.smartadmin.module.system.privilege.constant.PrivilegeTypeEnum; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/8/21 0021 上午 10:28 - * @since JDK1.8 - */ -@Data -public class LoginPrivilegeDTO { - - @ApiModelProperty("权限key") - private String key; - - @ApiModelPropertyEnum(enumDesc = "菜单类型",value = PrivilegeTypeEnum.class) - private Integer type; - - @ApiModelProperty("url") - private String url; - - @ApiModelProperty("父级key") - private String parentKey; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/domain/RequestTokenBO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/domain/RequestTokenBO.java deleted file mode 100644 index 101f66db..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/login/domain/RequestTokenBO.java +++ /dev/null @@ -1,26 +0,0 @@ -package net.lab1024.smartadmin.module.system.login.domain; - -import net.lab1024.smartadmin.module.system.employee.domain.bo.EmployeeBO; -import lombok.Getter; - - -@Getter -public class RequestTokenBO { - - private Long requestUserId; - - private EmployeeBO employeeBO; - - public RequestTokenBO(EmployeeBO employeeBO) { - this.requestUserId = employeeBO.getId(); - this.employeeBO = employeeBO; - } - - @Override - public String toString() { - return "RequestTokenBO{" + - "requestUserId=" + requestUserId + - ", employeeBO=" + employeeBO + - '}'; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/PositionController.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/PositionController.java deleted file mode 100644 index 0f1a311e..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/PositionController.java +++ /dev/null @@ -1,59 +0,0 @@ -package net.lab1024.smartadmin.module.system.position; - -import net.lab1024.smartadmin.common.anno.OperateLog; -import net.lab1024.smartadmin.common.domain.PageResultDTO; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.constant.SwaggerTagConst; -import net.lab1024.smartadmin.module.system.position.domain.dto.PositionAddDTO; -import net.lab1024.smartadmin.module.system.position.domain.dto.PositionQueryDTO; -import net.lab1024.smartadmin.module.system.position.domain.dto.PositionResultVO; -import net.lab1024.smartadmin.module.system.position.domain.dto.PositionUpdateDTO; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.validation.Valid; - -/** - * @author zzr - */ -@Api(tags = {SwaggerTagConst.Admin.MANAGER_JOB}) -@OperateLog -@RestController -public class PositionController { - - @Autowired - private PositionService positionService; - - @ApiOperation(value = "分页查询所有岗位", notes = "分页查询所有岗位 @author zzr") - @PostMapping("/position/getListPage") - public ResponseDTO> getJobPage(@RequestBody @Valid PositionQueryDTO queryDTO) { - return positionService.queryPositionByPage(queryDTO); - } - - @ApiOperation(value = "添加岗位", notes = "添加岗位 @author zzr") - @PostMapping("/position/add") - public ResponseDTO addJob(@RequestBody @Valid PositionAddDTO addDTO) { - return positionService.addPosition(addDTO); - } - - @ApiOperation(value = "更新岗位", notes = "更新岗位 @author zzr") - @PostMapping("/position/update") - public ResponseDTO updateJob(@RequestBody @Valid PositionUpdateDTO updateDTO) { - return positionService.updatePosition(updateDTO); - } - - @ApiOperation(value = "根据ID查询岗位", notes = "根据ID查询岗位 @author zzr") - @GetMapping("/position/queryById/{id}") - public ResponseDTO queryJobById(@PathVariable Long id) { - return positionService.queryPositionById(id); - } - - @ApiOperation(value = "根据ID删除岗位", notes = "根据ID删除岗位 @author zzr") - @GetMapping("/position/remove/{id}") - public ResponseDTO removeJob(@PathVariable Long id) { - return positionService.removePosition(id); - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/PositionDao.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/PositionDao.java deleted file mode 100644 index 68423c59..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/PositionDao.java +++ /dev/null @@ -1,63 +0,0 @@ -package net.lab1024.smartadmin.module.system.position; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import net.lab1024.smartadmin.module.system.position.domain.dto.PositionQueryDTO; -import net.lab1024.smartadmin.module.system.position.domain.dto.PositionRelationAddDTO; -import net.lab1024.smartadmin.module.system.position.domain.dto.PositionRelationQueryDTO; -import net.lab1024.smartadmin.module.system.position.domain.dto.PositionRelationResultDTO; -import net.lab1024.smartadmin.module.system.position.domain.entity.PositionEntity; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Component; - -import java.util.List; - -/** - * @author zzr - */ -@Mapper -@Component -public interface PositionDao extends BaseMapper { - - /** - * 查询岗位列表 - * - * @param page - * @param queryDTO - * @return - */ - List selectByPage(Page page, @Param("queryDTO") PositionQueryDTO queryDTO); - - /** - * 查询岗位与人员关系 - * - * @param positionRelationQueryDTO - * @return - */ - List selectRelation(PositionRelationQueryDTO positionRelationQueryDTO); - - /** - * 批量查询员工岗位信息 - * @param employeeIdList - * @return - */ - List selectEmployeesRelation(@Param("employeeIdList") List employeeIdList); - - /** - * 批量添加岗位 人员 关联关系 - * - * @param positionRelationAddDTO - * @return - */ - Integer insertBatchRelation(@Param("batchDTO")PositionRelationAddDTO positionRelationAddDTO); - - /** - * 删除指定人员的 岗位关联关系 - * - * @param employeeId - * @return - */ - Integer deleteRelationByEmployeeId(@Param("employeeId") Long employeeId); - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/PositionService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/PositionService.java deleted file mode 100644 index 58468969..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/PositionService.java +++ /dev/null @@ -1,124 +0,0 @@ -package net.lab1024.smartadmin.module.system.position; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import net.lab1024.smartadmin.common.domain.PageResultDTO; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.module.system.position.domain.dto.*; -import net.lab1024.smartadmin.module.system.position.domain.entity.PositionEntity; -import net.lab1024.smartadmin.util.SmartBeanUtil; -import net.lab1024.smartadmin.util.SmartPageUtil; -import org.apache.commons.collections.CollectionUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; -import java.util.stream.Collectors; - -/** - * @author zzr - */ -@Service -public class PositionService { - - @Autowired - private PositionDao positionDao; - - /** - * 查询岗位 - * - * @param queryDTO - * @return - */ - public ResponseDTO> queryPositionByPage(PositionQueryDTO queryDTO) { - Page page = SmartPageUtil.convert2QueryPage(queryDTO); - List entityList = positionDao.selectByPage(page, queryDTO); - page.setRecords(entityList.stream().map(e -> SmartBeanUtil.copy(e, PositionResultVO.class)).collect(Collectors.toList())); - PageResultDTO pageResultDTO = SmartPageUtil.convert2PageResult(page); - return ResponseDTO.succData(pageResultDTO); - } - - /** - * 新增岗位 - * - * @param addDTO - * @return - */ - public ResponseDTO addPosition(PositionAddDTO addDTO) { - PositionEntity positionEntity = SmartBeanUtil.copy(addDTO, PositionEntity.class); - positionDao.insert(positionEntity); - return ResponseDTO.succ(); - } - - /** - * 修改岗位 - * - * @param updateDTO - * @return - */ - public ResponseDTO updatePosition(PositionUpdateDTO updateDTO) { - PositionEntity positionEntity = SmartBeanUtil.copy(updateDTO, PositionEntity.class); - positionDao.updateById(positionEntity); - return ResponseDTO.succ(); - } - - /** - * 根据ID查询 - * - * @param id - * @return - */ - public ResponseDTO queryPositionById(Long id) { - return ResponseDTO.succData(SmartBeanUtil.copy(positionDao.selectById(id), PositionResultVO.class)); - } - - /** - * 删除岗位 - */ - public ResponseDTO removePosition(Long id) { - //查询是否还有人关联该岗位 - PositionRelationQueryDTO positionRelationQueryDTO = new PositionRelationQueryDTO(); - positionRelationQueryDTO.setPositionId(id); - List dtoList = positionDao.selectRelation(positionRelationQueryDTO); - if (CollectionUtils.isNotEmpty(dtoList)) { - return ResponseDTO.wrap(PositionResponseCodeConst.REMOVE_DEFINE); - } - positionDao.deleteById(id); - return ResponseDTO.succ(); - } - - /** - * 添加岗位关联关系 - * - * @param positionRelAddDTO - * @return - */ - public ResponseDTO addPositionRelation(PositionRelationAddDTO positionRelAddDTO) { - positionDao.insertBatchRelation(positionRelAddDTO); - return ResponseDTO.succ(); - } - - /** - * 删除指定用户的岗位关联关系 - * - * @param employeeId - * @return - */ - public ResponseDTO removePositionRelation(Long employeeId) { - positionDao.deleteRelationByEmployeeId(employeeId); - return ResponseDTO.succ(); - } - - /** - * 根据员工ID查询 所关联的岗位信息 - * - * @param employeeId - * @return - */ - public List queryPositionByEmployeeId(Long employeeId) { - PositionRelationQueryDTO positionRelationQueryDTO = new PositionRelationQueryDTO(); - positionRelationQueryDTO.setEmployeeId(employeeId); - List positionRelationList = positionDao.selectRelation(positionRelationQueryDTO); - return positionRelationList; - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/dto/PositionAddDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/dto/PositionAddDTO.java deleted file mode 100644 index d7b4d8b6..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/dto/PositionAddDTO.java +++ /dev/null @@ -1,28 +0,0 @@ -package net.lab1024.smartadmin.module.system.position.domain.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotBlank; - -/** - * 岗位 - * - * @author zzr - */ -@Data -public class PositionAddDTO { - - /** - * 岗位名称 - */ - @ApiModelProperty("岗位名称") - @NotBlank(message = "岗位名称不能为空") - private String positionName; - - /** - * 岗位描述 - */ - @ApiModelProperty("岗位描述") - private String remark; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/dto/PositionQueryDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/dto/PositionQueryDTO.java deleted file mode 100644 index 6ab8d066..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/dto/PositionQueryDTO.java +++ /dev/null @@ -1,18 +0,0 @@ -package net.lab1024.smartadmin.module.system.position.domain.dto; - -import net.lab1024.smartadmin.common.domain.PageParamDTO; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * 岗位 - * - * @author zzr - */ -@Data -public class PositionQueryDTO extends PageParamDTO { - - @ApiModelProperty("岗位名称") - private String positionName; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/dto/PositionRelationAddDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/dto/PositionRelationAddDTO.java deleted file mode 100644 index 509c1a22..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/dto/PositionRelationAddDTO.java +++ /dev/null @@ -1,32 +0,0 @@ -package net.lab1024.smartadmin.module.system.position.domain.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotNull; -import java.util.List; - -/** - * 岗位关系 - * - * @author zzr - */ -@Data -public class PositionRelationAddDTO { - - @ApiModelProperty("岗位ID") - @NotNull(message = "岗位ID 不能为空") - private List positionIdList; - - @ApiModelProperty("员工ID") - @NotNull(message = "员工ID 不能为空") - private Long employeeId; - - public PositionRelationAddDTO() { - } - - public PositionRelationAddDTO(List positionIdList, Long employeeId) { - this.positionIdList = positionIdList; - this.employeeId = employeeId; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/dto/PositionRelationQueryDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/dto/PositionRelationQueryDTO.java deleted file mode 100644 index 3732cd50..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/dto/PositionRelationQueryDTO.java +++ /dev/null @@ -1,20 +0,0 @@ -package net.lab1024.smartadmin.module.system.position.domain.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * 岗位关系 - * - * @author zzr - */ -@Data -public class PositionRelationQueryDTO { - - @ApiModelProperty("岗位ID") - private Long positionId; - - @ApiModelProperty("员工ID") - private Long employeeId; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/dto/PositionRelationResultDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/dto/PositionRelationResultDTO.java deleted file mode 100644 index 1881904f..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/dto/PositionRelationResultDTO.java +++ /dev/null @@ -1,40 +0,0 @@ -package net.lab1024.smartadmin.module.system.position.domain.dto; - -import lombok.Data; - -import java.util.Date; - -/** - * 岗位关联关系 - * - * @author zzr - */ -@Data -public class PositionRelationResultDTO { - - /** - * 岗位ID - */ - private Long positionId; - - /** - * 员工ID - */ - private Long employeeId; - - /** - * 岗位名称 - */ - private String positionName; - - /** - * 更新时间 - */ - private Date updateTime; - - /** - * 创建时间 - */ - private Date createTime; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/dto/PositionResultVO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/dto/PositionResultVO.java deleted file mode 100644 index 3bc89efd..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/dto/PositionResultVO.java +++ /dev/null @@ -1,41 +0,0 @@ -package net.lab1024.smartadmin.module.system.position.domain.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.Date; - -/** - * @author zzr - */ -@Data -public class PositionResultVO { - - @ApiModelProperty("主键") - private Long id; - - /** - * 更新时间 - */ - @ApiModelProperty("更新时间") - private Date updateTime; - - /** - * 创建时间 - */ - @ApiModelProperty("创建时间") - private Date createTime; - - /** - * 岗位名称 - */ - @ApiModelProperty("岗位名称") - private String positionName; - - /** - * 岗位描述 - */ - @ApiModelProperty("岗位描述") - private String remark; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/dto/PositionUpdateDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/dto/PositionUpdateDTO.java deleted file mode 100644 index 659da733..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/dto/PositionUpdateDTO.java +++ /dev/null @@ -1,16 +0,0 @@ -package net.lab1024.smartadmin.module.system.position.domain.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * 岗位 - * - * @author zzr - */ -@Data -public class PositionUpdateDTO extends PositionAddDTO { - - @ApiModelProperty("主键") - private Long id; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/entity/PositionEntity.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/entity/PositionEntity.java deleted file mode 100644 index a42af4ac..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/entity/PositionEntity.java +++ /dev/null @@ -1,26 +0,0 @@ -package net.lab1024.smartadmin.module.system.position.domain.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import net.lab1024.smartadmin.common.domain.BaseEntity; -import lombok.Data; - -/** - * 岗位 - * - * @author zzr - */ -@Data -@TableName("t_position") -public class PositionEntity extends BaseEntity { - - /** - * 岗位名称 - */ - private String positionName; - - /** - * 岗位描述 - */ - private String remark; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/entity/PositionRelationEntity.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/entity/PositionRelationEntity.java deleted file mode 100644 index b7ff8676..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/position/domain/entity/PositionRelationEntity.java +++ /dev/null @@ -1,26 +0,0 @@ -package net.lab1024.smartadmin.module.system.position.domain.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import net.lab1024.smartadmin.common.domain.BaseEntity; -import lombok.Data; - -/** - * 岗位关联关系 - * - * @author zzr - */ -@Data -@TableName("t_position_relation") -public class PositionRelationEntity extends BaseEntity { - - /** - * 岗位ID - */ - private Long positionId; - - /** - * 员工ID - */ - private Long employeeId; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/constant/PrivilegeTypeEnum.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/constant/PrivilegeTypeEnum.java deleted file mode 100644 index 96b175e6..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/constant/PrivilegeTypeEnum.java +++ /dev/null @@ -1,49 +0,0 @@ -package net.lab1024.smartadmin.module.system.privilege.constant; - - -import net.lab1024.smartadmin.common.domain.BaseEnum; - -import java.util.Arrays; -import java.util.Optional; - -/** - * - * [ ] - * - * @version 1.0 - * @since JDK1.8 - * @author yandanyang - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - */ -public enum PrivilegeTypeEnum implements BaseEnum { - - - MENU(1,"菜单"), - - POINTS(2,"功能点"); - - private Integer value; - - private String desc; - - PrivilegeTypeEnum(Integer value,String desc){ - this.value = value; - this.desc = desc; - } - @Override - public Integer getValue() { - return this.value; - } - - @Override - public String getDesc() { - return this.desc; - } - - public static PrivilegeTypeEnum selectByValue(Integer value) { - Optional first = Arrays.stream(PrivilegeTypeEnum.values()).filter(e -> e.getValue().equals(value)).findFirst(); - return !first.isPresent() ? null : first.get(); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/controller/PrivilegeController.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/controller/PrivilegeController.java deleted file mode 100644 index 3a073a2d..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/controller/PrivilegeController.java +++ /dev/null @@ -1,75 +0,0 @@ -package net.lab1024.smartadmin.module.system.privilege.controller; - -import net.lab1024.smartadmin.common.anno.OperateLog; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.common.domain.ValidateList; -import net.lab1024.smartadmin.constant.SwaggerTagConst; -import net.lab1024.smartadmin.module.system.privilege.service.PrivilegeService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import net.lab1024.smartadmin.module.system.privilege.domain.dto.*; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.validation.Valid; -import java.util.List; - -/** - * [ 与员工权限相关:角色权限关系、权限列表 ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 - */ -@OperateLog -@RestController -@Api(tags = {SwaggerTagConst.Admin.MANAGER_PRIVILEGE}) -public class PrivilegeController { - - @Autowired - private PrivilegeService privilegeService; - - @GetMapping("/privilege/getAllUrl") - @ApiOperation(value = "获取所有请求路径", notes = "获取所有请求路径") - public ResponseDTO> getAllUrl() { - return privilegeService.getPrivilegeUrlDTOList(); - } - - @ApiOperation(value = "菜单批量保存") - @PostMapping("/privilege/menu/batchSaveMenu") - public ResponseDTO menuBatchSave(@Valid @RequestBody ValidateList menuList) { - return privilegeService.menuBatchSave(menuList); - } - - - @ApiOperation(value = "查询所有菜单项") - @PostMapping("/privilege/menu/queryAll") - public ResponseDTO> queryAll() { - return privilegeService.menuQueryAll(); - } - - - @ApiOperation(value = "保存更新功能点") - @PostMapping("/privilege/function/saveOrUpdate") - public ResponseDTO functionSaveOrUpdate(@Valid @RequestBody PrivilegeFunctionDTO privilegeFunctionDTO) { - return privilegeService.functionSaveOrUpdate(privilegeFunctionDTO); - } - - @ApiOperation(value = "批量保存功能点") - @PostMapping("/privilege/function/batchSave") - public ResponseDTO batchSaveFunctionList(@Valid @RequestBody ValidateList functionList) { - return privilegeService.batchSaveFunctionList(functionList); - } - - - @ApiOperation(value = "查询菜单功能点", notes = "更新") - @PostMapping("/privilege/function/query/{menuKey}") - public ResponseDTO> functionQuery(@PathVariable String menuKey) { - return privilegeService.functionQuery(menuKey); - } - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/dao/PrivilegeDao.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/dao/PrivilegeDao.java deleted file mode 100644 index 291480d1..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/dao/PrivilegeDao.java +++ /dev/null @@ -1,94 +0,0 @@ -package net.lab1024.smartadmin.module.system.privilege.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import net.lab1024.smartadmin.module.system.privilege.domain.entity.PrivilegeEntity; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Component; - -import java.util.List; - - -/** - * - * [ ] - * - * @version 1.0 - * @since JDK1.8 - * @author yandanyang - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - */ -@Mapper -@Component -public interface PrivilegeDao extends BaseMapper { - - /** - * 根据权限key删除 - * @param keyList - */ - void delByKeyList(@Param("keyList") List keyList); - /** - * 根据权限parentkey删除 - * @param keyList - */ - void delByParentKeyList(@Param("keyList") List keyList); - - /** - * 批量保存 - * @param privilegeList - */ - void batchInsert(List privilegeList); - - /** - * 批量更新 - * @param privilegeList - */ - void batchUpdate(@Param("updateList") List privilegeList); - - /** - * 根据父节点key查询 - * @param parentKey - * @return - */ - List selectByParentKey(@Param("parentKey") String parentKey); - - /** - * 根据父节点key查询 - * @param keyList - * @return - */ - List selectByKeyList(@Param("keyList") List keyList); - - /** - * 根据权限key查询 - * @param key - * @return - */ - PrivilegeEntity selectByKey(@Param("key") String key); - - /** - * 根据类型查询 - * @param type - * @return - */ - List selectByExcludeType(@Param("type") Integer type); - - /** - * 根据类型查询 - * @param type - * @return - */ - List selectByType(@Param("type") Integer type); - - /** - * 查询所有权限 - * @return - */ - List selectAll(); - - - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/domain/dto/PrivilegeFunctionDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/domain/dto/PrivilegeFunctionDTO.java deleted file mode 100644 index 0e15a42c..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/domain/dto/PrivilegeFunctionDTO.java +++ /dev/null @@ -1,40 +0,0 @@ -package net.lab1024.smartadmin.module.system.privilege.domain.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/8/20 0020 下午 16:45 - * @since JDK1.8 - */ -@Data -public class PrivilegeFunctionDTO { - - @ApiModelProperty("功能点名称") - @NotBlank(message = "功能点名称不能为空") - private String functionName; - - @ApiModelProperty("所属菜单Key") - @NotBlank(message = "所属菜单Key不能为空") - private String menuKey; - - @ApiModelProperty("功能点Key") - @NotBlank(message = "功能点Key不能为空") - private String functionKey; - - @ApiModelProperty("url列表") - private String url; - - @ApiModelProperty("排序") - @NotNull(message = "请输入功能点顺序") - private Integer sort; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/domain/dto/PrivilegeFunctionVO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/domain/dto/PrivilegeFunctionVO.java deleted file mode 100644 index fd89f959..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/domain/dto/PrivilegeFunctionVO.java +++ /dev/null @@ -1,40 +0,0 @@ -package net.lab1024.smartadmin.module.system.privilege.domain.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotEmpty; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/8/20 0020 下午 16:45 - * @since JDK1.8 - */ -@Data -public class PrivilegeFunctionVO { - - @ApiModelProperty("功能点名称") - @NotBlank(message = "功能点名称不能为空") - private String functionName; - - @ApiModelProperty("所属菜单Key") - @NotBlank(message = "所属菜单Key不能为空") - private String menuKey; - - @ApiModelProperty("功能点Key") - @NotBlank(message = "功能点Key不能为空") - private String functionKey; - - @ApiModelProperty("url列表") - @NotEmpty(message = "url列表不能为空") - private String url; - - @ApiModelProperty("顺序") - private Integer sort; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/domain/dto/PrivilegeMenuDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/domain/dto/PrivilegeMenuDTO.java deleted file mode 100644 index 137f827d..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/domain/dto/PrivilegeMenuDTO.java +++ /dev/null @@ -1,45 +0,0 @@ -package net.lab1024.smartadmin.module.system.privilege.domain.dto; - -import net.lab1024.smartadmin.common.anno.ApiModelPropertyEnum; -import net.lab1024.smartadmin.module.system.privilege.constant.PrivilegeTypeEnum; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotNull; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/8/20 0020 下午 16:32 - * @since JDK1.8 - */ -@Data -public class PrivilegeMenuDTO { - - @ApiModelPropertyEnum(enumDesc = "菜单类型",value = PrivilegeTypeEnum.class) - @NotNull - private Integer type; - - @ApiModelProperty("菜单名") - @NotNull(message = "菜单名不能为空") - private String menuName; - - @ApiModelProperty("菜单Key") - @NotNull(message = "菜单Key不能为空") - private String menuKey; - - @ApiModelProperty("父级菜单Key,根节点不传") - private String parentKey; - - @ApiModelProperty("前端路由path") - @NotNull(message = "前端路由path不能为空") - private String url; - - @ApiModelProperty("排序字段") - @NotNull(message = "菜单项顺序不能为空") - private Integer sort; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/domain/dto/PrivilegeMenuVO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/domain/dto/PrivilegeMenuVO.java deleted file mode 100644 index 72febd9c..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/domain/dto/PrivilegeMenuVO.java +++ /dev/null @@ -1,35 +0,0 @@ -package net.lab1024.smartadmin.module.system.privilege.domain.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/8/20 0020 下午 16:41 - * @since JDK1.8 - */ -@Data -public class PrivilegeMenuVO { - - @ApiModelProperty("菜单名") - private String menuName; - - @ApiModelProperty("菜单Key") - private String menuKey; - - @ApiModelProperty("菜单父级Key") - private String parentKey; - - @ApiModelProperty("顺序") - private Integer sort; - - @ApiModelProperty("前端路由path") - private String url; - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/domain/dto/PrivilegeRequestUrlVO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/domain/dto/PrivilegeRequestUrlVO.java deleted file mode 100644 index d227c04d..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/domain/dto/PrivilegeRequestUrlVO.java +++ /dev/null @@ -1,27 +0,0 @@ -package net.lab1024.smartadmin.module.system.privilege.domain.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/3/28 0028 上午 9:20 - * @since JDK1.8 - */ -@Data -public class PrivilegeRequestUrlVO { - - @ApiModelProperty("注释说明") - private String comment; - - @ApiModelProperty("controller.method") - private String name; - - @ApiModelProperty("url") - private String url; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/domain/entity/PrivilegeEntity.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/domain/entity/PrivilegeEntity.java deleted file mode 100644 index df49b874..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/domain/entity/PrivilegeEntity.java +++ /dev/null @@ -1,57 +0,0 @@ -package net.lab1024.smartadmin.module.system.privilege.domain.entity; - -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableName; -import net.lab1024.smartadmin.common.domain.BaseEntity; -import lombok.Data; - -import java.io.Serializable; - -/** - * - * [ ] - * - * @version 1.0 - * @since JDK1.8 - * @author yandanyang - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - */ -@Data -@TableName("t_privilege") -public class PrivilegeEntity extends BaseEntity implements Serializable { - private static final long serialVersionUID = 3848408566432915214L; - - /** - * 功能权限类型:1.模块 2.页面 3.功能点 4.子模块 - */ - private Integer type; - - /** - * 菜单名称 - */ - private String name; - - /** - * 路由name 英文关键字 - */ - @TableField(value = "`key`") - private String key; - - - private String url; - - /** - * 排序 - */ - private Integer sort; - - - /** - * 父级key - */ - private String parentKey; - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/service/PrivilegeEmployeeService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/service/PrivilegeEmployeeService.java deleted file mode 100644 index 602a5b59..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/service/PrivilegeEmployeeService.java +++ /dev/null @@ -1,199 +0,0 @@ -package net.lab1024.smartadmin.module.system.privilege.service; - -import net.lab1024.smartadmin.common.constant.JudgeEnum; -import net.lab1024.smartadmin.common.exception.SmartBusinessException; -import net.lab1024.smartadmin.module.system.employee.domain.dto.EmployeeDTO; -import net.lab1024.smartadmin.module.system.login.domain.RequestTokenBO; -import net.lab1024.smartadmin.module.system.privilege.constant.PrivilegeTypeEnum; -import net.lab1024.smartadmin.module.system.privilege.dao.PrivilegeDao; -import net.lab1024.smartadmin.module.system.privilege.domain.entity.PrivilegeEntity; -import net.lab1024.smartadmin.module.system.role.roleemployee.RoleEmployeeDao; -import net.lab1024.smartadmin.module.system.role.roleprivilege.RolePrivilegeDao; -import net.lab1024.smartadmin.module.system.systemconfig.SystemConfigService; -import net.lab1024.smartadmin.module.system.systemconfig.constant.SystemConfigEnum; -import net.lab1024.smartadmin.module.system.systemconfig.domain.dto.SystemConfigDTO; -import net.lab1024.smartadmin.util.SmartStringUtil; -import com.google.common.collect.Lists; -import com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap; -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.*; -import java.util.concurrent.ConcurrentMap; -import java.util.stream.Collectors; - -/** - * [ 后台员工权限缓存方法 ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/3/28 0028 下午 14:07 - * @since JDK1.8 - */ -@Service -public class PrivilegeEmployeeService { - - /** - * 后台用户权限缓存 > - */ - private ConcurrentMap>> employeePrivileges = new ConcurrentLinkedHashMap.Builder>>().maximumWeightedCapacity(1000).build(); - private ConcurrentMap> employeePrivilegeListMap = new ConcurrentLinkedHashMap.Builder>().maximumWeightedCapacity(1000).build(); - - @Autowired - private SystemConfigService systemConfigService; - - @Autowired - private RoleEmployeeDao roleEmployeeDao; - - @Autowired - private RolePrivilegeDao rolePrivilegeDao; - - @Autowired - private PrivilegeDao privilegeDao; - - /** - * 移除某人缓存中的权限 - * - * @param employeeId - */ - public void removeCache(Long employeeId) { - this.employeePrivileges.remove(employeeId); - } - - /** - * 检查某人是否有访问某个方法的权限 - * - * @param requestTokenBO - * @param controllerName - * @param methodName - * @return - */ - public Boolean checkEmployeeHavePrivilege(RequestTokenBO requestTokenBO, String controllerName, String methodName) { - if (StringUtils.isEmpty(controllerName) || StringUtils.isEmpty(methodName)) { - return false; - } - Boolean isSuperman = requestTokenBO.getEmployeeBO().getIsSuperman(); - if (isSuperman) { - return true; - } - Map> privileges = this.getPrivileges(requestTokenBO.getRequestUserId()); - List urlList = privileges.get(controllerName.toLowerCase()); - if (CollectionUtils.isEmpty(urlList)) { - return false; - } - return urlList.contains(methodName); - } - - public List getEmployeeAllPrivilege(Long employeeId) { - return employeePrivilegeListMap.get(employeeId); - } - - /** - * 判断是否为超级管理员 - * - * @param employeeId - * @return - */ - public Boolean isSuperman(Long employeeId) { - SystemConfigDTO systemConfig = systemConfigService.getCacheByKey(SystemConfigEnum.Key.EMPLOYEE_SUPERMAN); - if (systemConfig == null) { - throw new SmartBusinessException("缺少系统配置项[" + SystemConfigEnum.Key.EMPLOYEE_SUPERMAN.name() + "]"); - } - - List superManIdsList = SmartStringUtil.splitConverToLongList(systemConfig.getConfigValue(), ","); - return superManIdsList.contains(employeeId); - } - - /** - * 根据员工ID 获取 权限信息 - * - * @param employeeId - * @return - */ - public List getPrivilegesByEmployeeId(Long employeeId) { - List privilegeEntities = null; - // 如果是超管的话 - Boolean isSuperman = this.isSuperman(employeeId); - if (isSuperman) { - privilegeEntities = privilegeDao.selectAll(); - } else { - privilegeEntities = loadPrivilegeFromDb(employeeId); - } - - if (privilegeEntities == null) { - privilegeEntities = Lists.newArrayList(); - } - - this.updateCachePrivilege(employeeId, privilegeEntities); - return privilegeEntities; - } - - /** - * 获取某人所能访问的方法 - * - * @param employeeId - * @return - */ - private Map> getPrivileges(Long employeeId) { - Map> privileges = employeePrivileges.get(employeeId); - if (privileges != null) { - return privileges; - } - List privilegeEntities = this.loadPrivilegeFromDb(employeeId); - return updateCachePrivilege(employeeId, privilegeEntities); - } - - private List loadPrivilegeFromDb(Long employeeId) { - List roleIdList = roleEmployeeDao.selectRoleIdByEmployeeId(employeeId); - if (CollectionUtils.isEmpty(roleIdList)) { - return Lists.newArrayList(); - } - List privilegeEntities = rolePrivilegeDao.listByRoleIds(roleIdList, JudgeEnum.YES.getValue()); - if (privilegeEntities != null) { - return privilegeEntities; - } - return Collections.emptyList(); - } - - public Map> updateCachePrivilege(Long employeeId, List privilegeEntities) { - employeePrivilegeListMap.put(employeeId, privilegeEntities); - List privilegeList = new ArrayList<>(); - Map> privilegeMap = new HashMap<>(16); - if (CollectionUtils.isNotEmpty(privilegeEntities)) { - List> setList = - privilegeEntities.stream().filter(e -> e.getType().equals(PrivilegeTypeEnum.POINTS.getValue())).map(PrivilegeEntity::getUrl).collect(Collectors.toList()).stream().map(e -> SmartStringUtil.splitConvertToList(e, ",")).collect(Collectors.toList()); - setList.forEach(privilegeList::addAll); - } - privilegeList.forEach(item -> { - List path = SmartStringUtil.splitConvertToList(item, "\\."); - String controllerName = path.get(0).toLowerCase(); - String methodName = path.get(1); - List methodNameList = privilegeMap.get(controllerName); - if (null == methodNameList) { - methodNameList = new ArrayList(); - } - if (!methodNameList.contains(methodName)) { - methodNameList.add(methodName); - } - privilegeMap.put(controllerName, methodNameList); - }); - - employeePrivileges.put(employeeId, privilegeMap); - return privilegeMap; - } - - public void updateOnlineEmployeePrivilegeByRoleId(Long roleId) { - List roleEmployeeList = roleEmployeeDao.selectEmployeeByRoleId(roleId); - List employeeIdList = roleEmployeeList.stream().map(e -> e.getId()).collect(Collectors.toList()); - - for (Long empId : employeePrivileges.keySet()) { - if (employeeIdList.contains(empId)) { - getPrivilegesByEmployeeId(empId); - } - } - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/service/PrivilegeService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/service/PrivilegeService.java deleted file mode 100644 index c66a919e..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/privilege/service/PrivilegeService.java +++ /dev/null @@ -1,285 +0,0 @@ -package net.lab1024.smartadmin.module.system.privilege.service; - -import com.google.common.collect.Lists; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.common.domain.ValidateList; -import net.lab1024.smartadmin.module.system.privilege.constant.PrivilegeResponseCodeConst; -import net.lab1024.smartadmin.module.system.privilege.constant.PrivilegeTypeEnum; -import net.lab1024.smartadmin.module.system.privilege.dao.PrivilegeDao; -import net.lab1024.smartadmin.module.system.privilege.domain.dto.*; -import net.lab1024.smartadmin.module.system.privilege.domain.entity.PrivilegeEntity; -import net.lab1024.smartadmin.module.system.role.roleprivilege.RolePrivilegeDao; -import org.apache.commons.collections.CollectionUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.*; -import java.util.stream.Collectors; - -/** - * [ 后台员工权限 ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 - */ -@Service -public class PrivilegeService { - - @Autowired - private PrivilegeRequestUrlService privilegeRequestUrlService; - - @Autowired - private PrivilegeDao privilegeDao; - - @Autowired - private RolePrivilegeDao rolePrivilegeDao; - - /** - * 获取系统所有请求路径 - * - * @return - */ - public ResponseDTO> getPrivilegeUrlDTOList() { - List privilegeUrlList = privilegeRequestUrlService.getPrivilegeList(); - return ResponseDTO.succData(privilegeUrlList); - } - - /** - * 批量保存权限菜单项 - * - * @param menuList - * @return - */ - @Transactional(rollbackFor = Throwable.class) - public ResponseDTO menuBatchSave(List menuList) { - if (CollectionUtils.isEmpty(menuList)) { - return ResponseDTO.succ(); - } - //使用前端发送权限的排序 - for (int i = 0; i < menuList.size(); i++) { - menuList.get(i).setSort(i); - } - - List privilegeList = privilegeDao.selectByExcludeType(PrivilegeTypeEnum.POINTS.getValue()); - //若数据库无数据 直接全部保存 - if (CollectionUtils.isEmpty(privilegeList)) { - List menuSaveEntity = this.buildPrivilegeMenuEntity(menuList); - privilegeDao.batchInsert(menuSaveEntity); - return ResponseDTO.succ(); - } - //处理需更新的菜单项 - Map storageMap = menuList.stream().collect(Collectors.toMap(PrivilegeMenuDTO::getMenuKey, e -> e)); - Set menuKeyList = storageMap.keySet(); - List updatePrivilegeList = privilegeList.stream().filter(e -> menuKeyList.contains(e.getKey())).collect(Collectors.toList()); - if (CollectionUtils.isNotEmpty(updatePrivilegeList)) { - this.rebuildPrivilegeMenuEntity(storageMap, updatePrivilegeList); - privilegeDao.batchUpdate(updatePrivilegeList); - } - //处理需删除的菜单项 - List delKeyList = privilegeList.stream().filter(e -> !menuKeyList.contains(e.getKey())).map(PrivilegeEntity::getKey).collect(Collectors.toList()); - if (CollectionUtils.isNotEmpty(delKeyList)) { - privilegeDao.delByKeyList(delKeyList); - //处理需删除的功能点 - privilegeDao.delByParentKeyList(delKeyList); - rolePrivilegeDao.deleteByPrivilegeKey(delKeyList); - } - - //处理需新增的菜单项 - List dbKeyList = privilegeList.stream().map(PrivilegeEntity::getKey).collect(Collectors.toList()); - List addPrivilegeList = menuList.stream().filter(e -> !dbKeyList.contains(e.getMenuKey())).collect(Collectors.toList()); - if (CollectionUtils.isNotEmpty(addPrivilegeList)) { - List menuAddEntity = this.buildPrivilegeMenuEntity(addPrivilegeList); - privilegeDao.batchInsert(menuAddEntity); - } - return ResponseDTO.succ(); - } - - /** - * 构建权限菜单项类别 - * - * @param menuList - * @return - */ - private List buildPrivilegeMenuEntity(List menuList) { - List privilegeList = Lists.newArrayList(); - PrivilegeEntity privilegeEntity; - for (PrivilegeMenuDTO menuDTO : menuList) { - privilegeEntity = new PrivilegeEntity(); - privilegeEntity.setKey(menuDTO.getMenuKey()); - privilegeEntity.setName(menuDTO.getMenuName()); - privilegeEntity.setParentKey(menuDTO.getParentKey()); - privilegeEntity.setType(menuDTO.getType()); - privilegeEntity.setSort(menuDTO.getSort()); - privilegeEntity.setUrl(menuDTO.getUrl()); - privilegeList.add(privilegeEntity); - } - return privilegeList; - } - - /** - * 更新权限菜单项 - * - * @param menuMap - * @param menuEntityList - */ - private void rebuildPrivilegeMenuEntity(Map menuMap, List menuEntityList) { - for (PrivilegeEntity menuEntity : menuEntityList) { - PrivilegeMenuDTO menuDTO = menuMap.get(menuEntity.getKey()); - menuEntity.setName(menuDTO.getMenuName()); - menuEntity.setParentKey(menuDTO.getParentKey()); - menuEntity.setType(menuDTO.getType()); - menuEntity.setSort(menuDTO.getSort()); - } - - } - - /** - * 查询所有的权限菜单 - * - * @return - */ - public ResponseDTO> menuQueryAll() { - List privilegeEntityList = privilegeDao.selectByType(PrivilegeTypeEnum.MENU.getValue()); - if (CollectionUtils.isEmpty(privilegeEntityList)) { - return ResponseDTO.succData(Lists.newArrayList()); - } - - List voList = privilegeEntityList.stream().map(e -> { - PrivilegeMenuVO vo = new PrivilegeMenuVO(); - vo.setMenuKey(e.getKey()); - vo.setMenuName(e.getName()); - vo.setParentKey(e.getParentKey()); - vo.setSort(e.getSort()); - vo.setUrl(e.getUrl()); - return vo; - }).collect(Collectors.toList()); - - return ResponseDTO.succData(voList); - } - - - /** - * 保存更新功能点 - * - * @param privilegeFunctionDTO - * @return - */ - public ResponseDTO functionSaveOrUpdate(PrivilegeFunctionDTO privilegeFunctionDTO) { - String functionKey = privilegeFunctionDTO.getFunctionKey(); - PrivilegeEntity functionEntity = privilegeDao.selectByKey(functionKey); - if (functionEntity == null) { - return ResponseDTO.wrap(PrivilegeResponseCodeConst.POINT_NOT_EXIST); - } - functionEntity.setUrl(privilegeFunctionDTO.getUrl()); - functionEntity.setName(privilegeFunctionDTO.getFunctionName()); - functionEntity.setParentKey(privilegeFunctionDTO.getMenuKey()); - functionEntity.setSort(privilegeFunctionDTO.getSort()); - privilegeDao.updateById(functionEntity); - - return ResponseDTO.succ(); - } - - /** - * 查询功能点 - * - * @param menuKey - * @return - */ - public ResponseDTO> functionQuery(String menuKey) { - List functionPrivilegeList = privilegeDao.selectByParentKey(menuKey); - if (CollectionUtils.isEmpty(functionPrivilegeList)) { - return ResponseDTO.succData(Lists.newArrayList()); - } - List functionList = Lists.newArrayList(); - for (PrivilegeEntity functionEntity : functionPrivilegeList) { - PrivilegeFunctionVO functionDTO = new PrivilegeFunctionVO(); - functionDTO.setFunctionKey(functionEntity.getKey()); - functionDTO.setFunctionName(functionEntity.getName()); - functionDTO.setMenuKey(functionEntity.getParentKey()); - functionDTO.setUrl(functionEntity.getUrl()); - functionDTO.setSort(functionEntity.getSort()); - functionList.add(functionDTO); - } - return ResponseDTO.succData(functionList); - } - - @Transactional(rollbackFor = Exception.class) - public ResponseDTO batchSaveFunctionList(ValidateList functionList) { - String menuKey = functionList.get(0).getMenuKey(); - PrivilegeEntity privilegeEntity = privilegeDao.selectByKey(menuKey); - if (privilegeEntity == null) { - return ResponseDTO.wrap(PrivilegeResponseCodeConst.MENU_NOT_EXIST); - } - - List functionKeyList = functionList.stream().map(PrivilegeFunctionDTO::getFunctionKey).collect(Collectors.toList()); - - //数据库中存在的数据 - List existFunctionList = privilegeDao.selectByKeyList(functionKeyList); - //校验是否parent key重复 - boolean parentKeyExist = existFunctionList.stream().anyMatch(e -> !menuKey.equals(e.getParentKey())); - if(parentKeyExist){ - return ResponseDTO.wrap(PrivilegeResponseCodeConst.ROUTER_KEY_NO_REPEAT); - } - - existFunctionList = privilegeDao.selectByParentKey(menuKey); - Map privilegeEntityMap = existFunctionList.stream().collect(Collectors.toMap(PrivilegeEntity::getKey, e -> e)); - //如果没有,则保存全部 - if (existFunctionList.isEmpty()) { - List privilegeEntityList = functionList.stream().map(e -> function2Privilege(e)).collect(Collectors.toList()); - privilegeDao.batchInsert(privilegeEntityList); - return ResponseDTO.succ(); - } - - Set functionKeySet = functionList.stream().map(PrivilegeFunctionDTO::getFunctionKey).collect(Collectors.toSet()); - //删除的 - List deleteIdList = existFunctionList.stream().filter(e -> !functionKeySet.contains(e.getKey())).map(PrivilegeEntity::getId).collect(Collectors.toList()); - List deleteKeyList = existFunctionList.stream().filter(e -> !functionKeySet.contains(e.getKey())).map(PrivilegeEntity::getKey).collect(Collectors.toList()); - if (!deleteIdList.isEmpty()) { - privilegeDao.deleteBatchIds(deleteIdList); - rolePrivilegeDao.deleteByPrivilegeKey(deleteKeyList); - } - - //需要更新的 - ArrayList batchUpdateList = Lists.newArrayList(); - for (PrivilegeFunctionDTO privilegeFunctionDTO : functionList) { - PrivilegeEntity existPrivilege = privilegeEntityMap.get(privilegeFunctionDTO.getFunctionKey()); - if (existPrivilege != null) { - existPrivilege.setSort(privilegeFunctionDTO.getSort()); - existPrivilege.setName(privilegeFunctionDTO.getFunctionName()); - batchUpdateList.add(existPrivilege); - } - } - - if (!batchUpdateList.isEmpty()) { - privilegeDao.batchUpdate(batchUpdateList); - } - - //新增的 - List batchInsertList = functionList.stream() - .filter(e -> !privilegeEntityMap.containsKey(e.getFunctionKey())) - .map(e -> function2Privilege(e)) - .collect(Collectors.toList()); - - if (!batchInsertList.isEmpty()) { - privilegeDao.batchInsert(batchInsertList); - } - - return ResponseDTO.succ(); - } - - private PrivilegeEntity function2Privilege(PrivilegeFunctionDTO privilegeFunction) { - PrivilegeEntity privilegeEntity = new PrivilegeEntity(); - privilegeEntity.setKey(privilegeFunction.getFunctionKey()); - privilegeEntity.setName(privilegeFunction.getFunctionName()); - privilegeEntity.setParentKey(privilegeFunction.getMenuKey()); - privilegeEntity.setType(PrivilegeTypeEnum.POINTS.getValue()); - privilegeEntity.setSort(privilegeFunction.getSort()); - privilegeEntity.setUrl(""); - return privilegeEntity; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/domain/dto/RoleQueryDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/domain/dto/RoleQueryDTO.java deleted file mode 100644 index 08f2a94b..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/domain/dto/RoleQueryDTO.java +++ /dev/null @@ -1,25 +0,0 @@ -package net.lab1024.smartadmin.module.system.role.basic.domain.dto; -import net.lab1024.smartadmin.common.domain.PageParamDTO; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * - * [ ] - * - * @version 1.0 - * @since JDK1.8 - * @author yandanyang - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - */ -@Data -public class RoleQueryDTO extends PageParamDTO { - - @ApiModelProperty("角色名称") - private String roleName; - - @ApiModelProperty("角色id") - private String roleId; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/domain/dto/RoleSelectedVO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/domain/dto/RoleSelectedVO.java deleted file mode 100644 index 9a88d6d2..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/domain/dto/RoleSelectedVO.java +++ /dev/null @@ -1,21 +0,0 @@ -package net.lab1024.smartadmin.module.system.role.basic.domain.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/3/27 0027 下午 15:27 - * @since JDK1.8 - */ -@Data -public class RoleSelectedVO extends RoleVO { - - @ApiModelProperty("角色名称") - private Boolean selected; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/domain/entity/RoleEntity.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/domain/entity/RoleEntity.java deleted file mode 100644 index ff9d650f..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/basic/domain/entity/RoleEntity.java +++ /dev/null @@ -1,25 +0,0 @@ -package net.lab1024.smartadmin.module.system.role.basic.domain.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import net.lab1024.smartadmin.common.domain.BaseEntity; -import lombok.Data; - -/** - * [ 角色 ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/3/27 0027 下午 13:01 - * @since JDK1.8 - */ -@Data -@TableName("t_role") -public class RoleEntity extends BaseEntity { - - - private String roleName; - - private String remark; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleemployee/RoleEmployeeService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleemployee/RoleEmployeeService.java deleted file mode 100644 index cf57ed4f..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleemployee/RoleEmployeeService.java +++ /dev/null @@ -1,132 +0,0 @@ -package net.lab1024.smartadmin.module.system.role.roleemployee; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import net.lab1024.smartadmin.common.domain.PageResultDTO; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.module.system.department.DepartmentDao; -import net.lab1024.smartadmin.module.system.department.domain.entity.DepartmentEntity; -import net.lab1024.smartadmin.module.system.employee.domain.dto.EmployeeDTO; -import net.lab1024.smartadmin.module.system.employee.domain.vo.EmployeeVO; -import net.lab1024.smartadmin.module.system.role.basic.RoleDao; -import net.lab1024.smartadmin.module.system.role.basic.RoleResponseCodeConst; -import net.lab1024.smartadmin.module.system.role.basic.domain.dto.RoleBatchDTO; -import net.lab1024.smartadmin.module.system.role.basic.domain.dto.RoleQueryDTO; -import net.lab1024.smartadmin.module.system.role.basic.domain.dto.RoleSelectedVO; -import net.lab1024.smartadmin.module.system.role.basic.domain.entity.RoleEntity; -import net.lab1024.smartadmin.module.system.role.roleemployee.domain.RoleEmployeeEntity; -import net.lab1024.smartadmin.util.SmartBeanUtil; -import net.lab1024.smartadmin.util.SmartPageUtil; -import com.google.common.collect.Lists; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -/** - * 角色管理业务 - * - * @author zzr - * @date 2019/4/3 - */ -@Service -public class RoleEmployeeService { - - @Autowired - private RoleEmployeeDao roleEmployeeDao; - - @Autowired - private RoleDao roleDao; - - @Autowired - private DepartmentDao departmentDao; - - /** - * 通过角色id,分页获取成员员工列表 - * - * @param queryDTO - * @return - */ - public ResponseDTO> listEmployeeByName(RoleQueryDTO queryDTO) { - Page page = SmartPageUtil.convert2QueryPage(queryDTO); - List employeeDTOS = roleEmployeeDao.selectEmployeeByNamePage(page, queryDTO); - employeeDTOS.stream().filter(e -> e.getDepartmentId() != null).forEach(employeeDTO -> { - DepartmentEntity departmentEntity = departmentDao.selectById(employeeDTO.getDepartmentId()); - employeeDTO.setDepartmentName(departmentEntity.getName()); - }); - PageResultDTO pageResultDTO = SmartPageUtil.convert2PageResult(page, employeeDTOS, EmployeeVO.class); - return ResponseDTO.succData(pageResultDTO); - } - - public ResponseDTO> getAllEmployeeByRoleId(Long roleId) { - List employeeDTOS = roleEmployeeDao.selectEmployeeByRoleId(roleId); - List list = SmartBeanUtil.copyList(employeeDTOS, EmployeeVO.class); - return ResponseDTO.succData(list); - } - - /** - * 移除员工角色 - * - * @param employeeId - * @param roleId - * @return ResponseDTO - */ - @Transactional(rollbackFor = Exception.class) - public ResponseDTO removeEmployeeRole(Long employeeId, Long roleId) { - if (null == employeeId || null == roleId) { - return ResponseDTO.wrap(RoleResponseCodeConst.ERROR_PARAM); - } - roleEmployeeDao.deleteByEmployeeIdRoleId(employeeId, roleId); - return ResponseDTO.succ(); - } - - /** - * 批量删除角色的成员员工 - * - * @param removeDTO - * @return ResponseDTO - */ - @Transactional(rollbackFor = Exception.class) - public ResponseDTO batchRemoveEmployeeRole(RoleBatchDTO removeDTO) { - List employeeIdList = removeDTO.getEmployeeIds(); - roleEmployeeDao.batchDeleteEmployeeRole(removeDTO.getRoleId(), employeeIdList); - return ResponseDTO.succ(); - } - - /** - * 批量添加角色的成员员工 - * - * @param addDTO - * @return ResponseDTO - */ - @Transactional(rollbackFor = Exception.class) - public ResponseDTO batchAddEmployeeRole(RoleBatchDTO addDTO) { - Long roleId = addDTO.getRoleId(); - List employeeIdList = addDTO.getEmployeeIds(); - roleEmployeeDao.deleteByRoleId(roleId); - List roleRelationEntities = Lists.newArrayList(); - RoleEmployeeEntity employeeRoleRelationEntity; - for (Long employeeId : employeeIdList) { - employeeRoleRelationEntity = new RoleEmployeeEntity(); - employeeRoleRelationEntity.setRoleId(roleId); - employeeRoleRelationEntity.setEmployeeId(employeeId); - roleRelationEntities.add(employeeRoleRelationEntity); - } - roleEmployeeDao.batchInsert(roleRelationEntities); - return ResponseDTO.succ(); - } - - /** - * 通过员工id获取员工角色 - * - * @param employeeId - * @return - */ - public ResponseDTO> getRolesByEmployeeId(Long employeeId) { - List roleIds = roleEmployeeDao.selectRoleIdByEmployeeId(employeeId); - List roleList = roleDao.selectList(null); - List result = SmartBeanUtil.copyList(roleList, RoleSelectedVO.class); - result.stream().forEach(item -> item.setSelected(roleIds.contains(item.getId()))); - return ResponseDTO.succData(result); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleemployee/domain/RoleEmployeeDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleemployee/domain/RoleEmployeeDTO.java deleted file mode 100644 index 5dc70111..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleemployee/domain/RoleEmployeeDTO.java +++ /dev/null @@ -1,21 +0,0 @@ -package net.lab1024.smartadmin.module.system.role.roleemployee.domain; - -import lombok.Data; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/3/27 0027 下午 15:27 - * @since JDK1.8 - */ -@Data -public class RoleEmployeeDTO { - - private Long roleId; - - private Long employeeId; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleemployee/domain/RoleEmployeeEntity.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleemployee/domain/RoleEmployeeEntity.java deleted file mode 100644 index 58d16994..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleemployee/domain/RoleEmployeeEntity.java +++ /dev/null @@ -1,24 +0,0 @@ -package net.lab1024.smartadmin.module.system.role.roleemployee.domain; - -import com.baomidou.mybatisplus.annotation.TableName; -import net.lab1024.smartadmin.common.domain.BaseEntity; -import lombok.Data; - -/** - * [ 角色 员工关系] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/3/27 0027 下午 13:01 - * @since JDK1.8 - */ -@Data -@TableName("t_role_employee") -public class RoleEmployeeEntity extends BaseEntity { - - private Long roleId; - - private Long employeeId; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleprivilege/RolePrivilegeController.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleprivilege/RolePrivilegeController.java deleted file mode 100644 index 3cb021ef..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleprivilege/RolePrivilegeController.java +++ /dev/null @@ -1,45 +0,0 @@ -package net.lab1024.smartadmin.module.system.role.roleprivilege; - -import net.lab1024.smartadmin.common.anno.OperateLog; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.constant.SwaggerTagConst; -import net.lab1024.smartadmin.module.system.role.roleprivilege.domain.dto.RolePrivilegeDTO; -import net.lab1024.smartadmin.module.system.role.roleprivilege.domain.dto.RolePrivilegeTreeVO; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.validation.Valid; - -/** - * [ 与员工权限相关:角色权限关系、权限列表 ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 - */ -@OperateLog -@RestController -@Api(tags = {SwaggerTagConst.Admin.MANAGER_ROLE_PRIVILEGE}) -public class RolePrivilegeController { - - @Autowired - private RolePrivilegeService rolePrivilegeService; - - @ApiOperation(value = "更新角色权限", notes = "更新角色权限") - @PostMapping("/privilege/updateRolePrivilege") - public ResponseDTO updateRolePrivilege(@Valid @RequestBody RolePrivilegeDTO updateDTO) { - return rolePrivilegeService.updateRolePrivilege(updateDTO); - } - - @ApiOperation(value = "获取角色可选的功能权限", notes = "获取角色可选的功能权限") - @GetMapping("/privilege/listPrivilegeByRoleId/{roleId}") - public ResponseDTO listPrivilegeByRoleId(@PathVariable("roleId") Long roleId) { - return rolePrivilegeService.listPrivilegeByRoleId(roleId); - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleprivilege/RolePrivilegeDao.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleprivilege/RolePrivilegeDao.java deleted file mode 100644 index ebf4284b..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleprivilege/RolePrivilegeDao.java +++ /dev/null @@ -1,58 +0,0 @@ -package net.lab1024.smartadmin.module.system.role.roleprivilege; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import net.lab1024.smartadmin.module.system.privilege.domain.entity.PrivilegeEntity; -import net.lab1024.smartadmin.module.system.role.roleprivilege.domain.entity.RolePrivilegeEntity; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Component; - -import java.util.List; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/3/28 0028 下午 12:23 - * @since JDK1.8 - */ -@Mapper -@Component -public interface RolePrivilegeDao extends BaseMapper { - - /** - * 根据角色id删除 - * @param roleId - */ - void deleteByRoleId(@Param("roleId")Long roleId); - - /** - * 删除权限所关联的角色信息 - * @param privilegeKeyList - */ - void deleteByPrivilegeKey(@Param("privilegeKeyList")List privilegeKeyList); - - - /** - * 批量添加 - * @param rolePrivilegeList - */ - void batchInsert(List rolePrivilegeList); - - /** - * 查询某批角色的权限 - * @param roleIds - * @return - */ - List listByRoleIds(@Param("roleIds")List roleIds,@Param("normalStatus")Integer normalStatus); - - /** - * 查询某个角色的权限 - * @param roleId - * @return - */ - List listByRoleId(@Param("roleId")Long roleId); -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleprivilege/RolePrivilegeService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleprivilege/RolePrivilegeService.java deleted file mode 100644 index dd39f36f..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleprivilege/RolePrivilegeService.java +++ /dev/null @@ -1,129 +0,0 @@ -package net.lab1024.smartadmin.module.system.role.roleprivilege; - -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.module.system.privilege.dao.PrivilegeDao; -import net.lab1024.smartadmin.module.system.privilege.domain.entity.PrivilegeEntity; -import net.lab1024.smartadmin.module.system.privilege.service.PrivilegeEmployeeService; -import net.lab1024.smartadmin.module.system.role.basic.RoleDao; -import net.lab1024.smartadmin.module.system.role.basic.RoleResponseCodeConst; -import net.lab1024.smartadmin.module.system.role.basic.domain.entity.RoleEntity; -import net.lab1024.smartadmin.module.system.role.roleprivilege.domain.dto.RolePrivilegeDTO; -import net.lab1024.smartadmin.module.system.role.roleprivilege.domain.dto.RolePrivilegeSimpleDTO; -import net.lab1024.smartadmin.module.system.role.roleprivilege.domain.dto.RolePrivilegeTreeVO; -import net.lab1024.smartadmin.module.system.role.roleprivilege.domain.entity.RolePrivilegeEntity; -import net.lab1024.smartadmin.util.SmartBeanUtil; -import com.google.common.collect.Lists; -import org.apache.commons.collections.CollectionUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.Comparator; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -/** - * [ 后台员工权限 ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 - */ -@Service -public class RolePrivilegeService { - - @Autowired - private PrivilegeDao privilegeDao; - - @Autowired - private RoleDao roleDao; - - @Autowired - private RolePrivilegeDao rolePrivilegeDao; - - @Autowired - private PrivilegeEmployeeService privilegeEmployeeService; - - /** - * 更新角色权限 - * - * @param updateDTO - * @return ResponseDTO - */ - public ResponseDTO updateRolePrivilege(RolePrivilegeDTO updateDTO) { - Long roleId = updateDTO.getRoleId(); - RoleEntity roleEntity = roleDao.selectById(roleId); - if (null == roleEntity) { - return ResponseDTO.wrap(RoleResponseCodeConst.ROLE_NOT_EXISTS); - } - rolePrivilegeDao.deleteByRoleId(roleId); - List rolePrivilegeList = Lists.newArrayList(); - RolePrivilegeEntity rolePrivilegeEntity; - for (String privilegeKey : updateDTO.getPrivilegeKeyList()) { - rolePrivilegeEntity = new RolePrivilegeEntity(); - rolePrivilegeEntity.setRoleId(roleId); - rolePrivilegeEntity.setPrivilegeKey(privilegeKey); - rolePrivilegeList.add(rolePrivilegeEntity); - } - rolePrivilegeDao.batchInsert(rolePrivilegeList); - privilegeEmployeeService.updateOnlineEmployeePrivilegeByRoleId(roleId); - return ResponseDTO.succ(); - } - - public ResponseDTO listPrivilegeByRoleId(Long roleId) { - RolePrivilegeTreeVO rolePrivilegeTreeDTO = new RolePrivilegeTreeVO(); - rolePrivilegeTreeDTO.setRoleId(roleId); - - List privilegeDTOList = privilegeDao.selectAll(); - if (CollectionUtils.isEmpty(privilegeDTOList)) { - rolePrivilegeTreeDTO.setPrivilege(Lists.newArrayList()); - rolePrivilegeTreeDTO.setSelectedKey(Lists.newArrayList()); - return ResponseDTO.succData(rolePrivilegeTreeDTO); - } - //构造权限树 - List privilegeList = this.buildPrivilegeTree(privilegeDTOList); - //设置选中状态 - List rolePrivilegeEntityList = rolePrivilegeDao.listByRoleId(roleId); - List privilegeKeyList = rolePrivilegeEntityList.stream().map(e -> e.getKey()).collect(Collectors.toList()); - rolePrivilegeTreeDTO.setPrivilege(privilegeList); - rolePrivilegeTreeDTO.setSelectedKey(privilegeKeyList); - return ResponseDTO.succData(rolePrivilegeTreeDTO); - } - - private List buildPrivilegeTree(List privilegeEntityList) { - List privilegeTree = Lists.newArrayList(); - List rootPrivilege = privilegeEntityList.stream().filter(e -> e.getParentKey() == null).collect(Collectors.toList()); - rootPrivilege.sort(Comparator.comparing(PrivilegeEntity::getSort)); - if (CollectionUtils.isEmpty(rootPrivilege)) { - return privilegeTree; - } - privilegeTree = SmartBeanUtil.copyList(rootPrivilege, RolePrivilegeSimpleDTO.class); - privilegeTree.forEach(e -> e.setChildren(Lists.newArrayList())); - this.buildChildPrivilegeList(privilegeEntityList, privilegeTree); - return privilegeTree; - } - - private void buildChildPrivilegeList(List privilegeEntityList, List parentMenuList) { - List parentKeyList = parentMenuList.stream().map(RolePrivilegeSimpleDTO :: getKey).collect(Collectors.toList()); - List childEntityList = privilegeEntityList.stream().filter(e -> parentKeyList.contains(e.getParentKey())).collect(Collectors.toList()); - if (CollectionUtils.isEmpty(childEntityList)) { - return; - } - Map> listMap = childEntityList.stream().collect(Collectors.groupingBy(PrivilegeEntity :: getParentKey)); - for (RolePrivilegeSimpleDTO rolePrivilegeSimpleDTO : parentMenuList) { - String key = rolePrivilegeSimpleDTO.getKey(); - List privilegeEntities = listMap.get(key); - if (CollectionUtils.isEmpty(privilegeEntities)) { - continue; - } - privilegeEntities.sort(Comparator.comparing(PrivilegeEntity::getSort)); - List privilegeList = SmartBeanUtil.copyList(privilegeEntities, RolePrivilegeSimpleDTO.class); - privilegeList.forEach(e -> e.setChildren(Lists.newArrayList())); - rolePrivilegeSimpleDTO.setChildren(privilegeList); - this.buildChildPrivilegeList(privilegeEntityList, privilegeList); - } - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleprivilege/domain/dto/RolePrivilegeDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleprivilege/domain/dto/RolePrivilegeDTO.java deleted file mode 100644 index 261fbfd0..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleprivilege/domain/dto/RolePrivilegeDTO.java +++ /dev/null @@ -1,35 +0,0 @@ -package net.lab1024.smartadmin.module.system.role.roleprivilege.domain.dto; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotNull; -import java.util.List; -/** - * - * [ ] - * - * @version 1.0 - * @since JDK1.8 - * @author yandanyang - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - */ -@Data -public class RolePrivilegeDTO { - - /** - * 角色id - */ - @ApiModelProperty("角色id") - @NotNull(message = "角色id不能为空") - private Long roleId; - - /** - * 功能权限id 集合 - */ - @ApiModelProperty("功能权限Key集合") - @NotNull(message = "功能权限集合不能为空") - private List privilegeKeyList; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleprivilege/domain/dto/RolePrivilegeSimpleDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleprivilege/domain/dto/RolePrivilegeSimpleDTO.java deleted file mode 100644 index 754b60f1..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleprivilege/domain/dto/RolePrivilegeSimpleDTO.java +++ /dev/null @@ -1,43 +0,0 @@ -package net.lab1024.smartadmin.module.system.role.roleprivilege.domain.dto; - -import net.lab1024.smartadmin.common.anno.ApiModelPropertyEnum; -import net.lab1024.smartadmin.module.system.privilege.constant.PrivilegeTypeEnum; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.List; - -/** - * 角色功能权限 - * - * @author listen - * @date 2018/01/03 08:48 - */ -@Data -public class RolePrivilegeSimpleDTO { - - @ApiModelProperty("父级Key") - private String parentKey; - /** - * 功能名称 - */ - @ApiModelProperty("名称") - private String name; - - @ApiModelPropertyEnum(enumDesc = "类型",value = PrivilegeTypeEnum.class) - private Integer type; - - @ApiModelProperty("key") - private String key; - - @ApiModelProperty("url") - private String url; - - @ApiModelProperty("排序") - private Integer sort; - - @ApiModelProperty("子级列表") - private List children; - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleprivilege/domain/dto/RolePrivilegeTreeVO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleprivilege/domain/dto/RolePrivilegeTreeVO.java deleted file mode 100644 index 2d441f85..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleprivilege/domain/dto/RolePrivilegeTreeVO.java +++ /dev/null @@ -1,19 +0,0 @@ -package net.lab1024.smartadmin.module.system.role.roleprivilege.domain.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.List; - -@Data -public class RolePrivilegeTreeVO { - - @ApiModelProperty("角色ID") - private Long roleId; - - @ApiModelProperty("权限列表") - private List privilege; - - @ApiModelProperty("选中的权限") - private List selectedKey; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleprivilege/domain/entity/RolePrivilegeEntity.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleprivilege/domain/entity/RolePrivilegeEntity.java deleted file mode 100644 index b17c80cc..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/role/roleprivilege/domain/entity/RolePrivilegeEntity.java +++ /dev/null @@ -1,32 +0,0 @@ -package net.lab1024.smartadmin.module.system.role.roleprivilege.domain.entity; -import com.baomidou.mybatisplus.annotation.TableName; -import net.lab1024.smartadmin.common.domain.BaseEntity; -import lombok.Data; - -/** - * - * [ 角色 权限关系 ] - * - * @version 1.0 - * @since JDK1.8 - * @author yandanyang - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - */ -@Data -@TableName("t_role_privilege") -public class RolePrivilegeEntity extends BaseEntity { - - /** - * 角色 id - */ - private Long roleId; - - /** - * 功能权限 id - */ - private String privilegeKey; - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/SystemConfigController.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/SystemConfigController.java deleted file mode 100644 index efe62f4c..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/SystemConfigController.java +++ /dev/null @@ -1,70 +0,0 @@ -package net.lab1024.smartadmin.module.system.systemconfig; - -import net.lab1024.smartadmin.common.anno.OperateLog; -import net.lab1024.smartadmin.common.domain.PageResultDTO; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.constant.SwaggerTagConst; -import net.lab1024.smartadmin.module.system.systemconfig.domain.dto.SystemConfigAddDTO; -import net.lab1024.smartadmin.module.system.systemconfig.domain.dto.SystemConfigQueryDTO; -import net.lab1024.smartadmin.module.system.systemconfig.domain.dto.SystemConfigUpdateDTO; -import net.lab1024.smartadmin.module.system.systemconfig.domain.dto.SystemConfigVO; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RestController; - -import javax.validation.Valid; -import java.util.List; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 - */ -@Api(tags = {SwaggerTagConst.Admin.MANAGER_SYSTEM_CONFIG}) -@OperateLog -@RestController -public class SystemConfigController { - - @Autowired - private SystemConfigService systemConfigService; - - @ApiOperation(value = "分页查询所有系统配置", notes = "分页查询所有系统配置") - @PostMapping("systemConfig/getListPage") - public ResponseDTO> getSystemConfigPage(@RequestBody @Valid SystemConfigQueryDTO queryDTO) { - return systemConfigService.getSystemConfigPage(queryDTO); - } - - @ApiOperation(value = "添加配置参数", notes = "添加配置参数") - @PostMapping("systemConfig/add") - public ResponseDTO addSystemConfig(@RequestBody @Valid SystemConfigAddDTO configAddDTO) { - return systemConfigService.addSystemConfig(configAddDTO); - } - - @ApiOperation(value = "修改配置参数", notes = "修改配置参数") - @PostMapping("systemConfig/update") - public ResponseDTO updateSystemConfig(@RequestBody @Valid SystemConfigUpdateDTO updateDTO) { - return systemConfigService.updateSystemConfig(updateDTO); - } - - @ApiOperation(value = "根据分组查询所有系统配置", notes = "根据分组查询所有系统配置") - @GetMapping("systemConfig/getListByGroup") - public ResponseDTO> getListByGroup(String group) { - return systemConfigService.getListByGroup(group); - } - - @ApiOperation(value = "通过key获取对应的信息", notes = "通过key获取对应的信息") - @GetMapping("systemConfig/selectByKey") - public ResponseDTO selectByKey(String configKey) { - return systemConfigService.selectByKey(configKey); - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/SystemConfigDao.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/SystemConfigDao.java deleted file mode 100644 index e8114f11..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/SystemConfigDao.java +++ /dev/null @@ -1,62 +0,0 @@ -package net.lab1024.smartadmin.module.system.systemconfig; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import net.lab1024.smartadmin.module.system.systemconfig.domain.dto.SystemConfigQueryDTO; -import net.lab1024.smartadmin.module.system.systemconfig.domain.entity.SystemConfigEntity; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Component; - -import java.util.List; - -/** - * 系统参数配置 t_system_config Dao层 - * - * @author GHQ - * @date 2017-12-23 14:25 - */ -@Component -@Mapper -public interface SystemConfigDao extends BaseMapper { - - /** - * 查询所有系统配置(分页) - * - * @param page - * @return - */ - List selectSystemSettingList(Page page, @Param("queryDTO") SystemConfigQueryDTO queryDTO); - - /** - * 根据key查询获取数据 - * - * @param key - * @return - */ - SystemConfigEntity getByKey(@Param("key") String key); - - /** - * 根据key查询获取数据 排除掉某個id的数据 - * @param key - * @param excludeId - * @return - */ - SystemConfigEntity getByKeyExcludeId(@Param("key") String key,@Param("excludeId") Long excludeId); - /** - * 查询所有系统配置 - * - * @return - */ - List selectAll(); - - /** - * 根据分组查询所有系统配置 - * @param group - * @return - */ - List getListByGroup(String group); - - - SystemConfigEntity selectByKeyAndGroup(@Param("configKey") String configKey, @Param("group") String group); -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/SystemConfigService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/SystemConfigService.java deleted file mode 100644 index 5dd00d65..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/SystemConfigService.java +++ /dev/null @@ -1,262 +0,0 @@ -package net.lab1024.smartadmin.module.system.systemconfig; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import net.lab1024.smartadmin.common.constant.JudgeEnum; -import net.lab1024.smartadmin.common.constant.ResponseCodeConst; -import net.lab1024.smartadmin.common.domain.PageResultDTO; -import net.lab1024.smartadmin.common.domain.ResponseDTO; -import net.lab1024.smartadmin.common.reload.annotation.SmartReload; -import net.lab1024.smartadmin.constant.SmartReloadTagConst; -import net.lab1024.smartadmin.module.support.smartreload.SmartReloadService; -import net.lab1024.smartadmin.module.system.systemconfig.constant.SystemConfigDataType; -import net.lab1024.smartadmin.module.system.systemconfig.constant.SystemConfigEnum; -import net.lab1024.smartadmin.module.system.systemconfig.constant.SystemConfigResponseCodeConst; -import net.lab1024.smartadmin.module.system.systemconfig.domain.dto.*; -import net.lab1024.smartadmin.module.system.systemconfig.domain.entity.SystemConfigEntity; -import net.lab1024.smartadmin.util.SmartBeanUtil; -import net.lab1024.smartadmin.util.SmartPageUtil; -import com.google.common.collect.Lists; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import javax.annotation.PostConstruct; -import java.util.List; -import java.util.concurrent.ConcurrentHashMap; -import java.util.regex.Pattern; - -/** - * 系统配置业务类 - * - * @author GHQ - * @date 2017-12-23 15:09 - */ -@Slf4j -@Service -public class SystemConfigService { - - /** - * 系统配置缓存 - */ - private ConcurrentHashMap systemConfigMap = new ConcurrentHashMap<>(); - - @Autowired - private SystemConfigDao systemConfigDao; - - @Autowired - private SmartReloadService smartReloadService; - - /** - * 初始化系统设置缓存 - */ - @PostConstruct - private void initSystemConfigCache() { - List entityList = systemConfigDao.selectAll(); - if (CollectionUtils.isEmpty(entityList)) { - return; - } - - systemConfigMap.clear(); - entityList.forEach(entity -> this.systemConfigMap.put(entity.getConfigKey().toLowerCase(), entity)); - log.info("系统设置缓存初始化完毕:{}", systemConfigMap.size()); - - smartReloadService.register(this); - } - - @SmartReload(SmartReloadTagConst.SYSTEM_CONFIG) - public boolean reload(String args) { - this.initSystemConfigCache(); - log.warn("<> <<{}>> , args {} reload success ", SmartReloadTagConst.SYSTEM_CONFIG, args); - return true; - } - - /** - * 分页获取系统配置 - * - * @param queryDTO - * @return - */ - public ResponseDTO> getSystemConfigPage(SystemConfigQueryDTO queryDTO) { - Page page = SmartPageUtil.convert2QueryPage(queryDTO); - if(queryDTO.getKey() != null){ - queryDTO.setKey(queryDTO.getKey().toLowerCase()); - } - List entityList = systemConfigDao.selectSystemSettingList(page, queryDTO); - PageResultDTO pageResultDTO = SmartPageUtil.convert2PageResult(page, entityList, SystemConfigVO.class); - return ResponseDTO.succData(pageResultDTO); - } - - /** - * 根据参数key获得一条数据(数据库) - * - * @param configKey - * @return - */ - public ResponseDTO selectByKey(String configKey) { - if(configKey != null){ - configKey = configKey.toLowerCase(); - } - SystemConfigEntity entity = systemConfigDao.getByKey(configKey); - if (entity == null) { - return ResponseDTO.wrap(SystemConfigResponseCodeConst.NOT_EXIST); - } - SystemConfigVO configDTO = SmartBeanUtil.copy(entity, SystemConfigVO.class); - return ResponseDTO.succData(configDTO); - } - - /** - * 根据参数key获得一条数据 并转换为 对象 - * - * @param configKey - * @param clazz - * @param - * @return - */ - public T selectByKey2Obj(String configKey, Class clazz) { - if(configKey != null){ - configKey = configKey.toLowerCase(); - } - SystemConfigEntity entity = systemConfigDao.getByKey(configKey); - if (entity == null) { - return null; - } - SystemConfigDTO configDTO = SmartBeanUtil.copy(entity, SystemConfigDTO.class); - String configValue = configDTO.getConfigValue(); - if (StringUtils.isEmpty(configValue)) { - return null; - } - T obj = JSON.parseObject(configValue, clazz); - return obj; - } - - public SystemConfigDTO getCacheByKey(SystemConfigEnum.Key key) { - SystemConfigEntity entity = this.systemConfigMap.get(key.name().toLowerCase()); - if (entity == null) { - return null; - } - return SmartBeanUtil.copy(entity, SystemConfigDTO.class); - } - - /** - * 添加系统配置 - * - * @param configAddDTO - * @return - */ - public ResponseDTO addSystemConfig(SystemConfigAddDTO configAddDTO) { - configAddDTO.setConfigKey(configAddDTO.getConfigKey().toLowerCase()); - SystemConfigEntity entity = systemConfigDao.getByKey(configAddDTO.getConfigKey()); - if (entity != null) { - return ResponseDTO.wrap(SystemConfigResponseCodeConst.ALREADY_EXIST); - } - ResponseDTO valueValid = this.configValueValid(configAddDTO.getConfigKey(),configAddDTO.getConfigValue()); - if(!valueValid.isSuccess()){ - return valueValid; - } - configAddDTO.setConfigKey(configAddDTO.getConfigKey().toLowerCase()); - SystemConfigEntity addEntity = SmartBeanUtil.copy(configAddDTO, SystemConfigEntity.class); - addEntity.setIsUsing(JudgeEnum.YES.getValue()); - systemConfigDao.insert(addEntity); - //刷新缓存 - this.initSystemConfigCache(); - return ResponseDTO.succ(); - } - - /** - * 更新系统配置 - * - * @param updateDTO - * @return - */ - public ResponseDTO updateSystemConfig(SystemConfigUpdateDTO updateDTO) { - updateDTO.setConfigKey(updateDTO.getConfigKey().toLowerCase()); - SystemConfigEntity entity = systemConfigDao.selectById(updateDTO.getId()); - //系统配置不存在 - if (entity == null) { - return ResponseDTO.wrap(SystemConfigResponseCodeConst.NOT_EXIST); - } - SystemConfigEntity alreadyEntity = systemConfigDao.getByKeyExcludeId(updateDTO.getConfigKey().toLowerCase(), updateDTO.getId()); - if (alreadyEntity != null) { - return ResponseDTO.wrap(SystemConfigResponseCodeConst.ALREADY_EXIST); - } - ResponseDTO valueValid = this.configValueValid(updateDTO.getConfigKey(),updateDTO.getConfigValue()); - if(!valueValid.isSuccess()){ - return valueValid; - } - entity = SmartBeanUtil.copy(updateDTO, SystemConfigEntity.class); - updateDTO.setConfigKey(updateDTO.getConfigKey().toLowerCase()); - systemConfigDao.updateById(entity); - - //刷新缓存 - this.initSystemConfigCache(); - return ResponseDTO.succ(); - } - - - private ResponseDTO configValueValid(String configKey , String configValue){ - SystemConfigEnum.Key configKeyEnum = SystemConfigEnum.Key.selectByKey(configKey); - if(configKeyEnum == null){ - return ResponseDTO.succ(); - } - SystemConfigDataType dataType = configKeyEnum.getDataType(); - if(dataType == null){ - return ResponseDTO.succ(); - } - if(dataType.name().equals(SystemConfigDataType.TEXT.name())){ - return ResponseDTO.succ(); - } - if(dataType.name().equals(SystemConfigDataType.JSON.name())){ - try { - JSONObject jsonStr = JSONObject.parseObject(configValue); - return ResponseDTO.succ(); - } catch (Exception e) { - return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM,"数据格式不是JSON,请修改后提交。"); - } - } - if(StringUtils.isNotEmpty(dataType.getValid())){ - Boolean valid = Pattern.matches(dataType.getValid(), configValue); - if(valid){ - return ResponseDTO.succ(); - } - return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM,"数据格式不是"+dataType.name().toLowerCase()+",请修改后提交。"); - } - - return ResponseDTO.succ(); - } - - /** - * 根据分组名称 获取获取系统设置 - * - * @param group - * @return - */ - public ResponseDTO> getListByGroup(String group) { - - List entityList = systemConfigDao.getListByGroup(group); - if (CollectionUtils.isEmpty(entityList)) { - return ResponseDTO.succData(Lists.newArrayList()); - } - List systemConfigList = SmartBeanUtil.copyList(entityList, SystemConfigVO.class); - return ResponseDTO.succData(systemConfigList); - } - - /** - * 根据分组名称 获取获取系统设置 - * - * @param group - * @return - */ - public List getListByGroup(SystemConfigEnum.Group group) { - List entityList = systemConfigDao.getListByGroup(group.name()); - if (CollectionUtils.isEmpty(entityList)) { - return Lists.newArrayList(); - } - List systemConfigList = SmartBeanUtil.copyList(entityList, SystemConfigDTO.class); - return systemConfigList; - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/constant/SystemConfigDataType.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/constant/SystemConfigDataType.java deleted file mode 100644 index 900256d8..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/constant/SystemConfigDataType.java +++ /dev/null @@ -1,67 +0,0 @@ -package net.lab1024.smartadmin.module.system.systemconfig.constant; - -import net.lab1024.smartadmin.util.SmartVerificationUtil; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/9/4 0004 上午 11:43 - * @since JDK1.8 - */ -public enum SystemConfigDataType { - /** - * 整数 - */ - INTEGER(SmartVerificationUtil.INTEGER), - /** - * 文本 - */ - TEXT(null), - /** - * url地址 - */ - URL(SmartVerificationUtil.URL), - /** - * 邮箱 - */ - EMAIL(SmartVerificationUtil.EMAIL), - /** - * JSON 字符串 - */ - JSON(null), - /** - * 2019-08 - */ - YEAR_MONTH(SmartVerificationUtil.YEAR_MONTH), - /** - * 2019-08-01 - */ - DATE(SmartVerificationUtil.DATE), - /** - * 2019-08-01 10:23 - */ - DATE_TIME(SmartVerificationUtil.DATE_TIME), - /** - * 10:23-10:56 - */ - TIME_SECTION(SmartVerificationUtil.TIME_SECTION), - /** - * 10:23 - */ - TIME(SmartVerificationUtil.TIME); - - private String valid; - - - SystemConfigDataType(String valid){ - this.valid = valid; - } - - public String getValid() { - return valid; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/constant/SystemConfigEnum.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/constant/SystemConfigEnum.java deleted file mode 100644 index 9791d772..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/constant/SystemConfigEnum.java +++ /dev/null @@ -1,68 +0,0 @@ -package net.lab1024.smartadmin.module.system.systemconfig.constant; - - -import java.util.Arrays; -import java.util.Optional; - -/** - * [ 系统配置常量类 ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 - */ -public class SystemConfigEnum { - - public enum Group { - BACK, - GIT_LOG - } - - public enum Key { - /** - * 超管id - */ - EMPLOYEE_SUPERMAN(SystemConfigDataType.TEXT), - /** - * 阿里云OSS配置项 - */ - ALI_OSS(SystemConfigDataType.JSON), - /** - * 七牛云OSS配置项 - */ - QI_NIU_OSS(SystemConfigDataType.JSON), - /** - * 本地文件上传url前缀 - */ - LOCAL_UPLOAD_URL_PREFIX(SystemConfigDataType.URL), - /** - * 邮件配置 - */ - EMAIL_CONFIG(SystemConfigDataType.JSON), - /** - * git-log 插件 - */ - GIT_LOG_PLUGIN(SystemConfigDataType.JSON); - - private SystemConfigDataType dataType; - - Key(SystemConfigDataType dataType) { - this.dataType = dataType; - } - - - public SystemConfigDataType getDataType() { - return dataType; - } - - public static Key selectByKey(String key) { - Key[] values = Key.values(); - Optional first = Arrays.stream(values).filter(e -> e.name().equalsIgnoreCase(key)).findFirst(); - return !first.isPresent() ? null : first.get(); - } - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/constant/SystemConfigResponseCodeConst.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/constant/SystemConfigResponseCodeConst.java deleted file mode 100644 index fd9fa9e4..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/constant/SystemConfigResponseCodeConst.java +++ /dev/null @@ -1,29 +0,0 @@ -package net.lab1024.smartadmin.module.system.systemconfig.constant; -import net.lab1024.smartadmin.common.constant.ResponseCodeConst; - -/** - * - * [ 5001-5999 ] - * - * @version 1.0 - * @since JDK1.8 - * @author yandanyang - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - */ -public class SystemConfigResponseCodeConst extends ResponseCodeConst { - - /** - * 配置参数已存在 10201 - */ - public static final SystemConfigResponseCodeConst ALREADY_EXIST = new SystemConfigResponseCodeConst(5001, "配置参数已存在"); - /** - * 配置参数不存在 10203 - */ - public static final SystemConfigResponseCodeConst NOT_EXIST = new SystemConfigResponseCodeConst(5002, "配置参数不存在"); - - public SystemConfigResponseCodeConst(int code, String msg) { - super(code, msg); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/domain/dto/SystemConfigQueryDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/domain/dto/SystemConfigQueryDTO.java deleted file mode 100644 index 458ef395..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/domain/dto/SystemConfigQueryDTO.java +++ /dev/null @@ -1,29 +0,0 @@ -package net.lab1024.smartadmin.module.system.systemconfig.domain.dto; - - -import net.lab1024.smartadmin.common.domain.PageParamDTO; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * - * [ ] - * - * @version 1.0 - * @since JDK1.8 - * @author yandanyang - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - */ -@Data -public class SystemConfigQueryDTO extends PageParamDTO { - - @ApiModelProperty("参数KEY") - private String key; - - @ApiModelProperty("参数类别") - private String configGroup; - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/domain/dto/SystemConfigUpdateDTO.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/domain/dto/SystemConfigUpdateDTO.java deleted file mode 100644 index 2fa29788..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/systemconfig/domain/dto/SystemConfigUpdateDTO.java +++ /dev/null @@ -1,25 +0,0 @@ -package net.lab1024.smartadmin.module.system.systemconfig.domain.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotNull; - -/** - * - * [ ] - * - * @version 1.0 - * @since JDK1.8 - * @author yandanyang - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - */ -@Data -public class SystemConfigUpdateDTO extends SystemConfigAddDTO{ - - @ApiModelProperty("id") - @NotNull(message = "id不能为空") - private Long id; -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartBaseEnumUtil.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartBaseEnumUtil.java deleted file mode 100644 index e433367b..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartBaseEnumUtil.java +++ /dev/null @@ -1,85 +0,0 @@ -package net.lab1024.smartadmin.util; - -import net.lab1024.smartadmin.common.domain.BaseEnum; - -/** - * 枚举工具类 - * - * @author listen - * @date 2017/10/10 18:17 - */ -public class SmartBaseEnumUtil { - - /** - * 校验int类型的参数与枚举类比较是否合法 - * - * @param value 参数 - * @param enumClass 枚举类必须实现BaseEnum接口 - * @return boolean - * @Author listen - */ - public static boolean checkEnum(Integer value, Class enumClass) { - if (null == value) { - return false; - } - BaseEnum[] enums = enumClass.getEnumConstants(); - for (BaseEnum baseEnum : enums) { - if (baseEnum.equalsValue(value)) { - return true; - } - } - return false; - } - - /** - * 获取枚举类的说明 value : info 的形式 - * - * @param enumClass - * @return String - */ - public static String getEnumDesc(Class enumClass) { - BaseEnum[] enums = enumClass.getEnumConstants(); - // value : info 的形式 - StringBuilder sb = new StringBuilder(); - for (BaseEnum baseEnum : enums) { - sb.append(baseEnum.getValue() + ":" + baseEnum.getDesc() + ","); - } - return sb.toString(); - } - - /** - * 获取与int Code相匹配的枚举类的info - * - * @param value 参数 - * @param enumClass 枚举类必须实现BaseEnum接口 - * @return String 如无匹配枚举则返回null - */ - public static String getEnumDescByValue(Integer value, Class enumClass) { - BaseEnum[] enums = enumClass.getEnumConstants(); - for (BaseEnum baseEnum : enums) { - if (baseEnum.equalsValue(value)) { - return baseEnum.getDesc(); - } - } - return null; - } - - /** - * 根据int类型的参数与获取枚举类的实例 - * - * @param value 参数 - * @param enumClass 枚举类必须实现BaseEnum接口 - * @return BaseEnum 无匹配值返回null - * @Author listen - */ - public static T getEnumByValue(Object value, Class enumClass) { - T[] enums = enumClass.getEnumConstants(); - for (T baseEnum : enums) { - if (baseEnum.equalsValue(value)) { - return baseEnum; - } - } - return null; - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartDigestUtil.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartDigestUtil.java deleted file mode 100644 index 902d5db3..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartDigestUtil.java +++ /dev/null @@ -1,17 +0,0 @@ -package net.lab1024.smartadmin.util; - -import org.apache.commons.codec.digest.DigestUtils; - -public class SmartDigestUtil extends DigestUtils { - - /** - * md5加盐加密 - * - * @param salt - * @param password - * @return - */ - public static String encryptPassword(String salt, String password) { - return SmartDigestUtil.md5Hex(String.format(salt, password)); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartPageUtil.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartPageUtil.java deleted file mode 100644 index 2e1352c6..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartPageUtil.java +++ /dev/null @@ -1,97 +0,0 @@ -package net.lab1024.smartadmin.util; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import net.lab1024.smartadmin.common.domain.OrderItemDTO; -import net.lab1024.smartadmin.common.domain.PageParamDTO; -import net.lab1024.smartadmin.common.domain.PageResultDTO; - -import java.util.List; -import java.util.stream.Collectors; - -/** - * 分页工具类 - * - * @author GHQ - * @date 2017-12-23 16:40 - */ - -public class SmartPageUtil { - - public static PageResultDTO convert2PageResult(IPage page) { - PageResultDTO result = new PageResultDTO<>(); - result.setPageNum(page.getCurrent()); - result.setPageSize(page.getSize()); - result.setTotal(page.getTotal()); - result.setPages(page.getPages()); - result.setList(page.getRecords()); - return result; - } - - public static Page convert2QueryPage(PageParamDTO baseDTO) { - Page page = new Page<>(); - - List orders = baseDTO.getOrders(); - if (orders != null && !orders.isEmpty()) { - List orderItemList = orders.stream().map(SmartPageUtil::convertOrderItem).collect(Collectors.toList()); - page.setOrders(orderItemList); - } - page.setCurrent(baseDTO.getPageNum()); - page.setSize(baseDTO.getPageSize()); - if (null != baseDTO.getSearchCount()) { - page.setSearchCount(baseDTO.getSearchCount()); - } - return page; - } - - private static com.baomidou.mybatisplus.core.metadata.OrderItem convertOrderItem(OrderItemDTO orderItemDTO) { - if (orderItemDTO.isAsc()) { - return com.baomidou.mybatisplus.core.metadata.OrderItem.asc(orderItemDTO.getColumn()); - } else { - return com.baomidou.mybatisplus.core.metadata.OrderItem.desc(orderItemDTO.getColumn()); - } - } - - /** - * 转换为 PageResultDTO 对象 - * - * @param page - * @param sourceList 原list - * @param targetClazz 目标类 - * @return - * @author yandanyang - * @date 2018年5月16日 下午6:05:28 - */ - public static PageResultDTO convert2PageResult(IPage page, List sourceList, Class targetClazz) { - PageResultDTO pageResultDTO = setPage(page); - List records = SmartBeanUtil.copyList(sourceList, targetClazz); - page.setRecords(records); - pageResultDTO.setList(records); - return pageResultDTO; - } - - /** - * 转换为 PageResultDTO 对象 - * - * @param page - * @param sourceList list - * @return - * @author yandanyang - * @date 2018年5月16日 下午6:05:28 - */ - public static PageResultDTO convert2PageResult(IPage page, List sourceList) { - PageResultDTO pageResultDTO = setPage(page); - page.setRecords(sourceList); - pageResultDTO.setList(sourceList); - return pageResultDTO; - } - - private static PageResultDTO setPage(IPage page) { - PageResultDTO pageResultDTO = new PageResultDTO(); - pageResultDTO.setPageNum(page.getCurrent()); - pageResultDTO.setPageSize(page.getSize()); - pageResultDTO.setTotal(page.getTotal()); - pageResultDTO.setPages(page.getPages()); - return pageResultDTO; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartQuartzUtil.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartQuartzUtil.java deleted file mode 100644 index 14003e6d..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartQuartzUtil.java +++ /dev/null @@ -1,43 +0,0 @@ -package net.lab1024.smartadmin.util; - -import net.lab1024.smartadmin.module.support.quartz.constant.QuartzConst; -import org.apache.commons.lang3.StringUtils; -import org.quartz.JobKey; -import org.quartz.TriggerKey; - -/** - * [ ] - * - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2018 1024lab.netInc. All rights reserved. - * @date 2019/4/13 0013 下午 15:16 - * @since JDK1.8 - */ -public class SmartQuartzUtil { - - public static Long getTaskIdByJobKey(JobKey jobKey) { - String name = jobKey.getName(); - return Long.valueOf(StringUtils.replace(name, QuartzConst.JOB_KEY_PREFIX, "")); - } - - public static Integer getTaskIdByTriggerKey(TriggerKey triggerKey) { - String name = triggerKey.getName(); - return Integer.valueOf(StringUtils.replace(name, QuartzConst.TRIGGER_KEY_PREFIX, "")); - } - - /** - * 获取触发器key - */ - public static TriggerKey getTriggerKey(Long taskId) { - return TriggerKey.triggerKey(QuartzConst.TRIGGER_KEY_PREFIX + taskId); - } - - /** - * 获取jobKey - */ - public static JobKey getJobKey(Long taskId) { - return JobKey.jobKey(QuartzConst.JOB_KEY_PREFIX + taskId); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartRequestTokenUtil.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartRequestTokenUtil.java deleted file mode 100644 index 7ae5f5fc..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartRequestTokenUtil.java +++ /dev/null @@ -1,51 +0,0 @@ -package net.lab1024.smartadmin.util; - -import net.lab1024.smartadmin.module.system.login.domain.RequestTokenBO; -import org.springframework.web.context.request.RequestAttributes; -import org.springframework.web.context.request.RequestContextHolder; -import org.springframework.web.context.request.ServletRequestAttributes; - -import javax.servlet.http.HttpServletRequest; -/** - * @author yandanyang - * @version 1.0 - * @company 1024lab.net - * @copyright (c) 2019 1024lab.netInc. All rights reserved. - * @date - * @since JDK1.8 - */ -public class SmartRequestTokenUtil { - - private static final String USER_KEY = "smart_admin_user"; - - private static ThreadLocal RequestUserThreadLocal = new ThreadLocal(); - - public static void setUser(HttpServletRequest request, RequestTokenBO requestToken) { - request.setAttribute(USER_KEY, requestToken); - RequestUserThreadLocal.set(requestToken); - } - - public static RequestTokenBO getThreadLocalUser() { - return RequestUserThreadLocal.get(); - } - - public static RequestTokenBO getRequestUser() { - RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes(); - if (requestAttributes != null) { - HttpServletRequest request = ((ServletRequestAttributes) requestAttributes).getRequest(); - if (request != null) { - return (RequestTokenBO) request.getAttribute(USER_KEY); - } - } - return null; - } - - public static Long getRequestUserId() { - RequestTokenBO requestUser = getRequestUser(); - if (null == requestUser) { - return null; - } - return requestUser.getRequestUserId(); - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartSendMailUtil.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartSendMailUtil.java deleted file mode 100644 index b5bee5f6..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartSendMailUtil.java +++ /dev/null @@ -1,243 +0,0 @@ -package net.lab1024.smartadmin.util; - -import lombok.extern.slf4j.Slf4j; - -import javax.activation.DataHandler; -import javax.activation.DataSource; -import javax.mail.Authenticator; -import javax.mail.PasswordAuthentication; -import javax.mail.Session; -import javax.mail.Transport; -import javax.mail.internet.*; -import javax.mail.util.ByteArrayDataSource; -import java.io.InputStream; -import java.util.Date; -import java.util.LinkedList; -import java.util.List; -import java.util.Properties; -import java.util.regex.Pattern; - -@Slf4j -public class SmartSendMailUtil { - - /** - * 邮箱正则表达式 - */ - static final Pattern pattern = Pattern.compile("^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$"); - - public static void main(String[] args) throws Exception { - // 发件人的 邮箱 和 密码(替换为自己的邮箱和密码) - // PS: 某些邮箱服务器为了增加邮箱本身密码的安全性,给 SMTP 客户端设置了独立密码(有的邮箱称为“授权码”), - // 对于开启了独立密码的邮箱, 这里的邮箱密码必需使用这个独立密码(授权码)。 - String myEmailAccount = "xxxxx@163.com"; - String myEmailPassword = "xxxxxx"; - // 发件人邮箱的 SMTP 服务器地址, 必须准确, 不同邮件服务器地址不同, 一般(只是一般, 绝非绝对)格式为: smtp.xxx.com - // 网易163邮箱的 SMTP 服务器地址为: smtp.163.com - String myEmailSMTPHost = "smtp.163.com"; - // 收件人邮箱(替换为自己知道的有效邮箱) - String[] toMailAccountList = new String[]{"421316927@qq.com"}; - SmartSendMailUtil.sendMail(myEmailAccount, myEmailPassword, "", toMailAccountList, "", myEmailSMTPHost, "测试发送邮件", "测试发送邮件"); - - } - - /** - * 发送文本邮件 - * - * @param sendMail 发件人邮箱 - * @param sendMailPwd 发件人密码 - * @param sendMailName 发件人昵称(可选) - * @param receiveMail 收件人邮箱 - * @param receiveMailName 收件人昵称(可选) - * @param sendSMTPHost 发件人邮箱的 SMTP 服务器地址, 必须准确, 不同邮件服务器地址不同, 一般(只是一般, 绝非绝对)格式为: smtp.xxx.com - * @param title 邮件主题 - * @param content 邮件正文 - * @author Administrator - * @date 2017年12月13日 下午1:51:38 - */ - public static void sendMail(String sendMail, String sendMailPwd, String sendMailName, String[] receiveMail, String receiveMailName, String sendSMTPHost, String title, String content) { - - Session session = createSession(sendSMTPHost); - // 3. 创建一封邮件 - MimeMessage message; - try { - message = createMimeMessage(session, sendMail, sendMailName, receiveMail, receiveMailName, title, content); - // 4. 根据 Session 获取邮件传输对象 - Transport transport = session.getTransport(); - - // 5. 使用 邮箱账号 和 密码 连接邮件服务器, 这里认证的邮箱必须与 message 中的发件人邮箱一致, 否则报错 - // - // PS_01: 成败的判断关键在此一句, 如果连接服务器失败, 都会在控制台输出相应失败原因的 log, - // 仔细查看失败原因, 有些邮箱服务器会返回错误码或查看错误类型的链接, 根据给出的错误 - // 类型到对应邮件服务器的帮助网站上查看具体失败原因。 - // - // PS_02: 连接失败的原因通常为以下几点, 仔细检查代码: - // (1) 邮箱没有开启 SMTP 服务; - // (2) 邮箱密码错误, 例如某些邮箱开启了独立密码; - // (3) 邮箱服务器要求必须要使用 SSL 安全连接; - // (4) 请求过于频繁或其他原因, 被邮件服务器拒绝服务; - // (5) 如果以上几点都确定无误, 到邮件服务器网站查找帮助。 - // - // PS_03: 仔细看log, 认真看log, 看懂log, 错误原因都在log已说明。 - transport.connect(sendMail, sendMailPwd); - // 6. 发送邮件, 发到所有的收件地址, message.getAllRecipients() 获取到的是在创建邮件对象时添加的所有收件人, 抄送人, 密送人 - transport.sendMessage(message, message.getAllRecipients()); - // 7. 关闭连接 - transport.close(); - } catch (Exception e) { - log.error("", e); - } - - } - - /** - * 发送带附件的邮件 - * - * @param sendMail 发件人邮箱 - * @param sendMailPwd 发件人密码 - * @param sendMailName 发件人昵称(可选) - * @param receiveMail 收件人邮箱 - * @param receiveMailName 收件人昵称(可选) - * @param sendSMTPHost 发件人邮箱的 SMTP 服务器地址, 必须准确, 不同邮件服务器地址不同, 一般(只是一般, 绝非绝对)格式为: smtp.xxx.com - * @param title 邮件主题 - * @param content 邮件正文 - * @author Administrator - * @date 2017年12月13日 下午1:51:38 - */ - public static void sendFileMail(String sendMail, String sendMailPwd, String sendMailName, String[] receiveMail, String receiveMailName, String sendSMTPHost, String title, String content, - InputStream is, String fileName, String port) { - - Session session = createSSLSession(sendSMTPHost, port, sendMailName, sendMailPwd); - // 3. 创建一封邮件 - MimeMessage message; - try { - message = createMimeMessage(session, sendMail, sendMailName, receiveMail, receiveMailName, title, content); - // 5. Content: 邮件正文(可以使用html标签)(内容有广告嫌疑,避免被邮件服务器误认为是滥发广告以至返回失败,请修改发送内容) - MimeMultipart mm = new MimeMultipart(); - MimeBodyPart text = new MimeBodyPart(); - text.setContent(content, "text/html;charset=UTF-8"); - mm.addBodyPart(text); - if (null != is && is.available() > 0) { - MimeBodyPart attachment = new MimeBodyPart(); - DataSource source = new ByteArrayDataSource(is, "application/msexcel"); - // 将附件数据添加到"节点" - attachment.setDataHandler(new DataHandler(source)); - // 设置附件的文件名(需要编码) - attachment.setFileName(MimeUtility.encodeText(fileName)); - // 10. 设置文本和 附件 的关系(合成一个大的混合"节点" / Multipart ) - // 如果有多个附件,可以创建多个多次添加 - mm.addBodyPart(attachment); - } - message.setContent(mm); - message.saveChanges(); - // 4. 根据 Session 获取邮件传输对象 - Transport transport = session.getTransport("smtp"); - transport.connect(sendSMTPHost, sendMail, sendMailPwd); - // // 6. 发送邮件, 发到所有的收件地址, message.getAllRecipients() 获取到的是在创建邮件对象时添加的所有收件人, 抄送人, 密送人 - transport.sendMessage(message, message.getAllRecipients()); - // 7. 关闭连接 - } catch (Exception e) { - log.error("", e); - } - - } - - /** - * 创建session - * - * @author lidoudou - * @date 2019/2/16 14:59 - */ - private static Session createSSLSession(String sendSMTPHost, String port, String userName, String pwd) { - // 1. 创建参数配置, 用于连接邮件服务器的参数配置 - Properties props = new Properties(); // 参数配置 - - props.setProperty("mail.smtp.user", userName); - props.setProperty("mail.smtp.password", pwd); - props.setProperty("mail.smtp.host", sendSMTPHost); - props.setProperty("mail.smtp.port", port); - props.setProperty("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory"); - props.setProperty("mail.smtp.socketFactory.fallback", "false"); - props.setProperty("mail.smtp.socketFactory.port", port); - props.put("mail.smtp.auth", "true"); - - // 2. 根据配置创建会话对象, 用于和邮件服务器交互 - Session session = Session.getDefaultInstance(props, new Authenticator() { - //身份认证 - @Override - protected PasswordAuthentication getPasswordAuthentication() { - return new PasswordAuthentication(userName, pwd); - } - }); - session.setDebug(true); // 设置为debug模式, 可以查看详细的发送 log - return session; - } - - /** - * 创建session - * - * @author lidoudou - * @date 2019/2/16 14:59 - */ - private static Session createSession(String sendSMTPHost) { - // 1. 创建参数配置, 用于连接邮件服务器的参数配置 - Properties props = new Properties(); // 参数配置 - props.setProperty("mail.transport.protocol", "smtp"); // 使用的协议(JavaMail规范要求) - props.setProperty("mail.smtp.host", sendSMTPHost); // 发件人的邮箱的 SMTP 服务器地址 - props.setProperty("mail.smtp.auth", "true"); // 需要请求认证 - // PS: 某些邮箱服务器要求 SMTP 连接需要使用 SSL 安全认证 (为了提高安全性, 邮箱支持SSL连接, 也可以自己开启), - // 如果无法连接邮件服务器, 仔细查看控制台打印的 log, 如果有有类似 “连接失败, 要求 SSL 安全连接” 等错误, - // 打开下面 /* ... */ 之间的注释代码, 开启 SSL 安全连接。 - /* - * // SMTP 服务器的端口 (非 SSL 连接的端口一般默认为 25, 可以不添加, 如果开启了 SSL 连接, // 需要改为对应邮箱的 SMTP 服务器的端口, - * 具体可查看对应邮箱服务的帮助, // QQ邮箱的SMTP(SLL)端口为465或587, 其他邮箱自行去查看) final String smtpPort = "465"; - * props.setProperty("mail.smtp.port", smtpPort); - * props.setProperty("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory"); - * props.setProperty("mail.smtp.socketFactory.fallback", "false"); - * props.setProperty("mail.smtp.socketFactory.port", smtpPort); - */ - // 2. 根据配置创建会话对象, 用于和邮件服务器交互 - Session session = Session.getInstance(props); - session.setDebug(true); // 设置为debug模式, 可以查看详细的发送 log - return session; - } - - /** - * 创建一封只包含文本的简单邮件 - * - * @param session 和服务器交互的会话 - * @param sendMail 发件人邮箱 - * @param sendMailName 发件人昵称 - * @param receiveMail 收件人邮箱 - * @param receiveMailName 收件人昵称 - * @param title 邮件主题 - * @param content 邮件正文 - * @return - * @throws Exception - * @author Administrator - * @date 2017年12月13日 下午1:55:45 - */ - public static MimeMessage createMimeMessage(Session session, String sendMail, String sendMailName, String[] receiveMail, String receiveMailName, String title, String content) throws Exception { - // 1. 创建一封邮件 - MimeMessage message = new MimeMessage(session); - // 2. From: 发件人(昵称有广告嫌疑,避免被邮件服务器误认为是滥发广告以至返回失败,请修改昵称) - message.setFrom(new InternetAddress(sendMail, sendMailName, "UTF-8")); - // 3. To: 收件人(可以增加多个收件人、抄送、密送) - List to = new LinkedList<>(); - for (String s : receiveMail) { - if (pattern.matcher(s).matches()) { - to.add(new InternetAddress(s)); - } - } - //Address[] addresses = new Address[]{new InternetAddress(receiveMail),new InternetAddress(receiveMail)}; - message.addRecipients(MimeMessage.RecipientType.TO, to.toArray((new InternetAddress[to.size()]))); - // 4. Subject: 邮件主题(标题有广告嫌疑,避免被邮件服务器误认为是滥发广告以至返回失败,请修改标题) - message.setSubject(title, "UTF-8"); - // 5. Content: 邮件正文(可以使用html标签)(内容有广告嫌疑,避免被邮件服务器误认为是滥发广告以至返回失败,请修改发送内容) - message.setContent(content, "text/html;charset=UTF-8"); - // 6. 设置发件时间 - message.setSentDate(new Date()); - // 7. 保存设置 - message.saveChanges(); - return message; - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/excel/SmartExcelFileType.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/excel/SmartExcelFileType.java deleted file mode 100644 index 499e43db..00000000 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/excel/SmartExcelFileType.java +++ /dev/null @@ -1,10 +0,0 @@ -package net.lab1024.smartadmin.util.excel; - -/** - * @author zhuoda - */ -public enum SmartExcelFileType { - XLS, - XLSX - -} diff --git a/smart-admin-service/smart-admin-api/src/main/resources/dev/application.properties b/smart-admin-service/smart-admin-api/src/main/resources/dev/application.properties deleted file mode 100644 index b4468249..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/dev/application.properties +++ /dev/null @@ -1,123 +0,0 @@ -######################### server ################### -server.servlet.context-path=/smart-admin-api -server.port=10086 -spring.profiles.active=@profiles.active@ - -######################### tomcat ################### -server.tomcat.basedir=/home/logs/smart-admin/tomcat-logs -server.tomcat.accesslog.enabled=true -server.tomcat.accesslog.pattern=%t %{X-Forwarded-For}i %a "%r" %s %D (%D ms) - -######################### jackson ######################### -spring.jackson.serialization.write-enums-using-to-string=true -spring.jackson.deserialization.read-enums-using-to-string=true -spring.jackson.deserialization.fail-on-unknown-properties=false -spring.jackson.default-property-inclusion=always -spring.jackson.date-format=yyyy-MM-dd HH:mm:ss -spring.jackson.time-zone=GMT+8 -spring.jackson.serialization.write-dates-as-timestamps=false - -######################### http file ######################### -spring.servlet.multipart.max-file-size=30MB -spring.servlet.multipart.max-request-size=30MB -file-upload-service.path=/home/upload/ - -######################### database ######################### -spring.datasource.url=jdbc:p6spy:mysql://127.0.0.1:3306/smart-admin-dev?autoReconnect=true&useServerPreparedStmts=false&rewriteBatchedStatements=true&characterEncoding=UTF-8&useSSL=false&allowMultiQueries=true&serverTimezone=UTC -spring.datasource.username=root -spring.datasource.password=Root.123 -spring.datasource.initial-size=2 -spring.datasource.min-idle=1 -spring.datasource.max-active=10 -spring.datasource.max-wait=60000 -spring.datasource.time-between-eviction-runs-millis=60000 -spring.datasource.min-evictable-idle-time-millis=300000 -spring.datasource.driver-class-name=com.p6spy.engine.spy.P6SpyDriver -spring.datasource.filters=stat -spring.datasource.druid.username=druid -spring.datasource.druid.password=123456 -spring.datasource.druid.login.enabled=false - -######################### redis ####################################### -spring.redis.database=0 -spring.redis.host=127.0.0.1 -spring.redis.port=6379 -spring.redis.timeout=10000ms -spring.redis.password= -spring.redis.lettuce.pool.max-active=10 -spring.redis.lettuce.pool.min-idle=5 -spring.redis.lettuce.pool.max-idle=10 -spring.redis.lettuce.pool.max-wait=30000ms - -########################## rest http pool ######################### -#\u6700\u5927\u8FDE\u63A5\u6570 -http.pool.max-total=10 -#\u5355\u8DEF\u7531\u6700\u5927\u8FDE\u63A5\u6570 -http.pool.default-max-per-route=5 -#\u670D\u52A1\u5668\u8FD4\u56DE\u6570\u636E(response)\u7684\u65F6\u95F4 -http.pool.socket-timeout=8000 -#\u8FDE\u63A5\u4E0A\u670D\u52A1\u5668(\u63E1\u624B\u6210\u529F)\u7684\u65F6\u95F4 -http.pool.connect-timeout=8000 -#\u4ECE\u8FDE\u63A5\u6C60\u4E2D\u83B7\u53D6\u8FDE\u63A5\u7684\u8D85\u65F6\u65F6\u95F4 -http.pool.connection-request-timeout=8000 - -######################### mybatis\u914D\u7F6E ######################### -mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl -# mybatis-plus \u5B57\u6BB5\u9A7C\u5CF0\u81EA\u52A8\u8F6C\u6362 -mybatis-plus.configuration.map-underscore-to-camel-case=true -mybatis-plus.mapper-locations=classpath:/mapper/**/*.xml -mybatis-plus.typeAliasesPackage=net.lab1024.smartadmin.*.*.domain.entity -mybatis-plus.global-config.refresh-mapper=true -mybatis-plus.global-config.db-column-underline=true - -######################### swagger ######################### -swagger.apiGroupName=smartAdmin -swagger.title=smartAdmin -swagger.description=smartAdmin -swagger.version=1.0 -swagger.serviceUrl=http://localhost:10086/smart-admin-api -swagger.packAge=net.lab1024.smartadmin.module - -######################### jwt ######################### -jwt.key=smart-admin-jwt-key - -########################## smart reload ######################### -smart-reload.thread-count=1 -smart-reload.time-interval=300 - -######################### cros ######################### -access-control-allow-origin=* - -######################### heart beat ######################### -heart-beat.delayHandlerTime=60000 -heart-beat.intervalTime=300000 - -######################### quartz ############################# -#\u8C03\u5EA6\u6807\u8BC6\u540D \u96C6\u7FA4\u4E2D\u6BCF\u4E00\u4E2A\u5B9E\u4F8B\u90FD\u5FC5\u987B\u4F7F\u7528\u76F8\u540C\u7684\u540D\u79F0 -spring.quartz.properties.org.quartz.scheduler.instanceName=devClusteredScheduler -spring.quartz.properties.org.quartz.scheduler.instanceId=AUTO -#\u8FDC\u7A0B\u7BA1\u7406\u76F8\u5173\u7684\u914D\u7F6E,\u5168\u90E8\u5173\u95ED -spring.quartz.properties.org.quartz.scheduler.rmi.export=false -spring.quartz.properties.org.quartz.scheduler.rmi.proxy=false -#\u8DF3\u8FC7quartz\u7248\u672C\u68C0\u67E5 -spring.quartz.properties.org.quartz.scheduler.skipUpdateCheck=true -#\u6570\u636E\u4FDD\u5B58\u65B9\u5F0F\u4E3A\u6301\u4E45\u5316 -spring.quartz.properties.org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX -spring.quartz.properties.org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate -spring.quartz.properties.org.quartz.jobStore.tablePrefix=QRTZ_ -spring.quartz.properties.org.quartz.jobStore.isClustered=true -#\u8C03\u5EA6\u5B9E\u4F8B\u5931\u6548\u7684\u68C0\u67E5\u65F6\u95F4\u95F4\u9694, \u5F00\u53D1\u73AF\u5883\u6539\u4E3A\u4E8660\u79D2 -spring.quartz.properties.org.quartz.jobStore.clusterCheckinInterval=60000 -spring.quartz.properties.org.quartz.jobStore.useProperties=false -#\u8C03\u5EA6\u7EBF\u7A0B -spring.quartz.properties.org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool -spring.quartz.properties.org.quartz.threadPool.threadCount=2 -spring.quartz.properties.org.quartz.threadPool.threadPriority=5 -spring.quartz.properties.org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread=true -spring.quartz.properties.org.quartz.threadPool.threadNamePrefix=quartz -spring.quartz.job-store-type=jdbc -#ALWAYS,EMBEDDED,NEVER -spring.quartz.jdbc.initialize-schema=NEVER -spring.quartz.jdbc.schema=classpath:sql/quartz_mysql_2.3.0.sql -#\u81EA\u52A8\u626B\u63CF\u4EFB\u52A1\u5355\u5E76\u53D1\u73B0\u6539\u52A8\u7684\u65F6\u95F4\u95F4\u9694,\u5355\u4F4D\u4E3A\u79D2 -org.quartz.plugin.jobInitializer.scanInterval = 300 diff --git a/smart-admin-service/smart-admin-api/src/main/resources/mapper/business/email/EmailMapper.xml b/smart-admin-service/smart-admin-api/src/main/resources/mapper/business/email/EmailMapper.xml deleted file mode 100644 index 6050de51..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/mapper/business/email/EmailMapper.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - delete from t_email where id = #{id} - - - - delete from t_email where id in - - #{item} - - - - \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/mapper/business/log/OrderOperateLogMapper.xml b/smart-admin-service/smart-admin-api/src/main/resources/mapper/business/log/OrderOperateLogMapper.xml deleted file mode 100644 index 46f92a00..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/mapper/business/log/OrderOperateLogMapper.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - INSERT INTO t_order_operate_log (order_id,order_type, operate_type, operate_content, operate_remark, employee_id, employee_name,ext_data,update_time,create_time) VALUES - - (#{item.orderId}, - #{item.orderType}, - #{item.operateType}, - #{item.operateContent}, - #{item.operateRemark}, - #{item.employeeId}, - #{item.employeeName}, - #{item.extData}, - #{item.updateTime} - #{item.createTime} - ) - - - - - diff --git a/smart-admin-service/smart-admin-api/src/main/resources/mapper/business/log/UserLoginLogMapper.xml b/smart-admin-service/smart-admin-api/src/main/resources/mapper/business/log/UserLoginLogMapper.xml deleted file mode 100644 index 87b0df3b..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/mapper/business/log/UserLoginLogMapper.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - delete from t_user_login_log where id = #{id} - - - - delete from t_user_login_log where id in - - #{item} - - - - \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/mapper/business/peony/PeonyMapper.xml b/smart-admin-service/smart-admin-api/src/main/resources/mapper/business/peony/PeonyMapper.xml deleted file mode 100644 index 4be1a0f5..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/mapper/business/peony/PeonyMapper.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - delete from t_peony where id = #{id} - - - - delete from t_peony where id in - - #{item} - - - - \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/mapper/support/codegenerator/TableMapper.xml b/smart-admin-service/smart-admin-api/src/main/resources/mapper/support/codegenerator/TableMapper.xml deleted file mode 100644 index 4af675b6..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/mapper/support/codegenerator/TableMapper.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/mapper/support/file/FileMapper.xml b/smart-admin-service/smart-admin-api/src/main/resources/mapper/support/file/FileMapper.xml deleted file mode 100644 index 04abb76d..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/mapper/support/file/FileMapper.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - INSERT INTO t_file ( - module_id, - module_type, - file_name, - file_size, - file_type, - file_path, - creater_user, - file_location_type - ) - VALUES - - (#{item.moduleId},#{item.moduleType},#{item.fileName},#{item.fileSize},#{item.fileType},#{item.filePath},#{item.createrUser},#{item.createrUserType},#{item.fileLocationType}) - - - - - INSERT INTO t_file ( - module_id, - module_type, - file_name, - file_size, - file_type, - file_path, - creater_user, - file_location_type - ) - VALUES - - (#{item.moduleId},#{item.moduleType},#{item.fileName},#{item.fileSize},#{item.fileType},#{item.filePath},#{item.createrUser},#{item.createrUserType},#{item.fileLocationType}) - - - - - DELETE FROM t_file WHERE module_id =#{moduleId} - - - - DELETE FROM t_file WHERE module_id =#{moduleId} and module_type=#{moduleType} - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/mapper/support/idgenerator/IdGeneratorMapper.xml b/smart-admin-service/smart-admin-api/src/main/resources/mapper/support/idgenerator/IdGeneratorMapper.xml deleted file mode 100644 index df3b86c5..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/mapper/support/idgenerator/IdGeneratorMapper.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - update t_id_generator set last_number = #{lastNumber}, update_time = now() where id = #{generatorId} - - - - replace into `t_id_generator_record` (`generator_id`, `year`, `month`, `day`, `last_number`) values (#{generatorId}, #{year}, #{month}, #{day}, #{lastNumber}) - - - - \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/mapper/support/quartz/QuartzTaskLogMapper.xml b/smart-admin-service/smart-admin-api/src/main/resources/mapper/support/quartz/QuartzTaskLogMapper.xml deleted file mode 100644 index 43f25e05..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/mapper/support/quartz/QuartzTaskLogMapper.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - tl.id, - tl.task_id, - tl.task_name, - tl.task_params, - tl.process_status, - tl.process_duration, - tl.process_log, - tl.ip_address, - tl.update_time, - tl.create_time - - - - - - \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/mapper/support/quartz/QuartzTaskMapper.xml b/smart-admin-service/smart-admin-api/src/main/resources/mapper/support/quartz/QuartzTaskMapper.xml deleted file mode 100644 index 0bb88311..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/mapper/support/quartz/QuartzTaskMapper.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - t.id, - t.task_name, - t.task_bean, - t.task_params, - t.task_cron, - t.task_status, - t.remark, - t.update_time, - t.create_time - - - - - - - - UPDATE t_quartz_task t - set t.task_status = #{taskStatus} - WHERE t.id = #{taskId} - - - - \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/mapper/support/smartreload/ReloadItemMapper.xml b/smart-admin-service/smart-admin-api/src/main/resources/mapper/support/smartreload/ReloadItemMapper.xml deleted file mode 100644 index 03c1f67f..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/mapper/support/smartreload/ReloadItemMapper.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/mapper/support/smartreload/ReloadResultMapper.xml b/smart-admin-service/smart-admin-api/src/main/resources/mapper/support/smartreload/ReloadResultMapper.xml deleted file mode 100644 index 6c0caba1..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/mapper/support/smartreload/ReloadResultMapper.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/mapper/system/department/DepartmentMapper.xml b/smart-admin-service/smart-admin-api/src/main/resources/mapper/system/department/DepartmentMapper.xml deleted file mode 100644 index 837a287c..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/mapper/system/department/DepartmentMapper.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - d.id, - d.name, - d.short_name, - d.manager_id, - d.parent_id, - d.sort, - d.update_time, - d.create_time - - - - - - - - - - - \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/mapper/system/employee/EmployeeMapper.xml b/smart-admin-service/smart-admin-api/src/main/resources/mapper/system/employee/EmployeeMapper.xml deleted file mode 100644 index 2b13a478..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/mapper/system/employee/EmployeeMapper.xml +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - - - - e.id, - e.login_name, - e.login_pwd, - e.actual_name, - e.nick_name, - e.phone, - e.id_card, - e.birthday, - e.email, - e.department_id, - e.is_leave, - e.is_disabled, - e.remark, - e.is_delete, - e.update_time, - e.create_time - - - - - - - UPDATE t_employee e - set e.is_disabled = #{isDisabled} - WHERE id in - - #{item} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - UPDATE t_employee - SET login_pwd = #{password} - WHERE id = #{employeeId} - - - - \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/mapper/system/position/PositionMapper.xml b/smart-admin-service/smart-admin-api/src/main/resources/mapper/system/position/PositionMapper.xml deleted file mode 100644 index a7ef4cce..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/mapper/system/position/PositionMapper.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - id, - position_name, - remark, - update_time, - create_time - - - - - - - - - - INSERT INTO t_position_relation (position_id,employee_id) VALUES - - (#{item},#{batchDTO.employeeId}) - - - - - - DELETE FROM t_position_relation WHERE employee_id = #{employeeId} - - - \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/mapper/system/privilege/PrivilegeMapper.xml b/smart-admin-service/smart-admin-api/src/main/resources/mapper/system/privilege/PrivilegeMapper.xml deleted file mode 100644 index 7d224b22..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/mapper/system/privilege/PrivilegeMapper.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - p.id, - p.type, - p.name, - p.key, - p.url, - p.sort, - p.parent_key, - p.update_time, - p.create_time - - - - - - - - - - DELETE FROM t_privilege - WHERE `key` IN - - #{item} - - - - - DELETE FROM t_privilege - WHERE parent_key IN - - #{item} - - - - - INSERT INTO t_privilege (`type`, `name`, `key`,url,sort,parent_key,create_time,update_time) VALUES - - ( - #{item.type}, - #{item.name}, - #{item.key}, - #{item.url}, - #{item.sort}, - #{item.parentKey}, - now(), - now() - ) - - - - - - UPDATE t_privilege - SET `type`=#{item.type},`name`=#{item.name},url=#{item.url},sort=#{item.sort},parent_key=#{item.parentKey},update_time=now() - WHERE `key` = #{item.key} - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/mapper/system/role/RolePrivilegeMapper.xml b/smart-admin-service/smart-admin-api/src/main/resources/mapper/system/role/RolePrivilegeMapper.xml deleted file mode 100644 index cb44911b..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/mapper/system/role/RolePrivilegeMapper.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - rp.id, - rp.role_id, - rp.privilege_key, - rp.update_time, - rp.create_time - - - - - DELETE FROM t_role_privilege - WHERE role_id = #{roleId} - - - - DELETE FROM t_role_privilege - WHERE privilege_key in - - #{item} - - - - - - INSERT INTO t_role_privilege (role_id, privilege_key, update_time, create_time) VALUES - - ( - #{item.roleId}, - #{item.privilegeKey}, - now(), - now() - ) - - - - - - - - - - - \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/mapper/system/systemconfig/SystemConfigMapper.xml b/smart-admin-service/smart-admin-api/src/main/resources/mapper/system/systemconfig/SystemConfigMapper.xml deleted file mode 100644 index 1cebf85b..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/mapper/system/systemconfig/SystemConfigMapper.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/pre/application.properties b/smart-admin-service/smart-admin-api/src/main/resources/pre/application.properties deleted file mode 100644 index fb3de5e5..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/pre/application.properties +++ /dev/null @@ -1,121 +0,0 @@ -######################### server ################### -server.servlet.context-path=/smart-admin-api -server.port=10086 -spring.profiles.active=@profiles.active@ - -######################### tomcat ################### -server.tomcat.basedir=/home/logs/smart-admin/tomcat-logs -server.tomcat.accesslog.enabled=true -server.tomcat.accesslog.pattern=%t %{X-Forwarded-For}i %a "%r" %s %D (%D ms) - -######################### jackson ######################### -spring.jackson.serialization.write-enums-using-to-string=true -spring.jackson.deserialization.read-enums-using-to-string=true -spring.jackson.deserialization.fail-on-unknown-properties=false -spring.jackson.default-property-inclusion=always -spring.jackson.date-format=yyyy-MM-dd HH:mm:ss -spring.jackson.time-zone=GMT+8 -spring.jackson.serialization.write-dates-as-timestamps=false - -######################### http file ######################### -spring.servlet.multipart.max-file-size=30MB -spring.servlet.multipart.max-request-size=30MB -file-upload-service.path=/home/upload/ - -######################### database ######################### -spring.datasource.url=jdbc:mysql://127.0.0.1:3306/smart-admin-dev?autoReconnect=true&useServerPreparedStmts=false&rewriteBatchedStatements=true&characterEncoding=UTF-8&useSSL=false&allowMultiQueries=true&serverTimezone=UTC -spring.datasource.username=root -spring.datasource.password=root -spring.datasource.initial-size=2 -spring.datasource.min-idle=1 -spring.datasource.max-active=10 -spring.datasource.max-wait=60000 -spring.datasource.time-between-eviction-runs-millis=60000 -spring.datasource.min-evictable-idle-time-millis=300000 -spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver -spring.datasource.filters=stat -spring.datasource.druid.username=druid -spring.datasource.druid.password=123456 -spring.datasource.druid.login.enabled=false - -######################### redis ####################################### -spring.redis.database=0 -spring.redis.host=127.0.0.1 -spring.redis.port=6379 -spring.redis.timeout=10000ms -spring.redis.password= -spring.redis.lettuce.pool.max-active=10 -spring.redis.lettuce.pool.min-idle=5 -spring.redis.lettuce.pool.max-idle=10 -spring.redis.lettuce.pool.max-wait=30000ms - -########################## rest http pool ######################### -#\u6700\u5927\u8FDE\u63A5\u6570 -http.pool.max-total=10 -#\u5355\u8DEF\u7531\u6700\u5927\u8FDE\u63A5\u6570 -http.pool.default-max-per-route=5 -#\u670D\u52A1\u5668\u8FD4\u56DE\u6570\u636E(response)\u7684\u65F6\u95F4 -http.pool.socket-timeout=8000 -#\u8FDE\u63A5\u4E0A\u670D\u52A1\u5668(\u63E1\u624B\u6210\u529F)\u7684\u65F6\u95F4 -http.pool.connect-timeout=8000 -#\u4ECE\u8FDE\u63A5\u6C60\u4E2D\u83B7\u53D6\u8FDE\u63A5\u7684\u8D85\u65F6\u65F6\u95F4 -http.pool.connection-request-timeout=8000 - -######################### mybatis\u914D\u7F6E ######################### -mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl -# mybatis-plus \u5B57\u6BB5\u9A7C\u5CF0\u81EA\u52A8\u8F6C\u6362 -mybatis-plus.configuration.map-underscore-to-camel-case=true -mybatis-plus.mapper-locations=classpath:/mapper/**/*.xml -mybatis-plus.typeAliasesPackage=net.lab1024.smartadmin.*.*.domain.entity -mybatis-plus.global-config.refresh-mapper=true -mybatis-plus.global-config.db-column-underline=true - -######################### swagger ######################### -swagger.apiGroupName=smartAdmin -swagger.title=smartAdmin -swagger.description=smartAdmin -swagger.version=1.0 -swagger.serviceUrl=http://localhost:10086/smart-admin-api -swagger.packAge=net.lab1024.smartadmin.module - -######################### jwt ######################### -jwt.key=smart-admin-jwt-key - -########################## smart reload ######################### -smart-reload.thread-count=1 -smart-reload.time-interval=30 - -######################### cros ######################### -access-control-allow-origin=* - -######################### heart beat ######################### -heart-beat.delayHandlerTime=60000 -heart-beat.intervalTime=60000 - -######################### quartz ############################# -#\u8C03\u5EA6\u6807\u8BC6\u540D \u96C6\u7FA4\u4E2D\u6BCF\u4E00\u4E2A\u5B9E\u4F8B\u90FD\u5FC5\u987B\u4F7F\u7528\u76F8\u540C\u7684\u540D\u79F0 -spring.quartz.properties.org.quartz.scheduler.instanceName=devClusteredScheduler -spring.quartz.properties.org.quartz.scheduler.instanceId=AUTO -#\u8FDC\u7A0B\u7BA1\u7406\u76F8\u5173\u7684\u914D\u7F6E,\u5168\u90E8\u5173\u95ED -spring.quartz.properties.org.quartz.scheduler.rmi.export=false -spring.quartz.properties.org.quartz.scheduler.rmi.proxy=false -#\u8DF3\u8FC7quartz\u7248\u672C\u68C0\u67E5 -spring.quartz.properties.org.quartz.scheduler.skipUpdateCheck=true -#\u6570\u636E\u4FDD\u5B58\u65B9\u5F0F\u4E3A\u6301\u4E45\u5316 -spring.quartz.properties.org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX -spring.quartz.properties.org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate -spring.quartz.properties.org.quartz.jobStore.tablePrefix=QRTZ_ -spring.quartz.properties.org.quartz.jobStore.isClustered=true -#\u8C03\u5EA6\u5B9E\u4F8B\u5931\u6548\u7684\u68C0\u67E5\u65F6\u95F4\u95F4\u9694 -spring.quartz.properties.org.quartz.jobStore.clusterCheckinInterval=10000 -spring.quartz.properties.org.quartz.jobStore.useProperties=false -#\u8C03\u5EA6\u7EBF\u7A0B -spring.quartz.properties.org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool -spring.quartz.properties.org.quartz.threadPool.threadCount=2 -spring.quartz.properties.org.quartz.threadPool.threadPriority=5 -spring.quartz.properties.org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread=true -spring.quartz.properties.org.quartz.threadPool.threadNamePrefix=quartz -spring.quartz.job-store-type=jdbc -#ALWAYS,EMBEDDED,NEVER -spring.quartz.jdbc.initialize-schema=NEVER -spring.quartz.jdbc.schema=classpath:sql/quartz_mysql_2.3.0.sql diff --git a/smart-admin-service/smart-admin-api/src/main/resources/pre/log4j2.xml b/smart-admin-service/smart-admin-api/src/main/resources/pre/log4j2.xml deleted file mode 100644 index f1942baf..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/pre/log4j2.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - /home/logs/smart-admin/dev/logs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/prod/application.properties b/smart-admin-service/smart-admin-api/src/main/resources/prod/application.properties deleted file mode 100644 index 94f75be2..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/prod/application.properties +++ /dev/null @@ -1,120 +0,0 @@ -######################### server ################### -server.servlet.context-path=/smart-admin-api -server.port=10088 -spring.profiles.active=@profiles.active@ - -######################### tomcat ################### -server.tomcat.basedir=/home/logs/smart-admin/tomcat-logs -server.tomcat.accesslog.enabled=true -server.tomcat.accesslog.pattern=%t %{X-Forwarded-For}i %a "%r" %s %D (%D ms) - -######################### jackson ######################### -spring.jackson.serialization.write-enums-using-to-string=true -spring.jackson.deserialization.read-enums-using-to-string=true -spring.jackson.deserialization.fail-on-unknown-properties=false -spring.jackson.default-property-inclusion=always -spring.jackson.date-format=yyyy-MM-dd HH:mm:ss -spring.jackson.time-zone=GMT+8 -spring.jackson.serialization.write-dates-as-timestamps=false - -######################### http file ######################### -spring.servlet.multipart.max-file-size=30MB -spring.servlet.multipart.max-request-size=30MB -file-upload-service.path=/home/upload/smart-admin-file - -######################### database ######################### -spring.datasource.url=jdbc:mysql://172.16.0.201:3306/smart-admin-prod?autoReconnect=true&useServerPreparedStmts=false&rewriteBatchedStatements=true&characterEncoding=UTF-8&useSSL=false&allowMultiQueries=true -spring.datasource.username=smart-admin -spring.datasource.password=Admin@123457 -spring.datasource.initial-size=2 -spring.datasource.min-idle=1 -spring.datasource.max-active=100 -spring.datasource.max-wait=60000 -spring.datasource.time-between-eviction-runs-millis=60000 -spring.datasource.min-evictable-idle-time-millis=300000 -spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver -spring.datasource.filters=stat -spring.datasource.druid.username=druid -spring.datasource.druid.password=druid -spring.datasource.druid.login.enabled=false - -######################### redis ####################################### -spring.redis.database=13 -spring.redis.host=127.0.0.1 -spring.redis.port=6379 -spring.redis.timeout=10000ms -spring.redis.password=Gq123456@ -spring.redis.lettuce.pool.max-active=10 -spring.redis.lettuce.pool.min-idle=5 -spring.redis.lettuce.pool.max-idle=10 -spring.redis.lettuce.pool.max-wait=30000ms - -########################## rest http pool ######################### -#\u6700\u5927\u8FDE\u63A5\u6570 -http.pool.max-total=10 -#\u5355\u8DEF\u7531\u6700\u5927\u8FDE\u63A5\u6570 -http.pool.default-max-per-route=5 -#\u670D\u52A1\u5668\u8FD4\u56DE\u6570\u636E(response)\u7684\u65F6\u95F4 -http.pool.socket-timeout=8000 -#\u8FDE\u63A5\u4E0A\u670D\u52A1\u5668(\u63E1\u624B\u6210\u529F)\u7684\u65F6\u95F4 -http.pool.connect-timeout=8000 -#\u4ECE\u8FDE\u63A5\u6C60\u4E2D\u83B7\u53D6\u8FDE\u63A5\u7684\u8D85\u65F6\u65F6\u95F4 -http.pool.connection-request-timeout=8000 - -######################### mybatis\u914D\u7F6E ######################### -mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl -# mybatis-plus \u5B57\u6BB5\u9A7C\u5CF0\u81EA\u52A8\u8F6C\u6362 -mybatis-plus.configuration.map-underscore-to-camel-case=true -mybatis-plus.mapper-locations=classpath:/mapper/**/*.xml -mybatis-plus.typeAliasesPackage=net.lab1024.smartadmin.*.*.domain.entity -mybatis-plus.global-config.refresh-mapper=true -mybatis-plus.global-config.db-column-underline=true - -######################### swagger ######################### -swagger.apiGroupName=smartAdmin -swagger.title=smartAdmin -swagger.description=smartAdmin -swagger.version=1.0 -swagger.serviceUrl=http://localhost:10086/smart-admin-api -swagger.packAge=net.lab1024.smartadmin.module - -######################### jwt ######################### -jwt.key=smart-admin-jwt-key - -########################## smart reload ######################### -smart-reload.thread-count=2 -smart-reload.time-interval=30 -######################### cros ######################### -access-control-allow-origin=preview.smartadmin.1024lab.net -######################### heart beat ######################### -heart-beat.delayHandlerTime=60000 -heart-beat.intervalTime=60000 - -######################### quartz ############################# -#\u8C03\u5EA6\u6807\u8BC6\u540D \u96C6\u7FA4\u4E2D\u6BCF\u4E00\u4E2A\u5B9E\u4F8B\u90FD\u5FC5\u987B\u4F7F\u7528\u76F8\u540C\u7684\u540D\u79F0 -spring.quartz.properties.org.quartz.scheduler.instanceName=prodClusteredScheduler -spring.quartz.properties.org.quartz.scheduler.instanceId=AUTO -#\u8FDC\u7A0B\u7BA1\u7406\u76F8\u5173\u7684\u914D\u7F6E,\u5168\u90E8\u5173\u95ED -spring.quartz.properties.org.quartz.scheduler.rmi.export=false -spring.quartz.properties.org.quartz.scheduler.rmi.proxy=false -#\u8DF3\u8FC7quartz\u7248\u672C\u68C0\u67E5 -spring.quartz.properties.org.quartz.scheduler.skipUpdateCheck=true -#\u6570\u636E\u4FDD\u5B58\u65B9\u5F0F\u4E3A\u6301\u4E45\u5316 -spring.quartz.properties.org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX -spring.quartz.properties.org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate -spring.quartz.properties.org.quartz.jobStore.tablePrefix=QRTZ_ -spring.quartz.properties.org.quartz.jobStore.isClustered=true -#\u8C03\u5EA6\u5B9E\u4F8B\u5931\u6548\u7684\u68C0\u67E5\u65F6\u95F4\u95F4\u9694 -spring.quartz.properties.org.quartz.jobStore.clusterCheckinInterval=10000 -spring.quartz.properties.org.quartz.jobStore.useProperties=false -#\u8C03\u5EA6\u7EBF\u7A0B -spring.quartz.properties.org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool -spring.quartz.properties.org.quartz.threadPool.threadCount=2 -spring.quartz.properties.org.quartz.threadPool.threadPriority=5 -spring.quartz.properties.org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread=true -spring.quartz.properties.org.quartz.threadPool.threadNamePrefix=quartz - -spring.quartz.job-store-type=jdbc -#ALWAYS,EMBEDDED,NEVER -spring.quartz.jdbc.initialize-schema=NEVER -spring.quartz.jdbc.schema=classpath:sql/quartz_mysql_2.3.0.sql diff --git a/smart-admin-service/smart-admin-api/src/main/resources/prod/log4j2.xml b/smart-admin-service/smart-admin-api/src/main/resources/prod/log4j2.xml deleted file mode 100644 index 4991f76e..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/prod/log4j2.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - /home/logs/smart-admin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/sit/application.properties b/smart-admin-service/smart-admin-api/src/main/resources/sit/application.properties deleted file mode 100644 index c7c426cf..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/sit/application.properties +++ /dev/null @@ -1,121 +0,0 @@ -######################### server ################### -server.servlet.context-path=/smart-admin-api -server.port=10086 -spring.profiles.active=@profiles.active@ - -######################### tomcat ################### -server.tomcat.basedir=/home/logs/smart-admin/tomcat-logs -server.tomcat.accesslog.enabled=true -server.tomcat.accesslog.pattern=%t %{X-Forwarded-For}i %a "%r" %s %D (%D ms) - -######################### jackson ######################### -spring.jackson.serialization.write-enums-using-to-string=true -spring.jackson.deserialization.read-enums-using-to-string=true -spring.jackson.deserialization.fail-on-unknown-properties=false -spring.jackson.default-property-inclusion=always -spring.jackson.date-format=yyyy-MM-dd HH:mm:ss -spring.jackson.time-zone=GMT+8 -spring.jackson.serialization.write-dates-as-timestamps=false - -######################### http file ######################### -spring.servlet.multipart.max-file-size=30MB -spring.servlet.multipart.max-request-size=30MB -file-upload-service.path=/home/upload/ - -######################### database ######################### -spring.datasource.url=jdbc:p6spy:mysql://127.0.0.1:3306/smart-admin-sit?autoReconnect=true&useServerPreparedStmts=false&rewriteBatchedStatements=true&characterEncoding=UTF-8&useSSL=false&allowMultiQueries=true&serverTimezone=UTC -spring.datasource.username=root -spring.datasource.password=root -spring.datasource.initial-size=2 -spring.datasource.min-idle=1 -spring.datasource.max-active=10 -spring.datasource.max-wait=60000 -spring.datasource.time-between-eviction-runs-millis=60000 -spring.datasource.min-evictable-idle-time-millis=300000 -spring.datasource.driver-class-name=com.p6spy.engine.spy.P6SpyDriver -spring.datasource.filters=stat -spring.datasource.druid.username=druid -spring.datasource.druid.password=123456 -spring.datasource.druid.login.enabled=false - -######################### redis ####################################### -spring.redis.database=0 -spring.redis.host=127.0.0.1 -spring.redis.port=6379 -spring.redis.timeout=10000ms -spring.redis.password= -spring.redis.lettuce.pool.max-active=10 -spring.redis.lettuce.pool.min-idle=5 -spring.redis.lettuce.pool.max-idle=10 -spring.redis.lettuce.pool.max-wait=30000ms - -########################## rest http pool ######################### -#\u6700\u5927\u8FDE\u63A5\u6570 -http.pool.max-total=10 -#\u5355\u8DEF\u7531\u6700\u5927\u8FDE\u63A5\u6570 -http.pool.default-max-per-route=5 -#\u670D\u52A1\u5668\u8FD4\u56DE\u6570\u636E(response)\u7684\u65F6\u95F4 -http.pool.socket-timeout=8000 -#\u8FDE\u63A5\u4E0A\u670D\u52A1\u5668(\u63E1\u624B\u6210\u529F)\u7684\u65F6\u95F4 -http.pool.connect-timeout=8000 -#\u4ECE\u8FDE\u63A5\u6C60\u4E2D\u83B7\u53D6\u8FDE\u63A5\u7684\u8D85\u65F6\u65F6\u95F4 -http.pool.connection-request-timeout=8000 - -######################### mybatis\u914D\u7F6E ######################### -mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl -# mybatis-plus \u5B57\u6BB5\u9A7C\u5CF0\u81EA\u52A8\u8F6C\u6362 -mybatis-plus.configuration.map-underscore-to-camel-case=true -mybatis-plus.mapper-locations=classpath:/mapper/**/*.xml -mybatis-plus.typeAliasesPackage=net.lab1024.smartadmin.*.*.domain.entity -mybatis-plus.global-config.refresh-mapper=true -mybatis-plus.global-config.db-column-underline=true - -######################### swagger ######################### -swagger.apiGroupName=smartAdmin -swagger.title=smartAdmin -swagger.description=smartAdmin -swagger.version=1.0 -swagger.serviceUrl=http://localhost:10086/smart-admin-api -swagger.packAge=net.lab1024.smartadmin.module - -######################### jwt ######################### -jwt.key=smart-admin-jwt-key - -########################## smart reload ######################### -smart-reload.thread-count=1 -smart-reload.time-interval=120 - -######################### cros ######################### -access-control-allow-origin=* - -######################### heart beat ######################### -heart-beat.delayHandlerTime=60000 -heart-beat.intervalTime=300000 - -######################### quartz ############################# -#\u8C03\u5EA6\u6807\u8BC6\u540D \u96C6\u7FA4\u4E2D\u6BCF\u4E00\u4E2A\u5B9E\u4F8B\u90FD\u5FC5\u987B\u4F7F\u7528\u76F8\u540C\u7684\u540D\u79F0 -spring.quartz.properties.org.quartz.scheduler.instanceName=devClusteredScheduler -spring.quartz.properties.org.quartz.scheduler.instanceId=AUTO -#\u8FDC\u7A0B\u7BA1\u7406\u76F8\u5173\u7684\u914D\u7F6E,\u5168\u90E8\u5173\u95ED -spring.quartz.properties.org.quartz.scheduler.rmi.export=false -spring.quartz.properties.org.quartz.scheduler.rmi.proxy=false -#\u8DF3\u8FC7quartz\u7248\u672C\u68C0\u67E5 -spring.quartz.properties.org.quartz.scheduler.skipUpdateCheck=true -#\u6570\u636E\u4FDD\u5B58\u65B9\u5F0F\u4E3A\u6301\u4E45\u5316 -spring.quartz.properties.org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX -spring.quartz.properties.org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate -spring.quartz.properties.org.quartz.jobStore.tablePrefix=QRTZ_ -spring.quartz.properties.org.quartz.jobStore.isClustered=true -#\u8C03\u5EA6\u5B9E\u4F8B\u5931\u6548\u7684\u68C0\u67E5\u65F6\u95F4\u95F4\u9694 -spring.quartz.properties.org.quartz.jobStore.clusterCheckinInterval=10000 -spring.quartz.properties.org.quartz.jobStore.useProperties=false -#\u8C03\u5EA6\u7EBF\u7A0B -spring.quartz.properties.org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool -spring.quartz.properties.org.quartz.threadPool.threadCount=2 -spring.quartz.properties.org.quartz.threadPool.threadPriority=5 -spring.quartz.properties.org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread=true -spring.quartz.properties.org.quartz.threadPool.threadNamePrefix=quartz -spring.quartz.job-store-type=jdbc -#ALWAYS,EMBEDDED,NEVER -spring.quartz.jdbc.initialize-schema=NEVER -spring.quartz.jdbc.schema=classpath:sql/quartz_mysql_2.3.0.sql diff --git a/smart-admin-service/smart-admin-api/src/main/resources/sit/log4j2.xml b/smart-admin-service/smart-admin-api/src/main/resources/sit/log4j2.xml deleted file mode 100644 index ac533c99..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/sit/log4j2.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - /home/logs/smart-admin/dev/logs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/sit/spy.properties b/smart-admin-service/smart-admin-api/src/main/resources/sit/spy.properties deleted file mode 100644 index 22c91d1e..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/sit/spy.properties +++ /dev/null @@ -1,20 +0,0 @@ -#modulelist=com.baomidou.mybatisplus.extension.p6spy.MybatisPlusLogFactory -# \u81EA\u5B9A\u4E49\u65E5\u5FD7\u6253\u5370 -logMessageFormat=com.baomidou.mybatisplus.extension.p6spy.P6SpyLogger -#\u65E5\u5FD7\u8F93\u51FA\u5230\u63A7\u5236\u53F0 -appender=com.baomidou.mybatisplus.extension.p6spy.StdoutLogger -# \u4F7F\u7528\u65E5\u5FD7\u7CFB\u7EDF\u8BB0\u5F55 sql -#appender=com.p6spy.engine.spy.appender.Slf4JLogger -# \u8BBE\u7F6E p6spy driver \u4EE3\u7406 -deregisterdrivers=true -# \u53D6\u6D88JDBC URL\u524D\u7F00 -useprefix=true -# \u914D\u7F6E\u8BB0\u5F55 Log \u4F8B\u5916,\u53EF\u53BB\u6389\u7684\u7ED3\u679C\u96C6\u6709error,info,batch,debug,statement,commit,rollback,result,resultset. -#excludecategories=info,debug,result,commit,resultset -# \u65E5\u671F\u683C\u5F0F -dateformat=yyyy-MM-dd HH:mm:ss - -# \u662F\u5426\u5F00\u542F\u6162SQL\u8BB0\u5F55 -outagedetection=true -# \u6162SQL\u8BB0\u5F55\u6807\u51C6 2 \u79D2 -outagedetectioninterval=2 \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/sql/quartz_mysql_2.3.0.sql b/smart-admin-service/smart-admin-api/src/main/resources/sql/quartz_mysql_2.3.0.sql deleted file mode 100644 index 8968c23f..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/sql/quartz_mysql_2.3.0.sql +++ /dev/null @@ -1,179 +0,0 @@ -# -# In your Quartz properties file, you'll need to set -# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate -# -# -# By: Ron Cordell - roncordell -# I didn't see this anywhere, so I thought I'd post it here. This is the script from Quartz to create the tables in a MySQL database, modified to use INNODB instead of MYISAM. - -DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS; -DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE; -DROP TABLE IF EXISTS QRTZ_LOCKS; -DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_JOB_DETAILS; -DROP TABLE IF EXISTS QRTZ_CALENDARS; - -CREATE TABLE QRTZ_JOB_DETAILS( -SCHED_NAME VARCHAR(120) NOT NULL, -JOB_NAME VARCHAR(190) NOT NULL, -JOB_GROUP VARCHAR(190) NOT NULL, -DESCRIPTION VARCHAR(250) NULL, -JOB_CLASS_NAME VARCHAR(250) NOT NULL, -IS_DURABLE VARCHAR(1) NOT NULL, -IS_NONCONCURRENT VARCHAR(1) NOT NULL, -IS_UPDATE_DATA VARCHAR(1) NOT NULL, -REQUESTS_RECOVERY VARCHAR(1) NOT NULL, -JOB_DATA BLOB NULL, -PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)) -ENGINE=InnoDB; - -CREATE TABLE QRTZ_TRIGGERS ( -SCHED_NAME VARCHAR(120) NOT NULL, -TRIGGER_NAME VARCHAR(190) NOT NULL, -TRIGGER_GROUP VARCHAR(190) NOT NULL, -JOB_NAME VARCHAR(190) NOT NULL, -JOB_GROUP VARCHAR(190) NOT NULL, -DESCRIPTION VARCHAR(250) NULL, -NEXT_FIRE_TIME BIGINT(13) NULL, -PREV_FIRE_TIME BIGINT(13) NULL, -PRIORITY INTEGER NULL, -TRIGGER_STATE VARCHAR(16) NOT NULL, -TRIGGER_TYPE VARCHAR(8) NOT NULL, -START_TIME BIGINT(13) NOT NULL, -END_TIME BIGINT(13) NULL, -CALENDAR_NAME VARCHAR(190) NULL, -MISFIRE_INSTR SMALLINT(2) NULL, -JOB_DATA BLOB NULL, -PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), -FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP) -REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)) -ENGINE=InnoDB; - -CREATE TABLE QRTZ_SIMPLE_TRIGGERS ( -SCHED_NAME VARCHAR(120) NOT NULL, -TRIGGER_NAME VARCHAR(190) NOT NULL, -TRIGGER_GROUP VARCHAR(190) NOT NULL, -REPEAT_COUNT BIGINT(7) NOT NULL, -REPEAT_INTERVAL BIGINT(12) NOT NULL, -TIMES_TRIGGERED BIGINT(10) NOT NULL, -PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), -FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) -REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)) -ENGINE=InnoDB; - -CREATE TABLE QRTZ_CRON_TRIGGERS ( -SCHED_NAME VARCHAR(120) NOT NULL, -TRIGGER_NAME VARCHAR(190) NOT NULL, -TRIGGER_GROUP VARCHAR(190) NOT NULL, -CRON_EXPRESSION VARCHAR(120) NOT NULL, -TIME_ZONE_ID VARCHAR(80), -PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), -FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) -REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)) -ENGINE=InnoDB; - -CREATE TABLE QRTZ_SIMPROP_TRIGGERS - ( - SCHED_NAME VARCHAR(120) NOT NULL, - TRIGGER_NAME VARCHAR(190) NOT NULL, - TRIGGER_GROUP VARCHAR(190) NOT NULL, - STR_PROP_1 VARCHAR(512) NULL, - STR_PROP_2 VARCHAR(512) NULL, - STR_PROP_3 VARCHAR(512) NULL, - INT_PROP_1 INT NULL, - INT_PROP_2 INT NULL, - LONG_PROP_1 BIGINT NULL, - LONG_PROP_2 BIGINT NULL, - DEC_PROP_1 NUMERIC(13,4) NULL, - DEC_PROP_2 NUMERIC(13,4) NULL, - BOOL_PROP_1 VARCHAR(1) NULL, - BOOL_PROP_2 VARCHAR(1) NULL, - PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), - FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) - REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)) -ENGINE=InnoDB; - -CREATE TABLE QRTZ_BLOB_TRIGGERS ( -SCHED_NAME VARCHAR(120) NOT NULL, -TRIGGER_NAME VARCHAR(190) NOT NULL, -TRIGGER_GROUP VARCHAR(190) NOT NULL, -BLOB_DATA BLOB NULL, -PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), -INDEX (SCHED_NAME,TRIGGER_NAME, TRIGGER_GROUP), -FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) -REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)) -ENGINE=InnoDB; - -CREATE TABLE QRTZ_CALENDARS ( -SCHED_NAME VARCHAR(120) NOT NULL, -CALENDAR_NAME VARCHAR(190) NOT NULL, -CALENDAR BLOB NOT NULL, -PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)) -ENGINE=InnoDB; - -CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS ( -SCHED_NAME VARCHAR(120) NOT NULL, -TRIGGER_GROUP VARCHAR(190) NOT NULL, -PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)) -ENGINE=InnoDB; - -CREATE TABLE QRTZ_FIRED_TRIGGERS ( -SCHED_NAME VARCHAR(120) NOT NULL, -ENTRY_ID VARCHAR(95) NOT NULL, -TRIGGER_NAME VARCHAR(190) NOT NULL, -TRIGGER_GROUP VARCHAR(190) NOT NULL, -INSTANCE_NAME VARCHAR(190) NOT NULL, -FIRED_TIME BIGINT(13) NOT NULL, -SCHED_TIME BIGINT(13) NOT NULL, -PRIORITY INTEGER NOT NULL, -STATE VARCHAR(16) NOT NULL, -JOB_NAME VARCHAR(190) NULL, -JOB_GROUP VARCHAR(190) NULL, -IS_NONCONCURRENT VARCHAR(1) NULL, -REQUESTS_RECOVERY VARCHAR(1) NULL, -PRIMARY KEY (SCHED_NAME,ENTRY_ID)) -ENGINE=InnoDB; - -CREATE TABLE QRTZ_SCHEDULER_STATE ( -SCHED_NAME VARCHAR(120) NOT NULL, -INSTANCE_NAME VARCHAR(190) NOT NULL, -LAST_CHECKIN_TIME BIGINT(13) NOT NULL, -CHECKIN_INTERVAL BIGINT(13) NOT NULL, -PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)) -ENGINE=InnoDB; - -CREATE TABLE QRTZ_LOCKS ( -SCHED_NAME VARCHAR(120) NOT NULL, -LOCK_NAME VARCHAR(40) NOT NULL, -PRIMARY KEY (SCHED_NAME,LOCK_NAME)) -ENGINE=InnoDB; - -CREATE INDEX IDX_QRTZ_J_REQ_RECOVERY ON QRTZ_JOB_DETAILS(SCHED_NAME,REQUESTS_RECOVERY); -CREATE INDEX IDX_QRTZ_J_GRP ON QRTZ_JOB_DETAILS(SCHED_NAME,JOB_GROUP); - -CREATE INDEX IDX_QRTZ_T_J ON QRTZ_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP); -CREATE INDEX IDX_QRTZ_T_JG ON QRTZ_TRIGGERS(SCHED_NAME,JOB_GROUP); -CREATE INDEX IDX_QRTZ_T_C ON QRTZ_TRIGGERS(SCHED_NAME,CALENDAR_NAME); -CREATE INDEX IDX_QRTZ_T_G ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP); -CREATE INDEX IDX_QRTZ_T_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE); -CREATE INDEX IDX_QRTZ_T_N_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_STATE); -CREATE INDEX IDX_QRTZ_T_N_G_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP,TRIGGER_STATE); -CREATE INDEX IDX_QRTZ_T_NEXT_FIRE_TIME ON QRTZ_TRIGGERS(SCHED_NAME,NEXT_FIRE_TIME); -CREATE INDEX IDX_QRTZ_T_NFT_ST ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE,NEXT_FIRE_TIME); -CREATE INDEX IDX_QRTZ_T_NFT_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME); -CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_STATE); -CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE_GRP ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_GROUP,TRIGGER_STATE); - -CREATE INDEX IDX_QRTZ_FT_TRIG_INST_NAME ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME); -CREATE INDEX IDX_QRTZ_FT_INST_JOB_REQ_RCVRY ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME,REQUESTS_RECOVERY); -CREATE INDEX IDX_QRTZ_FT_J_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP); -CREATE INDEX IDX_QRTZ_FT_JG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_GROUP); -CREATE INDEX IDX_QRTZ_FT_T_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP); -CREATE INDEX IDX_QRTZ_FT_TG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_GROUP); - -commit; diff --git a/smart-admin-service/smart-admin-api/src/main/resources/sql/smart-admin.sql b/smart-admin-service/smart-admin-api/src/main/resources/sql/smart-admin.sql deleted file mode 100644 index dfd8e8c1..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/sql/smart-admin.sql +++ /dev/null @@ -1,1588 +0,0 @@ --- -------------------------------------------------------- --- 主机: 127.0.0.1 --- 服务器版本: 8.0.20 - MySQL Community Server - GPL --- 服务器操作系统: Win64 --- HeidiSQL 版本: 11.0.0.5919 --- -------------------------------------------------------- - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET NAMES utf8 */; -/*!50503 SET NAMES utf8mb4 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; - - --- 导出 smart-admin-dev 的数据库结构 -DROP DATABASE IF EXISTS `smart-admin-dev`; -CREATE DATABASE IF NOT EXISTS `smart-admin-dev` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci */ /*!80016 DEFAULT ENCRYPTION='N' */; -USE `smart-admin-dev`; - --- 导出 表 smart-admin-dev.t_department 结构 -DROP TABLE IF EXISTS `t_department`; -CREATE TABLE IF NOT EXISTS `t_department` ( - `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '部门主键id', - `name` varchar(50) NOT NULL COMMENT '部门名称', - `short_name` varchar(50) DEFAULT NULL COMMENT '部门简称', - `manager_id` int unsigned DEFAULT NULL COMMENT '部门负责人id', - `parent_id` int unsigned DEFAULT NULL COMMENT '部门的父级id', - `sort` int NOT NULL COMMENT '部门排序', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`), - KEY `parent_id` (`parent_id`) -) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='部门表'; - --- 正在导出表 smart-admin-dev.t_department 的数据:~4 rows (大约) -DELETE FROM `t_department`; -/*!40000 ALTER TABLE `t_department` DISABLE KEYS */; -INSERT INTO `t_department` (`id`, `name`, `short_name`, `manager_id`, `parent_id`, `sort`, `update_time`, `create_time`) VALUES - (1, '1024创新实验室', 'ZWGWL', 16, 0, 1, '2019-04-03 10:41:25', '2019-04-03 10:41:25'), - (2, '二级部门-2', NULL, 15, 1, 17, '2019-04-15 16:45:10', '2019-04-15 16:45:10'), - (4, '二级部门-1', '管理', 14, 1, 20, '2019-04-17 16:14:55', '2019-04-17 16:14:55'), - (8, '三级部门-1', NULL, NULL, 4, 8, '2019-04-25 12:25:52', '2019-04-25 12:25:52'), - (9, '四级部门-1', NULL, NULL, 8, 9, '2019-04-25 12:26:36', '2019-04-25 12:26:36'), - (10, '五级部门-1', NULL, NULL, 9, 10, '2019-04-25 12:26:49', '2019-04-25 12:26:49'), - (11, '六级部门-1', NULL, NULL, 10, 11, '2019-04-25 12:26:59', '2019-04-25 12:26:59'), - (12, '七级部门-1', NULL, NULL, 11, 12, '2019-04-25 12:27:18', '2019-04-25 12:27:18'), - (13, '八级部门-1', NULL, NULL, 12, 13, '2019-04-25 12:27:34', '2019-04-25 12:27:34'), - (14, '九级部门-1', NULL, NULL, 13, 14, '2019-04-25 12:27:47', '2019-04-25 12:27:47'), - (15, '十级部门-1', NULL, NULL, 14, 15, '2019-04-25 12:28:16', '2019-04-25 12:28:16'), - (16, '十一级部门部门部部门门嘻嘻哈哈-1', NULL, 13, 15, 16, '2019-04-25 14:56:40', '2019-04-25 14:56:40'), - (17, '信息中心', NULL, 16, 1, 4, '2019-04-26 11:53:50', '2019-04-26 11:53:50'), - (18, '测试部门', NULL, 16, 17, 18, '2019-04-26 11:54:06', '2019-04-26 11:54:06'), - (19, '张娇测试', NULL, NULL, 2, 22, '2019-04-26 14:36:18', '2019-04-26 14:36:18'), - (20, '子部门', NULL, NULL, 2, 23, '2019-04-26 14:36:28', '2019-04-26 14:36:28'), - (22, '张静如', NULL, 16, 1, 2, '2019-04-28 14:21:44', '2019-04-28 14:21:44'), - (23, '张静如2', NULL, 22, 4, 19, '2019-04-28 14:22:48', '2019-04-28 14:22:48'), - (24, '测试', NULL, 18, 23, 24, '2019-04-29 10:12:42', '2019-04-29 10:12:42'), - (25, '测试', NULL, 18, 23, 25, '2019-04-29 10:12:42', '2019-04-29 10:12:42'); -/*!40000 ALTER TABLE `t_department` ENABLE KEYS */; - --- 导出 表 smart-admin-dev.t_email 结构 -DROP TABLE IF EXISTS `t_email`; -CREATE TABLE IF NOT EXISTS `t_email` ( - `id` int NOT NULL AUTO_INCREMENT, - `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '标题', - `to_emails` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '收件人', - `send_status` tinyint NOT NULL DEFAULT '0' COMMENT '发送状态 0未发送 1已发送', - `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '邮件内容', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=87 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - --- 正在导出表 smart-admin-dev.t_email 的数据:~56 rows (大约) -DELETE FROM `t_email`; -/*!40000 ALTER TABLE `t_email` DISABLE KEYS */; -INSERT INTO `t_email` (`id`, `title`, `to_emails`, `send_status`, `content`, `create_time`, `update_time`) VALUES - (20, '新增测试12345', '新增测试@11.com', 1, '

这是内容

', '2019-08-30 15:35:12', '2019-08-30 15:35:12'), - (21, 'b', 'asdf@33.com', 1, '

c

', '2019-09-06 14:25:33', '2019-09-06 14:25:33'), - (23, 'string', 'string', 0, 'string', '2019-09-06 06:55:01', '2019-09-06 06:55:01'), - (24, 'string', 'string', 0, 'string', '2019-09-06 06:55:01', '2019-09-06 06:55:01'), - (26, 'string', 'string', 0, 'string', '2019-09-06 07:01:32', '2019-09-06 07:01:32'), - (27, 'string', 'string', 0, 'string', '2019-09-06 07:01:32', '2019-09-06 07:01:32'), - (37, 'ewqwe', '适者生存@22.cc', 1, '

qweqwe

', '2019-11-09 10:00:46', '2019-11-09 10:00:46'), - (38, 'ewqwe', '适者生存@22.cc', 1, '

qweqwe

', '2019-11-09 10:00:49', '2019-11-09 10:00:49'), - (39, 'dsfds', 'dsfsd@qq.ccc', 1, '

fsdfs

', '2019-11-09 10:04:54', '2019-11-09 10:04:54'), - (40, 'dsfds', 'dsfsd@qq.ccc', 1, '

fsdfs

', '2019-11-09 10:04:57', '2019-11-09 10:04:57'), - (41, 'dsfds', 'dsfsd@qq.ccc', 1, '

fsdfs

', '2019-11-09 10:04:57', '2019-11-09 10:04:57'), - (42, 'dsfds', 'dsfsd@qq.ccc', 1, '

fsdfs

', '2019-11-09 10:04:58', '2019-11-09 10:04:58'), - (43, 'dsfds', 'dsfsd@qq.ccc', 1, '

fsdfs

', '2019-11-09 10:04:59', '2019-11-09 10:04:59'), - (44, 'dsfds', 'dsfsd@qq.ccc', 1, '

fsdfs

', '2019-11-09 10:04:59', '2019-11-09 10:04:59'), - (45, 'dsfds', 'dsfsd@qq.ccc', 1, '

fsdfs

', '2019-11-09 10:05:16', '2019-11-09 10:05:16'), - (46, 'dsfds', 'dsfsd@qq.ccc', 1, '

fsdfs

', '2019-11-09 10:06:29', '2019-11-09 10:06:29'), - (47, 'dsfds', 'dsfsd@qq.ccc', 1, '

fsdfs

', '2019-11-09 10:07:02', '2019-11-09 10:07:02'), - (48, 'dsfds', 'dsfsd@qq.ccc', 1, '

fsdfs

', '2019-11-09 10:07:16', '2019-11-09 10:07:16'), - (49, '2342', '11@ss.cc', 1, '

234234

', '2019-11-09 10:08:13', '2019-11-09 10:08:13'), - (50, '2342', '11@ss.cc', 1, '

234234

', '2019-11-09 10:08:30', '2019-11-09 10:08:30'), - (51, '2342', '11@ss.cc', 1, '

234234

', '2019-11-09 10:08:50', '2019-11-09 10:08:50'), - (52, '2342', '11@ss.cc', 1, '

234234

', '2019-11-09 10:09:09', '2019-11-09 10:09:09'), - (53, '2342', '11@ss.cc', 1, '

234234

', '2019-11-09 10:09:31', '2019-11-09 10:09:31'), - (54, '2342', '11@ss.cc', 1, '

234234

', '2019-11-09 10:12:24', '2019-11-09 10:12:24'), - (55, '2342', '11@ss.cc', 1, '

234234

', '2019-11-09 10:13:13', '2019-11-09 10:13:13'), - (56, 'asdasd', '3423@aqq.cc', 0, '

asdasd

', '2019-11-09 10:20:42', '2019-11-09 10:20:42'), - (57, 'asdasd', '3423@aqq.cc', 0, '

asdasd

', '2019-11-09 10:20:52', '2019-11-09 10:20:52'), - (58, 'asdasd', '3423@aqq.cc', 0, '

asdasd

', '2019-11-09 10:21:16', '2019-11-09 10:21:16'), - (59, 'asdasd', '3423@aqq.cc', 0, '

asdasd

', '2019-11-09 10:21:24', '2019-11-09 10:21:24'), - (60, 'asdasd', '3423@aqq.cc', 0, '

asdasd

', '2019-11-09 10:21:30', '2019-11-09 10:21:30'), - (61, 'asdasd', '3423@aqq.cc', 0, '

asdasd

', '2019-11-09 10:21:53', '2019-11-09 10:21:53'), - (62, 'a21312', '23423@qq.cc', 0, '

asdasdas

', '2019-11-09 10:23:40', '2019-11-09 10:23:40'), - (63, '11', '1234@qq.com', 0, '

23

', '2019-11-15 15:35:12', '2019-11-15 15:35:12'), - (64, '11', '1234@qq.com', 0, '

23

', '2019-11-15 15:35:15', '2019-11-15 15:35:15'), - (65, '11', '1234@qq.com', 0, '

23

', '2019-11-15 15:35:16', '2019-11-15 15:35:16'), - (66, 'eeee', '1234@qq.com', 0, '

    eee2233

', '2019-11-15 17:00:00', '2019-11-15 17:00:00'), - (67, 'eeee', '1234@qq.com', 0, '

    eee2233

', '2019-11-15 17:00:03', '2019-11-15 17:00:03'), - (68, 'eeee', '1234@qq.com', 0, '

    eee2233

', '2019-11-15 17:00:04', '2019-11-15 17:00:04'), - (69, '22223', '1017146812@qq.com', 0, '

    e34233

', '2019-11-15 17:00:33', '2019-11-15 17:00:33'), - (70, '22223', '1017146812@qq.com', 0, '

    e34233

', '2019-11-15 17:00:34', '2019-11-15 17:00:34'), - (71, '22223', '1017146812@qq.com', 0, '

    e34233

', '2019-11-15 17:00:34', '2019-11-15 17:00:34'), - (72, '22223', '12232', 0, '

    e34233

', '2019-11-15 17:00:49', '2019-11-15 17:00:49'), - (73, '22223', '12232@qq.com', 0, '

    e34233

', '2019-11-15 17:00:56', '2019-11-15 17:00:56'), - (74, 'dsasdasd', 'asdas@qq.com', 0, '

asdasd

', '2019-11-16 08:51:44', '2019-11-16 08:51:44'), - (75, 'dsasdasd', 'asdas@qq.com', 0, '

asdasd

', '2019-11-16 09:05:10', '2019-11-16 09:05:10'), - (76, 'dsasdasd', 'asdas@qq.com', 0, '

asdasd

', '2019-11-16 09:05:14', '2019-11-16 09:05:14'), - (77, 'dsasdasd', 'asdas@qq.com', 0, '

asdasd

', '2019-11-16 09:06:34', '2019-11-16 09:06:34'), - (78, 'dsasdasd', 'asdas@qq.com', 0, '

asdasd

', '2019-11-16 09:07:09', '2019-11-16 09:07:09'), - (79, 'dsasdasd', 'asdas@qq.com', 0, '

asdasd

', '2019-11-16 09:07:30', '2019-11-16 09:07:30'), - (80, 'dsasdasd', 'asdas@qq.com', 0, '

asdasd

', '2019-11-16 09:07:32', '2019-11-16 09:07:32'), - (81, 'dsasdasd', 'asdas@qq.com', 0, '

asdasd

', '2019-11-16 09:08:29', '2019-11-16 09:08:29'), - (82, 'sdfs', 'ss@ss.cc', 0, '

dsdsf

', '2019-11-16 09:08:46', '2019-11-16 09:08:46'), - (83, 'asdasd', 'asd@qq.vv', 0, '

asdas

', '2019-11-16 09:09:18', '2019-11-16 09:09:18'), - (84, 'asdasd', 'asd@qq.vv', 0, '

asdas

', '2019-11-16 09:09:42', '2019-11-16 09:09:42'), - (85, 'asdasd', 'asd@qq.vv', 0, '

asdas

', '2019-11-16 09:09:46', '2019-11-16 09:09:46'), - (86, 'dasdad', 'dasda@ss.cc', 1, '

dasasdas

', '2019-11-16 09:10:05', '2019-11-16 09:10:05'); -/*!40000 ALTER TABLE `t_email` ENABLE KEYS */; - --- 导出 表 smart-admin-dev.t_employee 结构 -DROP TABLE IF EXISTS `t_employee`; -CREATE TABLE IF NOT EXISTS `t_employee` ( - `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', - `login_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '登录帐号', - `login_pwd` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '登录密码', - `actual_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '员工名称', - `nick_name` varchar(30) DEFAULT '' COMMENT '别名', - `phone` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '手机号码', - `id_card` varchar(18) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '身份证', - `birthday` date DEFAULT NULL COMMENT '出生日期', - `email` varchar(50) DEFAULT NULL COMMENT '邮箱', - `department_id` int unsigned NOT NULL COMMENT '部门id', - `is_leave` int NOT NULL DEFAULT '0' COMMENT '是否离职1是', - `is_disabled` int NOT NULL DEFAULT '0' COMMENT '是否被禁用 0否1是', - `remark` varchar(200) DEFAULT NULL COMMENT '备注', - `create_user` int unsigned NOT NULL COMMENT '创建者id', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `is_delete` int NOT NULL DEFAULT '0' COMMENT '是否删除0否 1是', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='员工表'; - --- 正在导出表 smart-admin-dev.t_employee 的数据:~28 rows (大约) -DELETE FROM `t_employee`; -/*!40000 ALTER TABLE `t_employee` DISABLE KEYS */; -INSERT INTO `t_employee` (`id`, `login_name`, `login_pwd`, `actual_name`, `nick_name`, `phone`, `id_card`, `birthday`, `email`, `department_id`, `is_leave`, `is_disabled`, `remark`, `create_user`, `update_time`, `create_time`, `is_delete`) VALUES - (1, 'sa', 'c655798e4648c540812a1b8f48759af7', '管理员', '15515515515', '13112312131', '410306199202020020', '1992-02-02', NULL, 1, 0, 0, NULL, 0, '2019-04-27 09:56:17', '2018-05-11 09:38:54', 0), - (11, 'role1', 'c655798e4648c540812a1b8f48759af7', '角色测试1', '', '18123245230', '', '1970-01-01', '', 4, 0, 0, NULL, 1, '2019-04-27 09:56:17', '2019-04-25 12:30:22', 0), - (12, 'role2', 'c655798e4648c540812a1b8f48759af7', '角色测试2', '', '18121451241', '', NULL, '', 4, 0, 0, NULL, 1, '2019-08-01 10:04:38', '2019-04-25 12:31:11', 0), - (13, 'lihaifan', 'c655798e4648c540812a1b8f48759af7', 'lihaifan', '', '18399485774', '', NULL, '', 1, 0, 0, NULL, 1, '2019-04-27 09:56:17', '2019-04-25 13:50:44', 0), - (14, 'lipeng', 'c655798e4648c540812a1b8f48759af7', '李鹏1', '', '13937988294', '', NULL, '', 2, 0, 0, NULL, 1, '2019-04-27 09:56:17', '2019-04-25 14:34:47', 0), - (15, 'huangwenli', 'c655798e4648c540812a1b8f48759af7', '黄文丽', '', '15515515515', '', NULL, '', 16, 0, 0, NULL, 1, '2019-04-27 09:56:17', '2019-04-26 10:05:05', 0), - (16, 'huangwenli1', 'c655798e4648c540812a1b8f48759af7', '黄文丽', '', '15515515515', '', NULL, '', 15, 0, 0, NULL, 1, '2019-04-27 14:04:19', '2019-04-26 10:25:04', 0), - (17, 'zhangjiao', 'c655798e4648c540812a1b8f48759af7', '张娇', '阿娇', '15670390391', '410305199102020020', '1991-02-02', '86484@qq.com', 19, 0, 0, NULL, 1, '2019-08-05 16:33:57', '2019-04-26 14:37:23', 0), - (18, 'zhangjiao1', 'c655798e4648c540812a1b8f48759af7', '张娇1', '', '15670390391', '', '2019-04-18', '6666@qq.com', 20, 0, 0, NULL, 1, '2019-08-05 16:33:57', '2019-04-26 14:45:55', 0), - (19, 'zhenxiaocang', 'c655798e4648c540812a1b8f48759af7', '珍小藏', '', '15670390391', '', NULL, '', 19, 0, 1, NULL, 1, '2019-09-09 08:34:35', '2019-04-26 14:46:57', 0), - (20, 'matengfei', 'c655798e4648c540812a1b8f48759af7', '马腾飞', '', '15670390393', '', NULL, '', 19, 0, 0, NULL, 1, '2019-08-05 16:33:57', '2019-04-26 14:47:24', 0), - (21, 'ceshi123', 'c655798e4648c540812a1b8f48759af7', '测试人员', '', '18829938477', '', NULL, '', 1, 0, 1, NULL, 13, '2019-04-27 09:56:17', '2019-04-27 09:38:07', 1), - (22, 'zhangjingru', 'c655798e4648c540812a1b8f48759af7', '张静如', '', '15600000000', '', NULL, '', 1, 0, 0, NULL, 1, '2019-09-04 09:06:47', '2019-04-28 14:05:03', 0), - (23, 'sdfsdfdsfsdfdsfdsf', 'c655798e4648c540812a1b8f48759af7', 'werewr', '', '15698585858', '', NULL, '', 19, 0, 0, NULL, 1, '2019-09-05 16:13:03', '2019-04-28 16:26:27', 0), - (25, 'shq2019', 'c655798e4648c540812a1b8f48759af7', 'shq', 'shq', '18798801298', '410281199309024040', '1993-09-02', '', 17, 0, 0, NULL, 1, '2019-08-05 16:33:57', '2019-05-05 09:13:41', 0), - (26, 'zhangjiao666', 'c655798e4648c540812a1b8f48759af7', 'tom我是五个字12', '', '15612345678', '', NULL, '', 18, 0, 0, NULL, 1, '2019-08-05 16:33:57', '2019-05-05 15:34:10', 0), - (28, 'dfsfgds', 'c655798e4648c540812a1b8f48759af7', 'fds', '', '15854127845', '', NULL, '', 22, 0, 1, NULL, 1, '2019-09-06 08:58:40', '2019-05-06 10:36:57', 0), - (29, 'abcabc', 'c655798e4648c540812a1b8f48759af7', 'abccba', 'aaabac', '13311112222', '', NULL, '', 17, 0, 0, NULL, 1, '2019-08-05 16:33:57', '2019-07-10 17:00:58', 0), - (30, 'gengweigang', 'c655798e4648c540812a1b8f48759af7', '耿为刚', 'geng', '15038588418', '', NULL, '', 17, 0, 0, NULL, 1, '2019-08-08 14:35:51', '2019-08-08 14:35:51', 0), - (31, 'gengweigang1', 'c655798e4648c540812a1b8f48759af7', '耿为刚1', '这是别名', '15038588418', '410322193312123232', '1933-12-12', '32@qq.com', 18, 0, 0, NULL, 30, '2019-08-23 09:27:22', '2019-08-23 09:25:50', 0), - (32, 'ceshi123', 'c655798e4648c540812a1b8f48759af7', '测试', '测试', '15670702651', '', NULL, '', 17, 0, 0, NULL, 1, '2019-09-04 09:05:48', '2019-09-03 11:48:04', 0), - (33, 'ceshi321', 'c655798e4648c540812a1b8f48759af7', '测试', '测试', '15670702651', '', NULL, '', 17, 0, 1, NULL, 1, '2019-09-03 15:51:16', '2019-09-03 11:49:17', 0), - (34, 'ceshi123321', 'c655798e4648c540812a1b8f48759af7', '123', '', '15600000000', '', NULL, '', 22, 0, 1, NULL, 1, '2019-09-06 08:58:37', '2019-09-04 09:13:54', 0), - (35, 'guoqingfeng', 'c655798e4648c540812a1b8f48759af7', '郭青枫', '', '15670702651', '', NULL, '', 18, 0, 0, NULL, 1, '2019-09-04 15:09:00', '2019-09-04 15:09:00', 0), - (36, 'li327263458', 'c655798e4648c540812a1b8f48759af7', 'lipeng', '', '13937988294', '', NULL, '', 17, 0, 0, NULL, 1, '2019-09-09 17:01:39', '2019-09-09 17:01:39', 0), - (37, 'test123', 'c655798e4648c540812a1b8f48759af7', 'test', '', '13211110201', '', NULL, '', 18, 0, 1, NULL, 1, '2019-11-14 16:08:08', '2019-11-08 09:32:39', 0), - (38, 'tiantian', 'c655798e4648c540812a1b8f48759af7', '天天管理员', '', '13574502368', '', NULL, '', 17, 0, 0, NULL, 1, '2019-11-14 02:08:08', '2019-11-08 11:09:46', 0), - (39, 'wang13211111', 'c655798e4648c540812a1b8f48759af7', 'ceshi111', 'dddd', '13244553212', '', NULL, '', 25, 0, 0, NULL, 38, '2019-11-15 17:14:34', '2019-11-15 17:03:04', 0); -/*!40000 ALTER TABLE `t_employee` ENABLE KEYS */; - --- 导出 表 smart-admin-dev.t_file 结构 -DROP TABLE IF EXISTS `t_file`; -CREATE TABLE IF NOT EXISTS `t_file` ( - `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID', - `module_id` varchar(50) NOT NULL COMMENT '相关业务id', - `module_type` varchar(50) NOT NULL COMMENT '相关业务类型', - `file_name` varchar(255) DEFAULT NULL COMMENT '文件名称', - `file_size` varchar(255) DEFAULT NULL COMMENT '文件大小', - `file_type` varchar(50) DEFAULT NULL COMMENT '文件类型,程序中枚举控制,文件类型:如身份证正面,三证合一等等', - `file_path` varchar(255) NOT NULL COMMENT '文件key,用于文件下载', - `file_location_type` int NOT NULL COMMENT '文件位置类型', - `creater_user` int NOT NULL COMMENT '创建人,即上传人', - `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '上次更新时间', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`) USING BTREE, - KEY `module_id_module_type` (`module_id`,`module_type`) USING BTREE, - KEY `module_type` (`module_type`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; - --- 正在导出表 smart-admin-dev.t_file 的数据:~23 rows (大约) -DELETE FROM `t_file`; -/*!40000 ALTER TABLE `t_file` DISABLE KEYS */; -INSERT INTO `t_file` (`id`, `module_id`, `module_type`, `file_name`, `file_size`, `file_type`, `file_path`, `file_location_type`, `creater_user`, `update_time`, `create_time`) VALUES - (1, '1', '1', '阿里云1.jpg', NULL, NULL, 'backUser/config/d1788b717be24f14ba526f25397b936f', 2, 1, NULL, '2019-07-05 10:38:15'), - (2, '2', '1', '1.jpg', NULL, NULL, 'backUser/config/8895ec770c4e4e558c6d9b54eb00dffc', 2, 1, '2019-07-18 09:20:59', '2019-07-18 09:20:25'), - (3, '3', '1', '随笔.txt', NULL, NULL, 'backUser/config/f5cbc4c9a56f4fa7ad0ba58b0aa5d169', 2, 1, NULL, '2019-07-18 09:22:47'), - (4, '3', '1', '1.jpg', NULL, NULL, 'backUser/config/2019071809245603e0a4e449a4bf3aa28ee731c309040.jpg', 1, 1, NULL, '2019-07-18 09:24:51'), - (6, '4', '1', '1.jpg', NULL, NULL, 'backUser/config/ddcb8214ba274dec9bb2c33e0e246391', 3, 1, NULL, '2019-07-19 16:19:43'), - (7, '5', '1', 'sql.txt', NULL, NULL, 'backUser/config/cfbdf9562c894405b5b6f64f71fa812a', 3, 1, NULL, '2019-07-19 17:41:55'), - (9, '1', '1', '20190912023241a6132f5713b54e1fb490f4ea88115747.md', NULL, NULL, 'backUser/config/20190912023241a6132f5713b54e1fb490f4ea88115747.md', 1, 1, '2019-09-12 15:25:35', '2019-09-12 14:32:42'), - (10, '1', '1', '201909120232499804998573f643ff8e58189d23485629.mjs', NULL, NULL, 'backUser/config/201909120232499804998573f643ff8e58189d23485629.mjs', 1, 1, '2019-09-12 15:25:19', '2019-09-12 14:32:50'), - (11, '1', '1', '201909120326564cdc8df7b8cc49cfb273926877f047f5.json', NULL, NULL, 'backUser/config/201909120326564cdc8df7b8cc49cfb273926877f047f5.json', 1, 1, NULL, '2019-09-12 15:26:56'), - (12, '1', '1', '201909120343357104b7f1cc684f5797ada35c06aba770.json', NULL, NULL, 'backUser/config/201909120343357104b7f1cc684f5797ada35c06aba770.json', 1, 1, NULL, '2019-09-12 15:43:36'), - (13, '1', '1', '201909120343427e408141a0ea467ea2e012f7086a6265.json', NULL, NULL, 'backUser/config/201909120343427e408141a0ea467ea2e012f7086a6265.json', 1, 1, NULL, '2019-09-12 15:43:42'), - (14, '1', '1', '20190912034543b4d3a061fb2e416c899fe2ff6b9327e0.ts', NULL, NULL, 'backUser/config/20190912034543b4d3a061fb2e416c899fe2ff6b9327e0.ts', 1, 1, NULL, '2019-09-12 15:45:43'), - (15, '1', '1', '20190912034550a5dc04ce79b14a1cb2bb76545c909aa8.md', NULL, NULL, 'backUser/config/20190912034550a5dc04ce79b14a1cb2bb76545c909aa8.md', 1, 1, NULL, '2019-09-12 15:45:51'), - (16, '1', '1', 'LICENCE', NULL, NULL, 'backUser/config/cc02b99c0ec548f1a2231b70b7d569b8', 2, 1, NULL, '2019-09-12 15:47:22'), - (17, '1', '1', 'bignumber.min.js', NULL, NULL, 'backUser/config/bda49e8ad6d242fe8735b2023dfbf125', 2, 1, NULL, '2019-09-12 15:47:29'), - (18, '1', '1', '20190912034880a881fa8fbc841bfb7194ff312bd1058.json', NULL, NULL, 'backUser/config/20190912034880a881fa8fbc841bfb7194ff312bd1058.json', 1, 1, NULL, '2019-09-12 15:48:08'), - (19, '1', '1', '20190912034816ece14084acf345a79396a0f4347c4e44.md', NULL, NULL, 'backUser/config/20190912034816ece14084acf345a79396a0f4347c4e44.md', 1, 1, NULL, '2019-09-12 15:48:16'), - (20, '1', '1', '20191024054412fac4b4e04c574c6eab71f91e13a8a0b6.jpg', NULL, NULL, 'backUser/config/20191024054412fac4b4e04c574c6eab71f91e13a8a0b6.jpg', 1, 1, NULL, '2019-10-24 17:44:13'), - (21, '1', '1', '20191106042073f7ef01bde3046bd8e01928f397230bd.jpg', NULL, NULL, 'backUser/config/20191106042073f7ef01bde3046bd8e01928f397230bd.jpg', 1, 1, NULL, '2019-11-06 02:20:13'), - (22, '1', '1', '201911130802024b8a2ebf80543a98241bb464682650d.jpg', NULL, NULL, 'backUser/config/201911130802024b8a2ebf80543a98241bb464682650d.jpg', 1, 1, NULL, '2019-11-13 06:02:01'), - (23, '1', '1', '20191113080210d1d98eea46364d268b2a03fa03f7a446.jpg', NULL, NULL, 'backUser/config/20191113080210d1d98eea46364d268b2a03fa03f7a446.jpg', 1, 1, NULL, '2019-11-13 06:02:14'), - (24, '1', '1', '20191115043844e92b25e70fb140a1885614b978469ca9.jpg', NULL, NULL, 'backUser/config/20191115043844e92b25e70fb140a1885614b978469ca9.jpg', 1, 38, NULL, '2019-11-15 02:38:45'), - (25, '1', '1', '20191116060546d3a2c703cb5546b3851612907cc3786f.png', NULL, NULL, 'backUser/config/20191116060546d3a2c703cb5546b3851612907cc3786f.png', 1, 1, NULL, '2019-11-16 10:05:47'); -/*!40000 ALTER TABLE `t_file` ENABLE KEYS */; - --- 导出 表 smart-admin-dev.t_heart_beat_record 结构 -DROP TABLE IF EXISTS `t_heart_beat_record`; -CREATE TABLE IF NOT EXISTS `t_heart_beat_record` ( - `id` int NOT NULL AUTO_INCREMENT COMMENT '自增id', - `project_path` varchar(100) DEFAULT NULL COMMENT '项目名称', - `server_ip` varchar(200) DEFAULT NULL COMMENT '服务器ip', - `process_no` int DEFAULT NULL COMMENT '进程号', - `process_start_time` datetime DEFAULT NULL COMMENT '进程开启时间', - `heart_beat_time` datetime DEFAULT NULL COMMENT '心跳时间', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; - --- 正在导出表 smart-admin-dev.t_heart_beat_record 的数据:~2 rows (大约) -DELETE FROM `t_heart_beat_record`; -/*!40000 ALTER TABLE `t_heart_beat_record` DISABLE KEYS */; -INSERT INTO `t_heart_beat_record` (`id`, `project_path`, `server_ip`, `process_no`, `process_start_time`, `heart_beat_time`) VALUES - (1, '/home/server/smart-admin/dev', '192.168.122.1;172.16.0.145', 14843, '2019-11-16 03:11:50', '2019-11-16 03:58:01'), - (2, 'F:\\codespace\\idea\\gangquan360\\foundation', '172.16.1.188;192.168.56.1', 227992, '2019-11-16 10:02:39', '2019-11-16 10:06:50'), - (3, 'E:\\codespace\\zhuoda', '192.168.8.188', 17564, '2020-12-14 07:11:12', '2020-12-14 07:13:34'), - (4, 'E:\\codespace\\zhuoda', '192.168.8.188', 15568, '2020-12-14 07:13:53', '2020-12-14 07:15:00'), - (5, 'E:\\codespace\\zhuoda', '192.168.8.188', 16548, '2020-12-14 07:16:07', '2020-12-14 07:17:14'); -/*!40000 ALTER TABLE `t_heart_beat_record` ENABLE KEYS */; - --- 导出 表 smart-admin-dev.t_id_generator 结构 -DROP TABLE IF EXISTS `t_id_generator`; -CREATE TABLE IF NOT EXISTS `t_id_generator` ( - `id` int DEFAULT NULL, - `key_name` varchar(50) NOT NULL COMMENT '英文key', - `rule_format` varchar(500) NOT NULL COMMENT '规则格式。no_cycle没有周期, year_cycle 年周期, month_cycle月周期, day_cycle 日周期', - `rule_type` varchar(50) NOT NULL COMMENT '格式[yyyy]表示年,[mm]标识月,[dd]表示日,[nnn]表示三位数字', - `init_number` int NOT NULL DEFAULT '1' COMMENT '初始值', - `last_number` int DEFAULT NULL COMMENT '上次产生的id, 默认为空', - `remark` varchar(1000) NOT NULL COMMENT '备注', - `update_time` datetime DEFAULT NULL, - `create_time` datetime NOT NULL, - UNIQUE KEY `key_name` (`key_name`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='id生成器定义表'; - --- 正在导出表 smart-admin-dev.t_id_generator 的数据:~2 rows (大约) -DELETE FROM `t_id_generator`; -/*!40000 ALTER TABLE `t_id_generator` DISABLE KEYS */; -INSERT INTO `t_id_generator` (`id`, `key_name`, `rule_format`, `rule_type`, `init_number`, `last_number`, `remark`, `update_time`, `create_time`) VALUES - (2, 'goods_num', '[nnnnnnn]', 'NO_CYCLE', 1, NULL, '商品编号', '2019-04-09 09:48:04', '2019-03-29 14:14:12'), - (1, 'order', '[yyyy][mm][dd][nnnnn]', 'DAY_CYCLE', 1, 1, '订单编号', '2019-03-30 11:25:42', '2019-03-29 14:14:12'); -/*!40000 ALTER TABLE `t_id_generator` ENABLE KEYS */; - --- 导出 表 smart-admin-dev.t_id_generator_record 结构 -DROP TABLE IF EXISTS `t_id_generator_record`; -CREATE TABLE IF NOT EXISTS `t_id_generator_record` ( - `generator_id` int NOT NULL, - `year` int NOT NULL, - `month` int NOT NULL, - `day` int NOT NULL, - `last_number` int NOT NULL, - PRIMARY KEY (`generator_id`,`year`,`month`,`day`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='id_generator记录表'; - --- 正在导出表 smart-admin-dev.t_id_generator_record 的数据:~5 rows (大约) -DELETE FROM `t_id_generator_record`; -/*!40000 ALTER TABLE `t_id_generator_record` DISABLE KEYS */; -INSERT INTO `t_id_generator_record` (`generator_id`, `year`, `month`, `day`, `last_number`) VALUES - (1, 2019, 3, 30, 1), - (2, 2019, 3, 30, 1), - (2, 2019, 4, 3, 2), - (2, 2019, 4, 8, 2), - (2, 2019, 4, 9, 1); -/*!40000 ALTER TABLE `t_id_generator_record` ENABLE KEYS */; - --- 导出 表 smart-admin-dev.t_notice 结构 -DROP TABLE IF EXISTS `t_notice`; -CREATE TABLE IF NOT EXISTS `t_notice` ( - `id` bigint NOT NULL AUTO_INCREMENT, - `title` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '消息标题', - `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '消息内容', - `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '删除状态:0未删除 0删除 ', - `send_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '发送状态 0未发送 1发送', - `create_user` bigint NOT NULL COMMENT '消息创建人', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=108 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - --- 正在导出表 smart-admin-dev.t_notice 的数据:~14 rows (大约) -DELETE FROM `t_notice`; -/*!40000 ALTER TABLE `t_notice` DISABLE KEYS */; -INSERT INTO `t_notice` (`id`, `title`, `content`, `deleted`, `send_status`, `create_user`, `create_time`, `update_time`) VALUES - (93, '大扫把', '晓冬吃大便', 1, 1, 1, '2019-07-13 17:54:13', '2019-07-13 17:54:21'), - (95, '4444444', '444444444444', 1, 1, 1, '2019-07-13 17:54:53', '2019-09-04 09:42:02'), - (96, '3434', '444444', 1, 1, 1, '2019-07-13 17:58:42', '2019-11-08 09:05:24'), - (97, '44444', '555555555555', 1, 1, 1, '2019-07-13 17:58:54', '2019-09-03 16:19:50'), - (98, '《青花瓷》', '素胚勾勒出青花笔锋浓转淡\n瓶身描绘的牡丹一如你初妆\n冉冉檀香透过窗心事我了然\n周杰伦 青花瓷\n周杰伦 青花瓷\n宣纸上走笔至此搁一半\n釉色渲染仕女图韵味被私藏\n而你嫣然的一笑如含苞待放\n你的美一缕飘散\n去到我去不了的地方\n天青色等烟雨 而我在等你\n炊烟袅袅升起 隔江千万里\n在瓶底书刻隶仿前朝的飘逸\n就当我为遇见你伏笔\n天青色等烟雨 而我在等你\n月色被打捞起 晕开了结局\n如传世的青花瓷自顾自美丽\n你眼带笑意\n色白花青的锦鲤跃然于碗底\n临摹宋体落款时却惦记着你\n你隐藏在窑烧里千年的秘密\n极细腻犹如绣花针落地\n篱外芭蕉惹骤雨门环惹铜绿\n而我路过那江南小镇惹了你\n在泼墨山水画里\n你从墨色深处被隐去\n天青色等烟雨 而我在等你\n炊烟袅袅升起 隔江千万里\n在瓶底书刻隶仿前朝的飘逸\n就当我为遇见你伏笔\n天青色等烟雨 而我在等你\n月色被打捞起 晕开了结局\n如传世的青花瓷自顾自美丽\n你眼带笑意\n天青色等烟雨 而我在等你\n炊烟袅袅升起 隔江千万里\n在瓶底书刻隶仿前朝的飘逸\n就当我为遇见你伏笔\n天青色等烟雨 而我在等你\n月色被打捞起 晕开了结局\n如传世的青花瓷自顾自美丽\n你眼带笑意 ', 1, 1, 1, '2019-08-05 16:36:44', '2019-09-02 17:53:12'), - (99, '1', '2', 1, 1, 30, '2019-08-08 14:53:58', '2019-08-08 14:54:07'), - (100, '呵呵', '呵呵', 1, 1, 1, '2019-08-20 16:52:53', '2019-09-02 17:46:59'), - (101, 'aa', 'bbcc', 1, 1, 30, '2019-08-23 09:51:01', '2019-08-23 09:51:28'), - (102, '1', '2', 0, 1, 1, '2019-09-05 14:28:10', '2019-09-05 14:28:10'), - (103, '12', '22', 0, 1, 1, '2019-09-05 14:29:30', '2019-09-05 14:29:30'), - (104, 'a', 'b', 1, 1, 30, '2019-09-06 14:21:18', '2019-09-06 14:24:07'), - (105, '22222222222', '1111', 0, 0, 1, '2019-11-07 19:05:56', '2019-11-07 19:05:56'), - (106, '423', '234', 0, 0, 37, '2019-11-08 21:48:19', '2019-11-08 21:48:19'), - (107, 'AAS', 's\'da\'ssdas', 1, 1, 1, '2019-11-13 19:06:55', '2019-11-14 09:07:06'); -/*!40000 ALTER TABLE `t_notice` ENABLE KEYS */; - --- 导出 表 smart-admin-dev.t_notice_receive_record 结构 -DROP TABLE IF EXISTS `t_notice_receive_record`; -CREATE TABLE IF NOT EXISTS `t_notice_receive_record` ( - `id` bigint NOT NULL AUTO_INCREMENT, - `notice_id` bigint NOT NULL COMMENT '消息id', - `employee_id` bigint NOT NULL COMMENT '用户id', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=141 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - --- 正在导出表 smart-admin-dev.t_notice_receive_record 的数据:~27 rows (大约) -DELETE FROM `t_notice_receive_record`; -/*!40000 ALTER TABLE `t_notice_receive_record` DISABLE KEYS */; -INSERT INTO `t_notice_receive_record` (`id`, `notice_id`, `employee_id`, `create_time`, `update_time`) VALUES - (114, 93, 1, '2019-07-13 17:54:16', '2019-07-13 17:54:16'), - (115, 95, 1, '2019-07-13 17:54:55', '2019-07-13 17:54:55'), - (116, 95, 22, '2019-07-13 17:58:03', '2019-07-13 17:58:03'), - (117, 93, 22, '2019-07-13 17:58:05', '2019-07-13 17:58:05'), - (118, 96, 1, '2019-07-13 17:58:44', '2019-07-13 17:58:44'), - (119, 97, 1, '2019-07-13 17:58:58', '2019-07-13 17:58:58'), - (120, 98, 1, '2019-08-05 16:37:01', '2019-08-05 16:37:01'), - (121, 99, 30, '2019-08-08 14:54:05', '2019-08-08 14:54:05'), - (122, 99, 1, '2019-08-08 15:15:44', '2019-08-08 15:15:44'), - (123, 100, 1, '2019-08-20 16:53:29', '2019-08-20 16:53:29'), - (124, 101, 30, '2019-08-23 09:51:11', '2019-08-23 09:51:11'), - (125, 101, 1, '2019-08-23 12:46:27', '2019-08-23 12:46:27'), - (126, 102, 1, '2019-09-05 14:28:32', '2019-09-05 14:28:32'), - (127, 104, 30, '2019-09-06 14:23:58', '2019-09-06 14:23:58'), - (128, 104, 1, '2019-09-06 15:25:13', '2019-09-06 15:25:13'), - (129, 101, 14, '2019-11-02 21:46:13', '2019-11-02 21:46:13'), - (130, 102, 14, '2019-11-02 21:46:14', '2019-11-02 21:46:14'), - (131, 104, 14, '2019-11-02 21:46:15', '2019-11-02 21:46:15'), - (132, 98, 14, '2019-11-02 21:46:18', '2019-11-02 21:46:18'), - (133, 103, 37, '2019-11-07 19:58:06', '2019-11-07 19:58:06'), - (134, 103, 1, '2019-11-07 20:03:54', '2019-11-07 20:03:54'), - (135, 107, 1, '2019-11-13 19:07:02', '2019-11-13 19:07:02'), - (136, 107, 38, '2019-11-15 02:11:04', '2019-11-15 02:11:04'), - (137, 104, 38, '2019-11-15 02:11:17', '2019-11-15 02:11:17'), - (138, 101, 38, '2019-11-15 02:26:33', '2019-11-15 02:26:33'), - (139, 98, 38, '2019-11-15 02:29:32', '2019-11-15 02:29:32'), - (140, 100, 38, '2019-11-15 03:19:18', '2019-11-15 03:19:18'); -/*!40000 ALTER TABLE `t_notice_receive_record` ENABLE KEYS */; - --- 导出 表 smart-admin-dev.t_order_operate_log 结构 -DROP TABLE IF EXISTS `t_order_operate_log`; -CREATE TABLE IF NOT EXISTS `t_order_operate_log` ( - `id` bigint NOT NULL AUTO_INCREMENT, - `order_id` int NOT NULL COMMENT '各种单据的id', - `order_type` int NOT NULL COMMENT '单据类型', - `operate_type` int NOT NULL COMMENT '操作类型', - `operate_content` text NOT NULL COMMENT '操作类型 对应的中文', - `operate_remark` text COMMENT '操作备注', - `employee_id` int NOT NULL COMMENT '员工id', - `employee_name` varchar(1000) NOT NULL COMMENT '员工名称', - `ext_data` text COMMENT '额外信息', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`) USING BTREE, - KEY `order_id_order_type` (`order_id`,`order_type`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='各种单据操作记录\r\n'; - --- 正在导出表 smart-admin-dev.t_order_operate_log 的数据:~0 rows (大约) -DELETE FROM `t_order_operate_log`; -/*!40000 ALTER TABLE `t_order_operate_log` DISABLE KEYS */; -/*!40000 ALTER TABLE `t_order_operate_log` ENABLE KEYS */; - --- 导出 表 smart-admin-dev.t_peony 结构 -DROP TABLE IF EXISTS `t_peony`; -CREATE TABLE IF NOT EXISTS `t_peony` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', - `kind` varchar(500) DEFAULT NULL COMMENT '品种', - `name` varchar(500) DEFAULT NULL COMMENT '名字', - `color` varchar(500) DEFAULT NULL COMMENT '颜色', - `image_url` text COMMENT '图片链接', - `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COMMENT='牡丹花'; - --- 正在导出表 smart-admin-dev.t_peony 的数据:~3 rows (大约) -DELETE FROM `t_peony`; -/*!40000 ALTER TABLE `t_peony` DISABLE KEYS */; -INSERT INTO `t_peony` (`id`, `kind`, `name`, `color`, `image_url`, `create_time`, `update_time`) VALUES - (5, '复色类', '什样锦', '红色', 'https://bkimg.cdn.bcebos.com/pic/3c6d55fbb2fb43160ee185da2aa4462308f7d390?x-bce-process=image/watermark,g_7,image_d2F0ZXIvYmFpa2UxNTA=,xp_5,yp_5', '2020-04-06 22:02:32', '2020-04-06 22:03:30'), - (6, '绿色', '绿香球', '绿色', '11', '2020-04-06 22:14:35', '2020-04-06 22:17:51'), - (7, '墨紫色类', '冠世墨玉', '紫色', '34534534534', '2020-04-06 22:15:19', '2020-04-06 22:18:21'); -/*!40000 ALTER TABLE `t_peony` ENABLE KEYS */; - --- 导出 表 smart-admin-dev.t_position 结构 -DROP TABLE IF EXISTS `t_position`; -CREATE TABLE IF NOT EXISTS `t_position` ( - `id` int unsigned NOT NULL AUTO_INCREMENT, - `position_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '岗位名称', - `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '岗位描述', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='岗位表'; - --- 正在导出表 smart-admin-dev.t_position 的数据:~13 rows (大约) -DELETE FROM `t_position`; -/*!40000 ALTER TABLE `t_position` DISABLE KEYS */; -INSERT INTO `t_position` (`id`, `position_name`, `remark`, `update_time`, `create_time`) VALUES - (1, 'java develop', 'java develop is good job', '2019-07-03 15:18:45', '2019-07-03 15:18:45'), - (2, 'android develop', 'android develop is good job', '2019-07-04 16:11:11', '2019-07-04 16:11:00'), - (3, '测试岗位1', '这是内容11', '2019-09-02 16:39:33', '2019-07-10 14:03:50'), - (8, '测试岗位2', '测试岗位2.。', '2019-09-04 10:19:40', '2019-09-04 10:19:32'), - (9, '测试岗位3', '测试岗位3', '2019-09-05 14:39:43', '2019-09-05 14:39:43'), - (10, '测试岗位4', '测试岗位4', '2019-09-05 14:39:48', '2019-09-05 14:39:48'), - (11, '测试岗位5', '测试岗位5', '2019-09-05 14:39:53', '2019-09-05 14:39:53'), - (12, '测试岗位6', '测试岗位6', '2019-09-05 14:39:58', '2019-09-05 14:39:58'), - (13, '测试岗位7', '测试岗位7', '2019-09-05 14:40:03', '2019-09-05 14:40:03'), - (14, '测试岗位8', '测试岗位8', '2019-09-05 14:40:09', '2019-09-05 14:40:09'), - (15, '测试岗位9', '测试岗位9', '2019-09-05 14:40:19', '2019-09-05 14:40:19'), - (16, 'aaa22222', 'ddddddddddd', '2019-11-15 17:04:29', '2019-11-06 15:58:37'), - (17, 'ddd', 'fsdef', '2019-11-15 17:04:40', '2019-11-15 17:04:40'); -/*!40000 ALTER TABLE `t_position` ENABLE KEYS */; - --- 导出 表 smart-admin-dev.t_position_relation 结构 -DROP TABLE IF EXISTS `t_position_relation`; -CREATE TABLE IF NOT EXISTS `t_position_relation` ( - `id` int unsigned NOT NULL AUTO_INCREMENT, - `position_id` int DEFAULT NULL COMMENT '岗位ID', - `employee_id` int DEFAULT NULL COMMENT '员工ID', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`), - KEY `job_id` (`position_id`) USING BTREE, - KEY `employee_id` (`employee_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='岗位关联表'; - --- 正在导出表 smart-admin-dev.t_position_relation 的数据:~27 rows (大约) -DELETE FROM `t_position_relation`; -/*!40000 ALTER TABLE `t_position_relation` DISABLE KEYS */; -INSERT INTO `t_position_relation` (`id`, `position_id`, `employee_id`, `update_time`, `create_time`) VALUES - (14, 1, 28, '2019-07-10 16:40:14', '2019-07-10 16:40:14'), - (18, 1, 29, '2019-07-11 10:18:22', '2019-07-11 10:18:22'), - (19, 3, 29, '2019-07-11 10:18:22', '2019-07-11 10:18:22'), - (20, 2, 29, '2019-07-11 10:18:22', '2019-07-11 10:18:22'), - (21, 1, 30, '2019-08-08 14:35:51', '2019-08-08 14:35:51'), - (22, 2, 30, '2019-08-08 14:35:51', '2019-08-08 14:35:51'), - (23, 3, 30, '2019-08-08 14:35:51', '2019-08-08 14:35:51'), - (26, 2, 31, '2019-08-23 09:26:44', '2019-08-23 09:26:44'), - (27, 3, 31, '2019-08-23 09:26:44', '2019-08-23 09:26:44'), - (28, 3, 32, '2019-09-04 09:05:47', '2019-09-04 09:05:47'), - (29, 2, 32, '2019-09-04 09:05:47', '2019-09-04 09:05:47'), - (30, 3, 22, '2019-09-04 09:06:46', '2019-09-04 09:06:46'), - (31, 2, 22, '2019-09-04 09:06:46', '2019-09-04 09:06:46'), - (35, 8, 35, '2019-09-04 15:09:00', '2019-09-04 15:09:00'), - (36, 3, 35, '2019-09-04 15:09:00', '2019-09-04 15:09:00'), - (37, 15, 23, '2019-09-05 16:13:02', '2019-09-05 16:13:02'), - (38, 14, 23, '2019-09-05 16:13:02', '2019-09-05 16:13:02'), - (39, 13, 23, '2019-09-05 16:13:02', '2019-09-05 16:13:02'), - (40, 3, 34, '2019-09-06 08:55:18', '2019-09-06 08:55:18'), - (41, 2, 34, '2019-09-06 08:55:18', '2019-09-06 08:55:18'), - (42, 1, 34, '2019-09-06 08:55:18', '2019-09-06 08:55:18'), - (43, 14, 36, '2019-09-09 17:01:39', '2019-09-09 17:01:39'), - (44, 3, 37, '2019-11-08 09:32:39', '2019-11-08 09:32:39'), - (46, 8, 38, '2019-11-14 16:08:05', '2019-11-14 16:08:05'), - (50, 16, 39, '2019-11-15 17:07:04', '2019-11-15 17:07:04'), - (51, 13, 39, '2019-11-15 17:07:04', '2019-11-15 17:07:04'), - (52, 14, 39, '2019-11-15 17:07:04', '2019-11-15 17:07:04'); -/*!40000 ALTER TABLE `t_position_relation` ENABLE KEYS */; - --- 导出 表 smart-admin-dev.t_privilege 结构 -DROP TABLE IF EXISTS `t_privilege`; -CREATE TABLE IF NOT EXISTS `t_privilege` ( - `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '功能权限表主键id', - `type` tinyint NOT NULL COMMENT '1.菜单 2.功能点', - `name` varchar(50) NOT NULL COMMENT '菜单名称', - `key` varchar(1000) NOT NULL COMMENT '路由name 英文关键字', - `url` text COMMENT '路由path/type=3为API接口', - `sort` int NOT NULL DEFAULT '0' COMMENT '排序', - `parent_key` varchar(1000) DEFAULT NULL COMMENT '父级key', - `update_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`), - UNIQUE KEY `key` (`key`) USING BTREE, - KEY `type` (`type`) USING BTREE, - KEY `parent_key` (`parent_key`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=127 DEFAULT CHARSET=utf8 COMMENT='权限功能表'; - --- 正在导出表 smart-admin-dev.t_privilege 的数据:~103 rows (大约) -DELETE FROM `t_privilege`; -/*!40000 ALTER TABLE `t_privilege` DISABLE KEYS */; -INSERT INTO `t_privilege` (`id`, `type`, `name`, `key`, `url`, `sort`, `parent_key`, `update_time`, `create_time`) VALUES - (1, 1, '人员管理', 'Employee', '/employee', 20, 'System', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (2, 1, '角色管理', 'RoleManage', '/employee/role', 21, 'Employee', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (3, 1, '岗位管理', 'PositionList', '/employee/position', 22, 'Employee', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (4, 1, '员工管理', 'RoleEmployeeManage', '/employee/role-employee-manage', 23, 'Employee', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (5, 1, '系统设置', 'SystemSetting', '/system-setting', 29, 'System', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (6, 1, '系统参数', 'SystemConfig', '/system-setting/system-config', 30, 'SystemSetting', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (8, 1, '菜单设置', 'SystemPrivilege', '/system-setting/system-privilege', 31, 'SystemSetting', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (9, 1, '消息管理', 'Notice', '/notice', 10, 'Business', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (10, 1, '通知管理', 'NoticeList', '/notice/notice-list', 11, 'Notice', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (11, 1, '个人消息', 'PersonNotice', '/notice/person-notice', 12, 'Notice', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (12, 1, '邮件管理', 'Email', '/email', 4, 'Business', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (13, 1, '邮件管理', 'EmailList', '/email/email-list', 5, 'Email', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (14, 1, '发送邮件', 'SendMail', '/email/send-mail', 6, 'Email', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (15, 1, '用户日志', 'UserLog', '/user-log', 26, 'System', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (16, 1, '用户操作日志', 'UserOperateLog', '/user-log/user-operate-log', 27, 'UserLog', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (17, 1, '用户登录日志', 'UserLoginLog', '/user-log/user-login-log', 28, 'UserLog', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (18, 1, '系统监控', 'Monitor', '/monitor', 37, 'Support', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (19, 1, '在线人数', 'OnlineUser', '/monitor/online-user', 38, 'Monitor', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (20, 1, 'SQL监控', 'Sql', '/monitor/sql', 39, 'Monitor', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (21, 1, '定时任务', 'Task', '/task', 42, 'Support', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (22, 1, '任务管理', 'TaskList', '/system-setting/task-list', 43, 'Task', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (23, 1, '动态加载', 'Reload', '/reload', 40, 'Support', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (24, 1, 'SmartReload', 'SmartReloadList', '/reload/smart-reload-list', 41, 'Reload', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (25, 1, '接口文档', 'ApiDoc', '/api-doc', 33, 'Support', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (26, 1, 'Swagger接口文档', 'Swagger', '/api-doc/swagger', 34, 'ApiDoc', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (27, 1, '三级路由', 'ThreeRouter', '/three-router', 14, 'Business', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (28, 1, '三级菜单', 'LevelTwo', '/three-router/level-two', 15, 'ThreeRouter', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (30, 1, '三级菜单子哈', 'RoleTwoTwo', '/three-router/level-two/level-three2', 17, 'LevelTwo', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (31, 1, '二级菜单', 'RoleOneOne', '/three-router/level-two2', 18, 'ThreeRouter', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (32, 1, 'KeepAlive', 'KeepAlive', '/keep-alive', 7, 'Business', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (33, 1, 'KeepAlive列表', 'KeepAliveContentList', '/keep-alive/content-list', 8, 'KeepAlive', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (34, 1, 'KeepAlive表单', 'KeepAliveAddContent', '/keep-alive/add-content', 9, 'KeepAlive', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (35, 1, '心跳服务', 'HeartBeat', '/heart-beat', 35, 'Support', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (36, 1, '心跳服务', 'HeartBeatList', '/heart-beat/heart-beat-list', 36, 'HeartBeat', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (37, 1, '文件服务', 'File', '/file', 24, 'System', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (38, 1, '文件列表', 'FileList', '/file/file-list', 25, 'File', '2020-12-14 15:16:26', '2019-11-01 11:28:07'), - (39, 2, '添加角色', 'add-role', 'roleController.addRole', 0, 'RoleManage', '2019-11-01 11:47:29', '2019-11-01 11:47:29'), - (40, 2, '删除角色', 'delete-role', 'roleController.deleteRole', 1, 'RoleManage', '2019-11-01 11:47:43', '2019-11-01 11:47:43'), - (41, 2, '编辑角色', 'update-role', 'roleController.updateRole', 2, 'RoleManage', '2019-11-01 11:47:55', '2019-11-01 11:47:55'), - (42, 2, '修改角色权限', 'update-role-privilege', 'rolePrivilegeController.updateRolePrivilege', 3, 'RoleManage', '2019-11-01 11:48:09', '2019-11-01 11:48:09'), - (43, 2, '添加成员', 'add-employee-role', 'roleEmployeeController.addEmployeeList', 4, 'RoleManage', '2019-11-05 10:38:11', '2019-11-05 10:38:11'), - (44, 2, '查询成员', 'search-employee-list', 'roleEmployeeController.listAllEmployeeRoleId,roleEmployeeController.listEmployeeByName,roleController.getAllRole,rolePrivilegeController.listPrivilegeByRoleId', 7, 'RoleManage', '2019-11-05 10:39:04', '2019-11-05 10:39:04'), - (45, 2, '移除成员', 'delete-employee-role', 'roleEmployeeController.removeEmployee', 5, 'RoleManage', '2019-11-05 10:40:09', '2019-11-05 10:40:09'), - (46, 2, '批量移除', 'delete-employee-role-batch', 'roleEmployeeController.removeEmployeeList', 6, 'RoleManage', '2019-11-05 10:40:27', '2019-11-05 10:40:27'), - (47, 2, '查询数据范围', 'query-data-scope', 'dataScopeController.dataScopeList,dataScopeController.dataScopeListByRole,rolePrivilegeController.listPrivilegeByRoleId,privilegeController.queryAll,privilegeController.getAllUrl', 8, 'RoleManage', '2019-11-05 10:40:57', '2019-11-05 10:40:57'), - (48, 2, '更新数据范围', 'update-data-scope', 'dataScopeController.dataScopeBatchSet', 9, 'RoleManage', '2019-11-05 10:41:03', '2019-11-05 10:41:03'), - (49, 2, '查询', 'search-position', 'positionController.queryJobById,positionController.getJobPage', 0, 'PositionList', '2019-11-05 10:41:30', '2019-11-05 10:41:30'), - (50, 2, '添加', 'add-position', 'positionController.addJob', 1, 'PositionList', '2019-11-05 10:41:40', '2019-11-05 10:41:40'), - (51, 2, '修改', 'update-position', 'positionController.updateJob', 2, 'PositionList', '2019-11-05 10:41:49', '2019-11-05 10:41:49'), - (52, 2, '删除', 'delete-position', 'positionController.removeJob', 3, 'PositionList', '2019-11-05 10:41:57', '2019-11-05 10:41:57'), - (53, 2, '添加部门', 'add-department', 'departmentController.addDepartment', 0, 'RoleEmployeeManage', '2019-11-05 11:11:18', '2019-11-05 11:11:18'), - (54, 2, '编辑部门', 'update-department', 'departmentController.updateDepartment', 1, 'RoleEmployeeManage', '2019-11-05 11:11:29', '2019-11-05 11:11:29'), - (55, 2, '删除部门', 'delete-department', 'departmentController.delDepartment', 2, 'RoleEmployeeManage', '2019-11-05 11:11:48', '2019-11-05 11:11:48'), - (56, 2, '查询', 'search-department', 'departmentController.listAll,departmentController.getDepartment,departmentController.listDepartmentEmployee,departmentController.listDepartment,employeeController.query', 3, 'RoleEmployeeManage', '2019-11-05 11:12:09', '2019-11-05 11:12:09'), - (57, 2, '添加成员', 'add-employee', 'employeeController.addEmployee', 4, 'RoleEmployeeManage', '2019-11-05 17:06:23', '2019-11-05 17:06:23'), - (58, 2, '编辑成员', 'update-employee', 'employeeController.updateEmployee', 5, 'RoleEmployeeManage', '2019-11-05 17:06:57', '2019-11-05 17:06:57'), - (59, 2, '禁用', 'disabled-employee', 'employeeController.updateStatus', 6, 'RoleEmployeeManage', '2019-11-05 17:14:35', '2019-11-05 17:14:35'), - (60, 2, '批量操作', 'disabled-employee-batch', 'employeeController.batchUpdateStatus', 7, 'RoleEmployeeManage', '2019-11-05 17:19:23', '2019-11-05 17:19:23'), - (61, 2, '员工角色编辑', 'update-employee-role', 'employeeController.updateRoles', 8, 'RoleEmployeeManage', '2019-11-05 17:21:15', '2019-11-05 17:21:15'), - (62, 2, '重置密码', 'reset-employee-password', 'employeeController.resetPasswd', 10, 'RoleEmployeeManage', '2019-11-05 17:22:13', '2019-11-05 17:22:13'), - (63, 2, '删除员工', 'delete-employee', 'employeeController.deleteEmployeeById', 9, 'RoleEmployeeManage', '2019-11-05 17:22:27', '2019-11-05 17:22:27'), - (64, 2, '查询系统参数', 'system-params-search', 'systemConfigController.selectByKey,systemConfigController.getListByGroup,systemConfigController.getSystemConfigPage', 0, 'SystemConfig', '2019-11-05 17:23:41', '2019-11-05 17:23:41'), - (65, 2, '添加系统参数', 'system-params-add', 'systemConfigController.addSystemConfig', 1, 'SystemConfig', '2019-11-05 17:26:00', '2019-11-05 17:26:00'), - (66, 2, '修改系统参数', 'system-config-update', 'systemConfigController.updateSystemConfig', 2, 'SystemConfig', '2019-11-05 17:26:07', '2019-11-05 17:26:07'), - (67, 2, '搜索系统参数', 'system-config-search', 'systemConfigController.selectByKey,systemConfigController.getListByGroup,systemConfigController.getSystemConfigPage', 3, 'SystemConfig', '2019-11-05 17:26:44', '2019-11-05 17:26:44'), - (69, 2, '编辑', 'privilege-main-update', 'privilegeController.menuBatchSave,privilegeController.functionSaveOrUpdate', 1, 'SystemPrivilege', '2020-12-14 15:17:11', '2019-11-05 17:27:28'), - (70, 2, '查询', 'privilege-main-search', 'privilegeController.queryAll,privilegeController.getAllUrl,privilegeController.functionQuery', 3, 'SystemPrivilege', '2020-12-14 15:17:11', '2019-11-05 17:28:45'), - (71, 2, '查询', 'notice-query', 'noticeController.queryReceiveByPage,noticeController.queryUnreadByPage,noticeController.queryByPage,noticeController.detail', 0, 'NoticeList', '2019-11-05 17:30:16', '2019-11-05 17:30:16'), - (72, 2, '添加', 'notice-add', 'noticeController.add', 1, 'NoticeList', '2019-11-05 17:30:28', '2019-11-05 17:30:28'), - (73, 2, '修改', 'notice-edit', 'noticeController.update', 2, 'NoticeList', '2019-11-05 17:31:24', '2019-11-05 17:31:24'), - (74, 2, '删除', 'notice-delete', 'noticeController.delete', 3, 'NoticeList', '2019-11-06 11:12:32', '2019-11-06 11:12:32'), - (75, 2, '详情', 'notice-detail', 'noticeController.detail', 4, 'NoticeList', '2019-11-06 11:12:44', '2019-11-06 11:12:44'), - (76, 2, '发送', 'notice-send', 'noticeController.send', 5, 'NoticeList', '2019-11-06 11:12:51', '2019-11-06 11:12:51'), - (77, 2, '查询', 'person-notice-query', 'noticeController.queryReceiveByPage,noticeController.queryUnreadByPage,noticeController.queryByPage', 0, 'PersonNotice', '2019-11-06 11:13:27', '2019-11-06 11:13:27'), - (78, 2, '详情', 'person-notice-detail', 'noticeController.detail', 1, 'PersonNotice', '2019-11-06 11:13:35', '2019-11-06 11:13:35'), - (79, 2, '查询', 'email-query', 'emailController.queryByPage,emailController.detail', 0, 'EmailList', '2019-11-06 11:13:49', '2019-11-06 11:13:49'), - (80, 2, '新增', 'email-add', 'emailController.add', 1, 'EmailList', '2019-11-06 11:14:02', '2019-11-06 11:14:02'), - (81, 2, '编辑', 'email-update', 'emailController.update', 2, 'EmailList', '2019-11-06 11:14:08', '2019-11-06 11:14:08'), - (82, 2, '删除', 'email-delete', 'emailController.delete', 3, 'EmailList', '2019-11-06 11:14:16', '2019-11-06 11:14:16'), - (83, 2, '发送', 'email-send', 'emailController.send', 0, 'SendMail', '2019-11-06 11:14:40', '2019-11-06 11:14:40'), - (84, 2, '查询', 'user-operate-log-search', 'userOperateLogController.queryByPage', 0, 'UserOperateLog', '2019-11-06 11:15:04', '2019-11-06 11:15:04'), - (85, 2, '详情', 'user-operate-log-detail', 'userOperateLogController.detail', 1, 'UserOperateLog', '2019-11-06 11:15:16', '2019-11-06 11:15:16'), - (86, 2, '删除', 'user-operate-log-delete', 'userOperateLogController.delete', 2, 'UserOperateLog', '2019-11-06 11:15:25', '2019-11-06 11:15:25'), - (87, 2, '查询', 'user-login-log-search', 'userLoginLogController.queryByPage', 0, 'UserLoginLog', '2019-11-06 11:15:43', '2019-11-06 11:15:43'), - (88, 2, '删除', 'user-login-log-delete', 'userLoginLogController.delete', 1, 'UserLoginLog', '2019-11-06 11:15:49', '2019-11-06 11:15:49'), - (89, 2, '查询', 'online-user-search', 'userLoginLogController.queryUserOnLine', 0, 'OnlineUser', '2019-11-06 11:16:05', '2019-11-06 11:16:05'), - (90, 2, '查询任务', 'task-search', 'quartzController.query', 0, 'TaskList', '2019-11-06 11:16:24', '2019-11-06 11:16:24'), - (91, 2, '刷新任务', 'task-refresh', 'quartzController.query', 1, 'TaskList', '2019-11-06 11:16:50', '2019-11-06 11:16:50'), - (92, 2, '添加任务', 'task-add', 'quartzController.saveOrUpdateTask', 2, 'TaskList', '2019-11-06 11:17:04', '2019-11-06 11:17:04'), - (93, 2, '编辑任务', 'task-update', 'quartzController.saveOrUpdateTask', 3, 'TaskList', '2019-11-06 11:17:17', '2019-11-06 11:17:17'), - (94, 2, '暂停任务', 'task-pause', 'quartzController.pauseTask', 4, 'TaskList', '2019-11-06 11:17:25', '2019-11-06 11:17:25'), - (95, 2, '恢复任务', 'task-resume', 'quartzController.resumeTask', 5, 'TaskList', '2019-11-06 11:17:31', '2019-11-06 11:17:31'), - (96, 2, '立即运行任务', 'task-run', 'quartzController.runTask', 6, 'TaskList', '2019-11-06 11:17:38', '2019-11-06 11:17:38'), - (97, 2, '查看任务日志', 'task-query-log', 'quartzController.queryLog', 7, 'TaskList', '2019-11-06 11:17:47', '2019-11-06 11:17:47'), - (98, 2, '删除任务', 'task-delete', 'quartzController.deleteTask', 8, 'TaskList', '2019-11-06 11:17:53', '2019-11-06 11:17:53'), - (99, 2, '查询', 'smart-reload-search', 'smartReloadController.listAllReloadItem', 0, 'SmartReloadList', '2019-11-06 11:18:06', '2019-11-06 11:18:06'), - (100, 2, '执行reload', 'smart-reload-update', 'smartReloadController.updateByTag', 1, 'SmartReloadList', '2019-11-06 11:18:14', '2019-11-06 11:18:14'), - (101, 2, '查看执行结果', 'smart-reload-result', 'smartReloadController.queryReloadResult', 2, 'SmartReloadList', '2019-11-06 11:18:19', '2019-11-06 11:18:19'), - (102, 2, '查询任务', 'heart-beat-query', 'heartBeatController.query', 0, 'HeartBeatList', '2019-11-06 11:18:38', '2019-11-06 11:18:38'), - (103, 2, '查询', 'file-filePage-query', 'fileController.queryListByPage,fileController.localGetFile,fileController.downLoadById', 0, 'FileList', '2019-11-06 11:19:06', '2019-11-06 11:19:06'), - (104, 2, '上传', 'file-filePage-upload', 'fileController.qiNiuUpload,fileController.localUpload,fileController.aliYunUpload,fileController.saveFile', 1, 'FileList', '2019-11-06 11:19:36', '2019-11-06 11:19:36'), - (105, 2, '下载', 'file-filePage-download', 'fileController.downLoadById', 2, 'FileList', '2019-11-16 10:05:02', '2019-11-16 10:05:02'), - (106, 1, '业务功能', 'Business', '/business', 0, NULL, '2020-12-14 15:16:26', '2020-12-14 15:16:26'), - (107, 1, '牡丹管理', 'Peony', '/peony', 1, 'Business', '2020-12-14 15:16:26', '2020-12-14 15:16:26'), - (108, 1, '牡丹花列表', 'PeonyList', '/peony/peony-list', 2, 'Peony', '2020-12-14 15:16:26', '2020-12-14 15:16:26'), - (109, 1, '牡丹花列表1', 'PeonyList1', '/peony/peony-list1', 3, 'Peony', '2020-12-14 15:16:26', '2020-12-14 15:16:26'), - (110, 1, '消息详情', 'NoticeDetail', '/notice/notice-detail', 13, 'Notice', '2020-12-14 15:16:26', '2020-12-14 15:16:26'), - (111, 1, '三级菜单子颗粒', 'ThreeLevelRouterView', '/three-router/level-two/level-three1', 16, 'LevelTwo', '2020-12-14 15:16:26', '2020-12-14 15:16:26'), - (112, 1, '系统设置', 'System', '/system', 19, NULL, '2020-12-14 15:16:26', '2020-12-14 15:16:26'), - (113, 1, '开发专用', 'Support', '/support', 32, NULL, '2020-12-14 15:16:26', '2020-12-14 15:16:26'), - (114, 2, '查询', 'peony-list-query', '', 1, 'PeonyList', '2020-12-14 15:16:30', '2020-12-14 15:16:30'), - (115, 2, '新增', 'peony-list-add', '', 2, 'PeonyList', '2020-12-14 15:16:30', '2020-12-14 15:16:30'), - (116, 2, '编辑', 'peony-list-update', '', 3, 'PeonyList', '2020-12-14 15:16:30', '2020-12-14 15:16:30'), - (117, 2, '批量删除', 'peony-list-batch-delete', '', 4, 'PeonyList', '2020-12-14 15:16:30', '2020-12-14 15:16:30'), - (118, 2, '批量导出', 'peony-list-batch-export', '', 5, 'PeonyList', '2020-12-14 15:16:30', '2020-12-14 15:16:30'), - (119, 2, '导出全部', 'peony-list-export-all', '', 6, 'PeonyList', '2020-12-14 15:16:30', '2020-12-14 15:16:30'), - (120, 2, '查询', 'peony1-list-query', '', 1, 'PeonyList1', '2020-12-14 15:16:33', '2020-12-14 15:16:33'), - (121, 2, '新增', 'peony1-list-add', '', 2, 'PeonyList1', '2020-12-14 15:16:33', '2020-12-14 15:16:33'), - (122, 2, '编辑', 'peony1-list-update', '', 3, 'PeonyList1', '2020-12-14 15:16:33', '2020-12-14 15:16:33'), - (123, 2, '批量删除', 'peony1-list-batch-delete', '', 4, 'PeonyList1', '2020-12-14 15:16:33', '2020-12-14 15:16:33'), - (124, 2, '批量导出', 'peony1-list-batch-export', '', 5, 'PeonyList1', '2020-12-14 15:16:33', '2020-12-14 15:16:33'), - (125, 2, '导出全部', 'peony1-list-export-all', '', 6, 'PeonyList1', '2020-12-14 15:16:33', '2020-12-14 15:16:33'), - (126, 2, '批量保存功能点', 'privilege-batch-save-points', 'privilegeController.functionSaveOrUpdate', 1, 'SystemPrivilege', '2020-12-14 15:17:11', '2020-12-14 15:17:11'); -/*!40000 ALTER TABLE `t_privilege` ENABLE KEYS */; - --- 导出 表 smart-admin-dev.t_quartz_task 结构 -DROP TABLE IF EXISTS `t_quartz_task`; -CREATE TABLE IF NOT EXISTS `t_quartz_task` ( - `id` int NOT NULL AUTO_INCREMENT, - `task_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '任务名称', - `task_bean` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'spring bean名称', - `task_params` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '任务参数', - `task_cron` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '运行cron表达式', - `task_status` tinyint NOT NULL DEFAULT '0' COMMENT '任务状态0:正常,1:暂停', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '备注', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - --- 正在导出表 smart-admin-dev.t_quartz_task 的数据:~5 rows (大约) -DELETE FROM `t_quartz_task`; -/*!40000 ALTER TABLE `t_quartz_task` DISABLE KEYS */; -INSERT INTO `t_quartz_task` (`id`, `task_name`, `task_bean`, `task_params`, `task_cron`, `task_status`, `remark`, `update_time`, `create_time`) VALUES - (9, '2312332', 'exampleTask', '21314', '*/5 * * * * ?', 1, NULL, '2019-09-06 14:41:55', '2019-04-19 15:24:26'), - (13, '567', 'exampleTask', 'ads', '*/5 * * * * ?', 1, NULL, '2019-09-04 16:37:25', '2019-04-23 15:32:17'), - (21, '11', 'exampleTask', '11', '*/5 * * * * ?', 1, NULL, '2019-09-04 16:37:30', '2019-04-26 17:29:21'), - (22, '33', 'exampleTask', '333', '*/5 * * * * ?', 1, NULL, '2019-04-26 17:29:36', '2019-04-26 17:29:36'), - (23, '1', 'exampleTask', '3', '*/5 * * * * ?', 0, NULL, '2019-09-05 17:21:12', '2019-04-26 17:29:50'); -/*!40000 ALTER TABLE `t_quartz_task` ENABLE KEYS */; - --- 导出 表 smart-admin-dev.t_quartz_task_log 结构 -DROP TABLE IF EXISTS `t_quartz_task_log`; -CREATE TABLE IF NOT EXISTS `t_quartz_task_log` ( - `id` int NOT NULL AUTO_INCREMENT, - `task_id` int NOT NULL COMMENT '任务id', - `task_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '任务名称', - `task_params` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '任务参数', - `process_status` tinyint NOT NULL COMMENT '任务处理状态0:成功,1:失败', - `process_duration` bigint NOT NULL DEFAULT '0' COMMENT '运行时长', - `process_log` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '日志', - `ip_address` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '运行主机ip', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=732881 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - --- 正在导出表 smart-admin-dev.t_quartz_task_log 的数据:~11 rows (大约) -DELETE FROM `t_quartz_task_log`; -/*!40000 ALTER TABLE `t_quartz_task_log` DISABLE KEYS */; -INSERT INTO `t_quartz_task_log` (`id`, `task_id`, `task_name`, `task_params`, `process_status`, `process_duration`, `process_log`, `ip_address`, `update_time`, `create_time`) VALUES - (732870, 9, '231233', '2131', 0, 5, NULL, '127.0.0.1', '2019-05-05 15:28:01', '2019-05-05 15:28:01'), - (732871, 9, '231233', '2131', 0, 32, NULL, '172.16.0.145', '2019-05-05 15:54:40', '2019-05-05 15:54:40'), - (732872, 22, '33', '333', 0, 31, NULL, '172.16.0.145', '2019-05-07 16:20:31', '2019-05-07 16:20:31'), - (732873, 9, '231233', '2131', 0, 304, NULL, '172.16.0.145', '2019-08-02 09:29:36', '2019-08-02 09:29:36'), - (732874, 9, '231233', '2131', 0, 24, NULL, '172.16.0.145', '2019-08-08 16:48:49', '2019-08-08 16:48:49'), - (732875, 9, '231233', '2131', 0, 147, NULL, '172.16.0.145', '2019-08-23 09:41:08', '2019-08-23 09:41:08'), - (732876, 9, '231233', '2131', 0, 610, NULL, '172.16.0.145', '2019-08-26 16:16:34', '2019-08-26 16:16:34'), - (732877, 9, '2312332', '2131', 0, 27, NULL, '172.16.0.145', '2019-09-05 14:34:51', '2019-09-05 14:34:51'), - (732878, 9, '2312332', '2131', 0, 5, NULL, '172.16.0.145', '2019-09-05 17:18:17', '2019-09-05 17:18:17'), - (732879, 9, '2312332', '2131', 0, 1, NULL, '172.16.0.145', '2019-09-05 17:20:15', '2019-09-05 17:20:15'), - (732880, 9, '2312332', '2131', 0, 5, NULL, '172.16.0.145', '2019-09-06 14:42:04', '2019-09-06 14:42:04'); -/*!40000 ALTER TABLE `t_quartz_task_log` ENABLE KEYS */; - --- 导出 表 smart-admin-dev.t_reload_item 结构 -DROP TABLE IF EXISTS `t_reload_item`; -CREATE TABLE IF NOT EXISTS `t_reload_item` ( - `tag` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '项名称', - `args` varchar(255) DEFAULT NULL COMMENT '参数 可选', - `identification` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '运行标识', - `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`tag`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - --- 正在导出表 smart-admin-dev.t_reload_item 的数据:~0 rows (大约) -DELETE FROM `t_reload_item`; -/*!40000 ALTER TABLE `t_reload_item` DISABLE KEYS */; -INSERT INTO `t_reload_item` (`tag`, `args`, `identification`, `update_time`, `create_time`) VALUES - ('system_config', '234', 'xxxx', '2019-11-14 16:46:21', '2019-04-18 11:48:27'); -/*!40000 ALTER TABLE `t_reload_item` ENABLE KEYS */; - --- 导出 表 smart-admin-dev.t_reload_result 结构 -DROP TABLE IF EXISTS `t_reload_result`; -CREATE TABLE IF NOT EXISTS `t_reload_result` ( - `tag` varchar(255) NOT NULL, - `identification` varchar(255) NOT NULL COMMENT '运行标识', - `args` varchar(255) DEFAULT NULL, - `result` tinyint unsigned NOT NULL COMMENT '是否成功 ', - `exception` text, - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - --- 正在导出表 smart-admin-dev.t_reload_result 的数据:~127 rows (大约) -DELETE FROM `t_reload_result`; -/*!40000 ALTER TABLE `t_reload_result` DISABLE KEYS */; -INSERT INTO `t_reload_result` (`tag`, `identification`, `args`, `result`, `exception`, `create_time`) VALUES - ('system_config', '23', '', 1, NULL, '2019-09-07 17:26:04'), - ('system_config', '23', '', 1, NULL, '2019-09-07 17:28:16'), - ('system_config', '23', '', 1, NULL, '2019-09-07 17:35:39'), - ('system_config', '23', '', 1, NULL, '2019-09-07 17:42:58'), - ('system_config', '23', '', 1, NULL, '2019-09-09 08:30:13'), - ('system_config', '23', '', 1, NULL, '2019-09-11 10:38:19'), - ('system_config', '23', '', 1, NULL, '2019-09-11 10:42:46'), - ('system_config', '23', '', 1, NULL, '2019-09-11 10:49:27'), - ('system_config', '23', '', 1, NULL, '2019-09-11 11:09:10'), - ('system_config', '23', '', 1, NULL, '2019-09-11 11:10:06'), - ('system_config', '23', '', 1, NULL, '2019-09-11 11:18:17'), - ('system_config', '23', '', 1, NULL, '2019-09-11 11:41:18'), - ('system_config', '23', '', 1, NULL, '2019-09-11 11:45:41'), - ('system_config', '23', '', 1, NULL, '2019-09-11 11:46:37'), - ('system_config', '23', '', 1, NULL, '2019-09-11 11:50:35'), - ('system_config', '23', '', 1, NULL, '2019-09-11 14:55:00'), - ('system_config', '23', '', 1, NULL, '2019-09-11 15:26:19'), - ('system_config', '23', '', 1, NULL, '2019-09-11 15:35:51'), - ('system_config', '23', '', 1, NULL, '2019-09-11 15:36:19'), - ('system_config', '23', '', 1, NULL, '2019-09-11 15:36:53'), - ('system_config', '23', '', 1, NULL, '2019-09-11 15:37:58'), - ('system_config', '23', '', 1, NULL, '2019-09-11 15:41:37'), - ('system_config', '23', '', 1, NULL, '2019-09-16 10:12:29'), - ('system_config', '23', '', 1, NULL, '2019-09-20 17:14:08'), - ('system_config', '23', '', 1, NULL, '2019-09-20 17:18:24'), - ('system_config', '23', '', 1, NULL, '2019-09-20 17:23:07'), - ('system_config', '23', '', 1, NULL, '2019-09-20 17:24:17'), - ('system_config', '23', '', 1, NULL, '2019-09-20 17:30:17'), - ('system_config', '23', '', 1, NULL, '2019-09-20 17:31:40'), - ('system_config', '23', '', 1, NULL, '2019-09-20 17:32:34'), - ('system_config', '23', '', 1, NULL, '2019-09-20 17:52:31'), - ('system_config', '23', '', 1, NULL, '2019-09-20 17:55:10'), - ('system_config', '23', '', 1, NULL, '2019-09-20 17:55:47'), - ('system_config', '23', '', 1, NULL, '2019-09-20 17:58:49'), - ('system_config', '23', '', 1, NULL, '2019-09-21 10:53:47'), - ('system_config', '23', '', 1, NULL, '2019-09-22 18:24:21'), - ('system_config', '23', '', 1, NULL, '2019-09-24 09:04:42'), - ('system_config', '23', '', 1, NULL, '2019-10-15 11:06:12'), - ('system_config', '23', '', 1, NULL, '2019-10-15 11:22:10'), - ('system_config', '23', '', 1, NULL, '2019-10-15 16:42:16'), - ('system_config', '23', '', 1, NULL, '2019-10-19 15:18:54'), - ('system_config', '23', '', 1, NULL, '2019-10-19 16:50:10'), - ('system_config', '23', '', 1, NULL, '2019-10-21 15:52:25'), - ('system_config', '23', '', 1, NULL, '2019-10-23 10:24:38'), - ('system_config', '23', '', 1, NULL, '2019-10-23 10:28:45'), - ('system_config', '23', '', 1, NULL, '2019-10-23 16:35:45'), - ('system_config', '23', '', 1, NULL, '2019-10-23 16:38:48'), - ('system_config', '23', '', 1, NULL, '2019-10-25 08:52:22'), - ('system_config', '23', '', 1, NULL, '2019-10-28 16:04:30'), - ('system_config', '23', '', 1, NULL, '2019-10-30 19:59:24'), - ('system_config', '23', '', 1, NULL, '2019-10-31 14:29:26'), - ('system_config', '23', '', 1, NULL, '2019-10-31 14:35:38'), - ('system_config', '23', '', 1, NULL, '2019-10-31 15:58:39'), - ('system_config', '23', '', 1, NULL, '2019-10-31 17:34:48'), - ('system_config', '23', '', 1, NULL, '2019-11-01 11:23:26'), - ('system_config', '23', '', 1, NULL, '2019-11-01 14:55:34'), - ('system_config', '23', '', 1, NULL, '2019-11-02 08:49:44'), - ('system_config', '23', '', 1, NULL, '2019-11-02 09:40:52'), - ('system_config', '23', '', 1, NULL, '2019-11-02 09:42:48'), - ('system_config', '23', '', 1, NULL, '2019-11-02 09:47:38'), - ('system_config', '23', '', 1, NULL, '2019-11-02 09:50:57'), - ('system_config', '23', '', 1, NULL, '2019-11-02 09:51:32'), - ('system_config', '23', '', 1, NULL, '2019-11-02 09:51:48'), - ('system_config', '23', '', 1, NULL, '2019-11-02 15:48:21'), - ('system_config', '23', '', 1, NULL, '2019-11-02 20:48:44'), - ('system_config', '23', '', 1, NULL, '2019-11-02 21:27:50'), - ('system_config', '23', '', 1, NULL, '2019-11-03 22:10:32'), - ('system_config', '23', '', 1, NULL, '2019-11-03 22:10:32'), - ('system_config', '23', '', 1, NULL, '2019-11-04 09:10:24'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-05 10:24:51'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-06 11:22:42'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-06 11:25:54'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-06 11:27:04'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-06 11:28:00'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-06 11:34:06'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-06 11:34:43'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-06 11:53:11'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-06 11:56:05'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-06 13:52:39'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-06 15:29:29'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-06 16:05:36'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-06 16:06:13'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-06 16:13:22'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-06 16:19:38'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-06 16:21:37'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-06 16:22:23'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-08 08:50:08'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-08 13:37:34'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-09 08:35:08'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-09 08:54:38'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-09 09:00:32'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-09 09:01:24'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-09 09:24:16'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-09 09:26:46'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-09 09:43:13'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-09 09:44:48'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-09 10:28:30'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-09 11:24:19'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-11 09:40:42'), - ('system_config', '23', '4234234', 1, NULL, '2019-11-13 17:25:42'), - ('system_config', '23343', '2423', 1, NULL, '2019-11-13 20:29:19'), - ('system_config', '23343', '2423', 1, NULL, '2019-11-13 20:29:23'), - ('system_config', '23343', '234', 1, NULL, '2019-11-14 11:43:57'), - ('system_config', '23343', '234', 1, NULL, '2019-11-14 11:50:18'), - ('system_config', '23343', '234', 1, NULL, '2019-11-14 11:51:13'), - ('system_config', '23343', '234', 1, NULL, '2019-11-14 11:52:03'), - ('system_config', '23343', '234', 1, NULL, '2019-11-14 11:53:02'), - ('system_config', '23343', '234', 1, NULL, '2019-11-14 13:49:11'), - ('system_config', '23343', '234', 1, NULL, '2019-11-14 13:51:05'), - ('system_config', '23343', '234', 1, NULL, '2019-11-14 13:53:53'), - ('system_config', '23343', '234', 1, NULL, '2019-11-14 13:55:57'), - ('system_config', '23343', '234', 1, NULL, '2019-11-14 16:15:44'), - ('system_config', '23343', '234', 1, NULL, '2019-11-14 16:39:36'), - ('system_config', '23343234234', '234', 1, NULL, '2019-11-14 16:41:05'), - ('system_config', '23343234234', '234', 1, NULL, '2019-11-14 16:41:05'), - ('system_config', 'aaaa', '234', 1, NULL, '2019-11-14 16:41:20'), - ('system_config', 'aaaa', '234', 1, NULL, '2019-11-14 16:41:25'), - ('system_config', '111', '234', 1, NULL, '2019-11-14 16:43:20'), - ('system_config', '111', '234', 1, NULL, '2019-11-14 16:44:13'), - ('system_config', 'xxxx', '234', 1, NULL, '2019-11-14 16:46:26'), - ('system_config', 'xxxx', '234', 1, NULL, '2019-11-14 16:46:39'), - ('system_config', 'xxxx', '234', 1, NULL, '2019-11-14 16:48:47'), - ('system_config', 'xxxx', '234', 1, NULL, '2019-11-15 14:39:55'), - ('system_config', 'xxxx', '234', 1, NULL, '2019-11-16 08:47:43'), - ('system_config', 'xxxx', '234', 1, NULL, '2019-11-16 17:12:10'), - ('system_config', 'xxxx', '234', 1, NULL, '2019-11-16 18:02:57'), - ('system_config', 'xxxx', '234', 1, NULL, '2020-12-14 15:09:53'), - ('system_config', 'xxxx', '234', 1, NULL, '2020-12-14 15:13:33'), - ('system_config', 'xxxx', '234', 1, NULL, '2020-12-14 15:14:09'), - ('system_config', 'xxxx', '234', 1, NULL, '2020-12-14 15:16:23'); -/*!40000 ALTER TABLE `t_reload_result` ENABLE KEYS */; - --- 导出 表 smart-admin-dev.t_role 结构 -DROP TABLE IF EXISTS `t_role`; -CREATE TABLE IF NOT EXISTS `t_role` ( - `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', - `role_name` varchar(20) NOT NULL COMMENT '角色名称', - `remark` varchar(255) DEFAULT NULL COMMENT '角色描述', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8 COMMENT='角色表'; - --- 正在导出表 smart-admin-dev.t_role 的数据:~14 rows (大约) -DELETE FROM `t_role`; -/*!40000 ALTER TABLE `t_role` DISABLE KEYS */; -INSERT INTO `t_role` (`id`, `role_name`, `remark`, `update_time`, `create_time`) VALUES - (1, '管理员', '', '2019-06-21 12:09:34', '2019-06-21 12:09:34'), - (34, '销售', '', '2019-08-30 09:30:50', '2019-08-30 09:30:50'), - (35, '总经理', '', '2019-08-30 09:31:05', '2019-08-30 09:31:05'), - (36, '董事长', '', '2019-08-30 09:31:11', '2019-08-30 09:31:11'), - (37, '财务', '', '2019-08-30 09:31:16', '2019-08-30 09:31:16'), - (38, '运营', '', '2019-08-30 09:31:22', '2019-08-30 09:31:22'), - (40, '测试角色1', '测试角色1', '2019-09-05 15:05:38', '2019-09-05 15:05:38'), - (41, '测试角色2', '测试角色2', '2019-09-05 15:05:43', '2019-09-05 15:05:43'), - (42, '测试角色3', '测试角色3', '2019-09-05 15:05:49', '2019-09-05 15:05:49'), - (43, '测试角色4', '测试角色4', '2019-09-05 15:05:56', '2019-09-05 15:05:56'), - (45, '测试角色6', '测试角色6', '2019-09-05 15:06:06', '2019-09-05 15:06:06'), - (46, '测试角色7', '测试角色7', '2019-09-05 15:06:18', '2019-09-05 15:06:18'), - (47, '测试角色8', '测试角色8', '2019-09-05 15:06:25', '2019-09-05 15:06:25'), - (48, '测试角色9', '测试角色9', '2019-11-15 17:06:11', '2019-09-05 15:06:30'); -/*!40000 ALTER TABLE `t_role` ENABLE KEYS */; - --- 导出 表 smart-admin-dev.t_role_data_scope 结构 -DROP TABLE IF EXISTS `t_role_data_scope`; -CREATE TABLE IF NOT EXISTS `t_role_data_scope` ( - `id` int NOT NULL AUTO_INCREMENT, - `data_scope_type` int NOT NULL COMMENT '数据范围id', - `view_type` int NOT NULL COMMENT '数据范围类型', - `role_id` int NOT NULL COMMENT '角色id', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - --- 正在导出表 smart-admin-dev.t_role_data_scope 的数据:~4 rows (大约) -DELETE FROM `t_role_data_scope`; -/*!40000 ALTER TABLE `t_role_data_scope` DISABLE KEYS */; -INSERT INTO `t_role_data_scope` (`id`, `data_scope_type`, `view_type`, `role_id`, `update_time`, `create_time`) VALUES - (5, 0, 2, 9, '2019-04-29 15:01:04', '2019-04-29 15:01:04'), - (14, 0, 2, 40, '2019-09-05 15:25:37', '2019-09-05 15:25:37'), - (15, 0, 0, 1, '2019-09-06 08:35:45', '2019-09-06 08:35:45'), - (16, 0, 3, 34, '2019-11-06 16:08:02', '2019-11-06 16:08:02'); -/*!40000 ALTER TABLE `t_role_data_scope` ENABLE KEYS */; - --- 导出 表 smart-admin-dev.t_role_employee 结构 -DROP TABLE IF EXISTS `t_role_employee`; -CREATE TABLE IF NOT EXISTS `t_role_employee` ( - `id` int NOT NULL AUTO_INCREMENT, - `role_id` int NOT NULL COMMENT '角色id', - `employee_id` int NOT NULL COMMENT '员工id', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=214 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='角色员工功能表'; - --- 正在导出表 smart-admin-dev.t_role_employee 的数据:~25 rows (大约) -DELETE FROM `t_role_employee`; -/*!40000 ALTER TABLE `t_role_employee` DISABLE KEYS */; -INSERT INTO `t_role_employee` (`id`, `role_id`, `employee_id`, `update_time`, `create_time`) VALUES - (121, 38, 22, '2019-09-04 09:23:09', '2019-09-04 09:23:09'), - (130, 1, 30, '2019-09-05 15:32:40', '2019-09-05 15:32:40'), - (131, 1, 17, '2019-09-05 15:32:40', '2019-09-05 15:32:40'), - (132, 1, 26, '2019-09-05 15:32:40', '2019-09-05 15:32:40'), - (135, 1, 12, '2019-09-05 15:32:40', '2019-09-05 15:32:40'), - (136, 1, 11, '2019-09-05 15:32:40', '2019-09-05 15:32:40'), - (137, 1, 16, '2019-09-05 15:32:40', '2019-09-05 15:32:40'), - (138, 1, 18, '2019-09-05 15:32:40', '2019-09-05 15:32:40'), - (139, 1, 19, '2019-09-05 15:32:40', '2019-09-05 15:32:40'), - (140, 1, 20, '2019-09-05 15:32:40', '2019-09-05 15:32:40'), - (141, 1, 23, '2019-09-05 15:32:40', '2019-09-05 15:32:40'), - (147, 1, 35, '2019-09-06 09:00:27', '2019-09-06 09:00:27'), - (148, 40, 35, '2019-09-06 09:00:27', '2019-09-06 09:00:27'), - (165, 40, 32, '2019-11-08 10:39:35', '2019-11-08 10:39:35'), - (166, 34, 32, '2019-11-08 10:39:35', '2019-11-08 10:39:35'), - (167, 38, 32, '2019-11-08 10:39:35', '2019-11-08 10:39:35'), - (168, 38, 36, '2019-11-08 10:40:16', '2019-11-08 10:40:16'), - (169, 40, 36, '2019-11-08 10:40:16', '2019-11-08 10:40:16'), - (170, 37, 36, '2019-11-08 10:40:16', '2019-11-08 10:40:16'), - (174, 38, 37, '2019-11-08 11:05:39', '2019-11-08 11:05:39'), - (175, 42, 37, '2019-11-08 11:05:39', '2019-11-08 11:05:39'), - (188, 1, 1, '2019-11-15 16:05:33', '2019-11-15 16:05:33'), - (211, 40, 38, '2019-11-15 16:54:54', '2019-11-15 16:54:54'), - (212, 34, 29, '2019-11-16 18:04:04', '2019-11-16 18:04:04'), - (213, 45, 29, '2019-11-16 18:04:04', '2019-11-16 18:04:04'); -/*!40000 ALTER TABLE `t_role_employee` ENABLE KEYS */; - --- 导出 表 smart-admin-dev.t_role_privilege 结构 -DROP TABLE IF EXISTS `t_role_privilege`; -CREATE TABLE IF NOT EXISTS `t_role_privilege` ( - `id` int NOT NULL AUTO_INCREMENT, - `role_id` int NOT NULL COMMENT '角色id', - `privilege_key` varchar(1000) NOT NULL COMMENT '权限key', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=10835 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='角色权限功能表'; - --- 正在导出表 smart-admin-dev.t_role_privilege 的数据:~322 rows (大约) -DELETE FROM `t_role_privilege`; -/*!40000 ALTER TABLE `t_role_privilege` DISABLE KEYS */; -INSERT INTO `t_role_privilege` (`id`, `role_id`, `privilege_key`, `update_time`, `create_time`) VALUES - (3506, 48, 'search-position', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3507, 48, 'add-position', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3508, 48, 'update-position', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3509, 48, 'delete-position', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3510, 48, 'add-role', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3511, 48, 'delete-role', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3512, 48, 'update-role', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3513, 48, 'update-role-privilege', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3514, 48, 'add-employee-role', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3515, 48, 'delete-employee-role', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3516, 48, 'delete-employee-role-batch', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3517, 48, 'search-employee-list', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3518, 48, 'query-data-scope', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3519, 48, 'update-data-scope', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3520, 48, 'add-department', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3521, 48, 'update-department', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3522, 48, 'delete-department', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3523, 48, 'search-department', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3524, 48, 'add-employee', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3525, 48, 'update-employee', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3526, 48, 'delete-employee', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3527, 48, 'disabled-employee', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3528, 48, 'reset-employee-password', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3529, 48, 'set-employee-role', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3530, 48, 'disabled-employee-batch', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3531, 48, 'update-employee-role', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3533, 48, 'system-params-search', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3534, 48, 'system-params-add', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3535, 48, 'system-config-update', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3536, 48, 'system-config-search', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3537, 48, 'privilegeMainSearch', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3538, 48, 'privilegeMainUpdate', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3539, 48, 'task-search', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3540, 48, 'task-refresh', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3541, 48, 'task-add', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3542, 48, 'task-update', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3543, 48, 'task-pause', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3544, 48, 'task-resume', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3545, 48, 'task-run', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3546, 48, 'task-query-log', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3547, 48, 'task-delete', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3548, 48, 'systemCodeVersionsQuery', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3552, 48, 'roleOneTwo-add', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3555, 48, 'apiDocument', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3557, 48, 'reload', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3559, 48, 'smart-reload-search', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3560, 48, 'smart-reload-update', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3561, 48, 'smart-reload-result', '2019-09-06 15:28:07', '2019-09-06 15:28:07'), - (3575, 45, 'task-search', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3576, 45, 'task-refresh', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3577, 45, 'task-add', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3578, 45, 'task-update', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3579, 45, 'task-pause', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3580, 45, 'task-resume', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3581, 45, 'task-run', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3582, 45, 'task-query-log', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3583, 45, 'task-delete', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3586, 45, 'add-role', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3587, 45, 'delete-role', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3588, 45, 'update-role', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3589, 45, 'update-role-privilege', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3590, 45, 'add-employee-role', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3591, 45, 'delete-employee-role', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3592, 45, 'delete-employee-role-batch', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3593, 45, 'search-employee-list', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3594, 45, 'query-data-scope', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3595, 45, 'update-data-scope', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3597, 45, 'search-position', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3598, 45, 'add-position', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3599, 45, 'update-position', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3600, 45, 'delete-position', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3602, 45, 'add-department', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3603, 45, 'set-employee-role', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3604, 45, 'update-department', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3605, 45, 'delete-department', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3606, 45, 'search-department', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3607, 45, 'add-employee', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3608, 45, 'update-employee', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3609, 45, 'disabled-employee', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3610, 45, 'disabled-employee-batch', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3611, 45, 'update-employee-role', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3612, 45, 'delete-employee', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (3613, 45, 'reset-employee-password', '2019-09-06 15:28:17', '2019-09-06 15:28:17'), - (8112, 41, 'SystemSetting', '2019-11-08 11:21:22', '2019-11-08 11:21:22'), - (8113, 41, 'SystemPrivilege', '2019-11-08 11:21:22', '2019-11-08 11:21:22'), - (8114, 41, 'privilege-main-update', '2019-11-08 11:21:22', '2019-11-08 11:21:22'), - (8115, 41, 'privilege-main-search', '2019-11-08 11:21:22', '2019-11-08 11:21:22'), - (8549, 35, 'SystemSetting', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (8550, 35, 'SystemConfig', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (8551, 35, 'SystemPrivilege', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (8552, 35, 'Notice', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (8553, 35, 'NoticeList', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (8554, 35, 'PersonNotice', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (8555, 35, 'Email', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (8556, 35, 'EmailList', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (8557, 35, 'UserLog', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (8558, 35, 'UserOperateLog', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (8559, 35, 'UserLoginLog', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (8560, 35, 'system-config-search', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (8561, 35, 'privilege-main-update', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (8562, 35, 'privilege-main-search', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (8563, 35, 'notice-query', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (8564, 35, 'notice-add', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (8565, 35, 'notice-edit', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (8566, 35, 'notice-delete', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (8567, 35, 'person-notice-query', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (8568, 35, 'person-notice-detail', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (8569, 35, 'email-query', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (8570, 35, 'email-add', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (8571, 35, 'email-update', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (8572, 35, 'user-operate-log-search', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (8573, 35, 'user-login-log-search', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (8574, 35, 'system-config-update', '2019-11-15 15:47:52', '2019-11-15 15:47:52'), - (9005, 37, 'SystemSetting', '2019-11-15 16:33:09', '2019-11-15 16:33:09'), - (9006, 37, 'SystemConfig', '2019-11-15 16:33:09', '2019-11-15 16:33:09'), - (9007, 37, 'system-params-search', '2019-11-15 16:33:09', '2019-11-15 16:33:09'), - (9008, 37, 'system-params-add', '2019-11-15 16:33:09', '2019-11-15 16:33:09'), - (9009, 37, 'system-config-update', '2019-11-15 16:33:09', '2019-11-15 16:33:09'), - (9368, 34, 'SystemSetting', '2019-11-15 16:45:39', '2019-11-15 16:45:39'), - (9369, 34, 'SystemConfig', '2019-11-15 16:45:39', '2019-11-15 16:45:39'), - (9370, 34, 'SystemPrivilege', '2019-11-15 16:45:39', '2019-11-15 16:45:39'), - (9371, 34, 'system-params-search', '2019-11-15 16:45:39', '2019-11-15 16:45:39'), - (9372, 34, 'system-params-add', '2019-11-15 16:45:39', '2019-11-15 16:45:39'), - (9373, 34, 'privilege-main-search', '2019-11-15 16:45:39', '2019-11-15 16:45:39'), - (9374, 34, 'Task', '2019-11-15 16:45:39', '2019-11-15 16:45:39'), - (9375, 34, 'TaskList', '2019-11-15 16:45:39', '2019-11-15 16:45:39'), - (9376, 34, 'task-search', '2019-11-15 16:45:39', '2019-11-15 16:45:39'), - (9377, 34, 'task-refresh', '2019-11-15 16:45:39', '2019-11-15 16:45:39'), - (9378, 34, 'task-add', '2019-11-15 16:45:39', '2019-11-15 16:45:39'), - (9379, 34, 'task-update', '2019-11-15 16:45:39', '2019-11-15 16:45:39'), - (9380, 34, 'task-pause', '2019-11-15 16:45:39', '2019-11-15 16:45:39'), - (9381, 34, 'task-resume', '2019-11-15 16:45:39', '2019-11-15 16:45:39'), - (9382, 34, 'task-run', '2019-11-15 16:45:39', '2019-11-15 16:45:39'), - (9383, 34, 'task-query-log', '2019-11-15 16:45:39', '2019-11-15 16:45:39'), - (9384, 34, 'task-delete', '2019-11-15 16:45:39', '2019-11-15 16:45:39'), - (9536, 42, 'Task', '2019-11-15 16:50:40', '2019-11-15 16:50:40'), - (9537, 42, 'TaskList', '2019-11-15 16:50:40', '2019-11-15 16:50:40'), - (9538, 42, 'task-search', '2019-11-15 16:50:40', '2019-11-15 16:50:40'), - (9539, 42, 'task-add', '2019-11-15 16:50:40', '2019-11-15 16:50:40'), - (9540, 42, 'task-update', '2019-11-15 16:50:40', '2019-11-15 16:50:40'), - (9541, 42, 'task-query-log', '2019-11-15 16:50:40', '2019-11-15 16:50:40'), - (9674, 38, 'Employee', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9675, 38, 'PositionList', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9676, 38, 'SystemSetting', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9677, 38, 'SystemConfig', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9678, 38, 'Notice', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9679, 38, 'PersonNotice', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9680, 38, 'Email', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9681, 38, 'EmailList', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9682, 38, 'SendMail', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9683, 38, 'Monitor', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9684, 38, 'OnlineUser', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9685, 38, 'Task', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9686, 38, 'TaskList', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9687, 38, 'KeepAlive', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9688, 38, 'KeepAliveContentList', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9689, 38, 'HeartBeat', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9690, 38, 'HeartBeatList', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9691, 38, 'File', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9692, 38, 'FileList', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9693, 38, 'search-position', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9694, 38, 'system-params-search', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9695, 38, 'system-config-update', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9696, 38, 'system-config-search', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9697, 38, 'person-notice-query', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9698, 38, 'person-notice-detail', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9699, 38, 'email-query', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9700, 38, 'email-send', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9701, 38, 'online-user-search', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9702, 38, 'task-search', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9703, 38, 'heart-beat-query', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9704, 38, 'file-filePage-query', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9705, 38, 'file-filePage-upload', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (9706, 38, 'task-refresh', '2019-11-15 16:53:47', '2019-11-15 16:53:47'), - (10585, 40, 'Employee', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10586, 40, 'RoleManage', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10587, 40, 'PositionList', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10588, 40, 'RoleEmployeeManage', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10589, 40, 'SystemSetting', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10590, 40, 'SystemConfig', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10591, 40, 'SystemPrivilege', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10592, 40, 'Notice', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10593, 40, 'NoticeList', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10594, 40, 'PersonNotice', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10595, 40, 'Email', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10596, 40, 'SendMail', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10597, 40, 'Task', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10598, 40, 'TaskList', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10599, 40, 'add-role', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10600, 40, 'delete-role', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10601, 40, 'update-role', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10602, 40, 'update-role-privilege', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10603, 40, 'add-employee-role', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10604, 40, 'search-employee-list', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10605, 40, 'delete-employee-role', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10606, 40, 'delete-employee-role-batch', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10607, 40, 'query-data-scope', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10608, 40, 'update-data-scope', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10609, 40, 'search-position', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10610, 40, 'add-position', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10611, 40, 'update-position', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10612, 40, 'search-department', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10613, 40, 'system-params-add', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10614, 40, 'system-config-search', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10615, 40, 'privilege-main-search', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10616, 40, 'notice-query', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10617, 40, 'notice-add', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10618, 40, 'notice-edit', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10619, 40, 'notice-delete', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10620, 40, 'notice-detail', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10621, 40, 'notice-send', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10622, 40, 'person-notice-query', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10623, 40, 'email-send', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10624, 40, 'task-search', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10625, 40, 'task-refresh', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10626, 40, 'task-add', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10627, 40, 'task-update', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10628, 40, 'task-query-log', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10629, 40, 'task-delete', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10630, 40, 'delete-department', '2019-11-15 17:19:42', '2019-11-15 17:19:42'), - (10733, 1, 'Employee', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10734, 1, 'RoleManage', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10735, 1, 'PositionList', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10736, 1, 'RoleEmployeeManage', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10737, 1, 'SystemSetting', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10738, 1, 'SystemConfig', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10739, 1, 'SystemPrivilege', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10740, 1, 'Notice', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10741, 1, 'NoticeList', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10742, 1, 'PersonNotice', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10743, 1, 'Email', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10744, 1, 'EmailList', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10745, 1, 'SendMail', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10746, 1, 'UserLog', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10747, 1, 'UserOperateLog', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10748, 1, 'UserLoginLog', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10749, 1, 'Monitor', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10750, 1, 'OnlineUser', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10751, 1, 'Sql', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10752, 1, 'Task', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10753, 1, 'TaskList', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10754, 1, 'Reload', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10755, 1, 'SmartReloadList', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10756, 1, 'ApiDoc', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10757, 1, 'Swagger', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10758, 1, 'ThreeRouter', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10759, 1, 'LevelTwo', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10761, 1, 'RoleTwoTwo', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10762, 1, 'RoleOneOne', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10763, 1, 'KeepAlive', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10764, 1, 'KeepAliveContentList', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10765, 1, 'KeepAliveAddContent', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10766, 1, 'HeartBeat', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10767, 1, 'HeartBeatList', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10768, 1, 'File', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10769, 1, 'FileList', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10770, 1, 'add-role', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10771, 1, 'delete-role', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10772, 1, 'update-role', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10773, 1, 'update-role-privilege', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10774, 1, 'add-employee-role', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10775, 1, 'search-employee-list', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10776, 1, 'delete-employee-role', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10777, 1, 'delete-employee-role-batch', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10778, 1, 'query-data-scope', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10779, 1, 'update-data-scope', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10780, 1, 'search-position', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10781, 1, 'add-position', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10782, 1, 'update-position', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10783, 1, 'delete-position', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10784, 1, 'add-department', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10785, 1, 'update-department', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10786, 1, 'delete-department', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10787, 1, 'search-department', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10788, 1, 'add-employee', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10789, 1, 'update-employee', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10790, 1, 'disabled-employee', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10791, 1, 'disabled-employee-batch', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10792, 1, 'update-employee-role', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10793, 1, 'reset-employee-password', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10794, 1, 'delete-employee', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10795, 1, 'system-params-search', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10796, 1, 'system-params-add', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10797, 1, 'system-config-update', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10798, 1, 'system-config-search', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10799, 1, 'privilege-main-update', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10800, 1, 'privilege-main-search', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10801, 1, 'notice-query', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10802, 1, 'notice-add', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10803, 1, 'notice-edit', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10804, 1, 'notice-delete', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10805, 1, 'notice-detail', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10806, 1, 'notice-send', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10807, 1, 'person-notice-query', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10808, 1, 'person-notice-detail', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10809, 1, 'email-query', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10810, 1, 'email-add', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10811, 1, 'email-update', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10812, 1, 'email-delete', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10813, 1, 'email-send', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10814, 1, 'user-operate-log-search', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10815, 1, 'user-operate-log-detail', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10816, 1, 'user-operate-log-delete', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10817, 1, 'user-login-log-search', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10818, 1, 'user-login-log-delete', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10819, 1, 'online-user-search', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10820, 1, 'task-search', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10821, 1, 'task-refresh', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10822, 1, 'task-add', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10823, 1, 'task-update', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10824, 1, 'task-pause', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10825, 1, 'task-resume', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10826, 1, 'task-run', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10827, 1, 'task-query-log', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10828, 1, 'task-delete', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10829, 1, 'smart-reload-search', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10830, 1, 'smart-reload-update', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10831, 1, 'smart-reload-result', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10832, 1, 'heart-beat-query', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10833, 1, 'file-filePage-query', '2019-11-16 18:04:10', '2019-11-16 18:04:10'), - (10834, 1, 'file-filePage-upload', '2019-11-16 18:04:10', '2019-11-16 18:04:10'); -/*!40000 ALTER TABLE `t_role_privilege` ENABLE KEYS */; - --- 导出 表 smart-admin-dev.t_system_config 结构 -DROP TABLE IF EXISTS `t_system_config`; -CREATE TABLE IF NOT EXISTS `t_system_config` ( - `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', - `config_name` varchar(255) NOT NULL COMMENT '参数名字', - `config_key` varchar(255) NOT NULL COMMENT '参数key', - `config_value` text NOT NULL, - `config_group` varchar(255) NOT NULL COMMENT '参数类别', - `is_using` int NOT NULL COMMENT '是否使用0 否 1 是', - `remark` varchar(255) DEFAULT NULL, - `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '上次修改时间', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; - --- 正在导出表 smart-admin-dev.t_system_config 的数据:~8 rows (大约) -DELETE FROM `t_system_config`; -/*!40000 ALTER TABLE `t_system_config` DISABLE KEYS */; -INSERT INTO `t_system_config` (`id`, `config_name`, `config_key`, `config_value`, `config_group`, `is_using`, `remark`, `update_time`, `create_time`) VALUES - (1, '超级管理员', 'employee_superman', '12,13,1', 'employee', 1, '123r8566456', '2019-11-14 16:40:48', '2018-08-18 16:28:03'), - (13, '本地上传URL前缀', 'local_upload_url_prefix', 'http://172.16.0.145/smartAdmin/file/', 'upload', 1, '', '2019-09-04 16:23:49', '2019-04-26 17:06:53'), - (14, '阿里云上传配置', 'ali_oss', '{"accessKeyId":"","accessKeySecret":"","bucketName":"sit","endpoint":"http://oss-cn-beijing.aliyuncs.com"}', 'upload', 1, 'eefwfwfds', '2019-11-16 18:04:30', '2019-05-11 18:00:06'), - (15, '邮件发配置', 'email_config', '{"password":"smartadmin","smtpHost":"smtp.163.com","username":"smartadmin1024@163.com"}', 'email', 1, NULL, '2019-09-04 16:42:17', '2019-05-13 16:57:48'), - (16, '七牛云上传配置', 'qi_niu_oss', '{"accessKeyId":"rX7HgY1ZLpUD25JrA-uwMM_jj-","accessKeySecret":"","bucketName":"sun-smart-admin","endpoint":"http://puvpyay08.bkt.clouddn.com"}', 'upload', 1, NULL, '2019-11-16 18:04:42', '2019-07-19 16:05:56'), - (17, 'test', 'ww_1', 'ewr', '3', 1, 'testoo', '2019-11-08 09:43:36', '2019-11-08 09:27:19'), - (18, '4234', '42342', '423423', '23423', 1, '423423111111111111111111111111111111111111423423111111111111111111111111111111111111423423111111111111111111111111111111111111423423111111111111111111111111111111111111423423111111111111111111111111111111111111', '2019-11-14 14:58:39', '2019-11-14 11:22:49'), - (19, 'test323@', 'test', '123456', '11_', 1, 'gggggg', '2019-11-15 16:24:52', '2019-11-15 16:24:52'); -/*!40000 ALTER TABLE `t_system_config` ENABLE KEYS */; - --- 导出 表 smart-admin-dev.t_user_login_log 结构 -DROP TABLE IF EXISTS `t_user_login_log`; -CREATE TABLE IF NOT EXISTS `t_user_login_log` ( - `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', - `user_id` int NOT NULL COMMENT '员工id', - `user_name` varchar(50) NOT NULL COMMENT '用户名', - `remote_ip` varchar(50) DEFAULT NULL COMMENT '用户ip', - `remote_port` int DEFAULT NULL COMMENT '用户端口', - `remote_browser` varchar(100) DEFAULT NULL COMMENT '浏览器', - `remote_os` varchar(50) DEFAULT NULL COMMENT '操作系统', - `login_status` tinyint NOT NULL COMMENT '登录状态 0 失败 1成功', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`), - KEY `customer_id` (`user_id`) USING BTREE, - KEY `auditor_id` (`remote_browser`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=1743 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户登录日志'; - --- 正在导出表 smart-admin-dev.t_user_login_log 的数据:~122 rows (大约) -DELETE FROM `t_user_login_log`; -/*!40000 ALTER TABLE `t_user_login_log` DISABLE KEYS */; -INSERT INTO `t_user_login_log` (`id`, `user_id`, `user_name`, `remote_ip`, `remote_port`, `remote_browser`, `remote_os`, `login_status`, `update_time`, `create_time`) VALUES - (1501, 30, '耿为刚', '172.16.1.234', 61406, 'Chrome', 'Windows 10', 1, '2019-09-06 14:19:47', '2019-09-06 14:19:47'), - (1502, 30, '耿为刚', '172.16.1.234', 61405, 'Chrome', 'Windows 10', 1, '2019-09-06 14:20:46', '2019-09-06 14:20:46'), - (1503, 30, '耿为刚', '172.16.1.234', 62213, 'Chrome', 'Windows 10', 1, '2019-09-06 14:28:50', '2019-09-06 14:28:50'), - (1505, 30, '耿为刚', '172.16.1.234', 62478, 'Chrome', 'Windows 10', 1, '2019-09-06 14:32:57', '2019-09-06 14:32:57'), - (1506, 1, '管理员', '127.0.0.1', 55613, 'Chrome', 'Windows 10', 1, '2019-09-06 14:35:48', '2019-09-06 14:35:48'), - (1507, 1, '管理员', '172.16.1.234', 63132, 'Chrome', 'Windows 10', 1, '2019-09-06 14:38:43', '2019-09-06 14:38:43'), - (1508, 30, '耿为刚', '172.16.1.234', 63132, 'Chrome', 'Windows 10', 1, '2019-09-06 14:41:36', '2019-09-06 14:41:36'), - (1509, 1, '管理员', '172.16.1.234', 63332, 'Chrome', 'Windows 10', 1, '2019-09-06 14:42:37', '2019-09-06 14:42:37'), - (1511, 1, '管理员', '172.16.1.166', 29923, 'Chrome', 'Windows 10', 1, '2019-09-06 15:09:22', '2019-09-06 15:09:22'), - (1512, 1, '管理员', '172.16.1.113', 58150, 'Chrome', 'Windows 7', 1, '2019-09-06 15:23:31', '2019-09-06 15:23:31'), - (1513, 1, '管理员', '172.16.1.166', 31226, 'Chrome', 'Windows 10', 1, '2019-09-06 15:24:51', '2019-09-06 15:24:51'), - (1514, 1, '管理员', '172.16.1.113', 58300, 'Chrome', 'Windows 7', 1, '2019-09-06 15:25:04', '2019-09-06 15:25:04'), - (1515, 1, '管理员', '172.16.1.113', 58300, 'Chrome', 'Windows 7', 1, '2019-09-06 15:25:26', '2019-09-06 15:25:26'), - (1516, 1, '管理员', '172.16.1.166', 31243, 'Chrome', 'Windows 10', 1, '2019-09-06 15:25:29', '2019-09-06 15:25:29'), - (1517, 1, '管理员', '172.16.1.221', 61458, 'Chrome', 'Windows 10', 1, '2019-09-06 15:27:07', '2019-09-06 15:27:07'), - (1518, 1, '管理员', '172.16.1.166', 31243, 'Chrome', 'Windows 10', 1, '2019-09-06 15:27:09', '2019-09-06 15:27:09'), - (1519, 1, '管理员', '172.16.1.113', 58300, 'Chrome', 'Windows 7', 1, '2019-09-06 15:27:10', '2019-09-06 15:27:10'), - (1520, 1, '管理员', '172.16.1.166', 31551, 'Chrome', 'Windows 10', 1, '2019-09-06 15:30:01', '2019-09-06 15:30:01'), - (1521, 1, '管理员', '172.16.4.160', 50527, 'Chrome', 'Windows 10', 1, '2019-09-06 15:50:20', '2019-09-06 15:50:20'), - (1522, 1, '管理员', '172.16.1.166', 36381, 'Chrome', 'Windows 10', 1, '2019-09-06 16:20:46', '2019-09-06 16:20:46'), - (1523, 1, '管理员', '172.16.1.166', 40039, 'Chrome', 'Windows 10', 1, '2019-09-06 17:02:33', '2019-09-06 17:02:33'), - (1524, 1, '管理员', '172.16.1.166', 41014, 'Chrome', 'Windows 10', 1, '2019-09-06 17:16:09', '2019-09-06 17:16:09'), - (1525, 1, '管理员', '172.16.1.188', 56577, 'Chrome', 'Windows 7', 1, '2019-09-07 08:36:31', '2019-09-07 08:36:31'), - (1526, 1, '管理员', '172.16.1.48', 60852, 'Chrome', 'Windows 10', 1, '2019-09-07 08:45:02', '2019-09-07 08:45:02'), - (1527, 1, '管理员', '172.16.4.85', 4818, 'Chrome', 'Windows 10', 1, '2019-09-07 09:04:44', '2019-09-07 09:04:44'), - (1528, 1, '管理员', '172.16.4.85', 5230, 'Chrome', 'Windows 10', 1, '2019-09-07 09:25:41', '2019-09-07 09:25:41'), - (1529, 1, '管理员', '172.16.1.166', 10251, 'Chrome', 'Windows 10', 1, '2019-09-07 10:15:20', '2019-09-07 10:15:20'), - (1530, 1, '管理员', '172.16.1.48', 63877, 'Chrome', 'Windows 10', 1, '2019-09-07 11:26:19', '2019-09-07 11:26:19'), - (1531, 1, '管理员', '172.16.1.166', 26667, 'Chrome', 'Windows 10', 1, '2019-09-07 14:08:15', '2019-09-07 14:08:15'), - (1532, 1, '管理员', '172.16.4.85', 10604, 'Chrome', 'Windows 10', 1, '2019-09-07 14:08:33', '2019-09-07 14:08:33'), - (1533, 1, '管理员', '172.16.4.85', 10604, 'Chrome', 'Windows 10', 1, '2019-09-07 14:08:50', '2019-09-07 14:08:50'), - (1534, 1, '管理员', '172.16.1.166', 26812, 'Chrome', 'Windows 10', 1, '2019-09-07 14:14:09', '2019-09-07 14:14:09'), - (1535, 1, '管理员', '172.16.1.188', 52924, 'Chrome', 'Windows 7', 1, '2019-09-07 14:37:16', '2019-09-07 14:37:16'), - (1536, 1, '管理员', '172.16.1.188', 56721, 'Chrome', 'Windows 7', 1, '2019-09-07 14:49:37', '2019-09-07 14:49:37'), - (1537, 1, '管理员', '172.16.1.188', 52839, 'Chrome', 'Windows 7', 1, '2019-09-07 15:33:04', '2019-09-07 15:33:04'), - (1538, 1, '管理员', '172.16.1.166', 32489, 'Chrome', 'Windows 10', 1, '2019-09-07 15:48:02', '2019-09-07 15:48:02'), - (1539, 1, '管理员', '172.16.1.166', 32847, 'Chrome', 'Windows 10', 1, '2019-09-07 15:52:25', '2019-09-07 15:52:25'), - (1540, 1, '管理员', '172.16.1.166', 33456, 'Chrome', 'Windows 10', 1, '2019-09-07 16:00:01', '2019-09-07 16:00:01'), - (1541, 1, '管理员', '172.16.1.188', 61015, 'Chrome', 'Windows 7', 1, '2019-09-07 17:05:49', '2019-09-07 17:05:49'), - (1542, 1, '管理员', '127.0.0.1', 51566, 'Chrome', 'Windows 7', 1, '2019-09-07 17:31:20', '2019-09-07 17:31:20'), - (1543, 1, '管理员', '127.0.0.1', 54228, 'Chrome', 'Windows 7', 1, '2019-09-07 17:41:12', '2019-09-07 17:41:12'), - (1544, 1, '管理员', '127.0.0.1', 54957, 'Chrome', 'Windows 7', 1, '2019-09-07 17:43:21', '2019-09-07 17:43:21'), - (1545, 1, '管理员', '172.16.4.85', 2336, 'Chrome', 'Windows 10', 1, '2019-09-07 18:25:51', '2019-09-07 18:25:51'), - (1546, 1, '管理员', '127.0.0.1', 52161, 'Chrome', 'Windows 7', 1, '2019-09-09 08:30:47', '2019-09-09 08:30:47'), - (1547, 1, '管理员', '172.16.4.85', 5903, 'Chrome', 'Windows 10', 1, '2019-09-09 08:47:47', '2019-09-09 08:47:47'), - (1548, 1, '管理员', '172.16.1.243', 55673, 'Chrome', 'Windows 10', 1, '2019-09-09 11:25:02', '2019-09-09 11:25:02'), - (1549, 1, '管理员', '172.16.4.85', 4672, 'Chrome', 'Windows 10', 1, '2019-09-09 11:25:34', '2019-09-09 11:25:34'), - (1550, 1, '管理员', '172.16.1.188', 61186, 'Chrome', 'Windows 7', 1, '2019-09-09 11:39:24', '2019-09-09 11:39:24'), - (1551, 1, '管理员', '172.16.4.85', 3032, 'Chrome', 'Windows 10', 1, '2019-09-09 14:17:53', '2019-09-09 14:17:53'), - (1552, 1, '管理员', '172.16.4.85', 5829, 'Chrome', 'Windows 10', 1, '2019-09-09 14:54:27', '2019-09-09 14:54:27'), - (1553, 1, '管理员', '172.16.1.166', 23398, 'Chrome', 'Windows 10', 1, '2019-09-09 15:06:50', '2019-09-09 15:06:50'), - (1554, 1, '管理员', '172.16.5.60', 61094, 'Chrome', 'Windows 10', 1, '2019-09-09 15:20:50', '2019-09-09 15:20:50'), - (1555, 1, '管理员', '172.16.4.85', 10566, 'Chrome', 'Windows 10', 1, '2019-09-09 15:51:22', '2019-09-09 15:51:22'), - (1556, 1, '管理员', '172.16.1.166', 32190, 'Chrome', 'Windows 10', 1, '2019-09-09 17:00:59', '2019-09-09 17:00:59'), - (1557, 1, '管理员', '172.16.5.60', 54502, 'Chrome', 'Windows 10', 1, '2019-09-10 09:10:48', '2019-09-10 09:10:48'), - (1558, 1, '管理员', '172.16.4.85', 10659, 'Chrome', 'Windows 10', 1, '2019-09-10 09:21:48', '2019-09-10 09:21:48'), - (1559, 1, '管理员', '172.16.4.85', 3363, 'Chrome', 'Windows 10', 1, '2019-09-10 10:56:23', '2019-09-10 10:56:23'), - (1560, 1, '管理员', '172.16.4.85', 4460, 'Chrome', 'Windows 10', 1, '2019-09-10 14:23:44', '2019-09-10 14:23:44'), - (1561, 1, '管理员', '172.16.4.85', 7344, 'Chrome', 'Windows 10', 1, '2019-09-10 14:59:52', '2019-09-10 14:59:52'), - (1562, 1, '管理员', '172.16.5.89', 49996, 'Chrome', 'Windows 10', 1, '2019-09-10 18:08:04', '2019-09-10 18:08:04'), - (1563, 1, '管理员', '172.16.1.38', 50152, 'Chrome', 'Windows 10', 1, '2019-09-11 10:19:27', '2019-09-11 10:19:27'), - (1564, 1, '管理员', '172.16.1.38', 50173, 'Chrome', 'Windows 10', 1, '2019-09-11 10:20:38', '2019-09-11 10:20:38'), - (1565, 1, '管理员', '172.16.4.141', 60881, 'Chrome', 'Windows 10', 1, '2019-09-11 14:52:02', '2019-09-11 14:52:02'), - (1566, 1, '管理员', '172.16.4.93', 52688, 'Chrome', 'Windows 10', 1, '2019-09-11 15:15:14', '2019-09-11 15:15:14'), - (1567, 1, '管理员', '172.16.5.127', 54993, 'Chrome', 'Windows 10', 1, '2019-09-12 14:29:58', '2019-09-12 14:29:58'), - (1568, 1, '管理员', '172.16.5.127', 57424, 'Chrome', 'Windows 10', 1, '2019-09-12 15:26:46', '2019-09-12 15:26:46'), - (1569, 1, '管理员', '172.16.5.127', 58073, 'Chrome', 'Windows 10', 1, '2019-09-12 15:41:54', '2019-09-12 15:41:54'), - (1570, 1, '管理员', '172.16.5.146', 63230, 'Chrome', 'Windows 10', 1, '2019-09-16 10:17:15', '2019-09-16 10:17:15'), - (1571, 1, '管理员', '172.16.5.146', 52857, 'Chrome', 'Windows 10', 1, '2019-09-16 11:17:18', '2019-09-16 11:17:18'), - (1572, 1, '管理员', '172.16.1.190', 64527, 'Chrome', 'Windows 10', 1, '2019-09-19 14:06:45', '2019-09-19 14:06:45'), - (1573, 1, '管理员', '127.0.0.1', 53267, 'Chrome', 'Windows 7', 1, '2019-09-20 17:24:33', '2019-09-20 17:24:33'), - (1574, 1, '管理员', '127.0.0.1', 53267, 'Chrome', 'Windows 7', 1, '2019-09-20 17:24:43', '2019-09-20 17:24:43'), - (1575, 1, '管理员', '127.0.0.1', 53267, 'Chrome', 'Windows 7', 1, '2019-09-20 17:24:59', '2019-09-20 17:24:59'), - (1576, 1, '管理员', '127.0.0.1', 53267, 'Chrome', 'Windows 7', 1, '2019-09-20 17:26:05', '2019-09-20 17:26:05'), - (1577, 1, '管理员', '127.0.0.1', 60612, 'Chrome', 'Windows 7', 1, '2019-09-20 17:56:06', '2019-09-20 17:56:06'), - (1578, 1, '管理员', '172.16.1.202', 58066, 'Chrome', 'Windows 7', 1, '2019-09-22 18:25:03', '2019-09-22 18:25:03'), - (1579, 1, '管理员', '172.16.1.48', 52290, 'Chrome', 'Windows 10', 1, '2019-09-23 16:01:16', '2019-09-23 16:01:16'), - (1580, 1, '管理员', '172.16.4.141', 60997, 'Chrome', 'Windows 10', 1, '2019-09-23 17:16:55', '2019-09-23 17:16:55'), - (1581, 1, '管理员', '172.16.5.146', 53246, 'Chrome', 'Windows 10', 1, '2019-09-23 17:54:14', '2019-09-23 17:54:14'), - (1582, 1, '管理员', '127.0.0.1', 51987, 'Chrome', 'Windows 7', 1, '2019-09-24 09:16:37', '2019-09-24 09:16:37'), - (1583, 1, '管理员', '172.16.1.202', 55724, 'Chrome', 'Windows 7', 1, '2019-09-24 12:57:39', '2019-09-24 12:57:39'), - (1584, 1, '管理员', '172.16.1.166', 51876, 'Chrome', 'Windows 10', 1, '2019-09-24 16:24:37', '2019-09-24 16:24:37'), - (1585, 1, '管理员', '172.16.1.202', 51648, 'Chrome', 'Windows 7', 1, '2019-09-24 19:26:39', '2019-09-24 19:26:39'), - (1586, 1, '管理员', '172.16.1.234', 60984, 'Chrome', 'Windows 10', 1, '2019-09-26 10:52:07', '2019-09-26 10:52:07'), - (1587, 1, '管理员', '172.16.1.234', 63440, 'Chrome', 'Windows 10', 1, '2019-09-26 11:30:54', '2019-09-26 11:30:54'), - (1588, 1, '管理员', '172.16.1.202', 51956, 'Chrome', 'Windows 7', 1, '2019-09-27 20:55:08', '2019-09-27 20:55:08'), - (1589, 1, '管理员', '172.16.1.48', 56166, 'Chrome', 'Windows 10', 1, '2019-09-30 08:59:13', '2019-09-30 08:59:13'), - (1590, 1, '管理员', '172.16.1.202', 51448, 'Chrome', 'Windows 7', 1, '2019-09-30 09:00:13', '2019-09-30 09:00:13'), - (1591, 1, '管理员', '172.16.1.188', 62679, 'Chrome', 'Windows 7', 1, '2019-10-15 11:25:26', '2019-10-15 11:25:26'), - (1592, 1, '管理员', '172.16.1.234', 54034, 'Chrome', 'Windows 10', 1, '2019-10-18 10:47:14', '2019-10-18 10:47:14'), - (1593, 1, '管理员', '172.16.1.234', 64515, 'Chrome', 'Windows 10', 1, '2019-10-18 13:32:10', '2019-10-18 13:32:10'), - (1594, 1, '管理员', '172.16.1.234', 50211, 'Chrome', 'Windows 10', 1, '2019-10-18 13:56:19', '2019-10-18 13:56:19'), - (1595, 1, '管理员', '172.16.1.234', 55469, 'Chrome', 'Windows 10', 1, '2019-10-18 14:56:24', '2019-10-18 14:56:24'), - (1596, 1, '管理员', '172.16.1.234', 56392, 'Chrome', 'Windows 10', 1, '2019-10-18 15:08:25', '2019-10-18 15:08:25'), - (1597, 1, '管理员', '172.16.1.234', 60896, 'Chrome', 'Windows 10', 1, '2019-10-18 16:14:15', '2019-10-18 16:14:15'), - (1598, 1, '管理员', '172.16.1.234', 50590, 'Chrome', 'Windows 10', 1, '2019-10-19 08:38:54', '2019-10-19 08:38:54'), - (1599, 1, '管理员', '172.16.1.166', 4879, 'Chrome', 'Windows 10', 1, '2019-10-19 09:19:08', '2019-10-19 09:19:08'), - (1600, 1, '管理员', '172.16.1.188', 62895, 'Chrome', 'Windows 7', 1, '2019-10-19 13:49:29', '2019-10-19 13:49:29'), - (1601, 1, '管理员', '172.16.1.234', 58144, 'Chrome', 'Windows 10', 1, '2019-10-19 14:55:50', '2019-10-19 14:55:50'), - (1602, 1, '管理员', '127.0.0.1', 61033, 'Chrome', 'Windows 7', 1, '2019-10-19 15:19:38', '2019-10-19 15:19:38'), - (1603, 1, '管理员', '172.16.1.188', 58944, 'Chrome', 'Windows 7', 1, '2019-10-19 16:48:49', '2019-10-19 16:48:49'), - (1604, 1, '管理员', '172.16.1.188', 63950, 'Chrome', 'Windows 7', 1, '2019-10-21 08:10:38', '2019-10-21 08:10:38'), - (1605, 1, '管理员', '172.16.1.188', 64899, 'Chrome', 'Windows 7', 1, '2019-10-21 08:17:40', '2019-10-21 08:17:40'), - (1606, 1, '管理员', '172.16.1.221', 53180, 'Chrome', 'Windows 10', 1, '2019-10-21 15:52:36', '2019-10-21 15:52:36'), - (1607, 1, '管理员', '172.16.1.221', 56067, 'Chrome', 'Windows 10', 1, '2019-10-23 10:19:39', '2019-10-23 10:19:39'), - (1608, 1, '管理员', '172.16.1.221', 57692, 'Chrome', 'Windows 10', 1, '2019-10-23 16:36:39', '2019-10-23 16:36:39'), - (1609, 1, '管理员', '172.16.1.188', 57180, 'Chrome', 'Windows 7', 1, '2019-10-24 08:26:21', '2019-10-24 08:26:21'), - (1610, 1, '管理员', '172.16.0.196', 61409, 'Chrome', 'Windows 10', 1, '2019-10-24 08:26:55', '2019-10-24 08:26:55'), - (1611, 1, '管理员', '172.16.1.234', 51906, 'Chrome', 'Windows 10', 1, '2019-10-24 15:56:50', '2019-10-24 15:56:50'), - (1612, 1, '管理员', '172.16.1.234', 56793, 'Chrome', 'Windows 10', 1, '2019-10-24 17:04:54', '2019-10-24 17:04:54'), - (1613, 30, '耿为刚', '172.16.1.234', 60368, 'Chrome', 'Windows 10', 1, '2019-10-24 17:51:13', '2019-10-24 17:51:13'), - (1614, 1, '管理员', '172.16.1.234', 60368, 'Chrome', 'Windows 10', 1, '2019-10-24 17:51:56', '2019-10-24 17:51:56'), - (1615, 30, '耿为刚', '172.16.1.234', 60589, 'Chrome 65', 'Windows 10', 1, '2019-10-24 17:52:52', '2019-10-24 17:52:52'), - (1616, 1, '管理员', '172.16.1.234', 52998, 'Chrome', 'Windows 10', 1, '2019-10-25 09:28:13', '2019-10-25 09:28:13'), - (1617, 1, '管理员', '172.16.1.234', 54948, 'Chrome', 'Windows 10', 1, '2019-10-25 10:01:34', '2019-10-25 10:01:34'), - (1618, 1, '管理员', '172.16.1.234', 56800, 'Chrome', 'Windows 10', 1, '2019-10-25 10:32:53', '2019-10-25 10:32:53'), - (1619, 1, '管理员', '127.0.0.1', 59071, 'Chrome', 'Windows 7', 1, '2019-10-28 16:05:21', '2019-10-28 16:05:21'), - (1620, 1, '管理员', '127.0.0.1', 60106, 'Chrome', 'Windows 7', 1, '2019-10-28 16:11:29', '2019-10-28 16:11:29'), - (1621, 1, '管理员', '127.0.0.1', 63479, 'Chrome', 'Windows 7', 1, '2019-10-28 16:28:59', '2019-10-28 16:28:59'), - (1622, 1, '管理员', '127.0.0.1', 63479, 'Chrome', 'Windows 7', 1, '2019-10-28 16:29:55', '2019-10-28 16:29:55'), - (1623, 1, '管理员', '127.0.0.1', 57588, 'Chrome', 'Windows 7', 1, '2019-10-29 15:37:03', '2019-10-29 15:37:03'), - (1741, 1, '管理员', '127.0.0.1', 54621, 'Chrome', 'Windows 7', 1, '2019-11-16 18:03:45', '2019-11-16 18:03:45'), - (1742, 1, '管理员', '127.0.0.1', 60932, 'Chrome 8', 'Windows 10', 1, '2020-12-14 15:14:55', '2020-12-14 15:14:55'); -/*!40000 ALTER TABLE `t_user_login_log` ENABLE KEYS */; - --- 导出 表 smart-admin-dev.t_user_operate_log 结构 -DROP TABLE IF EXISTS `t_user_operate_log`; -CREATE TABLE IF NOT EXISTS `t_user_operate_log` ( - `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', - `user_id` int NOT NULL COMMENT '用户id', - `user_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户名称', - `module` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '操作模块', - `content` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '操作内容', - `url` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '请求路径', - `method` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '请求方法', - `param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '请求参数', - `result` tinyint DEFAULT NULL COMMENT '请求结果 0失败 1成功', - `fail_reason` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '失败原因', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=75 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - --- 正在导出表 smart-admin-dev.t_user_operate_log 的数据:~32 rows (大约) -DELETE FROM `t_user_operate_log`; -/*!40000 ALTER TABLE `t_user_operate_log` DISABLE KEYS */; -INSERT INTO `t_user_operate_log` (`id`, `user_id`, `user_name`, `module`, `content`, `url`, `method`, `param`, `result`, `fail_reason`, `update_time`, `create_time`) VALUES - (1, 1, '管理员', '管理端-角色权限', '获取角色可选的功能权限', '/smart-admin-api/privilege/listPrivilegeByRoleId/0', 'com.gangquan360.smartadmin.module.role.roleprivilege.RolePrivilegeController.listPrivilegeByRoleId', 'Long[0]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (2, 1, '管理员', '管理端-角色', '获取所有角色', '/smart-admin-api/role/getAll', 'com.gangquan360.smartadmin.module.role.basic.RoleController.getAllRole', '', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (3, 1, '管理员', '管理端-角色权限', '获取角色可选的功能权限', '/smart-admin-api/privilege/listPrivilegeByRoleId/1', 'com.gangquan360.smartadmin.module.role.roleprivilege.RolePrivilegeController.listPrivilegeByRoleId', 'Long[1]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (4, 1, '管理员', '管理端-岗位', '分页查询所有岗位', '/smart-admin-api/position/getListPage', 'com.gangquan360.smartadmin.module.position.PositionController.getJobPage', 'PositionQueryDTO[{"pageNum":1,"pageSize":10,"positionName":"","searchCount":true,"sort":false}]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (5, 1, '管理员', '管理端-角色', '获取所有角色', '/smart-admin-api/role/getAll', 'com.gangquan360.smartadmin.module.role.basic.RoleController.getAllRole', '', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (6, 1, '管理员', '管理端-部门', '根据部门名称查询部门及员工列表', '/smart-admin-api/department/listEmployeeByDepartmentName', 'com.gangquan360.smartadmin.module.department.DepartmentController.listDepartmentEmployee', 'String[""]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (7, 1, '管理员', '管理端-部门', '查询部门及员工列表', '/smart-admin-api/department/listEmployee', 'com.gangquan360.smartadmin.module.department.DepartmentController.listDepartmentEmployee', '', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (8, 1, '管理员', '管理端-用户', '员工管理查询', '/smart-admin-api/employee/query', 'com.gangquan360.smartadmin.module.employee.EmployeeController.query', 'EmployeeQueryDTO[{"isDelete":0,"isDisabled":0,"keyword":"","pageNum":1,"pageSize":10}]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (9, 1, '管理员', '管理端-用户', '员工重置密码', '/smart-admin-api/employee/resetPasswd/29', 'com.gangquan360.smartadmin.module.employee.EmployeeController.resetPasswd', 'Integer[29]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (10, 1, '管理员', '管理端-用户', '员工管理查询', '/smart-admin-api/employee/query', 'com.gangquan360.smartadmin.module.employee.EmployeeController.query', 'EmployeeQueryDTO[{"isDelete":0,"isDisabled":0,"keyword":"","pageNum":1,"pageSize":10}]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (11, 1, '管理员', '管理端-角色用户', '通过员工id获取所有角色以及员工具有的角色', '/smart-admin-api/role/getRoles/29', 'com.gangquan360.smartadmin.module.role.roleemployee.RoleEmployeeController.getRoleByEmployeeId', 'Long[29]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (12, 1, '管理员', '管理端-用户', '单个员工角色授权', '/smart-admin-api/employee/updateRoles', 'com.gangquan360.smartadmin.module.employee.EmployeeController.updateRoles', 'EmployeeUpdateRolesDTO[{"employeeId":29,"roleIds":[34,45]}]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (13, 1, '管理员', '管理端-用户', '员工管理查询', '/smart-admin-api/employee/query', 'com.gangquan360.smartadmin.module.employee.EmployeeController.query', 'EmployeeQueryDTO[{"isDelete":0,"isDisabled":0,"keyword":"","pageNum":1,"pageSize":10}]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (14, 1, '管理员', '管理端-角色权限', '更新角色权限', '/smart-admin-api/privilege/updateRolePrivilege', 'com.gangquan360.smartadmin.module.role.roleprivilege.RolePrivilegeController.updateRolePrivilege', 'RolePrivilegeDTO[{"privilegeKeyList":["Employee","RoleManage","PositionList","RoleEmployeeManage","SystemSetting","SystemConfig","SystemPrivilege","Notice","NoticeList","PersonNotice","Email","EmailList","SendMail","UserLog","UserOperateLog","UserLoginLog","Monitor","OnlineUser","Sql","Task","TaskList","Reload","SmartReloadList","ApiDoc","Swagger","ThreeRouter","LevelTwo","RoleOneTwo","RoleTwoTwo","RoleOneOne","KeepAlive","KeepAliveContentList","KeepAliveAddContent","HeartBeat","HeartBeatList","File","FileList","add-role","delete-role","update-role","update-role-privilege","add-employee-role","search-employee-list","delete-employee-role","delete-employee-role-batch","query-data-scope","update-data-scope","search-position","add-position","update-position","delete-position","add-department","update-department","delete-department","search-department","add-employee","update-employee","disabled-employee","disabled-employee-batch","update-employee-role","reset-employee-password","delete-employee","system-params-search","system-params-add","system-config-update","system-config-search","privilege-main-update","privilege-main-search","notice-query","notice-add","notice-edit","notice-delete","notice-detail","notice-send","person-notice-query","person-notice-detail","email-query","email-add","email-update","email-delete","email-send","user-operate-log-search","user-operate-log-detail","user-operate-log-delete","user-login-log-search","user-login-log-delete","online-user-search","task-search","task-refresh","task-add","task-update","task-pause","task-resume","task-run","task-query-log","task-delete","smart-reload-search","smart-reload-update","smart-reload-result","heart-beat-query","file-filePage-query","file-filePage-upload"],"roleId":1}]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (15, 1, '管理员', '管理端-角色权限', '获取角色可选的功能权限', '/smart-admin-api/privilege/listPrivilegeByRoleId/1', 'com.gangquan360.smartadmin.module.role.roleprivilege.RolePrivilegeController.listPrivilegeByRoleId', 'Long[1]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (16, 1, '管理员', '管理端-系统配置', '分页查询所有系统配置', '/smart-admin-api/systemConfig/getListPage', 'com.gangquan360.smartadmin.module.systemconfig.SystemConfigController.getSystemConfigPage', 'SystemConfigQueryDTO[{"key":"","pageNum":1,"pageSize":10}]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (17, 1, '管理员', '管理端-系统配置', '修改配置参数', '/smart-admin-api/systemConfig/update', 'com.gangquan360.smartadmin.module.systemconfig.SystemConfigController.updateSystemConfig', 'SystemConfigUpdateDTO[{"configGroup":"upload","configKey":"ali_oss","configName":"阿里云上传配置","configValue":"{\\"accessKeyId\\":\\"\\",\\"accessKeySecret\\":\\"\\",\\"bucketName\\":\\"sit\\",\\"endpoint\\":\\"http://oss-cn-beijing.aliyuncs.com\\"}","id":14,"remark":"eefwfwfds"}]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (18, 1, '管理员', '管理端-系统配置', '分页查询所有系统配置', '/smart-admin-api/systemConfig/getListPage', 'com.gangquan360.smartadmin.module.systemconfig.SystemConfigController.getSystemConfigPage', 'SystemConfigQueryDTO[{"key":"","pageNum":1,"pageSize":10}]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (19, 1, '管理员', '管理端-系统配置', '修改配置参数', '/smart-admin-api/systemConfig/update', 'com.gangquan360.smartadmin.module.systemconfig.SystemConfigController.updateSystemConfig', 'SystemConfigUpdateDTO[{"configGroup":"upload","configKey":"qi_niu_oss","configName":"七牛云上传配置","configValue":"{\\"accessKeyId\\":\\"rX7HgY1ZLpUD25JrA-uwMM_jj-\\",\\"accessKeySecret\\":\\"\\",\\"bucketName\\":\\"sun-smart-admin\\",\\"endpoint\\":\\"http://puvpyay08.bkt.clouddn.com\\"}","id":16}]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (20, 1, '管理员', '管理端-系统配置', '分页查询所有系统配置', '/smart-admin-api/systemConfig/getListPage', 'com.gangquan360.smartadmin.module.systemconfig.SystemConfigController.getSystemConfigPage', 'SystemConfigQueryDTO[{"key":"","pageNum":1,"pageSize":10}]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (21, 1, '管理员', '通用-权限', '获取所有请求路径', '/smart-admin-api/privilege/getAllUrl', 'com.gangquan360.smartadmin.module.privilege.controller.PrivilegeController.getAllUrl', '', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (22, 1, '管理员', '通用-权限', '查询所有菜单项', '/smart-admin-api/privilege/menu/queryAll', 'com.gangquan360.smartadmin.module.privilege.controller.PrivilegeController.queryAll', '', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (23, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/FileList', 'com.gangquan360.smartadmin.module.privilege.controller.PrivilegeController.functionQuery', 'String["FileList"]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (24, 1, '管理员', '通用-权限', '保存更新功能点', '/smart-admin-api/privilege/function/saveOrUpdate', 'com.gangquan360.smartadmin.module.privilege.controller.PrivilegeController.functionSaveOrUpdate', 'PrivilegeFunctionDTO[{"functionKey":"file-filePage-download","functionName":"下载","menuKey":"FileList","sort":2,"url":"fileController.downLoadById"}]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (25, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/FileList', 'com.gangquan360.smartadmin.module.privilege.controller.PrivilegeController.functionQuery', 'String["FileList"]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (26, 1, '管理员', '通用-邮件发送', '分页查询', '/smart-admin-api/email/page/query', 'com.gangquan360.smartadmin.module.email.EmailController.queryByPage', 'EmailQueryDTO[{"endDate":"","pageNum":1,"pageSize":10,"searchCount":true,"startDate":""}]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (27, 1, '管理员', '管理端-用户操作日志', '分页查询', '/smart-admin-api/userOperateLog/page/query', 'com.gangquan360.smartadmin.module.log.useroperatelog.UserOperateLogController.queryByPage', 'UserOperateLogQueryDTO[{"endDate":"","pageNum":1,"pageSize":10,"searchCount":true,"sort":false,"startDate":"","userName":""}]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (28, 1, '管理员', '管理端-用户登录日志', '分页查询用户登录日志', '/smart-admin-api/userLoginLog/page/query', 'com.gangquan360.smartadmin.module.log.userloginlog.UserLoginLogController.queryByPage', 'UserLoginLogQueryDTO[{"endDate":"","pageNum":1,"pageSize":10,"searchCount":true,"sort":false,"startDate":"","userName":""}]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (29, 1, '管理员', '管理端-用户登录日志', '查询员工在线状态', '/smart-admin-api/userOnLine/query', 'com.gangquan360.smartadmin.module.log.userloginlog.UserLoginLogController.queryUserOnLine', 'EmployeeQueryDTO[{"actualName":"","employeeIds":[1],"isDelete":0,"pageNum":1,"pageSize":10}]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (30, 1, '管理员', '管理端-任务调度', '查询任务', '/smart-admin-api/quartz/task/query', 'com.gangquan360.smartadmin.module.quartz.controller.QuartzController.query', 'QuartzQueryDTO[{"pageNum":1,"pageSize":10}]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (31, 1, '管理员', '管理端-smart reload', '获取全部Smart-reload项', '/smart-admin-api/smartReload/all', 'com.gangquan360.smartadmin.module.smartreload.SmartReloadController.listAllReloadItem', '', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (32, 1, '管理员', '通用-心跳服务', '查询心跳记录 @author zhuoda', '/smart-admin-api/heartBeat/query', 'com.gangquan360.smartadmin.module.heartbeat.HeartBeatController.query', 'PageParamDTO[{"pageNum":1,"pageSize":10}]', 1, NULL, '2019-11-01 00:00:00', '2019-11-01 00:00:00'), - (33, 1, '管理员', '通用-权限', '获取所有请求路径', '/smart-admin-api/privilege/getAllUrl', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.getAllUrl', '', 1, NULL, '2020-12-14 15:15:06', '2020-12-14 15:15:06'), - (34, 1, '管理员', '通用-权限', '查询所有菜单项', '/smart-admin-api/privilege/menu/queryAll', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.queryAll', '', 1, NULL, '2020-12-14 15:15:06', '2020-12-14 15:15:06'), - (35, 1, '管理员', '通用-权限', '菜单批量保存', '/smart-admin-api/privilege/menu/batchSaveMenu', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.menuBatchSave', 'ValidateList[[{"menuKey":"Business","menuName":"业务功能","sort":0,"type":1,"url":"/business"},{"menuKey":"Peony","menuName":"牡丹管理","parentKey":"Business","sort":0,"type":1,"url":"/peony"},{"menuKey":"PeonyList","menuName":"牡丹花列表","parentKey":"Peony","sort":0,"type":1,"url":"/peony/peony-list"},{"menuKey":"PeonyList1","menuName":"牡丹花列表1","parentKey":"Peony","sort":0,"type":1,"url":"/peony/peony-list1"},{"menuKey":"Email","menuName":"邮件管理","parentKey":"Business","sort":0,"type":1,"url":"/email"},{"menuKey":"EmailList","menuName":"邮件管理","parentKey":"Email","sort":0,"type":1,"url":"/email/email-list"},{"menuKey":"SendMail","menuName":"发送邮件","parentKey":"Email","sort":0,"type":1,"url":"/email/send-mail"},{"menuKey":"KeepAlive","menuName":"KeepAlive","parentKey":"Business","sort":0,"type":1,"url":"/keep-alive"},{"menuKey":"KeepAliveContentList","menuName":"KeepAlive列表","parentKey":"KeepAlive","sort":0,"type":1,"url":"/keep-alive/content-list"},{"menuKey":"KeepAliveAddContent","menuName":"KeepAlive表单","parentKey":"KeepAlive","sort":0,"type":1,"url":"/keep-alive/add-content"},{"menuKey":"Notice","menuName":"消息管理","parentKey":"Business","sort":0,"type":1,"url":"/notice"},{"menuKey":"NoticeList","menuName":"通知管理","parentKey":"Notice","sort":0,"type":1,"url":"/notice/notice-list"},{"menuKey":"PersonNotice","menuName":"个人消息","parentKey":"Notice","sort":0,"type":1,"url":"/notice/person-notice"},{"menuKey":"NoticeDetail","menuName":"消息详情","parentKey":"Notice","sort":0,"type":1,"url":"/notice/notice-detail"},{"menuKey":"ThreeRouter","menuName":"三级路由","parentKey":"Business","sort":0,"type":1,"url":"/three-router"},{"menuKey":"LevelTwo","menuName":"三级菜单","parentKey":"ThreeRouter","sort":0,"type":1,"url":"/three-router/level-two"},{"menuKey":"ThreeLevelRouterView","menuName":"三级菜单子颗粒","parentKey":"LevelTwo","sort":0,"type":1,"url":"/three-router/level-two/level-three1"},{"menuKey":"RoleTwoTwo","menuName":"三级菜单子哈","parentKey":"LevelTwo","sort":0,"type":1,"url":"/three-router/level-two/level-three2"},{"menuKey":"RoleOneOne","menuName":"二级菜单","parentKey":"ThreeRouter","sort":0,"type":1,"url":"/three-router/level-two2"},{"menuKey":"System","menuName":"系统设置","sort":0,"type":1,"url":"/system"},{"menuKey":"Employee","menuName":"人员管理","parentKey":"System","sort":0,"type":1,"url":"/employee"},{"menuKey":"RoleManage","menuName":"角色管理","parentKey":"Employee","sort":0,"type":1,"url":"/employee/role"},{"menuKey":"PositionList","menuName":"岗位管理","parentKey":"Employee","sort":0,"type":1,"url":"/employee/position"},{"menuKey":"RoleEmployeeManage","menuName":"员工管理","parentKey":"Employee","sort":0,"type":1,"url":"/employee/role-employee-manage"},{"menuKey":"File","menuName":"文件服务","parentKey":"System","sort":0,"type":1,"url":"/file"},{"menuKey":"FileList","menuName":"文件列表","parentKey":"File","sort":0,"type":1,"url":"/file/file-list"},{"menuKey":"UserLog","menuName":"用户日志","parentKey":"System","sort":0,"type":1,"url":"/user-log"},{"menuKey":"UserOperateLog","menuName":"用户操作日志","parentKey":"UserLog","sort":0,"type":1,"url":"/user-log/user-operate-log"},{"menuKey":"UserLoginLog","menuName":"用户登录日志","parentKey":"UserLog","sort":0,"type":1,"url":"/user-log/user-login-log"},{"menuKey":"SystemSetting","menuName":"系统设置","parentKey":"System","sort":0,"type":1,"url":"/system-setting"},{"menuKey":"SystemConfig","menuName":"系统参数","parentKey":"SystemSetting","sort":0,"type":1,"url":"/system-setting/system-config"},{"menuKey":"SystemPrivilege","menuName":"菜单设置","parentKey":"SystemSetting","sort":0,"type":1,"url":"/system-setting/system-privilege"},{"menuKey":"Support","menuName":"开发专用","sort":0,"type":1,"url":"/support"},{"menuKey":"ApiDoc","menuName":"接口文档","parentKey":"Support","sort":0,"type":1,"url":"/api-doc"},{"menuKey":"Swagger","menuName":"Swagger接口文档","parentKey":"ApiDoc","sort":0,"type":1,"url":"/api-doc/swagger"},{"menuKey":"HeartBeat","menuName":"心跳服务","parentKey":"Support","sort":0,"type":1,"url":"/heart-beat"},{"menuKey":"HeartBeatList","menuName":"心跳服务","parentKey":"HeartBeat","sort":0,"type":1,"url":"/heart-beat/heart-beat-list"},{"menuKey":"Monitor","menuName":"系统监控","parentKey":"Support","sort":0,"type":1,"url":"/monitor"},{"menuKey":"OnlineUser","menuName":"在线人数","parentKey":"Monitor","sort":0,"type":1,"url":"/monitor/online-user"},{"menuKey":"Sql","menuName":"SQL监控","parentKey":"Monitor","sort":0,"type":1,"url":"/monitor/sql"},{"menuKey":"Reload","menuName":"动态加载","parentKey":"Support","sort":0,"type":1,"url":"/reload"},{"menuKey":"SmartReloadList","menuName":"SmartReload","parentKey":"Reload","sort":0,"type":1,"url":"/reload/smart-reload-list"},{"menuKey":"Task","menuName":"定时任务","parentKey":"Support","sort":0,"type":1,"url":"/task"},{"menuKey":"TaskList","menuName":"任务管理","parentKey":"Task","sort":0,"type":1,"url":"/system-setting/task-list"}]]', 1, NULL, '2020-12-14 15:15:07', '2020-12-14 15:15:07'), - (36, 1, '管理员', '通用-权限', '查询所有菜单项', '/smart-admin-api/privilege/menu/queryAll', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.queryAll', '', 1, NULL, '2020-12-14 15:15:07', '2020-12-14 15:15:07'), - (37, 1, '管理员', '管理端-用户登录', '获取session', '/smart-admin-api/session/get', 'net.lab1024.smartadmin.module.system.login.LoginController.getSession', '', 1, NULL, '2020-12-14 15:15:29', '2020-12-14 15:15:29'), - (38, 1, '管理员', '通用-权限', '获取所有请求路径', '/smart-admin-api/privilege/getAllUrl', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.getAllUrl', '', 1, NULL, '2020-12-14 15:16:25', '2020-12-14 15:16:25'), - (39, 1, '管理员', '通用-权限', '查询所有菜单项', '/smart-admin-api/privilege/menu/queryAll', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.queryAll', '', 1, NULL, '2020-12-14 15:16:25', '2020-12-14 15:16:25'), - (40, 1, '管理员', '通用-权限', '菜单批量保存', '/smart-admin-api/privilege/menu/batchSaveMenu', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.menuBatchSave', 'ValidateList[[{"menuKey":"Business","menuName":"业务功能","sort":0,"type":1,"url":"/business"},{"menuKey":"Peony","menuName":"牡丹管理","parentKey":"Business","sort":1,"type":1,"url":"/peony"},{"menuKey":"PeonyList","menuName":"牡丹花列表","parentKey":"Peony","sort":2,"type":1,"url":"/peony/peony-list"},{"menuKey":"PeonyList1","menuName":"牡丹花列表1","parentKey":"Peony","sort":3,"type":1,"url":"/peony/peony-list1"},{"menuKey":"Email","menuName":"邮件管理","parentKey":"Business","sort":4,"type":1,"url":"/email"},{"menuKey":"EmailList","menuName":"邮件管理","parentKey":"Email","sort":5,"type":1,"url":"/email/email-list"},{"menuKey":"SendMail","menuName":"发送邮件","parentKey":"Email","sort":6,"type":1,"url":"/email/send-mail"},{"menuKey":"KeepAlive","menuName":"KeepAlive","parentKey":"Business","sort":7,"type":1,"url":"/keep-alive"},{"menuKey":"KeepAliveContentList","menuName":"KeepAlive列表","parentKey":"KeepAlive","sort":8,"type":1,"url":"/keep-alive/content-list"},{"menuKey":"KeepAliveAddContent","menuName":"KeepAlive表单","parentKey":"KeepAlive","sort":9,"type":1,"url":"/keep-alive/add-content"},{"menuKey":"Notice","menuName":"消息管理","parentKey":"Business","sort":10,"type":1,"url":"/notice"},{"menuKey":"NoticeList","menuName":"通知管理","parentKey":"Notice","sort":11,"type":1,"url":"/notice/notice-list"},{"menuKey":"PersonNotice","menuName":"个人消息","parentKey":"Notice","sort":12,"type":1,"url":"/notice/person-notice"},{"menuKey":"NoticeDetail","menuName":"消息详情","parentKey":"Notice","sort":13,"type":1,"url":"/notice/notice-detail"},{"menuKey":"ThreeRouter","menuName":"三级路由","parentKey":"Business","sort":14,"type":1,"url":"/three-router"},{"menuKey":"LevelTwo","menuName":"三级菜单","parentKey":"ThreeRouter","sort":15,"type":1,"url":"/three-router/level-two"},{"menuKey":"ThreeLevelRouterView","menuName":"三级菜单子颗粒","parentKey":"LevelTwo","sort":16,"type":1,"url":"/three-router/level-two/level-three1"},{"menuKey":"RoleTwoTwo","menuName":"三级菜单子哈","parentKey":"LevelTwo","sort":17,"type":1,"url":"/three-router/level-two/level-three2"},{"menuKey":"RoleOneOne","menuName":"二级菜单","parentKey":"ThreeRouter","sort":18,"type":1,"url":"/three-router/level-two2"},{"menuKey":"System","menuName":"系统设置","sort":19,"type":1,"url":"/system"},{"menuKey":"Employee","menuName":"人员管理","parentKey":"System","sort":20,"type":1,"url":"/employee"},{"menuKey":"RoleManage","menuName":"角色管理","parentKey":"Employee","sort":21,"type":1,"url":"/employee/role"},{"menuKey":"PositionList","menuName":"岗位管理","parentKey":"Employee","sort":22,"type":1,"url":"/employee/position"},{"menuKey":"RoleEmployeeManage","menuName":"员工管理","parentKey":"Employee","sort":23,"type":1,"url":"/employee/role-employee-manage"},{"menuKey":"File","menuName":"文件服务","parentKey":"System","sort":24,"type":1,"url":"/file"},{"menuKey":"FileList","menuName":"文件列表","parentKey":"File","sort":25,"type":1,"url":"/file/file-list"},{"menuKey":"UserLog","menuName":"用户日志","parentKey":"System","sort":26,"type":1,"url":"/user-log"},{"menuKey":"UserOperateLog","menuName":"用户操作日志","parentKey":"UserLog","sort":27,"type":1,"url":"/user-log/user-operate-log"},{"menuKey":"UserLoginLog","menuName":"用户登录日志","parentKey":"UserLog","sort":28,"type":1,"url":"/user-log/user-login-log"},{"menuKey":"SystemSetting","menuName":"系统设置","parentKey":"System","sort":29,"type":1,"url":"/system-setting"},{"menuKey":"SystemConfig","menuName":"系统参数","parentKey":"SystemSetting","sort":30,"type":1,"url":"/system-setting/system-config"},{"menuKey":"SystemPrivilege","menuName":"菜单设置","parentKey":"SystemSetting","sort":31,"type":1,"url":"/system-setting/system-privilege"},{"menuKey":"Support","menuName":"开发专用","sort":32,"type":1,"url":"/support"},{"menuKey":"ApiDoc","menuName":"接口文档","parentKey":"Support","sort":33,"type":1,"url":"/api-doc"},{"menuKey":"Swagger","menuName":"Swagger接口文档","parentKey":"ApiDoc","sort":34,"type":1,"url":"/api-doc/swagger"},{"menuKey":"HeartBeat","menuName":"心跳服务","parentKey":"Support","sort":35,"type":1,"url":"/heart-beat"},{"menuKey":"HeartBeatList","menuName":"心跳服务","parentKey":"HeartBeat","sort":36,"type":1,"url":"/heart-beat/heart-beat-list"},{"menuKey":"Monitor","menuName":"系统监控","parentKey":"Support","sort":37,"type":1,"url":"/monitor"},{"menuKey":"OnlineUser","menuName":"在线人数","parentKey":"Monitor","sort":38,"type":1,"url":"/monitor/online-user"},{"menuKey":"Sql","menuName":"SQL监控","parentKey":"Monitor","sort":39,"type":1,"url":"/monitor/sql"},{"menuKey":"Reload","menuName":"动态加载","parentKey":"Support","sort":40,"type":1,"url":"/reload"},{"menuKey":"SmartReloadList","menuName":"SmartReload","parentKey":"Reload","sort":41,"type":1,"url":"/reload/smart-reload-list"},{"menuKey":"Task","menuName":"定时任务","parentKey":"Support","sort":42,"type":1,"url":"/task"},{"menuKey":"TaskList","menuName":"任务管理","parentKey":"Task","sort":43,"type":1,"url":"/system-setting/task-list"}]]', 1, NULL, '2020-12-14 15:16:26', '2020-12-14 15:16:26'), - (41, 1, '管理员', '通用-权限', '查询所有菜单项', '/smart-admin-api/privilege/menu/queryAll', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.queryAll', '', 1, NULL, '2020-12-14 15:16:26', '2020-12-14 15:16:26'), - (42, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/PeonyList', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["PeonyList"]', 1, NULL, '2020-12-14 15:16:28', '2020-12-14 15:16:28'), - (43, 1, '管理员', '通用-权限', '批量保存功能点', '/smart-admin-api/privilege/function/batchSave', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.batchSaveFunctionList', 'ValidateList[[{"functionKey":"peony-list-query","functionName":"查询","menuKey":"PeonyList","sort":1},{"functionKey":"peony-list-add","functionName":"新增","menuKey":"PeonyList","sort":2},{"functionKey":"peony-list-update","functionName":"编辑","menuKey":"PeonyList","sort":3},{"functionKey":"peony-list-batch-delete","functionName":"批量删除","menuKey":"PeonyList","sort":4},{"functionKey":"peony-list-batch-export","functionName":"批量导出","menuKey":"PeonyList","sort":5},{"functionKey":"peony-list-export-all","functionName":"导出全部","menuKey":"PeonyList","sort":6}]]', 1, NULL, '2020-12-14 15:16:30', '2020-12-14 15:16:30'), - (44, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/PeonyList', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["PeonyList"]', 1, NULL, '2020-12-14 15:16:30', '2020-12-14 15:16:30'), - (45, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/PeonyList1', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["PeonyList1"]', 1, NULL, '2020-12-14 15:16:32', '2020-12-14 15:16:32'), - (46, 1, '管理员', '通用-权限', '批量保存功能点', '/smart-admin-api/privilege/function/batchSave', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.batchSaveFunctionList', 'ValidateList[[{"functionKey":"peony1-list-query","functionName":"查询","menuKey":"PeonyList1","sort":1},{"functionKey":"peony1-list-add","functionName":"新增","menuKey":"PeonyList1","sort":2},{"functionKey":"peony1-list-update","functionName":"编辑","menuKey":"PeonyList1","sort":3},{"functionKey":"peony1-list-batch-delete","functionName":"批量删除","menuKey":"PeonyList1","sort":4},{"functionKey":"peony1-list-batch-export","functionName":"批量导出","menuKey":"PeonyList1","sort":5},{"functionKey":"peony1-list-export-all","functionName":"导出全部","menuKey":"PeonyList1","sort":6}]]', 1, NULL, '2020-12-14 15:16:33', '2020-12-14 15:16:33'), - (47, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/PeonyList1', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["PeonyList1"]', 1, NULL, '2020-12-14 15:16:33', '2020-12-14 15:16:33'), - (48, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/EmailList', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["EmailList"]', 1, NULL, '2020-12-14 15:16:34', '2020-12-14 15:16:34'), - (49, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/SendMail', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["SendMail"]', 1, NULL, '2020-12-14 15:16:36', '2020-12-14 15:16:36'), - (50, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/KeepAliveContentList', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["KeepAliveContentList"]', 1, NULL, '2020-12-14 15:16:38', '2020-12-14 15:16:38'), - (51, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/KeepAliveAddContent', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["KeepAliveAddContent"]', 1, NULL, '2020-12-14 15:16:38', '2020-12-14 15:16:38'), - (52, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/NoticeList', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["NoticeList"]', 1, NULL, '2020-12-14 15:16:40', '2020-12-14 15:16:40'), - (53, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/PersonNotice', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["PersonNotice"]', 1, NULL, '2020-12-14 15:16:41', '2020-12-14 15:16:41'), - (54, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/NoticeDetail', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["NoticeDetail"]', 1, NULL, '2020-12-14 15:16:42', '2020-12-14 15:16:42'), - (55, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/ThreeLevelRouterView', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["ThreeLevelRouterView"]', 1, NULL, '2020-12-14 15:16:44', '2020-12-14 15:16:44'), - (56, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/RoleManage', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["RoleManage"]', 1, NULL, '2020-12-14 15:16:47', '2020-12-14 15:16:47'), - (57, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/PositionList', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["PositionList"]', 1, NULL, '2020-12-14 15:16:48', '2020-12-14 15:16:48'), - (58, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/RoleEmployeeManage', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["RoleEmployeeManage"]', 1, NULL, '2020-12-14 15:16:53', '2020-12-14 15:16:53'), - (59, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/FileList', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["FileList"]', 1, NULL, '2020-12-14 15:17:00', '2020-12-14 15:17:00'), - (60, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/UserOperateLog', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["UserOperateLog"]', 1, NULL, '2020-12-14 15:17:03', '2020-12-14 15:17:03'), - (61, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/UserLoginLog', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["UserLoginLog"]', 1, NULL, '2020-12-14 15:17:03', '2020-12-14 15:17:03'), - (62, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/SystemConfig', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["SystemConfig"]', 1, NULL, '2020-12-14 15:17:04', '2020-12-14 15:17:04'), - (63, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/SystemPrivilege', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["SystemPrivilege"]', 1, NULL, '2020-12-14 15:17:06', '2020-12-14 15:17:06'), - (64, 1, '管理员', '通用-权限', '批量保存功能点', '/smart-admin-api/privilege/function/batchSave', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.batchSaveFunctionList', 'ValidateList[[{"functionKey":"privilege-main-update","functionName":"编辑","menuKey":"SystemPrivilege","sort":1},{"functionKey":"privilege-batch-save-points","functionName":"批量保存功能点","menuKey":"SystemPrivilege","sort":2},{"functionKey":"privilege-main-search","functionName":"查询","menuKey":"SystemPrivilege","sort":3}]]', 1, NULL, '2020-12-14 15:17:11', '2020-12-14 15:17:11'), - (65, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/SystemPrivilege', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["SystemPrivilege"]', 1, NULL, '2020-12-14 15:17:11', '2020-12-14 15:17:11'), - (66, 1, '管理员', '通用-权限', '保存更新功能点', '/smart-admin-api/privilege/function/saveOrUpdate', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionSaveOrUpdate', 'PrivilegeFunctionDTO[{"functionKey":"privilege-batch-save-points","functionName":"批量保存功能点","menuKey":"SystemPrivilege","sort":1,"url":"privilegeController.functionSaveOrUpdate"}]', 1, NULL, '2020-12-14 15:17:30', '2020-12-14 15:17:30'), - (67, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/SystemPrivilege', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["SystemPrivilege"]', 1, NULL, '2020-12-14 15:17:30', '2020-12-14 15:17:30'), - (68, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/Swagger', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["Swagger"]', 1, NULL, '2020-12-14 15:17:36', '2020-12-14 15:17:36'), - (69, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/HeartBeatList', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["HeartBeatList"]', 1, NULL, '2020-12-14 15:17:37', '2020-12-14 15:17:37'), - (70, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/SmartReloadList', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["SmartReloadList"]', 1, NULL, '2020-12-14 15:17:42', '2020-12-14 15:17:42'), - (71, 1, '管理员', '通用-权限', '查询菜单功能点', '/smart-admin-api/privilege/function/query/TaskList', 'net.lab1024.smartadmin.module.system.privilege.controller.PrivilegeController.functionQuery', 'String["TaskList"]', 1, NULL, '2020-12-14 15:17:43', '2020-12-14 15:17:43'), - (72, 1, '管理员', '通用-邮件发送', '分页查询', '/smart-admin-api/email/page/query', 'net.lab1024.smartadmin.module.business.email.EmailController.queryByPage', 'EmailQueryDTO[{"endDate":"","pageNum":1,"pageSize":10,"searchCount":true,"startDate":""}]', 1, NULL, '2020-12-14 15:17:57', '2020-12-14 15:17:57'), - (73, 1, '管理员', '管理端-用户登录', '获取session', '/smart-admin-api/session/get', 'net.lab1024.smartadmin.module.system.login.LoginController.getSession', '', 1, NULL, '2020-12-14 15:18:14', '2020-12-14 15:18:14'), - (74, 1, '管理员', '管理端-用户登录', '获取session', '/smart-admin-api/session/get', 'net.lab1024.smartadmin.module.system.login.LoginController.getSession', '', 1, NULL, '2020-12-14 15:18:27', '2020-12-14 15:18:27'); -/*!40000 ALTER TABLE `t_user_operate_log` ENABLE KEYS */; - -/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; -/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; diff --git a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/AddDTO.java.vm b/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/AddDTO.java.vm deleted file mode 100644 index 03da7773..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/AddDTO.java.vm +++ /dev/null @@ -1,36 +0,0 @@ -package ${basePackage}.module.${modulePackage}.domain.dto; - -import lombok.Data; -#foreach ($dtoImport in $dtoImports) -$dtoImport -#end -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModelProperty; - -/** - * 新建 [ ${tableDesc} ] - * - * @author ${author} - * @version 1.0 - * @company ${company} - * @copyright (c) 2018 ${company}Inc. All rights reserved. - * @date ${date} - * @since JDK1.8 - */ -@Data -public class ${moduleClass}AddDTO { -#foreach ($column in $columnList) -#if($column.fieldName != 'id') -#if($column.fieldType == 'Date') - @ApiModelProperty("${column.columnDesc}") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private $column.fieldType $column.fieldName; -#else - @ApiModelProperty("${column.columnDesc}") - private $column.fieldType $column.fieldName; -#end - -#end -#end - -} diff --git a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/Controller.java.vm b/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/Controller.java.vm deleted file mode 100644 index 1dfbe2ed..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/Controller.java.vm +++ /dev/null @@ -1,88 +0,0 @@ -package ${basePackage}.module.${modulePackage}.controller; - -import ${basePackage}.common.domain.PageResultDTO; -import ${basePackage}.common.controller.BaseController; -import ${basePackage}.common.domain.ResponseDTO; -import ${basePackage}.common.domain.ValidateList; -import ${basePackage}.module.${modulePackage}.domain.dto.${moduleClass}AddDTO; -import ${basePackage}.module.${modulePackage}.domain.dto.${moduleClass}UpdateDTO; -import ${basePackage}.module.${modulePackage}.domain.dto.${moduleClass}QueryDTO; -import ${basePackage}.module.${modulePackage}.domain.vo.${moduleClass}VO; -import ${basePackage}.module.${modulePackage}.domain.vo.${moduleClass}ExcelVO; -import ${basePackage}.module.${modulePackage}.service.${moduleClass}Service; -import cn.afterturn.easypoi.excel.ExcelExportUtil; -import cn.afterturn.easypoi.excel.entity.ExportParams; -import org.apache.poi.ss.usermodel.Workbook; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; - -/** - * [ ${tableDesc} ] - * - * @author ${author} - * @version 1.0 - * @company ${company} - * @copyright (c) ${company}Inc. All rights reserved. - * @date ${date} - * @since JDK1.8 - */ -@RestController -@Api(tags = {"${tableDesc}"}) -public class ${moduleClass}Controller extends BaseController { - - @Autowired - private ${moduleClass}Service ${moduleVar}Service; - - @ApiOperation(value = "分页查询${tableDesc}",notes = "@author ${author}") - @PostMapping("/${moduleVar}/page/query") - public ResponseDTO> queryByPage(@RequestBody ${moduleClass}QueryDTO queryDTO) { - return ${moduleVar}Service.queryByPage(queryDTO); - } - - @ApiOperation(value = "添加${tableDesc}",notes = "@author ${author}") - @PostMapping("/${moduleVar}/add") - public ResponseDTO add(@RequestBody @Validated ${moduleClass}AddDTO addTO){ - return ${moduleVar}Service.add(addTO); - } - - @ApiOperation(value="修改${tableDesc}",notes = "@author ${author}") - @PostMapping("/${moduleVar}/update") - public ResponseDTO update(@RequestBody @Validated ${moduleClass}UpdateDTO updateDTO){ - return ${moduleVar}Service.update(updateDTO); - } - - @ApiOperation(value="批量删除${tableDesc}",notes = "@author ${author}") - @PostMapping("/${moduleVar}/deleteByIds") - public ResponseDTO delete(@RequestBody @Validated ValidateList idList) { - return ${moduleVar}Service.deleteByIds(idList); - } - - @ApiOperation(value = "批量导出", notes = "@author ${author}") - @PostMapping("/${moduleVar}/export/batch") - public void batchExport(@RequestBody @Validated ValidateList idList, HttpServletResponse response) { - //查询数据 - List<${moduleClass}ExcelVO> ${moduleVar}List = ${moduleVar}Service.queryBatchExportData(idList); - //导出操作 - ExportParams ex = new ExportParams("${tableDesc}", "Sheet1"); - Workbook workbook = ExcelExportUtil.exportExcel(ex, ${moduleClass}ExcelVO.class, ${moduleVar}List); - downloadExcel("${tableDesc}", workbook, response); - } - - @ApiOperation(value = "导出全部", notes = "@author ${author}") - @PostMapping("/${moduleVar}/export/all") - public void exportAll(@RequestBody @Validated ${moduleClass}QueryDTO queryDTO, HttpServletResponse response) { - //查询数据 - List<${moduleClass}ExcelVO> ${moduleVar}List = ${moduleVar}Service.queryAllExportData(queryDTO); - //导出操作 - ExportParams ex = new ExportParams("${tableDesc}", "Sheet1"); - Workbook workbook = ExcelExportUtil.exportExcel(ex, ${moduleClass}ExcelVO.class, ${moduleVar}List); - downloadExcel("${tableDesc}", workbook, response); - } - -} diff --git a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/Dao.java.vm b/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/Dao.java.vm deleted file mode 100644 index b19db804..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/Dao.java.vm +++ /dev/null @@ -1,64 +0,0 @@ -package ${basePackage}.module.${modulePackage}.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.core.metadata.IPage; -import ${basePackage}.module.${modulePackage}.domain.dto.${moduleClass}QueryDTO; -import ${basePackage}.module.${modulePackage}.domain.entity.${moduleClass}Entity; -import ${basePackage}.module.${modulePackage}.domain.vo.${moduleClass}VO; -import ${basePackage}.module.${modulePackage}.domain.vo.${moduleClass}ExcelVO; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Component; - -import java.util.List; - -/** - * [ ${tableDesc} ] - * - * @author ${author} - * @version 1.0 - * @company ${company} - * @copyright (c) ${company}Inc. All rights reserved. - * @date ${date} - * @since JDK1.8 - */ -@Mapper -@Component -public interface ${moduleClass}Dao extends BaseMapper<${moduleClass}Entity> { - - /** - * 分页查询 - * @param queryDTO - * @return ${moduleClass}VO - */ - IPage<${moduleClass}VO> queryByPage(Page page, @Param("queryDTO") ${moduleClass}QueryDTO queryDTO); - - /** - * 根据id删除 - * @param id - * @return - */ - void deleteById(@Param("id")Long id); - - /** - * 根据id批量删除 - * @param idList - * @return - */ - void deleteByIdList(@Param("idList") List idList); - - /** - * 查询所有导出数据 - * @param queryDTO - * @return - */ - List<${moduleClass}ExcelVO> queryAllExportData(@Param("queryDTO")${moduleClass}QueryDTO queryDTO); - - /** - * 查询批量导出数据 - * @param idList - * @return - */ - List<${moduleClass}ExcelVO> queryBatchExportData(@Param("idList")List idList); -} diff --git a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/Dao.xml.vm b/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/Dao.xml.vm deleted file mode 100644 index 5e64e4bc..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/Dao.xml.vm +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - delete from ${tableName} where id = #{id} - - - - delete from ${tableName} where id in - - #{item} - - - - \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/Entity.java.vm b/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/Entity.java.vm deleted file mode 100644 index ca7e7e6d..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/Entity.java.vm +++ /dev/null @@ -1,33 +0,0 @@ -package ${basePackage}.module.${modulePackage}.domain.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import ${basePackage}.common.domain.BaseEntity; -#foreach ($entityImport in $entityImports) -$entityImport -#end -import lombok.Data; - -/** - * [ ${tableDesc} ] - * - * @author ${author} - * @version 1.0 - * @company ${company} - * @copyright (c) ${company}Inc. All rights reserved. - * @date ${date} - * @since JDK1.8 - */ -@Data -@TableName("${tableName}") -public class ${moduleClass}Entity extends BaseEntity{ -#foreach ($column in $columnList) - -#if($column.columnName != 'id' && $column.fieldName != 'updateTime' && $column.fieldName != 'createTime') - /** - * $column.columnDesc - */ - private $column.fieldType $column.fieldName; -#end -#end - -} diff --git a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/ExcelVO.java.vm b/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/ExcelVO.java.vm deleted file mode 100644 index fa4e7e0a..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/ExcelVO.java.vm +++ /dev/null @@ -1,33 +0,0 @@ -package ${basePackage}.module.${modulePackage}.domain.vo; - -import cn.afterturn.easypoi.excel.annotation.Excel; -import lombok.Data; -#foreach ($dtoImport in $dtoImports) -$dtoImport -#end - -/** - * [ ${tableDesc} ] - * - * @author ${author} - * @version 1.0 - * @company ${company} - * @copyright (c) ${company}Inc. All rights reserved. - * @date ${date} - * @since JDK1.8 - */ -@Data -public class ${moduleClass}ExcelVO { -#foreach ($column in $columnList) -#if($column.fieldType == 'Date') - @Excel(name = "${column.columnDesc}", format = "yyyy-MM-dd HH:mm:ss") - private $column.fieldType $column.fieldName; -#else - @Excel(name = "${column.columnDesc}") - private $column.fieldType $column.fieldName; -#end - -#end - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/QueryDTO.java.vm b/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/QueryDTO.java.vm deleted file mode 100644 index 44815d4d..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/QueryDTO.java.vm +++ /dev/null @@ -1,45 +0,0 @@ -package ${basePackage}.module.${modulePackage}.domain.dto; - -import ${basePackage}.common.domain.PageParamDTO; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import java.util.Date; -#foreach ($queryImport in $queryImports) -$queryImport -#end - -/** - * [ ${tableDesc} ] - * - * @author ${author} - * @version 1.0 - * @company ${company} - * @copyright (c) ${company}Inc. All rights reserved. - * @date ${date} - * @since JDK1.8 - */ -@Data -public class ${moduleClass}QueryDTO extends PageParamDTO { -#foreach ($queryField in $queryFieldList) - -#if($queryField.sqlOperate == 'in') - @ApiModelProperty("${queryField.columnDesc}") - private List<${queryField.fieldType}> ${queryField.fieldName}List; -#else - @ApiModelProperty("${queryField.columnDesc}") - private ${queryField.fieldType} ${queryField.fieldName}; -#end -#end - - @ApiModelProperty("创建时间-开始") - private Date createTimeBegin; - - @ApiModelProperty("创建时间-截止") - private Date createTimeEnd; - - @ApiModelProperty("上次更新时间-开始") - private Date updateTimeBegin; - - @ApiModelProperty("上次更新创建时间-开始") - private Date updateTimeEnd; -} diff --git a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/Service.java.vm b/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/Service.java.vm deleted file mode 100644 index ca3b939d..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/Service.java.vm +++ /dev/null @@ -1,108 +0,0 @@ -package ${basePackage}.module.${modulePackage}.service; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import ${basePackage}.common.domain.PageResultDTO; -import ${basePackage}.common.domain.ResponseDTO; -import ${basePackage}.module.${modulePackage}.dao.${moduleClass}Dao; -import ${basePackage}.module.${modulePackage}.domain.dto.${moduleClass}AddDTO; -import ${basePackage}.module.${modulePackage}.domain.dto.${moduleClass}UpdateDTO; -import ${basePackage}.module.${modulePackage}.domain.dto.${moduleClass}QueryDTO; -import ${basePackage}.module.${modulePackage}.domain.entity.${moduleClass}Entity; -import ${basePackage}.module.${modulePackage}.domain.vo.${moduleClass}VO; -import ${basePackage}.module.${modulePackage}.domain.vo.${moduleClass}ExcelVO; -import ${basePackage}.util.SmartPageUtil; -import ${basePackage}.util.SmartBeanUtil; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -/** - * [ ${tableDesc} ] - * - * @author ${author} - * @version 1.0 - * @company ${company} - * @copyright (c) ${company}Inc. All rights reserved. - * @date ${date} - * @since JDK1.8 - */ -@Service -public class ${moduleClass}Service { - - @Autowired - private ${moduleClass}Dao ${moduleVar}Dao; - - /** - * 根据id查询 - */ - public ${moduleClass}Entity getById(Long id){ - return ${moduleVar}Dao.selectById(id); - } - - /** - * 分页查询 - * @author ${author} - * @date ${date} - */ - public ResponseDTO> queryByPage(${moduleClass}QueryDTO queryDTO) { - Page page = SmartPageUtil.convert2QueryPage(queryDTO); - IPage<${moduleClass}VO> voList = ${moduleVar}Dao.queryByPage(page, queryDTO); - PageResultDTO<${moduleClass}VO> pageResultDTO = SmartPageUtil.convert2PageResult(voList); - return ResponseDTO.succData(pageResultDTO); - } - - /** - * 添加 - * @author ${author} - * @date ${date} - */ - public ResponseDTO add(${moduleClass}AddDTO addDTO) { - ${moduleClass}Entity entity = SmartBeanUtil.copy(addDTO, ${moduleClass}Entity.class); - ${moduleVar}Dao.insert(entity); - return ResponseDTO.succ(); - } - - /** - * 编辑 - * @author ${author} - * @date ${date} - */ - @Transactional(rollbackFor = Exception.class) - public ResponseDTO update(${moduleClass}UpdateDTO updateDTO) { - ${moduleClass}Entity entity = SmartBeanUtil.copy(updateDTO, ${moduleClass}Entity.class); - ${moduleVar}Dao.updateById(entity); - return ResponseDTO.succ(); - } - - /** - * 删除 - * @author ${author} - * @date ${date} - */ - @Transactional(rollbackFor = Exception.class) - public ResponseDTO deleteByIds(List idList) { - ${moduleVar}Dao.deleteByIdList(idList); - return ResponseDTO.succ(); - } - - /** - * 查询全部导出对象 - * @author ${author} - * @date ${date} - */ - public List<${moduleClass}ExcelVO> queryAllExportData(${moduleClass}QueryDTO queryDTO) { - return ${moduleVar}Dao.queryAllExportData( queryDTO); - } - - /** - * 批量查询导出对象 - * @author ${author} - * @date ${date} - */ - public List<${moduleClass}ExcelVO> queryBatchExportData(List idList) { - return ${moduleVar}Dao.queryBatchExportData(idList); - } -} diff --git a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/UpdateDTO.java.vm b/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/UpdateDTO.java.vm deleted file mode 100644 index e96cc501..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/UpdateDTO.java.vm +++ /dev/null @@ -1,20 +0,0 @@ -package ${basePackage}.module.${modulePackage}.domain.dto; - -import lombok.Data; - -/** - * 更新 [ ${tableDesc} ] - * - * @author ${author} - * @version 1.0 - * @company ${company} - * @copyright (c) 2018 ${company}Inc. All rights reserved. - * @date ${date} - * @since JDK1.8 - */ -@Data -public class ${moduleClass}UpdateDTO extends ${moduleClass}AddDTO { - - private Long id; - -} diff --git a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/VO.java.vm b/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/VO.java.vm deleted file mode 100644 index b7a5ea53..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/java/VO.java.vm +++ /dev/null @@ -1,35 +0,0 @@ -package ${basePackage}.module.${modulePackage}.domain.vo; - -import lombok.Data; -#foreach ($dtoImport in $dtoImports) -$dtoImport -#end -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModelProperty; - -/** - * [ ${tableDesc} ] - * - * @author ${author} - * @version 1.0 - * @company ${company} - * @copyright (c) ${company}Inc. All rights reserved. - * @date ${date} - * @since JDK1.8 - */ -@Data -public class ${moduleClass}VO { -#foreach ($column in $columnList) -#if($column.fieldType == 'Date') - @ApiModelProperty("${column.columnDesc}") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private $column.fieldType $column.fieldName; -#else - @ApiModelProperty("${column.columnDesc}") - private $column.fieldType $column.fieldName; -#end - -#end - - -} diff --git a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/web/Api.js.vm b/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/web/Api.js.vm deleted file mode 100644 index 858f2366..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/web/Api.js.vm +++ /dev/null @@ -1,28 +0,0 @@ -import { postAxios, getAxios, postDownloadAxios } from '@/lib/http'; - -export const ${moduleVar}Api = { - // 添加${tableDesc} @author ${author} - add${moduleClass}: (data) => { - return postAxios('/${moduleVar}/add', data); - }, - // 分页查询${tableDesc} @author ${author} - query${moduleClass}: (data) => { - return postAxios('/${moduleVar}/page/query', data); - }, - // 批量删除${tableDesc} @author ${author} - batchDelete${moduleClass}: (idList) => { - return postAxios('/${moduleVar}/deleteByIds', idList); - }, - // 修改${tableDesc} @author ${author} - update${moduleClass}: (data) => { - return postAxios('/${moduleVar}/update',data); - }, - // 导出全部 @author ${author} - exportAll:(data)=>{ - return postDownloadAxios('/${moduleVar}/export/all',data); - }, - // 批量导出 @author ${author} - batchExport: (idList) => { - return postDownloadAxios('/${moduleVar}/export/batch', idList); - }, -}; diff --git a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/web/List.vue.vm b/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/web/List.vue.vm deleted file mode 100644 index 3bc635f4..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/web/List.vue.vm +++ /dev/null @@ -1,439 +0,0 @@ - - - diff --git a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/web/ListForm.vue.vm b/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/web/ListForm.vue.vm deleted file mode 100644 index 558dfcb0..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/web/ListForm.vue.vm +++ /dev/null @@ -1,132 +0,0 @@ - - \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/web/Router.js.vm b/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/web/Router.js.vm deleted file mode 100644 index 00d5ed6c..00000000 --- a/smart-admin-service/smart-admin-api/src/main/resources/templates/codegenerator/web/Router.js.vm +++ /dev/null @@ -1,32 +0,0 @@ -import Main from '@/components/main'; -// ${tableName}路由 -export const ${moduleVar} = [ - { - path: '/${webModuleName}', - name: '${moduleClass}', - component: Main, - meta: { - title: '${tableDesc}管理', - icon: 'icon iconfont iconyoujianguanli' - }, - children: [ - // ${tableDesc}列表 - { - path: '/${webModuleName}/${webModuleName}-list', - name: '${moduleClass}List', - meta: { - title: '${tableDesc}列表', - privilege: [ - { title: '查询', name: '${webModuleName}-list-query' }, - { title: '新增', name: '${webModuleName}-list-add' }, - { title: '编辑', name: '${webModuleName}-list-update' }, - { title: '批量删除', name: '${webModuleName}-list-batch-delete' }, - { title: '批量导出', name: '${webModuleName}-list-batch-export' }, - { title: '导出全部', name: '${webModuleName}-list-export-all' } - ] - }, - component: () => import('@/views/business/${webModuleName}/${webModuleName}-list.vue') - } - ] - } -]; diff --git a/smart-admin-service/smart-admin-api/src/test/java/net/lab1024/smartadmin/BaseTest.java b/smart-admin-service/smart-admin-api/src/test/java/net/lab1024/smartadmin/BaseTest.java deleted file mode 100644 index 6d681a15..00000000 --- a/smart-admin-service/smart-admin-api/src/test/java/net/lab1024/smartadmin/BaseTest.java +++ /dev/null @@ -1,28 +0,0 @@ -package net.lab1024.smartadmin; - -import org.junit.After; -import org.junit.Before; -import org.junit.runner.RunWith; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; - -/** - * 测试基类 - * - * @author lizongliang - * @date 2017/09/29 10:54 - */ -@RunWith(SpringRunner.class) -@SpringBootTest(classes = SmartAdminApplication.class,webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) -public class BaseTest { - - @Before - public void before() { - System.out.println("测试开始------------------"); - } - - @After - public void after() { - System.out.println("测试结束------------------"); - } -} diff --git a/smart-admin-service/smart-admin-api/src/test/java/net/lab1024/smartadmin/SmartAdminApplicationTests.java b/smart-admin-service/smart-admin-api/src/test/java/net/lab1024/smartadmin/SmartAdminApplicationTests.java deleted file mode 100644 index d140b88b..00000000 --- a/smart-admin-service/smart-admin-api/src/test/java/net/lab1024/smartadmin/SmartAdminApplicationTests.java +++ /dev/null @@ -1,11 +0,0 @@ -package net.lab1024.smartadmin; - -import org.junit.runner.RunWith; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; - -@RunWith(SpringRunner.class) -@SpringBootTest(classes = SmartAdminApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) -public class SmartAdminApplicationTests { - -} \ No newline at end of file diff --git a/smart-admin-service/smart-admin-api/src/test/java/net/lab1024/smartadmin/module/support/codegenerator/CodeGeneratorServiceTest.java b/smart-admin-service/smart-admin-api/src/test/java/net/lab1024/smartadmin/module/support/codegenerator/CodeGeneratorServiceTest.java deleted file mode 100644 index e824cf51..00000000 --- a/smart-admin-service/smart-admin-api/src/test/java/net/lab1024/smartadmin/module/support/codegenerator/CodeGeneratorServiceTest.java +++ /dev/null @@ -1,66 +0,0 @@ -package net.lab1024.smartadmin.module.support.codegenerator; - -import net.lab1024.smartadmin.BaseTest; -import net.lab1024.smartadmin.module.support.codegenerator.constant.SqlOperateTypeEnum; -import net.lab1024.smartadmin.module.support.codegenerator.domain.CodeGeneratorDTO; -import net.lab1024.smartadmin.module.support.codegenerator.domain.CodeGeneratorQueryColumnDTO; -import net.lab1024.smartadmin.module.support.codegenerator.service.CodeGeneratorService; -import com.google.common.collect.Lists; -import org.junit.Test; -import org.springframework.beans.factory.annotation.Autowired; - -import java.util.List; - -/** - * IdGeneratorService Tester. - * - * @author zhuoda - * @version 1.0 - */ -public class CodeGeneratorServiceTest extends BaseTest { - - @Autowired - private CodeGeneratorService codeGeneratorService; - - @Test - public void testGenerate() throws Exception { - /** - * !!! 所有查询条件均包含了createTime和updateTime的 范围查询 !!! - */ - - // t_peony 牡丹花表 - - //搜索字段 kind, 使用like搜索 - CodeGeneratorQueryColumnDTO kind = CodeGeneratorQueryColumnDTO.builder() - .columnName("kind") - .sqlOperate(SqlOperateTypeEnum.LIKE).build(); - //搜索字段 kind, 使用 == 搜索 - CodeGeneratorQueryColumnDTO id = CodeGeneratorQueryColumnDTO.builder() - .columnName("id") - .sqlOperate(SqlOperateTypeEnum.EQUALS).build(); - //搜索字段 name, 使用like搜索 - CodeGeneratorQueryColumnDTO name = CodeGeneratorQueryColumnDTO.builder() - .columnName("name") - .sqlOperate(SqlOperateTypeEnum.LIKE).build(); - //搜索字段 color, 使用like搜索 - CodeGeneratorQueryColumnDTO color = CodeGeneratorQueryColumnDTO.builder() - .columnName("color") - .sqlOperate(SqlOperateTypeEnum.LIKE).build(); - - List queryColumnList = Lists.newArrayList(id, kind, name, color); - - CodeGeneratorDTO codeGenerator = CodeGeneratorDTO.builder() - .author("卓大")//class 注释作者 - .company("1024创新实验室( www.1024lab.net )")//class注释公司名字 - .tableName("t_peony")//表名 - .tablePrefix("t_")//表名前缀 - .basePackage("net.lab1024.smartadmin")//包名 - .modulePackage("business.peony")//业务子包名 - .queryColumnList(queryColumnList)//加入搜搜字段 - .build();//构建 - - //当需要代码生成的时候,请将注释去掉 -// codeGeneratorService.codeGenerator(codeGenerator); - } - -} diff --git a/smart-admin-web/.babelrc b/smart-admin-web/.babelrc deleted file mode 100644 index 2a818842..00000000 --- a/smart-admin-web/.babelrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "presets": [ - "@vue/app" - ] -} diff --git a/smart-admin-web/.editorconfig b/smart-admin-web/.editorconfig deleted file mode 100644 index 9d08a1a8..00000000 --- a/smart-admin-web/.editorconfig +++ /dev/null @@ -1,9 +0,0 @@ -root = true - -[*] -charset = utf-8 -indent_style = space -indent_size = 2 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true diff --git a/smart-admin-web/.env.development b/smart-admin-web/.env.development deleted file mode 100644 index 746c33a9..00000000 --- a/smart-admin-web/.env.development +++ /dev/null @@ -1,4 +0,0 @@ -NODE_ENV=development -VUE_APP_TYPE=dev -VUE_APP_URL=http://127.0.0.1:10086/smart-admin-api/ -VUE_APP_SOCKET_URL=ws://127.0.0.1:10086/smart-admin-api/ diff --git a/smart-admin-web/.env.local b/smart-admin-web/.env.local deleted file mode 100644 index 746c33a9..00000000 --- a/smart-admin-web/.env.local +++ /dev/null @@ -1,4 +0,0 @@ -NODE_ENV=development -VUE_APP_TYPE=dev -VUE_APP_URL=http://127.0.0.1:10086/smart-admin-api/ -VUE_APP_SOCKET_URL=ws://127.0.0.1:10086/smart-admin-api/ diff --git a/smart-admin-web/.env.prod b/smart-admin-web/.env.prod deleted file mode 100644 index d90edfe9..00000000 --- a/smart-admin-web/.env.prod +++ /dev/null @@ -1,8 +0,0 @@ -NODE_ENV=production -VUE_APP_TYPE=prod -VUE_APP_URL=http://preview.smartadmin.1024lab.net/smart-admin-api/ -VUE_APP_SOCKET_URL=ws://preview.smartadmin.1024lab.net/smart-admin-api/ - -// VUE_APP_URL=http://127.0.0.1:10086/smart-admin-api/ -// VUE_APP_SOCKET_URL=ws://127.0.0.1:10086/smart-admin-api/ - diff --git a/smart-admin-web/.env.sit b/smart-admin-web/.env.sit deleted file mode 100644 index ac2ac140..00000000 --- a/smart-admin-web/.env.sit +++ /dev/null @@ -1,3 +0,0 @@ -NODE_ENV=production -VUE_APP_TYPE=sit -VUE_APP_URL=http://172.16.0.145:10086/smart-admin-api/ diff --git a/smart-admin-web/.eslintrc.js b/smart-admin-web/.eslintrc.js deleted file mode 100644 index 28180441..00000000 --- a/smart-admin-web/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -module.exports = { - root: true, - "extends": [ - "plugin:vue/essential", - "@vue/standard" - ], - rules: { - "generator-star-spacing": "off", //生成器函数*的前后空格 - // allow debugger during development - "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off", - "vue/no-parsing-error": [2, { - "x-invalid-end-tag": false - }], - "no-const-assign": 2, //禁止修改const声明的变量 - "no-unused-vars": [0, { //禁止声明变量后却不使用 - // 允许声明未使用变量 - "vars": "all", - // 参数不检查 - "args": "none" - }], - "quotes": [2, "single"], //单引号 - "singleQuote": true, - "indent": 2, //缩进量 - "no-var": 2, //禁用var,用let和const代替 - "camelcase": 2, //强制驼峰法命名 - "eqeqeq": 1, //要求使用 === 和 !== 代替 == 和 != 操作符 - "no-eq-null": 2, //禁止对null使用==或!=运算符 - "no-sequences": 0, //禁用逗号操作符 - "semi": [2, "always"] //强制分号 - }, - parserOptions: { - parser: "babel-eslint" - } -} diff --git a/smart-admin-web/.gitignore b/smart-admin-web/.gitignore deleted file mode 100644 index a1009cf5..00000000 --- a/smart-admin-web/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -.DS_Store -node_modules -/dist - -/tests/e2e/videos/ -/tests/e2e/screenshots/ - -# Log files -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Editor directories and files -.idea -.vscode -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw* - -build/env.js diff --git a/smart-admin-web/.travis.yml b/smart-admin-web/.travis.yml deleted file mode 100644 index 07c971f8..00000000 --- a/smart-admin-web/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: stable -script: npm run lint -notifications: - email: false diff --git a/smart-admin-web/README.md b/smart-admin-web/README.md deleted file mode 100644 index fe637c03..00000000 --- a/smart-admin-web/README.md +++ /dev/null @@ -1,13 +0,0 @@ -### 启动讲解 - -###### 配置vscode -将 /vscode/settings.json文件配置到vscode中 - -###### 启动 -1 安装依赖: - -`npm install` - -2 运行本地环境 - -`npm run local` \ No newline at end of file diff --git a/smart-admin-web/cypress.json b/smart-admin-web/cypress.json deleted file mode 100644 index 470c7201..00000000 --- a/smart-admin-web/cypress.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "pluginsFile": "tests/e2e/plugins/index.js" -} diff --git a/smart-admin-web/doc/notice.txt b/smart-admin-web/doc/notice.txt deleted file mode 100644 index 8184781f..00000000 --- a/smart-admin-web/doc/notice.txt +++ /dev/null @@ -1,2 +0,0 @@ -1 login-form.vue 去掉登录帐号提示 -2 login-form.vue 修改默认登录绑定帐号 \ No newline at end of file diff --git a/smart-admin-web/package-lock.json b/smart-admin-web/package-lock.json deleted file mode 100644 index 86b799c5..00000000 --- a/smart-admin-web/package-lock.json +++ /dev/null @@ -1,15500 +0,0 @@ -{ - "name": "smart-admin", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@antv/adjust": { - "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/@antv/adjust/download/@antv/adjust-0.1.1.tgz", - "integrity": "sha1-4mOrDhoZQaZIhC/Ahs9lp+O3Xpg=", - "requires": { - "@antv/util": "~1.3.1" - } - }, - "@antv/attr": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/@antv/attr/download/@antv/attr-0.1.2.tgz", - "integrity": "sha1-LusSL8qvhRoth0mrx8YFGdP3fjc=", - "requires": { - "@antv/util": "~1.3.1" - } - }, - "@antv/component": { - "version": "0.3.9", - "resolved": "https://registry.npm.taobao.org/@antv/component/download/@antv/component-0.3.9.tgz", - "integrity": "sha1-7VYcY5t3OM4D/2OoZvWeJR3oKhc=", - "requires": { - "@antv/attr": "~0.1.2", - "@antv/g": "~3.3.5", - "@antv/util": "~1.3.1", - "wolfy87-eventemitter": "~5.1.0" - }, - "dependencies": { - "@antv/g": { - "version": "3.3.6", - "resolved": "https://registry.npm.taobao.org/@antv/g/download/@antv/g-3.3.6.tgz", - "integrity": "sha1-Ef7Z3cntTloqokS3yKu5gqAD8gE=", - "requires": { - "@antv/gl-matrix": "~2.7.1", - "@antv/util": "~1.3.1", - "d3-ease": "~1.0.3", - "d3-interpolate": "~1.1.5", - "d3-timer": "~1.0.6", - "wolfy87-eventemitter": "~5.1.0" - } - } - } - }, - "@antv/coord": { - "version": "0.1.0", - "resolved": "https://registry.npm.taobao.org/@antv/coord/download/@antv/coord-0.1.0.tgz", - "integrity": "sha1-SKgK420HVS+WZX5/gJUifGPwwKk=", - "requires": { - "@antv/util": "~1.3.1" - } - }, - "@antv/g": { - "version": "3.4.10", - "resolved": "https://registry.npm.taobao.org/@antv/g/download/@antv/g-3.4.10.tgz", - "integrity": "sha1-57YWqiGxesUYUNAzMypa+N6P4BU=", - "requires": { - "@antv/gl-matrix": "~2.7.1", - "@antv/util": "~1.3.1", - "d3-ease": "~1.0.3", - "d3-interpolate": "~1.1.5", - "d3-timer": "~1.0.6", - "detect-browser": "^5.1.0" - } - }, - "@antv/g2": { - "version": "3.5.17", - "resolved": "https://registry.npm.taobao.org/@antv/g2/download/@antv/g2-3.5.17.tgz", - "integrity": "sha1-Asi6xhDSHSi04jYAvHbEjn9ZyRk=", - "requires": { - "@antv/adjust": "~0.1.0", - "@antv/attr": "~0.1.2", - "@antv/component": "~0.3.3", - "@antv/coord": "~0.1.0", - "@antv/g": "~3.4.10", - "@antv/scale": "~0.1.1", - "@antv/util": "~1.3.1", - "venn.js": "~0.2.20", - "wolfy87-eventemitter": "~5.1.0" - } - }, - "@antv/gl-matrix": { - "version": "2.7.1", - "resolved": "https://registry.npm.taobao.org/@antv/gl-matrix/download/@antv/gl-matrix-2.7.1.tgz", - "integrity": "sha1-rLjjf3qz3wE0WrpDcteUK+QuuhQ=" - }, - "@antv/scale": { - "version": "0.1.5", - "resolved": "https://registry.npm.taobao.org/@antv/scale/download/@antv/scale-0.1.5.tgz", - "integrity": "sha1-JDJm6LkEfPZLL9/ED5g0zwhGSW4=", - "requires": { - "@antv/util": "~1.3.1", - "fecha": "~2.3.3" - } - }, - "@antv/util": { - "version": "1.3.1", - "resolved": "https://registry.npm.taobao.org/@antv/util/download/@antv/util-1.3.1.tgz", - "integrity": "sha1-MKNLIB/5Em7A1YxyyBZqnD5kTM0=", - "requires": { - "@antv/gl-matrix": "^2.7.1" - } - }, - "@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/code-frame/download/@babel/code-frame-7.10.4.tgz?cache=0&sync_timestamp=1593521174697&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fcode-frame%2Fdownload%2F%40babel%2Fcode-frame-7.10.4.tgz", - "integrity": "sha1-Fo2ho26Q2miujUnA8bSMfGJJITo=", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@babel/core": { - "version": "7.10.5", - "resolved": "https://registry.npm.taobao.org/@babel/core/download/@babel/core-7.10.5.tgz?cache=0&sync_timestamp=1594750809694&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fcore%2Fdownload%2F%40babel%2Fcore-7.10.5.tgz", - "integrity": "sha1-HxXizKitmh14o43bphL158270zA=", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.10.5", - "@babel/helper-module-transforms": "^7.10.5", - "@babel/helpers": "^7.10.4", - "@babel/parser": "^7.10.5", - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.10.5", - "@babel/types": "^7.10.5", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.1", - "json5": "^2.1.2", - "lodash": "^4.17.19", - "resolve": "^1.3.2", - "semver": "^5.4.1", - "source-map": "^0.5.0" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-4.1.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-4.1.1.tgz", - "integrity": "sha1-O3ImAlUQnGtYnO4FDx1RYTlmR5E=", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "@babel/generator": { - "version": "7.10.5", - "resolved": "https://registry.npm.taobao.org/@babel/generator/download/@babel/generator-7.10.5.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fgenerator%2Fdownload%2F%40babel%2Fgenerator-7.10.5.tgz", - "integrity": "sha1-G5A1VLyMWD7o0l8eiWlzLmuCmmk=", - "dev": true, - "requires": { - "@babel/types": "^7.10.5", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "@babel/helper-annotate-as-pure": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-annotate-as-pure/download/@babel/helper-annotate-as-pure-7.10.4.tgz", - "integrity": "sha1-W/DUlaP3V6w72ki1vzs7ownHK6M=", - "dev": true, - "requires": { - "@babel/types": "^7.10.4" - } - }, - "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-builder-binary-assignment-operator-visitor/download/@babel/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz", - "integrity": "sha1-uwt18xv5jL+f8UPBrleLhydK4aM=", - "dev": true, - "requires": { - "@babel/helper-explode-assignable-expression": "^7.10.4", - "@babel/types": "^7.10.4" - } - }, - "@babel/helper-create-class-features-plugin": { - "version": "7.10.5", - "resolved": "https://registry.npm.taobao.org/@babel/helper-create-class-features-plugin/download/@babel/helper-create-class-features-plugin-7.10.5.tgz?cache=0&sync_timestamp=1594751493358&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-create-class-features-plugin%2Fdownload%2F%40babel%2Fhelper-create-class-features-plugin-7.10.5.tgz", - "integrity": "sha1-n2FEa6gOgkCwpchcb9rIRZ1vJZ0=", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-member-expression-to-functions": "^7.10.5", - "@babel/helper-optimise-call-expression": "^7.10.4", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-replace-supers": "^7.10.4", - "@babel/helper-split-export-declaration": "^7.10.4" - } - }, - "@babel/helper-create-regexp-features-plugin": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-create-regexp-features-plugin/download/@babel/helper-create-regexp-features-plugin-7.10.4.tgz", - "integrity": "sha1-/dYNiFJGWaC2lZwFeZJeQlcU87g=", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.10.4", - "@babel/helper-regex": "^7.10.4", - "regexpu-core": "^4.7.0" - } - }, - "@babel/helper-define-map": { - "version": "7.10.5", - "resolved": "https://registry.npm.taobao.org/@babel/helper-define-map/download/@babel/helper-define-map-7.10.5.tgz?cache=0&sync_timestamp=1594751492980&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-define-map%2Fdownload%2F%40babel%2Fhelper-define-map-7.10.5.tgz", - "integrity": "sha1-tTwQ23imQIABUmkrEzkxR6y5uzA=", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.10.4", - "@babel/types": "^7.10.5", - "lodash": "^4.17.19" - } - }, - "@babel/helper-explode-assignable-expression": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-explode-assignable-expression/download/@babel/helper-explode-assignable-expression-7.10.4.tgz?cache=0&sync_timestamp=1593522841702&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-explode-assignable-expression%2Fdownload%2F%40babel%2Fhelper-explode-assignable-expression-7.10.4.tgz", - "integrity": "sha1-QKHNkXv/Eoj2malKdbN6Gi29jHw=", - "dev": true, - "requires": { - "@babel/traverse": "^7.10.4", - "@babel/types": "^7.10.4" - } - }, - "@babel/helper-function-name": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-function-name/download/@babel/helper-function-name-7.10.4.tgz?cache=0&sync_timestamp=1593521218775&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-function-name%2Fdownload%2F%40babel%2Fhelper-function-name-7.10.4.tgz", - "integrity": "sha1-0tOyDFmtjEcRL6fSqUvAnV74Lxo=", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.10.4", - "@babel/template": "^7.10.4", - "@babel/types": "^7.10.4" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-get-function-arity/download/@babel/helper-get-function-arity-7.10.4.tgz?cache=0&sync_timestamp=1593522827189&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-get-function-arity%2Fdownload%2F%40babel%2Fhelper-get-function-arity-7.10.4.tgz", - "integrity": "sha1-mMHL6g4jMvM/mkZhuM4VBbLBm6I=", - "dev": true, - "requires": { - "@babel/types": "^7.10.4" - } - }, - "@babel/helper-hoist-variables": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-hoist-variables/download/@babel/helper-hoist-variables-7.10.4.tgz?cache=0&sync_timestamp=1593521259807&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-hoist-variables%2Fdownload%2F%40babel%2Fhelper-hoist-variables-7.10.4.tgz", - "integrity": "sha1-1JsAHR1aaMpeZgTdoBpil/fJOB4=", - "dev": true, - "requires": { - "@babel/types": "^7.10.4" - } - }, - "@babel/helper-member-expression-to-functions": { - "version": "7.10.5", - "resolved": "https://registry.npm.taobao.org/@babel/helper-member-expression-to-functions/download/@babel/helper-member-expression-to-functions-7.10.5.tgz?cache=0&sync_timestamp=1594751492273&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-member-expression-to-functions%2Fdownload%2F%40babel%2Fhelper-member-expression-to-functions-7.10.5.tgz", - "integrity": "sha1-Fy9W56Y+eBEvOgQFXyQ2WvcC5+4=", - "dev": true, - "requires": { - "@babel/types": "^7.10.5" - } - }, - "@babel/helper-module-imports": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-module-imports/download/@babel/helper-module-imports-7.10.4.tgz", - "integrity": "sha1-TFxUvgS9MWcKc4J5fXW5+i5bViA=", - "dev": true, - "requires": { - "@babel/types": "^7.10.4" - } - }, - "@babel/helper-module-transforms": { - "version": "7.10.5", - "resolved": "https://registry.npm.taobao.org/@babel/helper-module-transforms/download/@babel/helper-module-transforms-7.10.5.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-module-transforms%2Fdownload%2F%40babel%2Fhelper-module-transforms-7.10.5.tgz", - "integrity": "sha1-EgwnHAszU2c/zf2MBT2zxUSiYNY=", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.10.4", - "@babel/helper-replace-supers": "^7.10.4", - "@babel/helper-simple-access": "^7.10.4", - "@babel/helper-split-export-declaration": "^7.10.4", - "@babel/template": "^7.10.4", - "@babel/types": "^7.10.5", - "lodash": "^4.17.19" - } - }, - "@babel/helper-optimise-call-expression": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-optimise-call-expression/download/@babel/helper-optimise-call-expression-7.10.4.tgz?cache=0&sync_timestamp=1593522827576&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-optimise-call-expression%2Fdownload%2F%40babel%2Fhelper-optimise-call-expression-7.10.4.tgz", - "integrity": "sha1-UNyWQT1ZT5lad5BZBbBYk813lnM=", - "dev": true, - "requires": { - "@babel/types": "^7.10.4" - } - }, - "@babel/helper-plugin-utils": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-plugin-utils/download/@babel/helper-plugin-utils-7.10.4.tgz", - "integrity": "sha1-L3WoMSadT2d95JmG3/WZJ1M883U=", - "dev": true - }, - "@babel/helper-regex": { - "version": "7.10.5", - "resolved": "https://registry.npm.taobao.org/@babel/helper-regex/download/@babel/helper-regex-7.10.5.tgz?cache=0&sync_timestamp=1594751487108&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-regex%2Fdownload%2F%40babel%2Fhelper-regex-7.10.5.tgz", - "integrity": "sha1-Mt+7eYmQc8QVVXBToZvQVarlCuA=", - "dev": true, - "requires": { - "lodash": "^4.17.19" - } - }, - "@babel/helper-remap-async-to-generator": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-remap-async-to-generator/download/@babel/helper-remap-async-to-generator-7.10.4.tgz?cache=0&sync_timestamp=1593521228698&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-remap-async-to-generator%2Fdownload%2F%40babel%2Fhelper-remap-async-to-generator-7.10.4.tgz", - "integrity": "sha1-/Oi+pOlpC76SMFbe0h5UtOi2jtU=", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.10.4", - "@babel/helper-wrap-function": "^7.10.4", - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.10.4", - "@babel/types": "^7.10.4" - } - }, - "@babel/helper-replace-supers": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-replace-supers/download/@babel/helper-replace-supers-7.10.4.tgz", - "integrity": "sha1-1YXNk4jqBuYDHkzUS2cTy+rZ5s8=", - "dev": true, - "requires": { - "@babel/helper-member-expression-to-functions": "^7.10.4", - "@babel/helper-optimise-call-expression": "^7.10.4", - "@babel/traverse": "^7.10.4", - "@babel/types": "^7.10.4" - } - }, - "@babel/helper-simple-access": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-simple-access/download/@babel/helper-simple-access-7.10.4.tgz?cache=0&sync_timestamp=1593521217867&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-simple-access%2Fdownload%2F%40babel%2Fhelper-simple-access-7.10.4.tgz", - "integrity": "sha1-D1zNopRSd6KnotOoIeFTle3PNGE=", - "dev": true, - "requires": { - "@babel/template": "^7.10.4", - "@babel/types": "^7.10.4" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-split-export-declaration/download/@babel/helper-split-export-declaration-7.10.4.tgz?cache=0&sync_timestamp=1593522826673&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-split-export-declaration%2Fdownload%2F%40babel%2Fhelper-split-export-declaration-7.10.4.tgz", - "integrity": "sha1-LHBXbqo7VgmyTLmdsoiMw/xCUdE=", - "dev": true, - "requires": { - "@babel/types": "^7.10.4" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-validator-identifier/download/@babel/helper-validator-identifier-7.10.4.tgz?cache=0&sync_timestamp=1593522843594&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-validator-identifier%2Fdownload%2F%40babel%2Fhelper-validator-identifier-7.10.4.tgz", - "integrity": "sha1-p4x6clHgH2FlEtMbEK3PUq2l4NI=", - "dev": true - }, - "@babel/helper-wrap-function": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helper-wrap-function/download/@babel/helper-wrap-function-7.10.4.tgz?cache=0&sync_timestamp=1593522949000&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-wrap-function%2Fdownload%2F%40babel%2Fhelper-wrap-function-7.10.4.tgz", - "integrity": "sha1-im9wHqsP8592W1oc/vQJmQ5iS4c=", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.10.4", - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.10.4", - "@babel/types": "^7.10.4" - } - }, - "@babel/helpers": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/helpers/download/@babel/helpers-7.10.4.tgz", - "integrity": "sha1-Kr6w1yGv98Cpc3a54fb2XXpHUEQ=", - "dev": true, - "requires": { - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.10.4", - "@babel/types": "^7.10.4" - } - }, - "@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/highlight/download/@babel/highlight-7.10.4.tgz?cache=0&sync_timestamp=1593522962210&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhighlight%2Fdownload%2F%40babel%2Fhighlight-7.10.4.tgz", - "integrity": "sha1-fRvf1ldTU4+r5sOFls23bZrGAUM=", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@babel/parser": { - "version": "7.10.5", - "resolved": "https://registry.npm.taobao.org/@babel/parser/download/@babel/parser-7.10.5.tgz?cache=0&sync_timestamp=1594750823758&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fparser%2Fdownload%2F%40babel%2Fparser-7.10.5.tgz", - "integrity": "sha1-58a/Wn3v+VfOyfBLVR4nYpCdgms=", - "dev": true - }, - "@babel/plugin-proposal-async-generator-functions": { - "version": "7.10.5", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-async-generator-functions/download/@babel/plugin-proposal-async-generator-functions-7.10.5.tgz?cache=0&sync_timestamp=1594751487997&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-async-generator-functions%2Fdownload%2F%40babel%2Fplugin-proposal-async-generator-functions-7.10.5.tgz", - "integrity": "sha1-NJHKvy98F5q4IGBs7Cf+0V4OhVg=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-remap-async-to-generator": "^7.10.4", - "@babel/plugin-syntax-async-generators": "^7.8.0" - } - }, - "@babel/plugin-proposal-class-properties": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-class-properties/download/@babel/plugin-proposal-class-properties-7.10.4.tgz", - "integrity": "sha1-ozv2Mto5ClnHqMVwBF0RFc13iAc=", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.10.4", - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-proposal-decorators": { - "version": "7.10.5", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-decorators/download/@babel/plugin-proposal-decorators-7.10.5.tgz?cache=0&sync_timestamp=1594751494194&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-decorators%2Fdownload%2F%40babel%2Fplugin-proposal-decorators-7.10.5.tgz", - "integrity": "sha1-QomLukeLxLGuJCpwOpU6etNQ/7Q=", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.10.5", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-decorators": "^7.10.4" - } - }, - "@babel/plugin-proposal-json-strings": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-json-strings/download/@babel/plugin-proposal-json-strings-7.10.4.tgz", - "integrity": "sha1-WT5ZxjUoFgIzvTIbGuvgggwjQds=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-json-strings": "^7.8.0" - } - }, - "@babel/plugin-proposal-object-rest-spread": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-object-rest-spread/download/@babel/plugin-proposal-object-rest-spread-7.10.4.tgz", - "integrity": "sha1-UBKawha5pqVbOFP92SPnS/VTpMA=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.0", - "@babel/plugin-transform-parameters": "^7.10.4" - } - }, - "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-optional-catch-binding/download/@babel/plugin-proposal-optional-catch-binding-7.10.4.tgz", - "integrity": "sha1-Mck4MJ0kp4pJ1o/av/qoY3WFVN0=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.0" - } - }, - "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-unicode-property-regex/download/@babel/plugin-proposal-unicode-property-regex-7.10.4.tgz", - "integrity": "sha1-RIPNpTBBzjQTt/4vAAImZd36p10=", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.10.4", - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-async-generators/download/@babel/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha1-qYP7Gusuw/btBCohD2QOkOeG/g0=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-decorators": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-decorators/download/@babel/plugin-syntax-decorators-7.10.4.tgz", - "integrity": "sha1-aFMIWyxCn50yLQL1pjUBjN6yNgw=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-dynamic-import/download/@babel/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha1-Yr+Ysto80h1iYVT8lu5bPLaOrLM=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-json-strings/download/@babel/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha1-AcohtmjNghjJ5kDLbdiMVBKyyWo=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-jsx": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-jsx/download/@babel/plugin-syntax-jsx-7.10.4.tgz?cache=0&sync_timestamp=1593522939386&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-syntax-jsx%2Fdownload%2F%40babel%2Fplugin-syntax-jsx-7.10.4.tgz", - "integrity": "sha1-Oauq48v3EMQ3PYQpSE5rohNAFmw=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-object-rest-spread/download/@babel/plugin-syntax-object-rest-spread-7.8.3.tgz?cache=0&sync_timestamp=1578950070697&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-syntax-object-rest-spread%2Fdownload%2F%40babel%2Fplugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha1-YOIl7cvZimQDMqLnLdPmbxr1WHE=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-optional-catch-binding/download/@babel/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha1-YRGiZbz7Ag6579D9/X0mQCue1sE=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-transform-arrow-functions": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-arrow-functions/download/@babel/plugin-transform-arrow-functions-7.10.4.tgz?cache=0&sync_timestamp=1593522807583&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-arrow-functions%2Fdownload%2F%40babel%2Fplugin-transform-arrow-functions-7.10.4.tgz", - "integrity": "sha1-4ilg135pfHT0HFAdRNc9v4pqZM0=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-async-to-generator": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-async-to-generator/download/@babel/plugin-transform-async-to-generator-7.10.4.tgz?cache=0&sync_timestamp=1593522851748&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-async-to-generator%2Fdownload%2F%40babel%2Fplugin-transform-async-to-generator-7.10.4.tgz", - "integrity": "sha1-QaUBfknrbzzak5KlHu8pQFskWjc=", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.10.4", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-remap-async-to-generator": "^7.10.4" - } - }, - "@babel/plugin-transform-block-scoped-functions": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-block-scoped-functions/download/@babel/plugin-transform-block-scoped-functions-7.10.4.tgz?cache=0&sync_timestamp=1593521910347&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-block-scoped-functions%2Fdownload%2F%40babel%2Fplugin-transform-block-scoped-functions-7.10.4.tgz", - "integrity": "sha1-GvpZV0T3XkOpGvc7DZmOz+Trwug=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-block-scoping": { - "version": "7.10.5", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-block-scoping/download/@babel/plugin-transform-block-scoping-7.10.5.tgz?cache=0&sync_timestamp=1594751488558&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-block-scoping%2Fdownload%2F%40babel%2Fplugin-transform-block-scoping-7.10.5.tgz", - "integrity": "sha1-uBuKr++/5o8PZffvOXuezmimA30=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-classes": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-classes/download/@babel/plugin-transform-classes-7.10.4.tgz?cache=0&sync_timestamp=1593521236444&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-classes%2Fdownload%2F%40babel%2Fplugin-transform-classes-7.10.4.tgz", - "integrity": "sha1-QFE2rys+IYvEoZJiKLyRerGgrcc=", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.10.4", - "@babel/helper-define-map": "^7.10.4", - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-optimise-call-expression": "^7.10.4", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-replace-supers": "^7.10.4", - "@babel/helper-split-export-declaration": "^7.10.4", - "globals": "^11.1.0" - } - }, - "@babel/plugin-transform-computed-properties": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-computed-properties/download/@babel/plugin-transform-computed-properties-7.10.4.tgz?cache=0&sync_timestamp=1593522921161&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-computed-properties%2Fdownload%2F%40babel%2Fplugin-transform-computed-properties-7.10.4.tgz", - "integrity": "sha1-ne2DqBboLe0o1S1LTsvdgQzfwOs=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-destructuring": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-destructuring/download/@babel/plugin-transform-destructuring-7.10.4.tgz", - "integrity": "sha1-cN3Ss9G+qD0BUJ6bsl3bOnT8heU=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-dotall-regex": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-dotall-regex/download/@babel/plugin-transform-dotall-regex-7.10.4.tgz", - "integrity": "sha1-RpwgYhBcHragQOr0+sS0iAeDle4=", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.10.4", - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-duplicate-keys": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-duplicate-keys/download/@babel/plugin-transform-duplicate-keys-7.10.4.tgz", - "integrity": "sha1-aX5Qyf7hQ4D+hD0fMGspVhdDHkc=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-exponentiation-operator": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-exponentiation-operator/download/@babel/plugin-transform-exponentiation-operator-7.10.4.tgz?cache=0&sync_timestamp=1593521230232&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-exponentiation-operator%2Fdownload%2F%40babel%2Fplugin-transform-exponentiation-operator-7.10.4.tgz", - "integrity": "sha1-WuM4xX+M9AAb2zVgeuZrktZlry4=", - "dev": true, - "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.10.4", - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-for-of": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-for-of/download/@babel/plugin-transform-for-of-7.10.4.tgz", - "integrity": "sha1-wIiS6IGdOl2ykDGxFa9RHbv+uuk=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-function-name": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-function-name/download/@babel/plugin-transform-function-name-7.10.4.tgz", - "integrity": "sha1-akZ4gOD8ljhRS6NpERgR3b4mRLc=", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-literals": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-literals/download/@babel/plugin-transform-literals-7.10.4.tgz", - "integrity": "sha1-n0K6CEEQChNfInEtDjkcRi9XHzw=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-modules-amd": { - "version": "7.10.5", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-modules-amd/download/@babel/plugin-transform-modules-amd-7.10.5.tgz?cache=0&sync_timestamp=1594751493579&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-modules-amd%2Fdownload%2F%40babel%2Fplugin-transform-modules-amd-7.10.5.tgz", - "integrity": "sha1-G5zdrwXZ6Is6rTOcs+RFxPAgqbE=", - "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.10.5", - "@babel/helper-plugin-utils": "^7.10.4", - "babel-plugin-dynamic-import-node": "^2.3.3" - } - }, - "@babel/plugin-transform-modules-commonjs": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-modules-commonjs/download/@babel/plugin-transform-modules-commonjs-7.10.4.tgz", - "integrity": "sha1-ZmZ8Pu2h6/eJbUHx8WsXEFovvKA=", - "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.10.4", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-simple-access": "^7.10.4", - "babel-plugin-dynamic-import-node": "^2.3.3" - } - }, - "@babel/plugin-transform-modules-systemjs": { - "version": "7.10.5", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-modules-systemjs/download/@babel/plugin-transform-modules-systemjs-7.10.5.tgz?cache=0&sync_timestamp=1594751492758&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-modules-systemjs%2Fdownload%2F%40babel%2Fplugin-transform-modules-systemjs-7.10.5.tgz", - "integrity": "sha1-YnAJnIVAZmgbrp4F+H4bnK2+jIU=", - "dev": true, - "requires": { - "@babel/helper-hoist-variables": "^7.10.4", - "@babel/helper-module-transforms": "^7.10.5", - "@babel/helper-plugin-utils": "^7.10.4", - "babel-plugin-dynamic-import-node": "^2.3.3" - } - }, - "@babel/plugin-transform-modules-umd": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-modules-umd/download/@babel/plugin-transform-modules-umd-7.10.4.tgz?cache=0&sync_timestamp=1593522937615&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-modules-umd%2Fdownload%2F%40babel%2Fplugin-transform-modules-umd-7.10.4.tgz", - "integrity": "sha1-moSB/oG4JGVLOgtl2j34nz0hg54=", - "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.10.4", - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-named-capturing-groups-regex/download/@babel/plugin-transform-named-capturing-groups-regex-7.10.4.tgz", - "integrity": "sha1-eLTZeIELbzvPA/njGPL8DtQa7LY=", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.10.4" - } - }, - "@babel/plugin-transform-new-target": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-new-target/download/@babel/plugin-transform-new-target-7.10.4.tgz?cache=0&sync_timestamp=1593522495673&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-new-target%2Fdownload%2F%40babel%2Fplugin-transform-new-target-7.10.4.tgz", - "integrity": "sha1-kJfXU8t7Aky3OBo7LlLpUTqcaIg=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-object-super": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-object-super/download/@babel/plugin-transform-object-super-7.10.4.tgz", - "integrity": "sha1-1xRsTROUM+emUm+IjGZ+MUoJOJQ=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-replace-supers": "^7.10.4" - } - }, - "@babel/plugin-transform-parameters": { - "version": "7.10.5", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-parameters/download/@babel/plugin-transform-parameters-7.10.5.tgz?cache=0&sync_timestamp=1594751489267&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-parameters%2Fdownload%2F%40babel%2Fplugin-transform-parameters-7.10.5.tgz", - "integrity": "sha1-WdM51Y0LGVBDX0BD504lEABeLEo=", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.10.4", - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-regenerator": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-regenerator/download/@babel/plugin-transform-regenerator-7.10.4.tgz?cache=0&sync_timestamp=1593521089707&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-regenerator%2Fdownload%2F%40babel%2Fplugin-transform-regenerator-7.10.4.tgz", - "integrity": "sha1-IBXlnYOQdOdoON4hWdtCGWb9i2M=", - "dev": true, - "requires": { - "regenerator-transform": "^0.14.2" - } - }, - "@babel/plugin-transform-runtime": { - "version": "7.10.5", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-runtime/download/@babel/plugin-transform-runtime-7.10.5.tgz?cache=0&sync_timestamp=1594751489022&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-runtime%2Fdownload%2F%40babel%2Fplugin-transform-runtime-7.10.5.tgz", - "integrity": "sha1-Ozm3skgw4MLY/3pEif5c+Z+6zoY=", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.10.4", - "@babel/helper-plugin-utils": "^7.10.4", - "resolve": "^1.8.1", - "semver": "^5.5.1" - } - }, - "@babel/plugin-transform-shorthand-properties": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-shorthand-properties/download/@babel/plugin-transform-shorthand-properties-7.10.4.tgz", - "integrity": "sha1-n9Jexc3VVbt/Rz5ebuHJce7eTdY=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-spread": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-spread/download/@babel/plugin-transform-spread-7.10.4.tgz?cache=0&sync_timestamp=1593522927458&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-spread%2Fdownload%2F%40babel%2Fplugin-transform-spread-7.10.4.tgz", - "integrity": "sha1-TiyF6g1quu4bJNz7uuQm/o1nTP8=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-sticky-regex": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-sticky-regex/download/@babel/plugin-transform-sticky-regex-7.10.4.tgz", - "integrity": "sha1-jziJ7oZXWBEwop2cyR18c7fEoo0=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-regex": "^7.10.4" - } - }, - "@babel/plugin-transform-template-literals": { - "version": "7.10.5", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-template-literals/download/@babel/plugin-transform-template-literals-7.10.5.tgz?cache=0&sync_timestamp=1594751489580&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-template-literals%2Fdownload%2F%40babel%2Fplugin-transform-template-literals-7.10.5.tgz", - "integrity": "sha1-eLxdYmpmQtszEtnQ8AH152Of3ow=", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.10.4", - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-typeof-symbol": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-typeof-symbol/download/@babel/plugin-transform-typeof-symbol-7.10.4.tgz", - "integrity": "sha1-lQnxp+7DHE7b/+E3wWzDP/C8W/w=", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-unicode-regex": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-transform-unicode-regex/download/@babel/plugin-transform-unicode-regex-7.10.4.tgz?cache=0&sync_timestamp=1593522855498&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-unicode-regex%2Fdownload%2F%40babel%2Fplugin-transform-unicode-regex-7.10.4.tgz", - "integrity": "sha1-5W1x+SgvrG2wnIJ0IFVXbV5tgKg=", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.10.4", - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/preset-env": { - "version": "7.3.4", - "resolved": "https://registry.npm.taobao.org/@babel/preset-env/download/@babel/preset-env-7.3.4.tgz", - "integrity": "sha1-iHzzi20jyC8ZtRNSmL2xYAYuM+E=", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-async-generator-functions": "^7.2.0", - "@babel/plugin-proposal-json-strings": "^7.2.0", - "@babel/plugin-proposal-object-rest-spread": "^7.3.4", - "@babel/plugin-proposal-optional-catch-binding": "^7.2.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.2.0", - "@babel/plugin-syntax-async-generators": "^7.2.0", - "@babel/plugin-syntax-json-strings": "^7.2.0", - "@babel/plugin-syntax-object-rest-spread": "^7.2.0", - "@babel/plugin-syntax-optional-catch-binding": "^7.2.0", - "@babel/plugin-transform-arrow-functions": "^7.2.0", - "@babel/plugin-transform-async-to-generator": "^7.3.4", - "@babel/plugin-transform-block-scoped-functions": "^7.2.0", - "@babel/plugin-transform-block-scoping": "^7.3.4", - "@babel/plugin-transform-classes": "^7.3.4", - "@babel/plugin-transform-computed-properties": "^7.2.0", - "@babel/plugin-transform-destructuring": "^7.2.0", - "@babel/plugin-transform-dotall-regex": "^7.2.0", - "@babel/plugin-transform-duplicate-keys": "^7.2.0", - "@babel/plugin-transform-exponentiation-operator": "^7.2.0", - "@babel/plugin-transform-for-of": "^7.2.0", - "@babel/plugin-transform-function-name": "^7.2.0", - "@babel/plugin-transform-literals": "^7.2.0", - "@babel/plugin-transform-modules-amd": "^7.2.0", - "@babel/plugin-transform-modules-commonjs": "^7.2.0", - "@babel/plugin-transform-modules-systemjs": "^7.3.4", - "@babel/plugin-transform-modules-umd": "^7.2.0", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.3.0", - "@babel/plugin-transform-new-target": "^7.0.0", - "@babel/plugin-transform-object-super": "^7.2.0", - "@babel/plugin-transform-parameters": "^7.2.0", - "@babel/plugin-transform-regenerator": "^7.3.4", - "@babel/plugin-transform-shorthand-properties": "^7.2.0", - "@babel/plugin-transform-spread": "^7.2.0", - "@babel/plugin-transform-sticky-regex": "^7.2.0", - "@babel/plugin-transform-template-literals": "^7.2.0", - "@babel/plugin-transform-typeof-symbol": "^7.2.0", - "@babel/plugin-transform-unicode-regex": "^7.2.0", - "browserslist": "^4.3.4", - "invariant": "^2.2.2", - "js-levenshtein": "^1.1.3", - "semver": "^5.3.0" - } - }, - "@babel/runtime": { - "version": "7.10.5", - "resolved": "https://registry.npm.taobao.org/@babel/runtime/download/@babel/runtime-7.10.5.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fruntime%2Fdownload%2F%40babel%2Fruntime-7.10.5.tgz", - "integrity": "sha1-MD2L1EDs1aSR6uYRf9M2dphnTFw=", - "dev": true, - "requires": { - "regenerator-runtime": "^0.13.4" - } - }, - "@babel/runtime-corejs2": { - "version": "7.10.5", - "resolved": "https://registry.npm.taobao.org/@babel/runtime-corejs2/download/@babel/runtime-corejs2-7.10.5.tgz?cache=0&sync_timestamp=1594751489791&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fruntime-corejs2%2Fdownload%2F%40babel%2Fruntime-corejs2-7.10.5.tgz", - "integrity": "sha1-jaoc7MwEaOXC4V8STj9RwrMDO0k=", - "dev": true, - "requires": { - "core-js": "^2.6.5", - "regenerator-runtime": "^0.13.4" - } - }, - "@babel/template": { - "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/template/download/@babel/template-7.10.4.tgz", - "integrity": "sha1-MlGZbEIA68cdGo/EBfupQPNrong=", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/parser": "^7.10.4", - "@babel/types": "^7.10.4" - } - }, - "@babel/traverse": { - "version": "7.10.5", - "resolved": "https://registry.npm.taobao.org/@babel/traverse/download/@babel/traverse-7.10.5.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Ftraverse%2Fdownload%2F%40babel%2Ftraverse-7.10.5.tgz", - "integrity": "sha1-d85GT1sli+Jlr2GNj93wU28gtWQ=", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.10.5", - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-split-export-declaration": "^7.10.4", - "@babel/parser": "^7.10.5", - "@babel/types": "^7.10.5", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.19" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-4.1.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-4.1.1.tgz", - "integrity": "sha1-O3ImAlUQnGtYnO4FDx1RYTlmR5E=", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true - } - } - }, - "@babel/types": { - "version": "7.10.5", - "resolved": "https://registry.npm.taobao.org/@babel/types/download/@babel/types-7.10.5.tgz?cache=0&sync_timestamp=1594750825865&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Ftypes%2Fdownload%2F%40babel%2Ftypes-7.10.5.tgz", - "integrity": "sha1-2Irn4v3oa/v+hR1Nga+nCpl7XRU=", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.19", - "to-fast-properties": "^2.0.0" - } - }, - "@hapi/address": { - "version": "2.1.4", - "resolved": "https://registry.npm.taobao.org/@hapi/address/download/@hapi/address-2.1.4.tgz?cache=0&sync_timestamp=1593993745797&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40hapi%2Faddress%2Fdownload%2F%40hapi%2Faddress-2.1.4.tgz", - "integrity": "sha1-XWftQ/P9QaadS5/3tW58DR0KgeU=", - "dev": true - }, - "@hapi/bourne": { - "version": "1.3.2", - "resolved": "https://registry.npm.taobao.org/@hapi/bourne/download/@hapi/bourne-1.3.2.tgz", - "integrity": "sha1-CnCVreoGckPOMoPhtWuKj0U7JCo=", - "dev": true - }, - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npm.taobao.org/@hapi/hoek/download/@hapi/hoek-8.5.1.tgz", - "integrity": "sha1-/elgZMpEbeyMVajC8TCVewcMbgY=", - "dev": true - }, - "@hapi/joi": { - "version": "15.1.1", - "resolved": "https://registry.npm.taobao.org/@hapi/joi/download/@hapi/joi-15.1.1.tgz", - "integrity": "sha1-xnW4pxKW8Cgz+NbSQ7NMV7jOGdc=", - "dev": true, - "requires": { - "@hapi/address": "2.x.x", - "@hapi/bourne": "1.x.x", - "@hapi/hoek": "8.x.x", - "@hapi/topo": "3.x.x" - } - }, - "@hapi/topo": { - "version": "3.1.6", - "resolved": "https://registry.npm.taobao.org/@hapi/topo/download/@hapi/topo-3.1.6.tgz?cache=0&sync_timestamp=1593916080558&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40hapi%2Ftopo%2Fdownload%2F%40hapi%2Ftopo-3.1.6.tgz", - "integrity": "sha1-aNk1+j6uf91asNf5U/MgXYsr/Ck=", - "dev": true, - "requires": { - "@hapi/hoek": "^8.3.0" - } - }, - "@intervolga/optimize-cssnano-plugin": { - "version": "1.0.6", - "resolved": "https://registry.npm.taobao.org/@intervolga/optimize-cssnano-plugin/download/@intervolga/optimize-cssnano-plugin-1.0.6.tgz", - "integrity": "sha1-vnx4RhKLiPapsdEmGgrQbrXA/fg=", - "dev": true, - "requires": { - "cssnano": "^4.0.0", - "cssnano-preset-default": "^4.0.0", - "postcss": "^7.0.0" - } - }, - "@mrmlnc/readdir-enhanced": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/@mrmlnc/readdir-enhanced/download/@mrmlnc/readdir-enhanced-2.2.1.tgz", - "integrity": "sha1-UkryQNGjYFJ7cwR17PoTRKpUDd4=", - "dev": true, - "requires": { - "call-me-maybe": "^1.0.1", - "glob-to-regexp": "^0.3.0" - } - }, - "@nodelib/fs.stat": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/@nodelib/fs.stat/download/@nodelib/fs.stat-1.1.3.tgz", - "integrity": "sha1-K1o6s/kYzKSKjHVMCBaOPwPrphs=", - "dev": true - }, - "@soda/friendly-errors-webpack-plugin": { - "version": "1.7.1", - "resolved": "https://registry.npm.taobao.org/@soda/friendly-errors-webpack-plugin/download/@soda/friendly-errors-webpack-plugin-1.7.1.tgz", - "integrity": "sha1-cG9kvLSouWQrSK46zkRMcDNNYV0=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "error-stack-parser": "^2.0.0", - "string-width": "^2.0.0" - } - }, - "@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/@types/color-name/download/@types/color-name-1.1.1.tgz", - "integrity": "sha1-HBJhu+qhCoBVu8XYq4S3sq/IRqA=", - "dev": true - }, - "@types/glob": { - "version": "7.1.3", - "resolved": "https://registry.npm.taobao.org/@types/glob/download/@types/glob-7.1.3.tgz", - "integrity": "sha1-5rqA82t9qtLGhazZJmOC5omFwYM=", - "dev": true, - "requires": { - "@types/minimatch": "*", - "@types/node": "*" - } - }, - "@types/json-schema": { - "version": "7.0.5", - "resolved": "https://registry.npm.taobao.org/@types/json-schema/download/@types/json-schema-7.0.5.tgz?cache=0&sync_timestamp=1591720749429&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fjson-schema%2Fdownload%2F%40types%2Fjson-schema-7.0.5.tgz", - "integrity": "sha1-3M5EMOZLRDuolF8CkPtWStW6xt0=", - "dev": true - }, - "@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npm.taobao.org/@types/json5/download/@types/json5-0.0.29.tgz?cache=0&sync_timestamp=1588201498029&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fjson5%2Fdownload%2F%40types%2Fjson5-0.0.29.tgz", - "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", - "dev": true - }, - "@types/minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npm.taobao.org/@types/minimatch/download/@types/minimatch-3.0.3.tgz", - "integrity": "sha1-PcoOPzOyAPx9ETnAzZbBJoyt/Z0=", - "dev": true - }, - "@types/node": { - "version": "14.0.24", - "resolved": "https://registry.npm.taobao.org/@types/node/download/@types/node-14.0.24.tgz?cache=0&sync_timestamp=1595281751560&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fnode%2Fdownload%2F%40types%2Fnode-14.0.24.tgz", - "integrity": "sha1-sPhvWFZPoCooto+LVdTN7ELjudY=", - "dev": true - }, - "@types/normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npm.taobao.org/@types/normalize-package-data/download/@types/normalize-package-data-2.4.0.tgz", - "integrity": "sha1-5IbQ2XOW15vu3QpuM/RTT/a0lz4=", - "dev": true - }, - "@types/q": { - "version": "1.5.4", - "resolved": "https://registry.npm.taobao.org/@types/q/download/@types/q-1.5.4.tgz", - "integrity": "sha1-FZJUFOCtLNdlv+9YhC9+JqesyyQ=", - "dev": true - }, - "@vue/babel-helper-vue-jsx-merge-props": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/@vue/babel-helper-vue-jsx-merge-props/download/@vue/babel-helper-vue-jsx-merge-props-1.0.0.tgz", - "integrity": "sha1-BI/leZWNpAj7eosqPsBQtQpmEEA=", - "dev": true - }, - "@vue/babel-plugin-transform-vue-jsx": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/@vue/babel-plugin-transform-vue-jsx/download/@vue/babel-plugin-transform-vue-jsx-1.1.2.tgz", - "integrity": "sha1-wKPm78Ai515CR7RIqPxrhvA+kcA=", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/plugin-syntax-jsx": "^7.2.0", - "@vue/babel-helper-vue-jsx-merge-props": "^1.0.0", - "html-tags": "^2.0.0", - "lodash.kebabcase": "^4.1.1", - "svg-tags": "^1.0.0" - } - }, - "@vue/babel-preset-app": { - "version": "3.12.1", - "resolved": "https://registry.npm.taobao.org/@vue/babel-preset-app/download/@vue/babel-preset-app-3.12.1.tgz", - "integrity": "sha1-JMR3BS8HjzD9t3NRA7FN0fosv+E=", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/plugin-proposal-class-properties": "^7.0.0", - "@babel/plugin-proposal-decorators": "^7.1.0", - "@babel/plugin-syntax-dynamic-import": "^7.0.0", - "@babel/plugin-syntax-jsx": "^7.0.0", - "@babel/plugin-transform-runtime": "^7.4.0", - "@babel/preset-env": "^7.0.0 < 7.4.0", - "@babel/runtime": "^7.0.0", - "@babel/runtime-corejs2": "^7.2.0", - "@vue/babel-preset-jsx": "^1.0.0", - "babel-plugin-dynamic-import-node": "^2.2.0", - "babel-plugin-module-resolver": "3.2.0", - "core-js": "^2.6.5" - } - }, - "@vue/babel-preset-jsx": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/@vue/babel-preset-jsx/download/@vue/babel-preset-jsx-1.1.2.tgz", - "integrity": "sha1-LhaetMIE6jfKZsLqhaiAv8mdTyA=", - "dev": true, - "requires": { - "@vue/babel-helper-vue-jsx-merge-props": "^1.0.0", - "@vue/babel-plugin-transform-vue-jsx": "^1.1.2", - "@vue/babel-sugar-functional-vue": "^1.1.2", - "@vue/babel-sugar-inject-h": "^1.1.2", - "@vue/babel-sugar-v-model": "^1.1.2", - "@vue/babel-sugar-v-on": "^1.1.2" - } - }, - "@vue/babel-sugar-functional-vue": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/@vue/babel-sugar-functional-vue/download/@vue/babel-sugar-functional-vue-1.1.2.tgz", - "integrity": "sha1-9+JPugnm8e5wEEVgqICAV1VfGpo=", - "dev": true, - "requires": { - "@babel/plugin-syntax-jsx": "^7.2.0" - } - }, - "@vue/babel-sugar-inject-h": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/@vue/babel-sugar-inject-h/download/@vue/babel-sugar-inject-h-1.1.2.tgz", - "integrity": "sha1-ilJ2ttji7Rb/yAeKrZQjYnTm7fA=", - "dev": true, - "requires": { - "@babel/plugin-syntax-jsx": "^7.2.0" - } - }, - "@vue/babel-sugar-v-model": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/@vue/babel-sugar-v-model/download/@vue/babel-sugar-v-model-1.1.2.tgz", - "integrity": "sha1-H/b9G4ACI/ycsehNzrXlLXN6gZI=", - "dev": true, - "requires": { - "@babel/plugin-syntax-jsx": "^7.2.0", - "@vue/babel-helper-vue-jsx-merge-props": "^1.0.0", - "@vue/babel-plugin-transform-vue-jsx": "^1.1.2", - "camelcase": "^5.0.0", - "html-tags": "^2.0.0", - "svg-tags": "^1.0.0" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-5.3.1.tgz", - "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", - "dev": true - } - } - }, - "@vue/babel-sugar-v-on": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/@vue/babel-sugar-v-on/download/@vue/babel-sugar-v-on-1.1.2.tgz", - "integrity": "sha1-su+ZuPL6sJ++rSWq1w70Lhz1sTs=", - "dev": true, - "requires": { - "@babel/plugin-syntax-jsx": "^7.2.0", - "@vue/babel-plugin-transform-vue-jsx": "^1.1.2", - "camelcase": "^5.0.0" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-5.3.1.tgz", - "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", - "dev": true - } - } - }, - "@vue/cli-overlay": { - "version": "3.12.1", - "resolved": "https://registry.npm.taobao.org/@vue/cli-overlay/download/@vue/cli-overlay-3.12.1.tgz?cache=0&sync_timestamp=1592976328085&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fcli-overlay%2Fdownload%2F%40vue%2Fcli-overlay-3.12.1.tgz", - "integrity": "sha1-vf3o9xI1YasG5OTGC4VMxQkvWrE=", - "dev": true - }, - "@vue/cli-plugin-babel": { - "version": "3.12.1", - "resolved": "https://registry.npm.taobao.org/@vue/cli-plugin-babel/download/@vue/cli-plugin-babel-3.12.1.tgz", - "integrity": "sha1-mnkVnejNCGsBP6bXijmDCy4uxwY=", - "dev": true, - "requires": { - "@babel/core": "^7.0.0", - "@vue/babel-preset-app": "^3.12.1", - "@vue/cli-shared-utils": "^3.12.1", - "babel-loader": "^8.0.5", - "webpack": "^4.0.0" - } - }, - "@vue/cli-plugin-eslint": { - "version": "3.12.1", - "resolved": "https://registry.npm.taobao.org/@vue/cli-plugin-eslint/download/@vue/cli-plugin-eslint-3.12.1.tgz", - "integrity": "sha1-MCxGOGfzjnkLuZbq/fcVnHgtyM8=", - "dev": true, - "requires": { - "@vue/cli-shared-utils": "^3.12.1", - "babel-eslint": "^10.0.1", - "eslint": "^4.19.1", - "eslint-loader": "^2.1.2", - "eslint-plugin-vue": "^4.7.1", - "globby": "^9.2.0", - "webpack": "^4.0.0", - "yorkie": "^2.0.0" - } - }, - "@vue/cli-plugin-unit-mocha": { - "version": "3.12.1", - "resolved": "https://registry.npm.taobao.org/@vue/cli-plugin-unit-mocha/download/@vue/cli-plugin-unit-mocha-3.12.1.tgz?cache=0&sync_timestamp=1592978125871&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fcli-plugin-unit-mocha%2Fdownload%2F%40vue%2Fcli-plugin-unit-mocha-3.12.1.tgz", - "integrity": "sha1-lwxTZHW/RwqoVLDUzEFO2bJCZjY=", - "dev": true, - "requires": { - "@vue/cli-shared-utils": "^3.12.1", - "jsdom": "^13.2.0", - "jsdom-global": "^3.0.2", - "mocha": "^5.2.0", - "mocha-webpack": "^2.0.0-beta.0" - } - }, - "@vue/cli-service": { - "version": "3.12.1", - "resolved": "https://registry.npm.taobao.org/@vue/cli-service/download/@vue/cli-service-3.12.1.tgz", - "integrity": "sha1-EyILHBiSVOfAAzkN8ykIb5tud+Y=", - "dev": true, - "requires": { - "@intervolga/optimize-cssnano-plugin": "^1.0.5", - "@soda/friendly-errors-webpack-plugin": "^1.7.1", - "@vue/cli-overlay": "^3.12.1", - "@vue/cli-shared-utils": "^3.12.1", - "@vue/component-compiler-utils": "^3.0.0", - "@vue/preload-webpack-plugin": "^1.1.0", - "@vue/web-component-wrapper": "^1.2.0", - "acorn": "^6.1.1", - "acorn-walk": "^6.1.1", - "address": "^1.0.3", - "autoprefixer": "^9.5.1", - "browserslist": "^4.5.4", - "cache-loader": "^2.0.1", - "case-sensitive-paths-webpack-plugin": "^2.2.0", - "chalk": "^2.4.2", - "cli-highlight": "^2.1.0", - "clipboardy": "^2.0.0", - "cliui": "^5.0.0", - "copy-webpack-plugin": "^4.6.0", - "css-loader": "^1.0.1", - "cssnano": "^4.1.10", - "current-script-polyfill": "^1.0.0", - "debug": "^4.1.1", - "default-gateway": "^5.0.2", - "dotenv": "^7.0.0", - "dotenv-expand": "^5.1.0", - "escape-string-regexp": "^1.0.5", - "file-loader": "^3.0.1", - "fs-extra": "^7.0.1", - "globby": "^9.2.0", - "hash-sum": "^1.0.2", - "html-webpack-plugin": "^3.2.0", - "launch-editor-middleware": "^2.2.1", - "lodash.defaultsdeep": "^4.6.1", - "lodash.mapvalues": "^4.6.0", - "lodash.transform": "^4.6.0", - "mini-css-extract-plugin": "^0.8.0", - "minimist": "^1.2.0", - "ora": "^3.4.0", - "portfinder": "^1.0.20", - "postcss-loader": "^3.0.0", - "read-pkg": "^5.0.0", - "semver": "^6.0.0", - "slash": "^2.0.0", - "source-map-url": "^0.4.0", - "ssri": "^6.0.1", - "string.prototype.padend": "^3.0.0", - "terser-webpack-plugin": "^1.2.3", - "thread-loader": "^2.1.2", - "url-loader": "^1.1.2", - "vue-loader": "^15.7.0", - "webpack": "^4.0.0", - "webpack-bundle-analyzer": "^3.3.0", - "webpack-chain": "^4.11.0", - "webpack-dev-server": "^3.4.1", - "webpack-merge": "^4.2.1" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-4.1.0.tgz", - "integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npm.taobao.org/cliui/download/cliui-5.0.0.tgz", - "integrity": "sha1-3u/P2y6AB4SqNPRvoI4GhRx7u8U=", - "dev": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-4.1.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-4.1.1.tgz", - "integrity": "sha1-O3ImAlUQnGtYnO4FDx1RYTlmR5E=", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npm.taobao.org/emoji-regex/download/emoji-regex-7.0.3.tgz", - "integrity": "sha1-kzoEBShgyF6DwSJHnEdIqOTHIVY=", - "dev": true - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1586886301819&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz", - "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-3.1.0.tgz", - "integrity": "sha1-InZ74htirxCBV0MG9prFG2IgOWE=", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-5.2.0.tgz", - "integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npm.taobao.org/wrap-ansi/download/wrap-ansi-5.1.0.tgz", - "integrity": "sha1-H9H2cjXVttD+54EFYAG/tpTAOwk=", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } - } - } - }, - "@vue/cli-shared-utils": { - "version": "3.12.1", - "resolved": "https://registry.npm.taobao.org/@vue/cli-shared-utils/download/@vue/cli-shared-utils-3.12.1.tgz", - "integrity": "sha1-vPB2KH3a3uu7l8anSN/p/1DsjfA=", - "dev": true, - "requires": { - "@hapi/joi": "^15.0.1", - "chalk": "^2.4.1", - "execa": "^1.0.0", - "launch-editor": "^2.2.1", - "lru-cache": "^5.1.1", - "node-ipc": "^9.1.1", - "open": "^6.3.0", - "ora": "^3.4.0", - "request": "^2.87.0", - "request-promise-native": "^1.0.7", - "semver": "^6.0.0", - "string.prototype.padstart": "^3.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1586886301819&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz", - "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@vue/component-compiler-utils": { - "version": "3.1.2", - "resolved": "https://registry.npm.taobao.org/@vue/component-compiler-utils/download/@vue/component-compiler-utils-3.1.2.tgz", - "integrity": "sha1-ghOl/zIC+fITf+VTcPnouWVggcM=", - "dev": true, - "requires": { - "consolidate": "^0.15.1", - "hash-sum": "^1.0.2", - "lru-cache": "^4.1.2", - "merge-source-map": "^1.1.0", - "postcss": "^7.0.14", - "postcss-selector-parser": "^6.0.2", - "prettier": "^1.18.2", - "source-map": "~0.6.1", - "vue-template-es2015-compiler": "^1.9.0" - }, - "dependencies": { - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-4.1.5.tgz?cache=0&sync_timestamp=1594427569171&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flru-cache%2Fdownload%2Flru-cache-4.1.5.tgz", - "integrity": "sha1-i75Q6oW+1ZvJ4z3KuCNe6bz0Q80=", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - } - } - }, - "@vue/eslint-config-standard": { - "version": "3.0.5", - "resolved": "https://registry.npm.taobao.org/@vue/eslint-config-standard/download/@vue/eslint-config-standard-3.0.5.tgz", - "integrity": "sha1-fWroCerskJk8YDPZVD9I9oe56/E=", - "dev": true, - "requires": { - "eslint-config-standard": "^12.0.0-alpha.0", - "eslint-plugin-import": "^2.11.0", - "eslint-plugin-node": "^6.0.1", - "eslint-plugin-promise": "^3.7.0", - "eslint-plugin-standard": "^3.1.0" - } - }, - "@vue/preload-webpack-plugin": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/@vue/preload-webpack-plugin/download/@vue/preload-webpack-plugin-1.1.1.tgz", - "integrity": "sha1-GHI1MNME9EMCHaIpLW7JUCgmEEo=", - "dev": true - }, - "@vue/test-utils": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/@vue/test-utils/download/@vue/test-utils-1.0.3.tgz", - "integrity": "sha1-WHxN2bQktmAi8YjBm8YF2izpHG8=", - "dev": true, - "requires": { - "dom-event-types": "^1.0.0", - "lodash": "^4.17.15", - "pretty": "^2.0.0" - } - }, - "@vue/web-component-wrapper": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/@vue/web-component-wrapper/download/@vue/web-component-wrapper-1.2.0.tgz", - "integrity": "sha1-uw5G8VhafiibTuYGfcxaauYvHdE=", - "dev": true - }, - "@webassemblyjs/ast": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/ast/download/@webassemblyjs/ast-1.9.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fast%2Fdownload%2F%40webassemblyjs%2Fast-1.9.0.tgz", - "integrity": "sha1-vYUGBLQEJFmlpBzX0zjL7Wle2WQ=", - "dev": true, - "requires": { - "@webassemblyjs/helper-module-context": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/wast-parser": "1.9.0" - } - }, - "@webassemblyjs/floating-point-hex-parser": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/floating-point-hex-parser/download/@webassemblyjs/floating-point-hex-parser-1.9.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Ffloating-point-hex-parser%2Fdownload%2F%40webassemblyjs%2Ffloating-point-hex-parser-1.9.0.tgz", - "integrity": "sha1-PD07Jxvd/ITesA9xNEQ4MR1S/7Q=", - "dev": true - }, - "@webassemblyjs/helper-api-error": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/helper-api-error/download/@webassemblyjs/helper-api-error-1.9.0.tgz", - "integrity": "sha1-ID9nbjM7lsnaLuqzzO8zxFkotqI=", - "dev": true - }, - "@webassemblyjs/helper-buffer": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/helper-buffer/download/@webassemblyjs/helper-buffer-1.9.0.tgz?cache=0&sync_timestamp=1580600188490&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fhelper-buffer%2Fdownload%2F%40webassemblyjs%2Fhelper-buffer-1.9.0.tgz", - "integrity": "sha1-oUQtJpxf6yP8vJ73WdrDVH8p3gA=", - "dev": true - }, - "@webassemblyjs/helper-code-frame": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/helper-code-frame/download/@webassemblyjs/helper-code-frame-1.9.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fhelper-code-frame%2Fdownload%2F%40webassemblyjs%2Fhelper-code-frame-1.9.0.tgz", - "integrity": "sha1-ZH+Iks0gQ6gqwMjF51w28dkVnyc=", - "dev": true, - "requires": { - "@webassemblyjs/wast-printer": "1.9.0" - } - }, - "@webassemblyjs/helper-fsm": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/helper-fsm/download/@webassemblyjs/helper-fsm-1.9.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fhelper-fsm%2Fdownload%2F%40webassemblyjs%2Fhelper-fsm-1.9.0.tgz", - "integrity": "sha1-wFJWtxJEIUZx9LCOwQitY7cO3bg=", - "dev": true - }, - "@webassemblyjs/helper-module-context": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/helper-module-context/download/@webassemblyjs/helper-module-context-1.9.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fhelper-module-context%2Fdownload%2F%40webassemblyjs%2Fhelper-module-context-1.9.0.tgz", - "integrity": "sha1-JdiIS3aDmHGgimxvgGw5ee9xLwc=", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.9.0" - } - }, - "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/helper-wasm-bytecode/download/@webassemblyjs/helper-wasm-bytecode-1.9.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fhelper-wasm-bytecode%2Fdownload%2F%40webassemblyjs%2Fhelper-wasm-bytecode-1.9.0.tgz", - "integrity": "sha1-T+2L6sm4wU+MWLcNEk1UndH+V5A=", - "dev": true - }, - "@webassemblyjs/helper-wasm-section": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/helper-wasm-section/download/@webassemblyjs/helper-wasm-section-1.9.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fhelper-wasm-section%2Fdownload%2F%40webassemblyjs%2Fhelper-wasm-section-1.9.0.tgz", - "integrity": "sha1-WkE41aYpK6GLBMWuSXF+QWeWU0Y=", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-buffer": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/wasm-gen": "1.9.0" - } - }, - "@webassemblyjs/ieee754": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/ieee754/download/@webassemblyjs/ieee754-1.9.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fieee754%2Fdownload%2F%40webassemblyjs%2Fieee754-1.9.0.tgz", - "integrity": "sha1-Fceg+6roP7JhQ7us9tbfFwKtOeQ=", - "dev": true, - "requires": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "@webassemblyjs/leb128": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/leb128/download/@webassemblyjs/leb128-1.9.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fleb128%2Fdownload%2F%40webassemblyjs%2Fleb128-1.9.0.tgz", - "integrity": "sha1-8Zygt2ptxVYjoJz/p2noOPoeHJU=", - "dev": true, - "requires": { - "@xtuc/long": "4.2.2" - } - }, - "@webassemblyjs/utf8": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/utf8/download/@webassemblyjs/utf8-1.9.0.tgz", - "integrity": "sha1-BNM7Y2945qaBMifoJAL3Y3tiKas=", - "dev": true - }, - "@webassemblyjs/wasm-edit": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/wasm-edit/download/@webassemblyjs/wasm-edit-1.9.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fwasm-edit%2Fdownload%2F%40webassemblyjs%2Fwasm-edit-1.9.0.tgz", - "integrity": "sha1-P+bXnT8PkiGDqoYALELdJWz+6c8=", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-buffer": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/helper-wasm-section": "1.9.0", - "@webassemblyjs/wasm-gen": "1.9.0", - "@webassemblyjs/wasm-opt": "1.9.0", - "@webassemblyjs/wasm-parser": "1.9.0", - "@webassemblyjs/wast-printer": "1.9.0" - } - }, - "@webassemblyjs/wasm-gen": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/wasm-gen/download/@webassemblyjs/wasm-gen-1.9.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fwasm-gen%2Fdownload%2F%40webassemblyjs%2Fwasm-gen-1.9.0.tgz", - "integrity": "sha1-ULxw7Gje2OJ2OwGhQYv0NJGnpJw=", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/ieee754": "1.9.0", - "@webassemblyjs/leb128": "1.9.0", - "@webassemblyjs/utf8": "1.9.0" - } - }, - "@webassemblyjs/wasm-opt": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/wasm-opt/download/@webassemblyjs/wasm-opt-1.9.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fwasm-opt%2Fdownload%2F%40webassemblyjs%2Fwasm-opt-1.9.0.tgz", - "integrity": "sha1-IhEYHlsxMmRDzIES658LkChyGmE=", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-buffer": "1.9.0", - "@webassemblyjs/wasm-gen": "1.9.0", - "@webassemblyjs/wasm-parser": "1.9.0" - } - }, - "@webassemblyjs/wasm-parser": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/wasm-parser/download/@webassemblyjs/wasm-parser-1.9.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fwasm-parser%2Fdownload%2F%40webassemblyjs%2Fwasm-parser-1.9.0.tgz", - "integrity": "sha1-nUjkSCbfSmWYKUqmyHRp1kL/9l4=", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-api-error": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/ieee754": "1.9.0", - "@webassemblyjs/leb128": "1.9.0", - "@webassemblyjs/utf8": "1.9.0" - } - }, - "@webassemblyjs/wast-parser": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/wast-parser/download/@webassemblyjs/wast-parser-1.9.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fwast-parser%2Fdownload%2F%40webassemblyjs%2Fwast-parser-1.9.0.tgz", - "integrity": "sha1-MDERXXmsW9JhVWzsw/qQo+9FGRQ=", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/floating-point-hex-parser": "1.9.0", - "@webassemblyjs/helper-api-error": "1.9.0", - "@webassemblyjs/helper-code-frame": "1.9.0", - "@webassemblyjs/helper-fsm": "1.9.0", - "@xtuc/long": "4.2.2" - } - }, - "@webassemblyjs/wast-printer": { - "version": "1.9.0", - "resolved": "https://registry.npm.taobao.org/@webassemblyjs/wast-printer/download/@webassemblyjs/wast-printer-1.9.0.tgz?cache=0&sync_timestamp=1580599638157&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40webassemblyjs%2Fwast-printer%2Fdownload%2F%40webassemblyjs%2Fwast-printer-1.9.0.tgz", - "integrity": "sha1-STXVTIX+9jewDOn1I3dFHQDUeJk=", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/wast-parser": "1.9.0", - "@xtuc/long": "4.2.2" - } - }, - "@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/@xtuc/ieee754/download/@xtuc/ieee754-1.2.0.tgz", - "integrity": "sha1-7vAUoxRa5Hehy8AM0eVSM23Ot5A=", - "dev": true - }, - "@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npm.taobao.org/@xtuc/long/download/@xtuc/long-4.2.2.tgz", - "integrity": "sha1-0pHGpOl5ibXGHZrPOWrk/hM6cY0=", - "dev": true - }, - "abab": { - "version": "2.0.3", - "resolved": "https://registry.npm.taobao.org/abab/download/abab-2.0.3.tgz", - "integrity": "sha1-Yj4gdeAustPyR15J+ZyRhGRnkHo=", - "dev": true - }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/abbrev/download/abbrev-1.1.1.tgz", - "integrity": "sha1-+PLIh60Qv2f2NPAFtph/7TF5qsg=", - "dev": true - }, - "accepts": { - "version": "1.3.7", - "resolved": "https://registry.npm.taobao.org/accepts/download/accepts-1.3.7.tgz", - "integrity": "sha1-UxvHJlF6OytB+FACHGzBXqq1B80=", - "dev": true, - "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" - } - }, - "acorn": { - "version": "6.4.1", - "resolved": "https://registry.npm.taobao.org/acorn/download/acorn-6.4.1.tgz?cache=0&sync_timestamp=1591869432510&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Facorn%2Fdownload%2Facorn-6.4.1.tgz", - "integrity": "sha1-Ux5Yuj9RudrLmmZGyk3r9bFMpHQ=", - "dev": true - }, - "acorn-globals": { - "version": "4.3.4", - "resolved": "https://registry.npm.taobao.org/acorn-globals/download/acorn-globals-4.3.4.tgz", - "integrity": "sha1-n6GSat3BHJcwjE5m163Q1Awycuc=", - "dev": true, - "requires": { - "acorn": "^6.0.1", - "acorn-walk": "^6.0.1" - } - }, - "acorn-jsx": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/acorn-jsx/download/acorn-jsx-3.0.1.tgz", - "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", - "dev": true, - "optional": true, - "requires": { - "acorn": "^3.0.4" - }, - "dependencies": { - "acorn": { - "version": "3.3.0", - "resolved": "https://registry.npm.taobao.org/acorn/download/acorn-3.3.0.tgz?cache=0&sync_timestamp=1591869432510&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Facorn%2Fdownload%2Facorn-3.3.0.tgz", - "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", - "dev": true, - "optional": true - } - } - }, - "acorn-walk": { - "version": "6.2.0", - "resolved": "https://registry.npm.taobao.org/acorn-walk/download/acorn-walk-6.2.0.tgz", - "integrity": "sha1-Ejy487hMIXHx9/slJhWxx4prGow=", - "dev": true - }, - "address": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/address/download/address-1.1.2.tgz?cache=0&sync_timestamp=1588851806210&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Faddress%2Fdownload%2Faddress-1.1.2.tgz", - "integrity": "sha1-vxEWycdYxRt6kz0pa3LCIe2UKLY=", - "dev": true - }, - "adler-32": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/adler-32/download/adler-32-1.2.0.tgz", - "integrity": "sha1-aj5r8KY5ALoVZSgIyxXGgT0aXyU=", - "requires": { - "exit-on-epipe": "~1.0.1", - "printj": "~1.1.0" - } - }, - "aggregate-error": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/aggregate-error/download/aggregate-error-3.0.1.tgz?cache=0&sync_timestamp=1570167911603&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Faggregate-error%2Fdownload%2Faggregate-error-3.0.1.tgz", - "integrity": "sha1-2y/nJG5Tb0DZtUQqOeEX191qJOA=", - "dev": true, - "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - } - }, - "ajv": { - "version": "6.12.3", - "resolved": "https://registry.npm.taobao.org/ajv/download/ajv-6.12.3.tgz", - "integrity": "sha1-GMWvOKER3etPJpe9eNaKvByr1wY=", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ajv-errors": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/ajv-errors/download/ajv-errors-1.0.1.tgz", - "integrity": "sha1-81mGrOuRr63sQQL72FAUlQzvpk0=", - "dev": true - }, - "ajv-keywords": { - "version": "3.5.1", - "resolved": "https://registry.npm.taobao.org/ajv-keywords/download/ajv-keywords-3.5.1.tgz", - "integrity": "sha1-uDyonF1C1pAx9CTK1JqtoCNsaVc=", - "dev": true - }, - "align-text": { - "version": "0.1.4", - "resolved": "https://registry.npm.taobao.org/align-text/download/align-text-0.1.4.tgz", - "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", - "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" - } - }, - "alphanum-sort": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/alphanum-sort/download/alphanum-sort-1.0.2.tgz", - "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", - "dev": true - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/amdefine/download/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" - }, - "ansi-colors": { - "version": "3.2.4", - "resolved": "https://registry.npm.taobao.org/ansi-colors/download/ansi-colors-3.2.4.tgz", - "integrity": "sha1-46PaS/uubIapwoViXeEkojQCb78=", - "dev": true - }, - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npm.taobao.org/ansi-escapes/download/ansi-escapes-3.2.0.tgz", - "integrity": "sha1-h4C5j/nb9WOBUtHx/lwde0RCl2s=", - "dev": true, - "optional": true - }, - "ansi-html": { - "version": "0.0.7", - "resolved": "https://registry.npm.taobao.org/ansi-html/download/ansi-html-0.0.7.tgz", - "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "any-observable": { - "version": "0.2.0", - "resolved": "https://registry.npm.taobao.org/any-observable/download/any-observable-0.2.0.tgz", - "integrity": "sha1-xnhwBYADV5AJCD9UrAq6+1wz0kI=", - "dev": true - }, - "any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npm.taobao.org/any-promise/download/any-promise-1.3.0.tgz", - "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", - "dev": true - }, - "anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npm.taobao.org/anymatch/download/anymatch-3.1.1.tgz", - "integrity": "sha1-xV7PAhheJGklk5kxDBc84xIzsUI=", - "dev": true, - "optional": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "app-root-path": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/app-root-path/download/app-root-path-2.2.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fapp-root-path%2Fdownload%2Fapp-root-path-2.2.1.tgz", - "integrity": "sha1-0N9KaC7kCCc1g9Q/b3npiSYkvJo=", - "dev": true - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/aproba/download/aproba-1.2.0.tgz", - "integrity": "sha1-aALmJk79GMeQobDVF/DyYnvyyUo=", - "dev": true - }, - "arch": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/arch/download/arch-2.1.2.tgz", - "integrity": "sha1-DFK75zRLtPomDEQ9LLrZwA/y8L8=", - "dev": true - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npm.taobao.org/argparse/download/argparse-1.0.10.tgz", - "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/arr-diff/download/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/arr-flatten/download/arr-flatten-1.1.0.tgz", - "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/arr-union/download/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, - "array-equal": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/array-equal/download/array-equal-1.0.0.tgz", - "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", - "dev": true - }, - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/array-flatten/download/array-flatten-1.1.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Farray-flatten%2Fdownload%2Farray-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true - }, - "array-includes": { - "version": "3.1.1", - "resolved": "https://registry.npm.taobao.org/array-includes/download/array-includes-3.1.1.tgz", - "integrity": "sha1-zdZ+aFK9+cEhVGB4ZzIlXtJFk0g=", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0", - "is-string": "^1.0.5" - } - }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/array-union/download/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "dev": true, - "requires": { - "array-uniq": "^1.0.1" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/array-uniq/download/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npm.taobao.org/array-unique/download/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "array.prototype.flat": { - "version": "1.2.3", - "resolved": "https://registry.npm.taobao.org/array.prototype.flat/download/array.prototype.flat-1.2.3.tgz", - "integrity": "sha1-DegrQmsDGNv9uUAInjiwQ9N/bHs=", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - } - }, - "asap": { - "version": "2.0.6", - "resolved": "https://registry.npm.taobao.org/asap/download/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", - "dev": true, - "optional": true - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npm.taobao.org/asn1/download/asn1-0.2.4.tgz", - "integrity": "sha1-jSR136tVO7M+d7VOWeiAu4ziMTY=", - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npm.taobao.org/asn1.js/download/asn1.js-4.10.1.tgz", - "integrity": "sha1-ucK/WAXx5kqt7tbfOiv6+1pz9aA=", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-4.11.9.tgz", - "integrity": "sha1-JtVWgpRY+dHoH8SJUkk9C6NQeCg=", - "dev": true - } - } - }, - "assert": { - "version": "1.5.0", - "resolved": "https://registry.npm.taobao.org/assert/download/assert-1.5.0.tgz", - "integrity": "sha1-VcEJqvbgrv2z3EtxJAxwv1dLGOs=", - "dev": true, - "requires": { - "object-assign": "^4.1.1", - "util": "0.10.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npm.taobao.org/util/download/util-0.10.3.tgz?cache=0&sync_timestamp=1588238457176&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Futil%2Fdownload%2Futil-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "2.0.1" - } - } - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/assert-plus/download/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - }, - "assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/assertion-error/download/assertion-error-1.1.0.tgz", - "integrity": "sha1-5gtrDo8wG9l+U3UhW9pAbIURjAs=", - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/assign-symbols/download/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, - "async": { - "version": "2.6.3", - "resolved": "https://registry.npm.taobao.org/async/download/async-2.6.3.tgz", - "integrity": "sha1-1yYl4jRKNlbjo61Pp0n6gymdgv8=", - "dev": true, - "requires": { - "lodash": "^4.17.14" - } - }, - "async-each": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/async-each/download/async-each-1.0.3.tgz", - "integrity": "sha1-tyfb+H12UWAvBvTUrDh/R9kbDL8=", - "dev": true - }, - "async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/async-limiter/download/async-limiter-1.0.1.tgz?cache=0&sync_timestamp=1574272018408&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fasync-limiter%2Fdownload%2Fasync-limiter-1.0.1.tgz", - "integrity": "sha1-3TeelPDbgxCwgpH51kwyCXZmF/0=", - "dev": true - }, - "async-validator": { - "version": "1.12.2", - "resolved": "https://registry.npm.taobao.org/async-validator/download/async-validator-1.12.2.tgz", - "integrity": "sha1-vq5nHnF00pOLe0tp0vt+cit/1yw=" - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/atob/download/atob-2.1.2.tgz", - "integrity": "sha1-bZUX654DDSQ2ZmZR6GvZ9vE1M8k=", - "dev": true - }, - "autoprefixer": { - "version": "9.8.5", - "resolved": "https://registry.npm.taobao.org/autoprefixer/download/autoprefixer-9.8.5.tgz?cache=0&sync_timestamp=1594444612318&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fautoprefixer%2Fdownload%2Fautoprefixer-9.8.5.tgz", - "integrity": "sha1-LCJd4indr+HRQkwCeR0MPhDMzKo=", - "dev": true, - "requires": { - "browserslist": "^4.12.0", - "caniuse-lite": "^1.0.30001097", - "colorette": "^1.2.0", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "postcss": "^7.0.32", - "postcss-value-parser": "^4.1.0" - } - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npm.taobao.org/aws-sign2/download/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true - }, - "aws4": { - "version": "1.10.0", - "resolved": "https://registry.npm.taobao.org/aws4/download/aws4-1.10.0.tgz", - "integrity": "sha1-oXs6jqgRBg501H0wYSJACtRJeuI=", - "dev": true - }, - "axios": { - "version": "0.18.1", - "resolved": "https://registry.npm.taobao.org/axios/download/axios-0.18.1.tgz", - "integrity": "sha1-/z8N4ue10YDnV62YAA8Qgbh7zqM=", - "requires": { - "follow-redirects": "1.5.10", - "is-buffer": "^2.0.2" - }, - "dependencies": { - "is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npm.taobao.org/is-buffer/download/is-buffer-2.0.4.tgz", - "integrity": "sha1-PlcvI8hBGlz9lVfISeNmXgspBiM=" - } - } - }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npm.taobao.org/babel-code-frame/download/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - }, - "dependencies": { - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npm.taobao.org/js-tokens/download/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true - } - } - }, - "babel-eslint": { - "version": "10.1.0", - "resolved": "https://registry.npm.taobao.org/babel-eslint/download/babel-eslint-10.1.0.tgz", - "integrity": "sha1-aWjlaKkQt4+zd5zdi2rC9HmUMjI=", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.0", - "@babel/traverse": "^7.7.0", - "@babel/types": "^7.7.0", - "eslint-visitor-keys": "^1.0.0", - "resolve": "^1.12.0" - } - }, - "babel-loader": { - "version": "8.1.0", - "resolved": "https://registry.npm.taobao.org/babel-loader/download/babel-loader-8.1.0.tgz", - "integrity": "sha1-xhHVESvVIJq+i5+oTD5NolJ18cM=", - "dev": true, - "requires": { - "find-cache-dir": "^2.1.0", - "loader-utils": "^1.4.0", - "mkdirp": "^0.5.3", - "pify": "^4.0.1", - "schema-utils": "^2.6.5" - } - }, - "babel-plugin-dynamic-import-node": { - "version": "2.3.3", - "resolved": "https://registry.npm.taobao.org/babel-plugin-dynamic-import-node/download/babel-plugin-dynamic-import-node-2.3.3.tgz", - "integrity": "sha1-hP2hnJduxcbe/vV/lCez3vZuF6M=", - "dev": true, - "requires": { - "object.assign": "^4.1.0" - } - }, - "babel-plugin-module-resolver": { - "version": "3.2.0", - "resolved": "https://registry.npm.taobao.org/babel-plugin-module-resolver/download/babel-plugin-module-resolver-3.2.0.tgz", - "integrity": "sha1-3fpeMB47mqEthSqZefGLN4gf9ac=", - "dev": true, - "requires": { - "find-babel-config": "^1.1.0", - "glob": "^7.1.2", - "pkg-up": "^2.0.0", - "reselect": "^3.0.1", - "resolve": "^1.4.0" - } - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npm.taobao.org/babel-runtime/download/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.11.1.tgz?cache=0&sync_timestamp=1584052597708&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregenerator-runtime%2Fdownload%2Fregenerator-runtime-0.11.1.tgz", - "integrity": "sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk=", - "dev": true - } - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npm.taobao.org/base/download/base-0.11.2.tgz", - "integrity": "sha1-e95c7RRbbVUakNuH+DxVi060io8=", - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-6.0.3.tgz", - "integrity": "sha1-B8BQNKbDSfoG4k+jWqdttFgM5N0=", - "dev": true - } - } - }, - "base64-arraybuffer": { - "version": "0.2.0", - "resolved": "https://registry.npm.taobao.org/base64-arraybuffer/download/base64-arraybuffer-0.2.0.tgz", - "integrity": "sha1-S5RPrAGRqlkHr+LYyZnMxXzoD0U=" - }, - "base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npm.taobao.org/base64-js/download/base64-js-1.3.1.tgz", - "integrity": "sha1-WOzoy3XdB+ce0IxzarxfrE2/jfE=", - "dev": true - }, - "batch": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/batch/download/batch-0.6.1.tgz", - "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", - "dev": true - }, - "batch-processor": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/batch-processor/download/batch-processor-1.0.0.tgz", - "integrity": "sha1-dclcMrdI4IUNEMKxaPa9vpiRrOg=" - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/bcrypt-pbkdf/download/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "bfj": { - "version": "6.1.2", - "resolved": "https://registry.npm.taobao.org/bfj/download/bfj-6.1.2.tgz", - "integrity": "sha1-MlyGGoIryzWKQceKM7jm4ght3n8=", - "dev": true, - "requires": { - "bluebird": "^3.5.5", - "check-types": "^8.0.3", - "hoopy": "^0.1.4", - "tryer": "^1.0.1" - } - }, - "big.js": { - "version": "5.2.2", - "resolved": "https://registry.npm.taobao.org/big.js/download/big.js-5.2.2.tgz", - "integrity": "sha1-ZfCvOC9Xi83HQr2cKB6cstd2gyg=", - "dev": true - }, - "binary-extensions": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/binary-extensions/download/binary-extensions-2.1.0.tgz?cache=0&sync_timestamp=1593261363626&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbinary-extensions%2Fdownload%2Fbinary-extensions-2.1.0.tgz", - "integrity": "sha1-MPpAyef+B9vIlWeM0ocCTeokHdk=", - "dev": true, - "optional": true - }, - "bindings": { - "version": "1.5.0", - "resolved": "https://registry.npm.taobao.org/bindings/download/bindings-1.5.0.tgz", - "integrity": "sha1-EDU8npRTNLwFEabZCzj7x8nFBN8=", - "dev": true, - "optional": true, - "requires": { - "file-uri-to-path": "1.0.0" - } - }, - "bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npm.taobao.org/bluebird/download/bluebird-3.7.2.tgz", - "integrity": "sha1-nyKcFb4nJFT/qXOs4NvueaGww28=", - "dev": true - }, - "bn.js": { - "version": "5.1.2", - "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-5.1.2.tgz", - "integrity": "sha1-yWhpAtPJoncp9DqxD515wgBNp7A=", - "dev": true - }, - "body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npm.taobao.org/body-parser/download/body-parser-1.19.0.tgz", - "integrity": "sha1-lrJwnlfJxOCab9Zqj9l5hE9p8Io=", - "dev": true, - "requires": { - "bytes": "3.1.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npm.taobao.org/qs/download/qs-6.7.0.tgz", - "integrity": "sha1-QdwaAV49WB8WIXdr4xr7KHapsbw=", - "dev": true - } - } - }, - "bonjour": { - "version": "3.5.0", - "resolved": "https://registry.npm.taobao.org/bonjour/download/bonjour-3.5.0.tgz", - "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", - "dev": true, - "requires": { - "array-flatten": "^2.1.0", - "deep-equal": "^1.0.1", - "dns-equal": "^1.0.0", - "dns-txt": "^2.0.2", - "multicast-dns": "^6.0.1", - "multicast-dns-service-types": "^1.1.0" - }, - "dependencies": { - "array-flatten": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/array-flatten/download/array-flatten-2.1.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Farray-flatten%2Fdownload%2Farray-flatten-2.1.2.tgz", - "integrity": "sha1-JO+AoowaiTYX4hSbDG0NeIKTsJk=", - "dev": true - } - } - }, - "boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/boolbase/download/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", - "dev": true - }, - "boom": { - "version": "2.10.1", - "resolved": "https://registry.npm.taobao.org/boom/download/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", - "dev": true, - "optional": true, - "requires": { - "hoek": "2.x.x" - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz", - "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npm.taobao.org/braces/download/braces-2.3.2.tgz", - "integrity": "sha1-WXn9PxTNUxVl5fot8av/8d+u5yk=", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/brorand/download/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "browser-process-hrtime": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/browser-process-hrtime/download/browser-process-hrtime-1.0.0.tgz", - "integrity": "sha1-PJtLfXgsgSHlbxAQbYTA0P/JRiY=", - "dev": true - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npm.taobao.org/browser-stdout/download/browser-stdout-1.3.1.tgz", - "integrity": "sha1-uqVZ7hTO1zRSIputcyZGfGH6vWA=", - "dev": true - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/browserify-aes/download/browserify-aes-1.2.0.tgz", - "integrity": "sha1-Mmc0ZC9APavDADIJhTu3CtQo70g=", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/browserify-cipher/download/browserify-cipher-1.0.1.tgz", - "integrity": "sha1-jWR0wbhwv9q807z8wZNKEOlPFfA=", - "dev": true, - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/browserify-des/download/browserify-des-1.0.2.tgz", - "integrity": "sha1-OvTx9Zg5QDVy8cZiBDdfen9wPpw=", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/browserify-rsa/download/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-4.11.9.tgz", - "integrity": "sha1-JtVWgpRY+dHoH8SJUkk9C6NQeCg=", - "dev": true - } - } - }, - "browserify-sign": { - "version": "4.2.0", - "resolved": "https://registry.npm.taobao.org/browserify-sign/download/browserify-sign-4.2.0.tgz", - "integrity": "sha1-VF0LGwfmssmSEQgr8bEsznoLDhE=", - "dev": true, - "requires": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "elliptic": "^6.5.2", - "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npm.taobao.org/readable-stream/download/readable-stream-3.6.0.tgz", - "integrity": "sha1-M3u9o63AcGvT4CRCaihtS0sskZg=", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.2.1.tgz", - "integrity": "sha1-Hq+fqb2x/dTsdfWPnNtOa3gn7sY=", - "dev": true - } - } - }, - "browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npm.taobao.org/browserify-zlib/download/browserify-zlib-0.2.0.tgz", - "integrity": "sha1-KGlFnZqjviRf6P4sofRuLn9U1z8=", - "dev": true, - "requires": { - "pako": "~1.0.5" - } - }, - "browserslist": { - "version": "4.13.0", - "resolved": "https://registry.npm.taobao.org/browserslist/download/browserslist-4.13.0.tgz?cache=0&sync_timestamp=1593912387376&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbrowserslist%2Fdownload%2Fbrowserslist-4.13.0.tgz", - "integrity": "sha1-QlVsugEeGwondbYRy6ao7KGOlA0=", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001093", - "electron-to-chromium": "^1.3.488", - "escalade": "^3.0.1", - "node-releases": "^1.1.58" - } - }, - "buffer": { - "version": "4.9.2", - "resolved": "https://registry.npm.taobao.org/buffer/download/buffer-4.9.2.tgz?cache=0&sync_timestamp=1588706716358&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbuffer%2Fdownload%2Fbuffer-4.9.2.tgz", - "integrity": "sha1-Iw6tNEACmIZEhBqwJEr4xEu+Pvg=", - "dev": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/buffer-from/download/buffer-from-1.1.1.tgz", - "integrity": "sha1-MnE7wCj3XAL9txDXx7zsHyxgcO8=", - "dev": true - }, - "buffer-indexof": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/buffer-indexof/download/buffer-indexof-1.1.1.tgz", - "integrity": "sha1-Uvq8xqYG0aADAoAmSO9o9jnaJow=", - "dev": true - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/buffer-xor/download/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/builtin-status-codes/download/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true - }, - "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/bytes/download/bytes-3.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbytes%2Fdownload%2Fbytes-3.1.0.tgz", - "integrity": "sha1-9s95M6Ng4FiPqf3oVlHNx/gF0fY=", - "dev": true - }, - "cacache": { - "version": "12.0.4", - "resolved": "https://registry.npm.taobao.org/cacache/download/cacache-12.0.4.tgz?cache=0&sync_timestamp=1594429684526&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-12.0.4.tgz", - "integrity": "sha1-ZovL0QWutfHZL+JVcOyVJcj6pAw=", - "dev": true, - "requires": { - "bluebird": "^3.5.5", - "chownr": "^1.1.1", - "figgy-pudding": "^3.5.1", - "glob": "^7.1.4", - "graceful-fs": "^4.1.15", - "infer-owner": "^1.0.3", - "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.3", - "ssri": "^6.0.1", - "unique-filename": "^1.1.1", - "y18n": "^4.0.0" - } - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/cache-base/download/cache-base-1.0.1.tgz", - "integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "cache-loader": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/cache-loader/download/cache-loader-2.0.1.tgz", - "integrity": "sha1-V1j0GmLXwjlB48PHAW5vrrA6ywc=", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "mkdirp": "^0.5.1", - "neo-async": "^2.6.0", - "normalize-path": "^3.0.0", - "schema-utils": "^1.0.0" - }, - "dependencies": { - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz", - "integrity": "sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A=", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/call-me-maybe/download/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", - "dev": true - }, - "caller-callsite": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/caller-callsite/download/caller-callsite-2.0.0.tgz?cache=0&sync_timestamp=1562668933683&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcaller-callsite%2Fdownload%2Fcaller-callsite-2.0.0.tgz", - "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", - "dev": true, - "requires": { - "callsites": "^2.0.0" - }, - "dependencies": { - "callsites": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/callsites/download/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", - "dev": true - } - } - }, - "caller-path": { - "version": "0.1.0", - "resolved": "https://registry.npm.taobao.org/caller-path/download/caller-path-0.1.0.tgz", - "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", - "dev": true, - "optional": true, - "requires": { - "callsites": "^0.2.0" - } - }, - "callsites": { - "version": "0.2.0", - "resolved": "https://registry.npm.taobao.org/callsites/download/callsites-0.2.0.tgz", - "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", - "dev": true, - "optional": true - }, - "camel-case": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/camel-case/download/camel-case-3.0.0.tgz?cache=0&sync_timestamp=1576748709736&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcamel-case%2Fdownload%2Fcamel-case-3.0.0.tgz", - "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", - "dev": true, - "requires": { - "no-case": "^2.2.0", - "upper-case": "^1.1.1" - } - }, - "camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=" - }, - "caniuse-api": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/caniuse-api/download/caniuse-api-3.0.0.tgz", - "integrity": "sha1-Xk2Q4idJYdRikZl99Znj7QCO5MA=", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "caniuse-lite": "^1.0.0", - "lodash.memoize": "^4.1.2", - "lodash.uniq": "^4.5.0" - } - }, - "caniuse-lite": { - "version": "1.0.30001104", - "resolved": "https://registry.npm.taobao.org/caniuse-lite/download/caniuse-lite-1.0.30001104.tgz?cache=0&sync_timestamp=1595226955587&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcaniuse-lite%2Fdownload%2Fcaniuse-lite-1.0.30001104.tgz", - "integrity": "sha1-Tj1bOx3Tw1KfEMt/UZxiuj5Xn10=", - "dev": true - }, - "case-sensitive-paths-webpack-plugin": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/case-sensitive-paths-webpack-plugin/download/case-sensitive-paths-webpack-plugin-2.3.0.tgz", - "integrity": "sha1-I6xhPMmoVuT4j/i7c7u16YmCXPc=", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npm.taobao.org/caseless/download/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, - "center-align": { - "version": "0.1.3", - "resolved": "https://registry.npm.taobao.org/center-align/download/center-align-0.1.3.tgz", - "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", - "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - } - }, - "cfb": { - "version": "1.0.8", - "resolved": "https://registry.npm.taobao.org/cfb/download/cfb-1.0.8.tgz?cache=0&sync_timestamp=1594276069691&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcfb%2Fdownload%2Fcfb-1.0.8.tgz", - "integrity": "sha1-d/ITST1pfXVP2cD1UR6rWtctAs8=", - "requires": { - "commander": "^2.14.1", - "printj": "~1.1.2" - } - }, - "chai": { - "version": "4.2.0", - "resolved": "https://registry.npm.taobao.org/chai/download/chai-4.2.0.tgz", - "integrity": "sha1-dgqnLPION5XoSxKHfODoNzeqKeU=", - "dev": true, - "requires": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", - "pathval": "^1.1.0", - "type-detect": "^4.0.5" - } - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npm.taobao.org/chardet/download/chardet-0.4.2.tgz?cache=0&sync_timestamp=1594010705529&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchardet%2Fdownload%2Fchardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", - "dev": true, - "optional": true - }, - "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/check-error/download/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", - "dev": true - }, - "check-types": { - "version": "8.0.3", - "resolved": "https://registry.npm.taobao.org/check-types/download/check-types-8.0.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcheck-types%2Fdownload%2Fcheck-types-8.0.3.tgz", - "integrity": "sha1-M1bMoZyIlUTy16le1JzlCKDs9VI=", - "dev": true - }, - "chokidar": { - "version": "3.4.1", - "resolved": "https://registry.npm.taobao.org/chokidar/download/chokidar-3.4.1.tgz?cache=0&sync_timestamp=1594864731636&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchokidar%2Fdownload%2Fchokidar-3.4.1.tgz", - "integrity": "sha1-6QW97PEOqgoLHbDGZEgcxMvCK6E=", - "dev": true, - "optional": true, - "requires": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "fsevents": "~2.1.2", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.4.0" - }, - "dependencies": { - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npm.taobao.org/braces/download/braces-3.0.2.tgz", - "integrity": "sha1-NFThpGLujVmeI23zNs2epPiv4Qc=", - "dev": true, - "optional": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npm.taobao.org/fill-range/download/fill-range-7.0.1.tgz", - "integrity": "sha1-GRmmp8df44ssfHflGYU12prN2kA=", - "dev": true, - "optional": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npm.taobao.org/is-number/download/is-number-7.0.0.tgz", - "integrity": "sha1-dTU0W4lnNNX4DE0GxQlVUnoU8Ss=", - "dev": true, - "optional": true - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npm.taobao.org/to-regex-range/download/to-regex-range-5.0.1.tgz", - "integrity": "sha1-FkjESq58jZiKMmAY7XL1tN0DkuQ=", - "dev": true, - "optional": true, - "requires": { - "is-number": "^7.0.0" - } - } - } - }, - "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npm.taobao.org/chownr/download/chownr-1.1.4.tgz", - "integrity": "sha1-b8nXtC0ypYNZYzdmbn0ICE2izGs=", - "dev": true - }, - "chrome-trace-event": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/chrome-trace-event/download/chrome-trace-event-1.0.2.tgz", - "integrity": "sha1-I0CQ7pfH1K0aLEvq4nUF3v/GCKQ=", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, - "ci-info": { - "version": "1.6.0", - "resolved": "https://registry.npm.taobao.org/ci-info/download/ci-info-1.6.0.tgz", - "integrity": "sha1-LKINu5zrMtRSSmgzAzE/AwSx5Jc=", - "dev": true - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/cipher-base/download/cipher-base-1.0.4.tgz", - "integrity": "sha1-h2Dk7MJy9MNjUy+SbYdKriwTl94=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "circular-json": { - "version": "0.3.3", - "resolved": "https://registry.npm.taobao.org/circular-json/download/circular-json-0.3.3.tgz", - "integrity": "sha1-gVyZ6oT2gJUp0vRXkb34JxE1LWY=", - "dev": true, - "optional": true - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npm.taobao.org/class-utils/download/class-utils-0.3.6.tgz", - "integrity": "sha1-+TNprouafOAv1B+q0MqDAzGQxGM=", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "clean-css": { - "version": "4.2.3", - "resolved": "https://registry.npm.taobao.org/clean-css/download/clean-css-4.2.3.tgz", - "integrity": "sha1-UHtd59l7SO5T2ErbAWD/YhY4D3g=", - "dev": true, - "requires": { - "source-map": "~0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - } - } - }, - "clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/clean-stack/download/clean-stack-2.2.0.tgz?cache=0&sync_timestamp=1592035230294&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fclean-stack%2Fdownload%2Fclean-stack-2.2.0.tgz", - "integrity": "sha1-7oRy27Ep5yezHooQpCfe6d/kAIs=", - "dev": true - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/cli-cursor/download/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "cli-highlight": { - "version": "2.1.4", - "resolved": "https://registry.npm.taobao.org/cli-highlight/download/cli-highlight-2.1.4.tgz?cache=0&sync_timestamp=1573948719956&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcli-highlight%2Fdownload%2Fcli-highlight-2.1.4.tgz", - "integrity": "sha1-CYy2Qs8X9CrcHBFF4H+WDsTXUis=", - "dev": true, - "requires": { - "chalk": "^3.0.0", - "highlight.js": "^9.6.0", - "mz": "^2.4.0", - "parse5": "^5.1.1", - "parse5-htmlparser2-tree-adapter": "^5.1.1", - "yargs": "^15.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-5.0.0.tgz", - "integrity": "sha1-OIU59VF5vzkznIGvMKZU1p+Hy3U=", - "dev": true - }, - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-4.2.1.tgz", - "integrity": "sha1-kK51xCTQCNJiTFvynq0xd+v881k=", - "dev": true, - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-5.3.1.tgz", - "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", - "dev": true - }, - "chalk": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-3.0.0.tgz", - "integrity": "sha1-P3PCv1JlkfV0zEksUeJFY0n4ROQ=", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npm.taobao.org/cliui/download/cliui-6.0.0.tgz", - "integrity": "sha1-UR1wLAxOQcoVbX0OlgIfI+EyJbE=", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz", - "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz", - "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/find-up/download/find-up-4.1.0.tgz", - "integrity": "sha1-l6/n1s3AvFkoWEt8jXsW6KmqXRk=", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npm.taobao.org/get-caller-file/download/get-caller-file-2.0.5.tgz", - "integrity": "sha1-T5RBKoLbMvNuOwuXQfipf+sDH34=", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-4.0.0.tgz", - "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha1-8Rb4Bk/pCz94RKOJl8C3UFEmnx0=", - "dev": true - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-5.0.0.tgz", - "integrity": "sha1-Gvujlq/WdqbUJQTQpno6frn2KqA=", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/p-limit/download/p-limit-2.3.0.tgz?cache=0&sync_timestamp=1594559696906&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fp-limit%2Fdownload%2Fp-limit-2.3.0.tgz", - "integrity": "sha1-PdM8ZHohT9//2DWTPrCG2g3CHbE=", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/p-locate/download/p-locate-4.1.0.tgz", - "integrity": "sha1-o0KLtwiLOmApL2aRkni3wpetTwc=", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/p-try/download/p-try-2.2.0.tgz", - "integrity": "sha1-yyhoVA4xPWHeWPr741zpAE1VQOY=", - "dev": true - }, - "parse5": { - "version": "5.1.1", - "resolved": "https://registry.npm.taobao.org/parse5/download/parse5-5.1.1.tgz", - "integrity": "sha1-9o5OW6GFKsLK3AD0VV//bCq7YXg=", - "dev": true - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/path-exists/download/path-exists-4.0.0.tgz", - "integrity": "sha1-UTvb4tO5XXdi6METfvoZXGxhtbM=", - "dev": true - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/require-main-filename/download/require-main-filename-2.0.0.tgz", - "integrity": "sha1-0LMp7MfMD2Fkn2IhW+aa9UqomJs=", - "dev": true - }, - "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-4.2.0.tgz", - "integrity": "sha1-lSGCxGzHssMT0VluYjmSvRY7crU=", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-6.0.0.tgz", - "integrity": "sha1-CxVx3XZpzNTz4G4U7x7tJiJa5TI=", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-7.1.0.tgz", - "integrity": "sha1-aOMlkd9z4lrRxLSRCKLsUHliv9E=", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npm.taobao.org/wrap-ansi/download/wrap-ansi-6.2.0.tgz", - "integrity": "sha1-6Tk7oHEC5skaOyIUePAlfNKFblM=", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npm.taobao.org/yargs/download/yargs-15.4.1.tgz?cache=0&sync_timestamp=1594421046064&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyargs%2Fdownload%2Fyargs-15.4.1.tgz", - "integrity": "sha1-DYehbeAa7p2L7Cv7909nhRcw9Pg=", - "dev": true, - "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - } - }, - "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npm.taobao.org/yargs-parser/download/yargs-parser-18.1.3.tgz?cache=0&sync_timestamp=1595125190020&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyargs-parser%2Fdownload%2Fyargs-parser-18.1.3.tgz", - "integrity": "sha1-vmjEl1xrKr9GkjawyHA2L6sJp7A=", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, - "cli-spinners": { - "version": "2.4.0", - "resolved": "https://registry.npm.taobao.org/cli-spinners/download/cli-spinners-2.4.0.tgz?cache=0&sync_timestamp=1595080565423&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcli-spinners%2Fdownload%2Fcli-spinners-2.4.0.tgz", - "integrity": "sha1-xiVtsha4eM+6RyDnGc7Hz3JoXX8=", - "dev": true - }, - "cli-truncate": { - "version": "0.2.1", - "resolved": "https://registry.npm.taobao.org/cli-truncate/download/cli-truncate-0.2.1.tgz", - "integrity": "sha1-nxXPuwcFAFNpIWxiasfQWrkN1XQ=", - "dev": true, - "requires": { - "slice-ansi": "0.0.4", - "string-width": "^1.0.1" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "slice-ansi": { - "version": "0.0.4", - "resolved": "https://registry.npm.taobao.org/slice-ansi/download/slice-ansi-0.0.4.tgz", - "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", - "dev": true - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - } - } - }, - "cli-width": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/cli-width/download/cli-width-2.2.1.tgz", - "integrity": "sha1-sEM9C06chH7xiGik7xb9X8gnHEg=", - "dev": true, - "optional": true - }, - "clipboard": { - "version": "2.0.6", - "resolved": "https://registry.npm.taobao.org/clipboard/download/clipboard-2.0.6.tgz", - "integrity": "sha1-UpISlu7A/fd+rRdJQhshyWhkc3Y=", - "requires": { - "good-listener": "^1.2.2", - "select": "^1.1.2", - "tiny-emitter": "^2.0.0" - } - }, - "clipboardy": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/clipboardy/download/clipboardy-2.3.0.tgz", - "integrity": "sha1-PCkDZQxo5GqRs4iYW8J3QofbopA=", - "dev": true, - "requires": { - "arch": "^2.1.1", - "execa": "^1.0.0", - "is-wsl": "^2.1.1" - }, - "dependencies": { - "is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/is-wsl/download/is-wsl-2.2.0.tgz?cache=0&sync_timestamp=1588494180082&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-wsl%2Fdownload%2Fis-wsl-2.2.0.tgz", - "integrity": "sha1-dKTHbnfKn9P5MvKQwX6jJs0VcnE=", - "dev": true, - "requires": { - "is-docker": "^2.0.0" - } - } - } - }, - "cliui": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/cliui/download/cliui-2.1.0.tgz", - "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", - "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" - } - }, - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/clone/download/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", - "dev": true - }, - "clonedeep": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/clonedeep/download/clonedeep-2.0.0.tgz", - "integrity": "sha1-jOygd39He78x/oyHGq9jo5C7wnI=" - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npm.taobao.org/co/download/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true, - "optional": true - }, - "coa": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/coa/download/coa-2.0.2.tgz", - "integrity": "sha1-Q/bCEVG07yv1cYfbDXPeIp4+fsM=", - "dev": true, - "requires": { - "@types/q": "^1.5.1", - "chalk": "^2.4.1", - "q": "^1.1.2" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/code-point-at/download/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "codemirror": { - "version": "5.56.0", - "resolved": "https://registry.npm.taobao.org/codemirror/download/codemirror-5.56.0.tgz", - "integrity": "sha1-Z1ZA/MeAEFzSLT+qc4tdfqZCb2E=" - }, - "codemirror-spell-checker": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/codemirror-spell-checker/download/codemirror-spell-checker-1.1.2.tgz", - "integrity": "sha1-HGYPkIlIPMtRE7m6nKGcP0mTNx4=", - "requires": { - "typo-js": "*" - } - }, - "codepage": { - "version": "1.14.0", - "resolved": "https://registry.npm.taobao.org/codepage/download/codepage-1.14.0.tgz", - "integrity": "sha1-jL4lSBMjVZ19MHVxsP/5HnodL5k=", - "requires": { - "commander": "~2.14.1", - "exit-on-epipe": "~1.0.1" - }, - "dependencies": { - "commander": { - "version": "2.14.1", - "resolved": "https://registry.npm.taobao.org/commander/download/commander-2.14.1.tgz?cache=0&sync_timestamp=1595168173997&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.14.1.tgz", - "integrity": "sha1-IjUSPjevjKPGXfRbAm29NXsBuao=" - } - } - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/collection-visit/download/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color": { - "version": "3.1.2", - "resolved": "https://registry.npm.taobao.org/color/download/color-3.1.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcolor%2Fdownload%2Fcolor-3.1.2.tgz", - "integrity": "sha1-aBSOf4XUGtdknF+oyBBvCY0inhA=", - "dev": true, - "requires": { - "color-convert": "^1.9.1", - "color-string": "^1.5.2" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-1.9.3.tgz", - "integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "color-string": { - "version": "1.5.3", - "resolved": "https://registry.npm.taobao.org/color-string/download/color-string-1.5.3.tgz", - "integrity": "sha1-ybvF8BtYtUkvPWhXRZy2WQziBMw=", - "dev": true, - "requires": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "colorette": { - "version": "1.2.1", - "resolved": "https://registry.npm.taobao.org/colorette/download/colorette-1.2.1.tgz?cache=0&sync_timestamp=1593955829055&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcolorette%2Fdownload%2Fcolorette-1.2.1.tgz", - "integrity": "sha1-TQuSEyXBT6+SYzCGpTbbbolWSxs=", - "dev": true - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npm.taobao.org/combined-stream/download/combined-stream-1.0.8.tgz", - "integrity": "sha1-w9RaizT9cwYxoRCoolIGgrMdWn8=", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npm.taobao.org/commander/download/commander-2.20.3.tgz?cache=0&sync_timestamp=1595168173997&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.20.3.tgz", - "integrity": "sha1-/UhehMA+tIgcIHIrpIA16FMa6zM=" - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/commondir/download/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npm.taobao.org/component-emitter/download/component-emitter-1.3.0.tgz", - "integrity": "sha1-FuQHD7qK4ptnnyIVhT7hgasuq8A=", - "dev": true - }, - "compressible": { - "version": "2.0.18", - "resolved": "https://registry.npm.taobao.org/compressible/download/compressible-2.0.18.tgz?cache=0&sync_timestamp=1578286264482&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcompressible%2Fdownload%2Fcompressible-2.0.18.tgz", - "integrity": "sha1-r1PMprBw1MPAdQ+9dyhqbXzEb7o=", - "dev": true, - "requires": { - "mime-db": ">= 1.43.0 < 2" - } - }, - "compression": { - "version": "1.7.4", - "resolved": "https://registry.npm.taobao.org/compression/download/compression-1.7.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcompression%2Fdownload%2Fcompression-1.7.4.tgz", - "integrity": "sha1-lVI+/xcMpXwpoMpB5v4TH0Hlu48=", - "dev": true, - "requires": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.16", - "debug": "2.6.9", - "on-headers": "~1.0.2", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" - }, - "dependencies": { - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/bytes/download/bytes-3.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbytes%2Fdownload%2Fbytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", - "dev": true - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "compression-webpack-plugin": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/compression-webpack-plugin/download/compression-webpack-plugin-3.1.0.tgz?cache=0&sync_timestamp=1589291140068&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcompression-webpack-plugin%2Fdownload%2Fcompression-webpack-plugin-3.1.0.tgz", - "integrity": "sha1-n1EBcqe1+uWq07ZwZS6L15l67so=", - "dev": true, - "requires": { - "cacache": "^13.0.1", - "find-cache-dir": "^3.0.0", - "neo-async": "^2.5.0", - "schema-utils": "^2.6.1", - "serialize-javascript": "^2.1.2", - "webpack-sources": "^1.0.1" - }, - "dependencies": { - "cacache": { - "version": "13.0.1", - "resolved": "https://registry.npm.taobao.org/cacache/download/cacache-13.0.1.tgz?cache=0&sync_timestamp=1594429684526&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-13.0.1.tgz", - "integrity": "sha1-qAAMIWlwiQgvhSh6GuxuOCAkpxw=", - "dev": true, - "requires": { - "chownr": "^1.1.2", - "figgy-pudding": "^3.5.1", - "fs-minipass": "^2.0.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.2", - "infer-owner": "^1.0.4", - "lru-cache": "^5.1.1", - "minipass": "^3.0.0", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.2", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "p-map": "^3.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^2.7.1", - "ssri": "^7.0.0", - "unique-filename": "^1.1.1" - } - }, - "find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-3.3.1.tgz", - "integrity": "sha1-ibM/rUpGcNqpT4Vff74x1thP6IA=", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/find-up/download/find-up-4.1.0.tgz", - "integrity": "sha1-l6/n1s3AvFkoWEt8jXsW6KmqXRk=", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-5.0.0.tgz", - "integrity": "sha1-Gvujlq/WdqbUJQTQpno6frn2KqA=", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/make-dir/download/make-dir-3.1.0.tgz?cache=0&sync_timestamp=1587567875186&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmake-dir%2Fdownload%2Fmake-dir-3.1.0.tgz", - "integrity": "sha1-QV6WcEazp/HRhSd9hKpYIDcmoT8=", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/p-limit/download/p-limit-2.3.0.tgz?cache=0&sync_timestamp=1594559696906&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fp-limit%2Fdownload%2Fp-limit-2.3.0.tgz", - "integrity": "sha1-PdM8ZHohT9//2DWTPrCG2g3CHbE=", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/p-locate/download/p-locate-4.1.0.tgz", - "integrity": "sha1-o0KLtwiLOmApL2aRkni3wpetTwc=", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-map": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/p-map/download/p-map-3.0.0.tgz", - "integrity": "sha1-1wTZr4orpoTiYA2aIVmD1BQal50=", - "dev": true, - "requires": { - "aggregate-error": "^3.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/p-try/download/p-try-2.2.0.tgz", - "integrity": "sha1-yyhoVA4xPWHeWPr741zpAE1VQOY=", - "dev": true - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/path-exists/download/path-exists-4.0.0.tgz", - "integrity": "sha1-UTvb4tO5XXdi6METfvoZXGxhtbM=", - "dev": true - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npm.taobao.org/pkg-dir/download/pkg-dir-4.2.0.tgz", - "integrity": "sha1-8JkTPfft5CLoHR2ESCcO6z5CYfM=", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1586886301819&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz", - "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=", - "dev": true - }, - "serialize-javascript": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/serialize-javascript/download/serialize-javascript-2.1.2.tgz", - "integrity": "sha1-7OxTsOAxe9yV73arcHS3OEeF+mE=", - "dev": true - }, - "ssri": { - "version": "7.1.0", - "resolved": "https://registry.npm.taobao.org/ssri/download/ssri-7.1.0.tgz", - "integrity": "sha1-ksJBv23oI2W1x/tL126XVSLhKU0=", - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1", - "minipass": "^3.1.1" - } - } - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npm.taobao.org/concat-stream/download/concat-stream-1.6.2.tgz", - "integrity": "sha1-kEvfGUzTEi/Gdcd/xKw9T/D9GjQ=", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "condense-newlines": { - "version": "0.2.1", - "resolved": "https://registry.npm.taobao.org/condense-newlines/download/condense-newlines-0.2.1.tgz", - "integrity": "sha1-PemFVTE5R10yUCyDsC9gaE0kxV8=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-whitespace": "^0.3.0", - "kind-of": "^3.0.2" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "config-chain": { - "version": "1.1.12", - "resolved": "https://registry.npm.taobao.org/config-chain/download/config-chain-1.1.12.tgz", - "integrity": "sha1-D96NCRIA616AjK8l/mGMAvSOTvo=", - "dev": true, - "requires": { - "ini": "^1.3.4", - "proto-list": "~1.2.1" - } - }, - "connect-history-api-fallback": { - "version": "1.6.0", - "resolved": "https://registry.npm.taobao.org/connect-history-api-fallback/download/connect-history-api-fallback-1.6.0.tgz", - "integrity": "sha1-izIIk1kwjRERFdgcrT/Oq4iPl7w=", - "dev": true - }, - "console-browserify": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/console-browserify/download/console-browserify-1.2.0.tgz", - "integrity": "sha1-ZwY871fOts9Jk6KrOlWECujEkzY=", - "dev": true - }, - "consolidate": { - "version": "0.15.1", - "resolved": "https://registry.npm.taobao.org/consolidate/download/consolidate-0.15.1.tgz", - "integrity": "sha1-IasEMjXHGgfUXZqtmFk7DbpWurc=", - "dev": true, - "requires": { - "bluebird": "^3.1.1" - } - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/constants-browserify/download/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, - "contains-path": { - "version": "0.1.0", - "resolved": "https://registry.npm.taobao.org/contains-path/download/contains-path-0.1.0.tgz", - "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", - "dev": true - }, - "content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npm.taobao.org/content-disposition/download/content-disposition-0.5.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcontent-disposition%2Fdownload%2Fcontent-disposition-0.5.3.tgz", - "integrity": "sha1-4TDK9+cnkIfFYWwgB9BIVpiYT70=", - "dev": true, - "requires": { - "safe-buffer": "5.1.2" - } - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/content-type/download/content-type-1.0.4.tgz", - "integrity": "sha1-4TjMdeBAxyexlm/l5fjJruJW/js=", - "dev": true - }, - "contour_plot": { - "version": "0.0.1", - "resolved": "https://registry.npm.taobao.org/contour_plot/download/contour_plot-0.0.1.tgz", - "integrity": "sha1-R1hw8DK44zhBKqX8UHiA8L9JXHc=" - }, - "convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npm.taobao.org/convert-source-map/download/convert-source-map-1.7.0.tgz", - "integrity": "sha1-F6LLiC1/d9NJBYXizmxSRCSjpEI=", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "cookie": { - "version": "0.4.0", - "resolved": "https://registry.npm.taobao.org/cookie/download/cookie-0.4.0.tgz", - "integrity": "sha1-vrQ35wIrO21JAZ0IhmUwPr6cFLo=", - "dev": true - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npm.taobao.org/cookie-signature/download/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "dev": true - }, - "copy-concurrently": { - "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/copy-concurrently/download/copy-concurrently-1.0.5.tgz", - "integrity": "sha1-kilzmMrjSTf8r9bsgTnBgFHwteA=", - "dev": true, - "requires": { - "aproba": "^1.1.1", - "fs-write-stream-atomic": "^1.0.8", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.0" - } - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/copy-descriptor/download/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true - }, - "copy-webpack-plugin": { - "version": "4.6.0", - "resolved": "https://registry.npm.taobao.org/copy-webpack-plugin/download/copy-webpack-plugin-4.6.0.tgz", - "integrity": "sha1-5/QN2KaEd9QF3Rt6hUquMksVi64=", - "dev": true, - "requires": { - "cacache": "^10.0.4", - "find-cache-dir": "^1.0.0", - "globby": "^7.1.1", - "is-glob": "^4.0.0", - "loader-utils": "^1.1.0", - "minimatch": "^3.0.4", - "p-limit": "^1.0.0", - "serialize-javascript": "^1.4.0" - }, - "dependencies": { - "cacache": { - "version": "10.0.4", - "resolved": "https://registry.npm.taobao.org/cacache/download/cacache-10.0.4.tgz?cache=0&sync_timestamp=1594429684526&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-10.0.4.tgz", - "integrity": "sha1-ZFI2eZnv+dQYiu/ZoU6dfGomNGA=", - "dev": true, - "requires": { - "bluebird": "^3.5.1", - "chownr": "^1.0.1", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "lru-cache": "^4.1.1", - "mississippi": "^2.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^5.2.4", - "unique-filename": "^1.1.0", - "y18n": "^4.0.0" - } - }, - "find-cache-dir": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-1.0.0.tgz", - "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^2.0.0" - } - }, - "globby": { - "version": "7.1.1", - "resolved": "https://registry.npm.taobao.org/globby/download/globby-7.1.1.tgz", - "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - } - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-4.1.5.tgz?cache=0&sync_timestamp=1594427569171&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flru-cache%2Fdownload%2Flru-cache-4.1.5.tgz", - "integrity": "sha1-i75Q6oW+1ZvJ4z3KuCNe6bz0Q80=", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npm.taobao.org/make-dir/download/make-dir-1.3.0.tgz?cache=0&sync_timestamp=1587567875186&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmake-dir%2Fdownload%2Fmake-dir-1.3.0.tgz", - "integrity": "sha1-ecEDO4BRW9bSTsmTPoYMp17ifww=", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "mississippi": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/mississippi/download/mississippi-2.0.0.tgz", - "integrity": "sha1-NEKlCPr8KFAEhv7qmUCWduTuWm8=", - "dev": true, - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^2.0.1", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/pify/download/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/pkg-dir/download/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } - }, - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/pump/download/pump-2.0.1.tgz", - "integrity": "sha1-Ejma3W5M91Jtlzy8i1zi4pCLOQk=", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "serialize-javascript": { - "version": "1.9.1", - "resolved": "https://registry.npm.taobao.org/serialize-javascript/download/serialize-javascript-1.9.1.tgz", - "integrity": "sha1-z8IArvd7YAxH2pu4FJyUPnmML9s=", - "dev": true - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/slash/download/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true - }, - "ssri": { - "version": "5.3.0", - "resolved": "https://registry.npm.taobao.org/ssri/download/ssri-5.3.0.tgz", - "integrity": "sha1-ujhyycbTOgcEp9cf8EXl7EiZnQY=", - "dev": true, - "requires": { - "safe-buffer": "^5.1.1" - } - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - } - } - }, - "core-js": { - "version": "2.6.11", - "resolved": "https://registry.npm.taobao.org/core-js/download/core-js-2.6.11.tgz?cache=0&sync_timestamp=1586450269267&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-2.6.11.tgz", - "integrity": "sha1-OIMUafmSK97Y7iHJ3EaYXgOZMIw=", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "cosmiconfig": { - "version": "5.2.1", - "resolved": "https://registry.npm.taobao.org/cosmiconfig/download/cosmiconfig-5.2.1.tgz", - "integrity": "sha1-BA9yaAnFked6F8CjYmykW08Wixo=", - "dev": true, - "requires": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.1", - "parse-json": "^4.0.0" - } - }, - "countup": { - "version": "1.8.2", - "resolved": "https://registry.npm.taobao.org/countup/download/countup-1.8.2.tgz", - "integrity": "sha1-AhzMam+WRUDGsn7WRoGvJ/tV8BA=" - }, - "crc-32": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/crc-32/download/crc-32-1.2.0.tgz", - "integrity": "sha1-yy224puIUI4y2d0OwWk+e0Ghggg=", - "requires": { - "exit-on-epipe": "~1.0.1", - "printj": "~1.1.0" - } - }, - "create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npm.taobao.org/create-ecdh/download/create-ecdh-4.0.3.tgz", - "integrity": "sha1-yREbbzMEXEaX8UR4f5JUzcd8Rf8=", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-4.11.9.tgz", - "integrity": "sha1-JtVWgpRY+dHoH8SJUkk9C6NQeCg=", - "dev": true - } - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/create-hash/download/create-hash-1.2.0.tgz", - "integrity": "sha1-iJB4rxGmN1a8+1m9IhmWvjqe8ZY=", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npm.taobao.org/create-hmac/download/create-hmac-1.1.7.tgz", - "integrity": "sha1-aRcMeLOrlXFHsriwRXLkfq0iQ/8=", - "dev": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "cropperjs": { - "version": "1.5.7", - "resolved": "https://registry.npm.taobao.org/cropperjs/download/cropperjs-1.5.7.tgz", - "integrity": "sha1-tlAZcluuHGKF6IH7ZhshQfpXAls=" - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-6.0.5.tgz", - "integrity": "sha1-Sl7Hxk364iw6FBJNus3uhG2Ay8Q=", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npm.taobao.org/cryptiles/download/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", - "dev": true, - "optional": true, - "requires": { - "boom": "2.x.x" - } - }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npm.taobao.org/crypto-browserify/download/crypto-browserify-3.12.0.tgz", - "integrity": "sha1-OWz58xN/A+S45TLFj2mCVOAPgOw=", - "dev": true, - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, - "css-color-names": { - "version": "0.0.4", - "resolved": "https://registry.npm.taobao.org/css-color-names/download/css-color-names-0.0.4.tgz", - "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=", - "dev": true - }, - "css-declaration-sorter": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/css-declaration-sorter/download/css-declaration-sorter-4.0.1.tgz", - "integrity": "sha1-wZiUD2OnbX42wecQGLABchBUyyI=", - "dev": true, - "requires": { - "postcss": "^7.0.1", - "timsort": "^0.3.0" - } - }, - "css-line-break": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/css-line-break/download/css-line-break-1.1.1.tgz", - "integrity": "sha1-1em90peEAJnrBQPHMQ/TSSegJu8=", - "requires": { - "base64-arraybuffer": "^0.2.0" - } - }, - "css-loader": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/css-loader/download/css-loader-1.0.1.tgz?cache=0&sync_timestamp=1592056914630&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-loader%2Fdownload%2Fcss-loader-1.0.1.tgz", - "integrity": "sha1-aIW7UjOzXsR7AGBX2gHMZAtref4=", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "css-selector-tokenizer": "^0.7.0", - "icss-utils": "^2.1.0", - "loader-utils": "^1.0.2", - "lodash": "^4.17.11", - "postcss": "^6.0.23", - "postcss-modules-extract-imports": "^1.2.0", - "postcss-modules-local-by-default": "^1.2.0", - "postcss-modules-scope": "^1.1.0", - "postcss-modules-values": "^1.3.0", - "postcss-value-parser": "^3.3.0", - "source-list-map": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "postcss": { - "version": "6.0.23", - "resolved": "https://registry.npm.taobao.org/postcss/download/postcss-6.0.23.tgz?cache=0&sync_timestamp=1591102414113&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss%2Fdownload%2Fpostcss-6.0.23.tgz", - "integrity": "sha1-YcgswyisYOZ3ZF+XkFTrmLwOMyQ=", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz?cache=0&sync_timestamp=1588083210998&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-value-parser%2Fdownload%2Fpostcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "css-select": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/css-select/download/css-select-2.1.0.tgz", - "integrity": "sha1-ajRlM1ZjWTSoG6ymjQJVQyEF2+8=", - "dev": true, - "requires": { - "boolbase": "^1.0.0", - "css-what": "^3.2.1", - "domutils": "^1.7.0", - "nth-check": "^1.0.2" - } - }, - "css-select-base-adapter": { - "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/css-select-base-adapter/download/css-select-base-adapter-0.1.1.tgz", - "integrity": "sha1-Oy/0lyzDYquIVhUHqVQIoUMhNdc=", - "dev": true - }, - "css-selector-tokenizer": { - "version": "0.7.2", - "resolved": "https://registry.npm.taobao.org/css-selector-tokenizer/download/css-selector-tokenizer-0.7.2.tgz", - "integrity": "sha1-EeXifJpI2QKE8i1FBhwwPXolrYc=", - "dev": true, - "requires": { - "cssesc": "^3.0.0", - "fastparse": "^1.1.2", - "regexpu-core": "^4.6.0" - } - }, - "css-tree": { - "version": "1.0.0-alpha.37", - "resolved": "https://registry.npm.taobao.org/css-tree/download/css-tree-1.0.0-alpha.37.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-tree%2Fdownload%2Fcss-tree-1.0.0-alpha.37.tgz", - "integrity": "sha1-mL69YsTB2flg7DQM+fdSLjBwmiI=", - "dev": true, - "requires": { - "mdn-data": "2.0.4", - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - } - } - }, - "css-what": { - "version": "3.3.0", - "resolved": "https://registry.npm.taobao.org/css-what/download/css-what-3.3.0.tgz", - "integrity": "sha1-EP7Glqns4uWRrHctdZqsq6w4zTk=", - "dev": true - }, - "cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/cssesc/download/cssesc-3.0.0.tgz", - "integrity": "sha1-N3QZGZA7hoVl4cCep0dEXNGJg+4=", - "dev": true - }, - "cssfilter": { - "version": "0.0.10", - "resolved": "https://registry.npm.taobao.org/cssfilter/download/cssfilter-0.0.10.tgz", - "integrity": "sha1-xtJnJjKi5cg+AT5oZKQs6N79IK4=" - }, - "cssnano": { - "version": "4.1.10", - "resolved": "https://registry.npm.taobao.org/cssnano/download/cssnano-4.1.10.tgz", - "integrity": "sha1-CsQfCxPRPUZUh+ERt3jULaYxuLI=", - "dev": true, - "requires": { - "cosmiconfig": "^5.0.0", - "cssnano-preset-default": "^4.0.7", - "is-resolvable": "^1.0.0", - "postcss": "^7.0.0" - } - }, - "cssnano-preset-default": { - "version": "4.0.7", - "resolved": "https://registry.npm.taobao.org/cssnano-preset-default/download/cssnano-preset-default-4.0.7.tgz", - "integrity": "sha1-UexmLM/KD4izltzZZ5zbkxvhf3Y=", - "dev": true, - "requires": { - "css-declaration-sorter": "^4.0.1", - "cssnano-util-raw-cache": "^4.0.1", - "postcss": "^7.0.0", - "postcss-calc": "^7.0.1", - "postcss-colormin": "^4.0.3", - "postcss-convert-values": "^4.0.1", - "postcss-discard-comments": "^4.0.2", - "postcss-discard-duplicates": "^4.0.2", - "postcss-discard-empty": "^4.0.1", - "postcss-discard-overridden": "^4.0.1", - "postcss-merge-longhand": "^4.0.11", - "postcss-merge-rules": "^4.0.3", - "postcss-minify-font-values": "^4.0.2", - "postcss-minify-gradients": "^4.0.2", - "postcss-minify-params": "^4.0.2", - "postcss-minify-selectors": "^4.0.2", - "postcss-normalize-charset": "^4.0.1", - "postcss-normalize-display-values": "^4.0.2", - "postcss-normalize-positions": "^4.0.2", - "postcss-normalize-repeat-style": "^4.0.2", - "postcss-normalize-string": "^4.0.2", - "postcss-normalize-timing-functions": "^4.0.2", - "postcss-normalize-unicode": "^4.0.1", - "postcss-normalize-url": "^4.0.1", - "postcss-normalize-whitespace": "^4.0.2", - "postcss-ordered-values": "^4.1.2", - "postcss-reduce-initial": "^4.0.3", - "postcss-reduce-transforms": "^4.0.2", - "postcss-svgo": "^4.0.2", - "postcss-unique-selectors": "^4.0.1" - } - }, - "cssnano-util-get-arguments": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/cssnano-util-get-arguments/download/cssnano-util-get-arguments-4.0.0.tgz", - "integrity": "sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8=", - "dev": true - }, - "cssnano-util-get-match": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/cssnano-util-get-match/download/cssnano-util-get-match-4.0.0.tgz", - "integrity": "sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0=", - "dev": true - }, - "cssnano-util-raw-cache": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/cssnano-util-raw-cache/download/cssnano-util-raw-cache-4.0.1.tgz", - "integrity": "sha1-sm1f1fcqEd/np4RvtMZyYPlr8oI=", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "cssnano-util-same-parent": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/cssnano-util-same-parent/download/cssnano-util-same-parent-4.0.1.tgz", - "integrity": "sha1-V0CC+yhZ0ttDOFWDXZqEVuoYu/M=", - "dev": true - }, - "csso": { - "version": "4.0.3", - "resolved": "https://registry.npm.taobao.org/csso/download/csso-4.0.3.tgz?cache=0&sync_timestamp=1585052130344&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcsso%2Fdownload%2Fcsso-4.0.3.tgz", - "integrity": "sha1-DZmF3IUsfMKyys+74QeQFNGo6QM=", - "dev": true, - "requires": { - "css-tree": "1.0.0-alpha.39" - }, - "dependencies": { - "css-tree": { - "version": "1.0.0-alpha.39", - "resolved": "https://registry.npm.taobao.org/css-tree/download/css-tree-1.0.0-alpha.39.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-tree%2Fdownload%2Fcss-tree-1.0.0-alpha.39.tgz", - "integrity": "sha1-K/8//huz93bPfu/ZHuXLp3oUnus=", - "dev": true, - "requires": { - "mdn-data": "2.0.6", - "source-map": "^0.6.1" - } - }, - "mdn-data": { - "version": "2.0.6", - "resolved": "https://registry.npm.taobao.org/mdn-data/download/mdn-data-2.0.6.tgz?cache=0&sync_timestamp=1593510420945&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmdn-data%2Fdownload%2Fmdn-data-2.0.6.tgz", - "integrity": "sha1-hS3GD8ql2qLoz2yRicRA7T4EKXg=", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - } - } - }, - "cssom": { - "version": "0.3.8", - "resolved": "https://registry.npm.taobao.org/cssom/download/cssom-0.3.8.tgz?cache=0&sync_timestamp=1573719337707&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcssom%2Fdownload%2Fcssom-0.3.8.tgz", - "integrity": "sha1-nxJ29bK0Y/IRTT8sdSUK+MGjb0o=", - "dev": true - }, - "cssstyle": { - "version": "1.4.0", - "resolved": "https://registry.npm.taobao.org/cssstyle/download/cssstyle-1.4.0.tgz?cache=0&sync_timestamp=1588171504463&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcssstyle%2Fdownload%2Fcssstyle-1.4.0.tgz", - "integrity": "sha1-nTEyginTxWXGHlhrAgQaKPzNzPE=", - "dev": true, - "requires": { - "cssom": "0.3.x" - } - }, - "current-script-polyfill": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/current-script-polyfill/download/current-script-polyfill-1.0.0.tgz", - "integrity": "sha1-8xz35PPiGLBybnOMqSoC00iO9hU=", - "dev": true - }, - "cyclist": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/cyclist/download/cyclist-1.0.1.tgz", - "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=", - "dev": true - }, - "d3-color": { - "version": "1.4.1", - "resolved": "https://registry.npm.taobao.org/d3-color/download/d3-color-1.4.1.tgz", - "integrity": "sha1-xSACv4hGraRCTVXZeYL+8m6zvIo=" - }, - "d3-dispatch": { - "version": "1.0.6", - "resolved": "https://registry.npm.taobao.org/d3-dispatch/download/d3-dispatch-1.0.6.tgz", - "integrity": "sha1-ANN7zuTdjNl3Kd2JOgrCnKq6XVg=" - }, - "d3-ease": { - "version": "1.0.6", - "resolved": "https://registry.npm.taobao.org/d3-ease/download/d3-ease-1.0.6.tgz?cache=0&sync_timestamp=1592460740468&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fd3-ease%2Fdownload%2Fd3-ease-1.0.6.tgz", - "integrity": "sha1-69ttoi36wKIiIvLU2gb2bEFqDsA=" - }, - "d3-interpolate": { - "version": "1.1.6", - "resolved": "https://registry.npm.taobao.org/d3-interpolate/download/d3-interpolate-1.1.6.tgz", - "integrity": "sha1-LPOVriOBgE3wiqG/dmt/l7X2j7Y=", - "requires": { - "d3-color": "1" - } - }, - "d3-selection": { - "version": "1.4.1", - "resolved": "https://registry.npm.taobao.org/d3-selection/download/d3-selection-1.4.1.tgz", - "integrity": "sha1-mO7bvghfvaW6+i+ePzovTX1iKpg=" - }, - "d3-timer": { - "version": "1.0.10", - "resolved": "https://registry.npm.taobao.org/d3-timer/download/d3-timer-1.0.10.tgz", - "integrity": "sha1-3+dripF0iDGxO22ceT/71QjdneU=" - }, - "d3-transition": { - "version": "1.3.2", - "resolved": "https://registry.npm.taobao.org/d3-transition/download/d3-transition-1.3.2.tgz", - "integrity": "sha1-qY7yFRvo2GAFQ0NMHKgBQK4js5g=", - "requires": { - "d3-color": "1", - "d3-dispatch": "1", - "d3-ease": "1", - "d3-interpolate": "1", - "d3-selection": "^1.1.0", - "d3-timer": "1" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npm.taobao.org/dashdash/download/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "data-urls": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/data-urls/download/data-urls-1.1.0.tgz", - "integrity": "sha1-Fe4Fgrql4iu1nHcUDaj5x2lju/4=", - "dev": true, - "requires": { - "abab": "^2.0.0", - "whatwg-mimetype": "^2.2.0", - "whatwg-url": "^7.0.0" - } - }, - "date-fns": { - "version": "1.30.1", - "resolved": "https://registry.npm.taobao.org/date-fns/download/date-fns-1.30.1.tgz?cache=0&sync_timestamp=1594999213209&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdate-fns%2Fdownload%2Fdate-fns-1.30.1.tgz", - "integrity": "sha1-LnG/CxGRU9u0zE6I2epaz7UNwFw=", - "dev": true - }, - "dayjs": { - "version": "1.8.29", - "resolved": "https://registry.npm.taobao.org/dayjs/download/dayjs-1.8.29.tgz?cache=0&sync_timestamp=1593707172703&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdayjs%2Fdownload%2Fdayjs-1.8.29.tgz", - "integrity": "sha1-XSPjQd5r+9IGwBE20vsPAYd4IPU=" - }, - "de-indent": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/de-indent/download/de-indent-1.0.2.tgz", - "integrity": "sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=", - "dev": true - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-3.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-3.1.0.tgz", - "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", - "requires": { - "ms": "2.0.0" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/decamelize/download/decamelize-1.2.0.tgz?cache=0&sync_timestamp=1580010393599&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdecamelize%2Fdownload%2Fdecamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "decimal.js": { - "version": "10.2.0", - "resolved": "https://registry.npm.taobao.org/decimal.js/download/decimal.js-10.2.0.tgz", - "integrity": "sha1-OUZhE6ngNhEdAvgkibX9awte0jE=" - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npm.taobao.org/decode-uri-component/download/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, - "dedent": { - "version": "0.7.0", - "resolved": "https://registry.npm.taobao.org/dedent/download/dedent-0.7.0.tgz", - "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", - "dev": true - }, - "deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/deep-eql/download/deep-eql-3.0.1.tgz", - "integrity": "sha1-38lARACtHI/gI+faHfHBR8S0RN8=", - "dev": true, - "requires": { - "type-detect": "^4.0.0" - } - }, - "deep-equal": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/deep-equal/download/deep-equal-1.1.1.tgz", - "integrity": "sha1-tcmMlCzv+vfLBR4k4UNKJaLmB2o=", - "requires": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" - } - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npm.taobao.org/deep-is/download/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true - }, - "deepmerge": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-2.2.1.tgz", - "integrity": "sha1-XT/yKgHAD2RUBaL7wX0HeKGAEXA=" - }, - "default-gateway": { - "version": "5.0.5", - "resolved": "https://registry.npm.taobao.org/default-gateway/download/default-gateway-5.0.5.tgz?cache=0&sync_timestamp=1590419212936&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdefault-gateway%2Fdownload%2Fdefault-gateway-5.0.5.tgz", - "integrity": "sha1-T9a9XShV05s0zFpZUFSG6ar8mxA=", - "dev": true, - "requires": { - "execa": "^3.3.0" - }, - "dependencies": { - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-7.0.3.tgz", - "integrity": "sha1-9zqFudXUHQRVUcF34ogtSshXKKY=", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "execa": { - "version": "3.4.0", - "resolved": "https://registry.npm.taobao.org/execa/download/execa-3.4.0.tgz?cache=0&sync_timestamp=1594145237072&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fexeca%2Fdownload%2Fexeca-3.4.0.tgz", - "integrity": "sha1-wI7UVQ72XYWPrCaf/IVyRG8364k=", - "dev": true, - "requires": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "human-signals": "^1.1.1", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.0", - "onetime": "^5.1.0", - "p-finally": "^2.0.0", - "signal-exit": "^3.0.2", - "strip-final-newline": "^2.0.0" - } - }, - "get-stream": { - "version": "5.1.0", - "resolved": "https://registry.npm.taobao.org/get-stream/download/get-stream-5.1.0.tgz", - "integrity": "sha1-ASA83JJZf5uQkGfD5lbMH008Tck=", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/is-stream/download/is-stream-2.0.0.tgz", - "integrity": "sha1-venDJoDW+uBBKdasnZIc54FfeOM=", - "dev": true - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/mimic-fn/download/mimic-fn-2.1.0.tgz", - "integrity": "sha1-ftLCzMyvhNP/y3pptXcR/CCDQBs=", - "dev": true - }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/npm-run-path/download/npm-run-path-4.0.1.tgz", - "integrity": "sha1-t+zR5e1T2o43pV4cImnguX7XSOo=", - "dev": true, - "requires": { - "path-key": "^3.0.0" - } - }, - "onetime": { - "version": "5.1.0", - "resolved": "https://registry.npm.taobao.org/onetime/download/onetime-5.1.0.tgz", - "integrity": "sha1-//DzyRYX/mK7UBiWNumayKbfe+U=", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "p-finally": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/p-finally/download/p-finally-2.0.1.tgz", - "integrity": "sha1-vW/KqcVZoJa2gIBvTWV7Pw8kBWE=", - "dev": true - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npm.taobao.org/path-key/download/path-key-3.1.1.tgz?cache=0&sync_timestamp=1574441431664&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpath-key%2Fdownload%2Fpath-key-3.1.1.tgz", - "integrity": "sha1-WB9q3mWMu6ZaDTOA3ndTKVBU83U=", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/shebang-command/download/shebang-command-2.0.0.tgz", - "integrity": "sha1-zNCvT4g1+9wmW4JGGq8MNmY/NOo=", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/shebang-regex/download/shebang-regex-3.0.0.tgz", - "integrity": "sha1-rhbxZE2HPsrYQ7AwexQzYtTEIXI=", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/which/download/which-2.0.2.tgz?cache=0&sync_timestamp=1574116262707&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwhich%2Fdownload%2Fwhich-2.0.2.tgz", - "integrity": "sha1-fGqN0KY2oDJ+ELWckobu6T8/UbE=", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "defaults": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/defaults/download/defaults-1.0.3.tgz", - "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", - "dev": true, - "requires": { - "clone": "^1.0.2" - } - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/define-properties/download/define-properties-1.1.3.tgz", - "integrity": "sha1-z4jabL7ib+bbcJT2HYcMvYTO6fE=", - "requires": { - "object-keys": "^1.0.12" - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-2.0.2.tgz", - "integrity": "sha1-1Flono1lS6d+AqgX+HENcCyxbp0=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-6.0.3.tgz", - "integrity": "sha1-B8BQNKbDSfoG4k+jWqdttFgM5N0=", - "dev": true - } - } - }, - "defined": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/defined/download/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=" - }, - "del": { - "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/del/download/del-4.1.1.tgz", - "integrity": "sha1-no8RciLqRKMf86FWwEm5kFKp8LQ=", - "dev": true, - "requires": { - "@types/glob": "^7.1.1", - "globby": "^6.1.0", - "is-path-cwd": "^2.0.0", - "is-path-in-cwd": "^2.0.0", - "p-map": "^2.0.0", - "pify": "^4.0.1", - "rimraf": "^2.6.3" - }, - "dependencies": { - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npm.taobao.org/globby/download/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/pify/download/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - } - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/delayed-stream/download/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "delegate": { - "version": "3.2.0", - "resolved": "https://registry.npm.taobao.org/delegate/download/delegate-3.2.0.tgz", - "integrity": "sha1-tmtxwxWFIuirV0T3INjKDCr1kWY=" - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/depd/download/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "dev": true - }, - "des.js": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/des.js/download/des.js-1.0.1.tgz", - "integrity": "sha1-U4IULhvcU/hdhtU+X0qn3rkeCEM=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/destroy/download/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", - "dev": true - }, - "detect-browser": { - "version": "5.1.1", - "resolved": "https://registry.npm.taobao.org/detect-browser/download/detect-browser-5.1.1.tgz?cache=0&sync_timestamp=1592803473542&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdetect-browser%2Fdownload%2Fdetect-browser-5.1.1.tgz", - "integrity": "sha1-qADbkdP9YNCGFmn1mE8b6f++AJw=" - }, - "detect-node": { - "version": "2.0.4", - "resolved": "https://registry.npm.taobao.org/detect-node/download/detect-node-2.0.4.tgz", - "integrity": "sha1-AU7o+PZpxcWAI9pkuBecCDooxGw=", - "dev": true - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npm.taobao.org/diff/download/diff-3.5.0.tgz", - "integrity": "sha1-gAwN0eCov7yVg1wgKtIg/jF+WhI=", - "dev": true - }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npm.taobao.org/diffie-hellman/download/diffie-hellman-5.0.3.tgz", - "integrity": "sha1-QOjumPVaIUlgcUaSHGPhrl89KHU=", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-4.11.9.tgz", - "integrity": "sha1-JtVWgpRY+dHoH8SJUkk9C6NQeCg=", - "dev": true - } - } - }, - "dir-glob": { - "version": "2.2.2", - "resolved": "https://registry.npm.taobao.org/dir-glob/download/dir-glob-2.2.2.tgz", - "integrity": "sha1-+gnwaUFTyJGLGLoN6vrpR2n8UMQ=", - "dev": true, - "requires": { - "path-type": "^3.0.0" - } - }, - "dns-equal": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/dns-equal/download/dns-equal-1.0.0.tgz", - "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=", - "dev": true - }, - "dns-packet": { - "version": "1.3.1", - "resolved": "https://registry.npm.taobao.org/dns-packet/download/dns-packet-1.3.1.tgz", - "integrity": "sha1-EqpCaYEHW+UAuRDu3NC0fdfe2lo=", - "dev": true, - "requires": { - "ip": "^1.1.0", - "safe-buffer": "^5.0.1" - } - }, - "dns-txt": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/dns-txt/download/dns-txt-2.0.2.tgz", - "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", - "dev": true, - "requires": { - "buffer-indexof": "^1.0.0" - } - }, - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/doctrine/download/doctrine-2.1.0.tgz", - "integrity": "sha1-XNAfwQFiG0LEzX9dGmYkNxbT850=", - "dev": true, - "optional": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "dom-converter": { - "version": "0.2.0", - "resolved": "https://registry.npm.taobao.org/dom-converter/download/dom-converter-0.2.0.tgz", - "integrity": "sha1-ZyGp2u4uKTaClVtq/kFncWJ7t2g=", - "dev": true, - "requires": { - "utila": "~0.4" - } - }, - "dom-event-types": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/dom-event-types/download/dom-event-types-1.0.0.tgz", - "integrity": "sha1-WDCgop4b+Df+UKcM2ApZcjKBPK4=", - "dev": true - }, - "dom-serializer": { - "version": "0.2.2", - "resolved": "https://registry.npm.taobao.org/dom-serializer/download/dom-serializer-0.2.2.tgz?cache=0&sync_timestamp=1589067578490&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdom-serializer%2Fdownload%2Fdom-serializer-0.2.2.tgz", - "integrity": "sha1-GvuB9TNxcXXUeGVd68XjMtn5u1E=", - "dev": true, - "requires": { - "domelementtype": "^2.0.1", - "entities": "^2.0.0" - }, - "dependencies": { - "domelementtype": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/domelementtype/download/domelementtype-2.0.1.tgz", - "integrity": "sha1-H4vf6R9aeAYydOgDtL3O326U+U0=", - "dev": true - } - } - }, - "domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/domain-browser/download/domain-browser-1.2.0.tgz", - "integrity": "sha1-PTH1AZGmdJ3RN1p/Ui6CPULlTto=", - "dev": true - }, - "domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npm.taobao.org/domelementtype/download/domelementtype-1.3.1.tgz", - "integrity": "sha1-0EjESzew0Qp/Kj1f7j9DM9eQSB8=", - "dev": true - }, - "domexception": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/domexception/download/domexception-1.0.1.tgz?cache=0&sync_timestamp=1576355459111&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdomexception%2Fdownload%2Fdomexception-1.0.1.tgz", - "integrity": "sha1-k3RCZEymoxJh7zbj7Gd/6AVYLJA=", - "dev": true, - "requires": { - "webidl-conversions": "^4.0.2" - } - }, - "domhandler": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/domhandler/download/domhandler-2.4.2.tgz", - "integrity": "sha1-iAUJfpM9ZehVRvcm1g9euItE+AM=", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "domutils": { - "version": "1.7.0", - "resolved": "https://registry.npm.taobao.org/domutils/download/domutils-1.7.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdomutils%2Fdownload%2Fdomutils-1.7.0.tgz", - "integrity": "sha1-Vuo0HoNOBuZ0ivehyyXaZ+qfjCo=", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "dot-prop": { - "version": "5.2.0", - "resolved": "https://registry.npm.taobao.org/dot-prop/download/dot-prop-5.2.0.tgz?cache=0&sync_timestamp=1572621117377&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdot-prop%2Fdownload%2Fdot-prop-5.2.0.tgz", - "integrity": "sha1-w07MKVVtxF8fTCJpe29JBODMT8s=", - "dev": true, - "requires": { - "is-obj": "^2.0.0" - } - }, - "dotenv": { - "version": "7.0.0", - "resolved": "https://registry.npm.taobao.org/dotenv/download/dotenv-7.0.0.tgz", - "integrity": "sha1-or481Sc2ZzIG6KhftSEO6ilijnw=", - "dev": true - }, - "dotenv-expand": { - "version": "5.1.0", - "resolved": "https://registry.npm.taobao.org/dotenv-expand/download/dotenv-expand-5.1.0.tgz", - "integrity": "sha1-P7rwIL/XlIhAcuomsel5HUWmKfA=", - "dev": true - }, - "dotignore": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/dotignore/download/dotignore-0.1.2.tgz", - "integrity": "sha1-+ULyIA0ow6dvvdbw7p8yV8ii6QU=", - "requires": { - "minimatch": "^3.0.4" - } - }, - "duplexer": { - "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/duplexer/download/duplexer-0.1.1.tgz", - "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", - "dev": true - }, - "duplexify": { - "version": "3.7.1", - "resolved": "https://registry.npm.taobao.org/duplexify/download/duplexify-3.7.1.tgz", - "integrity": "sha1-Kk31MX9sz9kfhtb9JdjYoQO4gwk=", - "dev": true, - "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - } - }, - "e-guide-layer": { - "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/e-guide-layer/download/e-guide-layer-0.1.1.tgz", - "integrity": "sha1-AcGvAJqak9CQaSnWAFGrHH6I/V8=", - "requires": { - "core-js": "^3.6.5", - "normalize.css": "^8.0.1", - "vue": "^2.6.11" - }, - "dependencies": { - "core-js": { - "version": "3.8.1", - "resolved": "https://registry.npm.taobao.org/core-js/download/core-js-3.8.1.tgz?cache=0&sync_timestamp=1607215997560&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-3.8.1.tgz", - "integrity": "sha1-9RUjZorIopTRKFw7nbRAJf2mbUc=" - } - } - }, - "easy-stack": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/easy-stack/download/easy-stack-1.0.0.tgz", - "integrity": "sha1-EskbMIWjfwuqM26UhurEv5Tj54g=", - "dev": true - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/ecc-jsbn/download/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "echarts": { - "version": "4.8.0", - "resolved": "https://registry.npm.taobao.org/echarts/download/echarts-4.8.0.tgz", - "integrity": "sha1-ssHPuSKbE9No7hBPyO6mALV01MQ=", - "requires": { - "zrender": "4.3.1" - } - }, - "editorconfig": { - "version": "0.15.3", - "resolved": "https://registry.npm.taobao.org/editorconfig/download/editorconfig-0.15.3.tgz", - "integrity": "sha1-vvhMTnX7jcsM5c7o79UcFZmb78U=", - "dev": true, - "requires": { - "commander": "^2.19.0", - "lru-cache": "^4.1.5", - "semver": "^5.6.0", - "sigmund": "^1.0.1" - }, - "dependencies": { - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-4.1.5.tgz?cache=0&sync_timestamp=1594427569171&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flru-cache%2Fdownload%2Flru-cache-4.1.5.tgz", - "integrity": "sha1-i75Q6oW+1ZvJ4z3KuCNe6bz0Q80=", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - } - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/ee-first/download/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true - }, - "ejs": { - "version": "2.7.4", - "resolved": "https://registry.npm.taobao.org/ejs/download/ejs-2.7.4.tgz", - "integrity": "sha1-SGYSh1c9zFPjZsehrlLDoSDuybo=", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.502", - "resolved": "https://registry.npm.taobao.org/electron-to-chromium/download/electron-to-chromium-1.3.502.tgz?cache=0&sync_timestamp=1595302504119&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Felectron-to-chromium%2Fdownload%2Felectron-to-chromium-1.3.502.tgz", - "integrity": "sha1-alXpk+9goB+9whUu9eR+4AyIXJg=", - "dev": true - }, - "elegant-spinner": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/elegant-spinner/download/elegant-spinner-1.0.1.tgz", - "integrity": "sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=", - "dev": true - }, - "element-resize-detector": { - "version": "1.2.1", - "resolved": "https://registry.npm.taobao.org/element-resize-detector/download/element-resize-detector-1.2.1.tgz", - "integrity": "sha1-sDBRlER6SGMVXljxMyOgrvMIUdE=", - "requires": { - "batch-processor": "1.0.0" - } - }, - "elliptic": { - "version": "6.5.3", - "resolved": "https://registry.npm.taobao.org/elliptic/download/elliptic-6.5.3.tgz?cache=0&sync_timestamp=1592492805287&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Felliptic%2Fdownload%2Felliptic-6.5.3.tgz", - "integrity": "sha1-y1nrLv2vc6C9eMzXAVpirW4Pk9Y=", - "dev": true, - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-4.11.9.tgz", - "integrity": "sha1-JtVWgpRY+dHoH8SJUkk9C6NQeCg=", - "dev": true - } - } - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npm.taobao.org/emoji-regex/download/emoji-regex-8.0.0.tgz", - "integrity": "sha1-6Bj9ac5cz8tARZT4QpY79TFkzDc=", - "dev": true - }, - "emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/emojis-list/download/emojis-list-3.0.0.tgz", - "integrity": "sha1-VXBmIEatKeLpFucariYKvf9Pang=", - "dev": true - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/encodeurl/download/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "dev": true - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npm.taobao.org/end-of-stream/download/end-of-stream-1.4.4.tgz", - "integrity": "sha1-WuZKX0UFe682JuwU2gyl5LJDHrA=", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "enhanced-resolve": { - "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/enhanced-resolve/download/enhanced-resolve-4.3.0.tgz?cache=0&sync_timestamp=1594972300336&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fenhanced-resolve%2Fdownload%2Fenhanced-resolve-4.3.0.tgz", - "integrity": "sha1-O4BvO/r8HsfeaVUe+TzKRsFwQSY=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.5.0", - "tapable": "^1.0.0" - }, - "dependencies": { - "memory-fs": { - "version": "0.5.0", - "resolved": "https://registry.npm.taobao.org/memory-fs/download/memory-fs-0.5.0.tgz?cache=0&sync_timestamp=1570537491040&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmemory-fs%2Fdownload%2Fmemory-fs-0.5.0.tgz", - "integrity": "sha1-MkwBKIuIZSlm0WHbd4OHIIRajjw=", - "dev": true, - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - } - } - }, - "entities": { - "version": "2.0.3", - "resolved": "https://registry.npm.taobao.org/entities/download/entities-2.0.3.tgz?cache=0&sync_timestamp=1591227679482&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fentities%2Fdownload%2Fentities-2.0.3.tgz", - "integrity": "sha1-XEh+V0Krk8Fau12iJ1m4WQ7AO38=", - "dev": true - }, - "errno": { - "version": "0.1.7", - "resolved": "https://registry.npm.taobao.org/errno/download/errno-0.1.7.tgz", - "integrity": "sha1-RoTXF3mtOa8Xfj8AeZb3xnyFJhg=", - "dev": true, - "requires": { - "prr": "~1.0.1" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npm.taobao.org/error-ex/download/error-ex-1.3.2.tgz", - "integrity": "sha1-tKxAZIEH/c3PriQvQovqihTU8b8=", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "error-stack-parser": { - "version": "2.0.6", - "resolved": "https://registry.npm.taobao.org/error-stack-parser/download/error-stack-parser-2.0.6.tgz?cache=0&sync_timestamp=1578288503034&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ferror-stack-parser%2Fdownload%2Ferror-stack-parser-2.0.6.tgz", - "integrity": "sha1-WpmnB716TFinl5AtSNgoA+3mqtg=", - "dev": true, - "requires": { - "stackframe": "^1.1.1" - } - }, - "es-abstract": { - "version": "1.17.6", - "resolved": "https://registry.npm.taobao.org/es-abstract/download/es-abstract-1.17.6.tgz?cache=0&sync_timestamp=1592109199190&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fes-abstract%2Fdownload%2Fes-abstract-1.17.6.tgz", - "integrity": "sha1-kUIHFweFeyysx7iey2cDFsPi1So=", - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-regex": "^1.1.0", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - }, - "dependencies": { - "is-regex": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/is-regex/download/is-regex-1.1.0.tgz", - "integrity": "sha1-7OOOOJ5JDfDcIcrqK9WW+Yf3Z/8=", - "requires": { - "has-symbols": "^1.0.1" - } - } - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npm.taobao.org/es-to-primitive/download/es-to-primitive-1.2.1.tgz", - "integrity": "sha1-5VzUyc3BiLzvsDs2bHNjI/xciYo=", - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "escalade": { - "version": "3.0.2", - "resolved": "https://registry.npm.taobao.org/escalade/download/escalade-3.0.2.tgz?cache=0&sync_timestamp=1594743037384&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescalade%2Fdownload%2Fescalade-3.0.2.tgz", - "integrity": "sha1-algNcO24eIDyK0yR0NVgeN9pYsQ=", - "dev": true - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/escape-html/download/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz?cache=0&sync_timestamp=1587627107924&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescape-string-regexp%2Fdownload%2Fescape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "escodegen": { - "version": "1.14.3", - "resolved": "https://registry.npm.taobao.org/escodegen/download/escodegen-1.14.3.tgz?cache=0&sync_timestamp=1592866195968&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescodegen%2Fdownload%2Fescodegen-1.14.3.tgz", - "integrity": "sha1-TnuB+6YVgdyXWC7XjKt/Do1j9QM=", - "dev": true, - "requires": { - "esprima": "^4.0.1", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true, - "optional": true - } - } - }, - "eslint": { - "version": "4.19.1", - "resolved": "https://registry.npm.taobao.org/eslint/download/eslint-4.19.1.tgz?cache=0&sync_timestamp=1595098868314&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint%2Fdownload%2Feslint-4.19.1.tgz", - "integrity": "sha1-MtHWU+HZBAiFS/spbwdux+GGowA=", - "dev": true, - "optional": true, - "requires": { - "ajv": "^5.3.0", - "babel-code-frame": "^6.22.0", - "chalk": "^2.1.0", - "concat-stream": "^1.6.0", - "cross-spawn": "^5.1.0", - "debug": "^3.1.0", - "doctrine": "^2.1.0", - "eslint-scope": "^3.7.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^3.5.4", - "esquery": "^1.0.0", - "esutils": "^2.0.2", - "file-entry-cache": "^2.0.0", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.0.1", - "ignore": "^3.3.3", - "imurmurhash": "^0.1.4", - "inquirer": "^3.0.6", - "is-resolvable": "^1.0.0", - "js-yaml": "^3.9.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.4", - "minimatch": "^3.0.2", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "pluralize": "^7.0.0", - "progress": "^2.0.0", - "regexpp": "^1.0.1", - "require-uncached": "^1.0.3", - "semver": "^5.3.0", - "strip-ansi": "^4.0.0", - "strip-json-comments": "~2.0.1", - "table": "4.0.2", - "text-table": "~0.2.0" - }, - "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npm.taobao.org/ajv/download/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "optional": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true, - "optional": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "optional": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "optional": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "eslint-scope": { - "version": "3.7.3", - "resolved": "https://registry.npm.taobao.org/eslint-scope/download/eslint-scope-3.7.3.tgz", - "integrity": "sha1-u1ByANPRf2AkdjYWC0gmKEsQhTU=", - "dev": true, - "optional": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-1.1.0.tgz?cache=0&sync_timestamp=1591599666712&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-deep-equal%2Fdownload%2Ffast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", - "dev": true, - "optional": true - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", - "dev": true, - "optional": true - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-4.1.5.tgz?cache=0&sync_timestamp=1594427569171&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flru-cache%2Fdownload%2Flru-cache-4.1.5.tgz", - "integrity": "sha1-i75Q6oW+1ZvJ4z3KuCNe6bz0Q80=", - "dev": true, - "optional": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "optional": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true, - "optional": true - } - } - }, - "eslint-config-standard": { - "version": "12.0.0", - "resolved": "https://registry.npm.taobao.org/eslint-config-standard/download/eslint-config-standard-12.0.0.tgz?cache=0&sync_timestamp=1584727519567&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-config-standard%2Fdownload%2Feslint-config-standard-12.0.0.tgz", - "integrity": "sha1-Y4tMZdsL1aQTGflruh8V3a0hB9k=", - "dev": true - }, - "eslint-import-resolver-node": { - "version": "0.3.4", - "resolved": "https://registry.npm.taobao.org/eslint-import-resolver-node/download/eslint-import-resolver-node-0.3.4.tgz", - "integrity": "sha1-hf+oGULCUBLYIxCW3fZ5wDBCxxc=", - "dev": true, - "requires": { - "debug": "^2.6.9", - "resolve": "^1.13.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "eslint-loader": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/eslint-loader/download/eslint-loader-2.2.1.tgz", - "integrity": "sha1-KLnBLaVAV68IReKmEScBova/gzc=", - "dev": true, - "requires": { - "loader-fs-cache": "^1.0.0", - "loader-utils": "^1.0.2", - "object-assign": "^4.0.1", - "object-hash": "^1.1.4", - "rimraf": "^2.6.1" - } - }, - "eslint-module-utils": { - "version": "2.6.0", - "resolved": "https://registry.npm.taobao.org/eslint-module-utils/download/eslint-module-utils-2.6.0.tgz", - "integrity": "sha1-V569CU9Wr3eX0ZyYZsnJSGYpv6Y=", - "dev": true, - "requires": { - "debug": "^2.6.9", - "pkg-dir": "^2.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/pkg-dir/download/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } - } - } - }, - "eslint-plugin-cypress": { - "version": "2.11.1", - "resolved": "https://registry.npm.taobao.org/eslint-plugin-cypress/download/eslint-plugin-cypress-2.11.1.tgz", - "integrity": "sha1-qUXid0uIIR4scGoFnUMeJitcKGI=", - "dev": true, - "requires": { - "globals": "^11.12.0" - } - }, - "eslint-plugin-import": { - "version": "2.22.0", - "resolved": "https://registry.npm.taobao.org/eslint-plugin-import/download/eslint-plugin-import-2.22.0.tgz?cache=0&sync_timestamp=1593237313662&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-plugin-import%2Fdownload%2Feslint-plugin-import-2.22.0.tgz", - "integrity": "sha1-kvdzb+H94+Led2I8g43Zkv9f+34=", - "dev": true, - "requires": { - "array-includes": "^3.1.1", - "array.prototype.flat": "^1.2.3", - "contains-path": "^0.1.0", - "debug": "^2.6.9", - "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.3", - "eslint-module-utils": "^2.6.0", - "has": "^1.0.3", - "minimatch": "^3.0.4", - "object.values": "^1.1.1", - "read-pkg-up": "^2.0.0", - "resolve": "^1.17.0", - "tsconfig-paths": "^3.9.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "doctrine": { - "version": "1.5.0", - "resolved": "https://registry.npm.taobao.org/doctrine/download/doctrine-1.5.0.tgz", - "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "isarray": "^1.0.0" - } - } - } - }, - "eslint-plugin-node": { - "version": "6.0.1", - "resolved": "https://registry.npm.taobao.org/eslint-plugin-node/download/eslint-plugin-node-6.0.1.tgz?cache=0&sync_timestamp=1585396050025&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-plugin-node%2Fdownload%2Feslint-plugin-node-6.0.1.tgz", - "integrity": "sha1-vxlkIpgGQ3kxXXpLKnWTc3b6BeQ=", - "dev": true, - "requires": { - "ignore": "^3.3.6", - "minimatch": "^3.0.4", - "resolve": "^1.3.3", - "semver": "^5.4.1" - } - }, - "eslint-plugin-promise": { - "version": "3.8.0", - "resolved": "https://registry.npm.taobao.org/eslint-plugin-promise/download/eslint-plugin-promise-3.8.0.tgz", - "integrity": "sha1-ZevyeoRePB6db2pWIt3TgBaUtiE=", - "dev": true - }, - "eslint-plugin-standard": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/eslint-plugin-standard/download/eslint-plugin-standard-3.1.0.tgz", - "integrity": "sha1-Kp4hJZukxHwC1TstDJE11LECLUc=", - "dev": true - }, - "eslint-plugin-vue": { - "version": "4.7.1", - "resolved": "https://registry.npm.taobao.org/eslint-plugin-vue/download/eslint-plugin-vue-4.7.1.tgz?cache=0&sync_timestamp=1595148924086&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-plugin-vue%2Fdownload%2Feslint-plugin-vue-4.7.1.tgz", - "integrity": "sha1-yCm5/GJYLBiXtaC5Sv1E7MpRHmM=", - "dev": true, - "optional": true, - "requires": { - "vue-eslint-parser": "^2.0.3" - } - }, - "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npm.taobao.org/eslint-scope/download/eslint-scope-4.0.3.tgz", - "integrity": "sha1-ygODMxD2iJoyZHgaqC5j65z+eEg=", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npm.taobao.org/eslint-visitor-keys/download/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha1-MOvR73wv3/AcOk8VEESvJfqwUj4=", - "dev": true - }, - "espree": { - "version": "3.5.4", - "resolved": "https://registry.npm.taobao.org/espree/download/espree-3.5.4.tgz?cache=0&sync_timestamp=1595033675028&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fespree%2Fdownload%2Fespree-3.5.4.tgz", - "integrity": "sha1-sPRHGHyKi+2US4FaZgvd9d610ac=", - "dev": true, - "optional": true, - "requires": { - "acorn": "^5.5.0", - "acorn-jsx": "^3.0.0" - }, - "dependencies": { - "acorn": { - "version": "5.7.4", - "resolved": "https://registry.npm.taobao.org/acorn/download/acorn-5.7.4.tgz?cache=0&sync_timestamp=1591869432510&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Facorn%2Fdownload%2Facorn-5.7.4.tgz", - "integrity": "sha1-Po2KmUfQWZoXltECJddDL0pKz14=", - "dev": true, - "optional": true - } - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/esprima/download/esprima-4.0.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fesprima%2Fdownload%2Fesprima-4.0.1.tgz", - "integrity": "sha1-E7BM2z5sXRnfkatph6hpVhmwqnE=", - "dev": true - }, - "esquery": { - "version": "1.3.1", - "resolved": "https://registry.npm.taobao.org/esquery/download/esquery-1.3.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fesquery%2Fdownload%2Fesquery-1.3.1.tgz", - "integrity": "sha1-t4tYKKqOIU4p+3TE1bdS4cAz2lc=", - "dev": true, - "optional": true, - "requires": { - "estraverse": "^5.1.0" - }, - "dependencies": { - "estraverse": { - "version": "5.1.0", - "resolved": "https://registry.npm.taobao.org/estraverse/download/estraverse-5.1.0.tgz?cache=0&sync_timestamp=1586996117385&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Festraverse%2Fdownload%2Festraverse-5.1.0.tgz", - "integrity": "sha1-N0MJ05/ZNa5QDnuS6Ka0xyDllkI=", - "dev": true, - "optional": true - } - } - }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npm.taobao.org/esrecurse/download/esrecurse-4.2.1.tgz", - "integrity": "sha1-AHo7n9vCs7uH5IeeoZyS/b05Qs8=", - "dev": true, - "requires": { - "estraverse": "^4.1.0" - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/estraverse/download/estraverse-4.3.0.tgz?cache=0&sync_timestamp=1586996117385&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Festraverse%2Fdownload%2Festraverse-4.3.0.tgz", - "integrity": "sha1-OYrT88WiSUi+dyXoPRGn3ijNvR0=", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npm.taobao.org/esutils/download/esutils-2.0.3.tgz?cache=0&sync_timestamp=1564535492241&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fesutils%2Fdownload%2Fesutils-2.0.3.tgz", - "integrity": "sha1-dNLrTeC42hKTcRkQ1Qd1ubcQ72Q=", - "dev": true - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npm.taobao.org/etag/download/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", - "dev": true - }, - "event-pubsub": { - "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/event-pubsub/download/event-pubsub-4.3.0.tgz", - "integrity": "sha1-9o2Ba8KfHsAsU53FjI3UDOcss24=", - "dev": true - }, - "eventemitter3": { - "version": "4.0.4", - "resolved": "https://registry.npm.taobao.org/eventemitter3/download/eventemitter3-4.0.4.tgz?cache=0&sync_timestamp=1589283150629&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feventemitter3%2Fdownload%2Feventemitter3-4.0.4.tgz", - "integrity": "sha1-tUY6zmNaCD0Bi9x8kXtMXxCoU4Q=", - "dev": true - }, - "events": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/events/download/events-3.1.0.tgz?cache=0&sync_timestamp=1578498298945&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fevents%2Fdownload%2Fevents-3.1.0.tgz", - "integrity": "sha1-hCea8bNMt1qoi/X/KR9tC9mzGlk=", - "dev": true - }, - "eventsource": { - "version": "1.0.7", - "resolved": "https://registry.npm.taobao.org/eventsource/download/eventsource-1.0.7.tgz", - "integrity": "sha1-j7xyyT/NNAiAkLwKTmT0tc7m2NA=", - "dev": true, - "requires": { - "original": "^1.0.0" - } - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/evp_bytestokey/download/evp_bytestokey-1.0.3.tgz", - "integrity": "sha1-f8vbGY3HGVlDLv4ThCaE4FJaywI=", - "dev": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/execa/download/execa-1.0.0.tgz?cache=0&sync_timestamp=1594145237072&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fexeca%2Fdownload%2Fexeca-1.0.0.tgz", - "integrity": "sha1-xiNqW7TfbW8V6I5/AXeYIWdJ3dg=", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "exit-hook": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/exit-hook/download/exit-hook-1.1.1.tgz", - "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=", - "dev": true - }, - "exit-on-epipe": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/exit-on-epipe/download/exit-on-epipe-1.0.1.tgz", - "integrity": "sha1-C92S6H1ShdJn2qgXHQ6wYVlolpI=" - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npm.taobao.org/expand-brackets/download/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "express": { - "version": "4.17.1", - "resolved": "https://registry.npm.taobao.org/express/download/express-4.17.1.tgz?cache=0&sync_timestamp=1585185316222&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fexpress%2Fdownload%2Fexpress-4.17.1.tgz", - "integrity": "sha1-RJH8OGBc9R+GKdOcK10Cb5ikwTQ=", - "dev": true, - "requires": { - "accepts": "~1.3.7", - "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", - "content-type": "~1.0.4", - "cookie": "0.4.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.1.2", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npm.taobao.org/qs/download/qs-6.7.0.tgz", - "integrity": "sha1-QdwaAV49WB8WIXdr4xr7KHapsbw=", - "dev": true - } - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npm.taobao.org/extend/download/extend-3.0.2.tgz", - "integrity": "sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo=", - "dev": true - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/is-extendable/download/is-extendable-1.0.1.tgz", - "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "external-editor": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/external-editor/download/external-editor-2.2.0.tgz?cache=0&sync_timestamp=1562602052556&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fexternal-editor%2Fdownload%2Fexternal-editor-2.2.0.tgz", - "integrity": "sha1-BFURz9jRM/OEZnPRBHwVTiFK09U=", - "dev": true, - "optional": true, - "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npm.taobao.org/extglob/download/extglob-2.0.4.tgz", - "integrity": "sha1-rQD+TcYSqSMuhxhxHcXLWrAoVUM=", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-6.0.3.tgz", - "integrity": "sha1-B8BQNKbDSfoG4k+jWqdttFgM5N0=", - "dev": true - } - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npm.taobao.org/extsprintf/download/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-3.1.3.tgz?cache=0&sync_timestamp=1591599666712&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-deep-equal%2Fdownload%2Ffast-deep-equal-3.1.3.tgz", - "integrity": "sha1-On1WtVnWy8PrUSMlJE5hmmXGxSU=", - "dev": true - }, - "fast-glob": { - "version": "2.2.7", - "resolved": "https://registry.npm.taobao.org/fast-glob/download/fast-glob-2.2.7.tgz", - "integrity": "sha1-aVOFfDr6R1//ku5gFdUtpwpM050=", - "dev": true, - "requires": { - "@mrmlnc/readdir-enhanced": "^2.2.1", - "@nodelib/fs.stat": "^1.1.2", - "glob-parent": "^3.1.0", - "is-glob": "^4.0.0", - "merge2": "^1.2.3", - "micromatch": "^3.1.10" - }, - "dependencies": { - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/glob-parent/download/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - } - } - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/fast-json-stable-stringify/download/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha1-h0v2nG9ATCtdmcSBNBOZ/VWJJjM=", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npm.taobao.org/fast-levenshtein/download/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "fastparse": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/fastparse/download/fastparse-1.1.2.tgz", - "integrity": "sha1-kXKMWllC7O2FMSg8eUQe5BIsNak=", - "dev": true - }, - "faye-websocket": { - "version": "0.10.0", - "resolved": "https://registry.npm.taobao.org/faye-websocket/download/faye-websocket-0.10.0.tgz", - "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", - "dev": true, - "requires": { - "websocket-driver": ">=0.5.1" - } - }, - "fecha": { - "version": "2.3.3", - "resolved": "https://registry.npm.taobao.org/fecha/download/fecha-2.3.3.tgz", - "integrity": "sha1-lI50FX3xoy/RsSw6PDzctuydls0=" - }, - "figgy-pudding": { - "version": "3.5.2", - "resolved": "https://registry.npm.taobao.org/figgy-pudding/download/figgy-pudding-3.5.2.tgz", - "integrity": "sha1-tO7oFIq7Adzx0aw0Nn1Z4S+mHW4=", - "dev": true - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/figures/download/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "optional": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "file-entry-cache": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/file-entry-cache/download/file-entry-cache-2.0.0.tgz", - "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", - "dev": true, - "optional": true, - "requires": { - "flat-cache": "^1.2.1", - "object-assign": "^4.0.1" - } - }, - "file-loader": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/file-loader/download/file-loader-3.0.1.tgz", - "integrity": "sha1-+OC6C1mZGLUa3+RdZtHnca1WD6o=", - "dev": true, - "requires": { - "loader-utils": "^1.0.2", - "schema-utils": "^1.0.0" - }, - "dependencies": { - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz", - "integrity": "sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A=", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/file-uri-to-path/download/file-uri-to-path-1.0.0.tgz", - "integrity": "sha1-VTp7hEb/b2hDWcRF8eN6BdrMM90=", - "dev": true, - "optional": true - }, - "filesize": { - "version": "3.6.1", - "resolved": "https://registry.npm.taobao.org/filesize/download/filesize-3.6.1.tgz", - "integrity": "sha1-CQuz7gG2+AGoqL6Z0xcQs0Irsxc=", - "dev": true - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/fill-range/download/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/finalhandler/download/finalhandler-1.1.2.tgz", - "integrity": "sha1-t+fQAP/RGTjQ/bBTUG9uur6fWH0=", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "find-babel-config": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/find-babel-config/download/find-babel-config-1.2.0.tgz", - "integrity": "sha1-qbezF+tbmGDNqdVHQKjIM3oig6I=", - "dev": true, - "requires": { - "json5": "^0.5.1", - "path-exists": "^3.0.0" - }, - "dependencies": { - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npm.taobao.org/json5/download/json5-0.5.1.tgz?cache=0&sync_timestamp=1586046271069&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjson5%2Fdownload%2Fjson5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - } - } - }, - "find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-2.1.0.tgz", - "integrity": "sha1-jQ+UzRP+Q8bHwmGg2GEVypGMBfc=", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" - } - }, - "find-parent-dir": { - "version": "0.3.0", - "resolved": "https://registry.npm.taobao.org/find-parent-dir/download/find-parent-dir-0.3.0.tgz", - "integrity": "sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ=", - "dev": true - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/find-up/download/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "flat-cache": { - "version": "1.3.4", - "resolved": "https://registry.npm.taobao.org/flat-cache/download/flat-cache-1.3.4.tgz", - "integrity": "sha1-LC73dSXMKSkAff/6HdMUqpyd7m8=", - "dev": true, - "optional": true, - "requires": { - "circular-json": "^0.3.1", - "graceful-fs": "^4.1.2", - "rimraf": "~2.6.2", - "write": "^0.2.1" - }, - "dependencies": { - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npm.taobao.org/rimraf/download/rimraf-2.6.3.tgz?cache=0&sync_timestamp=1581229865753&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frimraf%2Fdownload%2Frimraf-2.6.3.tgz", - "integrity": "sha1-stEE/g2Psnz54KHNqCYt04M8bKs=", - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - } - } - }, - "flush-write-stream": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/flush-write-stream/download/flush-write-stream-1.1.1.tgz", - "integrity": "sha1-jdfYc6G6vCB9lOrQwuDkQnbr8ug=", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.3.6" - } - }, - "fmin": { - "version": "0.0.2", - "resolved": "https://registry.npm.taobao.org/fmin/download/fmin-0.0.2.tgz", - "integrity": "sha1-Wbu0DUP/3ByUzQClaMQflfGXMBc=", - "requires": { - "contour_plot": "^0.0.1", - "json2module": "^0.0.3", - "rollup": "^0.25.8", - "tape": "^4.5.1", - "uglify-js": "^2.6.2" - } - }, - "follow-redirects": { - "version": "1.5.10", - "resolved": "https://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.5.10.tgz?cache=0&sync_timestamp=1592518281721&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffollow-redirects%2Fdownload%2Ffollow-redirects-1.5.10.tgz", - "integrity": "sha1-e3qfmuov3/NnhqlP9kPtB/T/Xio=", - "requires": { - "debug": "=3.1.0" - } - }, - "for-each": { - "version": "0.3.3", - "resolved": "https://registry.npm.taobao.org/for-each/download/for-each-0.3.3.tgz", - "integrity": "sha1-abRH6IoKXTLD5whPPxcQA0shN24=", - "requires": { - "is-callable": "^1.1.3" - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/for-in/download/for-in-1.0.2.tgz?cache=0&sync_timestamp=1573184298867&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffor-in%2Fdownload%2Ffor-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/forever-agent/download/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npm.taobao.org/form-data/download/form-data-2.3.3.tgz", - "integrity": "sha1-3M5SwF9kTymManq5Nr1yTO/786Y=", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/forwarded/download/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", - "dev": true - }, - "frac": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/frac/download/frac-1.1.2.tgz", - "integrity": "sha1-PXT39keMiKG1AgMG10fcYxPHTQs=" - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npm.taobao.org/fragment-cache/download/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npm.taobao.org/fresh/download/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "dev": true - }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/from2/download/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - } - }, - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npm.taobao.org/fs-extra/download/fs-extra-7.0.1.tgz", - "integrity": "sha1-TxicRKoSO4lfcigE9V6iPq3DSOk=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/fs-minipass/download/fs-minipass-2.1.0.tgz?cache=0&sync_timestamp=1579628584498&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffs-minipass%2Fdownload%2Ffs-minipass-2.1.0.tgz", - "integrity": "sha1-f1A2/b8SxjwWkZDL5BmchSJx+fs=", - "dev": true, - "requires": { - "minipass": "^3.0.0" - } - }, - "fs-write-stream-atomic": { - "version": "1.0.10", - "resolved": "https://registry.npm.taobao.org/fs-write-stream-atomic/download/fs-write-stream-atomic-1.0.10.tgz", - "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "iferr": "^0.1.5", - "imurmurhash": "^0.1.4", - "readable-stream": "1 || 2" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/fs.realpath/download/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-2.1.3.tgz?cache=0&sync_timestamp=1588787369955&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffsevents%2Fdownload%2Ffsevents-2.1.3.tgz", - "integrity": "sha1-+3OHA66NL5/pAMM4Nt3r7ouX8j4=", - "dev": true, - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/function-bind/download/function-bind-1.1.1.tgz", - "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=" - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/functional-red-black-tree/download/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true, - "optional": true - }, - "gensync": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npm.taobao.org/gensync/download/gensync-1.0.0-beta.1.tgz", - "integrity": "sha1-WPQ2H/mH5f9uHnohCCeqNx6qwmk=", - "dev": true - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/get-caller-file/download/get-caller-file-1.0.3.tgz", - "integrity": "sha1-+Xj6TJDR3+f/LWvtoqUV5xO9z0o=", - "dev": true - }, - "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/get-func-name/download/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", - "dev": true - }, - "get-own-enumerable-property-symbols": { - "version": "3.0.2", - "resolved": "https://registry.npm.taobao.org/get-own-enumerable-property-symbols/download/get-own-enumerable-property-symbols-3.0.2.tgz", - "integrity": "sha1-tf3nfyLL4185C04ImSLFC85u9mQ=", - "dev": true - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/get-stream/download/get-stream-4.1.0.tgz", - "integrity": "sha1-wbJVV189wh1Zv8ec09K0axw6VLU=", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npm.taobao.org/get-value/download/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npm.taobao.org/getpass/download/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npm.taobao.org/glob/download/glob-7.1.6.tgz?cache=0&sync_timestamp=1573078079496&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglob%2Fdownload%2Fglob-7.1.6.tgz", - "integrity": "sha1-FB8zuBp8JJLhJVlDB0gMRmeSeKY=", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npm.taobao.org/glob-parent/download/glob-parent-5.1.1.tgz", - "integrity": "sha1-tsHvQXxOVmPqSY8cRa+saRa7wik=", - "dev": true, - "optional": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "glob-to-regexp": { - "version": "0.3.0", - "resolved": "https://registry.npm.taobao.org/glob-to-regexp/download/glob-to-regexp-0.3.0.tgz", - "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", - "dev": true - }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npm.taobao.org/globals/download/globals-11.12.0.tgz", - "integrity": "sha1-q4eVM4hooLq9hSV1gBjCp+uVxC4=", - "dev": true - }, - "globby": { - "version": "9.2.0", - "resolved": "https://registry.npm.taobao.org/globby/download/globby-9.2.0.tgz", - "integrity": "sha1-/QKacGxwPSm90XD0tts6P3p8tj0=", - "dev": true, - "requires": { - "@types/glob": "^7.1.1", - "array-union": "^1.0.2", - "dir-glob": "^2.2.2", - "fast-glob": "^2.2.6", - "glob": "^7.1.3", - "ignore": "^4.0.3", - "pify": "^4.0.1", - "slash": "^2.0.0" - }, - "dependencies": { - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npm.taobao.org/ignore/download/ignore-4.0.6.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fignore%2Fdownload%2Fignore-4.0.6.tgz", - "integrity": "sha1-dQ49tYYgh7RzfrrIIH/9HvJ7Jfw=", - "dev": true - } - } - }, - "good-listener": { - "version": "1.2.2", - "resolved": "https://registry.npm.taobao.org/good-listener/download/good-listener-1.2.2.tgz", - "integrity": "sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=", - "requires": { - "delegate": "^3.1.2" - } - }, - "gq-plus": { - "version": "2.1.5", - "resolved": "https://registry.npm.taobao.org/gq-plus/download/gq-plus-2.1.5.tgz", - "integrity": "sha1-xGkLE10oAAukXd7nuopA10RvVJM=", - "requires": { - "async-validator": "^1.10.0", - "axios": "^0.15.3", - "deepmerge": "^2.2.1", - "element-resize-detector": "^1.2.0", - "js-calendar": "^1.2.3", - "lodash.throttle": "^4.1.1", - "popper.js": "^1.14.6", - "tinycolor2": "^1.4.1", - "v-click-outside-x": "^3.5.6" - }, - "dependencies": { - "axios": { - "version": "0.15.3", - "resolved": "https://registry.npm.taobao.org/axios/download/axios-0.15.3.tgz", - "integrity": "sha1-LJ1jiy4ZGgjqHWzJiOrda6W9wFM=", - "requires": { - "follow-redirects": "1.0.0" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "requires": { - "ms": "2.0.0" - } - }, - "follow-redirects": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.0.0.tgz?cache=0&sync_timestamp=1592518281721&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffollow-redirects%2Fdownload%2Ffollow-redirects-1.0.0.tgz", - "integrity": "sha1-jjQpjL0uF28lTv/sdaHHjMhJ/Tc=", - "requires": { - "debug": "^2.2.0" - } - } - } - }, - "graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.2.4.tgz?cache=0&sync_timestamp=1588086924019&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fgraceful-fs%2Fdownload%2Fgraceful-fs-4.2.4.tgz", - "integrity": "sha1-Ila94U02MpWMRl68ltxGfKB6Kfs=", - "dev": true - }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npm.taobao.org/growl/download/growl-1.10.5.tgz", - "integrity": "sha1-8nNdwig2dPpnR4sQGBBZNVw2nl4=", - "dev": true - }, - "gzip-size": { - "version": "5.1.1", - "resolved": "https://registry.npm.taobao.org/gzip-size/download/gzip-size-5.1.1.tgz", - "integrity": "sha1-y5vuaS+HwGErIyhAqHOQTkwTUnQ=", - "dev": true, - "requires": { - "duplexer": "^0.1.1", - "pify": "^4.0.1" - } - }, - "handle-thing": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/handle-thing/download/handle-thing-2.0.1.tgz", - "integrity": "sha1-hX95zjWVgMNA1DCBzGSJcNC7I04=", - "dev": true - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/har-schema/download/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true - }, - "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npm.taobao.org/har-validator/download/har-validator-5.1.3.tgz", - "integrity": "sha1-HvievT5JllV2de7ZiTEQ3DUPoIA=", - "dev": true, - "requires": { - "ajv": "^6.5.5", - "har-schema": "^2.0.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/has/download/has-1.0.3.tgz", - "integrity": "sha1-ci18v8H2qoJB8W3YFOAR4fQeh5Y=", - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/has-ansi/download/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/has-symbols/download/has-symbols-1.0.1.tgz", - "integrity": "sha1-n1IUdYpEGWxAbZvXbOv4HsLdMeg=" - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/has-value/download/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/has-values/download/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "hash-base": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/hash-base/download/hash-base-3.1.0.tgz", - "integrity": "sha1-VcOB2eBuHSmXqIO0o/3f5/DTrzM=", - "dev": true, - "requires": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npm.taobao.org/readable-stream/download/readable-stream-3.6.0.tgz", - "integrity": "sha1-M3u9o63AcGvT4CRCaihtS0sskZg=", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.2.1.tgz", - "integrity": "sha1-Hq+fqb2x/dTsdfWPnNtOa3gn7sY=", - "dev": true - } - } - }, - "hash-sum": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/hash-sum/download/hash-sum-1.0.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhash-sum%2Fdownload%2Fhash-sum-1.0.2.tgz", - "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=", - "dev": true - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npm.taobao.org/hash.js/download/hash.js-1.1.7.tgz", - "integrity": "sha1-C6vKU46NTuSg+JiNaIZlN6ADz0I=", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npm.taobao.org/hawk/download/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", - "dev": true, - "optional": true, - "requires": { - "boom": "2.x.x", - "cryptiles": "2.x.x", - "hoek": "2.x.x", - "sntp": "1.x.x" - } - }, - "he": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/he/download/he-1.1.1.tgz", - "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", - "dev": true - }, - "hex-color-regex": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/hex-color-regex/download/hex-color-regex-1.1.0.tgz", - "integrity": "sha1-TAb8y0YC/iYCs8k9+C1+fb8aio4=", - "dev": true - }, - "highlight.js": { - "version": "9.18.1", - "resolved": "https://registry.npm.taobao.org/highlight.js/download/highlight.js-9.18.1.tgz", - "integrity": "sha1-7SGqAB/mJSuxCj121HVzxlOf4Tw=" - }, - "highlight.js-async-webpack": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/highlight.js-async-webpack/download/highlight.js-async-webpack-1.0.4.tgz", - "integrity": "sha1-wGtnv5nwSQRdYrdW5YVbCRLsYWw=" - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/hmac-drbg/download/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npm.taobao.org/hoek/download/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", - "dev": true, - "optional": true - }, - "hoopy": { - "version": "0.1.4", - "resolved": "https://registry.npm.taobao.org/hoopy/download/hoopy-0.1.4.tgz", - "integrity": "sha1-YJIH1mEQADOpqUAq096mdzgcGx0=", - "dev": true - }, - "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npm.taobao.org/hosted-git-info/download/hosted-git-info-2.8.8.tgz?cache=0&sync_timestamp=1594428020608&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhosted-git-info%2Fdownload%2Fhosted-git-info-2.8.8.tgz", - "integrity": "sha1-dTm9S8Hg4KiVgVouAmJCCxKFhIg=", - "dev": true - }, - "hpack.js": { - "version": "2.1.6", - "resolved": "https://registry.npm.taobao.org/hpack.js/download/hpack.js-2.1.6.tgz", - "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "obuf": "^1.0.0", - "readable-stream": "^2.0.1", - "wbuf": "^1.1.0" - } - }, - "hsl-regex": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/hsl-regex/download/hsl-regex-1.0.0.tgz", - "integrity": "sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4=", - "dev": true - }, - "hsla-regex": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/hsla-regex/download/hsla-regex-1.0.0.tgz", - "integrity": "sha1-wc56MWjIxmFAM6S194d/OyJfnDg=", - "dev": true - }, - "html-comment-regex": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/html-comment-regex/download/html-comment-regex-1.1.2.tgz", - "integrity": "sha1-l9RoiutcgYhqNk+qDK0d2hTUM6c=", - "dev": true - }, - "html-encoding-sniffer": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/html-encoding-sniffer/download/html-encoding-sniffer-1.0.2.tgz", - "integrity": "sha1-5w2EuU2lOqN14R/jo1G+ZkLKRvg=", - "dev": true, - "requires": { - "whatwg-encoding": "^1.0.1" - } - }, - "html-entities": { - "version": "1.3.1", - "resolved": "https://registry.npm.taobao.org/html-entities/download/html-entities-1.3.1.tgz", - "integrity": "sha1-+5oaS1sUxdq6gtPjTGrk/nAaDkQ=", - "dev": true - }, - "html-minifier": { - "version": "3.5.21", - "resolved": "https://registry.npm.taobao.org/html-minifier/download/html-minifier-3.5.21.tgz", - "integrity": "sha1-0AQOBUcw41TbAIRjWTGUAVIS0gw=", - "dev": true, - "requires": { - "camel-case": "3.0.x", - "clean-css": "4.2.x", - "commander": "2.17.x", - "he": "1.2.x", - "param-case": "2.1.x", - "relateurl": "0.2.x", - "uglify-js": "3.4.x" - }, - "dependencies": { - "commander": { - "version": "2.17.1", - "resolved": "https://registry.npm.taobao.org/commander/download/commander-2.17.1.tgz?cache=0&sync_timestamp=1595168173997&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.17.1.tgz", - "integrity": "sha1-vXerfebelCBc6sxy8XFtKfIKd78=", - "dev": true - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/he/download/he-1.2.0.tgz", - "integrity": "sha1-hK5l+n6vsWX922FWauFLrwVmTw8=", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - }, - "uglify-js": { - "version": "3.4.10", - "resolved": "https://registry.npm.taobao.org/uglify-js/download/uglify-js-3.4.10.tgz?cache=0&sync_timestamp=1592744803278&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuglify-js%2Fdownload%2Fuglify-js-3.4.10.tgz", - "integrity": "sha1-mtlWPY6zrN+404WX0q8dgV9qdV8=", - "dev": true, - "requires": { - "commander": "~2.19.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "commander": { - "version": "2.19.0", - "resolved": "https://registry.npm.taobao.org/commander/download/commander-2.19.0.tgz?cache=0&sync_timestamp=1595168173997&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.19.0.tgz", - "integrity": "sha1-9hmKqE5bg8RgVLlN3tv+1e6f8So=", - "dev": true - } - } - } - } - }, - "html-tags": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/html-tags/download/html-tags-2.0.0.tgz", - "integrity": "sha1-ELMKOGCF9Dzt41PMj6fLDe7qZos=", - "dev": true - }, - "html-webpack-plugin": { - "version": "3.2.0", - "resolved": "https://registry.npm.taobao.org/html-webpack-plugin/download/html-webpack-plugin-3.2.0.tgz?cache=0&sync_timestamp=1588268411154&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhtml-webpack-plugin%2Fdownload%2Fhtml-webpack-plugin-3.2.0.tgz", - "integrity": "sha1-sBq71yOsqqeze2r0SS69oD2d03s=", - "dev": true, - "requires": { - "html-minifier": "^3.2.3", - "loader-utils": "^0.2.16", - "lodash": "^4.17.3", - "pretty-error": "^2.0.2", - "tapable": "^1.0.0", - "toposort": "^1.0.0", - "util.promisify": "1.0.0" - }, - "dependencies": { - "big.js": { - "version": "3.2.0", - "resolved": "https://registry.npm.taobao.org/big.js/download/big.js-3.2.0.tgz", - "integrity": "sha1-pfwpi4G54Nyi5FiCR4S2XFK6WI4=", - "dev": true - }, - "emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/emojis-list/download/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", - "dev": true - }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npm.taobao.org/json5/download/json5-0.5.1.tgz?cache=0&sync_timestamp=1586046271069&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjson5%2Fdownload%2Fjson5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npm.taobao.org/loader-utils/download/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0", - "object-assign": "^4.0.1" - } - }, - "util.promisify": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/util.promisify/download/util.promisify-1.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Futil.promisify%2Fdownload%2Futil.promisify-1.0.0.tgz", - "integrity": "sha1-RA9xZaRZyaFtwUXrjnLzVocJcDA=", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "object.getownpropertydescriptors": "^2.0.3" - } - } - } - }, - "html2canvas": { - "version": "1.0.0-rc.5", - "resolved": "https://registry.npm.taobao.org/html2canvas/download/html2canvas-1.0.0-rc.5.tgz", - "integrity": "sha1-TuPKyfbiCg+gwvNab5nJYK5+xME=", - "requires": { - "css-line-break": "1.1.1" - } - }, - "htmlparser2": { - "version": "3.10.1", - "resolved": "https://registry.npm.taobao.org/htmlparser2/download/htmlparser2-3.10.1.tgz", - "integrity": "sha1-vWedw/WYl7ajS7EHSchVu1OpOS8=", - "dev": true, - "requires": { - "domelementtype": "^1.3.1", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^3.1.1" - }, - "dependencies": { - "entities": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/entities/download/entities-1.1.2.tgz?cache=0&sync_timestamp=1591227679482&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fentities%2Fdownload%2Fentities-1.1.2.tgz", - "integrity": "sha1-vfpzUplmTfr9NFKe1PhSKidf6lY=", - "dev": true - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npm.taobao.org/readable-stream/download/readable-stream-3.6.0.tgz", - "integrity": "sha1-M3u9o63AcGvT4CRCaihtS0sskZg=", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "http-deceiver": { - "version": "1.2.7", - "resolved": "https://registry.npm.taobao.org/http-deceiver/download/http-deceiver-1.2.7.tgz", - "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", - "dev": true - }, - "http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npm.taobao.org/http-errors/download/http-errors-1.7.2.tgz?cache=0&sync_timestamp=1593407710477&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-errors%2Fdownload%2Fhttp-errors-1.7.2.tgz", - "integrity": "sha1-T1ApzxMjnzEDblsuVSkrz7zIXI8=", - "dev": true, - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - } - } - }, - "http-proxy": { - "version": "1.18.1", - "resolved": "https://registry.npm.taobao.org/http-proxy/download/http-proxy-1.18.1.tgz", - "integrity": "sha1-QBVB8FNIhLv5UmAzTnL4juOXZUk=", - "dev": true, - "requires": { - "eventemitter3": "^4.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - } - }, - "http-proxy-middleware": { - "version": "0.19.1", - "resolved": "https://registry.npm.taobao.org/http-proxy-middleware/download/http-proxy-middleware-0.19.1.tgz?cache=0&sync_timestamp=1594312982456&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-proxy-middleware%2Fdownload%2Fhttp-proxy-middleware-0.19.1.tgz", - "integrity": "sha1-GDx9xKoUeRUDBkmMIQza+WCApDo=", - "dev": true, - "requires": { - "http-proxy": "^1.17.0", - "is-glob": "^4.0.0", - "lodash": "^4.17.11", - "micromatch": "^3.1.10" - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/http-signature/download/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/https-browserify/download/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", - "dev": true - }, - "human-signals": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/human-signals/download/human-signals-1.1.1.tgz?cache=0&sync_timestamp=1584198662293&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhuman-signals%2Fdownload%2Fhuman-signals-1.1.1.tgz", - "integrity": "sha1-xbHNFPUK6uCatsWf5jujOV/k36M=", - "dev": true - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.4.24.tgz", - "integrity": "sha1-ICK0sl+93CHS9SSXSkdKr+czkIs=", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "icss-replace-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/icss-replace-symbols/download/icss-replace-symbols-1.1.0.tgz", - "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=", - "dev": true - }, - "icss-utils": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/icss-utils/download/icss-utils-2.1.0.tgz", - "integrity": "sha1-g/Cg7DeL8yRheLbCrZE28TWxyWI=", - "dev": true, - "requires": { - "postcss": "^6.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "postcss": { - "version": "6.0.23", - "resolved": "https://registry.npm.taobao.org/postcss/download/postcss-6.0.23.tgz?cache=0&sync_timestamp=1591102414113&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss%2Fdownload%2Fpostcss-6.0.23.tgz", - "integrity": "sha1-YcgswyisYOZ3ZF+XkFTrmLwOMyQ=", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npm.taobao.org/ieee754/download/ieee754-1.1.13.tgz", - "integrity": "sha1-7BaFWOlaoYH9h9N/VcMrvLZwi4Q=", - "dev": true - }, - "iferr": { - "version": "0.1.5", - "resolved": "https://registry.npm.taobao.org/iferr/download/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", - "dev": true - }, - "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npm.taobao.org/ignore/download/ignore-3.3.10.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fignore%2Fdownload%2Fignore-3.3.10.tgz", - "integrity": "sha1-Cpf7h2mG6AgcYxFg+PnziRV/AEM=", - "dev": true - }, - "image-size": { - "version": "0.5.5", - "resolved": "https://registry.npm.taobao.org/image-size/download/image-size-0.5.5.tgz", - "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", - "dev": true, - "optional": true - }, - "import-cwd": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/import-cwd/download/import-cwd-2.1.0.tgz", - "integrity": "sha1-qmzzbnInYShcs3HsZRn1PiQ1sKk=", - "dev": true, - "requires": { - "import-from": "^2.1.0" - } - }, - "import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/import-fresh/download/import-fresh-2.0.0.tgz", - "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", - "dev": true, - "requires": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" - }, - "dependencies": { - "caller-path": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/caller-path/download/caller-path-2.0.0.tgz", - "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", - "dev": true, - "requires": { - "caller-callsite": "^2.0.0" - } - }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/resolve-from/download/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true - } - } - }, - "import-from": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/import-from/download/import-from-2.1.0.tgz", - "integrity": "sha1-M1238qev/VOqpHHUuAId7ja387E=", - "dev": true, - "requires": { - "resolve-from": "^3.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/resolve-from/download/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true - } - } - }, - "import-local": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/import-local/download/import-local-2.0.0.tgz", - "integrity": "sha1-VQcL44pZk88Y72236WH1vuXFoJ0=", - "dev": true, - "requires": { - "pkg-dir": "^3.0.0", - "resolve-cwd": "^2.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npm.taobao.org/imurmurhash/download/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/indent-string/download/indent-string-4.0.0.tgz", - "integrity": "sha1-Yk+PRJfWGbLZdoUx1Y9BIoVNclE=", - "dev": true - }, - "indexes-of": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/indexes-of/download/indexes-of-1.0.1.tgz", - "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", - "dev": true - }, - "infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/infer-owner/download/infer-owner-1.0.4.tgz", - "integrity": "sha1-xM78qo5RBRwqQLos6KPScpWvlGc=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.4.tgz", - "integrity": "sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w=" - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npm.taobao.org/ini/download/ini-1.3.5.tgz", - "integrity": "sha1-7uJfVtscnsYIXgwid4CD9Zar+Sc=", - "dev": true - }, - "inquirer": { - "version": "3.3.0", - "resolved": "https://registry.npm.taobao.org/inquirer/download/inquirer-3.3.0.tgz?cache=0&sync_timestamp=1594661205347&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Finquirer%2Fdownload%2Finquirer-3.3.0.tgz", - "integrity": "sha1-ndLyrXZdyrH/BEO0kUQqILoifck=", - "dev": true, - "optional": true, - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.0.4", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rx-lite": "^4.0.8", - "rx-lite-aggregates": "^4.0.8", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true, - "optional": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "optional": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "optional": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "internal-ip": { - "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/internal-ip/download/internal-ip-4.3.0.tgz", - "integrity": "sha1-hFRSuq2dLKO2nGNaE3rLmg2tCQc=", - "dev": true, - "requires": { - "default-gateway": "^4.2.0", - "ipaddr.js": "^1.9.0" - }, - "dependencies": { - "default-gateway": { - "version": "4.2.0", - "resolved": "https://registry.npm.taobao.org/default-gateway/download/default-gateway-4.2.0.tgz?cache=0&sync_timestamp=1590419212936&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdefault-gateway%2Fdownload%2Fdefault-gateway-4.2.0.tgz", - "integrity": "sha1-FnEEx1AMIRX23WmwpTa7jtcgVSs=", - "dev": true, - "requires": { - "execa": "^1.0.0", - "ip-regex": "^2.1.0" - } - } - } - }, - "interpret": { - "version": "1.4.0", - "resolved": "https://registry.npm.taobao.org/interpret/download/interpret-1.4.0.tgz", - "integrity": "sha1-Zlq4vE2iendKQFhOgS4+D6RbGh4=", - "dev": true - }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npm.taobao.org/invariant/download/invariant-2.2.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Finvariant%2Fdownload%2Finvariant-2.2.4.tgz", - "integrity": "sha1-YQ88ksk1nOHbYW5TgAjSP/NRWOY=", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/invert-kv/download/invert-kv-2.0.0.tgz?cache=0&sync_timestamp=1589565904735&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Finvert-kv%2Fdownload%2Finvert-kv-2.0.0.tgz", - "integrity": "sha1-c5P1r6Weyf9fZ6J2INEcIm4+7AI=", - "dev": true - }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npm.taobao.org/ip/download/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", - "dev": true - }, - "ip-regex": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/ip-regex/download/ip-regex-2.1.0.tgz", - "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", - "dev": true - }, - "ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npm.taobao.org/ipaddr.js/download/ipaddr.js-1.9.1.tgz", - "integrity": "sha1-v/OFQ+64mEglB5/zoqjmy9RngbM=", - "dev": true - }, - "is-absolute-url": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/is-absolute-url/download/is-absolute-url-2.1.0.tgz", - "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=", - "dev": true - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-arguments": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/is-arguments/download/is-arguments-1.0.4.tgz", - "integrity": "sha1-P6+WbHy6D/Q3+zH2JQCC/PBEjPM=" - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npm.taobao.org/is-arrayish/download/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/is-binary-path/download/is-binary-path-2.1.0.tgz", - "integrity": "sha1-6h9/O4DwZCNug0cPhsCcJU+0Wwk=", - "dev": true, - "optional": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npm.taobao.org/is-buffer/download/is-buffer-1.1.6.tgz", - "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=" - }, - "is-callable": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/is-callable/download/is-callable-1.2.0.tgz?cache=0&sync_timestamp=1591427607174&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-callable%2Fdownload%2Fis-callable-1.2.0.tgz", - "integrity": "sha1-gzNlYLVKOONeOi33r9BFTWkUaLs=" - }, - "is-ci": { - "version": "1.2.1", - "resolved": "https://registry.npm.taobao.org/is-ci/download/is-ci-1.2.1.tgz", - "integrity": "sha1-43ecjuF/zPQoSI9uKBGH8uYyhBw=", - "dev": true, - "requires": { - "ci-info": "^1.5.0" - } - }, - "is-color-stop": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/is-color-stop/download/is-color-stop-1.1.0.tgz", - "integrity": "sha1-z/9HGu5N1cnhWFmPvhKWe1za00U=", - "dev": true, - "requires": { - "css-color-names": "^0.0.4", - "hex-color-regex": "^1.1.0", - "hsl-regex": "^1.0.0", - "hsla-regex": "^1.0.0", - "rgb-regex": "^1.0.1", - "rgba-regex": "^1.0.0" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-date-object": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/is-date-object/download/is-date-object-1.0.2.tgz?cache=0&sync_timestamp=1576729182289&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-date-object%2Fdownload%2Fis-date-object-1.0.2.tgz", - "integrity": "sha1-vac28s2P0G0yhE53Q7+nSUw7/X4=" - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npm.taobao.org/is-descriptor/download/is-descriptor-0.1.6.tgz", - "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-5.1.0.tgz", - "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=", - "dev": true - } - } - }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npm.taobao.org/is-directory/download/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", - "dev": true - }, - "is-docker": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/is-docker/download/is-docker-2.0.0.tgz", - "integrity": "sha1-LLDfDnXi0GT+GGTDfN6st7Lc8ls=", - "dev": true - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/is-extendable/download/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/is-extglob/download/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-finite": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/is-finite/download/is-finite-1.1.0.tgz", - "integrity": "sha1-kEE1x3+0LAZB1qobzbxNqo2ggvM=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-4.0.1.tgz", - "integrity": "sha1-dWfb6fL14kZ7x3q4PEopSCQHpdw=", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/is-number/download/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/is-obj/download/is-obj-2.0.0.tgz", - "integrity": "sha1-Rz+wXZc3BeP9liBUUBjKjiLvSYI=", - "dev": true - }, - "is-observable": { - "version": "0.2.0", - "resolved": "https://registry.npm.taobao.org/is-observable/download/is-observable-0.2.0.tgz", - "integrity": "sha1-s2ExHYPG5dcmyr9eJQsCNxBvWuI=", - "dev": true, - "requires": { - "symbol-observable": "^0.2.2" - } - }, - "is-path-cwd": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/is-path-cwd/download/is-path-cwd-2.2.0.tgz", - "integrity": "sha1-Z9Q7gmZKe1GR/ZEZEn6zAASKn9s=", - "dev": true - }, - "is-path-in-cwd": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/is-path-in-cwd/download/is-path-in-cwd-2.1.0.tgz", - "integrity": "sha1-v+Lcomxp85cmWkAJljYCk1oFOss=", - "dev": true, - "requires": { - "is-path-inside": "^2.1.0" - } - }, - "is-path-inside": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/is-path-inside/download/is-path-inside-2.1.0.tgz", - "integrity": "sha1-fJgQWH1lmkDSe8201WFuqwWUlLI=", - "dev": true, - "requires": { - "path-is-inside": "^1.0.2" - } - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/is-plain-obj/download/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npm.taobao.org/is-plain-object/download/is-plain-object-2.0.4.tgz?cache=0&sync_timestamp=1595290593289&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-plain-object%2Fdownload%2Fis-plain-object-2.0.4.tgz", - "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-promise": { - "version": "2.2.2", - "resolved": "https://registry.npm.taobao.org/is-promise/download/is-promise-2.2.2.tgz?cache=0&sync_timestamp=1588001830257&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-promise%2Fdownload%2Fis-promise-2.2.2.tgz", - "integrity": "sha1-OauVnMv5p3TPB597QMeib3YxNfE=", - "dev": true - }, - "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/is-regex/download/is-regex-1.0.5.tgz", - "integrity": "sha1-OdWJo1i/GJZ/cmlnEguPwa7XTq4=", - "requires": { - "has": "^1.0.3" - } - }, - "is-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-regexp/download/is-regexp-1.0.0.tgz", - "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=", - "dev": true - }, - "is-resolvable": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/is-resolvable/download/is-resolvable-1.1.0.tgz", - "integrity": "sha1-+xj4fOH+uSUWnJpAfBkxijIG7Yg=", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/is-stream/download/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-string": { - "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/is-string/download/is-string-1.0.5.tgz", - "integrity": "sha1-QEk+0ZjvP/R3uMf5L2ROyCpc06Y=", - "dev": true - }, - "is-svg": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/is-svg/download/is-svg-3.0.0.tgz", - "integrity": "sha1-kyHb0pwhLlypnE+peUxxS8r6L3U=", - "dev": true, - "requires": { - "html-comment-regex": "^1.1.0" - } - }, - "is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/is-symbol/download/is-symbol-1.0.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-symbol%2Fdownload%2Fis-symbol-1.0.3.tgz", - "integrity": "sha1-OOEBS55jKb4N6dJKQU/XRB7GGTc=", - "requires": { - "has-symbols": "^1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-typedarray/download/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-whitespace": { - "version": "0.3.0", - "resolved": "https://registry.npm.taobao.org/is-whitespace/download/is-whitespace-0.3.0.tgz", - "integrity": "sha1-Fjnssb4DauxppUy7QBz77XEUq38=", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/is-windows/download/is-windows-1.0.2.tgz", - "integrity": "sha1-0YUOuXkezRjmGCzhKjDzlmNLsZ0=", - "dev": true - }, - "is-wsl": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/is-wsl/download/is-wsl-1.1.0.tgz?cache=0&sync_timestamp=1588494180082&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-wsl%2Fdownload%2Fis-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/isexe/download/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/isobject/download/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/isstream/download/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "iview": { - "version": "3.5.4", - "resolved": "https://registry.npm.taobao.org/iview/download/iview-3.5.4.tgz", - "integrity": "sha1-1Ra5LnO2F/Lcf0WDH5kFnWmTL4I=", - "requires": { - "async-validator": "^1.12.2", - "deepmerge": "^2.2.1", - "element-resize-detector": "^1.2.0", - "js-calendar": "^1.2.3", - "lodash.throttle": "^4.1.1", - "popper.js": "^1.14.6", - "tinycolor2": "^1.4.1", - "v-click-outside-x": "^4.0.19" - }, - "dependencies": { - "v-click-outside-x": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/v-click-outside-x/download/v-click-outside-x-4.1.0.tgz?cache=0&sync_timestamp=1579043108278&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fv-click-outside-x%2Fdownload%2Fv-click-outside-x-4.1.0.tgz", - "integrity": "sha1-voJmgOLSVmaooYUzKSnUYkSqJEc=" - } - } - }, - "javascript-stringify": { - "version": "1.6.0", - "resolved": "https://registry.npm.taobao.org/javascript-stringify/download/javascript-stringify-1.6.0.tgz", - "integrity": "sha1-FC0RHzpuPa6PSpr9d9RYVbWpzOM=", - "dev": true - }, - "jest-get-type": { - "version": "21.2.0", - "resolved": "https://registry.npm.taobao.org/jest-get-type/download/jest-get-type-21.2.0.tgz", - "integrity": "sha1-9jdqudtLYNgeOfMHScbEZvQNSiM=", - "dev": true - }, - "jest-validate": { - "version": "21.2.1", - "resolved": "https://registry.npm.taobao.org/jest-validate/download/jest-validate-21.2.1.tgz?cache=0&sync_timestamp=1592925336825&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjest-validate%2Fdownload%2Fjest-validate-21.2.1.tgz", - "integrity": "sha1-zAy8plPNVJN7pPKhEXlndFMN08c=", - "dev": true, - "requires": { - "chalk": "^2.0.1", - "jest-get-type": "^21.2.0", - "leven": "^2.1.0", - "pretty-format": "^21.2.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "jquery": { - "version": "2.2.4", - "resolved": "https://registry.npm.taobao.org/jquery/download/jquery-2.2.4.tgz", - "integrity": "sha1-LInWiJterFIqfuoywUUhVZxsvwI=" - }, - "js-beautify": { - "version": "1.11.0", - "resolved": "https://registry.npm.taobao.org/js-beautify/download/js-beautify-1.11.0.tgz", - "integrity": "sha1-r7hz3EfViYY2AJPctplR6LzV3tI=", - "dev": true, - "requires": { - "config-chain": "^1.1.12", - "editorconfig": "^0.15.3", - "glob": "^7.1.3", - "mkdirp": "~1.0.3", - "nopt": "^4.0.3" - }, - "dependencies": { - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/mkdirp/download/mkdirp-1.0.4.tgz?cache=0&sync_timestamp=1587535418745&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmkdirp%2Fdownload%2Fmkdirp-1.0.4.tgz", - "integrity": "sha1-PrXtYmInVteaXw4qIh3+utdcL34=", - "dev": true - } - } - }, - "js-calendar": { - "version": "1.2.3", - "resolved": "https://registry.npm.taobao.org/js-calendar/download/js-calendar-1.2.3.tgz", - "integrity": "sha1-pYOwZEtOaVujlPNE0QPbzHp6fT4=" - }, - "js-cookie": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/js-cookie/download/js-cookie-2.2.1.tgz", - "integrity": "sha1-aeEG3F1YBolFYpAqpbrsN0Tpsrg=" - }, - "js-levenshtein": { - "version": "1.1.6", - "resolved": "https://registry.npm.taobao.org/js-levenshtein/download/js-levenshtein-1.1.6.tgz", - "integrity": "sha1-xs7ljrNVA3LfjeuF+tXOZs4B1Z0=", - "dev": true - }, - "js-message": { - "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/js-message/download/js-message-1.0.5.tgz", - "integrity": "sha1-IwDSSxrwjondCVvBpMnJz8uJLRU=", - "dev": true - }, - "js-queue": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/js-queue/download/js-queue-2.0.0.tgz", - "integrity": "sha1-NiITz4YPRo8BJfxslqvBdCUx+Ug=", - "dev": true, - "requires": { - "easy-stack": "^1.0.0" - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/js-tokens/download/js-tokens-4.0.0.tgz", - "integrity": "sha1-GSA/tZmR35jjoocFDUZHzerzJJk=", - "dev": true - }, - "js-yaml": { - "version": "3.14.0", - "resolved": "https://registry.npm.taobao.org/js-yaml/download/js-yaml-3.14.0.tgz?cache=0&sync_timestamp=1590172122543&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjs-yaml%2Fdownload%2Fjs-yaml-3.14.0.tgz", - "integrity": "sha1-p6NBcPJqIbsWJCTYray0ETpp5II=", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/jsbn/download/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true - }, - "jsdom": { - "version": "13.2.0", - "resolved": "https://registry.npm.taobao.org/jsdom/download/jsdom-13.2.0.tgz?cache=0&sync_timestamp=1594341172783&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjsdom%2Fdownload%2Fjsdom-13.2.0.tgz", - "integrity": "sha1-saDb2twlVDUmK+jqNyPS26DX6zo=", - "dev": true, - "requires": { - "abab": "^2.0.0", - "acorn": "^6.0.4", - "acorn-globals": "^4.3.0", - "array-equal": "^1.0.0", - "cssom": "^0.3.4", - "cssstyle": "^1.1.1", - "data-urls": "^1.1.0", - "domexception": "^1.0.1", - "escodegen": "^1.11.0", - "html-encoding-sniffer": "^1.0.2", - "nwsapi": "^2.0.9", - "parse5": "5.1.0", - "pn": "^1.1.0", - "request": "^2.88.0", - "request-promise-native": "^1.0.5", - "saxes": "^3.1.5", - "symbol-tree": "^3.2.2", - "tough-cookie": "^2.5.0", - "w3c-hr-time": "^1.0.1", - "w3c-xmlserializer": "^1.0.1", - "webidl-conversions": "^4.0.2", - "whatwg-encoding": "^1.0.5", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^7.0.0", - "ws": "^6.1.2", - "xml-name-validator": "^3.0.0" - } - }, - "jsdom-global": { - "version": "3.0.2", - "resolved": "https://registry.npm.taobao.org/jsdom-global/download/jsdom-global-3.0.2.tgz", - "integrity": "sha1-a9KZwTsMRiay2iwDk81DhdYGrLk=", - "dev": true - }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npm.taobao.org/jsesc/download/jsesc-2.5.2.tgz", - "integrity": "sha1-gFZNLkg9rPbo7yCWUKZ98/DCg6Q=", - "dev": true - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/json-parse-better-errors/download/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha1-u4Z8+zRQ5pEHwTHRxRS6s9yLyqk=", - "dev": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npm.taobao.org/json-schema/download/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz", - "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=", - "dev": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/json-stable-stringify/download/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "dev": true, - "optional": true, - "requires": { - "jsonify": "~0.0.0" - } - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/json-stable-stringify-without-jsonify/download/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true, - "optional": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npm.taobao.org/json-stringify-safe/download/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "json2module": { - "version": "0.0.3", - "resolved": "https://registry.npm.taobao.org/json2module/download/json2module-0.0.3.tgz", - "integrity": "sha1-APtfSpt638PwZHwpyxe80Zeb6bI=", - "requires": { - "rw": "^1.3.2" - } - }, - "json3": { - "version": "3.3.3", - "resolved": "https://registry.npm.taobao.org/json3/download/json3-3.3.3.tgz", - "integrity": "sha1-f8EON1/FrkLEcFpcwKpvYr4wW4E=", - "dev": true - }, - "json5": { - "version": "2.1.3", - "resolved": "https://registry.npm.taobao.org/json5/download/json5-2.1.3.tgz?cache=0&sync_timestamp=1586046271069&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjson5%2Fdownload%2Fjson5-2.1.3.tgz", - "integrity": "sha1-ybD3+pIzv+WAf+ZvzzpWF+1ZfUM=", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/jsonfile/download/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npm.taobao.org/jsonify/download/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true, - "optional": true - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npm.taobao.org/jsprim/download/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "killable": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/killable/download/killable-1.0.1.tgz", - "integrity": "sha1-TIzkQRh6Bhx0dPuHygjipjgZSJI=", - "dev": true - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - }, - "launch-editor": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/launch-editor/download/launch-editor-2.2.1.tgz", - "integrity": "sha1-hxtaPuOdZoD8wm03kwtu7aidsMo=", - "dev": true, - "requires": { - "chalk": "^2.3.0", - "shell-quote": "^1.6.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "launch-editor-middleware": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/launch-editor-middleware/download/launch-editor-middleware-2.2.1.tgz", - "integrity": "sha1-4UsH5scVSwpLhqD9NFeE5FgEwVc=", - "dev": true, - "requires": { - "launch-editor": "^2.2.1" - } - }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/lazy-cache/download/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/lcid/download/lcid-2.0.0.tgz", - "integrity": "sha1-bvXS32DlL4LrIopMNz6NHzlyU88=", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "less": { - "version": "2.7.3", - "resolved": "https://registry.npm.taobao.org/less/download/less-2.7.3.tgz?cache=0&sync_timestamp=1594913896834&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fless%2Fdownload%2Fless-2.7.3.tgz", - "integrity": "sha1-zBJg9RyQCp7A2R+2mYE54CUHtjs=", - "dev": true, - "requires": { - "errno": "^0.1.1", - "graceful-fs": "^4.1.2", - "image-size": "~0.5.0", - "mime": "^1.2.11", - "mkdirp": "^0.5.0", - "promise": "^7.1.1", - "request": "2.81.0", - "source-map": "^0.5.3" - }, - "dependencies": { - "ajv": { - "version": "4.11.8", - "resolved": "https://registry.npm.taobao.org/ajv/download/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", - "dev": true, - "optional": true, - "requires": { - "co": "^4.6.0", - "json-stable-stringify": "^1.0.1" - } - }, - "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npm.taobao.org/assert-plus/download/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", - "dev": true, - "optional": true - }, - "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npm.taobao.org/aws-sign2/download/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", - "dev": true, - "optional": true - }, - "form-data": { - "version": "2.1.4", - "resolved": "https://registry.npm.taobao.org/form-data/download/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", - "dev": true, - "optional": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.5", - "mime-types": "^2.1.12" - } - }, - "har-schema": { - "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/har-schema/download/har-schema-1.0.5.tgz", - "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", - "dev": true, - "optional": true - }, - "har-validator": { - "version": "4.2.1", - "resolved": "https://registry.npm.taobao.org/har-validator/download/har-validator-4.2.1.tgz", - "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", - "dev": true, - "optional": true, - "requires": { - "ajv": "^4.9.1", - "har-schema": "^1.0.5" - } - }, - "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/http-signature/download/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", - "dev": true, - "optional": true, - "requires": { - "assert-plus": "^0.2.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npm.taobao.org/mime/download/mime-1.6.0.tgz?cache=0&sync_timestamp=1590596706367&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmime%2Fdownload%2Fmime-1.6.0.tgz", - "integrity": "sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE=", - "dev": true, - "optional": true - }, - "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npm.taobao.org/oauth-sign/download/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", - "dev": true, - "optional": true - }, - "performance-now": { - "version": "0.2.0", - "resolved": "https://registry.npm.taobao.org/performance-now/download/performance-now-0.2.0.tgz", - "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", - "dev": true, - "optional": true - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npm.taobao.org/punycode/download/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true, - "optional": true - }, - "qs": { - "version": "6.4.0", - "resolved": "https://registry.npm.taobao.org/qs/download/qs-6.4.0.tgz", - "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", - "dev": true, - "optional": true - }, - "request": { - "version": "2.81.0", - "resolved": "https://registry.npm.taobao.org/request/download/request-2.81.0.tgz?cache=0&sync_timestamp=1581439006948&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frequest%2Fdownload%2Frequest-2.81.0.tgz", - "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", - "dev": true, - "optional": true, - "requires": { - "aws-sign2": "~0.6.0", - "aws4": "^1.2.1", - "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.0", - "forever-agent": "~0.6.1", - "form-data": "~2.1.1", - "har-validator": "~4.2.1", - "hawk": "~3.1.3", - "http-signature": "~1.1.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.7", - "oauth-sign": "~0.8.1", - "performance-now": "^0.2.0", - "qs": "~6.4.0", - "safe-buffer": "^5.0.1", - "stringstream": "~0.0.4", - "tough-cookie": "~2.3.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.0.0" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "optional": true - }, - "tough-cookie": { - "version": "2.3.4", - "resolved": "https://registry.npm.taobao.org/tough-cookie/download/tough-cookie-2.3.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftough-cookie%2Fdownload%2Ftough-cookie-2.3.4.tgz", - "integrity": "sha1-7GDO44rGdQY//JelwYlwV47oNlU=", - "dev": true, - "optional": true, - "requires": { - "punycode": "^1.4.1" - } - } - } - }, - "less-loader": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/less-loader/download/less-loader-4.1.0.tgz?cache=0&sync_timestamp=1593787586071&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fless-loader%2Fdownload%2Fless-loader-4.1.0.tgz", - "integrity": "sha1-LBNSxbCaT4QQFJAnT9UWdN5BNj4=", - "dev": true, - "requires": { - "clone": "^2.1.1", - "loader-utils": "^1.1.0", - "pify": "^3.0.0" - }, - "dependencies": { - "clone": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/clone/download/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", - "dev": true - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/pify/download/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "leven": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/leven/download/leven-2.1.0.tgz", - "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", - "dev": true - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npm.taobao.org/levn/download/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "lines-and-columns": { - "version": "1.1.6", - "resolved": "https://registry.npm.taobao.org/lines-and-columns/download/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", - "dev": true - }, - "lint-staged": { - "version": "6.1.1", - "resolved": "https://registry.npm.taobao.org/lint-staged/download/lint-staged-6.1.1.tgz?cache=0&sync_timestamp=1592387031001&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flint-staged%2Fdownload%2Flint-staged-6.1.1.tgz", - "integrity": "sha1-zQjE2bjMwtNxmNHEfOd9Ir5s8yQ=", - "dev": true, - "requires": { - "app-root-path": "^2.0.0", - "chalk": "^2.1.0", - "commander": "^2.11.0", - "cosmiconfig": "^4.0.0", - "debug": "^3.1.0", - "dedent": "^0.7.0", - "execa": "^0.8.0", - "find-parent-dir": "^0.3.0", - "is-glob": "^4.0.0", - "jest-validate": "^21.1.0", - "listr": "^0.13.0", - "lodash": "^4.17.4", - "log-symbols": "^2.0.0", - "minimatch": "^3.0.0", - "npm-which": "^3.0.1", - "p-map": "^1.1.1", - "path-is-inside": "^1.0.2", - "pify": "^3.0.0", - "staged-git-files": "1.0.0", - "stringify-object": "^3.2.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "cosmiconfig": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/cosmiconfig/download/cosmiconfig-4.0.0.tgz", - "integrity": "sha1-dgORVJWAu9LfHlYrwXexPCkJctw=", - "dev": true, - "requires": { - "is-directory": "^0.3.1", - "js-yaml": "^3.9.0", - "parse-json": "^4.0.0", - "require-from-string": "^2.0.1" - } - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "0.8.0", - "resolved": "https://registry.npm.taobao.org/execa/download/execa-0.8.0.tgz?cache=0&sync_timestamp=1594145237072&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fexeca%2Fdownload%2Fexeca-0.8.0.tgz", - "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/get-stream/download/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-4.1.5.tgz?cache=0&sync_timestamp=1594427569171&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flru-cache%2Fdownload%2Flru-cache-4.1.5.tgz", - "integrity": "sha1-i75Q6oW+1ZvJ4z3KuCNe6bz0Q80=", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "p-map": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/p-map/download/p-map-1.2.0.tgz", - "integrity": "sha1-5OlPMR6rvIYzoeeZCBZfyiYkG2s=", - "dev": true - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/pify/download/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - } - } - }, - "listr": { - "version": "0.13.0", - "resolved": "https://registry.npm.taobao.org/listr/download/listr-0.13.0.tgz", - "integrity": "sha1-ILsLowuuZg7oTMBQPfS+PVYjiH0=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "cli-truncate": "^0.2.1", - "figures": "^1.7.0", - "indent-string": "^2.1.0", - "is-observable": "^0.2.0", - "is-promise": "^2.1.0", - "is-stream": "^1.1.0", - "listr-silent-renderer": "^1.1.1", - "listr-update-renderer": "^0.4.0", - "listr-verbose-renderer": "^0.4.0", - "log-symbols": "^1.0.2", - "log-update": "^1.0.2", - "ora": "^0.2.3", - "p-map": "^1.1.1", - "rxjs": "^5.4.2", - "stream-to-observable": "^0.2.0", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/cli-cursor/download/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", - "dev": true, - "requires": { - "restore-cursor": "^1.0.1" - } - }, - "cli-spinners": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/cli-spinners/download/cli-spinners-0.1.2.tgz?cache=0&sync_timestamp=1595080565423&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcli-spinners%2Fdownload%2Fcli-spinners-0.1.2.tgz", - "integrity": "sha1-u3ZNiOGF+54eaiofGXcjGPYF4xw=", - "dev": true - }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npm.taobao.org/figures/download/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - } - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/indent-string/download/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "log-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/log-symbols/download/log-symbols-1.0.2.tgz", - "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", - "dev": true, - "requires": { - "chalk": "^1.0.0" - } - }, - "onetime": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/onetime/download/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", - "dev": true - }, - "ora": { - "version": "0.2.3", - "resolved": "https://registry.npm.taobao.org/ora/download/ora-0.2.3.tgz?cache=0&sync_timestamp=1594997498208&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fora%2Fdownload%2Fora-0.2.3.tgz", - "integrity": "sha1-N1J9Igrc1Tw5tzVx11QVbV22V6Q=", - "dev": true, - "requires": { - "chalk": "^1.1.1", - "cli-cursor": "^1.0.2", - "cli-spinners": "^0.1.2", - "object-assign": "^4.0.1" - } - }, - "p-map": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/p-map/download/p-map-1.2.0.tgz", - "integrity": "sha1-5OlPMR6rvIYzoeeZCBZfyiYkG2s=", - "dev": true - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/restore-cursor/download/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "dev": true, - "requires": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" - } - } - } - }, - "listr-silent-renderer": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/listr-silent-renderer/download/listr-silent-renderer-1.1.1.tgz", - "integrity": "sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4=", - "dev": true - }, - "listr-update-renderer": { - "version": "0.4.0", - "resolved": "https://registry.npm.taobao.org/listr-update-renderer/download/listr-update-renderer-0.4.0.tgz", - "integrity": "sha1-NE2YDaLKLosUW6MFkI8yrj9MyKc=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "cli-truncate": "^0.2.1", - "elegant-spinner": "^1.0.1", - "figures": "^1.7.0", - "indent-string": "^3.0.0", - "log-symbols": "^1.0.2", - "log-update": "^1.0.2", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npm.taobao.org/figures/download/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - } - }, - "indent-string": { - "version": "3.2.0", - "resolved": "https://registry.npm.taobao.org/indent-string/download/indent-string-3.2.0.tgz", - "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", - "dev": true - }, - "log-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/log-symbols/download/log-symbols-1.0.2.tgz", - "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", - "dev": true, - "requires": { - "chalk": "^1.0.0" - } - } - } - }, - "listr-verbose-renderer": { - "version": "0.4.1", - "resolved": "https://registry.npm.taobao.org/listr-verbose-renderer/download/listr-verbose-renderer-0.4.1.tgz", - "integrity": "sha1-ggb0z21S3cWCfl/RSYng6WWTOjU=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "cli-cursor": "^1.0.2", - "date-fns": "^1.27.2", - "figures": "^1.7.0" - }, - "dependencies": { - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/cli-cursor/download/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", - "dev": true, - "requires": { - "restore-cursor": "^1.0.1" - } - }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npm.taobao.org/figures/download/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - } - }, - "onetime": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/onetime/download/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", - "dev": true - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/restore-cursor/download/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "dev": true, - "requires": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" - } - } - } - }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/load-json-file/download/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - }, - "dependencies": { - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/parse-json/download/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/pify/download/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "loader-fs-cache": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/loader-fs-cache/download/loader-fs-cache-1.0.3.tgz", - "integrity": "sha1-8IZXZG1gcHi+LwoDL4vWndbyd9k=", - "dev": true, - "requires": { - "find-cache-dir": "^0.1.1", - "mkdirp": "^0.5.1" - }, - "dependencies": { - "find-cache-dir": { - "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-0.1.1.tgz", - "integrity": "sha1-yN765XyKUqinhPnjHFfHQumToLk=", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "mkdirp": "^0.5.1", - "pkg-dir": "^1.0.0" - } - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/find-up/download/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/path-exists/download/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "pkg-dir": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/pkg-dir/download/pkg-dir-1.0.0.tgz", - "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", - "dev": true, - "requires": { - "find-up": "^1.0.0" - } - } - } - }, - "loader-runner": { - "version": "2.4.0", - "resolved": "https://registry.npm.taobao.org/loader-runner/download/loader-runner-2.4.0.tgz?cache=0&sync_timestamp=1593786163963&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Floader-runner%2Fdownload%2Floader-runner-2.4.0.tgz", - "integrity": "sha1-7UcGa/5TTX6ExMe5mYwqdWB9k1c=", - "dev": true - }, - "loader-utils": { - "version": "1.4.0", - "resolved": "https://registry.npm.taobao.org/loader-utils/download/loader-utils-1.4.0.tgz", - "integrity": "sha1-xXm140yzSxp07cbB+za/o3HVphM=", - "dev": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^1.0.1" - }, - "dependencies": { - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/json5/download/json5-1.0.1.tgz?cache=0&sync_timestamp=1586046271069&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjson5%2Fdownload%2Fjson5-1.0.1.tgz", - "integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - } - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npm.taobao.org/lodash/download/lodash-4.17.19.tgz?cache=0&sync_timestamp=1594226805918&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flodash%2Fdownload%2Flodash-4.17.19.tgz", - "integrity": "sha1-5I3e2+MLMyF4PFtDAfvTU7weSks=" - }, - "lodash.defaultsdeep": { - "version": "4.6.1", - "resolved": "https://registry.npm.taobao.org/lodash.defaultsdeep/download/lodash.defaultsdeep-4.6.1.tgz", - "integrity": "sha1-US6b1yHSctlOPTpjZT+hdRZ0HKY=", - "dev": true - }, - "lodash.kebabcase": { - "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/lodash.kebabcase/download/lodash.kebabcase-4.1.1.tgz", - "integrity": "sha1-hImxyw0p/4gZXM7KRI/21swpXDY=", - "dev": true - }, - "lodash.mapvalues": { - "version": "4.6.0", - "resolved": "https://registry.npm.taobao.org/lodash.mapvalues/download/lodash.mapvalues-4.6.0.tgz", - "integrity": "sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw=", - "dev": true - }, - "lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npm.taobao.org/lodash.memoize/download/lodash.memoize-4.1.2.tgz", - "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", - "dev": true - }, - "lodash.sortby": { - "version": "4.7.0", - "resolved": "https://registry.npm.taobao.org/lodash.sortby/download/lodash.sortby-4.7.0.tgz", - "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", - "dev": true - }, - "lodash.throttle": { - "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/lodash.throttle/download/lodash.throttle-4.1.1.tgz", - "integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=" - }, - "lodash.transform": { - "version": "4.6.0", - "resolved": "https://registry.npm.taobao.org/lodash.transform/download/lodash.transform-4.6.0.tgz", - "integrity": "sha1-EjBkIvYzJK7YSD0/ODMrX2cFR6A=", - "dev": true - }, - "lodash.uniq": { - "version": "4.5.0", - "resolved": "https://registry.npm.taobao.org/lodash.uniq/download/lodash.uniq-4.5.0.tgz", - "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", - "dev": true - }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/log-symbols/download/log-symbols-2.2.0.tgz", - "integrity": "sha1-V0Dhxdbw39pK2TI7UzIQfva0xAo=", - "dev": true, - "requires": { - "chalk": "^2.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "log-update": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/log-update/download/log-update-1.0.2.tgz?cache=0&sync_timestamp=1582186637481&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flog-update%2Fdownload%2Flog-update-1.0.2.tgz", - "integrity": "sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE=", - "dev": true, - "requires": { - "ansi-escapes": "^1.0.0", - "cli-cursor": "^1.0.2" - }, - "dependencies": { - "ansi-escapes": { - "version": "1.4.0", - "resolved": "https://registry.npm.taobao.org/ansi-escapes/download/ansi-escapes-1.4.0.tgz", - "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", - "dev": true - }, - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/cli-cursor/download/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", - "dev": true, - "requires": { - "restore-cursor": "^1.0.1" - } - }, - "onetime": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/onetime/download/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", - "dev": true - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/restore-cursor/download/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "dev": true, - "requires": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" - } - } - } - }, - "loglevel": { - "version": "1.6.8", - "resolved": "https://registry.npm.taobao.org/loglevel/download/loglevel-1.6.8.tgz", - "integrity": "sha1-iiX7ddCSIw7NRFcnDYC1TigBEXE=", - "dev": true - }, - "longest": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/longest/download/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npm.taobao.org/loose-envify/download/loose-envify-1.4.0.tgz", - "integrity": "sha1-ce5R+nvkyuwaY4OffmgtgTLTDK8=", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "lower-case": { - "version": "1.1.4", - "resolved": "https://registry.npm.taobao.org/lower-case/download/lower-case-1.1.4.tgz", - "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", - "dev": true - }, - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-5.1.1.tgz?cache=0&sync_timestamp=1594427569171&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flru-cache%2Fdownload%2Flru-cache-5.1.1.tgz", - "integrity": "sha1-HaJ+ZxAnGUdpXa9oSOhH8B2EuSA=", - "dev": true, - "requires": { - "yallist": "^3.0.2" - } - }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/make-dir/download/make-dir-2.1.0.tgz?cache=0&sync_timestamp=1587567875186&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmake-dir%2Fdownload%2Fmake-dir-2.1.0.tgz", - "integrity": "sha1-XwMQ4YuL6JjMBwCSlaMK5B6R5vU=", - "dev": true, - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - } - }, - "map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npm.taobao.org/map-age-cleaner/download/map-age-cleaner-0.1.3.tgz", - "integrity": "sha1-fVg6cwZDTAVf5HSw9FB45uG0uSo=", - "dev": true, - "requires": { - "p-defer": "^1.0.0" - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npm.taobao.org/map-cache/download/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/map-visit/download/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "marked": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/marked/download/marked-1.1.1.tgz?cache=0&sync_timestamp=1594690149591&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmarked%2Fdownload%2Fmarked-1.1.1.tgz", - "integrity": "sha1-5dYbaYQiENXfV7BYVuDJFXJwPmo=" - }, - "mavon-editor": { - "version": "2.9.0", - "resolved": "https://registry.npm.taobao.org/mavon-editor/download/mavon-editor-2.9.0.tgz", - "integrity": "sha1-5Ru83N4YuSNjM6nOsS/tLYRUKQA=", - "requires": { - "highlight.js": "^9.11.0", - "highlight.js-async-webpack": "^1.0.4", - "xss": "^1.0.6" - } - }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npm.taobao.org/md5.js/download/md5.js-1.3.5.tgz", - "integrity": "sha1-tdB7jjIW4+J81yjXL3DR5qNCAF8=", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "mdn-data": { - "version": "2.0.4", - "resolved": "https://registry.npm.taobao.org/mdn-data/download/mdn-data-2.0.4.tgz?cache=0&sync_timestamp=1593510420945&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmdn-data%2Fdownload%2Fmdn-data-2.0.4.tgz", - "integrity": "sha1-aZs8OKxvHXKAkaZGULZdOIUC/Vs=", - "dev": true - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npm.taobao.org/media-typer/download/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "dev": true - }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/mem/download/mem-4.3.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmem%2Fdownload%2Fmem-4.3.0.tgz", - "integrity": "sha1-Rhr0l7xK4JYIzbLmDu+2m/90QXg=", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - }, - "dependencies": { - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/mimic-fn/download/mimic-fn-2.1.0.tgz", - "integrity": "sha1-ftLCzMyvhNP/y3pptXcR/CCDQBs=", - "dev": true - } - } - }, - "memory-fs": { - "version": "0.4.1", - "resolved": "https://registry.npm.taobao.org/memory-fs/download/memory-fs-0.4.1.tgz?cache=0&sync_timestamp=1570537491040&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmemory-fs%2Fdownload%2Fmemory-fs-0.4.1.tgz", - "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", - "dev": true, - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/merge-descriptors/download/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, - "merge-source-map": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/merge-source-map/download/merge-source-map-1.1.0.tgz", - "integrity": "sha1-L93n5gIJOfcJBqaPLXrmheTIxkY=", - "dev": true, - "requires": { - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - } - } - }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/merge-stream/download/merge-stream-2.0.0.tgz", - "integrity": "sha1-UoI2KaFN0AyXcPtq1H3GMQ8sH2A=", - "dev": true - }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npm.taobao.org/merge2/download/merge2-1.4.1.tgz", - "integrity": "sha1-Q2iJL4hekHRVpv19xVwMnUBJkK4=", - "dev": true - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/methods/download/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npm.taobao.org/micromatch/download/micromatch-3.1.10.tgz", - "integrity": "sha1-cIWbyVyYQJUvNZoGij/En57PrCM=", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-6.0.3.tgz", - "integrity": "sha1-B8BQNKbDSfoG4k+jWqdttFgM5N0=", - "dev": true - } - } - }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/miller-rabin/download/miller-rabin-4.0.1.tgz", - "integrity": "sha1-8IA1HIZbDcViqEYpZtqlNUPHik0=", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-4.11.9.tgz", - "integrity": "sha1-JtVWgpRY+dHoH8SJUkk9C6NQeCg=", - "dev": true - } - } - }, - "mime": { - "version": "2.4.6", - "resolved": "https://registry.npm.taobao.org/mime/download/mime-2.4.6.tgz?cache=0&sync_timestamp=1590596706367&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmime%2Fdownload%2Fmime-2.4.6.tgz", - "integrity": "sha1-5bQHyQ20QvK+tbFiNz0Htpr/pNE=", - "dev": true - }, - "mime-db": { - "version": "1.44.0", - "resolved": "https://registry.npm.taobao.org/mime-db/download/mime-db-1.44.0.tgz", - "integrity": "sha1-+hHF6wrKEzS0Izy01S8QxaYnL5I=", - "dev": true - }, - "mime-types": { - "version": "2.1.27", - "resolved": "https://registry.npm.taobao.org/mime-types/download/mime-types-2.1.27.tgz?cache=0&sync_timestamp=1587700357245&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmime-types%2Fdownload%2Fmime-types-2.1.27.tgz", - "integrity": "sha1-R5SfmOJ56lMRn1ci4PNOUpvsAJ8=", - "dev": true, - "requires": { - "mime-db": "1.44.0" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/mimic-fn/download/mimic-fn-1.2.0.tgz", - "integrity": "sha1-ggyGo5M0ZA6ZUWkovQP8qIBX0CI=", - "dev": true - }, - "mini-css-extract-plugin": { - "version": "0.8.2", - "resolved": "https://registry.npm.taobao.org/mini-css-extract-plugin/download/mini-css-extract-plugin-0.8.2.tgz?cache=0&sync_timestamp=1576856580721&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmini-css-extract-plugin%2Fdownload%2Fmini-css-extract-plugin-0.8.2.tgz", - "integrity": "sha1-qHXhab6yfIivd92WJ3HJ7tw9oWE=", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "normalize-url": "1.9.1", - "schema-utils": "^1.0.0", - "webpack-sources": "^1.1.0" - }, - "dependencies": { - "normalize-url": { - "version": "1.9.1", - "resolved": "https://registry.npm.taobao.org/normalize-url/download/normalize-url-1.9.1.tgz", - "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", - "dev": true, - "requires": { - "object-assign": "^4.0.1", - "prepend-http": "^1.0.0", - "query-string": "^4.1.0", - "sort-keys": "^1.0.0" - } - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz", - "integrity": "sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A=", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/minimalistic-assert/download/minimalistic-assert-1.0.1.tgz", - "integrity": "sha1-LhlN4ERibUoQ5/f7wAznPoPk1cc=", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/minimalistic-crypto-utils/download/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npm.taobao.org/minimatch/download/minimatch-3.0.4.tgz", - "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npm.taobao.org/minimist/download/minimist-1.2.5.tgz", - "integrity": "sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI=" - }, - "minipass": { - "version": "3.1.3", - "resolved": "https://registry.npm.taobao.org/minipass/download/minipass-3.1.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fminipass%2Fdownload%2Fminipass-3.1.3.tgz", - "integrity": "sha1-fUL/HzljVILhX5zbUxhN7r1YFf0=", - "dev": true, - "requires": { - "yallist": "^4.0.0" - }, - "dependencies": { - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", - "dev": true - } - } - }, - "minipass-collect": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/minipass-collect/download/minipass-collect-1.0.2.tgz", - "integrity": "sha1-IrgTv3Rdxu26JXa5QAIq1u3Ixhc=", - "dev": true, - "requires": { - "minipass": "^3.0.0" - } - }, - "minipass-flush": { - "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/minipass-flush/download/minipass-flush-1.0.5.tgz", - "integrity": "sha1-gucTXX6JpQ/+ZGEKeHlTxMTLs3M=", - "dev": true, - "requires": { - "minipass": "^3.0.0" - } - }, - "minipass-pipeline": { - "version": "1.2.3", - "resolved": "https://registry.npm.taobao.org/minipass-pipeline/download/minipass-pipeline-1.2.3.tgz", - "integrity": "sha1-VfeDkwfXSFnW6K2pw+vnLOwhajQ=", - "dev": true, - "requires": { - "minipass": "^3.0.0" - } - }, - "mississippi": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/mississippi/download/mississippi-3.0.0.tgz", - "integrity": "sha1-6goykfl+C16HdrNj1fChLZTGcCI=", - "dev": true, - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^3.0.0", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npm.taobao.org/mixin-deep/download/mixin-deep-1.3.2.tgz", - "integrity": "sha1-ESC0PcNZp4Xc5ltVuC4lfM9HlWY=", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/is-extendable/download/is-extendable-1.0.1.tgz", - "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.5.tgz?cache=0&sync_timestamp=1587535418745&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmkdirp%2Fdownload%2Fmkdirp-0.5.5.tgz", - "integrity": "sha1-2Rzv1i0UNsoPQWIOJRKI1CAJne8=", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "mocha": { - "version": "5.2.0", - "resolved": "https://registry.npm.taobao.org/mocha/download/mocha-5.2.0.tgz", - "integrity": "sha1-bYrlCPWRZ/lA8rWzxKYSrlDJCuY=", - "dev": true, - "requires": { - "browser-stdout": "1.3.1", - "commander": "2.15.1", - "debug": "3.1.0", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "glob": "7.1.2", - "growl": "1.10.5", - "he": "1.1.1", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "supports-color": "5.4.0" - }, - "dependencies": { - "commander": { - "version": "2.15.1", - "resolved": "https://registry.npm.taobao.org/commander/download/commander-2.15.1.tgz?cache=0&sync_timestamp=1595168173997&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.15.1.tgz", - "integrity": "sha1-30boZ9D8Kuxmo0ZitAapzK//Ww8=", - "dev": true - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npm.taobao.org/glob/download/glob-7.1.2.tgz?cache=0&sync_timestamp=1573078079496&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglob%2Fdownload%2Fglob-7.1.2.tgz", - "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npm.taobao.org/minimist/download/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.1.tgz?cache=0&sync_timestamp=1587535418745&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmkdirp%2Fdownload%2Fmkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.4.0.tgz", - "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "mocha-webpack": { - "version": "2.0.0-beta.0", - "resolved": "https://registry.npm.taobao.org/mocha-webpack/download/mocha-webpack-2.0.0-beta.0.tgz", - "integrity": "sha1-2F/Jpw+CpK1ZW3cCoRgWBd+llUk=", - "dev": true, - "requires": { - "babel-runtime": "^6.18.0", - "chalk": "^2.3.0", - "chokidar": "^2.0.2", - "glob-parent": "^3.1.0", - "globby": "^7.1.1", - "interpret": "^1.0.1", - "is-glob": "^4.0.0", - "loader-utils": "^1.1.0", - "lodash": "^4.3.0", - "memory-fs": "^0.4.1", - "nodent-runtime": "^3.0.3", - "normalize-path": "^2.0.1", - "progress": "^2.0.0", - "source-map-support": "^0.5.0", - "strip-ansi": "^4.0.0", - "toposort": "^1.0.0", - "yargs": "^11.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/anymatch/download/anymatch-2.0.0.tgz", - "integrity": "sha1-vLJLTzeTTZqnrBe0ra+J58du8us=", - "dev": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - } - }, - "binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npm.taobao.org/binary-extensions/download/binary-extensions-1.13.1.tgz?cache=0&sync_timestamp=1593261363626&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbinary-extensions%2Fdownload%2Fbinary-extensions-1.13.1.tgz", - "integrity": "sha1-WYr+VHVbKGilMw0q/51Ou1Mgm2U=", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "chokidar": { - "version": "2.1.8", - "resolved": "https://registry.npm.taobao.org/chokidar/download/chokidar-2.1.8.tgz?cache=0&sync_timestamp=1594864731636&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchokidar%2Fdownload%2Fchokidar-2.1.8.tgz", - "integrity": "sha1-gEs6e2qZNYw8XGHnHYco8EHP+Rc=", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - }, - "dependencies": { - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/normalize-path/download/normalize-path-3.0.0.tgz", - "integrity": "sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU=", - "dev": true - } - } - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/cliui/download/cliui-4.1.0.tgz", - "integrity": "sha1-NIQi2+gtgAswIu709qwQvy5NG0k=", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "fsevents": { - "version": "1.2.13", - "resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-1.2.13.tgz?cache=0&sync_timestamp=1588787369955&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffsevents%2Fdownload%2Ffsevents-1.2.13.tgz", - "integrity": "sha1-8yXLBFVZJCi88Rs4M3DvcOO/zDg=", - "dev": true, - "optional": true, - "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1" - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/glob-parent/download/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "globby": { - "version": "7.1.1", - "resolved": "https://registry.npm.taobao.org/globby/download/globby-7.1.1.tgz", - "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - } - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/is-binary-path/download/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/normalize-path/download/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/pify/download/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/readdirp/download/readdirp-2.2.1.tgz?cache=0&sync_timestamp=1584985910691&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freaddirp%2Fdownload%2Freaddirp-2.2.1.tgz", - "integrity": "sha1-DodiKjMlqjPokihcr4tOhGUppSU=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - } - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/slash/download/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - }, - "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npm.taobao.org/source-map-support/download/source-map-support-0.5.19.tgz?cache=0&sync_timestamp=1587719517036&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map-support%2Fdownload%2Fsource-map-support-0.5.19.tgz", - "integrity": "sha1-qYti+G3K9PZzmWSMCFKRq56P7WE=", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/y18n/download/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true - }, - "yargs": { - "version": "11.1.1", - "resolved": "https://registry.npm.taobao.org/yargs/download/yargs-11.1.1.tgz?cache=0&sync_timestamp=1594421046064&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyargs%2Fdownload%2Fyargs-11.1.1.tgz", - "integrity": "sha1-UFLv40RqTfXtZpyZWIbMDxNwJ2Y=", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.1.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" - } - } - } - }, - "moment": { - "version": "2.27.0", - "resolved": "https://registry.npm.taobao.org/moment/download/moment-2.27.0.tgz?cache=0&sync_timestamp=1592516115109&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmoment%2Fdownload%2Fmoment-2.27.0.tgz", - "integrity": "sha1-i/9OPiaiNiIN/j423nVrbrqgEF0=" - }, - "move-concurrently": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/move-concurrently/download/move-concurrently-1.0.1.tgz", - "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", - "dev": true, - "requires": { - "aproba": "^1.1.1", - "copy-concurrently": "^1.0.0", - "fs-write-stream-atomic": "^1.0.8", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.3" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "multicast-dns": { - "version": "6.2.3", - "resolved": "https://registry.npm.taobao.org/multicast-dns/download/multicast-dns-6.2.3.tgz", - "integrity": "sha1-oOx72QVcQoL3kMPIL04o2zsxsik=", - "dev": true, - "requires": { - "dns-packet": "^1.3.1", - "thunky": "^1.0.2" - } - }, - "multicast-dns-service-types": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/multicast-dns-service-types/download/multicast-dns-service-types-1.1.0.tgz", - "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=", - "dev": true - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npm.taobao.org/mute-stream/download/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", - "dev": true, - "optional": true - }, - "mz": { - "version": "2.7.0", - "resolved": "https://registry.npm.taobao.org/mz/download/mz-2.7.0.tgz", - "integrity": "sha1-lQCAV6Vsr63CvGPd5/n/aVWUjjI=", - "dev": true, - "requires": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "nan": { - "version": "2.14.1", - "resolved": "https://registry.npm.taobao.org/nan/download/nan-2.14.1.tgz?cache=0&sync_timestamp=1587497111086&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnan%2Fdownload%2Fnan-2.14.1.tgz", - "integrity": "sha1-174036MQW5FJTDFHCJMV7/iHSwE=", - "dev": true, - "optional": true - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npm.taobao.org/nanomatch/download/nanomatch-1.2.13.tgz", - "integrity": "sha1-uHqKpPwN6P5r6IiVs4mD/yZb0Rk=", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-6.0.3.tgz", - "integrity": "sha1-B8BQNKbDSfoG4k+jWqdttFgM5N0=", - "dev": true - } - } - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npm.taobao.org/natural-compare/download/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true, - "optional": true - }, - "negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npm.taobao.org/negotiator/download/negotiator-0.6.2.tgz", - "integrity": "sha1-/qz3zPUlp3rpY0Q2pkiD/+yjRvs=", - "dev": true - }, - "neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npm.taobao.org/neo-async/download/neo-async-2.6.2.tgz", - "integrity": "sha1-tKr7k+OustgXTKU88WOrfXMIMF8=", - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/nice-try/download/nice-try-1.0.5.tgz", - "integrity": "sha1-ozeKdpbOfSI+iPybdkvX7xCJ42Y=", - "dev": true - }, - "no-case": { - "version": "2.3.2", - "resolved": "https://registry.npm.taobao.org/no-case/download/no-case-2.3.2.tgz?cache=0&sync_timestamp=1576748705107&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fno-case%2Fdownload%2Fno-case-2.3.2.tgz", - "integrity": "sha1-YLgTOWvjmz8SiKTB7V0efSi0ZKw=", - "dev": true, - "requires": { - "lower-case": "^1.1.1" - } - }, - "node-forge": { - "version": "0.9.0", - "resolved": "https://registry.npm.taobao.org/node-forge/download/node-forge-0.9.0.tgz", - "integrity": "sha1-1iQFDtu0SHStyhK7mlLsY8t4JXk=", - "dev": true - }, - "node-ipc": { - "version": "9.1.1", - "resolved": "https://registry.npm.taobao.org/node-ipc/download/node-ipc-9.1.1.tgz", - "integrity": "sha1-TiRe1pOOZRAOWV68XcNLFujdXWk=", - "dev": true, - "requires": { - "event-pubsub": "4.3.0", - "js-message": "1.0.5", - "js-queue": "2.0.0" - } - }, - "node-libs-browser": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/node-libs-browser/download/node-libs-browser-2.2.1.tgz", - "integrity": "sha1-tk9RPRgzhiX5A0bSew0jXmMfZCU=", - "dev": true, - "requires": { - "assert": "^1.1.1", - "browserify-zlib": "^0.2.0", - "buffer": "^4.3.0", - "console-browserify": "^1.1.0", - "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.1", - "events": "^3.0.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", - "path-browserify": "0.0.1", - "process": "^0.11.10", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.3.3", - "stream-browserify": "^2.0.1", - "stream-http": "^2.7.2", - "string_decoder": "^1.0.0", - "timers-browserify": "^2.0.4", - "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.11.0", - "vm-browserify": "^1.0.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npm.taobao.org/punycode/download/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - } - } - }, - "node-releases": { - "version": "1.1.59", - "resolved": "https://registry.npm.taobao.org/node-releases/download/node-releases-1.1.59.tgz?cache=0&sync_timestamp=1594212234484&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnode-releases%2Fdownload%2Fnode-releases-1.1.59.tgz", - "integrity": "sha1-TWSDMGQc7HBL/xD45P4o5FOrjo4=", - "dev": true - }, - "nodent-runtime": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/nodent-runtime/download/nodent-runtime-3.2.1.tgz", - "integrity": "sha1-nidV2F4592Qojw1HUuvP4+VB4A4=", - "dev": true - }, - "nopt": { - "version": "4.0.3", - "resolved": "https://registry.npm.taobao.org/nopt/download/nopt-4.0.3.tgz", - "integrity": "sha1-o3XK2dAv2SEnjZVMIlTVqlfhXkg=", - "dev": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npm.taobao.org/normalize-package-data/download/normalize-package-data-2.5.0.tgz", - "integrity": "sha1-5m2xg4sgDB38IzIl0SyzZSDiNKg=", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/normalize-path/download/normalize-path-3.0.0.tgz", - "integrity": "sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU=", - "dev": true - }, - "normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/normalize-range/download/normalize-range-0.1.2.tgz", - "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", - "dev": true - }, - "normalize-url": { - "version": "3.3.0", - "resolved": "https://registry.npm.taobao.org/normalize-url/download/normalize-url-3.3.0.tgz", - "integrity": "sha1-suHE3E98bVd0PfczpPWXjRhlBVk=", - "dev": true - }, - "normalize.css": { - "version": "8.0.1", - "resolved": "https://registry.npm.taobao.org/normalize.css/download/normalize.css-8.0.1.tgz?cache=0&sync_timestamp=1588361527323&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnormalize.css%2Fdownload%2Fnormalize.css-8.0.1.tgz", - "integrity": "sha1-m5iiCHOLnMJjTKrLxC0THJdIe/M=" - }, - "npm-path": { - "version": "2.0.4", - "resolved": "https://registry.npm.taobao.org/npm-path/download/npm-path-2.0.4.tgz", - "integrity": "sha1-xkE0el/51qCeTZvOVYDE9QUnjmQ=", - "dev": true, - "requires": { - "which": "^1.2.10" - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/npm-run-path/download/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "npm-which": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/npm-which/download/npm-which-3.0.1.tgz", - "integrity": "sha1-kiXybsOihcIJyuZ8OxGmtKtxQKo=", - "dev": true, - "requires": { - "commander": "^2.9.0", - "npm-path": "^2.0.2", - "which": "^1.2.10" - } - }, - "nth-check": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/nth-check/download/nth-check-1.0.2.tgz", - "integrity": "sha1-sr0pXDfj3VijvwcAN2Zjuk2c8Fw=", - "dev": true, - "requires": { - "boolbase": "~1.0.0" - } - }, - "num2fraction": { - "version": "1.2.2", - "resolved": "https://registry.npm.taobao.org/num2fraction/download/num2fraction-1.2.2.tgz", - "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", - "dev": true - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/number-is-nan/download/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "nwsapi": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/nwsapi/download/nwsapi-2.2.0.tgz", - "integrity": "sha1-IEh5qePQaP8qVROcLHcngGgaOLc=", - "dev": true - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npm.taobao.org/oauth-sign/download/oauth-sign-0.9.0.tgz", - "integrity": "sha1-R6ewFrqmi1+g7PPe4IqFxnmsZFU=", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/object-assign/download/object-assign-4.1.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fobject-assign%2Fdownload%2Fobject-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npm.taobao.org/object-copy/download/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "object-hash": { - "version": "1.3.1", - "resolved": "https://registry.npm.taobao.org/object-hash/download/object-hash-1.3.1.tgz", - "integrity": "sha1-/eRSCYqVHLFF8Dm7fUVUSd3BJt8=", - "dev": true - }, - "object-inspect": { - "version": "1.7.0", - "resolved": "https://registry.npm.taobao.org/object-inspect/download/object-inspect-1.7.0.tgz?cache=0&sync_timestamp=1592545149361&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fobject-inspect%2Fdownload%2Fobject-inspect-1.7.0.tgz", - "integrity": "sha1-9Pa9GBrXfwBrXs5gvQtvOY/3Smc=" - }, - "object-is": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/object-is/download/object-is-1.1.2.tgz?cache=0&sync_timestamp=1586894009620&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fobject-is%2Fdownload%2Fobject-is-1.1.2.tgz", - "integrity": "sha1-xdLof/nhGfeLegiEQVGeLuwVc7Y=", - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/object-keys/download/object-keys-1.1.1.tgz", - "integrity": "sha1-HEfyct8nfzsdrwYWd9nILiMixg4=" - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/object-visit/download/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/object.assign/download/object.assign-4.1.0.tgz", - "integrity": "sha1-lovxEA15Vrs8oIbwBvhGs7xACNo=", - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, - "object.getownpropertydescriptors": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/object.getownpropertydescriptors/download/object.getownpropertydescriptors-2.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fobject.getownpropertydescriptors%2Fdownload%2Fobject.getownpropertydescriptors-2.1.0.tgz", - "integrity": "sha1-Npvx+VktiridcS3O1cuBx8U1Jkk=", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npm.taobao.org/object.pick/download/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "object.values": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/object.values/download/object.values-1.1.1.tgz", - "integrity": "sha1-aKmezeNWt+kpWjxeDOMdyMlT3l4=", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", - "has": "^1.0.3" - } - }, - "obuf": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/obuf/download/obuf-1.1.2.tgz", - "integrity": "sha1-Cb6jND1BhZ69RGKS0RydTbYZCE4=", - "dev": true - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/on-finished/download/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, - "on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/on-headers/download/on-headers-1.0.2.tgz", - "integrity": "sha1-dysK5qqlJcOZ5Imt+tkMQD6zwo8=", - "dev": true - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npm.taobao.org/once/download/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/onetime/download/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "open": { - "version": "6.4.0", - "resolved": "https://registry.npm.taobao.org/open/download/open-6.4.0.tgz?cache=0&sync_timestamp=1595208391438&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fopen%2Fdownload%2Fopen-6.4.0.tgz", - "integrity": "sha1-XBPpbQ3IlGhhZPGJZez+iJ7PyKk=", - "dev": true, - "requires": { - "is-wsl": "^1.1.0" - } - }, - "opener": { - "version": "1.5.1", - "resolved": "https://registry.npm.taobao.org/opener/download/opener-1.5.1.tgz", - "integrity": "sha1-bS8Od/GgrwAyrKcWwsH7uOfoq+0=", - "dev": true - }, - "opn": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/opn/download/opn-5.5.0.tgz", - "integrity": "sha1-/HFk+rVtI1kExRw7J9pnWMo7m/w=", - "dev": true, - "requires": { - "is-wsl": "^1.1.0" - } - }, - "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npm.taobao.org/optionator/download/optionator-0.8.3.tgz?cache=0&sync_timestamp=1585966141328&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Foptionator%2Fdownload%2Foptionator-0.8.3.tgz", - "integrity": "sha1-hPodA2/p08fiHZmIS2ARZ+yPtJU=", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - } - }, - "ora": { - "version": "3.4.0", - "resolved": "https://registry.npm.taobao.org/ora/download/ora-3.4.0.tgz?cache=0&sync_timestamp=1594997498208&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fora%2Fdownload%2Fora-3.4.0.tgz", - "integrity": "sha1-vwdSSRBZo+8+1MhQl1Md6f280xg=", - "dev": true, - "requires": { - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-spinners": "^2.0.0", - "log-symbols": "^2.2.0", - "strip-ansi": "^5.2.0", - "wcwidth": "^1.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-4.1.0.tgz", - "integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-5.2.0.tgz", - "integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "original": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/original/download/original-1.0.2.tgz", - "integrity": "sha1-5EKmHP/hxf0gpl8yYcJmY7MD8l8=", - "dev": true, - "requires": { - "url-parse": "^1.4.3" - } - }, - "os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npm.taobao.org/os-browserify/download/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", - "dev": true - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/os-homedir/download/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/os-locale/download/os-locale-3.1.0.tgz?cache=0&sync_timestamp=1584865484693&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fos-locale%2Fdownload%2Fos-locale-3.1.0.tgz", - "integrity": "sha1-qAKm7hfyTBBIOrmTVxnO9O0Wvxo=", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/os-tmpdir/download/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npm.taobao.org/osenv/download/osenv-0.1.5.tgz", - "integrity": "sha1-hc36+uso6Gd/QW4odZK18/SepBA=", - "dev": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/p-defer/download/p-defer-1.0.0.tgz?cache=0&sync_timestamp=1559922734651&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fp-defer%2Fdownload%2Fp-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/p-finally/download/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/p-is-promise/download/p-is-promise-2.1.0.tgz", - "integrity": "sha1-kYzrrqJIpiz3/6uOO8qMX4gvxC4=", - "dev": true - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npm.taobao.org/p-limit/download/p-limit-1.3.0.tgz?cache=0&sync_timestamp=1594559696906&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fp-limit%2Fdownload%2Fp-limit-1.3.0.tgz", - "integrity": "sha1-uGvV8MJWkJEcdZD8v8IBDVSzzLg=", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/p-locate/download/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-map": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/p-map/download/p-map-2.1.0.tgz", - "integrity": "sha1-MQko/u+cnsxltosXaTAYpmXOoXU=", - "dev": true - }, - "p-retry": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/p-retry/download/p-retry-3.0.1.tgz", - "integrity": "sha1-MWtMiJPiyNwc+okfQGxLQivr8yg=", - "dev": true, - "requires": { - "retry": "^0.12.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/p-try/download/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "pako": { - "version": "1.0.11", - "resolved": "https://registry.npm.taobao.org/pako/download/pako-1.0.11.tgz", - "integrity": "sha1-bJWZ00DVTf05RjgCUqNXBaa5kr8=", - "dev": true - }, - "parallel-transform": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/parallel-transform/download/parallel-transform-1.2.0.tgz", - "integrity": "sha1-kEnKN9bLIYLDsdLHIL6U0UpYFPw=", - "dev": true, - "requires": { - "cyclist": "^1.0.1", - "inherits": "^2.0.3", - "readable-stream": "^2.1.5" - } - }, - "param-case": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/param-case/download/param-case-2.1.1.tgz?cache=0&sync_timestamp=1576721608924&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fparam-case%2Fdownload%2Fparam-case-2.1.1.tgz", - "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", - "dev": true, - "requires": { - "no-case": "^2.2.0" - } - }, - "parse-asn1": { - "version": "5.1.5", - "resolved": "https://registry.npm.taobao.org/parse-asn1/download/parse-asn1-5.1.5.tgz", - "integrity": "sha1-ADJxND2ljclMrOSU+u89IUfs6g4=", - "dev": true, - "requires": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/parse-json/download/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "parse5": { - "version": "5.1.0", - "resolved": "https://registry.npm.taobao.org/parse5/download/parse5-5.1.0.tgz", - "integrity": "sha1-xZNByXI/QUxFKXVWTHwApo1YrNI=", - "dev": true - }, - "parse5-htmlparser2-tree-adapter": { - "version": "5.1.1", - "resolved": "https://registry.npm.taobao.org/parse5-htmlparser2-tree-adapter/download/parse5-htmlparser2-tree-adapter-5.1.1.tgz", - "integrity": "sha1-6MdD1OkhlNUpPs3isIvjHmdGHLw=", - "dev": true, - "requires": { - "parse5": "^5.1.1" - }, - "dependencies": { - "parse5": { - "version": "5.1.1", - "resolved": "https://registry.npm.taobao.org/parse5/download/parse5-5.1.1.tgz", - "integrity": "sha1-9o5OW6GFKsLK3AD0VV//bCq7YXg=", - "dev": true - } - } - }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npm.taobao.org/parseurl/download/parseurl-1.3.3.tgz", - "integrity": "sha1-naGee+6NEt/wUT7Vt2lXeTvC6NQ=", - "dev": true - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/pascalcase/download/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, - "path-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npm.taobao.org/path-browserify/download/path-browserify-0.0.1.tgz", - "integrity": "sha1-5sTd1+06onxoogzE5Q4aTug7vEo=", - "dev": true - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/path-dirname/download/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/path-exists/download/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/path-is-absolute/download/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/path-is-inside/download/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/path-key/download/path-key-2.0.1.tgz?cache=0&sync_timestamp=1574441431664&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpath-key%2Fdownload%2Fpath-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npm.taobao.org/path-parse/download/path-parse-1.0.6.tgz", - "integrity": "sha1-1i27VnlAXXLEc37FhgDp3c8G0kw=" - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npm.taobao.org/path-to-regexp/download/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", - "dev": true - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/path-type/download/path-type-3.0.0.tgz", - "integrity": "sha1-zvMdyOCho7sNEFwM2Xzzv0f0428=", - "dev": true, - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/pify/download/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "pathval": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/pathval/download/pathval-1.1.0.tgz", - "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", - "dev": true - }, - "pbkdf2": { - "version": "3.1.1", - "resolved": "https://registry.npm.taobao.org/pbkdf2/download/pbkdf2-3.1.1.tgz?cache=0&sync_timestamp=1591275684229&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpbkdf2%2Fdownload%2Fpbkdf2-3.1.1.tgz", - "integrity": "sha1-y4cksPramEWWhW0abrr9NYRlS5Q=", - "dev": true, - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/performance-now/download/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, - "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npm.taobao.org/picomatch/download/picomatch-2.2.2.tgz", - "integrity": "sha1-IfMz6ba46v8CRo9RRupAbTRfTa0=", - "dev": true, - "optional": true - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/pify/download/pify-4.0.1.tgz", - "integrity": "sha1-SyzSXFDVmHNcUCkiJP2MbfQeMjE=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npm.taobao.org/pinkie/download/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/pinkie-promise/download/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/pkg-dir/download/pkg-dir-3.0.0.tgz", - "integrity": "sha1-J0kCDyOe2ZCIGx9xIQ1R62UjvqM=", - "dev": true, - "requires": { - "find-up": "^3.0.0" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/find-up/download/find-up-3.0.0.tgz", - "integrity": "sha1-SRafHXmTQwZG2mHsxa41XCHJe3M=", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-3.0.0.tgz", - "integrity": "sha1-2+w7OrdZdYBxtY/ln8QYca8hQA4=", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/p-limit/download/p-limit-2.3.0.tgz?cache=0&sync_timestamp=1594559696906&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fp-limit%2Fdownload%2Fp-limit-2.3.0.tgz", - "integrity": "sha1-PdM8ZHohT9//2DWTPrCG2g3CHbE=", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/p-locate/download/p-locate-3.0.0.tgz", - "integrity": "sha1-Mi1poFwCZLJZl9n0DNiokasAZKQ=", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/p-try/download/p-try-2.2.0.tgz", - "integrity": "sha1-yyhoVA4xPWHeWPr741zpAE1VQOY=", - "dev": true - } - } - }, - "pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/pkg-up/download/pkg-up-2.0.0.tgz", - "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } - }, - "pluralize": { - "version": "7.0.0", - "resolved": "https://registry.npm.taobao.org/pluralize/download/pluralize-7.0.0.tgz", - "integrity": "sha1-KYuJ34uTsCIdv0Ia0rGx6iP8Z3c=", - "dev": true, - "optional": true - }, - "pn": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/pn/download/pn-1.1.0.tgz", - "integrity": "sha1-4vTO8OIZ9GPBeas3Rj5OHs3Muvs=", - "dev": true - }, - "popper.js": { - "version": "1.16.1", - "resolved": "https://registry.npm.taobao.org/popper.js/download/popper.js-1.16.1.tgz", - "integrity": "sha1-KiI8s9x7YhPXQOQDcr5A3kPmWxs=" - }, - "portfinder": { - "version": "1.0.27", - "resolved": "https://registry.npm.taobao.org/portfinder/download/portfinder-1.0.27.tgz?cache=0&sync_timestamp=1595216077180&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fportfinder%2Fdownload%2Fportfinder-1.0.27.tgz", - "integrity": "sha1-pBMzwRa15fPTgPl0WsLzUITEx1g=", - "dev": true, - "requires": { - "async": "^2.6.2", - "debug": "^3.1.1", - "mkdirp": "^0.5.1" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-3.2.6.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-3.2.6.tgz", - "integrity": "sha1-6D0X3hbYp++3cX7b5fsQE17uYps=", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true - } - } - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/posix-character-classes/download/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, - "postcss": { - "version": "7.0.32", - "resolved": "https://registry.npm.taobao.org/postcss/download/postcss-7.0.32.tgz?cache=0&sync_timestamp=1591102414113&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss%2Fdownload%2Fpostcss-7.0.32.tgz", - "integrity": "sha1-QxDW7jRwU9o0M9sr5JKIPWLOxZ0=", - "dev": true, - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "dependencies": { - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-6.1.0.tgz", - "integrity": "sha1-B2Srxpxj1ayELdSGfo0CXogN+PM=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-calc": { - "version": "7.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-calc/download/postcss-calc-7.0.2.tgz?cache=0&sync_timestamp=1582014221563&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-calc%2Fdownload%2Fpostcss-calc-7.0.2.tgz", - "integrity": "sha1-UE780AjKAnMSBWiweSsWzc3oqsE=", - "dev": true, - "requires": { - "postcss": "^7.0.27", - "postcss-selector-parser": "^6.0.2", - "postcss-value-parser": "^4.0.2" - } - }, - "postcss-colormin": { - "version": "4.0.3", - "resolved": "https://registry.npm.taobao.org/postcss-colormin/download/postcss-colormin-4.0.3.tgz", - "integrity": "sha1-rgYLzpPteUrHEmTwgTLVUJVr04E=", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "color": "^3.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz?cache=0&sync_timestamp=1588083210998&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-value-parser%2Fdownload%2Fpostcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-convert-values": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/postcss-convert-values/download/postcss-convert-values-4.0.1.tgz", - "integrity": "sha1-yjgT7U2g+BL51DcDWE5Enr4Ymn8=", - "dev": true, - "requires": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz?cache=0&sync_timestamp=1588083210998&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-value-parser%2Fdownload%2Fpostcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-discard-comments": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-discard-comments/download/postcss-discard-comments-4.0.2.tgz", - "integrity": "sha1-H7q9LCRr/2qq15l7KwkY9NevQDM=", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-discard-duplicates": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-discard-duplicates/download/postcss-discard-duplicates-4.0.2.tgz", - "integrity": "sha1-P+EzzTyCKC5VD8myORdqkge3hOs=", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-discard-empty": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/postcss-discard-empty/download/postcss-discard-empty-4.0.1.tgz", - "integrity": "sha1-yMlR6fc+2UKAGUWERKAq2Qu592U=", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-discard-overridden": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/postcss-discard-overridden/download/postcss-discard-overridden-4.0.1.tgz", - "integrity": "sha1-ZSrvipZybwKfXj4AFG7npOdV/1c=", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-load-config": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/postcss-load-config/download/postcss-load-config-2.1.0.tgz", - "integrity": "sha1-yE1pK3u3tB3c7ZTuYuirMbQXsAM=", - "dev": true, - "requires": { - "cosmiconfig": "^5.0.0", - "import-cwd": "^2.0.0" - } - }, - "postcss-loader": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/postcss-loader/download/postcss-loader-3.0.0.tgz", - "integrity": "sha1-a5eUPkfHLYRfqeA/Jzdz1OjdbC0=", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "postcss": "^7.0.0", - "postcss-load-config": "^2.0.0", - "schema-utils": "^1.0.0" - }, - "dependencies": { - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz", - "integrity": "sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A=", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "postcss-merge-longhand": { - "version": "4.0.11", - "resolved": "https://registry.npm.taobao.org/postcss-merge-longhand/download/postcss-merge-longhand-4.0.11.tgz", - "integrity": "sha1-YvSaE+Sg7gTnuY9CuxYGLKJUniQ=", - "dev": true, - "requires": { - "css-color-names": "0.0.4", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "stylehacks": "^4.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz?cache=0&sync_timestamp=1588083210998&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-value-parser%2Fdownload%2Fpostcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-merge-rules": { - "version": "4.0.3", - "resolved": "https://registry.npm.taobao.org/postcss-merge-rules/download/postcss-merge-rules-4.0.3.tgz", - "integrity": "sha1-NivqT/Wh+Y5AdacTxsslrv75plA=", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "caniuse-api": "^3.0.0", - "cssnano-util-same-parent": "^4.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0", - "vendors": "^1.0.0" - }, - "dependencies": { - "postcss-selector-parser": { - "version": "3.1.2", - "resolved": "https://registry.npm.taobao.org/postcss-selector-parser/download/postcss-selector-parser-3.1.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-selector-parser%2Fdownload%2Fpostcss-selector-parser-3.1.2.tgz", - "integrity": "sha1-sxD1xMD9r3b5SQK7qjDbaqhPUnA=", - "dev": true, - "requires": { - "dot-prop": "^5.2.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - } - } - }, - "postcss-minify-font-values": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-minify-font-values/download/postcss-minify-font-values-4.0.2.tgz", - "integrity": "sha1-zUw0TM5HQ0P6xdgiBqssvLiv1aY=", - "dev": true, - "requires": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz?cache=0&sync_timestamp=1588083210998&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-value-parser%2Fdownload%2Fpostcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-minify-gradients": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-minify-gradients/download/postcss-minify-gradients-4.0.2.tgz", - "integrity": "sha1-k7KcL/UJnFNe7NpWxKpuZlpmNHE=", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "is-color-stop": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz?cache=0&sync_timestamp=1588083210998&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-value-parser%2Fdownload%2Fpostcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-minify-params": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-minify-params/download/postcss-minify-params-4.0.2.tgz", - "integrity": "sha1-a5zvAwwR41Jh+V9hjJADbWgNuHQ=", - "dev": true, - "requires": { - "alphanum-sort": "^1.0.0", - "browserslist": "^4.0.0", - "cssnano-util-get-arguments": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "uniqs": "^2.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz?cache=0&sync_timestamp=1588083210998&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-value-parser%2Fdownload%2Fpostcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-minify-selectors": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-minify-selectors/download/postcss-minify-selectors-4.0.2.tgz", - "integrity": "sha1-4uXrQL/uUA0M2SQ1APX46kJi+9g=", - "dev": true, - "requires": { - "alphanum-sort": "^1.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0" - }, - "dependencies": { - "postcss-selector-parser": { - "version": "3.1.2", - "resolved": "https://registry.npm.taobao.org/postcss-selector-parser/download/postcss-selector-parser-3.1.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-selector-parser%2Fdownload%2Fpostcss-selector-parser-3.1.2.tgz", - "integrity": "sha1-sxD1xMD9r3b5SQK7qjDbaqhPUnA=", - "dev": true, - "requires": { - "dot-prop": "^5.2.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - } - } - }, - "postcss-modules-extract-imports": { - "version": "1.2.1", - "resolved": "https://registry.npm.taobao.org/postcss-modules-extract-imports/download/postcss-modules-extract-imports-1.2.1.tgz", - "integrity": "sha1-3IfjQUjsfqtfeR981YSYMzdbdBo=", - "dev": true, - "requires": { - "postcss": "^6.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "postcss": { - "version": "6.0.23", - "resolved": "https://registry.npm.taobao.org/postcss/download/postcss-6.0.23.tgz?cache=0&sync_timestamp=1591102414113&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss%2Fdownload%2Fpostcss-6.0.23.tgz", - "integrity": "sha1-YcgswyisYOZ3ZF+XkFTrmLwOMyQ=", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-modules-local-by-default": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/postcss-modules-local-by-default/download/postcss-modules-local-by-default-1.2.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-modules-local-by-default%2Fdownload%2Fpostcss-modules-local-by-default-1.2.0.tgz", - "integrity": "sha1-99gMOYxaOT+nlkRmvRlQCn1hwGk=", - "dev": true, - "requires": { - "css-selector-tokenizer": "^0.7.0", - "postcss": "^6.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "postcss": { - "version": "6.0.23", - "resolved": "https://registry.npm.taobao.org/postcss/download/postcss-6.0.23.tgz?cache=0&sync_timestamp=1591102414113&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss%2Fdownload%2Fpostcss-6.0.23.tgz", - "integrity": "sha1-YcgswyisYOZ3ZF+XkFTrmLwOMyQ=", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-modules-scope": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/postcss-modules-scope/download/postcss-modules-scope-1.1.0.tgz", - "integrity": "sha1-1upkmUx5+XtipytCb75gVqGUu5A=", - "dev": true, - "requires": { - "css-selector-tokenizer": "^0.7.0", - "postcss": "^6.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "postcss": { - "version": "6.0.23", - "resolved": "https://registry.npm.taobao.org/postcss/download/postcss-6.0.23.tgz?cache=0&sync_timestamp=1591102414113&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss%2Fdownload%2Fpostcss-6.0.23.tgz", - "integrity": "sha1-YcgswyisYOZ3ZF+XkFTrmLwOMyQ=", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-modules-values": { - "version": "1.3.0", - "resolved": "https://registry.npm.taobao.org/postcss-modules-values/download/postcss-modules-values-1.3.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-modules-values%2Fdownload%2Fpostcss-modules-values-1.3.0.tgz", - "integrity": "sha1-7P+p1+GSUYOJ9CrQ6D9yrsRW6iA=", - "dev": true, - "requires": { - "icss-replace-symbols": "^1.1.0", - "postcss": "^6.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "postcss": { - "version": "6.0.23", - "resolved": "https://registry.npm.taobao.org/postcss/download/postcss-6.0.23.tgz?cache=0&sync_timestamp=1591102414113&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss%2Fdownload%2Fpostcss-6.0.23.tgz", - "integrity": "sha1-YcgswyisYOZ3ZF+XkFTrmLwOMyQ=", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-normalize-charset": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-charset/download/postcss-normalize-charset-4.0.1.tgz", - "integrity": "sha1-izWt067oOhNrBHHg1ZvlilAoXdQ=", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-normalize-display-values": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-display-values/download/postcss-normalize-display-values-4.0.2.tgz", - "integrity": "sha1-Db4EpM6QY9RmftK+R2u4MMglk1o=", - "dev": true, - "requires": { - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz?cache=0&sync_timestamp=1588083210998&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-value-parser%2Fdownload%2Fpostcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-normalize-positions": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-positions/download/postcss-normalize-positions-4.0.2.tgz", - "integrity": "sha1-BfdX+E8mBDc3g2ipH4ky1LECkX8=", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz?cache=0&sync_timestamp=1588083210998&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-value-parser%2Fdownload%2Fpostcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-normalize-repeat-style": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-repeat-style/download/postcss-normalize-repeat-style-4.0.2.tgz", - "integrity": "sha1-xOu8KJ85kaAo1EdRy90RkYsXkQw=", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz?cache=0&sync_timestamp=1588083210998&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-value-parser%2Fdownload%2Fpostcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-normalize-string": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-string/download/postcss-normalize-string-4.0.2.tgz", - "integrity": "sha1-zUTECrB6DHo23F6Zqs4eyk7CaQw=", - "dev": true, - "requires": { - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz?cache=0&sync_timestamp=1588083210998&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-value-parser%2Fdownload%2Fpostcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-normalize-timing-functions": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-timing-functions/download/postcss-normalize-timing-functions-4.0.2.tgz", - "integrity": "sha1-jgCcoqOUnNr4rSPmtquZy159KNk=", - "dev": true, - "requires": { - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz?cache=0&sync_timestamp=1588083210998&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-value-parser%2Fdownload%2Fpostcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-normalize-unicode": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-unicode/download/postcss-normalize-unicode-4.0.1.tgz", - "integrity": "sha1-hBvUj9zzAZrUuqdJOj02O1KuHPs=", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz?cache=0&sync_timestamp=1588083210998&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-value-parser%2Fdownload%2Fpostcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-normalize-url": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-url/download/postcss-normalize-url-4.0.1.tgz", - "integrity": "sha1-EOQ3+GvHx+WPe5ZS7YeNqqlfquE=", - "dev": true, - "requires": { - "is-absolute-url": "^2.0.0", - "normalize-url": "^3.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz?cache=0&sync_timestamp=1588083210998&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-value-parser%2Fdownload%2Fpostcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-normalize-whitespace": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-normalize-whitespace/download/postcss-normalize-whitespace-4.0.2.tgz", - "integrity": "sha1-vx1AcP5Pzqh9E0joJdjMDF+qfYI=", - "dev": true, - "requires": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz?cache=0&sync_timestamp=1588083210998&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-value-parser%2Fdownload%2Fpostcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-ordered-values": { - "version": "4.1.2", - "resolved": "https://registry.npm.taobao.org/postcss-ordered-values/download/postcss-ordered-values-4.1.2.tgz", - "integrity": "sha1-DPdcgg7H1cTSgBiVWeC1ceusDu4=", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz?cache=0&sync_timestamp=1588083210998&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-value-parser%2Fdownload%2Fpostcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-reduce-initial": { - "version": "4.0.3", - "resolved": "https://registry.npm.taobao.org/postcss-reduce-initial/download/postcss-reduce-initial-4.0.3.tgz", - "integrity": "sha1-f9QuvqXpyBRgljniwuhK4nC6SN8=", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "caniuse-api": "^3.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0" - } - }, - "postcss-reduce-transforms": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-reduce-transforms/download/postcss-reduce-transforms-4.0.2.tgz", - "integrity": "sha1-F++kBerMbge+NBSlyi0QdGgdTik=", - "dev": true, - "requires": { - "cssnano-util-get-match": "^4.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz?cache=0&sync_timestamp=1588083210998&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-value-parser%2Fdownload%2Fpostcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-selector-parser": { - "version": "6.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-selector-parser/download/postcss-selector-parser-6.0.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-selector-parser%2Fdownload%2Fpostcss-selector-parser-6.0.2.tgz", - "integrity": "sha1-k0z3mdAWyDQRhZ4J3Oyt4BKG7Fw=", - "dev": true, - "requires": { - "cssesc": "^3.0.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - }, - "postcss-svgo": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/postcss-svgo/download/postcss-svgo-4.0.2.tgz", - "integrity": "sha1-F7mXvHEbMzurFDqu07jT1uPTglg=", - "dev": true, - "requires": { - "is-svg": "^3.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "svgo": "^1.0.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz?cache=0&sync_timestamp=1588083210998&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-value-parser%2Fdownload%2Fpostcss-value-parser-3.3.1.tgz", - "integrity": "sha1-n/giVH4okyE88cMO+lGsX9G6goE=", - "dev": true - } - } - }, - "postcss-unique-selectors": { - "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/postcss-unique-selectors/download/postcss-unique-selectors-4.0.1.tgz", - "integrity": "sha1-lEaRHzKJv9ZMbWgPBzwDsfnuS6w=", - "dev": true, - "requires": { - "alphanum-sort": "^1.0.0", - "postcss": "^7.0.0", - "uniqs": "^2.0.0" - } - }, - "postcss-value-parser": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-4.1.0.tgz?cache=0&sync_timestamp=1588083210998&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-value-parser%2Fdownload%2Fpostcss-value-parser-4.1.0.tgz", - "integrity": "sha1-RD9qIM7WSBor2k+oUypuVdeJoss=", - "dev": true - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/prelude-ls/download/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/prepend-http/download/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", - "dev": true - }, - "prettier": { - "version": "1.19.1", - "resolved": "https://registry.npm.taobao.org/prettier/download/prettier-1.19.1.tgz?cache=0&sync_timestamp=1587491448785&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fprettier%2Fdownload%2Fprettier-1.19.1.tgz", - "integrity": "sha1-99f1/4qc2HKnvkyhQglZVqYHl8s=", - "dev": true, - "optional": true - }, - "pretty": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/pretty/download/pretty-2.0.0.tgz", - "integrity": "sha1-rbx5YLe7/iiaVX3F9zdhmiINBqU=", - "dev": true, - "requires": { - "condense-newlines": "^0.2.1", - "extend-shallow": "^2.0.1", - "js-beautify": "^1.6.12" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "pretty-error": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/pretty-error/download/pretty-error-2.1.1.tgz", - "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", - "dev": true, - "requires": { - "renderkid": "^2.0.1", - "utila": "~0.4" - } - }, - "pretty-format": { - "version": "21.2.1", - "resolved": "https://registry.npm.taobao.org/pretty-format/download/pretty-format-21.2.1.tgz?cache=0&sync_timestamp=1592925335887&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpretty-format%2Fdownload%2Fpretty-format-21.2.1.tgz", - "integrity": "sha1-rlQH888hBmzQEaobpfzntqLt2zY=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0", - "ansi-styles": "^3.2.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - } - } - }, - "printj": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/printj/download/printj-1.1.2.tgz", - "integrity": "sha1-2Q3rKXWoufYA+zoclOP0xTx4oiI=" - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npm.taobao.org/process/download/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/process-nextick-args/download/process-nextick-args-2.0.1.tgz", - "integrity": "sha1-eCDZsWEgzFXKmud5JoCufbptf+I=", - "dev": true - }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npm.taobao.org/progress/download/progress-2.0.3.tgz", - "integrity": "sha1-foz42PW48jnBvGi+tOt4Vn1XLvg=", - "dev": true - }, - "promise": { - "version": "7.3.1", - "resolved": "https://registry.npm.taobao.org/promise/download/promise-7.3.1.tgz", - "integrity": "sha1-BktyYCsY+Q8pGSuLG8QY/9Hr078=", - "dev": true, - "optional": true, - "requires": { - "asap": "~2.0.3" - } - }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/promise-inflight/download/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", - "dev": true - }, - "proto-list": { - "version": "1.2.4", - "resolved": "https://registry.npm.taobao.org/proto-list/download/proto-list-1.2.4.tgz", - "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", - "dev": true - }, - "proxy-addr": { - "version": "2.0.6", - "resolved": "https://registry.npm.taobao.org/proxy-addr/download/proxy-addr-2.0.6.tgz", - "integrity": "sha1-/cIzZQVEfT8vLGOO0nLK9hS7sr8=", - "dev": true, - "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.9.1" - } - }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/prr/download/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/pseudomap/download/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npm.taobao.org/psl/download/psl-1.8.0.tgz?cache=0&sync_timestamp=1585142991033&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpsl%2Fdownload%2Fpsl-1.8.0.tgz", - "integrity": "sha1-kyb4vPsBOtzABf3/BWrM4CDlHCQ=", - "dev": true - }, - "public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npm.taobao.org/public-encrypt/download/public-encrypt-4.0.3.tgz", - "integrity": "sha1-T8ydd6B+SLp1J+fL4N4z0HATMeA=", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-4.11.9.tgz", - "integrity": "sha1-JtVWgpRY+dHoH8SJUkk9C6NQeCg=", - "dev": true - } - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/pump/download/pump-3.0.0.tgz", - "integrity": "sha1-tKIRaBW94vTh6mAjVOjHVWUQemQ=", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npm.taobao.org/pumpify/download/pumpify-1.5.1.tgz?cache=0&sync_timestamp=1569938200736&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpumpify%2Fdownload%2Fpumpify-1.5.1.tgz", - "integrity": "sha1-NlE74karJ1cLGjdKXOJ4v9dDcM4=", - "dev": true, - "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - }, - "dependencies": { - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/pump/download/pump-2.0.1.tgz", - "integrity": "sha1-Ejma3W5M91Jtlzy8i1zi4pCLOQk=", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - } - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/punycode/download/punycode-2.1.1.tgz", - "integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew=", - "dev": true - }, - "q": { - "version": "1.5.1", - "resolved": "https://registry.npm.taobao.org/q/download/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", - "dev": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npm.taobao.org/qs/download/qs-6.5.2.tgz", - "integrity": "sha1-yzroBuh0BERYTvFUzo7pjUA/PjY=", - "dev": true - }, - "query-string": { - "version": "4.3.4", - "resolved": "https://registry.npm.taobao.org/query-string/download/query-string-4.3.4.tgz", - "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", - "dev": true, - "requires": { - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" - } - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npm.taobao.org/querystring/download/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npm.taobao.org/querystring-es3/download/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true - }, - "querystringify": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/querystringify/download/querystringify-2.1.1.tgz", - "integrity": "sha1-YOWl/WSn+L+k0qsu1v30yFutFU4=", - "dev": true - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/randombytes/download/randombytes-2.1.0.tgz", - "integrity": "sha1-32+ENy8CcNxlzfYpE0mrekc9Tyo=", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/randomfill/download/randomfill-1.0.4.tgz", - "integrity": "sha1-ySGW/IarQr6YPxvzF3giSTHWFFg=", - "dev": true, - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npm.taobao.org/range-parser/download/range-parser-1.2.1.tgz", - "integrity": "sha1-PPNwI9GZ4cJNGlW4SADC8+ZGgDE=", - "dev": true - }, - "raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npm.taobao.org/raw-body/download/raw-body-2.4.0.tgz", - "integrity": "sha1-oc5vucm8NWylLoklarWQWeE9AzI=", - "dev": true, - "requires": { - "bytes": "3.1.0", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - } - }, - "read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npm.taobao.org/read-pkg/download/read-pkg-5.2.0.tgz", - "integrity": "sha1-e/KVQ4yloz5WzTDgU7NO5yUMk8w=", - "dev": true, - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "dependencies": { - "parse-json": { - "version": "5.0.0", - "resolved": "https://registry.npm.taobao.org/parse-json/download/parse-json-5.0.0.tgz", - "integrity": "sha1-c+URTJhtFD76NxLU6iTbmkJm9g8=", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1", - "lines-and-columns": "^1.1.6" - } - } - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/read-pkg-up/download/read-pkg-up-2.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fread-pkg-up%2Fdownload%2Fread-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - }, - "dependencies": { - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/path-type/download/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "requires": { - "pify": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/pify/download/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/read-pkg/download/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - } - } - } - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.7.tgz", - "integrity": "sha1-Hsoc9xGu+BTAT2IlKjamL2yyO1c=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "readdirp": { - "version": "3.4.0", - "resolved": "https://registry.npm.taobao.org/readdirp/download/readdirp-3.4.0.tgz?cache=0&sync_timestamp=1584985910691&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freaddirp%2Fdownload%2Freaddirp-3.4.0.tgz", - "integrity": "sha1-n9zN+ekVWAVEkiGsZF6DA6tbmto=", - "dev": true, - "optional": true, - "requires": { - "picomatch": "^2.2.1" - } - }, - "regenerate": { - "version": "1.4.1", - "resolved": "https://registry.npm.taobao.org/regenerate/download/regenerate-1.4.1.tgz", - "integrity": "sha1-ytkq2Oa1kXc0hfvgWkhcr09Ffm8=", - "dev": true - }, - "regenerate-unicode-properties": { - "version": "8.2.0", - "resolved": "https://registry.npm.taobao.org/regenerate-unicode-properties/download/regenerate-unicode-properties-8.2.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregenerate-unicode-properties%2Fdownload%2Fregenerate-unicode-properties-8.2.0.tgz", - "integrity": "sha1-5d5xEdZV57pgwFfb6f83yH5lzew=", - "dev": true, - "requires": { - "regenerate": "^1.4.0" - } - }, - "regenerator-runtime": { - "version": "0.13.5", - "resolved": "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.13.5.tgz?cache=0&sync_timestamp=1584052597708&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregenerator-runtime%2Fdownload%2Fregenerator-runtime-0.13.5.tgz", - "integrity": "sha1-2Hih0JS0MG0QuQlkhLM+vVXiZpc=", - "dev": true - }, - "regenerator-transform": { - "version": "0.14.5", - "resolved": "https://registry.npm.taobao.org/regenerator-transform/download/regenerator-transform-0.14.5.tgz?cache=0&sync_timestamp=1593557393872&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregenerator-transform%2Fdownload%2Fregenerator-transform-0.14.5.tgz", - "integrity": "sha1-yY2hVGg2ccnE3LFuznNlF+G3/rQ=", - "dev": true, - "requires": { - "@babel/runtime": "^7.8.4" - } - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/regex-not/download/regex-not-1.0.2.tgz", - "integrity": "sha1-H07OJ+ALC2XgJHpoEOaoXYOldSw=", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "regexp.prototype.flags": { - "version": "1.3.0", - "resolved": "https://registry.npm.taobao.org/regexp.prototype.flags/download/regexp.prototype.flags-1.3.0.tgz?cache=0&sync_timestamp=1576388379660&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregexp.prototype.flags%2Fdownload%2Fregexp.prototype.flags-1.3.0.tgz", - "integrity": "sha1-erqJs8E6ZFCdq888qNn7ub31y3U=", - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - } - }, - "regexpp": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/regexpp/download/regexpp-1.1.0.tgz", - "integrity": "sha1-DjUW3Qt5BPQT0tQZPc5GGMOmias=", - "dev": true, - "optional": true - }, - "regexpu-core": { - "version": "4.7.0", - "resolved": "https://registry.npm.taobao.org/regexpu-core/download/regexpu-core-4.7.0.tgz?cache=0&sync_timestamp=1583949899397&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregexpu-core%2Fdownload%2Fregexpu-core-4.7.0.tgz", - "integrity": "sha1-/L9FjFBDGwu3tF1pZ7gZLZHz2Tg=", - "dev": true, - "requires": { - "regenerate": "^1.4.0", - "regenerate-unicode-properties": "^8.2.0", - "regjsgen": "^0.5.1", - "regjsparser": "^0.6.4", - "unicode-match-property-ecmascript": "^1.0.4", - "unicode-match-property-value-ecmascript": "^1.2.0" - } - }, - "regjsgen": { - "version": "0.5.2", - "resolved": "https://registry.npm.taobao.org/regjsgen/download/regjsgen-0.5.2.tgz", - "integrity": "sha1-kv8pX7He7L9uzaslQ9IH6RqjNzM=", - "dev": true - }, - "regjsparser": { - "version": "0.6.4", - "resolved": "https://registry.npm.taobao.org/regjsparser/download/regjsparser-0.6.4.tgz", - "integrity": "sha1-p2n4aEMIQBpm6bUp0kNv9NBmYnI=", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - }, - "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npm.taobao.org/jsesc/download/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true - } - } - }, - "relateurl": { - "version": "0.2.7", - "resolved": "https://registry.npm.taobao.org/relateurl/download/relateurl-0.2.7.tgz", - "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", - "dev": true - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/remove-trailing-separator/download/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true - }, - "renderkid": { - "version": "2.0.3", - "resolved": "https://registry.npm.taobao.org/renderkid/download/renderkid-2.0.3.tgz", - "integrity": "sha1-OAF5wv9a4TZcUivy/Pz/AcW3QUk=", - "dev": true, - "requires": { - "css-select": "^1.1.0", - "dom-converter": "^0.2", - "htmlparser2": "^3.3.0", - "strip-ansi": "^3.0.0", - "utila": "^0.4.0" - }, - "dependencies": { - "css-select": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/css-select/download/css-select-1.2.0.tgz", - "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", - "dev": true, - "requires": { - "boolbase": "~1.0.0", - "css-what": "2.1", - "domutils": "1.5.1", - "nth-check": "~1.0.1" - } - }, - "css-what": { - "version": "2.1.3", - "resolved": "https://registry.npm.taobao.org/css-what/download/css-what-2.1.3.tgz", - "integrity": "sha1-ptdgRXM2X+dGhsPzEcVlE9iChfI=", - "dev": true - }, - "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npm.taobao.org/domutils/download/domutils-1.5.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdomutils%2Fdownload%2Fdomutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - } - } - }, - "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/repeat-element/download/repeat-element-1.1.3.tgz", - "integrity": "sha1-eC4NglwMWjuzlzH4Tv7mt0Lmsc4=", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npm.taobao.org/repeat-string/download/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/repeating/download/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npm.taobao.org/request/download/request-2.88.2.tgz?cache=0&sync_timestamp=1581439006948&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frequest%2Fdownload%2Frequest-2.88.2.tgz", - "integrity": "sha1-1zyRhzHLWofaBH4gcjQUb2ZNErM=", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - } - }, - "request-promise-core": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/request-promise-core/download/request-promise-core-1.1.3.tgz", - "integrity": "sha1-6aPAgbUTgN/qZ3M2Bh/qh5qCnuk=", - "dev": true, - "requires": { - "lodash": "^4.17.15" - } - }, - "request-promise-native": { - "version": "1.0.8", - "resolved": "https://registry.npm.taobao.org/request-promise-native/download/request-promise-native-1.0.8.tgz", - "integrity": "sha1-pFW5YLgm5E4r+Jma9k3/K/5YyzY=", - "dev": true, - "requires": { - "request-promise-core": "1.1.3", - "stealthy-require": "^1.1.1", - "tough-cookie": "^2.3.3" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/require-directory/download/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/require-from-string/download/require-from-string-2.0.2.tgz", - "integrity": "sha1-iaf92TgmEmcxjq/hT5wy5ZjDaQk=", - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/require-main-filename/download/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "require-uncached": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/require-uncached/download/require-uncached-1.0.3.tgz", - "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", - "dev": true, - "optional": true, - "requires": { - "caller-path": "^0.1.0", - "resolve-from": "^1.0.0" - } - }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/requires-port/download/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", - "dev": true - }, - "reselect": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/reselect/download/reselect-3.0.1.tgz", - "integrity": "sha1-79qpjqdFEyTQkrKyFjpqHXqaIUc=", - "dev": true - }, - "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npm.taobao.org/resolve/download/resolve-1.17.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fresolve%2Fdownload%2Fresolve-1.17.0.tgz", - "integrity": "sha1-sllBtUloIxzC0bt2p5y38sC/hEQ=", - "requires": { - "path-parse": "^1.0.6" - } - }, - "resolve-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/resolve-cwd/download/resolve-cwd-2.0.0.tgz", - "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", - "dev": true, - "requires": { - "resolve-from": "^3.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/resolve-from/download/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true - } - } - }, - "resolve-from": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/resolve-from/download/resolve-from-1.0.1.tgz", - "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", - "dev": true, - "optional": true - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npm.taobao.org/resolve-url/download/resolve-url-0.2.1.tgz?cache=0&sync_timestamp=1585438700247&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fresolve-url%2Fdownload%2Fresolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/restore-cursor/download/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "resumer": { - "version": "0.0.0", - "resolved": "https://registry.npm.taobao.org/resumer/download/resumer-0.0.0.tgz", - "integrity": "sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=", - "requires": { - "through": "~2.3.4" - } - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npm.taobao.org/ret/download/ret-0.1.15.tgz", - "integrity": "sha1-uKSCXVvbH8P29Twrwz+BOIaBx7w=", - "dev": true - }, - "retry": { - "version": "0.12.0", - "resolved": "https://registry.npm.taobao.org/retry/download/retry-0.12.0.tgz", - "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", - "dev": true - }, - "rgb-regex": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/rgb-regex/download/rgb-regex-1.0.1.tgz", - "integrity": "sha1-wODWiC3w4jviVKR16O3UGRX+rrE=", - "dev": true - }, - "rgba-regex": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/rgba-regex/download/rgba-regex-1.0.0.tgz", - "integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=", - "dev": true - }, - "right-align": { - "version": "0.1.3", - "resolved": "https://registry.npm.taobao.org/right-align/download/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", - "requires": { - "align-text": "^0.1.1" - } - }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npm.taobao.org/rimraf/download/rimraf-2.7.1.tgz?cache=0&sync_timestamp=1581229865753&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frimraf%2Fdownload%2Frimraf-2.7.1.tgz", - "integrity": "sha1-NXl/E6f9rcVmFCwp1PB8ytSD4+w=", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/ripemd160/download/ripemd160-2.0.2.tgz", - "integrity": "sha1-ocGm9iR1FXe6XQeRTLyShQWFiQw=", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "rollup": { - "version": "0.25.8", - "resolved": "https://registry.npm.taobao.org/rollup/download/rollup-0.25.8.tgz?cache=0&sync_timestamp=1595099799360&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frollup%2Fdownload%2Frollup-0.25.8.tgz", - "integrity": "sha1-v2zoO4dRDRY0Ru6qV37WpvxYNeA=", - "requires": { - "chalk": "^1.1.1", - "minimist": "^1.2.0", - "source-map-support": "^0.3.2" - } - }, - "run-async": { - "version": "2.4.1", - "resolved": "https://registry.npm.taobao.org/run-async/download/run-async-2.4.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frun-async%2Fdownload%2Frun-async-2.4.1.tgz", - "integrity": "sha1-hEDsz5nqPnC9QJ1JqriOEMGJpFU=", - "dev": true, - "optional": true - }, - "run-queue": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/run-queue/download/run-queue-1.0.3.tgz", - "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", - "dev": true, - "requires": { - "aproba": "^1.1.1" - } - }, - "rw": { - "version": "1.3.3", - "resolved": "https://registry.npm.taobao.org/rw/download/rw-1.3.3.tgz", - "integrity": "sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q=" - }, - "rx-lite": { - "version": "4.0.8", - "resolved": "https://registry.npm.taobao.org/rx-lite/download/rx-lite-4.0.8.tgz", - "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", - "dev": true, - "optional": true - }, - "rx-lite-aggregates": { - "version": "4.0.8", - "resolved": "https://registry.npm.taobao.org/rx-lite-aggregates/download/rx-lite-aggregates-4.0.8.tgz", - "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", - "dev": true, - "optional": true, - "requires": { - "rx-lite": "*" - } - }, - "rxjs": { - "version": "5.5.12", - "resolved": "https://registry.npm.taobao.org/rxjs/download/rxjs-5.5.12.tgz?cache=0&sync_timestamp=1593794887039&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frxjs%2Fdownload%2Frxjs-5.5.12.tgz", - "integrity": "sha1-b6YbinfD15PbrycL7i9D9lLXQcw=", - "dev": true, - "requires": { - "symbol-observable": "1.0.1" - }, - "dependencies": { - "symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/symbol-observable/download/symbol-observable-1.0.1.tgz", - "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", - "dev": true - } - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz", - "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=", - "dev": true - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/safe-regex/download/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/safer-buffer/download/safer-buffer-2.1.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsafer-buffer%2Fdownload%2Fsafer-buffer-2.1.2.tgz", - "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=", - "dev": true - }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npm.taobao.org/sax/download/sax-1.2.4.tgz", - "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=", - "dev": true - }, - "saxes": { - "version": "3.1.11", - "resolved": "https://registry.npm.taobao.org/saxes/download/saxes-3.1.11.tgz", - "integrity": "sha1-1Z0f0zLskq2YouCy7mRHAjhLHFs=", - "dev": true, - "requires": { - "xmlchars": "^2.1.1" - } - }, - "schema-utils": { - "version": "2.7.0", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-2.7.0.tgz", - "integrity": "sha1-FxUfdtjq5n+793lgwzxnatn078c=", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.4", - "ajv": "^6.12.2", - "ajv-keywords": "^3.4.1" - } - }, - "select": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/select/download/select-1.1.2.tgz", - "integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=" - }, - "select-hose": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/select-hose/download/select-hose-2.0.0.tgz", - "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", - "dev": true - }, - "selfsigned": { - "version": "1.10.7", - "resolved": "https://registry.npm.taobao.org/selfsigned/download/selfsigned-1.10.7.tgz", - "integrity": "sha1-2lgZ/QSdVXTyjoipvMbbxubzkGs=", - "dev": true, - "requires": { - "node-forge": "0.9.0" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npm.taobao.org/semver/download/semver-5.7.1.tgz?cache=0&sync_timestamp=1586886301819&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-5.7.1.tgz", - "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=", - "dev": true - }, - "send": { - "version": "0.17.1", - "resolved": "https://registry.npm.taobao.org/send/download/send-0.17.1.tgz", - "integrity": "sha1-wdiwWfeQD3Rm3Uk4vcROEd2zdsg=", - "dev": true, - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.7.2", - "mime": "1.6.0", - "ms": "2.1.1", - "on-finished": "~2.3.0", - "range-parser": "~1.2.1", - "statuses": "~1.5.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npm.taobao.org/mime/download/mime-1.6.0.tgz?cache=0&sync_timestamp=1590596706367&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmime%2Fdownload%2Fmime-1.6.0.tgz", - "integrity": "sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE=", - "dev": true - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.1.1.tgz", - "integrity": "sha1-MKWGTrPrsKZvLr5tcnrwagnYbgo=", - "dev": true - } - } - }, - "serialize-javascript": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/serialize-javascript/download/serialize-javascript-3.1.0.tgz", - "integrity": "sha1-i/OpFwcSZk7yVhtEtpHq/jmSFOo=", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, - "serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npm.taobao.org/serve-index/download/serve-index-1.9.1.tgz", - "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", - "dev": true, - "requires": { - "accepts": "~1.3.4", - "batch": "0.6.1", - "debug": "2.6.9", - "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npm.taobao.org/http-errors/download/http-errors-1.6.3.tgz?cache=0&sync_timestamp=1593407710477&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-errors%2Fdownload%2Fhttp-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", - "dev": true, - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/setprototypeof/download/setprototypeof-1.1.0.tgz?cache=0&sync_timestamp=1563425414995&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsetprototypeof%2Fdownload%2Fsetprototypeof-1.1.0.tgz", - "integrity": "sha1-0L2FU2iHtv58DYGMuWLZ2RxU5lY=", - "dev": true - } - } - }, - "serve-static": { - "version": "1.14.1", - "resolved": "https://registry.npm.taobao.org/serve-static/download/serve-static-1.14.1.tgz", - "integrity": "sha1-Zm5jbcTwEPfvKZcKiKZ0MgiYsvk=", - "dev": true, - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.17.1" - } - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/set-blocking/download/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "set-value": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/set-value/download/set-value-2.0.1.tgz?cache=0&sync_timestamp=1585775409029&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fset-value%2Fdownload%2Fset-value-2.0.1.tgz", - "integrity": "sha1-oY1AUw5vB95CKMfe/kInr4ytAFs=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/setimmediate/download/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true - }, - "setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/setprototypeof/download/setprototypeof-1.1.1.tgz?cache=0&sync_timestamp=1563425414995&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsetprototypeof%2Fdownload%2Fsetprototypeof-1.1.1.tgz", - "integrity": "sha1-fpWsskqpL1iF4KvvW6ExMw1K5oM=", - "dev": true - }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npm.taobao.org/sha.js/download/sha.js-2.4.11.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsha.js%2Fdownload%2Fsha.js-2.4.11.tgz", - "integrity": "sha1-N6XPC4HsvGlD3hCbopYNGyZYSuc=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/shebang-command/download/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/shebang-regex/download/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "shell-quote": { - "version": "1.7.2", - "resolved": "https://registry.npm.taobao.org/shell-quote/download/shell-quote-1.7.2.tgz", - "integrity": "sha1-Z6fQLHbJ2iT5nSCAj8re0ODgS+I=", - "dev": true - }, - "sigmund": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/sigmund/download/sigmund-1.0.1.tgz", - "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", - "dev": true - }, - "signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npm.taobao.org/signal-exit/download/signal-exit-3.0.3.tgz", - "integrity": "sha1-oUEMLt2PB3sItOJTyOrPyvBXRhw=", - "dev": true - }, - "simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npm.taobao.org/simple-swizzle/download/simple-swizzle-0.2.2.tgz", - "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", - "dev": true, - "requires": { - "is-arrayish": "^0.3.1" - }, - "dependencies": { - "is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npm.taobao.org/is-arrayish/download/is-arrayish-0.3.2.tgz", - "integrity": "sha1-RXSirlb3qyBolvtDHq7tBm/fjwM=", - "dev": true - } - } - }, - "simplemde": { - "version": "1.11.2", - "resolved": "https://registry.npm.taobao.org/simplemde/download/simplemde-1.11.2.tgz", - "integrity": "sha1-ojo12XjSxA7wfewAjJLwcNjggOM=", - "requires": { - "codemirror": "*", - "codemirror-spell-checker": "*", - "marked": "*" - } - }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/slash/download/slash-2.0.0.tgz", - "integrity": "sha1-3lUoUaF1nfOo8gZTVEL17E3eq0Q=", - "dev": true - }, - "slice-ansi": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/slice-ansi/download/slice-ansi-1.0.0.tgz", - "integrity": "sha1-BE8aSdiEL/MHqta1Be0Xi9lQE00=", - "dev": true, - "optional": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0" - } - }, - "slick-carousel": { - "version": "1.8.1", - "resolved": "https://registry.npm.taobao.org/slick-carousel/download/slick-carousel-1.8.1.tgz", - "integrity": "sha1-pL+ykBSIe7Zs5Si5C9DNomLMj40=" - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npm.taobao.org/snapdragon/download/snapdragon-0.8.2.tgz", - "integrity": "sha1-ZJIufFZbDhQgS6GqfWlkJ40lGC0=", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/snapdragon-node/download/snapdragon-node-2.1.1.tgz", - "integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npm.taobao.org/kind-of/download/kind-of-6.0.3.tgz", - "integrity": "sha1-B8BQNKbDSfoG4k+jWqdttFgM5N0=", - "dev": true - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/snapdragon-util/download/snapdragon-util-3.0.1.tgz", - "integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=", - "dev": true, - "requires": { - "kind-of": "^3.2.0" - } - }, - "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npm.taobao.org/sntp/download/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", - "dev": true, - "optional": true, - "requires": { - "hoek": "2.x.x" - } - }, - "sockjs": { - "version": "0.3.20", - "resolved": "https://registry.npm.taobao.org/sockjs/download/sockjs-0.3.20.tgz", - "integrity": "sha1-smooPsVi74smh7RAM6Tuzqx12FU=", - "dev": true, - "requires": { - "faye-websocket": "^0.10.0", - "uuid": "^3.4.0", - "websocket-driver": "0.6.5" - } - }, - "sockjs-client": { - "version": "1.4.0", - "resolved": "https://registry.npm.taobao.org/sockjs-client/download/sockjs-client-1.4.0.tgz", - "integrity": "sha1-yfJWjhnI/YFztJl+o0IOC7MGx9U=", - "dev": true, - "requires": { - "debug": "^3.2.5", - "eventsource": "^1.0.7", - "faye-websocket": "~0.11.1", - "inherits": "^2.0.3", - "json3": "^3.3.2", - "url-parse": "^1.4.3" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-3.2.6.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-3.2.6.tgz", - "integrity": "sha1-6D0X3hbYp++3cX7b5fsQE17uYps=", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "faye-websocket": { - "version": "0.11.3", - "resolved": "https://registry.npm.taobao.org/faye-websocket/download/faye-websocket-0.11.3.tgz", - "integrity": "sha1-XA6aiWjokSwoZjn96XeosgnyUI4=", - "dev": true, - "requires": { - "websocket-driver": ">=0.5.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true - } - } - }, - "sort-keys": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/sort-keys/download/sort-keys-1.1.2.tgz?cache=0&sync_timestamp=1565864727994&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsort-keys%2Fdownload%2Fsort-keys-1.1.2.tgz", - "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", - "dev": true, - "requires": { - "is-plain-obj": "^1.0.0" - } - }, - "sortablejs": { - "version": "1.10.2", - "resolved": "https://registry.npm.taobao.org/sortablejs/download/sortablejs-1.10.2.tgz", - "integrity": "sha1-bkA2TZE/mLhaFPZnj5K1wSIfUpA=" - }, - "source-list-map": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/source-list-map/download/source-list-map-2.0.1.tgz", - "integrity": "sha1-OZO9hzv8SEecyp6jpUeDXHwVSzQ=", - "dev": true - }, - "source-map": { - "version": "0.1.32", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.1.32.tgz", - "integrity": "sha1-yLbBZ3l7pHQKjqMyUhYv8IWRsmY=", - "requires": { - "amdefine": ">=0.0.4" - } - }, - "source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npm.taobao.org/source-map-resolve/download/source-map-resolve-0.5.3.tgz?cache=0&sync_timestamp=1584831908370&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map-resolve%2Fdownload%2Fsource-map-resolve-0.5.3.tgz", - "integrity": "sha1-GQhmvs51U+H48mei7oLGBrVQmho=", - "dev": true, - "requires": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-support": { - "version": "0.3.3", - "resolved": "https://registry.npm.taobao.org/source-map-support/download/source-map-support-0.3.3.tgz?cache=0&sync_timestamp=1587719517036&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map-support%2Fdownload%2Fsource-map-support-0.3.3.tgz", - "integrity": "sha1-NJAJd9W6PwfHdX7nLnO7GptTdU8=", - "requires": { - "source-map": "0.1.32" - } - }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npm.taobao.org/source-map-url/download/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true - }, - "spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npm.taobao.org/spdx-correct/download/spdx-correct-3.1.1.tgz?cache=0&sync_timestamp=1590161967473&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fspdx-correct%2Fdownload%2Fspdx-correct-3.1.1.tgz", - "integrity": "sha1-3s6BrJweZxPl99G28X1Gj6U9iak=", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/spdx-exceptions/download/spdx-exceptions-2.3.0.tgz?cache=0&sync_timestamp=1587422410312&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fspdx-exceptions%2Fdownload%2Fspdx-exceptions-2.3.0.tgz", - "integrity": "sha1-PyjOGnegA3JoPq3kpDMYNSeiFj0=", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/spdx-expression-parse/download/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha1-z3D1BILu/cmOPOCmgz5KU87rpnk=", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.5", - "resolved": "https://registry.npm.taobao.org/spdx-license-ids/download/spdx-license-ids-3.0.5.tgz", - "integrity": "sha1-NpS1gEVnpFjTyARYQqY1hjL2JlQ=", - "dev": true - }, - "spdy": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/spdy/download/spdy-4.0.2.tgz", - "integrity": "sha1-t09GYgOj7aRSwCSSuR+56EonZ3s=", - "dev": true, - "requires": { - "debug": "^4.1.0", - "handle-thing": "^2.0.0", - "http-deceiver": "^1.2.7", - "select-hose": "^2.0.0", - "spdy-transport": "^3.0.0" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-4.1.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-4.1.1.tgz", - "integrity": "sha1-O3ImAlUQnGtYnO4FDx1RYTlmR5E=", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true - } - } - }, - "spdy-transport": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/spdy-transport/download/spdy-transport-3.0.0.tgz", - "integrity": "sha1-ANSGOmQArXXfkzYaFghgXl3NzzE=", - "dev": true, - "requires": { - "debug": "^4.1.0", - "detect-node": "^2.0.4", - "hpack.js": "^2.1.6", - "obuf": "^1.1.2", - "readable-stream": "^3.0.6", - "wbuf": "^1.7.3" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-4.1.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-4.1.1.tgz", - "integrity": "sha1-O3ImAlUQnGtYnO4FDx1RYTlmR5E=", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npm.taobao.org/readable-stream/download/readable-stream-3.6.0.tgz", - "integrity": "sha1-M3u9o63AcGvT4CRCaihtS0sskZg=", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/split-string/download/split-string-3.1.0.tgz", - "integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/sprintf-js/download/sprintf-js-1.0.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsprintf-js%2Fdownload%2Fsprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "ssf": { - "version": "0.10.3", - "resolved": "https://registry.npm.taobao.org/ssf/download/ssf-0.10.3.tgz", - "integrity": "sha1-jq4fwpyQpVLnkhII+BiS1vd6yys=", - "requires": { - "frac": "~1.1.2" - } - }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npm.taobao.org/sshpk/download/sshpk-1.16.1.tgz", - "integrity": "sha1-+2YcC+8ps520B2nuOfpwCT1vaHc=", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "ssri": { - "version": "6.0.1", - "resolved": "https://registry.npm.taobao.org/ssri/download/ssri-6.0.1.tgz", - "integrity": "sha1-KjxBso3UW2K2Nnbst0ABJlrp7dg=", - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1" - } - }, - "stable": { - "version": "0.1.8", - "resolved": "https://registry.npm.taobao.org/stable/download/stable-0.1.8.tgz", - "integrity": "sha1-g26zyDgv4pNv6vVEYxAXzn1Ho88=", - "dev": true - }, - "stackframe": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/stackframe/download/stackframe-1.2.0.tgz?cache=0&sync_timestamp=1590854148142&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstackframe%2Fdownload%2Fstackframe-1.2.0.tgz", - "integrity": "sha1-UkKUktY8YuuYmATBFVLj0i53kwM=", - "dev": true - }, - "staged-git-files": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/staged-git-files/download/staged-git-files-1.0.0.tgz", - "integrity": "sha1-zbhHg3wfzFLAioctSIPMCHdmioA=", - "dev": true - }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/static-extend/download/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npm.taobao.org/statuses/download/statuses-1.5.0.tgz?cache=0&sync_timestamp=1587328859420&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstatuses%2Fdownload%2Fstatuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", - "dev": true - }, - "stealthy-require": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/stealthy-require/download/stealthy-require-1.1.1.tgz", - "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", - "dev": true - }, - "stream-browserify": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/stream-browserify/download/stream-browserify-2.0.2.tgz?cache=0&sync_timestamp=1587041519870&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstream-browserify%2Fdownload%2Fstream-browserify-2.0.2.tgz", - "integrity": "sha1-h1IdOKRKp+6RzhzSpH3wy0ndZgs=", - "dev": true, - "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - } - }, - "stream-each": { - "version": "1.2.3", - "resolved": "https://registry.npm.taobao.org/stream-each/download/stream-each-1.2.3.tgz", - "integrity": "sha1-6+J6DDibBPvMIzZClS4Qcxr6m64=", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "stream-shift": "^1.0.0" - } - }, - "stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npm.taobao.org/stream-http/download/stream-http-2.8.3.tgz?cache=0&sync_timestamp=1588701035785&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstream-http%2Fdownload%2Fstream-http-2.8.3.tgz", - "integrity": "sha1-stJCRpKIpaJ+xP6JM6z2I95lFPw=", - "dev": true, - "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "stream-shift": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/stream-shift/download/stream-shift-1.0.1.tgz?cache=0&sync_timestamp=1576147145118&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstream-shift%2Fdownload%2Fstream-shift-1.0.1.tgz", - "integrity": "sha1-1wiCgVWasneEJCebCHfaPDktWj0=", - "dev": true - }, - "stream-to-observable": { - "version": "0.2.0", - "resolved": "https://registry.npm.taobao.org/stream-to-observable/download/stream-to-observable-0.2.0.tgz", - "integrity": "sha1-WdbqOT2HwsDdrBCqDVYbxrpvDhA=", - "dev": true, - "requires": { - "any-observable": "^0.2.0" - } - }, - "strict-uri-encode": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/strict-uri-encode/download/strict-uri-encode-1.1.0.tgz", - "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-2.1.1.tgz", - "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "string.prototype.padend": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/string.prototype.padend/download/string.prototype.padend-3.1.0.tgz?cache=0&sync_timestamp=1576312069927&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstring.prototype.padend%2Fdownload%2Fstring.prototype.padend-3.1.0.tgz", - "integrity": "sha1-3Aj1eoAQ3FwVNVAxj2fhOtu3KsM=", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - } - }, - "string.prototype.padstart": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/string.prototype.padstart/download/string.prototype.padstart-3.1.0.tgz", - "integrity": "sha1-tHwIdUDQcQvlpJN1dRoKYnvU/5A=", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - } - }, - "string.prototype.trim": { - "version": "1.2.1", - "resolved": "https://registry.npm.taobao.org/string.prototype.trim/download/string.prototype.trim-1.2.1.tgz", - "integrity": "sha1-FBIz3/Msgr+tgGhNfl8Iae4Pt4I=", - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1" - } - }, - "string.prototype.trimend": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/string.prototype.trimend/download/string.prototype.trimend-1.0.1.tgz?cache=0&sync_timestamp=1586465409341&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstring.prototype.trimend%2Fdownload%2Fstring.prototype.trimend-1.0.1.tgz", - "integrity": "sha1-hYEqa4R6wAInD1gIFGBkyZX7aRM=", - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "string.prototype.trimstart": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/string.prototype.trimstart/download/string.prototype.trimstart-1.0.1.tgz?cache=0&sync_timestamp=1586465413621&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstring.prototype.trimstart%2Fdownload%2Fstring.prototype.trimstart-1.0.1.tgz", - "integrity": "sha1-FK9tnzSwU/fPyJty+PLuFLkDmlQ=", - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz", - "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "stringify-object": { - "version": "3.3.0", - "resolved": "https://registry.npm.taobao.org/stringify-object/download/stringify-object-3.3.0.tgz", - "integrity": "sha1-cDBlrvyhkwDTzoivT1s5VtdVZik=", - "dev": true, - "requires": { - "get-own-enumerable-property-symbols": "^3.0.0", - "is-obj": "^1.0.1", - "is-regexp": "^1.0.0" - }, - "dependencies": { - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/is-obj/download/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", - "dev": true - } - } - }, - "stringstream": { - "version": "0.0.6", - "resolved": "https://registry.npm.taobao.org/stringstream/download/stringstream-0.0.6.tgz", - "integrity": "sha1-eIAiWw1K0Q4wkn0Weh1vL9OzOnI=", - "dev": true, - "optional": true - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/strip-bom/download/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/strip-eof/download/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/strip-final-newline/download/strip-final-newline-2.0.0.tgz", - "integrity": "sha1-ibhS+y/L6Tb29LMYevsKEsGrWK0=", - "dev": true - }, - "strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/strip-indent/download/strip-indent-2.0.0.tgz", - "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", - "dev": true - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/strip-json-comments/download/strip-json-comments-2.0.1.tgz?cache=0&sync_timestamp=1594567586410&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-json-comments%2Fdownload%2Fstrip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true, - "optional": true - }, - "stylehacks": { - "version": "4.0.3", - "resolved": "https://registry.npm.taobao.org/stylehacks/download/stylehacks-4.0.3.tgz", - "integrity": "sha1-Zxj8r00eB9ihMYaQiB6NlnJqcdU=", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0" - }, - "dependencies": { - "postcss-selector-parser": { - "version": "3.1.2", - "resolved": "https://registry.npm.taobao.org/postcss-selector-parser/download/postcss-selector-parser-3.1.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss-selector-parser%2Fdownload%2Fpostcss-selector-parser-3.1.2.tgz", - "integrity": "sha1-sxD1xMD9r3b5SQK7qjDbaqhPUnA=", - "dev": true, - "requires": { - "dot-prop": "^5.2.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - } - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - }, - "svg-tags": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/svg-tags/download/svg-tags-1.0.0.tgz", - "integrity": "sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=", - "dev": true - }, - "svgo": { - "version": "1.3.2", - "resolved": "https://registry.npm.taobao.org/svgo/download/svgo-1.3.2.tgz?cache=0&sync_timestamp=1572433264480&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsvgo%2Fdownload%2Fsvgo-1.3.2.tgz", - "integrity": "sha1-ttxRHAYzRsnkFbgeQ0ARRbltQWc=", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "coa": "^2.0.2", - "css-select": "^2.0.0", - "css-select-base-adapter": "^0.1.1", - "css-tree": "1.0.0-alpha.37", - "csso": "^4.0.2", - "js-yaml": "^3.13.1", - "mkdirp": "~0.5.1", - "object.values": "^1.1.0", - "sax": "~1.2.4", - "stable": "^0.1.8", - "unquote": "~1.1.1", - "util.promisify": "~1.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "symbol-observable": { - "version": "0.2.4", - "resolved": "https://registry.npm.taobao.org/symbol-observable/download/symbol-observable-0.2.4.tgz", - "integrity": "sha1-lag9smGG1q9+ehjb2XYKL4bQj0A=", - "dev": true - }, - "symbol-tree": { - "version": "3.2.4", - "resolved": "https://registry.npm.taobao.org/symbol-tree/download/symbol-tree-3.2.4.tgz", - "integrity": "sha1-QwY30ki6d+B4iDlR+5qg7tfGP6I=", - "dev": true - }, - "table": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/table/download/table-4.0.2.tgz", - "integrity": "sha1-ozRHN1OR52atNNNIbm4q7chNLjY=", - "dev": true, - "optional": true, - "requires": { - "ajv": "^5.2.3", - "ajv-keywords": "^2.1.0", - "chalk": "^2.1.0", - "lodash": "^4.17.4", - "slice-ansi": "1.0.0", - "string-width": "^2.1.1" - }, - "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npm.taobao.org/ajv/download/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "optional": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "ajv-keywords": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/ajv-keywords/download/ajv-keywords-2.1.1.tgz", - "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=", - "dev": true, - "optional": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "optional": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-1.1.0.tgz?cache=0&sync_timestamp=1591599666712&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-deep-equal%2Fdownload%2Ffast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", - "dev": true, - "optional": true - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", - "dev": true, - "optional": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "optional": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "tapable": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/tapable/download/tapable-1.1.3.tgz", - "integrity": "sha1-ofzMBrWNth/XpF2i2kT186Pme6I=", - "dev": true - }, - "tape": { - "version": "4.13.3", - "resolved": "https://registry.npm.taobao.org/tape/download/tape-4.13.3.tgz?cache=0&sync_timestamp=1590380169759&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftape%2Fdownload%2Ftape-4.13.3.tgz", - "integrity": "sha1-UbPZHINmjHpFsaWUtgfe4KC0Yng=", - "requires": { - "deep-equal": "~1.1.1", - "defined": "~1.0.0", - "dotignore": "~0.1.2", - "for-each": "~0.3.3", - "function-bind": "~1.1.1", - "glob": "~7.1.6", - "has": "~1.0.3", - "inherits": "~2.0.4", - "is-regex": "~1.0.5", - "minimist": "~1.2.5", - "object-inspect": "~1.7.0", - "resolve": "~1.17.0", - "resumer": "~0.0.0", - "string.prototype.trim": "~1.2.1", - "through": "~2.3.8" - } - }, - "terser": { - "version": "4.8.0", - "resolved": "https://registry.npm.taobao.org/terser/download/terser-4.8.0.tgz?cache=0&sync_timestamp=1593953635939&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser%2Fdownload%2Fterser-4.8.0.tgz", - "integrity": "sha1-YwVjQ9fHC7KfOvZlhlpG/gOg3xc=", - "dev": true, - "requires": { - "commander": "^2.20.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.12" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - }, - "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npm.taobao.org/source-map-support/download/source-map-support-0.5.19.tgz?cache=0&sync_timestamp=1587719517036&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map-support%2Fdownload%2Fsource-map-support-0.5.19.tgz", - "integrity": "sha1-qYti+G3K9PZzmWSMCFKRq56P7WE=", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - } - } - }, - "terser-webpack-plugin": { - "version": "1.4.4", - "resolved": "https://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-1.4.4.tgz?cache=0&sync_timestamp=1594910785474&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser-webpack-plugin%2Fdownload%2Fterser-webpack-plugin-1.4.4.tgz", - "integrity": "sha1-LGNUQ0cyS6r6mla6rd8WNMir/C8=", - "dev": true, - "requires": { - "cacache": "^12.0.2", - "find-cache-dir": "^2.1.0", - "is-wsl": "^1.1.0", - "schema-utils": "^1.0.0", - "serialize-javascript": "^3.1.0", - "source-map": "^0.6.1", - "terser": "^4.1.2", - "webpack-sources": "^1.4.0", - "worker-farm": "^1.7.0" - }, - "dependencies": { - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz", - "integrity": "sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A=", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - } - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npm.taobao.org/text-table/download/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true, - "optional": true - }, - "thenify": { - "version": "3.3.1", - "resolved": "https://registry.npm.taobao.org/thenify/download/thenify-3.3.1.tgz", - "integrity": "sha1-iTLmhqQGYDigFt2eLKRq3Zg4qV8=", - "dev": true, - "requires": { - "any-promise": "^1.0.0" - } - }, - "thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npm.taobao.org/thenify-all/download/thenify-all-1.6.0.tgz", - "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", - "dev": true, - "requires": { - "thenify": ">= 3.1.0 < 4" - } - }, - "thread-loader": { - "version": "2.1.3", - "resolved": "https://registry.npm.taobao.org/thread-loader/download/thread-loader-2.1.3.tgz", - "integrity": "sha1-y9LBOfwrLebp0o9iKGq3cMGsvdo=", - "dev": true, - "requires": { - "loader-runner": "^2.3.1", - "loader-utils": "^1.1.0", - "neo-async": "^2.6.0" - } - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npm.taobao.org/through/download/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npm.taobao.org/through2/download/through2-2.0.5.tgz", - "integrity": "sha1-AcHjnrMdB8t9A6lqcIIyYLIxMs0=", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "thunky": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/thunky/download/thunky-1.1.0.tgz?cache=0&sync_timestamp=1571043401546&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fthunky%2Fdownload%2Fthunky-1.1.0.tgz", - "integrity": "sha1-Wrr3FKlAXbBQRzK7zNLO3Z75U30=", - "dev": true - }, - "timers-browserify": { - "version": "2.0.11", - "resolved": "https://registry.npm.taobao.org/timers-browserify/download/timers-browserify-2.0.11.tgz", - "integrity": "sha1-gAsfPu4nLlvFPuRloE0OgEwxIR8=", - "dev": true, - "requires": { - "setimmediate": "^1.0.4" - } - }, - "timsort": { - "version": "0.3.0", - "resolved": "https://registry.npm.taobao.org/timsort/download/timsort-0.3.0.tgz", - "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", - "dev": true - }, - "tiny-emitter": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/tiny-emitter/download/tiny-emitter-2.1.0.tgz", - "integrity": "sha1-HRpW7fxRxD6GPLtTgqcjMONVVCM=" - }, - "tinycolor2": { - "version": "1.4.1", - "resolved": "https://registry.npm.taobao.org/tinycolor2/download/tinycolor2-1.4.1.tgz", - "integrity": "sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g=" - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npm.taobao.org/tmp/download/tmp-0.0.33.tgz?cache=0&sync_timestamp=1588178571895&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftmp%2Fdownload%2Ftmp-0.0.33.tgz", - "integrity": "sha1-bTQzWIl2jSGyvNoKonfO07G/rfk=", - "dev": true, - "optional": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/to-arraybuffer/download/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", - "dev": true - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/to-fast-properties/download/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npm.taobao.org/to-object-path/download/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npm.taobao.org/to-regex/download/to-regex-3.0.2.tgz", - "integrity": "sha1-E8/dmzNlUvMLUfM6iuG0Knp1mc4=", - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/to-regex-range/download/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/toidentifier/download/toidentifier-1.0.0.tgz", - "integrity": "sha1-fhvjRw8ed5SLxD2Uo8j013UrpVM=", - "dev": true - }, - "toposort": { - "version": "1.0.7", - "resolved": "https://registry.npm.taobao.org/toposort/download/toposort-1.0.7.tgz", - "integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=", - "dev": true - }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npm.taobao.org/tough-cookie/download/tough-cookie-2.5.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftough-cookie%2Fdownload%2Ftough-cookie-2.5.0.tgz", - "integrity": "sha1-zZ+yoKodWhK0c72fuW+j3P9lreI=", - "dev": true, - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, - "tr46": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/tr46/download/tr46-1.0.1.tgz", - "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "tree-table-vue": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/tree-table-vue/download/tree-table-vue-1.1.0.tgz", - "integrity": "sha1-ETpL2dhPqmQ5csS4AoCanbZjDYk=", - "requires": { - "clonedeep": "^2.0.0", - "iview": "^3.1.5", - "vue": "^2.5.17" - } - }, - "tryer": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/tryer/download/tryer-1.0.1.tgz", - "integrity": "sha1-8shUBoALmw90yfdGW4HqrSQSUvg=", - "dev": true - }, - "tsconfig-paths": { - "version": "3.9.0", - "resolved": "https://registry.npm.taobao.org/tsconfig-paths/download/tsconfig-paths-3.9.0.tgz", - "integrity": "sha1-CYVHpsREiAfo/Ljq4IEGTumjyQs=", - "dev": true, - "requires": { - "@types/json5": "^0.0.29", - "json5": "^1.0.1", - "minimist": "^1.2.0", - "strip-bom": "^3.0.0" - }, - "dependencies": { - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/json5/download/json5-1.0.1.tgz?cache=0&sync_timestamp=1586046271069&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjson5%2Fdownload%2Fjson5-1.0.1.tgz", - "integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - } - } - }, - "tslib": { - "version": "1.13.0", - "resolved": "https://registry.npm.taobao.org/tslib/download/tslib-1.13.0.tgz", - "integrity": "sha1-yIHhPMcBWJTtkUhi0nZDb6mkcEM=", - "dev": true - }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npm.taobao.org/tty-browserify/download/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", - "dev": true - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npm.taobao.org/tunnel-agent/download/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npm.taobao.org/tweetnacl/download/tweetnacl-0.14.5.tgz?cache=0&sync_timestamp=1581365146868&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftweetnacl%2Fdownload%2Ftweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npm.taobao.org/type-check/download/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npm.taobao.org/type-detect/download/type-detect-4.0.8.tgz", - "integrity": "sha1-dkb7XxiHHPu3dJ5pvTmmOI63RQw=", - "dev": true - }, - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npm.taobao.org/type-fest/download/type-fest-0.6.0.tgz", - "integrity": "sha1-jSojcNPfiG61yQraHFv2GIrPg4s=", - "dev": true - }, - "type-is": { - "version": "1.6.18", - "resolved": "https://registry.npm.taobao.org/type-is/download/type-is-1.6.18.tgz", - "integrity": "sha1-TlUs0F3wlGfcvE73Od6J8s83wTE=", - "dev": true, - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npm.taobao.org/typedarray/download/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "typo-js": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/typo-js/download/typo-js-1.1.0.tgz", - "integrity": "sha1-pan1kry0U2Zr9wyWlNpYcF0CXtg=" - }, - "uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npm.taobao.org/uglify-js/download/uglify-js-2.8.29.tgz?cache=0&sync_timestamp=1592744803278&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuglify-js%2Fdownload%2Fuglify-js-2.8.29.tgz", - "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", - "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" - } - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/uglify-to-browserify/download/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", - "optional": true - }, - "uglifyjs-webpack-plugin": { - "version": "1.3.0", - "resolved": "https://registry.npm.taobao.org/uglifyjs-webpack-plugin/download/uglifyjs-webpack-plugin-1.3.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuglifyjs-webpack-plugin%2Fdownload%2Fuglifyjs-webpack-plugin-1.3.0.tgz", - "integrity": "sha1-dfVIFghYFjoIZD4IbV/v4YpdZ94=", - "dev": true, - "requires": { - "cacache": "^10.0.4", - "find-cache-dir": "^1.0.0", - "schema-utils": "^0.4.5", - "serialize-javascript": "^1.4.0", - "source-map": "^0.6.1", - "uglify-es": "^3.3.4", - "webpack-sources": "^1.1.0", - "worker-farm": "^1.5.2" - }, - "dependencies": { - "cacache": { - "version": "10.0.4", - "resolved": "https://registry.npm.taobao.org/cacache/download/cacache-10.0.4.tgz?cache=0&sync_timestamp=1594429684526&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-10.0.4.tgz", - "integrity": "sha1-ZFI2eZnv+dQYiu/ZoU6dfGomNGA=", - "dev": true, - "requires": { - "bluebird": "^3.5.1", - "chownr": "^1.0.1", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "lru-cache": "^4.1.1", - "mississippi": "^2.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^5.2.4", - "unique-filename": "^1.1.0", - "y18n": "^4.0.0" - } - }, - "commander": { - "version": "2.13.0", - "resolved": "https://registry.npm.taobao.org/commander/download/commander-2.13.0.tgz?cache=0&sync_timestamp=1595168173997&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.13.0.tgz", - "integrity": "sha1-aWS8pnaF33wfFDDFhPB9dZeIW5w=", - "dev": true - }, - "find-cache-dir": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-1.0.0.tgz", - "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^2.0.0" - } - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-4.1.5.tgz?cache=0&sync_timestamp=1594427569171&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flru-cache%2Fdownload%2Flru-cache-4.1.5.tgz", - "integrity": "sha1-i75Q6oW+1ZvJ4z3KuCNe6bz0Q80=", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npm.taobao.org/make-dir/download/make-dir-1.3.0.tgz?cache=0&sync_timestamp=1587567875186&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmake-dir%2Fdownload%2Fmake-dir-1.3.0.tgz", - "integrity": "sha1-ecEDO4BRW9bSTsmTPoYMp17ifww=", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "mississippi": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/mississippi/download/mississippi-2.0.0.tgz", - "integrity": "sha1-NEKlCPr8KFAEhv7qmUCWduTuWm8=", - "dev": true, - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^2.0.1", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/pify/download/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/pkg-dir/download/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } - }, - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/pump/download/pump-2.0.1.tgz", - "integrity": "sha1-Ejma3W5M91Jtlzy8i1zi4pCLOQk=", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "schema-utils": { - "version": "0.4.7", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-0.4.7.tgz", - "integrity": "sha1-unT1l9K+LqiAExdG7hfQoJPGgYc=", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" - } - }, - "serialize-javascript": { - "version": "1.9.1", - "resolved": "https://registry.npm.taobao.org/serialize-javascript/download/serialize-javascript-1.9.1.tgz", - "integrity": "sha1-z8IArvd7YAxH2pu4FJyUPnmML9s=", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - }, - "ssri": { - "version": "5.3.0", - "resolved": "https://registry.npm.taobao.org/ssri/download/ssri-5.3.0.tgz", - "integrity": "sha1-ujhyycbTOgcEp9cf8EXl7EiZnQY=", - "dev": true, - "requires": { - "safe-buffer": "^5.1.1" - } - }, - "uglify-es": { - "version": "3.3.9", - "resolved": "https://registry.npm.taobao.org/uglify-es/download/uglify-es-3.3.9.tgz", - "integrity": "sha1-DBxPBwC+2NvBJM2zBNJZLKID5nc=", - "dev": true, - "requires": { - "commander": "~2.13.0", - "source-map": "~0.6.1" - } - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - } - } - }, - "unicode-canonical-property-names-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/unicode-canonical-property-names-ecmascript/download/unicode-canonical-property-names-ecmascript-1.0.4.tgz", - "integrity": "sha1-JhmADEyCWADv3YNDr33Zkzy+KBg=", - "dev": true - }, - "unicode-match-property-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/unicode-match-property-ecmascript/download/unicode-match-property-ecmascript-1.0.4.tgz", - "integrity": "sha1-jtKjJWmWG86SJ9Cc0/+7j+1fAgw=", - "dev": true, - "requires": { - "unicode-canonical-property-names-ecmascript": "^1.0.4", - "unicode-property-aliases-ecmascript": "^1.0.4" - } - }, - "unicode-match-property-value-ecmascript": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/unicode-match-property-value-ecmascript/download/unicode-match-property-value-ecmascript-1.2.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Funicode-match-property-value-ecmascript%2Fdownload%2Funicode-match-property-value-ecmascript-1.2.0.tgz", - "integrity": "sha1-DZH2AO7rMJaqlisdb8iIduZOpTE=", - "dev": true - }, - "unicode-property-aliases-ecmascript": { - "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/unicode-property-aliases-ecmascript/download/unicode-property-aliases-ecmascript-1.1.0.tgz?cache=0&sync_timestamp=1583945805856&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Funicode-property-aliases-ecmascript%2Fdownload%2Funicode-property-aliases-ecmascript-1.1.0.tgz", - "integrity": "sha1-3Vepn2IHvt/0Yoq++5TFDblByPQ=", - "dev": true - }, - "union-value": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/union-value/download/union-value-1.0.1.tgz", - "integrity": "sha1-C2/nuDWuzaYcbqTU8CwUIh4QmEc=", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - } - }, - "uniq": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/uniq/download/uniq-1.0.1.tgz", - "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", - "dev": true - }, - "uniqs": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/uniqs/download/uniqs-2.0.0.tgz", - "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=", - "dev": true - }, - "unique-filename": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/unique-filename/download/unique-filename-1.1.1.tgz", - "integrity": "sha1-HWl2k2mtoFgxA6HmrodoG1ZXMjA=", - "dev": true, - "requires": { - "unique-slug": "^2.0.0" - } - }, - "unique-slug": { - "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/unique-slug/download/unique-slug-2.0.2.tgz", - "integrity": "sha1-uqvOkQg/xk6UWw861hPiZPfNTmw=", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4" - } - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/universalify/download/universalify-0.1.2.tgz?cache=0&sync_timestamp=1583531006552&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Funiversalify%2Fdownload%2Funiversalify-0.1.2.tgz", - "integrity": "sha1-tkb2m+OULavOzJ1mOcgNwQXvqmY=", - "dev": true - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/unpipe/download/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true - }, - "unquote": { - "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/unquote/download/unquote-1.1.1.tgz", - "integrity": "sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=", - "dev": true - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/unset-value/download/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npm.taobao.org/has-value/download/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/isobject/download/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npm.taobao.org/has-values/download/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - } - } - }, - "upath": { - "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/upath/download/upath-1.2.0.tgz", - "integrity": "sha1-j2bbzVWog6za5ECK+LA1pQRMGJQ=", - "dev": true - }, - "upper-case": { - "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/upper-case/download/upper-case-1.1.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fupper-case%2Fdownload%2Fupper-case-1.1.3.tgz", - "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", - "dev": true - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npm.taobao.org/uri-js/download/uri-js-4.2.2.tgz", - "integrity": "sha1-lMVA4f93KVbiKZUHwBCupsiDjrA=", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npm.taobao.org/urix/download/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npm.taobao.org/url/download/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npm.taobao.org/punycode/download/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, - "url-loader": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/url-loader/download/url-loader-1.1.2.tgz", - "integrity": "sha1-uXHRkbg69pPF4/6kBkvp4fLX+Ng=", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "mime": "^2.0.3", - "schema-utils": "^1.0.0" - }, - "dependencies": { - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz", - "integrity": "sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A=", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "url-parse": { - "version": "1.4.7", - "resolved": "https://registry.npm.taobao.org/url-parse/download/url-parse-1.4.7.tgz", - "integrity": "sha1-qKg1NejACjFuQDpdtKwbm4U64ng=", - "dev": true, - "requires": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npm.taobao.org/use/download/use-3.1.1.tgz", - "integrity": "sha1-1QyMrHmhn7wg8pEfVuuXP04QBw8=", - "dev": true - }, - "util": { - "version": "0.11.1", - "resolved": "https://registry.npm.taobao.org/util/download/util-0.11.1.tgz?cache=0&sync_timestamp=1588238457176&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Futil%2Fdownload%2Futil-0.11.1.tgz", - "integrity": "sha1-MjZzNyDsZLsn9uJvQhqqLhtYjWE=", - "dev": true, - "requires": { - "inherits": "2.0.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - } - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/util-deprecate/download/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "util.promisify": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/util.promisify/download/util.promisify-1.0.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Futil.promisify%2Fdownload%2Futil.promisify-1.0.1.tgz", - "integrity": "sha1-a693dLgO6w91INi4HQeYKlmruu4=", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.2", - "has-symbols": "^1.0.1", - "object.getownpropertydescriptors": "^2.1.0" - } - }, - "utila": { - "version": "0.4.0", - "resolved": "https://registry.npm.taobao.org/utila/download/utila-0.4.0.tgz", - "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", - "dev": true - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/utils-merge/download/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npm.taobao.org/uuid/download/uuid-3.4.0.tgz", - "integrity": "sha1-sj5DWK+oogL+ehAK8fX4g/AgB+4=", - "dev": true - }, - "v-click-outside-x": { - "version": "3.7.1", - "resolved": "https://registry.npm.taobao.org/v-click-outside-x/download/v-click-outside-x-3.7.1.tgz?cache=0&sync_timestamp=1579043108278&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fv-click-outside-x%2Fdownload%2Fv-click-outside-x-3.7.1.tgz", - "integrity": "sha1-qgPqoOQeRMtSB9z4bC2fDdZAhME=" - }, - "v-org-tree": { - "version": "1.0.12", - "resolved": "https://registry.npm.taobao.org/v-org-tree/download/v-org-tree-1.0.12.tgz", - "integrity": "sha1-Vmsu8dO4jI+tTO4zZaa0v+rjtI0=", - "requires": { - "clonedeep": "^2.0.0" - } - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npm.taobao.org/validate-npm-package-license/download/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha1-/JH2uce6FchX9MssXe/uw51PQQo=", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/vary/download/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true - }, - "vendors": { - "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/vendors/download/vendors-1.0.4.tgz?cache=0&sync_timestamp=1579857147055&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvendors%2Fdownload%2Fvendors-1.0.4.tgz", - "integrity": "sha1-4rgApT56Kbk1BsPPQRANFsTErY4=", - "dev": true - }, - "venn.js": { - "version": "0.2.20", - "resolved": "https://registry.npm.taobao.org/venn.js/download/venn.js-0.2.20.tgz", - "integrity": "sha1-Pw5QzHXLofWGkqijL2e9eq8apvo=", - "requires": { - "d3-selection": "^1.0.2", - "d3-transition": "^1.0.1", - "fmin": "0.0.2" - } - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npm.taobao.org/verror/download/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "view-design": { - "version": "4.3.2", - "resolved": "https://registry.npm.taobao.org/view-design/download/view-design-4.3.2.tgz", - "integrity": "sha1-bwgcZzt3QgObs4o6UZOO+rtg0KI=", - "requires": { - "async-validator": "^3.3.0", - "deepmerge": "^2.2.1", - "element-resize-detector": "^1.2.0", - "js-calendar": "^1.2.3", - "lodash.throttle": "^4.1.1", - "popper.js": "^1.14.6", - "tinycolor2": "^1.4.1", - "v-click-outside-x": "^3.7.1" - }, - "dependencies": { - "async-validator": { - "version": "3.3.0", - "resolved": "https://registry.npm.taobao.org/async-validator/download/async-validator-3.3.0.tgz", - "integrity": "sha1-HZIZO75g1tbIskZpLHAF6e0UqO4=" - } - } - }, - "vm-browserify": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/vm-browserify/download/vm-browserify-1.1.2.tgz?cache=0&sync_timestamp=1572870776965&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvm-browserify%2Fdownload%2Fvm-browserify-1.1.2.tgz", - "integrity": "sha1-eGQcSIuObKkadfUR56OzKobl3aA=", - "dev": true - }, - "vue": { - "version": "2.6.11", - "resolved": "https://registry.npm.taobao.org/vue/download/vue-2.6.11.tgz", - "integrity": "sha1-dllNh31LEiNEBuhONSdcbVFBJcU=" - }, - "vue-data-loading": { - "version": "0.2.4", - "resolved": "https://registry.npm.taobao.org/vue-data-loading/download/vue-data-loading-0.2.4.tgz", - "integrity": "sha1-kftt9j7aXGXTrzM2foYqnh/Bhu8=", - "requires": { - "vue": "^2.0.0" - } - }, - "vue-enum": { - "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/vue-enum/download/vue-enum-1.0.5.tgz", - "integrity": "sha1-cQfD4tfXnp1HKLsWzvS83TTBziM=" - }, - "vue-eslint-parser": { - "version": "2.0.3", - "resolved": "https://registry.npm.taobao.org/vue-eslint-parser/download/vue-eslint-parser-2.0.3.tgz?cache=0&sync_timestamp=1589539313907&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-eslint-parser%2Fdownload%2Fvue-eslint-parser-2.0.3.tgz", - "integrity": "sha1-wmjJbG2Uz+PZOKX3WTlZsMozYNE=", - "dev": true, - "optional": true, - "requires": { - "debug": "^3.1.0", - "eslint-scope": "^3.7.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^3.5.2", - "esquery": "^1.0.0", - "lodash": "^4.17.4" - }, - "dependencies": { - "eslint-scope": { - "version": "3.7.3", - "resolved": "https://registry.npm.taobao.org/eslint-scope/download/eslint-scope-3.7.3.tgz", - "integrity": "sha1-u1ByANPRf2AkdjYWC0gmKEsQhTU=", - "dev": true, - "optional": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - } - } - }, - "vue-hot-reload-api": { - "version": "2.3.4", - "resolved": "https://registry.npm.taobao.org/vue-hot-reload-api/download/vue-hot-reload-api-2.3.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-hot-reload-api%2Fdownload%2Fvue-hot-reload-api-2.3.4.tgz", - "integrity": "sha1-UylVzB6yCKPZkLOp+acFdGV+CPI=", - "dev": true - }, - "vue-i18n": { - "version": "7.8.1", - "resolved": "https://registry.npm.taobao.org/vue-i18n/download/vue-i18n-7.8.1.tgz", - "integrity": "sha1-LOS2795nmh4F3bXZB7/BvCGIA7I=" - }, - "vue-infinite-loading": { - "version": "2.4.5", - "resolved": "https://registry.npm.taobao.org/vue-infinite-loading/download/vue-infinite-loading-2.4.5.tgz", - "integrity": "sha1-zCD9QK9/IBiABkQ8mbYEcM8d4bM=" - }, - "vue-json-viewer": { - "version": "2.2.12", - "resolved": "https://registry.npm.taobao.org/vue-json-viewer/download/vue-json-viewer-2.2.12.tgz", - "integrity": "sha1-9y94pAIOa+QqQwAOCdIEf2iWJlY=", - "requires": { - "clipboard": "^2.0.4", - "vue": "^2.6.9" - } - }, - "vue-json-views": { - "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/vue-json-views/download/vue-json-views-0.1.1.tgz", - "integrity": "sha1-8YAXKr4EvK9Cag9DoBkk4EJuvPw=", - "requires": { - "vue": "^2.5.11" - }, - "dependencies": { - "vue-json-views": { - "version": "0.0.2", - "resolved": "https://registry.npm.taobao.org/vue-json-views/download/vue-json-views-0.0.2.tgz", - "integrity": "sha1-xadQA6glOnXDN81xftikVMMCXx0=", - "requires": { - "vue": "^2.5.11" - } - } - } - }, - "vue-loader": { - "version": "15.9.3", - "resolved": "https://registry.npm.taobao.org/vue-loader/download/vue-loader-15.9.3.tgz?cache=0&sync_timestamp=1593355754768&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-loader%2Fdownload%2Fvue-loader-15.9.3.tgz", - "integrity": "sha1-DeNdnlVdPtU5aVFsrFziVTEpndo=", - "dev": true, - "requires": { - "@vue/component-compiler-utils": "^3.1.0", - "hash-sum": "^1.0.2", - "loader-utils": "^1.1.0", - "vue-hot-reload-api": "^2.3.0", - "vue-style-loader": "^4.1.0" - } - }, - "vue-router": { - "version": "3.3.4", - "resolved": "https://registry.npm.taobao.org/vue-router/download/vue-router-3.3.4.tgz?cache=0&sync_timestamp=1594111718735&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-router%2Fdownload%2Fvue-router-3.3.4.tgz", - "integrity": "sha1-Tjirw0oRxBtsPYJERJouNjumJQs=" - }, - "vue-slick": { - "version": "1.1.15", - "resolved": "https://registry.npm.taobao.org/vue-slick/download/vue-slick-1.1.15.tgz", - "integrity": "sha1-KRYTRTH9H5Y4VI8roVJuTxEDJYg=", - "requires": { - "slick-carousel": "^1.6.0" - } - }, - "vue-style-loader": { - "version": "4.1.2", - "resolved": "https://registry.npm.taobao.org/vue-style-loader/download/vue-style-loader-4.1.2.tgz", - "integrity": "sha1-3t80mAbyXOtOZPOtfApE+6c1/Pg=", - "dev": true, - "requires": { - "hash-sum": "^1.0.2", - "loader-utils": "^1.0.2" - } - }, - "vue-template-compiler": { - "version": "2.6.11", - "resolved": "https://registry.npm.taobao.org/vue-template-compiler/download/vue-template-compiler-2.6.11.tgz", - "integrity": "sha1-wEcE749JixUxMAGJk+VjCdRpgIA=", - "dev": true, - "requires": { - "de-indent": "^1.0.2", - "he": "^1.1.0" - } - }, - "vue-template-es2015-compiler": { - "version": "1.9.1", - "resolved": "https://registry.npm.taobao.org/vue-template-es2015-compiler/download/vue-template-es2015-compiler-1.9.1.tgz", - "integrity": "sha1-HuO8mhbsv1EYvjNLsV+cRvgvWCU=", - "dev": true - }, - "vuedraggable": { - "version": "2.24.0", - "resolved": "https://registry.npm.taobao.org/vuedraggable/download/vuedraggable-2.24.0.tgz?cache=0&sync_timestamp=1594052423588&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvuedraggable%2Fdownload%2Fvuedraggable-2.24.0.tgz", - "integrity": "sha1-HuBp7rkfYfy1QPryDxxrLU2ZCiY=", - "requires": { - "sortablejs": "^1.10.1" - } - }, - "vuex": { - "version": "3.5.1", - "resolved": "https://registry.npm.taobao.org/vuex/download/vuex-3.5.1.tgz?cache=0&sync_timestamp=1593445037188&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvuex%2Fdownload%2Fvuex-3.5.1.tgz", - "integrity": "sha1-8bjc6mSbwlJUz09DWAgdv12hiz0=" - }, - "w3c-hr-time": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/w3c-hr-time/download/w3c-hr-time-1.0.2.tgz?cache=0&sync_timestamp=1583455604765&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fw3c-hr-time%2Fdownload%2Fw3c-hr-time-1.0.2.tgz", - "integrity": "sha1-ConN9cwVgi35w2BUNnaWPgzDCM0=", - "dev": true, - "requires": { - "browser-process-hrtime": "^1.0.0" - } - }, - "w3c-xmlserializer": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/w3c-xmlserializer/download/w3c-xmlserializer-1.1.2.tgz", - "integrity": "sha1-MEhcp9cKb9BSQgo9Ev2Q5jOc55Q=", - "dev": true, - "requires": { - "domexception": "^1.0.1", - "webidl-conversions": "^4.0.2", - "xml-name-validator": "^3.0.0" - } - }, - "wangeditor": { - "version": "3.1.1", - "resolved": "https://registry.npm.taobao.org/wangeditor/download/wangeditor-3.1.1.tgz", - "integrity": "sha1-+9PB1JdpI8nt67hbKdMLNVEq0Dk=" - }, - "watchpack": { - "version": "1.7.2", - "resolved": "https://registry.npm.taobao.org/watchpack/download/watchpack-1.7.2.tgz", - "integrity": "sha1-wC5NTUmRPD5+EiwzJTZa+dMx6ao=", - "dev": true, - "requires": { - "chokidar": "^3.4.0", - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0", - "watchpack-chokidar2": "^2.0.0" - } - }, - "watchpack-chokidar2": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/watchpack-chokidar2/download/watchpack-chokidar2-2.0.0.tgz", - "integrity": "sha1-mUihhmy71suCTeoTp+1pH2yN3/A=", - "dev": true, - "optional": true, - "requires": { - "chokidar": "^2.1.8" - }, - "dependencies": { - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/anymatch/download/anymatch-2.0.0.tgz", - "integrity": "sha1-vLJLTzeTTZqnrBe0ra+J58du8us=", - "dev": true, - "optional": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - }, - "dependencies": { - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/normalize-path/download/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "optional": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - } - } - }, - "binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npm.taobao.org/binary-extensions/download/binary-extensions-1.13.1.tgz?cache=0&sync_timestamp=1593261363626&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbinary-extensions%2Fdownload%2Fbinary-extensions-1.13.1.tgz", - "integrity": "sha1-WYr+VHVbKGilMw0q/51Ou1Mgm2U=", - "dev": true, - "optional": true - }, - "chokidar": { - "version": "2.1.8", - "resolved": "https://registry.npm.taobao.org/chokidar/download/chokidar-2.1.8.tgz?cache=0&sync_timestamp=1594864731636&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchokidar%2Fdownload%2Fchokidar-2.1.8.tgz", - "integrity": "sha1-gEs6e2qZNYw8XGHnHYco8EHP+Rc=", - "dev": true, - "optional": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - } - }, - "fsevents": { - "version": "1.2.13", - "resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-1.2.13.tgz?cache=0&sync_timestamp=1588787369955&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffsevents%2Fdownload%2Ffsevents-1.2.13.tgz", - "integrity": "sha1-8yXLBFVZJCi88Rs4M3DvcOO/zDg=", - "dev": true, - "optional": true, - "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1" - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/glob-parent/download/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "optional": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "optional": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/is-binary-path/download/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "optional": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/readdirp/download/readdirp-2.2.1.tgz?cache=0&sync_timestamp=1584985910691&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freaddirp%2Fdownload%2Freaddirp-2.2.1.tgz", - "integrity": "sha1-DodiKjMlqjPokihcr4tOhGUppSU=", - "dev": true, - "optional": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - } - } - } - }, - "wbuf": { - "version": "1.7.3", - "resolved": "https://registry.npm.taobao.org/wbuf/download/wbuf-1.7.3.tgz", - "integrity": "sha1-wdjRSTFtPqhShIiVy2oL/oh7h98=", - "dev": true, - "requires": { - "minimalistic-assert": "^1.0.0" - } - }, - "wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/wcwidth/download/wcwidth-1.0.1.tgz", - "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", - "dev": true, - "requires": { - "defaults": "^1.0.3" - } - }, - "webidl-conversions": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/webidl-conversions/download/webidl-conversions-4.0.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebidl-conversions%2Fdownload%2Fwebidl-conversions-4.0.2.tgz", - "integrity": "sha1-qFWYCx8LazWbodXZ+zmulB+qY60=", - "dev": true - }, - "webpack": { - "version": "4.43.0", - "resolved": "https://registry.npm.taobao.org/webpack/download/webpack-4.43.0.tgz?cache=0&sync_timestamp=1594294511041&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack%2Fdownload%2Fwebpack-4.43.0.tgz", - "integrity": "sha1-xIVHsR1WMiTFYdrRFyyKoLimeOY=", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-module-context": "1.9.0", - "@webassemblyjs/wasm-edit": "1.9.0", - "@webassemblyjs/wasm-parser": "1.9.0", - "acorn": "^6.4.1", - "ajv": "^6.10.2", - "ajv-keywords": "^3.4.1", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^4.1.0", - "eslint-scope": "^4.0.3", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^2.4.0", - "loader-utils": "^1.2.3", - "memory-fs": "^0.4.1", - "micromatch": "^3.1.10", - "mkdirp": "^0.5.3", - "neo-async": "^2.6.1", - "node-libs-browser": "^2.2.1", - "schema-utils": "^1.0.0", - "tapable": "^1.1.3", - "terser-webpack-plugin": "^1.4.3", - "watchpack": "^1.6.1", - "webpack-sources": "^1.4.1" - }, - "dependencies": { - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz", - "integrity": "sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A=", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "webpack-bundle-analyzer": { - "version": "3.8.0", - "resolved": "https://registry.npm.taobao.org/webpack-bundle-analyzer/download/webpack-bundle-analyzer-3.8.0.tgz", - "integrity": "sha1-zms/kI2vBp/R9yZvaSy7O97ZuhY=", - "dev": true, - "requires": { - "acorn": "^7.1.1", - "acorn-walk": "^7.1.1", - "bfj": "^6.1.1", - "chalk": "^2.4.1", - "commander": "^2.18.0", - "ejs": "^2.6.1", - "express": "^4.16.3", - "filesize": "^3.6.1", - "gzip-size": "^5.0.0", - "lodash": "^4.17.15", - "mkdirp": "^0.5.1", - "opener": "^1.5.1", - "ws": "^6.0.0" - }, - "dependencies": { - "acorn": { - "version": "7.3.1", - "resolved": "https://registry.npm.taobao.org/acorn/download/acorn-7.3.1.tgz?cache=0&sync_timestamp=1591869432510&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Facorn%2Fdownload%2Facorn-7.3.1.tgz", - "integrity": "sha1-hQEHVNtTw/uvO56j4IOqXF0Uf/0=", - "dev": true - }, - "acorn-walk": { - "version": "7.2.0", - "resolved": "https://registry.npm.taobao.org/acorn-walk/download/acorn-walk-7.2.0.tgz", - "integrity": "sha1-DeiJpgEgOQmw++B7iTjcIdLpZ7w=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", - "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", - "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "webpack-chain": { - "version": "4.12.1", - "resolved": "https://registry.npm.taobao.org/webpack-chain/download/webpack-chain-4.12.1.tgz?cache=0&sync_timestamp=1593639477219&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-chain%2Fdownload%2Fwebpack-chain-4.12.1.tgz", - "integrity": "sha1-bIQ5u7KrVQlS1g4eqTGRQZBsAqY=", - "dev": true, - "requires": { - "deepmerge": "^1.5.2", - "javascript-stringify": "^1.6.0" - }, - "dependencies": { - "deepmerge": { - "version": "1.5.2", - "resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.5.2.tgz", - "integrity": "sha1-EEmdhohEza1P7ghC34x/bwyVp1M=", - "dev": true - } - } - }, - "webpack-dev-middleware": { - "version": "3.7.2", - "resolved": "https://registry.npm.taobao.org/webpack-dev-middleware/download/webpack-dev-middleware-3.7.2.tgz?cache=0&sync_timestamp=1594744804453&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-dev-middleware%2Fdownload%2Fwebpack-dev-middleware-3.7.2.tgz", - "integrity": "sha1-ABnD23FuP6XOy/ZPKriKdLqzMfM=", - "dev": true, - "requires": { - "memory-fs": "^0.4.1", - "mime": "^2.4.4", - "mkdirp": "^0.5.1", - "range-parser": "^1.2.1", - "webpack-log": "^2.0.0" - } - }, - "webpack-dev-server": { - "version": "3.11.0", - "resolved": "https://registry.npm.taobao.org/webpack-dev-server/download/webpack-dev-server-3.11.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-dev-server%2Fdownload%2Fwebpack-dev-server-3.11.0.tgz", - "integrity": "sha1-jxVKO84bz9HMYY705wMniFXn/4w=", - "dev": true, - "requires": { - "ansi-html": "0.0.7", - "bonjour": "^3.5.0", - "chokidar": "^2.1.8", - "compression": "^1.7.4", - "connect-history-api-fallback": "^1.6.0", - "debug": "^4.1.1", - "del": "^4.1.1", - "express": "^4.17.1", - "html-entities": "^1.3.1", - "http-proxy-middleware": "0.19.1", - "import-local": "^2.0.0", - "internal-ip": "^4.3.0", - "ip": "^1.1.5", - "is-absolute-url": "^3.0.3", - "killable": "^1.0.1", - "loglevel": "^1.6.8", - "opn": "^5.5.0", - "p-retry": "^3.0.1", - "portfinder": "^1.0.26", - "schema-utils": "^1.0.0", - "selfsigned": "^1.10.7", - "semver": "^6.3.0", - "serve-index": "^1.9.1", - "sockjs": "0.3.20", - "sockjs-client": "1.4.0", - "spdy": "^4.0.2", - "strip-ansi": "^3.0.1", - "supports-color": "^6.1.0", - "url": "^0.11.0", - "webpack-dev-middleware": "^3.7.2", - "webpack-log": "^2.0.0", - "ws": "^6.2.1", - "yargs": "^13.3.2" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-4.1.0.tgz", - "integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", - "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/anymatch/download/anymatch-2.0.0.tgz", - "integrity": "sha1-vLJLTzeTTZqnrBe0ra+J58du8us=", - "dev": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - }, - "dependencies": { - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/normalize-path/download/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - } - } - }, - "binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npm.taobao.org/binary-extensions/download/binary-extensions-1.13.1.tgz?cache=0&sync_timestamp=1593261363626&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbinary-extensions%2Fdownload%2Fbinary-extensions-1.13.1.tgz", - "integrity": "sha1-WYr+VHVbKGilMw0q/51Ou1Mgm2U=", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-5.3.1.tgz", - "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", - "dev": true - }, - "chokidar": { - "version": "2.1.8", - "resolved": "https://registry.npm.taobao.org/chokidar/download/chokidar-2.1.8.tgz?cache=0&sync_timestamp=1594864731636&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchokidar%2Fdownload%2Fchokidar-2.1.8.tgz", - "integrity": "sha1-gEs6e2qZNYw8XGHnHYco8EHP+Rc=", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - } - }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npm.taobao.org/cliui/download/cliui-5.0.0.tgz", - "integrity": "sha1-3u/P2y6AB4SqNPRvoI4GhRx7u8U=", - "dev": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - }, - "dependencies": { - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-5.2.0.tgz", - "integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-4.1.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-4.1.1.tgz", - "integrity": "sha1-O3ImAlUQnGtYnO4FDx1RYTlmR5E=", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npm.taobao.org/emoji-regex/download/emoji-regex-7.0.3.tgz", - "integrity": "sha1-kzoEBShgyF6DwSJHnEdIqOTHIVY=", - "dev": true - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/find-up/download/find-up-3.0.0.tgz", - "integrity": "sha1-SRafHXmTQwZG2mHsxa41XCHJe3M=", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "fsevents": { - "version": "1.2.13", - "resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-1.2.13.tgz?cache=0&sync_timestamp=1588787369955&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffsevents%2Fdownload%2Ffsevents-1.2.13.tgz", - "integrity": "sha1-8yXLBFVZJCi88Rs4M3DvcOO/zDg=", - "dev": true, - "optional": true, - "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1" - } - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npm.taobao.org/get-caller-file/download/get-caller-file-2.0.5.tgz", - "integrity": "sha1-T5RBKoLbMvNuOwuXQfipf+sDH34=", - "dev": true - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/glob-parent/download/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "is-absolute-url": { - "version": "3.0.3", - "resolved": "https://registry.npm.taobao.org/is-absolute-url/download/is-absolute-url-3.0.3.tgz", - "integrity": "sha1-lsaiK2ojkpsR6gr7GDbDatSl1pg=", - "dev": true - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/is-binary-path/download/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-3.0.0.tgz", - "integrity": "sha1-2+w7OrdZdYBxtY/ln8QYca8hQA4=", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", - "dev": true - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/p-limit/download/p-limit-2.3.0.tgz?cache=0&sync_timestamp=1594559696906&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fp-limit%2Fdownload%2Fp-limit-2.3.0.tgz", - "integrity": "sha1-PdM8ZHohT9//2DWTPrCG2g3CHbE=", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/p-locate/download/p-locate-3.0.0.tgz", - "integrity": "sha1-Mi1poFwCZLJZl9n0DNiokasAZKQ=", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/p-try/download/p-try-2.2.0.tgz", - "integrity": "sha1-yyhoVA4xPWHeWPr741zpAE1VQOY=", - "dev": true - }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/readdirp/download/readdirp-2.2.1.tgz?cache=0&sync_timestamp=1584985910691&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freaddirp%2Fdownload%2Freaddirp-2.2.1.tgz", - "integrity": "sha1-DodiKjMlqjPokihcr4tOhGUppSU=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - } - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/require-main-filename/download/require-main-filename-2.0.0.tgz", - "integrity": "sha1-0LMp7MfMD2Fkn2IhW+aa9UqomJs=", - "dev": true - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz", - "integrity": "sha1-C3mpMgTXtgDUsoUNH2bCo0lRx3A=", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1586886301819&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz", - "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-3.1.0.tgz", - "integrity": "sha1-InZ74htirxCBV0MG9prFG2IgOWE=", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "dependencies": { - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-5.2.0.tgz", - "integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-6.1.0.tgz", - "integrity": "sha1-B2Srxpxj1ayELdSGfo0CXogN+PM=", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npm.taobao.org/wrap-ansi/download/wrap-ansi-5.1.0.tgz", - "integrity": "sha1-H9H2cjXVttD+54EFYAG/tpTAOwk=", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-5.2.0.tgz", - "integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npm.taobao.org/yargs/download/yargs-13.3.2.tgz?cache=0&sync_timestamp=1594421046064&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyargs%2Fdownload%2Fyargs-13.3.2.tgz", - "integrity": "sha1-rX/+/sGqWVZayRX4Lcyzipwxot0=", - "dev": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npm.taobao.org/yargs-parser/download/yargs-parser-13.1.2.tgz?cache=0&sync_timestamp=1595125190020&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyargs-parser%2Fdownload%2Fyargs-parser-13.1.2.tgz", - "integrity": "sha1-Ew8JcC667vJlDVTObj5XBvek+zg=", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, - "webpack-log": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/webpack-log/download/webpack-log-2.0.0.tgz", - "integrity": "sha1-W3ko4GN1k/EZ0y9iJ8HgrDHhtH8=", - "dev": true, - "requires": { - "ansi-colors": "^3.0.0", - "uuid": "^3.3.2" - } - }, - "webpack-merge": { - "version": "4.2.2", - "resolved": "https://registry.npm.taobao.org/webpack-merge/download/webpack-merge-4.2.2.tgz?cache=0&sync_timestamp=1594294904067&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-merge%2Fdownload%2Fwebpack-merge-4.2.2.tgz", - "integrity": "sha1-onxS6ng9E5iv0gh/VH17nS9DY00=", - "dev": true, - "requires": { - "lodash": "^4.17.15" - } - }, - "webpack-sources": { - "version": "1.4.3", - "resolved": "https://registry.npm.taobao.org/webpack-sources/download/webpack-sources-1.4.3.tgz", - "integrity": "sha1-7t2OwLko+/HL/plOItLYkPMwqTM=", - "dev": true, - "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", - "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", - "dev": true - } - } - }, - "websocket-driver": { - "version": "0.6.5", - "resolved": "https://registry.npm.taobao.org/websocket-driver/download/websocket-driver-0.6.5.tgz?cache=0&sync_timestamp=1591289007652&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebsocket-driver%2Fdownload%2Fwebsocket-driver-0.6.5.tgz", - "integrity": "sha1-XLJVbOuF9Dc8bYI4qmkchFThOjY=", - "dev": true, - "requires": { - "websocket-extensions": ">=0.1.1" - } - }, - "websocket-extensions": { - "version": "0.1.4", - "resolved": "https://registry.npm.taobao.org/websocket-extensions/download/websocket-extensions-0.1.4.tgz", - "integrity": "sha1-f4RzvIOd/YdgituV1+sHUhFXikI=", - "dev": true - }, - "whatwg-encoding": { - "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/whatwg-encoding/download/whatwg-encoding-1.0.5.tgz", - "integrity": "sha1-WrrPd3wyFmpR0IXWtPPn0nET3bA=", - "dev": true, - "requires": { - "iconv-lite": "0.4.24" - } - }, - "whatwg-mimetype": { - "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/whatwg-mimetype/download/whatwg-mimetype-2.3.0.tgz", - "integrity": "sha1-PUseAxLSB5h5+Cav8Y2+7KWWD78=", - "dev": true - }, - "whatwg-url": { - "version": "7.1.0", - "resolved": "https://registry.npm.taobao.org/whatwg-url/download/whatwg-url-7.1.0.tgz?cache=0&sync_timestamp=1588965133257&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwhatwg-url%2Fdownload%2Fwhatwg-url-7.1.0.tgz", - "integrity": "sha1-wsSS8eymEpiO/T0iZr4bn8YXDQY=", - "dev": true, - "requires": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npm.taobao.org/which/download/which-1.3.1.tgz?cache=0&sync_timestamp=1574116262707&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwhich%2Fdownload%2Fwhich-1.3.1.tgz", - "integrity": "sha1-pFBD1U9YBTFtqNYvn1CRjT2nCwo=", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/which-module/download/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "window-size": { - "version": "0.1.0", - "resolved": "https://registry.npm.taobao.org/window-size/download/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=" - }, - "wolfy87-eventemitter": { - "version": "5.1.0", - "resolved": "https://registry.npm.taobao.org/wolfy87-eventemitter/download/wolfy87-eventemitter-5.1.0.tgz", - "integrity": "sha1-NcGsDdGsDBXjXZgVCPwiCEoToBE=" - }, - "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npm.taobao.org/word-wrap/download/word-wrap-1.2.3.tgz", - "integrity": "sha1-YQY29rH3A4kb00dxzLF/uTtHB5w=", - "dev": true - }, - "wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npm.taobao.org/wordwrap/download/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=" - }, - "worker-farm": { - "version": "1.7.0", - "resolved": "https://registry.npm.taobao.org/worker-farm/download/worker-farm-1.7.0.tgz", - "integrity": "sha1-JqlMU5G7ypJhUgAvabhKS/dy5ag=", - "dev": true, - "requires": { - "errno": "~0.1.7" - } - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/wrap-ansi/download/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/wrappy/download/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "write": { - "version": "0.2.1", - "resolved": "https://registry.npm.taobao.org/write/download/write-0.2.1.tgz", - "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", - "dev": true, - "optional": true, - "requires": { - "mkdirp": "^0.5.1" - } - }, - "ws": { - "version": "6.2.1", - "resolved": "https://registry.npm.taobao.org/ws/download/ws-6.2.1.tgz?cache=0&sync_timestamp=1593925420205&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fws%2Fdownload%2Fws-6.2.1.tgz", - "integrity": "sha1-RC/fCkftZPWbal2P8TD0dI7VJPs=", - "dev": true, - "requires": { - "async-limiter": "~1.0.0" - } - }, - "xlsx": { - "version": "0.13.5", - "resolved": "https://registry.npm.taobao.org/xlsx/download/xlsx-0.13.5.tgz", - "integrity": "sha1-ZYJroZRMb01sAjt+tsiea24Ncbc=", - "requires": { - "adler-32": "~1.2.0", - "cfb": "~1.0.8", - "codepage": "~1.14.0", - "commander": "~2.15.1", - "crc-32": "~1.2.0", - "exit-on-epipe": "~1.0.1", - "ssf": "~0.10.2" - }, - "dependencies": { - "commander": { - "version": "2.15.1", - "resolved": "https://registry.npm.taobao.org/commander/download/commander-2.15.1.tgz?cache=0&sync_timestamp=1595168173997&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.15.1.tgz", - "integrity": "sha1-30boZ9D8Kuxmo0ZitAapzK//Ww8=" - } - } - }, - "xml-name-validator": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/xml-name-validator/download/xml-name-validator-3.0.0.tgz", - "integrity": "sha1-auc+Bt5NjG5H+fsYH3jWSK1FfGo=", - "dev": true - }, - "xmlchars": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/xmlchars/download/xmlchars-2.2.0.tgz", - "integrity": "sha1-Bg/hvLf5x2/ioX24apvDq4lCEMs=", - "dev": true - }, - "xss": { - "version": "1.0.7", - "resolved": "https://registry.npm.taobao.org/xss/download/xss-1.0.7.tgz?cache=0&sync_timestamp=1591583567013&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fxss%2Fdownload%2Fxss-1.0.7.tgz", - "integrity": "sha1-pVTL1ekJMkvWiT+0f/9EGtVOKpU=", - "requires": { - "commander": "^2.20.3", - "cssfilter": "0.0.10" - } - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npm.taobao.org/xtend/download/xtend-4.0.2.tgz", - "integrity": "sha1-u3J3n1+kZRhrH0OPZ0+jR/2121Q=", - "dev": true - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/y18n/download/y18n-4.0.0.tgz", - "integrity": "sha1-le+U+F7MgdAHwmThkKEg8KPIVms=", - "dev": true - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-3.1.1.tgz", - "integrity": "sha1-27fa+b/YusmrRev2ArjLrQ1dCP0=", - "dev": true - }, - "yargs": { - "version": "3.10.0", - "resolved": "https://registry.npm.taobao.org/yargs/download/yargs-3.10.0.tgz?cache=0&sync_timestamp=1594421046064&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyargs%2Fdownload%2Fyargs-3.10.0.tgz", - "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", - "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" - } - }, - "yargs-parser": { - "version": "9.0.2", - "resolved": "https://registry.npm.taobao.org/yargs-parser/download/yargs-parser-9.0.2.tgz?cache=0&sync_timestamp=1595125190020&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyargs-parser%2Fdownload%2Fyargs-parser-9.0.2.tgz", - "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - } - } - }, - "yorkie": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/yorkie/download/yorkie-2.0.0.tgz", - "integrity": "sha1-kkEZEtQ1IU4SxRwq4Qk+VLa7g9k=", - "dev": true, - "requires": { - "execa": "^0.8.0", - "is-ci": "^1.0.10", - "normalize-path": "^1.0.0", - "strip-indent": "^2.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "0.8.0", - "resolved": "https://registry.npm.taobao.org/execa/download/execa-0.8.0.tgz?cache=0&sync_timestamp=1594145237072&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fexeca%2Fdownload%2Fexeca-0.8.0.tgz", - "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/get-stream/download/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-4.1.5.tgz?cache=0&sync_timestamp=1594427569171&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flru-cache%2Fdownload%2Flru-cache-4.1.5.tgz", - "integrity": "sha1-i75Q6oW+1ZvJ4z3KuCNe6bz0Q80=", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "normalize-path": { - "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/normalize-path/download/normalize-path-1.0.0.tgz", - "integrity": "sha1-MtDkcvkf80VwHBWoMRAY07CpA3k=", - "dev": true - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - } - } - }, - "zrender": { - "version": "4.3.1", - "resolved": "https://registry.npm.taobao.org/zrender/download/zrender-4.3.1.tgz", - "integrity": "sha1-uviqbcgYei+BlpLX1fm+36K5D6M=" - } - } -} diff --git a/smart-admin-web/package.json b/smart-admin-web/package.json deleted file mode 100644 index ee82b487..00000000 --- a/smart-admin-web/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "name": "smart-admin", - "version": "1.0.0", - "author": "1024创新实验室<1024lab@sina.com>", - "private": false, - "scripts": { - "dev": "vue-cli-service serve --open", - "local": "vue-cli-service serve --open --mode local", - "build": "vue-cli-service build", - "lint": "vue-cli-service lint", - "test:unit": "vue-cli-service test:unit", - "test:e2e": "vue-cli-service test:e2e", - "development": "vue-cli-service build --mode development", - "sit": "vue-cli-service build --mode sit", - "prod": "vue-cli-service build --mode prod" - }, - "dependencies": { - "@antv/g2": "^3.5.8-beta.1", - "axios": "^0.18.0", - "clipboard": "^2.0.0", - "codemirror": "^5.38.0", - "countup": "^1.8.2", - "cropperjs": "^1.2.2", - "dayjs": "^1.7.7", - "decimal.js": "^10.1.1", - "core-js":"^2.0.0", - "e-guide-layer": "^0.1.1", - "echarts": "^4.0.4", - "gq-plus": "^2.1.5", - "html2canvas": "^1.0.0-alpha.12", - "jquery": "^2.2.3", - "js-cookie": "^2.2.0", - "lodash": "^4.17.15", - "mavon-editor": "^2.7.5", - "moment": "^2.24.0", - "simplemde": "^1.11.2", - "sortablejs": "^1.7.0", - "tree-table-vue": "^1.1.0", - "v-org-tree": "^1.0.6", - "view-design": "^4.0.2", - "vue": "^2.5.10", - "vue-data-loading": "^0.2.4", - "vue-enum": "1.0.5", - "vue-i18n": "^7.8.0", - "vue-infinite-loading": "^2.4.4", - "vue-json-viewer": "^2.2.0", - "vue-json-views": "^0.1.1", - "vue-router": "^3.1.3", - "vue-slick": "^1.1.15", - "vuedraggable": "^2.16.0", - "vuex": "^3.0.1", - "wangeditor": "^3.1.1", - "xlsx": "^0.13.3" - }, - "devDependencies": { - "@vue/cli-plugin-babel": "^3.0.1", - "@vue/cli-plugin-eslint": "^3.0.1", - "@vue/cli-plugin-unit-mocha": "^3.0.1", - "@vue/cli-service": "^3.0.1", - "@vue/eslint-config-standard": "^3.0.0-beta.10", - "@vue/test-utils": "^1.0.0-beta.10", - "chai": "^4.1.2", - "compression-webpack-plugin": "^3.0.0", - "eslint-plugin-cypress": "^2.0.1", - "less": "^2.7.3", - "less-loader": "^4.0.5", - "lint-staged": "^6.0.0", - "uglifyjs-webpack-plugin": "^1.2.4", - "vue-template-compiler": "^2.5.13" - }, - "browserslist": [ - "> 1%", - "last 2 versions", - "not ie <= 8" - ], - "gitHooks": { - "pre-commit": "lint-staged" - }, - "lint-staged": { - "*.js": [ - "vue-cli-service lint", - "git add" - ], - "*.vue": [ - "vue-cli-service lint", - "git add" - ] - } -} diff --git a/smart-admin-web/public/favicon.ico b/smart-admin-web/public/favicon.ico deleted file mode 100644 index 5e59671b..00000000 Binary files a/smart-admin-web/public/favicon.ico and /dev/null differ diff --git a/smart-admin-web/public/index.html b/smart-admin-web/public/index.html deleted file mode 100644 index 97eb0895..00000000 --- a/smart-admin-web/public/index.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - -
- - - - diff --git a/smart-admin-web/src/App.vue b/smart-admin-web/src/App.vue deleted file mode 100644 index 0d189502..00000000 --- a/smart-admin-web/src/App.vue +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - diff --git a/smart-admin-web/src/api/data-scope.js b/smart-admin-web/src/api/data-scope.js deleted file mode 100644 index 14799315..00000000 --- a/smart-admin-web/src/api/data-scope.js +++ /dev/null @@ -1,15 +0,0 @@ -import { postAxios, getAxios } from '@/lib/http'; -export const dataScopeApi = { - // 批量设置某角色数据范围 - updateDataScope: data => { - return postAxios('/dataScope/batchSet', data); - }, - // 数据权限列表 - getDataScopeList: () => { - return getAxios('/dataScope/list'); - }, - // 获取某角色所设置的数据范围 - getDataScopeByRoleId: roleId => { - return getAxios('/dataScope/listByRole/' + roleId); - } -}; diff --git a/smart-admin-web/src/api/department.js b/smart-admin-web/src/api/department.js deleted file mode 100644 index 2e4ebfa0..00000000 --- a/smart-admin-web/src/api/department.js +++ /dev/null @@ -1,47 +0,0 @@ -import { postAxios, getAxios } from '@/lib/http'; -export const departmentApi = { - // 加载所有的部门子部门 - getLoadDepartment: () => { - return getAxios('/department/list'); - }, - // 查询部门及员工列表 - getDepartmentEmployeeList: () => { - return getAxios('/department/listEmployee'); - }, - // 添加部门 - addDepartment: (data) => { - return postAxios('/department/add', data); - }, - // 编辑部门 - updateDepartment: (data) => { - return postAxios('/department/update', data); - }, - // 删除部门 - deleteDepartment: (data) => { - return postAxios('/department/delete/' + data); - }, - // 根据id获取部门信息 - getDepartmentById: (data) => { - return getAxios('/department/query/' + data); - }, - // 查询部门列表 - getDepartmentAll: () => { - return getAxios('/department/listAll'); - }, - // 根据部门名称获取员工列表 - getListEmployeeByDepartmentName: (departmentName) => { - return getAxios('/department/listEmployeeByDepartmentName?departmentName=' + departmentName); - }, - // 上下移动 - upOrDown: (departmentId, swapId) => { - return getAxios('/department/upOrDown/' + departmentId + '/' + swapId); - }, - // 升级 - upGrade: (departmentId) => { - return getAxios('/department/upgrade/' + departmentId); - }, - // 降级 - downGrade: (departmentId, preId) => { - return getAxios('/department/downgrade/' + departmentId + '/' + preId); - } -}; diff --git a/smart-admin-web/src/api/email.js b/smart-admin-web/src/api/email.js deleted file mode 100644 index cb541021..00000000 --- a/smart-admin-web/src/api/email.js +++ /dev/null @@ -1,27 +0,0 @@ -import { postAxios, getAxios } from '@/lib/http'; -export const emailApi = { - // 新增邮件 - addEmail: (data) => { - return postAxios('/email/add', data); - }, - // 分页查询邮件 - getEmail: (data) => { - return postAxios('/email/page/query', data); - }, - // 删除邮件 - deleteEmail: (id) => { - return getAxios('/email/delete/' + id); - }, - // 查看邮件详情 - getEmailDetails: (id) => { - return getAxios('/email/detail/' + id); - }, - // 发送邮件 - sendEmail: (id) => { - return getAxios('/email/send/' + id); - }, - // 更新编辑邮件 - updateEmail: (data) => { - return postAxios('/email/update', data); - } -}; diff --git a/smart-admin-web/src/api/employee.js b/smart-admin-web/src/api/employee.js deleted file mode 100644 index 7f1d8001..00000000 --- a/smart-admin-web/src/api/employee.js +++ /dev/null @@ -1,43 +0,0 @@ -import { postAxios, getAxios } from '@/lib/http'; -export const employeeApi = { - // 员工管理查询 - getEmployeeList: (data) => { - return postAxios('/employee/query', data); - }, - // 添加员工 - addEmployee: (data) => { - return postAxios('/employee/add', data); - }, - // 更新员工信息 - updateEmployee: (data) => { - return postAxios('/employee/update', data); - }, - // 禁用启用单个员工 - updateStatus: (employeeId, status) => { - return getAxios('/employee/updateStatus/' + employeeId + '/' + status); - }, - // 批量禁用 - updateStatusBatch: (data) => { - return postAxios('/employee/batchUpdateStatus', data); - }, - // 单个员工角色授权 - updateRoles: (data) => { - return postAxios('/employee/updateRoles', data); - }, - // 修改密码 - updatePwd: (data) => { - return postAxios('/employee/updatePwd', data); - }, - // 重置密码 - resetPassword: (employeeId) => { - return getAxios('/employee/resetPasswd/' + employeeId); - }, - // 通过部门id获取当前部门的人员&没有部门的人 - getListEmployeeByDeptId: (departmentId) => { - return getAxios('/employee/listEmployeeByDeptId/' + departmentId); - }, - // 删除员工 - deleteEmployee: (employeeId) => { - return postAxios('/employee/delete/' + employeeId); - } -}; diff --git a/smart-admin-web/src/api/file.js b/smart-admin-web/src/api/file.js deleted file mode 100644 index e8f80248..00000000 --- a/smart-admin-web/src/api/file.js +++ /dev/null @@ -1,28 +0,0 @@ -import { postAxios, getAxios, getDownloadAxios} from '@/lib/http'; -import config from '@/config'; -const baseUrl = config.baseUrl.apiUrl; -export const fileApi = { - // 系统文件查询 - queryFileList: data => { - return postAxios('/api/file/query', data); - }, - // 系统文件下载通过接口 - downLoadFile: id => { - return getDownloadAxios('/api/file/downLoad?id=' + id); - }, - // 文件上传 - fileUpload: (type, data) => { - // return postAxios('/api/file/localUpload/' + type, data); - return this.fileUploadUrl; - }, - // 文件保存 - addFile: data => { - return postAxios('/api/file/save', data); - }, - // 上传路径:本地 - fileUploadLocalUrl: baseUrl + '/api/file/localUpload/', - // 上传路径:阿里OSS - fileUploadAliUrl: baseUrl + '/api/file/aliYunUpload/', - // 上传路径:七牛 - fileUploadQiNiuUrl: baseUrl + '/api/file/qiNiuUpload/' -}; diff --git a/smart-admin-web/src/api/heart-beat.js b/smart-admin-web/src/api/heart-beat.js deleted file mode 100644 index c5ec2486..00000000 --- a/smart-admin-web/src/api/heart-beat.js +++ /dev/null @@ -1,7 +0,0 @@ -import { postAxios, getAxios } from '@/lib/http'; -export const heartBeatApi = { - // 分页查询所有岗位 - queryHeartBeatRecord: data => { - return postAxios('/heartBeat/query', data); - } -}; diff --git a/smart-admin-web/src/api/login.js b/smart-admin-web/src/api/login.js deleted file mode 100644 index 83338d56..00000000 --- a/smart-admin-web/src/api/login.js +++ /dev/null @@ -1,19 +0,0 @@ -import { postAxios, getAxios } from '@/lib/http'; -export const loginApi = { - // 登录 - login: data => { - return postAxios('/session/login', data); - }, - // 根据token获取session - getSession: () => { - return getAxios('/session/get'); - }, - // 登出 - logout: (token) => { - return getAxios(`/session/logOut?x-access-token=${token}`); - }, - // 获取验证码 - getVerificationCode: () => { - return getAxios('/session/verificationCode'); - } -}; diff --git a/smart-admin-web/src/api/notice.js b/smart-admin-web/src/api/notice.js deleted file mode 100644 index fad6ad83..00000000 --- a/smart-admin-web/src/api/notice.js +++ /dev/null @@ -1,43 +0,0 @@ -// 任务调度API -import { - postAxios, - getAxios -} from '@/lib/http'; -export const noticeApi = { - // 查询消息列表 - getNoticeList: (data) => { - return postAxios('/notice/page/query', data); - }, - // 未读消息列表 - getNoticeUnreadList: (data) => { - return postAxios('/notice/unread/page/query', data); - }, - // 查询个人消息列表 - getPersonNoticeList: (data) => { - return postAxios('/notice/receive/page/query', data); - }, - // 添加消息 - addNotice: (data) => { - return postAxios('/notice/add', data); - }, - // 标记已读 - addNoticeRecord: (id) => { - return getAxios(`/notice/read/${id}`); - }, - // 修改消息 - updateNotice: (data) => { - return postAxios('/notice/update', data); - }, - // 删除消息 - deleteNotice: (id) => { - return getAxios(`/notice/delete/${id}`); - }, - // 获取通知详情 - getNoticeDetail: (id) => { - return getAxios(`/notice/detail/${id}`); - }, - // 发送消息 - sendNotice: (id) => { - return getAxios(`/notice/send/${id}`); - } -}; diff --git a/smart-admin-web/src/api/online-user.js b/smart-admin-web/src/api/online-user.js deleted file mode 100644 index b7847b9b..00000000 --- a/smart-admin-web/src/api/online-user.js +++ /dev/null @@ -1,12 +0,0 @@ -// 任务调度API -import { - postAxios, - getAxios -} from '@/lib/http'; -export const onlineUserApi = { - // 查询在线员工列表 - getOnlineUserList: (data) => { - return postAxios('/userOnLine/query', data); - } - -}; diff --git a/smart-admin-web/src/api/peony.js b/smart-admin-web/src/api/peony.js deleted file mode 100644 index 0c41d54f..00000000 --- a/smart-admin-web/src/api/peony.js +++ /dev/null @@ -1,28 +0,0 @@ -import { postAxios, getAxios, postDownloadAxios } from '@/lib/http'; - -export const peonyApi = { - // 添加牡丹花 @author 卓大 - addPeony: (data) => { - return postAxios('/peony/add', data); - }, - // 分页查询牡丹花 @author 卓大 - queryPeony: (data) => { - return postAxios('/peony/page/query', data); - }, - // 批量删除牡丹花 @author 卓大 - batchDeletePeony: (idList) => { - return postAxios('/peony/deleteByIds', idList); - }, - // 修改牡丹花 @author 卓大 - updatePeony: (data) => { - return postAxios('/peony/update',data); - }, - // 导出全部 @author 卓大 - exportAll:(data)=>{ - return postDownloadAxios('/peony/export/all',data); - }, - // 批量导出 @author 卓大 - batchExport: (idList) => { - return postDownloadAxios('/peony/export/batch', idList); - }, -}; diff --git a/smart-admin-web/src/api/position.js b/smart-admin-web/src/api/position.js deleted file mode 100644 index 3756c457..00000000 --- a/smart-admin-web/src/api/position.js +++ /dev/null @@ -1,19 +0,0 @@ -import { postAxios, getAxios } from '@/lib/http'; -export const positionApi = { - // 分页查询所有岗位 - getPositionListPage: data => { - return postAxios('/position/getListPage', data); - }, - // 更新岗位 - updatePosition: data => { - return postAxios('/position/update', data); - }, - // 添加岗位 - addPosition: data => { - return postAxios('/position/add', data); - }, - // 根据ID删除岗位 - deletePosition: id => { - return getAxios('/position/remove/' + id); - } -}; diff --git a/smart-admin-web/src/api/privilege.js b/smart-admin-web/src/api/privilege.js deleted file mode 100644 index 3530544c..00000000 --- a/smart-admin-web/src/api/privilege.js +++ /dev/null @@ -1,36 +0,0 @@ -import { postAxios, getAxios } from '@/lib/http'; - -export const privilegeApi = { - // 获取所有请求路径 - getAllUrl: data => { - return getAxios('/privilege/getAllUrl'); - }, - // 获取全部菜单列表 - getMenuList: data => { - return postAxios('/privilege/menu/queryAll'); - }, - // 菜单批量保存 - addBatchSaveMenu: data => { - return postAxios('/privilege/menu/batchSaveMenu', data); - }, - // 功能点批量保存 - addBatchSavePoints: data => { - return postAxios('/privilege/function/batchSave', data); - }, - // 查询菜单功能点 - queryPrivilegeFunctionList: menuKey => { - return postAxios('/privilege/function/query/' + menuKey); - }, - // 保存更新功能点 - addOrUpdate: data => { - return postAxios('/privilege/function/saveOrUpdate', data); - }, - // 更新角色权限 - getRolePower: data => { - return postAxios('/privilege/updateRolePrivilege', data); - }, - // 获取角色可选的功能权限 - getListPrivilegeByRoleId: id => { - return getAxios('/privilege/listPrivilegeByRoleId/' + id); - } -}; diff --git a/smart-admin-web/src/api/role.js b/smart-admin-web/src/api/role.js deleted file mode 100644 index be5f338a..00000000 --- a/smart-admin-web/src/api/role.js +++ /dev/null @@ -1,58 +0,0 @@ -import { postAxios, getAxios } from '@/lib/http'; -export const roleApi = { - // 添加角色 - addRole: (remark, roleName) => { - const data = { - remark: remark, - roleName: roleName - }; - return postAxios('/role/add', data); - }, - // 删除角色 - deleteRole: id => { - return getAxios('/role/delete/' + id); - }, - // 修改角色 - updateRole: (id, remark, roleName) => { - const data = { - id: id, - remark: remark, - roleName: roleName - }; - return postAxios('/role/update', data); - }, - // 获取角色数据 - getRoleDetail: id => { - return getAxios('/role/get/' + id); - }, - // 加载角色列表 - getAllRole: () => { - return getAxios('role/getAll'); - }, - // 根据角色名字获取对应成员列表 - getListEmployee: data => { - return postAxios('/role/listEmployee', data); - }, - // 根据角色id获取角色成员-员工列表 - getAllListEmployee: id => { - return getAxios('/role/listAllEmployee/' + id); - }, - // 从角色成员列表中移除员工 - deleteEmployeeRole: param => { - return getAxios('/role/removeEmployee?employeeId=' + param.employeeId + '&roleId=' + param.roleId); - }, - // 从角色成员列表中批量移除员工 - deleteEmployeeList: data => { - return postAxios('/role/removeEmployeeList', data); - }, - - // 添加角色成员方法 - addEmployeeListRole: data => { - return postAxios('/role/addEmployeeList', data); - }, - // 通过员工id获取所有角色以及员工具有的角色 - getRoles: id => { - return getAxios('/role/getRoles/' + id); - }, - -}; diff --git a/smart-admin-web/src/api/smart-reload.js b/smart-admin-web/src/api/smart-reload.js deleted file mode 100644 index 8ee701ed..00000000 --- a/smart-admin-web/src/api/smart-reload.js +++ /dev/null @@ -1,20 +0,0 @@ -// smartReloadAPI -import { - postAxios, - getAxios -} from '@/lib/http'; -export const smartReloadApi = { - // 查询所有 - getSmartReloadList: () => { - return getAxios('/smartReload/all'); - }, - // 更新单条数据 - updateSmartReloadData: (data) => { - return postAxios('/smartReload/update', data); - }, - // 获取执行结果 - getSmartReloadResult: (tag) => { - return getAxios(`/smartReload/result/${tag}`); - } - -}; diff --git a/smart-admin-web/src/api/system-config.js b/smart-admin-web/src/api/system-config.js deleted file mode 100644 index 392dd942..00000000 --- a/smart-admin-web/src/api/system-config.js +++ /dev/null @@ -1,31 +0,0 @@ -// 系统参数API -import { - postAxios, - getAxios -} from '@/lib/http'; -export const systemConfigApi = { - // 查询系统参数列表 - getSystemConfigList: (data) => { - return postAxios('/systemConfig/getListPage', data); - }, - // 添加系统参数 - addSystemConfig: (data) => { - return postAxios('/systemConfig/add', data); - }, - // 更新单条系统参数 - updateSystemConfig: (data) => { - return postAxios('/systemConfig/update', data); - }, - // 通过key获取对应的信息 - getConfigListByKey: (key) => { - return getAxios(`/systemConfig/selectByKey?configKey=${key}`); - }, - // 根据分组查询所有系统配置 - getListByGroup: (group) => { - return getAxios(`/systemConfig/getListByGroup?group=${group}`); - }, - // 获取系统版本信息 - getCodeVersion: () => { - return getAxios('/codeVersion'); - } -}; diff --git a/smart-admin-web/src/api/task-manage.js b/smart-admin-web/src/api/task-manage.js deleted file mode 100644 index 7e787862..00000000 --- a/smart-admin-web/src/api/task-manage.js +++ /dev/null @@ -1,35 +0,0 @@ -// 任务调度API -import { - postAxios, - getAxios -} from '@/lib/http'; -export const taskApi = { - // 查询任务列表 - getTaskList: (data) => { - return postAxios('/quartz/task/query', data); - }, - // 添加或更新任务 - addOrUpdateTask: (data) => { - return postAxios('/quartz/task/saveOrUpdate', data); - }, - // 查询任务日志 - getTaskLog: (data) => { - return postAxios('/quartz/task/queryLog', data); - }, - // 暂停任务 - updateTaskPause: (taskId) => { - return getAxios(`/quartz/task/pause/${taskId}`); - }, - // 运行任务 - updateTaskRun: (taskId) => { - return getAxios(`/quartz/task/run/${taskId}`); - }, - // 恢复任务 - updateTaskResume: (taskId) => { - return getAxios(`/quartz/task/resume/${taskId}`); - }, - // 删除任务 - deleteTask: (taskId) => { - return getAxios(`/quartz/task/delete/${taskId}`); - } -}; diff --git a/smart-admin-web/src/api/user-log.js b/smart-admin-web/src/api/user-log.js deleted file mode 100644 index eb3a3ad9..00000000 --- a/smart-admin-web/src/api/user-log.js +++ /dev/null @@ -1,28 +0,0 @@ -// 用户日志API -import { - postAxios, - getAxios -} from '@/lib/http.js'; -export const userLogApi = { - // 查询用户操作日志 - getUserOperateLogPage: (data) => { - return postAxios('/userOperateLog/page/query', data); - }, - // 用户操作日志详情 - detailUserOperateLog: (data) => { - return getAxios('/userOperateLog/detail/' + data); - }, - // 删除用户操作日志 - deleteUserOperateLog: (data) => { - return getAxios('/userOperateLog/delete/' + data); - }, - // 查询用户登录日志 - getUserLoginLogPage: (data) => { - return postAxios('/userLoginLog/page/query', data); - }, - // 删除用户登录日志 - deleteUserLoginLog: (data) => { - return getAxios('/userLoginLog/delete/' + data); - } - -}; diff --git a/smart-admin-web/src/api/user.js b/smart-admin-web/src/api/user.js deleted file mode 100644 index 8ac0a2a1..00000000 --- a/smart-admin-web/src/api/user.js +++ /dev/null @@ -1,20 +0,0 @@ -import { postAxios, getAxios } from '@/lib/http'; - -export const login = ({ userName, password }) => { - const data = { - userName, - password - }; - return postAxios('login', data); -}; - -export const getUserInfo = (token) => { - let params = { - token - }; - return getAxios('get_info', params); -}; - -export const logout = (token) => { - return postAxios('logout', {}); -}; diff --git a/smart-admin-web/src/assets/icons/demo.css b/smart-admin-web/src/assets/icons/demo.css deleted file mode 100644 index a67054a0..00000000 --- a/smart-admin-web/src/assets/icons/demo.css +++ /dev/null @@ -1,539 +0,0 @@ -/* Logo 字体 */ -@font-face { - font-family: "iconfont logo"; - src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834'); - src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'), - url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'), - url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'), - url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg'); -} - -.logo { - font-family: "iconfont logo"; - font-size: 160px; - font-style: normal; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -/* tabs */ -.nav-tabs { - position: relative; -} - -.nav-tabs .nav-more { - position: absolute; - right: 0; - bottom: 0; - height: 42px; - line-height: 42px; - color: #666; -} - -#tabs { - border-bottom: 1px solid #eee; -} - -#tabs li { - cursor: pointer; - width: 100px; - height: 40px; - line-height: 40px; - text-align: center; - font-size: 16px; - border-bottom: 2px solid transparent; - position: relative; - z-index: 1; - margin-bottom: -1px; - color: #666; -} - - -#tabs .active { - border-bottom-color: #f00; - color: #222; -} - -.tab-container .content { - display: none; -} - -/* 页面布局 */ -.main { - padding: 30px 100px; - width: 960px; - margin: 0 auto; -} - -.main .logo { - color: #333; - text-align: left; - margin-bottom: 30px; - line-height: 1; - height: 110px; - margin-top: -50px; - overflow: hidden; - *zoom: 1; -} - -.main .logo a { - font-size: 160px; - color: #333; -} - -.helps { - margin-top: 40px; -} - -.helps pre { - padding: 20px; - margin: 10px 0; - border: solid 1px #e7e1cd; - background-color: #fffdef; - overflow: auto; -} - -.icon_lists { - width: 100% !important; - overflow: hidden; - *zoom: 1; -} - -.icon_lists li { - width: 100px; - margin-bottom: 10px; - margin-right: 20px; - text-align: center; - list-style: none !important; - cursor: default; -} - -.icon_lists li .code-name { - line-height: 1.2; -} - -.icon_lists .icon { - display: block; - height: 100px; - line-height: 100px; - font-size: 42px; - margin: 10px auto; - color: #333; - -webkit-transition: font-size 0.25s linear, width 0.25s linear; - -moz-transition: font-size 0.25s linear, width 0.25s linear; - transition: font-size 0.25s linear, width 0.25s linear; -} - -.icon_lists .icon:hover { - font-size: 100px; -} - -.icon_lists .svg-icon { - /* 通过设置 font-size 来改变图标大小 */ - width: 1em; - /* 图标和文字相邻时,垂直对齐 */ - vertical-align: -0.15em; - /* 通过设置 color 来改变 SVG 的颜色/fill */ - fill: currentColor; - /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示 - normalize.css 中也包含这行 */ - overflow: hidden; -} - -.icon_lists li .name, -.icon_lists li .code-name { - color: #666; -} - -/* markdown 样式 */ -.markdown { - color: #666; - font-size: 14px; - line-height: 1.8; -} - -.highlight { - line-height: 1.5; -} - -.markdown img { - vertical-align: middle; - max-width: 100%; -} - -.markdown h1 { - color: #404040; - font-weight: 500; - line-height: 40px; - margin-bottom: 24px; -} - -.markdown h2, -.markdown h3, -.markdown h4, -.markdown h5, -.markdown h6 { - color: #404040; - margin: 1.6em 0 0.6em 0; - font-weight: 500; - clear: both; -} - -.markdown h1 { - font-size: 28px; -} - -.markdown h2 { - font-size: 22px; -} - -.markdown h3 { - font-size: 16px; -} - -.markdown h4 { - font-size: 14px; -} - -.markdown h5 { - font-size: 12px; -} - -.markdown h6 { - font-size: 12px; -} - -.markdown hr { - height: 1px; - border: 0; - background: #e9e9e9; - margin: 16px 0; - clear: both; -} - -.markdown p { - margin: 1em 0; -} - -.markdown>p, -.markdown>blockquote, -.markdown>.highlight, -.markdown>ol, -.markdown>ul { - width: 80%; -} - -.markdown ul>li { - list-style: circle; -} - -.markdown>ul li, -.markdown blockquote ul>li { - margin-left: 20px; - padding-left: 4px; -} - -.markdown>ul li p, -.markdown>ol li p { - margin: 0.6em 0; -} - -.markdown ol>li { - list-style: decimal; -} - -.markdown>ol li, -.markdown blockquote ol>li { - margin-left: 20px; - padding-left: 4px; -} - -.markdown code { - margin: 0 3px; - padding: 0 5px; - background: #eee; - border-radius: 3px; -} - -.markdown strong, -.markdown b { - font-weight: 600; -} - -.markdown>table { - border-collapse: collapse; - border-spacing: 0px; - empty-cells: show; - border: 1px solid #e9e9e9; - width: 95%; - margin-bottom: 24px; -} - -.markdown>table th { - white-space: nowrap; - color: #333; - font-weight: 600; -} - -.markdown>table th, -.markdown>table td { - border: 1px solid #e9e9e9; - padding: 8px 16px; - text-align: left; -} - -.markdown>table th { - background: #F7F7F7; -} - -.markdown blockquote { - font-size: 90%; - color: #999; - border-left: 4px solid #e9e9e9; - padding-left: 0.8em; - margin: 1em 0; -} - -.markdown blockquote p { - margin: 0; -} - -.markdown .anchor { - opacity: 0; - transition: opacity 0.3s ease; - margin-left: 8px; -} - -.markdown .waiting { - color: #ccc; -} - -.markdown h1:hover .anchor, -.markdown h2:hover .anchor, -.markdown h3:hover .anchor, -.markdown h4:hover .anchor, -.markdown h5:hover .anchor, -.markdown h6:hover .anchor { - opacity: 1; - display: inline-block; -} - -.markdown>br, -.markdown>p>br { - clear: both; -} - - -.hljs { - display: block; - background: white; - padding: 0.5em; - color: #333333; - overflow-x: auto; -} - -.hljs-comment, -.hljs-meta { - color: #969896; -} - -.hljs-string, -.hljs-variable, -.hljs-template-variable, -.hljs-strong, -.hljs-emphasis, -.hljs-quote { - color: #df5000; -} - -.hljs-keyword, -.hljs-selector-tag, -.hljs-type { - color: #a71d5d; -} - -.hljs-literal, -.hljs-symbol, -.hljs-bullet, -.hljs-attribute { - color: #0086b3; -} - -.hljs-section, -.hljs-name { - color: #63a35c; -} - -.hljs-tag { - color: #333333; -} - -.hljs-title, -.hljs-attr, -.hljs-selector-id, -.hljs-selector-class, -.hljs-selector-attr, -.hljs-selector-pseudo { - color: #795da3; -} - -.hljs-addition { - color: #55a532; - background-color: #eaffea; -} - -.hljs-deletion { - color: #bd2c00; - background-color: #ffecec; -} - -.hljs-link { - text-decoration: underline; -} - -/* 代码高亮 */ -/* PrismJS 1.15.0 -https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */ -/** - * prism.js default theme for JavaScript, CSS and HTML - * Based on dabblet (http://dabblet.com) - * @author Lea Verou - */ -code[class*="language-"], -pre[class*="language-"] { - color: black; - background: none; - text-shadow: 0 1px white; - font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - word-wrap: normal; - line-height: 1.5; - - -moz-tab-size: 4; - -o-tab-size: 4; - tab-size: 4; - - -webkit-hyphens: none; - -moz-hyphens: none; - -ms-hyphens: none; - hyphens: none; -} - -pre[class*="language-"]::-moz-selection, -pre[class*="language-"] ::-moz-selection, -code[class*="language-"]::-moz-selection, -code[class*="language-"] ::-moz-selection { - text-shadow: none; - background: #b3d4fc; -} - -pre[class*="language-"]::selection, -pre[class*="language-"] ::selection, -code[class*="language-"]::selection, -code[class*="language-"] ::selection { - text-shadow: none; - background: #b3d4fc; -} - -@media print { - - code[class*="language-"], - pre[class*="language-"] { - text-shadow: none; - } -} - -/* Code blocks */ -pre[class*="language-"] { - padding: 1em; - margin: .5em 0; - overflow: auto; -} - -:not(pre)>code[class*="language-"], -pre[class*="language-"] { - background: #f5f2f0; -} - -/* Inline code */ -:not(pre)>code[class*="language-"] { - padding: .1em; - border-radius: .3em; - white-space: normal; -} - -.token.comment, -.token.prolog, -.token.doctype, -.token.cdata { - color: slategray; -} - -.token.punctuation { - color: #999; -} - -.namespace { - opacity: .7; -} - -.token.property, -.token.tag, -.token.boolean, -.token.number, -.token.constant, -.token.symbol, -.token.deleted { - color: #905; -} - -.token.selector, -.token.attr-name, -.token.string, -.token.char, -.token.builtin, -.token.inserted { - color: #690; -} - -.token.operator, -.token.entity, -.token.url, -.language-css .token.string, -.style .token.string { - color: #9a6e3a; - background: hsla(0, 0%, 100%, .5); -} - -.token.atrule, -.token.attr-value, -.token.keyword { - color: #07a; -} - -.token.function, -.token.class-name { - color: #DD4A68; -} - -.token.regex, -.token.important, -.token.variable { - color: #e90; -} - -.token.important, -.token.bold { - font-weight: bold; -} - -.token.italic { - font-style: italic; -} - -.token.entity { - cursor: help; -} diff --git a/smart-admin-web/src/assets/icons/demo_index.html b/smart-admin-web/src/assets/icons/demo_index.html deleted file mode 100644 index 2c777b68..00000000 --- a/smart-admin-web/src/assets/icons/demo_index.html +++ /dev/null @@ -1,722 +0,0 @@ - - - - - IconFont Demo - - - - - - - - - - - -
-

- -
-
-
    - -
  • - -
    多级菜单
    -
    &#xe608;
    -
  • - -
  • - -
    导航展开
    -
    &#xe609;
    -
  • - -
  • - -
    导航折叠
    -
    &#xe60a;
    -
  • - -
  • - -
    向上箭头
    -
    &#xe60b;
    -
  • - -
  • - -
    向左箭头
    -
    &#xe60c;
    -
  • - -
  • - -
    向右箭头
    -
    &#xe60d;
    -
  • - -
  • - -
    关闭按钮
    -
    &#xe60e;
    -
  • - -
  • - -
    数据上传
    -
    &#xe60f;
    -
  • - -
  • - -
    系统监控
    -
    &#xe610;
    -
  • - -
  • - -
    邮件管理
    -
    &#xe611;
    -
  • - -
  • - -
    小屏
    -
    &#xe612;
    -
  • - -
  • - -
    人员管理
    -
    &#xe613;
    -
  • - -
  • - -
    向下拉
    -
    &#xe614;
    -
  • - -
  • - -
    excel导入导出
    -
    &#xe615;
    -
  • - -
  • - -
    向下箭头
    -
    &#xe616;
    -
  • - -
  • - -
    首页
    -
    &#xe617;
    -
  • - -
  • - -
    系统设置
    -
    &#xe618;
    -
  • - -
  • - -
    消息
    -
    &#xe619;
    -
  • - -
  • - -
    全屏
    -
    &#xe61a;
    -
  • - -
  • - -
    组件
    -
    &#xe61b;
    -
  • - -
  • - -
    news
    -
    &#xe61e;
    -
  • - -
  • - -
    定时任务
    -
    &#xe622;
    -
  • - -
  • - -
    动态加载
    -
    &#xe623;
    -
  • - -
  • - -
    接口文档
    -
    &#xe624;
    -
  • - -
-
-

Unicode 引用

-
- -

Unicode 是字体在网页端最原始的应用方式,特点是:

-
    -
  • 兼容性最好,支持 IE6+,及所有现代浏览器。
  • -
  • 支持按字体的方式去动态调整图标大小,颜色等等。
  • -
  • 但是因为是字体,所以不支持多色。只能使用平台里单色的图标,就算项目里有多色图标也会自动去色。
  • -
-
-

注意:新版 iconfont 支持多色图标,这些多色图标在 Unicode 模式下将不能使用,如果有需求建议使用symbol 的引用方式

-
-

Unicode 使用步骤如下:

-

第一步:拷贝项目下面生成的 @font-face

-
@font-face {
-  font-family: 'iconfont';
-  src: url('iconfont.eot');
-  src: url('iconfont.eot?#iefix') format('embedded-opentype'),
-      url('iconfont.woff2') format('woff2'),
-      url('iconfont.woff') format('woff'),
-      url('iconfont.ttf') format('truetype'),
-      url('iconfont.svg#iconfont') format('svg');
-}
-
-

第二步:定义使用 iconfont 的样式

-
.iconfont {
-  font-family: "iconfont" !important;
-  font-size: 16px;
-  font-style: normal;
-  -webkit-font-smoothing: antialiased;
-  -moz-osx-font-smoothing: grayscale;
-}
-
-

第三步:挑选相应图标并获取字体编码,应用于页面

-
-<span class="iconfont">&#x33;</span>
-
-
-

"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。

-
-
-
-
-
    - -
  • - -
    - 多级菜单 -
    -
    .iconduojicaidan -
    -
  • - -
  • - -
    - 导航展开 -
    -
    .icondaohangzhankai -
    -
  • - -
  • - -
    - 导航折叠 -
    -
    .icondaohangzhedie -
    -
  • - -
  • - -
    - 向上箭头 -
    -
    .iconxiangshangjiantou -
    -
  • - -
  • - -
    - 向左箭头 -
    -
    .iconxiangzuojiantou -
    -
  • - -
  • - -
    - 向右箭头 -
    -
    .iconxiangyoujiantou -
    -
  • - -
  • - -
    - 关闭按钮 -
    -
    .iconguanbianniu -
    -
  • - -
  • - -
    - 数据上传 -
    -
    .iconshujushangchuan -
    -
  • - -
  • - -
    - 系统监控 -
    -
    .iconxitongjiankong -
    -
  • - -
  • - -
    - 邮件管理 -
    -
    .iconyoujianguanli -
    -
  • - -
  • - -
    - 小屏 -
    -
    .iconxiaoping -
    -
  • - -
  • - -
    - 人员管理 -
    -
    .iconrenyuanguanli -
    -
  • - -
  • - -
    - 向下拉 -
    -
    .iconxiangxiala -
    -
  • - -
  • - -
    - excel导入导出 -
    -
    .iconexceldaorudaochu -
    -
  • - -
  • - -
    - 向下箭头 -
    -
    .iconxiangxiajiantou -
    -
  • - -
  • - -
    - 首页 -
    -
    .iconshouye -
    -
  • - -
  • - -
    - 系统设置 -
    -
    .iconxitongshezhi -
    -
  • - -
  • - -
    - 消息 -
    -
    .iconxiaoxi -
    -
  • - -
  • - -
    - 全屏 -
    -
    .iconquanping -
    -
  • - -
  • - -
    - 组件 -
    -
    .iconzujian -
    -
  • - -
  • - -
    - news -
    -
    .iconnews -
    -
  • - -
  • - -
    - 定时任务 -
    -
    .icondingshirenwu -
    -
  • - -
  • - -
    - 动态加载 -
    -
    .icondongtaijiazai -
    -
  • - -
  • - -
    - 接口文档 -
    -
    .iconjiekouwendang -
    -
  • - -
-
-

font-class 引用

-
- -

font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。

-

与 Unicode 使用方式相比,具有如下特点:

-
    -
  • 兼容性良好,支持 IE8+,及所有现代浏览器。
  • -
  • 相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。
  • -
  • 因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。
  • -
  • 不过因为本质上还是使用的字体,所以多色图标还是不支持的。
  • -
-

使用步骤如下:

-

第一步:引入项目下面生成的 fontclass 代码:

-
<link rel="stylesheet" href="./iconfont.css">
-
-

第二步:挑选相应图标并获取类名,应用于页面:

-
<span class="iconfont iconxxx"></span>
-
-
-

" - iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。

-
-
-
-
-
    - -
  • - -
    多级菜单
    -
    #iconduojicaidan
    -
  • - -
  • - -
    导航展开
    -
    #icondaohangzhankai
    -
  • - -
  • - -
    导航折叠
    -
    #icondaohangzhedie
    -
  • - -
  • - -
    向上箭头
    -
    #iconxiangshangjiantou
    -
  • - -
  • - -
    向左箭头
    -
    #iconxiangzuojiantou
    -
  • - -
  • - -
    向右箭头
    -
    #iconxiangyoujiantou
    -
  • - -
  • - -
    关闭按钮
    -
    #iconguanbianniu
    -
  • - -
  • - -
    数据上传
    -
    #iconshujushangchuan
    -
  • - -
  • - -
    系统监控
    -
    #iconxitongjiankong
    -
  • - -
  • - -
    邮件管理
    -
    #iconyoujianguanli
    -
  • - -
  • - -
    小屏
    -
    #iconxiaoping
    -
  • - -
  • - -
    人员管理
    -
    #iconrenyuanguanli
    -
  • - -
  • - -
    向下拉
    -
    #iconxiangxiala
    -
  • - -
  • - -
    excel导入导出
    -
    #iconexceldaorudaochu
    -
  • - -
  • - -
    向下箭头
    -
    #iconxiangxiajiantou
    -
  • - -
  • - -
    首页
    -
    #iconshouye
    -
  • - -
  • - -
    系统设置
    -
    #iconxitongshezhi
    -
  • - -
  • - -
    消息
    -
    #iconxiaoxi
    -
  • - -
  • - -
    全屏
    -
    #iconquanping
    -
  • - -
  • - -
    组件
    -
    #iconzujian
    -
  • - -
  • - -
    news
    -
    #iconnews
    -
  • - -
  • - -
    定时任务
    -
    #icondingshirenwu
    -
  • - -
  • - -
    动态加载
    -
    #icondongtaijiazai
    -
  • - -
  • - -
    接口文档
    -
    #iconjiekouwendang
    -
  • - -
-
-

Symbol 引用

-
- -

这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇文章 - 这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:

-
    -
  • 支持多色图标了,不再受单色限制。
  • -
  • 通过一些技巧,支持像字体那样,通过 font-size, color 来调整样式。
  • -
  • 兼容性较差,支持 IE9+,及现代浏览器。
  • -
  • 浏览器渲染 SVG 的性能一般,还不如 png。
  • -
-

使用步骤如下:

-

第一步:引入项目下面生成的 symbol 代码:

-
<script src="./iconfont.js"></script>
-
-

第二步:加入通用 CSS 代码(引入一次就行):

-
<style>
-.icon {
-  width: 1em;
-  height: 1em;
-  vertical-align: -0.15em;
-  fill: currentColor;
-  overflow: hidden;
-}
-</style>
-
-

第三步:挑选相应图标并获取类名,应用于页面:

-
<svg class="icon" aria-hidden="true">
-  <use xlink:href="#icon-xxx"></use>
-</svg>
-
-
-
- -
-
- - - diff --git a/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/demo.css b/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/demo.css deleted file mode 100644 index a67054a0..00000000 --- a/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/demo.css +++ /dev/null @@ -1,539 +0,0 @@ -/* Logo 字体 */ -@font-face { - font-family: "iconfont logo"; - src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834'); - src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'), - url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'), - url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'), - url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg'); -} - -.logo { - font-family: "iconfont logo"; - font-size: 160px; - font-style: normal; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -/* tabs */ -.nav-tabs { - position: relative; -} - -.nav-tabs .nav-more { - position: absolute; - right: 0; - bottom: 0; - height: 42px; - line-height: 42px; - color: #666; -} - -#tabs { - border-bottom: 1px solid #eee; -} - -#tabs li { - cursor: pointer; - width: 100px; - height: 40px; - line-height: 40px; - text-align: center; - font-size: 16px; - border-bottom: 2px solid transparent; - position: relative; - z-index: 1; - margin-bottom: -1px; - color: #666; -} - - -#tabs .active { - border-bottom-color: #f00; - color: #222; -} - -.tab-container .content { - display: none; -} - -/* 页面布局 */ -.main { - padding: 30px 100px; - width: 960px; - margin: 0 auto; -} - -.main .logo { - color: #333; - text-align: left; - margin-bottom: 30px; - line-height: 1; - height: 110px; - margin-top: -50px; - overflow: hidden; - *zoom: 1; -} - -.main .logo a { - font-size: 160px; - color: #333; -} - -.helps { - margin-top: 40px; -} - -.helps pre { - padding: 20px; - margin: 10px 0; - border: solid 1px #e7e1cd; - background-color: #fffdef; - overflow: auto; -} - -.icon_lists { - width: 100% !important; - overflow: hidden; - *zoom: 1; -} - -.icon_lists li { - width: 100px; - margin-bottom: 10px; - margin-right: 20px; - text-align: center; - list-style: none !important; - cursor: default; -} - -.icon_lists li .code-name { - line-height: 1.2; -} - -.icon_lists .icon { - display: block; - height: 100px; - line-height: 100px; - font-size: 42px; - margin: 10px auto; - color: #333; - -webkit-transition: font-size 0.25s linear, width 0.25s linear; - -moz-transition: font-size 0.25s linear, width 0.25s linear; - transition: font-size 0.25s linear, width 0.25s linear; -} - -.icon_lists .icon:hover { - font-size: 100px; -} - -.icon_lists .svg-icon { - /* 通过设置 font-size 来改变图标大小 */ - width: 1em; - /* 图标和文字相邻时,垂直对齐 */ - vertical-align: -0.15em; - /* 通过设置 color 来改变 SVG 的颜色/fill */ - fill: currentColor; - /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示 - normalize.css 中也包含这行 */ - overflow: hidden; -} - -.icon_lists li .name, -.icon_lists li .code-name { - color: #666; -} - -/* markdown 样式 */ -.markdown { - color: #666; - font-size: 14px; - line-height: 1.8; -} - -.highlight { - line-height: 1.5; -} - -.markdown img { - vertical-align: middle; - max-width: 100%; -} - -.markdown h1 { - color: #404040; - font-weight: 500; - line-height: 40px; - margin-bottom: 24px; -} - -.markdown h2, -.markdown h3, -.markdown h4, -.markdown h5, -.markdown h6 { - color: #404040; - margin: 1.6em 0 0.6em 0; - font-weight: 500; - clear: both; -} - -.markdown h1 { - font-size: 28px; -} - -.markdown h2 { - font-size: 22px; -} - -.markdown h3 { - font-size: 16px; -} - -.markdown h4 { - font-size: 14px; -} - -.markdown h5 { - font-size: 12px; -} - -.markdown h6 { - font-size: 12px; -} - -.markdown hr { - height: 1px; - border: 0; - background: #e9e9e9; - margin: 16px 0; - clear: both; -} - -.markdown p { - margin: 1em 0; -} - -.markdown>p, -.markdown>blockquote, -.markdown>.highlight, -.markdown>ol, -.markdown>ul { - width: 80%; -} - -.markdown ul>li { - list-style: circle; -} - -.markdown>ul li, -.markdown blockquote ul>li { - margin-left: 20px; - padding-left: 4px; -} - -.markdown>ul li p, -.markdown>ol li p { - margin: 0.6em 0; -} - -.markdown ol>li { - list-style: decimal; -} - -.markdown>ol li, -.markdown blockquote ol>li { - margin-left: 20px; - padding-left: 4px; -} - -.markdown code { - margin: 0 3px; - padding: 0 5px; - background: #eee; - border-radius: 3px; -} - -.markdown strong, -.markdown b { - font-weight: 600; -} - -.markdown>table { - border-collapse: collapse; - border-spacing: 0px; - empty-cells: show; - border: 1px solid #e9e9e9; - width: 95%; - margin-bottom: 24px; -} - -.markdown>table th { - white-space: nowrap; - color: #333; - font-weight: 600; -} - -.markdown>table th, -.markdown>table td { - border: 1px solid #e9e9e9; - padding: 8px 16px; - text-align: left; -} - -.markdown>table th { - background: #F7F7F7; -} - -.markdown blockquote { - font-size: 90%; - color: #999; - border-left: 4px solid #e9e9e9; - padding-left: 0.8em; - margin: 1em 0; -} - -.markdown blockquote p { - margin: 0; -} - -.markdown .anchor { - opacity: 0; - transition: opacity 0.3s ease; - margin-left: 8px; -} - -.markdown .waiting { - color: #ccc; -} - -.markdown h1:hover .anchor, -.markdown h2:hover .anchor, -.markdown h3:hover .anchor, -.markdown h4:hover .anchor, -.markdown h5:hover .anchor, -.markdown h6:hover .anchor { - opacity: 1; - display: inline-block; -} - -.markdown>br, -.markdown>p>br { - clear: both; -} - - -.hljs { - display: block; - background: white; - padding: 0.5em; - color: #333333; - overflow-x: auto; -} - -.hljs-comment, -.hljs-meta { - color: #969896; -} - -.hljs-string, -.hljs-variable, -.hljs-template-variable, -.hljs-strong, -.hljs-emphasis, -.hljs-quote { - color: #df5000; -} - -.hljs-keyword, -.hljs-selector-tag, -.hljs-type { - color: #a71d5d; -} - -.hljs-literal, -.hljs-symbol, -.hljs-bullet, -.hljs-attribute { - color: #0086b3; -} - -.hljs-section, -.hljs-name { - color: #63a35c; -} - -.hljs-tag { - color: #333333; -} - -.hljs-title, -.hljs-attr, -.hljs-selector-id, -.hljs-selector-class, -.hljs-selector-attr, -.hljs-selector-pseudo { - color: #795da3; -} - -.hljs-addition { - color: #55a532; - background-color: #eaffea; -} - -.hljs-deletion { - color: #bd2c00; - background-color: #ffecec; -} - -.hljs-link { - text-decoration: underline; -} - -/* 代码高亮 */ -/* PrismJS 1.15.0 -https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */ -/** - * prism.js default theme for JavaScript, CSS and HTML - * Based on dabblet (http://dabblet.com) - * @author Lea Verou - */ -code[class*="language-"], -pre[class*="language-"] { - color: black; - background: none; - text-shadow: 0 1px white; - font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - word-wrap: normal; - line-height: 1.5; - - -moz-tab-size: 4; - -o-tab-size: 4; - tab-size: 4; - - -webkit-hyphens: none; - -moz-hyphens: none; - -ms-hyphens: none; - hyphens: none; -} - -pre[class*="language-"]::-moz-selection, -pre[class*="language-"] ::-moz-selection, -code[class*="language-"]::-moz-selection, -code[class*="language-"] ::-moz-selection { - text-shadow: none; - background: #b3d4fc; -} - -pre[class*="language-"]::selection, -pre[class*="language-"] ::selection, -code[class*="language-"]::selection, -code[class*="language-"] ::selection { - text-shadow: none; - background: #b3d4fc; -} - -@media print { - - code[class*="language-"], - pre[class*="language-"] { - text-shadow: none; - } -} - -/* Code blocks */ -pre[class*="language-"] { - padding: 1em; - margin: .5em 0; - overflow: auto; -} - -:not(pre)>code[class*="language-"], -pre[class*="language-"] { - background: #f5f2f0; -} - -/* Inline code */ -:not(pre)>code[class*="language-"] { - padding: .1em; - border-radius: .3em; - white-space: normal; -} - -.token.comment, -.token.prolog, -.token.doctype, -.token.cdata { - color: slategray; -} - -.token.punctuation { - color: #999; -} - -.namespace { - opacity: .7; -} - -.token.property, -.token.tag, -.token.boolean, -.token.number, -.token.constant, -.token.symbol, -.token.deleted { - color: #905; -} - -.token.selector, -.token.attr-name, -.token.string, -.token.char, -.token.builtin, -.token.inserted { - color: #690; -} - -.token.operator, -.token.entity, -.token.url, -.language-css .token.string, -.style .token.string { - color: #9a6e3a; - background: hsla(0, 0%, 100%, .5); -} - -.token.atrule, -.token.attr-value, -.token.keyword { - color: #07a; -} - -.token.function, -.token.class-name { - color: #DD4A68; -} - -.token.regex, -.token.important, -.token.variable { - color: #e90; -} - -.token.important, -.token.bold { - font-weight: bold; -} - -.token.italic { - font-style: italic; -} - -.token.entity { - cursor: help; -} diff --git a/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/demo_index.html b/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/demo_index.html deleted file mode 100644 index 2c777b68..00000000 --- a/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/demo_index.html +++ /dev/null @@ -1,722 +0,0 @@ - - - - - IconFont Demo - - - - - - - - - - - -
-

- -
-
-
    - -
  • - -
    多级菜单
    -
    &#xe608;
    -
  • - -
  • - -
    导航展开
    -
    &#xe609;
    -
  • - -
  • - -
    导航折叠
    -
    &#xe60a;
    -
  • - -
  • - -
    向上箭头
    -
    &#xe60b;
    -
  • - -
  • - -
    向左箭头
    -
    &#xe60c;
    -
  • - -
  • - -
    向右箭头
    -
    &#xe60d;
    -
  • - -
  • - -
    关闭按钮
    -
    &#xe60e;
    -
  • - -
  • - -
    数据上传
    -
    &#xe60f;
    -
  • - -
  • - -
    系统监控
    -
    &#xe610;
    -
  • - -
  • - -
    邮件管理
    -
    &#xe611;
    -
  • - -
  • - -
    小屏
    -
    &#xe612;
    -
  • - -
  • - -
    人员管理
    -
    &#xe613;
    -
  • - -
  • - -
    向下拉
    -
    &#xe614;
    -
  • - -
  • - -
    excel导入导出
    -
    &#xe615;
    -
  • - -
  • - -
    向下箭头
    -
    &#xe616;
    -
  • - -
  • - -
    首页
    -
    &#xe617;
    -
  • - -
  • - -
    系统设置
    -
    &#xe618;
    -
  • - -
  • - -
    消息
    -
    &#xe619;
    -
  • - -
  • - -
    全屏
    -
    &#xe61a;
    -
  • - -
  • - -
    组件
    -
    &#xe61b;
    -
  • - -
  • - -
    news
    -
    &#xe61e;
    -
  • - -
  • - -
    定时任务
    -
    &#xe622;
    -
  • - -
  • - -
    动态加载
    -
    &#xe623;
    -
  • - -
  • - -
    接口文档
    -
    &#xe624;
    -
  • - -
-
-

Unicode 引用

-
- -

Unicode 是字体在网页端最原始的应用方式,特点是:

-
    -
  • 兼容性最好,支持 IE6+,及所有现代浏览器。
  • -
  • 支持按字体的方式去动态调整图标大小,颜色等等。
  • -
  • 但是因为是字体,所以不支持多色。只能使用平台里单色的图标,就算项目里有多色图标也会自动去色。
  • -
-
-

注意:新版 iconfont 支持多色图标,这些多色图标在 Unicode 模式下将不能使用,如果有需求建议使用symbol 的引用方式

-
-

Unicode 使用步骤如下:

-

第一步:拷贝项目下面生成的 @font-face

-
@font-face {
-  font-family: 'iconfont';
-  src: url('iconfont.eot');
-  src: url('iconfont.eot?#iefix') format('embedded-opentype'),
-      url('iconfont.woff2') format('woff2'),
-      url('iconfont.woff') format('woff'),
-      url('iconfont.ttf') format('truetype'),
-      url('iconfont.svg#iconfont') format('svg');
-}
-
-

第二步:定义使用 iconfont 的样式

-
.iconfont {
-  font-family: "iconfont" !important;
-  font-size: 16px;
-  font-style: normal;
-  -webkit-font-smoothing: antialiased;
-  -moz-osx-font-smoothing: grayscale;
-}
-
-

第三步:挑选相应图标并获取字体编码,应用于页面

-
-<span class="iconfont">&#x33;</span>
-
-
-

"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。

-
-
-
-
-
    - -
  • - -
    - 多级菜单 -
    -
    .iconduojicaidan -
    -
  • - -
  • - -
    - 导航展开 -
    -
    .icondaohangzhankai -
    -
  • - -
  • - -
    - 导航折叠 -
    -
    .icondaohangzhedie -
    -
  • - -
  • - -
    - 向上箭头 -
    -
    .iconxiangshangjiantou -
    -
  • - -
  • - -
    - 向左箭头 -
    -
    .iconxiangzuojiantou -
    -
  • - -
  • - -
    - 向右箭头 -
    -
    .iconxiangyoujiantou -
    -
  • - -
  • - -
    - 关闭按钮 -
    -
    .iconguanbianniu -
    -
  • - -
  • - -
    - 数据上传 -
    -
    .iconshujushangchuan -
    -
  • - -
  • - -
    - 系统监控 -
    -
    .iconxitongjiankong -
    -
  • - -
  • - -
    - 邮件管理 -
    -
    .iconyoujianguanli -
    -
  • - -
  • - -
    - 小屏 -
    -
    .iconxiaoping -
    -
  • - -
  • - -
    - 人员管理 -
    -
    .iconrenyuanguanli -
    -
  • - -
  • - -
    - 向下拉 -
    -
    .iconxiangxiala -
    -
  • - -
  • - -
    - excel导入导出 -
    -
    .iconexceldaorudaochu -
    -
  • - -
  • - -
    - 向下箭头 -
    -
    .iconxiangxiajiantou -
    -
  • - -
  • - -
    - 首页 -
    -
    .iconshouye -
    -
  • - -
  • - -
    - 系统设置 -
    -
    .iconxitongshezhi -
    -
  • - -
  • - -
    - 消息 -
    -
    .iconxiaoxi -
    -
  • - -
  • - -
    - 全屏 -
    -
    .iconquanping -
    -
  • - -
  • - -
    - 组件 -
    -
    .iconzujian -
    -
  • - -
  • - -
    - news -
    -
    .iconnews -
    -
  • - -
  • - -
    - 定时任务 -
    -
    .icondingshirenwu -
    -
  • - -
  • - -
    - 动态加载 -
    -
    .icondongtaijiazai -
    -
  • - -
  • - -
    - 接口文档 -
    -
    .iconjiekouwendang -
    -
  • - -
-
-

font-class 引用

-
- -

font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。

-

与 Unicode 使用方式相比,具有如下特点:

-
    -
  • 兼容性良好,支持 IE8+,及所有现代浏览器。
  • -
  • 相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。
  • -
  • 因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。
  • -
  • 不过因为本质上还是使用的字体,所以多色图标还是不支持的。
  • -
-

使用步骤如下:

-

第一步:引入项目下面生成的 fontclass 代码:

-
<link rel="stylesheet" href="./iconfont.css">
-
-

第二步:挑选相应图标并获取类名,应用于页面:

-
<span class="iconfont iconxxx"></span>
-
-
-

" - iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。

-
-
-
-
-
    - -
  • - -
    多级菜单
    -
    #iconduojicaidan
    -
  • - -
  • - -
    导航展开
    -
    #icondaohangzhankai
    -
  • - -
  • - -
    导航折叠
    -
    #icondaohangzhedie
    -
  • - -
  • - -
    向上箭头
    -
    #iconxiangshangjiantou
    -
  • - -
  • - -
    向左箭头
    -
    #iconxiangzuojiantou
    -
  • - -
  • - -
    向右箭头
    -
    #iconxiangyoujiantou
    -
  • - -
  • - -
    关闭按钮
    -
    #iconguanbianniu
    -
  • - -
  • - -
    数据上传
    -
    #iconshujushangchuan
    -
  • - -
  • - -
    系统监控
    -
    #iconxitongjiankong
    -
  • - -
  • - -
    邮件管理
    -
    #iconyoujianguanli
    -
  • - -
  • - -
    小屏
    -
    #iconxiaoping
    -
  • - -
  • - -
    人员管理
    -
    #iconrenyuanguanli
    -
  • - -
  • - -
    向下拉
    -
    #iconxiangxiala
    -
  • - -
  • - -
    excel导入导出
    -
    #iconexceldaorudaochu
    -
  • - -
  • - -
    向下箭头
    -
    #iconxiangxiajiantou
    -
  • - -
  • - -
    首页
    -
    #iconshouye
    -
  • - -
  • - -
    系统设置
    -
    #iconxitongshezhi
    -
  • - -
  • - -
    消息
    -
    #iconxiaoxi
    -
  • - -
  • - -
    全屏
    -
    #iconquanping
    -
  • - -
  • - -
    组件
    -
    #iconzujian
    -
  • - -
  • - -
    news
    -
    #iconnews
    -
  • - -
  • - -
    定时任务
    -
    #icondingshirenwu
    -
  • - -
  • - -
    动态加载
    -
    #icondongtaijiazai
    -
  • - -
  • - -
    接口文档
    -
    #iconjiekouwendang
    -
  • - -
-
-

Symbol 引用

-
- -

这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇文章 - 这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:

-
    -
  • 支持多色图标了,不再受单色限制。
  • -
  • 通过一些技巧,支持像字体那样,通过 font-size, color 来调整样式。
  • -
  • 兼容性较差,支持 IE9+,及现代浏览器。
  • -
  • 浏览器渲染 SVG 的性能一般,还不如 png。
  • -
-

使用步骤如下:

-

第一步:引入项目下面生成的 symbol 代码:

-
<script src="./iconfont.js"></script>
-
-

第二步:加入通用 CSS 代码(引入一次就行):

-
<style>
-.icon {
-  width: 1em;
-  height: 1em;
-  vertical-align: -0.15em;
-  fill: currentColor;
-  overflow: hidden;
-}
-</style>
-
-

第三步:挑选相应图标并获取类名,应用于页面:

-
<svg class="icon" aria-hidden="true">
-  <use xlink:href="#icon-xxx"></use>
-</svg>
-
-
-
- -
-
- - - diff --git a/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/iconfont.css b/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/iconfont.css deleted file mode 100644 index 8c269496..00000000 --- a/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/iconfont.css +++ /dev/null @@ -1,113 +0,0 @@ -@font-face {font-family: "iconfont"; - src: url('iconfont.eot?t=1567826173562'); /* IE9 */ - src: url('iconfont.eot?t=1567826173562#iefix') format('embedded-opentype'), /* IE6-IE8 */ - url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAABHoAAsAAAAAIcQAABGZAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCFQgqxHKV3ATYCJANkCzQABCAFhG0HgwcbIhsz0lHSipfsvzrgDeWN7mGGx2JaRxQWOkpQJ+9hJazgItaLPcwpUZjctwwMwn32fdA/7fc65wH9uwFmC0AS0YjYAkpdpbdkRALgB9rmvwvqjjjibCS0WRH24uxVgPoHzvgTV+3WLCJgxSpc909x1aCL/oD1o2DwveqTnXtKFj/F4Ai0nQP9lPymv8FgwfLOe5AHNUCwbFo3p3Col70hz/7y03M0QLrSh6Tr/9ZSe1sGj1tCYWLlzOxecn92JrnZ4NyWNsQbniuCCqhGFUji87ch3iK4pArYkTQVslpWOF+DsZmHi36zcKJg4ph+9P0hoKCNEbSytnNCRoRBhQavTw9XZKl0ojsLRZaaUIaM0HeIyYIPqAv45v9+/WdKGQTEIUafB/ertyz4zPeEb0Fy6obAFCeB3XAQAiNABPpJdT6HIYz4VkHzRlwCmekfgG/20T72/V1orM2rw/BUZMaYTsh/4AWERMQkpGTkFJQwHGWUU0ElVVRTQy111NMASjDqG4Am9PIG8Jm9EQKfG7PPCgjCKythIyLwthExeIf1nfgybEQKvpwillWAAlYJClgVKGDVoIDVgAJWCwpYHShg9aCANYAC1ggKWBMoYM2ggLWBAtYFClg3KGA9AJAHNLpDTAH3kJVB/oTBf/kyITanSotITkusdIkiWOGSlhE5UdKiyMvMVRiWOZFaJBww52YbbVkVoVl+qqmrqdWgzVwly4VN7ROqtq/f7Oq0K1WNFlWNHqfNg15LKxwXp8rcHpF1nfIWS6zbKO8goRvTiAXJmnw4D5QM/ncuQPUsovGQhq4QlJR522I3JIFtWQOTGk7fUfScFMgVZKYv+Ry+8MN0Xps//VQMdaS/LPV1WxDN4h78uxC1112QBPlwUIMfZy76HNL4EZ3X5U8/GUMtkU7BEwFE1BP7mSPWXt4Y3jMPKFffJ+7EzcZ+yQ5kD6h7YaO2t0LJPtEU3C3IoWccR94NmjJZRGP30L9VS9R9aYMZJYdx64+ae5RyBQDCmTSyERkFgoeaWSBpJTwpXF9xDlQqTqlkWRNVLtuuotJgH6/dgvT2iGdLpvTpqPa655YflHv1mnTnhzwPbDcevyc4JwJXq9lK5ULZLms2sU6COXxkhWapyDRFGRX8tiIpjc0W5wg5uCe2k4yJ6gYwcbaIu1J2RimMs0PN0Dd5vjZ2u0gOIS89fiPjE/xd/7rUt6atnN/wrjog0V4Zl7B33WfT9xcfPX7/B6mTs8IPpDtnjp27rwifh+kzNU52h6TxBGMb4gcPGAspvTZiwy6mWPXRsHVZ5XeF4ND/uvDKwI3BwzSkMcZdV4eulYkWwNE5KlsfXR+Cl4e8P3z9vMkI/j2mUlLuomu+T1N4B9e5PqSeckUEp+mH/arGfFaNqVQ2ygEf8PjfSKm0a5rGge1Fikhxrft5VF6fKh8O7ryvocGmMptfphrGA3kjpj9CtcCCMUMX4SD/0QTEOO9kxmApPW0pz+m6ALYRxBjXOLl5XYi+yjBFkp3n9WVKYVep2BRdhSXKXKGKPI0RNVHKNBWUBUtIQ+IC0mSggmG5OhahDkRO44gZSEasb6JoqjHd3+X5J4MEvvcruvB0sPz7ztWhewM2fH90fcqOGiImW6LMhJTb/vk+NH4uyjp43AJsnenBudxrSwipwnjJDSj0BqXgb1Sies4BEHWb9yY1WHsZ0jglLZueLKfaUzWB96yEhc3xnSzXfJ247Igrjh4ddQYAXbuBEKSVAtT9XQmQF8FEIRqMVEUxoHsEtFGuCq5p+pGCIVWq23UVwBgVRQL7samax/fjZ96U+7WW8t5W+ndUBy3eu8u6+odVIq9pubabX+KwEHoT6Tmoks7PJ1pT8otpj61j9ehjfPf7RG50jIyPq2XBNIvtt77GP/vIdAuw2OcxDID9b6c70oUh31YoLPQFq37SmGoAu3/l/rIMWniImFZaGbSm8o1XgoGdj5ONPUlT6mE8WVd4tSmZaxv2xRa6+yijHrmhnn+AXfPeN03Mzbcljof4zzItfWhzWmVBvOhac6bYPvyrIy80P2WPexJ9KgoQpdjOgITSV2IaDfYqoXCJZqht03Xw30hFrnAV1NNN/E6QcY6oNPTbArNB2Pj2qVOwiglDfQMxSdVF9ZGdDYjqJeF1TWuYUErG8+S5fQIi8AX3CbBpSZ7Pd2EM+qRheFr39yh17HVN3zRsUP9maTPtGe8bsaf0GXb1QcL3ixBi1yVPNJVH8WzCe0GHJAWEriMeADCEAMrjt4c6XUOwMsEEJYS0c682VeNc83gFGaJ0LPRlwjUVTNDIQKZSUC5sr8yYBdds/pk6EKZLirxVK/lB+GZ5eVU/jecpUuMwjd0QgPQ8beA29jEZB+8rswpmX+Vksbv2Eel1F4vdvHxgV09jUBXZfUjntnrvae/fWp69Wf3Ak149Gh+f5xzgK0QY9gxjRuOVQWrG72WVhxVafVR9770hKd0voS3P42mWtB3C8QMwZe5cqr/bxpIpDXcmMyzQwDnIrl+B7RG+MQ2OzN00LD57bcCTd72Mx85ywJzxFffxjJ2t2n3RQpFUsovrPU3/Vue8OmC8s7gErsk93oE8fjXu6bZodGYoE+/8FCKfSNw6kVMoi3nh2GWc2HOPVUSzvMvWuXtKu5JMiZG4C8l2AQ0EVhAgVYfgR+lM+ojmCJPJHKE7diaQHEfpo3AiXtAUW3Pk7oNBn//xK3RQv4IL8MtMkLmMp+qaQy6gZhZRZfxlQXNSloCXJUEq2uju3hk1/gTfjBneQhqyJMEDD9ShAYGZ6uaQC/QUMvVFc0KWsF5gPp7+JtJwaPg+J5fp1kA7BgQYxpvoZZjAAAfdMH/+61jQ78zJKVAGHKZ93RhfolPspw8P8NFD9UlaNmUYT2ID0y3kzs0Y+NSXEDptDayTCkKrizE5Nq0DeNPI/Rb6jfeMcCXn3WL5yJoqqxcydlbF1Wz7qgkJ6ourrMpiSeWaWVWIiVwUvgfdxZZJ0BcpnT5zMML3h/pOKA96lqujZLSmNGHQocJiY5++BRG7YrOrBiVM//GZI0q93HNQecIX6uebkWkzkVLo23Rs8H8fKJDnRg0bFpUnz98qL4jKHT48Wa9AvjVfnkeZsS0qkhdBnhegj+EC3tqauICdb2u9h5/D29qcd+58a9uuU+ja14lMUcyMxK+8WHVJ4t+SL4maub+mfeGpBBCO3RDF9bXJlBXx064k/sNTMa+S/6H/I/KqS/5O/Cr9mhg/NpYvimgSZDCVhjJpNiEBulMv+zn7FODncTBnOG6y3gUvAmvO7xeFC8rkKs5SV2OXRtdSSnx6o03R9Y/1r36a7lF2UXqmf1vX7/yB8/vB8tyf5EkOOIwJyG6JugrVkqsnu8bax8wR18DVqLcD7Q7H4SeveJTM73DYY7ue3Dl74KPIqxKr5OrNDrElrj/Jl1Qza+zkUnq11qzId+9IIMkbApG3tcXItBmIRZ9cMu7zh5Ga2eeRSfQf9WPoMI5ASJGccFkdjc50HpsuUN3Mpgb8XJ5cgqKWGTNKZuYhFgvkmchtlofE3wteLsHDBHG3DQqGn5hyiwVJ+ivGTuWpLryBFSrAHxkQgkOx27+zvn4ohaRBQw82KssLCyhO27Yh0vPtDE8p/fbN1Vk4zZG5pDjh13RsJxZp1Bo/gTGHcRbNybJuHqMtx1knsOLEmjlFhmcEp5N2zKbqLBrnhFyiMVswuUN7SVZPPDKwBg05QrNwTq+aRUtXsDoht9RyTFOhvybFW7qpjgJ5paE+opwc0T1vw1xeOW9Yr/wNcyHt4RQb92p/s7vfb8Wl9Rwb9Cs6zPeSp/ke4jDhd+UeUmw5I+uaOzx3gZYws8RP+MgDfA9ZQWrAtfuII/9f08HpI+xkgGh3AjyOBhVc4CDpSm1I2sn3kRzSS2qOj5yyxSJgJyvJaL4VBJfwOu8km+/jQ8PWdf4H//d/9Nkw2Lgc69r/dYgKPc70WxSf0mN8ZtNdZNHATselKparf1d82UDTldbyqwOMI1gxmaZO2SruqF2LLoXfvpHZ7BBfmr9rBVfFMKbMGNaIwcZaQP9AsnMQuzqrABlSjhSayG1WgMSfVNZjTLk4tNqQjtVqbqvfo7ZLEXpGF+Yah75TPW/vyjAYYQMTocSEV8PNjTAqIqZHJTahJtRqyEBrNXfU77BxlyNwbHGMSBtex/5+1E0VhW5RYvePJlmiVTMjYPodqbgC4ppO3FBJBWeyI2YNPLt1Xhw81q4b1CsPlxRWZOWdlLynWJVb9upmZUfeuSFBNxxnnXn8fh+nBe83ddrnmBsveqxba9S2w6SpkqzcU+JJ9vGJOAP93kFd3itgs4zy8VsQ6wguufAiVaU0SeaJTSoj/MxfGDYSsY7ZUiJnJTggl1Eq7WBUM1RO1NY6vWQt6QvxkfhyrNPqUPE627/n2Dkj8BDDuVvKR5Rv4Q7/7n2t003UEh6WCJ+47qj5FY1SGs7C8SrfL7WkhwnnMf7RHj4M/F9eE8VNvtcr/INZ+OuLZTnrB8Q4GwP1okCjoFU2aeiTswW7WfUhomfiThVaoXxx2mI59xT7rHPMj8JfTgtHfSRGmlPDpDQZtfi2Mj8XFTNIt5WpP98HgYeasF4ZJ1Hm52BIXm4nwJFH+y8IQDhOQAl8nFnPqIEftENb19goPWWzrUMGaocNoIa+EIkE1I2G0oR0bIAEzc0FHeO/DuUj1prkfO6UcWusXDaGxu/1qLVQfj13SqGs+wlqq96cMdOcLrMTfztlxVuMYc87/hyG3Fx74v6p9BuK2oznYSsLh6eXY2x4gFqWLLSgQ9A1K7DSn9iRiOY7qJ52QiSYIoDwJv4UflANN4K+bAoHvTvRrv0rmi7DdLjchG6OvCg/xJ3OPVS+QtubtNNNmJLH87gRzxahr2n3NT0Vl6J7GaN7Xu4ZbbIilwN0jPa6VNCPBibmg9mC5CH5ZnO+hzaAoDOzpcclnosoJVxSSG0WL+yPl0VckV4BQxO1A+pggR32Pdfecg5zFoDvQDecFccIL8kjvYTWGu/nTJBrK0xKh8gkdDSZmhxCk8gx6cJiyTORblLfmnA7rZNILznbol17Q0QIISQo6PpH9Gy0i3aItjQuTVs6zs7dwXVwe2pNv6R/EdmFobcaHb+ziKDO/9b14MOVSdJIMDNn+8yZU6RuqdWrY5V6pfMrt0ayzC31G2chjBnzK5MUeWBOMEgMX+wseg0geNdJTEu0e1xH08aX1eFhKZiMLH9pPxZf1uY0hrNOPbXrHPoqzQ0iJmsXXkCnXO9xEIsTCXebTtbx8/7U4QhkCLyetvyRUVj75Y+tx9ot99uBiSs+mohF/0ncFdApfWrKRJ1/55L/JZ/3wp79v58brAvDNv+uNZnNP4BNxtPwa7KREY6f/17b6HBlOLRAXoICAGEWAgTB2CMBz7A4zWz+sczpGGEXB+QA7MpjoeFT2+ksIMGgs4EL3XQCNFA4PAlSmAAYIDgPAJJhoaYjQMFxHQUhXNcxoKBew6e6dRaEgFdnA4VgOgFFiHSMpA1e9LR5DaAZUvXsFRqqrJXFm6DhFzgpdEgm+8v+IEQsVLfkmq38hAqCiH5i4+7MVtlApfrQHgyKglQdKAPDiWeuH5eLpfWbGCpHG14DaHbXTRXPfkc0VNn2eZP79V/gpNDhzlEvO/5BiHjrihsJVwbt06qYjjoUNTbuDhNplX1goFLxQSQUZhkpanpnGRhO8A1K6gcXcjbLaiXd83JdXAYUGOPfqEChIsVKlCpTrkIlmZzKVK4KVapK1apRrepUrwY1qontrVCGRmOqq4PtIa8rNzhFucZ90gspwrnDA41XyMI8Jjme6dD08MvSnmTB1gk8430rlGP0kklDYXxR+aFDJiGQ+3zfgDDLAldcJNVYtDpA1Yu1EY0dpdAn6AwUQxNBgIWlHunhbvdbRE/Sw66NmtHD4HHBE9li9S+ICE5fDN3FzSpo4y7FKoA3t5V9yi5Z4x0YZKBmCDlJC5V8Ym40AgAA') format('woff2'), - url('iconfont.woff?t=1567826173562') format('woff'), - url('iconfont.ttf?t=1567826173562') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ - url('iconfont.svg?t=1567826173562#iconfont') format('svg'); /* iOS 4.1- */ -} - -.iconfont { - font-family: "iconfont" !important; - font-size: 16px; - font-style: normal; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.iconduojicaidan:before { - content: "\e608"; -} - -.icondaohangzhankai:before { - content: "\e609"; -} - -.icondaohangzhedie:before { - content: "\e60a"; -} - -.iconxiangshangjiantou:before { - content: "\e60b"; -} - -.iconxiangzuojiantou:before { - content: "\e60c"; -} - -.iconxiangyoujiantou:before { - content: "\e60d"; -} - -.iconguanbianniu:before { - content: "\e60e"; -} - -.iconshujushangchuan:before { - content: "\e60f"; -} - -.iconxitongjiankong:before { - content: "\e610"; -} - -.iconyoujianguanli:before { - content: "\e611"; -} - -.iconxiaoping:before { - content: "\e612"; -} - -.iconrenyuanguanli:before { - content: "\e613"; -} - -.iconxiangxiala:before { - content: "\e614"; -} - -.iconexceldaorudaochu:before { - content: "\e615"; -} - -.iconxiangxiajiantou:before { - content: "\e616"; -} - -.iconshouye:before { - content: "\e617"; -} - -.iconxitongshezhi:before { - content: "\e618"; -} - -.iconxiaoxi:before { - content: "\e619"; -} - -.iconquanping:before { - content: "\e61a"; -} - -.iconzujian:before { - content: "\e61b"; -} - -.iconnews:before { - content: "\e61e"; -} - -.icondingshirenwu:before { - content: "\e622"; -} - -.icondongtaijiazai:before { - content: "\e623"; -} - -.iconjiekouwendang:before { - content: "\e624"; -} - diff --git a/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/iconfont.eot b/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/iconfont.eot deleted file mode 100644 index cf0b3fbd..00000000 Binary files a/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/iconfont.eot and /dev/null differ diff --git a/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/iconfont.js b/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/iconfont.js deleted file mode 100644 index 6a3315a1..00000000 --- a/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/iconfont.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){var c,t='',h=(c=document.getElementsByTagName("script"))[c.length-1].getAttribute("data-injectcss");if(h&&!e.__iconfont__svg__cssinject__){e.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}!function(c){if(document.addEventListener)if(~["complete","loaded","interactive"].indexOf(document.readyState))setTimeout(c,0);else{var h=function(){document.removeEventListener("DOMContentLoaded",h,!1),c()};document.addEventListener("DOMContentLoaded",h,!1)}else document.attachEvent&&(a=c,o=e.document,l=!1,(i=function(){try{o.documentElement.doScroll("left")}catch(c){return void setTimeout(i,50)}t()})(),o.onreadystatechange=function(){"complete"==o.readyState&&(o.onreadystatechange=null,t())});function t(){l||(l=!0,a())}var a,o,l,i}(function(){var c,h;(c=document.createElement("div")).innerHTML=t,t=null,(h=c.getElementsByTagName("svg")[0])&&(h.setAttribute("aria-hidden","true"),h.style.position="absolute",h.style.width=0,h.style.height=0,h.style.overflow="hidden",function(c,h){h.firstChild?function(c,h){h.parentNode.insertBefore(c,h)}(c,h.firstChild):h.appendChild(c)}(h,document.body))})}(window); \ No newline at end of file diff --git a/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/iconfont.svg b/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/iconfont.svg deleted file mode 100644 index a349f5e2..00000000 --- a/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/iconfont.svg +++ /dev/null @@ -1,98 +0,0 @@ - - - - - -Created by iconfont - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/iconfont.ttf b/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/iconfont.ttf deleted file mode 100644 index 69587d9e..00000000 Binary files a/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/iconfont.ttf and /dev/null differ diff --git a/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/iconfont.woff b/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/iconfont.woff deleted file mode 100644 index fc0da088..00000000 Binary files a/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/iconfont.woff and /dev/null differ diff --git a/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/iconfont.woff2 b/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/iconfont.woff2 deleted file mode 100644 index 89c0d09e..00000000 Binary files a/smart-admin-web/src/assets/icons/download (4)/font_1299963_2zqwx2axi0j/iconfont.woff2 and /dev/null differ diff --git a/smart-admin-web/src/assets/icons/iconfont.css b/smart-admin-web/src/assets/icons/iconfont.css deleted file mode 100644 index 8c269496..00000000 --- a/smart-admin-web/src/assets/icons/iconfont.css +++ /dev/null @@ -1,113 +0,0 @@ -@font-face {font-family: "iconfont"; - src: url('iconfont.eot?t=1567826173562'); /* IE9 */ - src: url('iconfont.eot?t=1567826173562#iefix') format('embedded-opentype'), /* IE6-IE8 */ - url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAABHoAAsAAAAAIcQAABGZAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCFQgqxHKV3ATYCJANkCzQABCAFhG0HgwcbIhsz0lHSipfsvzrgDeWN7mGGx2JaRxQWOkpQJ+9hJazgItaLPcwpUZjctwwMwn32fdA/7fc65wH9uwFmC0AS0YjYAkpdpbdkRALgB9rmvwvqjjjibCS0WRH24uxVgPoHzvgTV+3WLCJgxSpc909x1aCL/oD1o2DwveqTnXtKFj/F4Ai0nQP9lPymv8FgwfLOe5AHNUCwbFo3p3Col70hz/7y03M0QLrSh6Tr/9ZSe1sGj1tCYWLlzOxecn92JrnZ4NyWNsQbniuCCqhGFUji87ch3iK4pArYkTQVslpWOF+DsZmHi36zcKJg4ph+9P0hoKCNEbSytnNCRoRBhQavTw9XZKl0ojsLRZaaUIaM0HeIyYIPqAv45v9+/WdKGQTEIUafB/ertyz4zPeEb0Fy6obAFCeB3XAQAiNABPpJdT6HIYz4VkHzRlwCmekfgG/20T72/V1orM2rw/BUZMaYTsh/4AWERMQkpGTkFJQwHGWUU0ElVVRTQy111NMASjDqG4Am9PIG8Jm9EQKfG7PPCgjCKythIyLwthExeIf1nfgybEQKvpwillWAAlYJClgVKGDVoIDVgAJWCwpYHShg9aCANYAC1ggKWBMoYM2ggLWBAtYFClg3KGA9AJAHNLpDTAH3kJVB/oTBf/kyITanSotITkusdIkiWOGSlhE5UdKiyMvMVRiWOZFaJBww52YbbVkVoVl+qqmrqdWgzVwly4VN7ROqtq/f7Oq0K1WNFlWNHqfNg15LKxwXp8rcHpF1nfIWS6zbKO8goRvTiAXJmnw4D5QM/ncuQPUsovGQhq4QlJR522I3JIFtWQOTGk7fUfScFMgVZKYv+Ry+8MN0Xps//VQMdaS/LPV1WxDN4h78uxC1112QBPlwUIMfZy76HNL4EZ3X5U8/GUMtkU7BEwFE1BP7mSPWXt4Y3jMPKFffJ+7EzcZ+yQ5kD6h7YaO2t0LJPtEU3C3IoWccR94NmjJZRGP30L9VS9R9aYMZJYdx64+ae5RyBQDCmTSyERkFgoeaWSBpJTwpXF9xDlQqTqlkWRNVLtuuotJgH6/dgvT2iGdLpvTpqPa655YflHv1mnTnhzwPbDcevyc4JwJXq9lK5ULZLms2sU6COXxkhWapyDRFGRX8tiIpjc0W5wg5uCe2k4yJ6gYwcbaIu1J2RimMs0PN0Dd5vjZ2u0gOIS89fiPjE/xd/7rUt6atnN/wrjog0V4Zl7B33WfT9xcfPX7/B6mTs8IPpDtnjp27rwifh+kzNU52h6TxBGMb4gcPGAspvTZiwy6mWPXRsHVZ5XeF4ND/uvDKwI3BwzSkMcZdV4eulYkWwNE5KlsfXR+Cl4e8P3z9vMkI/j2mUlLuomu+T1N4B9e5PqSeckUEp+mH/arGfFaNqVQ2ygEf8PjfSKm0a5rGge1Fikhxrft5VF6fKh8O7ryvocGmMptfphrGA3kjpj9CtcCCMUMX4SD/0QTEOO9kxmApPW0pz+m6ALYRxBjXOLl5XYi+yjBFkp3n9WVKYVep2BRdhSXKXKGKPI0RNVHKNBWUBUtIQ+IC0mSggmG5OhahDkRO44gZSEasb6JoqjHd3+X5J4MEvvcruvB0sPz7ztWhewM2fH90fcqOGiImW6LMhJTb/vk+NH4uyjp43AJsnenBudxrSwipwnjJDSj0BqXgb1Sies4BEHWb9yY1WHsZ0jglLZueLKfaUzWB96yEhc3xnSzXfJ247Igrjh4ddQYAXbuBEKSVAtT9XQmQF8FEIRqMVEUxoHsEtFGuCq5p+pGCIVWq23UVwBgVRQL7samax/fjZ96U+7WW8t5W+ndUBy3eu8u6+odVIq9pubabX+KwEHoT6Tmoks7PJ1pT8otpj61j9ehjfPf7RG50jIyPq2XBNIvtt77GP/vIdAuw2OcxDID9b6c70oUh31YoLPQFq37SmGoAu3/l/rIMWniImFZaGbSm8o1XgoGdj5ONPUlT6mE8WVd4tSmZaxv2xRa6+yijHrmhnn+AXfPeN03Mzbcljof4zzItfWhzWmVBvOhac6bYPvyrIy80P2WPexJ9KgoQpdjOgITSV2IaDfYqoXCJZqht03Xw30hFrnAV1NNN/E6QcY6oNPTbArNB2Pj2qVOwiglDfQMxSdVF9ZGdDYjqJeF1TWuYUErG8+S5fQIi8AX3CbBpSZ7Pd2EM+qRheFr39yh17HVN3zRsUP9maTPtGe8bsaf0GXb1QcL3ixBi1yVPNJVH8WzCe0GHJAWEriMeADCEAMrjt4c6XUOwMsEEJYS0c682VeNc83gFGaJ0LPRlwjUVTNDIQKZSUC5sr8yYBdds/pk6EKZLirxVK/lB+GZ5eVU/jecpUuMwjd0QgPQ8beA29jEZB+8rswpmX+Vksbv2Eel1F4vdvHxgV09jUBXZfUjntnrvae/fWp69Wf3Ak149Gh+f5xzgK0QY9gxjRuOVQWrG72WVhxVafVR9770hKd0voS3P42mWtB3C8QMwZe5cqr/bxpIpDXcmMyzQwDnIrl+B7RG+MQ2OzN00LD57bcCTd72Mx85ywJzxFffxjJ2t2n3RQpFUsovrPU3/Vue8OmC8s7gErsk93oE8fjXu6bZodGYoE+/8FCKfSNw6kVMoi3nh2GWc2HOPVUSzvMvWuXtKu5JMiZG4C8l2AQ0EVhAgVYfgR+lM+ojmCJPJHKE7diaQHEfpo3AiXtAUW3Pk7oNBn//xK3RQv4IL8MtMkLmMp+qaQy6gZhZRZfxlQXNSloCXJUEq2uju3hk1/gTfjBneQhqyJMEDD9ShAYGZ6uaQC/QUMvVFc0KWsF5gPp7+JtJwaPg+J5fp1kA7BgQYxpvoZZjAAAfdMH/+61jQ78zJKVAGHKZ93RhfolPspw8P8NFD9UlaNmUYT2ID0y3kzs0Y+NSXEDptDayTCkKrizE5Nq0DeNPI/Rb6jfeMcCXn3WL5yJoqqxcydlbF1Wz7qgkJ6ourrMpiSeWaWVWIiVwUvgfdxZZJ0BcpnT5zMML3h/pOKA96lqujZLSmNGHQocJiY5++BRG7YrOrBiVM//GZI0q93HNQecIX6uebkWkzkVLo23Rs8H8fKJDnRg0bFpUnz98qL4jKHT48Wa9AvjVfnkeZsS0qkhdBnhegj+EC3tqauICdb2u9h5/D29qcd+58a9uuU+ja14lMUcyMxK+8WHVJ4t+SL4maub+mfeGpBBCO3RDF9bXJlBXx064k/sNTMa+S/6H/I/KqS/5O/Cr9mhg/NpYvimgSZDCVhjJpNiEBulMv+zn7FODncTBnOG6y3gUvAmvO7xeFC8rkKs5SV2OXRtdSSnx6o03R9Y/1r36a7lF2UXqmf1vX7/yB8/vB8tyf5EkOOIwJyG6JugrVkqsnu8bax8wR18DVqLcD7Q7H4SeveJTM73DYY7ue3Dl74KPIqxKr5OrNDrElrj/Jl1Qza+zkUnq11qzId+9IIMkbApG3tcXItBmIRZ9cMu7zh5Ga2eeRSfQf9WPoMI5ASJGccFkdjc50HpsuUN3Mpgb8XJ5cgqKWGTNKZuYhFgvkmchtlofE3wteLsHDBHG3DQqGn5hyiwVJ+ivGTuWpLryBFSrAHxkQgkOx27+zvn4ohaRBQw82KssLCyhO27Yh0vPtDE8p/fbN1Vk4zZG5pDjh13RsJxZp1Bo/gTGHcRbNybJuHqMtx1knsOLEmjlFhmcEp5N2zKbqLBrnhFyiMVswuUN7SVZPPDKwBg05QrNwTq+aRUtXsDoht9RyTFOhvybFW7qpjgJ5paE+opwc0T1vw1xeOW9Yr/wNcyHt4RQb92p/s7vfb8Wl9Rwb9Cs6zPeSp/ke4jDhd+UeUmw5I+uaOzx3gZYws8RP+MgDfA9ZQWrAtfuII/9f08HpI+xkgGh3AjyOBhVc4CDpSm1I2sn3kRzSS2qOj5yyxSJgJyvJaL4VBJfwOu8km+/jQ8PWdf4H//d/9Nkw2Lgc69r/dYgKPc70WxSf0mN8ZtNdZNHATselKparf1d82UDTldbyqwOMI1gxmaZO2SruqF2LLoXfvpHZ7BBfmr9rBVfFMKbMGNaIwcZaQP9AsnMQuzqrABlSjhSayG1WgMSfVNZjTLk4tNqQjtVqbqvfo7ZLEXpGF+Yah75TPW/vyjAYYQMTocSEV8PNjTAqIqZHJTahJtRqyEBrNXfU77BxlyNwbHGMSBtex/5+1E0VhW5RYvePJlmiVTMjYPodqbgC4ppO3FBJBWeyI2YNPLt1Xhw81q4b1CsPlxRWZOWdlLynWJVb9upmZUfeuSFBNxxnnXn8fh+nBe83ddrnmBsveqxba9S2w6SpkqzcU+JJ9vGJOAP93kFd3itgs4zy8VsQ6wguufAiVaU0SeaJTSoj/MxfGDYSsY7ZUiJnJTggl1Eq7WBUM1RO1NY6vWQt6QvxkfhyrNPqUPE627/n2Dkj8BDDuVvKR5Rv4Q7/7n2t003UEh6WCJ+47qj5FY1SGs7C8SrfL7WkhwnnMf7RHj4M/F9eE8VNvtcr/INZ+OuLZTnrB8Q4GwP1okCjoFU2aeiTswW7WfUhomfiThVaoXxx2mI59xT7rHPMj8JfTgtHfSRGmlPDpDQZtfi2Mj8XFTNIt5WpP98HgYeasF4ZJ1Hm52BIXm4nwJFH+y8IQDhOQAl8nFnPqIEftENb19goPWWzrUMGaocNoIa+EIkE1I2G0oR0bIAEzc0FHeO/DuUj1prkfO6UcWusXDaGxu/1qLVQfj13SqGs+wlqq96cMdOcLrMTfztlxVuMYc87/hyG3Fx74v6p9BuK2oznYSsLh6eXY2x4gFqWLLSgQ9A1K7DSn9iRiOY7qJ52QiSYIoDwJv4UflANN4K+bAoHvTvRrv0rmi7DdLjchG6OvCg/xJ3OPVS+QtubtNNNmJLH87gRzxahr2n3NT0Vl6J7GaN7Xu4ZbbIilwN0jPa6VNCPBibmg9mC5CH5ZnO+hzaAoDOzpcclnosoJVxSSG0WL+yPl0VckV4BQxO1A+pggR32Pdfecg5zFoDvQDecFccIL8kjvYTWGu/nTJBrK0xKh8gkdDSZmhxCk8gx6cJiyTORblLfmnA7rZNILznbol17Q0QIISQo6PpH9Gy0i3aItjQuTVs6zs7dwXVwe2pNv6R/EdmFobcaHb+ziKDO/9b14MOVSdJIMDNn+8yZU6RuqdWrY5V6pfMrt0ayzC31G2chjBnzK5MUeWBOMEgMX+wseg0geNdJTEu0e1xH08aX1eFhKZiMLH9pPxZf1uY0hrNOPbXrHPoqzQ0iJmsXXkCnXO9xEIsTCXebTtbx8/7U4QhkCLyetvyRUVj75Y+tx9ot99uBiSs+mohF/0ncFdApfWrKRJ1/55L/JZ/3wp79v58brAvDNv+uNZnNP4BNxtPwa7KREY6f/17b6HBlOLRAXoICAGEWAgTB2CMBz7A4zWz+sczpGGEXB+QA7MpjoeFT2+ksIMGgs4EL3XQCNFA4PAlSmAAYIDgPAJJhoaYjQMFxHQUhXNcxoKBew6e6dRaEgFdnA4VgOgFFiHSMpA1e9LR5DaAZUvXsFRqqrJXFm6DhFzgpdEgm+8v+IEQsVLfkmq38hAqCiH5i4+7MVtlApfrQHgyKglQdKAPDiWeuH5eLpfWbGCpHG14DaHbXTRXPfkc0VNn2eZP79V/gpNDhzlEvO/5BiHjrihsJVwbt06qYjjoUNTbuDhNplX1goFLxQSQUZhkpanpnGRhO8A1K6gcXcjbLaiXd83JdXAYUGOPfqEChIsVKlCpTrkIlmZzKVK4KVapK1apRrepUrwY1qontrVCGRmOqq4PtIa8rNzhFucZ90gspwrnDA41XyMI8Jjme6dD08MvSnmTB1gk8430rlGP0kklDYXxR+aFDJiGQ+3zfgDDLAldcJNVYtDpA1Yu1EY0dpdAn6AwUQxNBgIWlHunhbvdbRE/Sw66NmtHD4HHBE9li9S+ICE5fDN3FzSpo4y7FKoA3t5V9yi5Z4x0YZKBmCDlJC5V8Ym40AgAA') format('woff2'), - url('iconfont.woff?t=1567826173562') format('woff'), - url('iconfont.ttf?t=1567826173562') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ - url('iconfont.svg?t=1567826173562#iconfont') format('svg'); /* iOS 4.1- */ -} - -.iconfont { - font-family: "iconfont" !important; - font-size: 16px; - font-style: normal; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.iconduojicaidan:before { - content: "\e608"; -} - -.icondaohangzhankai:before { - content: "\e609"; -} - -.icondaohangzhedie:before { - content: "\e60a"; -} - -.iconxiangshangjiantou:before { - content: "\e60b"; -} - -.iconxiangzuojiantou:before { - content: "\e60c"; -} - -.iconxiangyoujiantou:before { - content: "\e60d"; -} - -.iconguanbianniu:before { - content: "\e60e"; -} - -.iconshujushangchuan:before { - content: "\e60f"; -} - -.iconxitongjiankong:before { - content: "\e610"; -} - -.iconyoujianguanli:before { - content: "\e611"; -} - -.iconxiaoping:before { - content: "\e612"; -} - -.iconrenyuanguanli:before { - content: "\e613"; -} - -.iconxiangxiala:before { - content: "\e614"; -} - -.iconexceldaorudaochu:before { - content: "\e615"; -} - -.iconxiangxiajiantou:before { - content: "\e616"; -} - -.iconshouye:before { - content: "\e617"; -} - -.iconxitongshezhi:before { - content: "\e618"; -} - -.iconxiaoxi:before { - content: "\e619"; -} - -.iconquanping:before { - content: "\e61a"; -} - -.iconzujian:before { - content: "\e61b"; -} - -.iconnews:before { - content: "\e61e"; -} - -.icondingshirenwu:before { - content: "\e622"; -} - -.icondongtaijiazai:before { - content: "\e623"; -} - -.iconjiekouwendang:before { - content: "\e624"; -} - diff --git a/smart-admin-web/src/assets/icons/iconfont.eot b/smart-admin-web/src/assets/icons/iconfont.eot deleted file mode 100644 index cf0b3fbd..00000000 Binary files a/smart-admin-web/src/assets/icons/iconfont.eot and /dev/null differ diff --git a/smart-admin-web/src/assets/icons/iconfont.js b/smart-admin-web/src/assets/icons/iconfont.js deleted file mode 100644 index 6a3315a1..00000000 --- a/smart-admin-web/src/assets/icons/iconfont.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){var c,t='',h=(c=document.getElementsByTagName("script"))[c.length-1].getAttribute("data-injectcss");if(h&&!e.__iconfont__svg__cssinject__){e.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}!function(c){if(document.addEventListener)if(~["complete","loaded","interactive"].indexOf(document.readyState))setTimeout(c,0);else{var h=function(){document.removeEventListener("DOMContentLoaded",h,!1),c()};document.addEventListener("DOMContentLoaded",h,!1)}else document.attachEvent&&(a=c,o=e.document,l=!1,(i=function(){try{o.documentElement.doScroll("left")}catch(c){return void setTimeout(i,50)}t()})(),o.onreadystatechange=function(){"complete"==o.readyState&&(o.onreadystatechange=null,t())});function t(){l||(l=!0,a())}var a,o,l,i}(function(){var c,h;(c=document.createElement("div")).innerHTML=t,t=null,(h=c.getElementsByTagName("svg")[0])&&(h.setAttribute("aria-hidden","true"),h.style.position="absolute",h.style.width=0,h.style.height=0,h.style.overflow="hidden",function(c,h){h.firstChild?function(c,h){h.parentNode.insertBefore(c,h)}(c,h.firstChild):h.appendChild(c)}(h,document.body))})}(window); \ No newline at end of file diff --git a/smart-admin-web/src/assets/icons/iconfont.svg b/smart-admin-web/src/assets/icons/iconfont.svg deleted file mode 100644 index a349f5e2..00000000 --- a/smart-admin-web/src/assets/icons/iconfont.svg +++ /dev/null @@ -1,98 +0,0 @@ - - - - - -Created by iconfont - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/smart-admin-web/src/assets/icons/iconfont.ttf b/smart-admin-web/src/assets/icons/iconfont.ttf deleted file mode 100644 index 69587d9e..00000000 Binary files a/smart-admin-web/src/assets/icons/iconfont.ttf and /dev/null differ diff --git a/smart-admin-web/src/assets/icons/iconfont.woff b/smart-admin-web/src/assets/icons/iconfont.woff deleted file mode 100644 index fc0da088..00000000 Binary files a/smart-admin-web/src/assets/icons/iconfont.woff and /dev/null differ diff --git a/smart-admin-web/src/assets/icons/iconfont.woff2 b/smart-admin-web/src/assets/icons/iconfont.woff2 deleted file mode 100644 index 89c0d09e..00000000 Binary files a/smart-admin-web/src/assets/icons/iconfont.woff2 and /dev/null differ diff --git a/smart-admin-web/src/assets/images/default_icon.png b/smart-admin-web/src/assets/images/default_icon.png deleted file mode 100644 index 1e0872fd..00000000 Binary files a/smart-admin-web/src/assets/images/default_icon.png and /dev/null differ diff --git a/smart-admin-web/src/assets/images/error-page/error-401.svg b/smart-admin-web/src/assets/images/error-page/error-401.svg deleted file mode 100644 index 19e2f9fa..00000000 --- a/smart-admin-web/src/assets/images/error-page/error-401.svg +++ /dev/null @@ -1 +0,0 @@ -tasting \ No newline at end of file diff --git a/smart-admin-web/src/assets/images/error-page/error-404.svg b/smart-admin-web/src/assets/images/error-page/error-404.svg deleted file mode 100644 index 77d97f71..00000000 --- a/smart-admin-web/src/assets/images/error-page/error-404.svg +++ /dev/null @@ -1 +0,0 @@ -drone_delivery \ No newline at end of file diff --git a/smart-admin-web/src/assets/images/error-page/error-500.svg b/smart-admin-web/src/assets/images/error-page/error-500.svg deleted file mode 100644 index ef72fd32..00000000 --- a/smart-admin-web/src/assets/images/error-page/error-500.svg +++ /dev/null @@ -1 +0,0 @@ -co-working \ No newline at end of file diff --git a/smart-admin-web/src/assets/images/icon-qr-qq-wechat.png b/smart-admin-web/src/assets/images/icon-qr-qq-wechat.png deleted file mode 100644 index c5f6b185..00000000 Binary files a/smart-admin-web/src/assets/images/icon-qr-qq-wechat.png and /dev/null differ diff --git a/smart-admin-web/src/assets/images/icon-social-bilibili.svg b/smart-admin-web/src/assets/images/icon-social-bilibili.svg deleted file mode 100644 index d655a329..00000000 --- a/smart-admin-web/src/assets/images/icon-social-bilibili.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/smart-admin-web/src/assets/images/icon-social-juejin.svg b/smart-admin-web/src/assets/images/icon-social-juejin.svg deleted file mode 100644 index c0ad2aeb..00000000 --- a/smart-admin-web/src/assets/images/icon-social-juejin.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/smart-admin-web/src/assets/images/icon-social-twitter.svg b/smart-admin-web/src/assets/images/icon-social-twitter.svg deleted file mode 100644 index cef3ec09..00000000 --- a/smart-admin-web/src/assets/images/icon-social-twitter.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/smart-admin-web/src/assets/images/icon-social-zhihu.svg b/smart-admin-web/src/assets/images/icon-social-zhihu.svg deleted file mode 100644 index 3a82ca82..00000000 --- a/smart-admin-web/src/assets/images/icon-social-zhihu.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/smart-admin-web/src/assets/images/login-alipay.png b/smart-admin-web/src/assets/images/login-alipay.png deleted file mode 100644 index 7d9f0306..00000000 Binary files a/smart-admin-web/src/assets/images/login-alipay.png and /dev/null differ diff --git a/smart-admin-web/src/assets/images/login-bg.jpg b/smart-admin-web/src/assets/images/login-bg.jpg deleted file mode 100644 index 04c27b4f..00000000 Binary files a/smart-admin-web/src/assets/images/login-bg.jpg and /dev/null differ diff --git a/smart-admin-web/src/assets/images/login-logo.png b/smart-admin-web/src/assets/images/login-logo.png deleted file mode 100644 index 61765e6d..00000000 Binary files a/smart-admin-web/src/assets/images/login-logo.png and /dev/null differ diff --git a/smart-admin-web/src/assets/images/login-sina.png b/smart-admin-web/src/assets/images/login-sina.png deleted file mode 100644 index 950619fd..00000000 Binary files a/smart-admin-web/src/assets/images/login-sina.png and /dev/null differ diff --git a/smart-admin-web/src/assets/images/login-taobao.png b/smart-admin-web/src/assets/images/login-taobao.png deleted file mode 100644 index ecaa608a..00000000 Binary files a/smart-admin-web/src/assets/images/login-taobao.png and /dev/null differ diff --git a/smart-admin-web/src/assets/images/login_desc_bg.png b/smart-admin-web/src/assets/images/login_desc_bg.png deleted file mode 100644 index 70d8d62f..00000000 Binary files a/smart-admin-web/src/assets/images/login_desc_bg.png and /dev/null differ diff --git a/smart-admin-web/src/assets/images/login_logo.png b/smart-admin-web/src/assets/images/login_logo.png deleted file mode 100644 index 2955b838..00000000 Binary files a/smart-admin-web/src/assets/images/login_logo.png and /dev/null differ diff --git a/smart-admin-web/src/assets/images/logo.png b/smart-admin-web/src/assets/images/logo.png deleted file mode 100644 index 829056cc..00000000 Binary files a/smart-admin-web/src/assets/images/logo.png and /dev/null differ diff --git a/smart-admin-web/src/assets/images/logo1.png b/smart-admin-web/src/assets/images/logo1.png deleted file mode 100644 index f338302e..00000000 Binary files a/smart-admin-web/src/assets/images/logo1.png and /dev/null differ diff --git a/smart-admin-web/src/assets/images/message.png b/smart-admin-web/src/assets/images/message.png deleted file mode 100644 index b713953e..00000000 Binary files a/smart-admin-web/src/assets/images/message.png and /dev/null differ diff --git a/smart-admin-web/src/assets/images/shadow.png b/smart-admin-web/src/assets/images/shadow.png deleted file mode 100644 index 79cc097f..00000000 Binary files a/smart-admin-web/src/assets/images/shadow.png and /dev/null differ diff --git a/smart-admin-web/src/assets/images/slider/sub_slider_active.png b/smart-admin-web/src/assets/images/slider/sub_slider_active.png deleted file mode 100644 index bc2ec9aa..00000000 Binary files a/smart-admin-web/src/assets/images/slider/sub_slider_active.png and /dev/null differ diff --git a/smart-admin-web/src/assets/images/slider/sub_slider_default.png b/smart-admin-web/src/assets/images/slider/sub_slider_default.png deleted file mode 100644 index 67a4f279..00000000 Binary files a/smart-admin-web/src/assets/images/slider/sub_slider_default.png and /dev/null differ diff --git a/smart-admin-web/src/assets/style/lib/animate.css b/smart-admin-web/src/assets/style/lib/animate.css deleted file mode 100644 index 6c72f594..00000000 --- a/smart-admin-web/src/assets/style/lib/animate.css +++ /dev/null @@ -1,3625 +0,0 @@ -@charset "UTF-8"; - -/*! - * animate.css -https://daneden.github.io/animate.css/ - * Version - 3.7.2 - * Licensed under the MIT license - http://opensource.org/licenses/MIT - * - * Copyright (c) 2019 Daniel Eden - */ - -@-webkit-keyframes bounce { - from, - 20%, - 53%, - 80%, - to { - -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } - - 40%, - 43% { - -webkit-animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06); - animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06); - -webkit-transform: translate3d(0, -30px, 0); - transform: translate3d(0, -30px, 0); - } - - 70% { - -webkit-animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06); - animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06); - -webkit-transform: translate3d(0, -15px, 0); - transform: translate3d(0, -15px, 0); - } - - 90% { - -webkit-transform: translate3d(0, -4px, 0); - transform: translate3d(0, -4px, 0); - } -} - -@keyframes bounce { - from, - 20%, - 53%, - 80%, - to { - -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } - - 40%, - 43% { - -webkit-animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06); - animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06); - -webkit-transform: translate3d(0, -30px, 0); - transform: translate3d(0, -30px, 0); - } - - 70% { - -webkit-animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06); - animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06); - -webkit-transform: translate3d(0, -15px, 0); - transform: translate3d(0, -15px, 0); - } - - 90% { - -webkit-transform: translate3d(0, -4px, 0); - transform: translate3d(0, -4px, 0); - } -} - -.bounce { - -webkit-animation-name: bounce; - animation-name: bounce; - -webkit-transform-origin: center bottom; - transform-origin: center bottom; -} - -@-webkit-keyframes flash { - from, - 50%, - to { - opacity: 1; - } - - 25%, - 75% { - opacity: 0; - } -} - -@keyframes flash { - from, - 50%, - to { - opacity: 1; - } - - 25%, - 75% { - opacity: 0; - } -} - -.flash { - -webkit-animation-name: flash; - animation-name: flash; -} - -/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ - -@-webkit-keyframes pulse { - from { - -webkit-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - } - - 50% { - -webkit-transform: scale3d(1.05, 1.05, 1.05); - transform: scale3d(1.05, 1.05, 1.05); - } - - to { - -webkit-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - } -} - -@keyframes pulse { - from { - -webkit-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - } - - 50% { - -webkit-transform: scale3d(1.05, 1.05, 1.05); - transform: scale3d(1.05, 1.05, 1.05); - } - - to { - -webkit-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - } -} - -.pulse { - -webkit-animation-name: pulse; - animation-name: pulse; -} - -@-webkit-keyframes rubberBand { - from { - -webkit-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - } - - 30% { - -webkit-transform: scale3d(1.25, 0.75, 1); - transform: scale3d(1.25, 0.75, 1); - } - - 40% { - -webkit-transform: scale3d(0.75, 1.25, 1); - transform: scale3d(0.75, 1.25, 1); - } - - 50% { - -webkit-transform: scale3d(1.15, 0.85, 1); - transform: scale3d(1.15, 0.85, 1); - } - - 65% { - -webkit-transform: scale3d(0.95, 1.05, 1); - transform: scale3d(0.95, 1.05, 1); - } - - 75% { - -webkit-transform: scale3d(1.05, 0.95, 1); - transform: scale3d(1.05, 0.95, 1); - } - - to { - -webkit-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - } -} - -@keyframes rubberBand { - from { - -webkit-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - } - - 30% { - -webkit-transform: scale3d(1.25, 0.75, 1); - transform: scale3d(1.25, 0.75, 1); - } - - 40% { - -webkit-transform: scale3d(0.75, 1.25, 1); - transform: scale3d(0.75, 1.25, 1); - } - - 50% { - -webkit-transform: scale3d(1.15, 0.85, 1); - transform: scale3d(1.15, 0.85, 1); - } - - 65% { - -webkit-transform: scale3d(0.95, 1.05, 1); - transform: scale3d(0.95, 1.05, 1); - } - - 75% { - -webkit-transform: scale3d(1.05, 0.95, 1); - transform: scale3d(1.05, 0.95, 1); - } - - to { - -webkit-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - } -} - -.rubberBand { - -webkit-animation-name: rubberBand; - animation-name: rubberBand; -} - -@-webkit-keyframes shake { - from, - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } - - 10%, - 30%, - 50%, - 70%, - 90% { - -webkit-transform: translate3d(-10px, 0, 0); - transform: translate3d(-10px, 0, 0); - } - - 20%, - 40%, - 60%, - 80% { - -webkit-transform: translate3d(10px, 0, 0); - transform: translate3d(10px, 0, 0); - } -} - -@keyframes shake { - from, - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } - - 10%, - 30%, - 50%, - 70%, - 90% { - -webkit-transform: translate3d(-10px, 0, 0); - transform: translate3d(-10px, 0, 0); - } - - 20%, - 40%, - 60%, - 80% { - -webkit-transform: translate3d(10px, 0, 0); - transform: translate3d(10px, 0, 0); - } -} - -.shake { - -webkit-animation-name: shake; - animation-name: shake; -} - -@-webkit-keyframes headShake { - 0% { - -webkit-transform: translateX(0); - transform: translateX(0); - } - - 6.5% { - -webkit-transform: translateX(-6px) rotateY(-9deg); - transform: translateX(-6px) rotateY(-9deg); - } - - 18.5% { - -webkit-transform: translateX(5px) rotateY(7deg); - transform: translateX(5px) rotateY(7deg); - } - - 31.5% { - -webkit-transform: translateX(-3px) rotateY(-5deg); - transform: translateX(-3px) rotateY(-5deg); - } - - 43.5% { - -webkit-transform: translateX(2px) rotateY(3deg); - transform: translateX(2px) rotateY(3deg); - } - - 50% { - -webkit-transform: translateX(0); - transform: translateX(0); - } -} - -@keyframes headShake { - 0% { - -webkit-transform: translateX(0); - transform: translateX(0); - } - - 6.5% { - -webkit-transform: translateX(-6px) rotateY(-9deg); - transform: translateX(-6px) rotateY(-9deg); - } - - 18.5% { - -webkit-transform: translateX(5px) rotateY(7deg); - transform: translateX(5px) rotateY(7deg); - } - - 31.5% { - -webkit-transform: translateX(-3px) rotateY(-5deg); - transform: translateX(-3px) rotateY(-5deg); - } - - 43.5% { - -webkit-transform: translateX(2px) rotateY(3deg); - transform: translateX(2px) rotateY(3deg); - } - - 50% { - -webkit-transform: translateX(0); - transform: translateX(0); - } -} - -.headShake { - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - -webkit-animation-name: headShake; - animation-name: headShake; -} - -@-webkit-keyframes swing { - 20% { - -webkit-transform: rotate3d(0, 0, 1, 15deg); - transform: rotate3d(0, 0, 1, 15deg); - } - - 40% { - -webkit-transform: rotate3d(0, 0, 1, -10deg); - transform: rotate3d(0, 0, 1, -10deg); - } - - 60% { - -webkit-transform: rotate3d(0, 0, 1, 5deg); - transform: rotate3d(0, 0, 1, 5deg); - } - - 80% { - -webkit-transform: rotate3d(0, 0, 1, -5deg); - transform: rotate3d(0, 0, 1, -5deg); - } - - to { - -webkit-transform: rotate3d(0, 0, 1, 0deg); - transform: rotate3d(0, 0, 1, 0deg); - } -} - -@keyframes swing { - 20% { - -webkit-transform: rotate3d(0, 0, 1, 15deg); - transform: rotate3d(0, 0, 1, 15deg); - } - - 40% { - -webkit-transform: rotate3d(0, 0, 1, -10deg); - transform: rotate3d(0, 0, 1, -10deg); - } - - 60% { - -webkit-transform: rotate3d(0, 0, 1, 5deg); - transform: rotate3d(0, 0, 1, 5deg); - } - - 80% { - -webkit-transform: rotate3d(0, 0, 1, -5deg); - transform: rotate3d(0, 0, 1, -5deg); - } - - to { - -webkit-transform: rotate3d(0, 0, 1, 0deg); - transform: rotate3d(0, 0, 1, 0deg); - } -} - -.swing { - -webkit-transform-origin: top center; - transform-origin: top center; - -webkit-animation-name: swing; - animation-name: swing; -} - -@-webkit-keyframes tada { - from { - -webkit-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - } - - 10%, - 20% { - -webkit-transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg); - transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg); - } - - 30%, - 50%, - 70%, - 90% { - -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); - transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); - } - - 40%, - 60%, - 80% { - -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); - transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); - } - - to { - -webkit-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - } -} - -@keyframes tada { - from { - -webkit-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - } - - 10%, - 20% { - -webkit-transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg); - transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg); - } - - 30%, - 50%, - 70%, - 90% { - -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); - transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); - } - - 40%, - 60%, - 80% { - -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); - transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); - } - - to { - -webkit-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - } -} - -.tada { - -webkit-animation-name: tada; - animation-name: tada; -} - -/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ - -@-webkit-keyframes wobble { - from { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } - - 15% { - -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg); - transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg); - } - - 30% { - -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg); - transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg); - } - - 45% { - -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg); - transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg); - } - - 60% { - -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg); - transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg); - } - - 75% { - -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg); - transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg); - } - - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -@keyframes wobble { - from { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } - - 15% { - -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg); - transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg); - } - - 30% { - -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg); - transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg); - } - - 45% { - -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg); - transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg); - } - - 60% { - -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg); - transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg); - } - - 75% { - -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg); - transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg); - } - - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -.wobble { - -webkit-animation-name: wobble; - animation-name: wobble; -} - -@-webkit-keyframes jello { - from, - 11.1%, - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } - - 22.2% { - -webkit-transform: skewX(-12.5deg) skewY(-12.5deg); - transform: skewX(-12.5deg) skewY(-12.5deg); - } - - 33.3% { - -webkit-transform: skewX(6.25deg) skewY(6.25deg); - transform: skewX(6.25deg) skewY(6.25deg); - } - - 44.4% { - -webkit-transform: skewX(-3.125deg) skewY(-3.125deg); - transform: skewX(-3.125deg) skewY(-3.125deg); - } - - 55.5% { - -webkit-transform: skewX(1.5625deg) skewY(1.5625deg); - transform: skewX(1.5625deg) skewY(1.5625deg); - } - - 66.6% { - -webkit-transform: skewX(-0.78125deg) skewY(-0.78125deg); - transform: skewX(-0.78125deg) skewY(-0.78125deg); - } - - 77.7% { - -webkit-transform: skewX(0.390625deg) skewY(0.390625deg); - transform: skewX(0.390625deg) skewY(0.390625deg); - } - - 88.8% { - -webkit-transform: skewX(-0.1953125deg) skewY(-0.1953125deg); - transform: skewX(-0.1953125deg) skewY(-0.1953125deg); - } -} - -@keyframes jello { - from, - 11.1%, - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } - - 22.2% { - -webkit-transform: skewX(-12.5deg) skewY(-12.5deg); - transform: skewX(-12.5deg) skewY(-12.5deg); - } - - 33.3% { - -webkit-transform: skewX(6.25deg) skewY(6.25deg); - transform: skewX(6.25deg) skewY(6.25deg); - } - - 44.4% { - -webkit-transform: skewX(-3.125deg) skewY(-3.125deg); - transform: skewX(-3.125deg) skewY(-3.125deg); - } - - 55.5% { - -webkit-transform: skewX(1.5625deg) skewY(1.5625deg); - transform: skewX(1.5625deg) skewY(1.5625deg); - } - - 66.6% { - -webkit-transform: skewX(-0.78125deg) skewY(-0.78125deg); - transform: skewX(-0.78125deg) skewY(-0.78125deg); - } - - 77.7% { - -webkit-transform: skewX(0.390625deg) skewY(0.390625deg); - transform: skewX(0.390625deg) skewY(0.390625deg); - } - - 88.8% { - -webkit-transform: skewX(-0.1953125deg) skewY(-0.1953125deg); - transform: skewX(-0.1953125deg) skewY(-0.1953125deg); - } -} - -.jello { - -webkit-animation-name: jello; - animation-name: jello; - -webkit-transform-origin: center; - transform-origin: center; -} - -@-webkit-keyframes heartBeat { - 0% { - -webkit-transform: scale(1); - transform: scale(1); - } - - 14% { - -webkit-transform: scale(1.3); - transform: scale(1.3); - } - - 28% { - -webkit-transform: scale(1); - transform: scale(1); - } - - 42% { - -webkit-transform: scale(1.3); - transform: scale(1.3); - } - - 70% { - -webkit-transform: scale(1); - transform: scale(1); - } -} - -@keyframes heartBeat { - 0% { - -webkit-transform: scale(1); - transform: scale(1); - } - - 14% { - -webkit-transform: scale(1.3); - transform: scale(1.3); - } - - 28% { - -webkit-transform: scale(1); - transform: scale(1); - } - - 42% { - -webkit-transform: scale(1.3); - transform: scale(1.3); - } - - 70% { - -webkit-transform: scale(1); - transform: scale(1); - } -} - -.heartBeat { - -webkit-animation-name: heartBeat; - animation-name: heartBeat; - -webkit-animation-duration: 1.3s; - animation-duration: 1.3s; - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; -} - -@-webkit-keyframes bounceIn { - from, - 20%, - 40%, - 60%, - 80%, - to { - -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - } - - 0% { - opacity: 0; - -webkit-transform: scale3d(0.3, 0.3, 0.3); - transform: scale3d(0.3, 0.3, 0.3); - } - - 20% { - -webkit-transform: scale3d(1.1, 1.1, 1.1); - transform: scale3d(1.1, 1.1, 1.1); - } - - 40% { - -webkit-transform: scale3d(0.9, 0.9, 0.9); - transform: scale3d(0.9, 0.9, 0.9); - } - - 60% { - opacity: 1; - -webkit-transform: scale3d(1.03, 1.03, 1.03); - transform: scale3d(1.03, 1.03, 1.03); - } - - 80% { - -webkit-transform: scale3d(0.97, 0.97, 0.97); - transform: scale3d(0.97, 0.97, 0.97); - } - - to { - opacity: 1; - -webkit-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - } -} - -@keyframes bounceIn { - from, - 20%, - 40%, - 60%, - 80%, - to { - -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - } - - 0% { - opacity: 0; - -webkit-transform: scale3d(0.3, 0.3, 0.3); - transform: scale3d(0.3, 0.3, 0.3); - } - - 20% { - -webkit-transform: scale3d(1.1, 1.1, 1.1); - transform: scale3d(1.1, 1.1, 1.1); - } - - 40% { - -webkit-transform: scale3d(0.9, 0.9, 0.9); - transform: scale3d(0.9, 0.9, 0.9); - } - - 60% { - opacity: 1; - -webkit-transform: scale3d(1.03, 1.03, 1.03); - transform: scale3d(1.03, 1.03, 1.03); - } - - 80% { - -webkit-transform: scale3d(0.97, 0.97, 0.97); - transform: scale3d(0.97, 0.97, 0.97); - } - - to { - opacity: 1; - -webkit-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - } -} - -.bounceIn { - -webkit-animation-duration: 0.75s; - animation-duration: 0.75s; - -webkit-animation-name: bounceIn; - animation-name: bounceIn; -} - -@-webkit-keyframes bounceInDown { - from, - 60%, - 75%, - 90%, - to { - -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - } - - 0% { - opacity: 0; - -webkit-transform: translate3d(0, -3000px, 0); - transform: translate3d(0, -3000px, 0); - } - - 60% { - opacity: 1; - -webkit-transform: translate3d(0, 25px, 0); - transform: translate3d(0, 25px, 0); - } - - 75% { - -webkit-transform: translate3d(0, -10px, 0); - transform: translate3d(0, -10px, 0); - } - - 90% { - -webkit-transform: translate3d(0, 5px, 0); - transform: translate3d(0, 5px, 0); - } - - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -@keyframes bounceInDown { - from, - 60%, - 75%, - 90%, - to { - -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - } - - 0% { - opacity: 0; - -webkit-transform: translate3d(0, -3000px, 0); - transform: translate3d(0, -3000px, 0); - } - - 60% { - opacity: 1; - -webkit-transform: translate3d(0, 25px, 0); - transform: translate3d(0, 25px, 0); - } - - 75% { - -webkit-transform: translate3d(0, -10px, 0); - transform: translate3d(0, -10px, 0); - } - - 90% { - -webkit-transform: translate3d(0, 5px, 0); - transform: translate3d(0, 5px, 0); - } - - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -.bounceInDown { - -webkit-animation-name: bounceInDown; - animation-name: bounceInDown; -} - -@-webkit-keyframes bounceInLeft { - from, - 60%, - 75%, - 90%, - to { - -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - } - - 0% { - opacity: 0; - -webkit-transform: translate3d(-3000px, 0, 0); - transform: translate3d(-3000px, 0, 0); - } - - 60% { - opacity: 1; - -webkit-transform: translate3d(25px, 0, 0); - transform: translate3d(25px, 0, 0); - } - - 75% { - -webkit-transform: translate3d(-10px, 0, 0); - transform: translate3d(-10px, 0, 0); - } - - 90% { - -webkit-transform: translate3d(5px, 0, 0); - transform: translate3d(5px, 0, 0); - } - - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -@keyframes bounceInLeft { - from, - 60%, - 75%, - 90%, - to { - -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - } - - 0% { - opacity: 0; - -webkit-transform: translate3d(-3000px, 0, 0); - transform: translate3d(-3000px, 0, 0); - } - - 60% { - opacity: 1; - -webkit-transform: translate3d(25px, 0, 0); - transform: translate3d(25px, 0, 0); - } - - 75% { - -webkit-transform: translate3d(-10px, 0, 0); - transform: translate3d(-10px, 0, 0); - } - - 90% { - -webkit-transform: translate3d(5px, 0, 0); - transform: translate3d(5px, 0, 0); - } - - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -.bounceInLeft { - -webkit-animation-name: bounceInLeft; - animation-name: bounceInLeft; -} - -@-webkit-keyframes bounceInRight { - from, - 60%, - 75%, - 90%, - to { - -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - } - - from { - opacity: 0; - -webkit-transform: translate3d(3000px, 0, 0); - transform: translate3d(3000px, 0, 0); - } - - 60% { - opacity: 1; - -webkit-transform: translate3d(-25px, 0, 0); - transform: translate3d(-25px, 0, 0); - } - - 75% { - -webkit-transform: translate3d(10px, 0, 0); - transform: translate3d(10px, 0, 0); - } - - 90% { - -webkit-transform: translate3d(-5px, 0, 0); - transform: translate3d(-5px, 0, 0); - } - - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -@keyframes bounceInRight { - from, - 60%, - 75%, - 90%, - to { - -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - } - - from { - opacity: 0; - -webkit-transform: translate3d(3000px, 0, 0); - transform: translate3d(3000px, 0, 0); - } - - 60% { - opacity: 1; - -webkit-transform: translate3d(-25px, 0, 0); - transform: translate3d(-25px, 0, 0); - } - - 75% { - -webkit-transform: translate3d(10px, 0, 0); - transform: translate3d(10px, 0, 0); - } - - 90% { - -webkit-transform: translate3d(-5px, 0, 0); - transform: translate3d(-5px, 0, 0); - } - - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -.bounceInRight { - -webkit-animation-name: bounceInRight; - animation-name: bounceInRight; -} - -@-webkit-keyframes bounceInUp { - from, - 60%, - 75%, - 90%, - to { - -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - } - - from { - opacity: 0; - -webkit-transform: translate3d(0, 3000px, 0); - transform: translate3d(0, 3000px, 0); - } - - 60% { - opacity: 1; - -webkit-transform: translate3d(0, -20px, 0); - transform: translate3d(0, -20px, 0); - } - - 75% { - -webkit-transform: translate3d(0, 10px, 0); - transform: translate3d(0, 10px, 0); - } - - 90% { - -webkit-transform: translate3d(0, -5px, 0); - transform: translate3d(0, -5px, 0); - } - - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -@keyframes bounceInUp { - from, - 60%, - 75%, - 90%, - to { - -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - } - - from { - opacity: 0; - -webkit-transform: translate3d(0, 3000px, 0); - transform: translate3d(0, 3000px, 0); - } - - 60% { - opacity: 1; - -webkit-transform: translate3d(0, -20px, 0); - transform: translate3d(0, -20px, 0); - } - - 75% { - -webkit-transform: translate3d(0, 10px, 0); - transform: translate3d(0, 10px, 0); - } - - 90% { - -webkit-transform: translate3d(0, -5px, 0); - transform: translate3d(0, -5px, 0); - } - - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -.bounceInUp { - -webkit-animation-name: bounceInUp; - animation-name: bounceInUp; -} - -@-webkit-keyframes bounceOut { - 20% { - -webkit-transform: scale3d(0.9, 0.9, 0.9); - transform: scale3d(0.9, 0.9, 0.9); - } - - 50%, - 55% { - opacity: 1; - -webkit-transform: scale3d(1.1, 1.1, 1.1); - transform: scale3d(1.1, 1.1, 1.1); - } - - to { - opacity: 0; - -webkit-transform: scale3d(0.3, 0.3, 0.3); - transform: scale3d(0.3, 0.3, 0.3); - } -} - -@keyframes bounceOut { - 20% { - -webkit-transform: scale3d(0.9, 0.9, 0.9); - transform: scale3d(0.9, 0.9, 0.9); - } - - 50%, - 55% { - opacity: 1; - -webkit-transform: scale3d(1.1, 1.1, 1.1); - transform: scale3d(1.1, 1.1, 1.1); - } - - to { - opacity: 0; - -webkit-transform: scale3d(0.3, 0.3, 0.3); - transform: scale3d(0.3, 0.3, 0.3); - } -} - -.bounceOut { - -webkit-animation-duration: 0.75s; - animation-duration: 0.75s; - -webkit-animation-name: bounceOut; - animation-name: bounceOut; -} - -@-webkit-keyframes bounceOutDown { - 20% { - -webkit-transform: translate3d(0, 10px, 0); - transform: translate3d(0, 10px, 0); - } - - 40%, - 45% { - opacity: 1; - -webkit-transform: translate3d(0, -20px, 0); - transform: translate3d(0, -20px, 0); - } - - to { - opacity: 0; - -webkit-transform: translate3d(0, 2000px, 0); - transform: translate3d(0, 2000px, 0); - } -} - -@keyframes bounceOutDown { - 20% { - -webkit-transform: translate3d(0, 10px, 0); - transform: translate3d(0, 10px, 0); - } - - 40%, - 45% { - opacity: 1; - -webkit-transform: translate3d(0, -20px, 0); - transform: translate3d(0, -20px, 0); - } - - to { - opacity: 0; - -webkit-transform: translate3d(0, 2000px, 0); - transform: translate3d(0, 2000px, 0); - } -} - -.bounceOutDown { - -webkit-animation-name: bounceOutDown; - animation-name: bounceOutDown; -} - -@-webkit-keyframes bounceOutLeft { - 20% { - opacity: 1; - -webkit-transform: translate3d(20px, 0, 0); - transform: translate3d(20px, 0, 0); - } - - to { - opacity: 0; - -webkit-transform: translate3d(-2000px, 0, 0); - transform: translate3d(-2000px, 0, 0); - } -} - -@keyframes bounceOutLeft { - 20% { - opacity: 1; - -webkit-transform: translate3d(20px, 0, 0); - transform: translate3d(20px, 0, 0); - } - - to { - opacity: 0; - -webkit-transform: translate3d(-2000px, 0, 0); - transform: translate3d(-2000px, 0, 0); - } -} - -.bounceOutLeft { - -webkit-animation-name: bounceOutLeft; - animation-name: bounceOutLeft; -} - -@-webkit-keyframes bounceOutRight { - 20% { - opacity: 1; - -webkit-transform: translate3d(-20px, 0, 0); - transform: translate3d(-20px, 0, 0); - } - - to { - opacity: 0; - -webkit-transform: translate3d(2000px, 0, 0); - transform: translate3d(2000px, 0, 0); - } -} - -@keyframes bounceOutRight { - 20% { - opacity: 1; - -webkit-transform: translate3d(-20px, 0, 0); - transform: translate3d(-20px, 0, 0); - } - - to { - opacity: 0; - -webkit-transform: translate3d(2000px, 0, 0); - transform: translate3d(2000px, 0, 0); - } -} - -.bounceOutRight { - -webkit-animation-name: bounceOutRight; - animation-name: bounceOutRight; -} - -@-webkit-keyframes bounceOutUp { - 20% { - -webkit-transform: translate3d(0, -10px, 0); - transform: translate3d(0, -10px, 0); - } - - 40%, - 45% { - opacity: 1; - -webkit-transform: translate3d(0, 20px, 0); - transform: translate3d(0, 20px, 0); - } - - to { - opacity: 0; - -webkit-transform: translate3d(0, -2000px, 0); - transform: translate3d(0, -2000px, 0); - } -} - -@keyframes bounceOutUp { - 20% { - -webkit-transform: translate3d(0, -10px, 0); - transform: translate3d(0, -10px, 0); - } - - 40%, - 45% { - opacity: 1; - -webkit-transform: translate3d(0, 20px, 0); - transform: translate3d(0, 20px, 0); - } - - to { - opacity: 0; - -webkit-transform: translate3d(0, -2000px, 0); - transform: translate3d(0, -2000px, 0); - } -} - -.bounceOutUp { - -webkit-animation-name: bounceOutUp; - animation-name: bounceOutUp; -} - -@-webkit-keyframes fadeIn { - from { - opacity: 0; - } - - to { - opacity: 1; - } -} - -@keyframes fadeIn { - from { - opacity: 0; - } - - to { - opacity: 1; - } -} - -.fadeIn { - -webkit-animation-name: fadeIn; - animation-name: fadeIn; -} - -@-webkit-keyframes fadeInDown { - from { - opacity: 0; - -webkit-transform: translate3d(0, -100%, 0); - transform: translate3d(0, -100%, 0); - } - - to { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -@keyframes fadeInDown { - from { - opacity: 0; - -webkit-transform: translate3d(0, -100%, 0); - transform: translate3d(0, -100%, 0); - } - - to { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -.fadeInDown { - -webkit-animation-name: fadeInDown; - animation-name: fadeInDown; -} - -@-webkit-keyframes fadeInDownBig { - from { - opacity: 0; - -webkit-transform: translate3d(0, -2000px, 0); - transform: translate3d(0, -2000px, 0); - } - - to { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -@keyframes fadeInDownBig { - from { - opacity: 0; - -webkit-transform: translate3d(0, -2000px, 0); - transform: translate3d(0, -2000px, 0); - } - - to { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -.fadeInDownBig { - -webkit-animation-name: fadeInDownBig; - animation-name: fadeInDownBig; -} - -@-webkit-keyframes fadeInLeft { - from { - opacity: 0; - -webkit-transform: translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0); - } - - to { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -@keyframes fadeInLeft { - from { - opacity: 0; - -webkit-transform: translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0); - } - - to { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -.fadeInLeft { - -webkit-animation-name: fadeInLeft; - animation-name: fadeInLeft; -} - -@-webkit-keyframes fadeInLeftBig { - from { - opacity: 0; - -webkit-transform: translate3d(-2000px, 0, 0); - transform: translate3d(-2000px, 0, 0); - } - - to { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -@keyframes fadeInLeftBig { - from { - opacity: 0; - -webkit-transform: translate3d(-2000px, 0, 0); - transform: translate3d(-2000px, 0, 0); - } - - to { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -.fadeInLeftBig { - -webkit-animation-name: fadeInLeftBig; - animation-name: fadeInLeftBig; -} - -@-webkit-keyframes fadeInRight { - from { - opacity: 0; - -webkit-transform: translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0); - } - - to { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -@keyframes fadeInRight { - from { - opacity: 0; - -webkit-transform: translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0); - } - - to { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -.fadeInRight { - -webkit-animation-name: fadeInRight; - animation-name: fadeInRight; -} - -@-webkit-keyframes fadeInRightBig { - from { - opacity: 0; - -webkit-transform: translate3d(2000px, 0, 0); - transform: translate3d(2000px, 0, 0); - } - - to { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -@keyframes fadeInRightBig { - from { - opacity: 0; - -webkit-transform: translate3d(2000px, 0, 0); - transform: translate3d(2000px, 0, 0); - } - - to { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -.fadeInRightBig { - -webkit-animation-name: fadeInRightBig; - animation-name: fadeInRightBig; -} - -@-webkit-keyframes fadeInUp { - from { - opacity: 0; - -webkit-transform: translate3d(0, 100%, 0); - transform: translate3d(0, 100%, 0); - } - - to { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -@keyframes fadeInUp { - from { - opacity: 0; - -webkit-transform: translate3d(0, 100%, 0); - transform: translate3d(0, 100%, 0); - } - - to { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -.fadeInUp { - -webkit-animation-name: fadeInUp; - animation-name: fadeInUp; -} - -@-webkit-keyframes fadeInUpBig { - from { - opacity: 0; - -webkit-transform: translate3d(0, 2000px, 0); - transform: translate3d(0, 2000px, 0); - } - - to { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -@keyframes fadeInUpBig { - from { - opacity: 0; - -webkit-transform: translate3d(0, 2000px, 0); - transform: translate3d(0, 2000px, 0); - } - - to { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -.fadeInUpBig { - -webkit-animation-name: fadeInUpBig; - animation-name: fadeInUpBig; -} - -@-webkit-keyframes fadeOut { - from { - opacity: 1; - } - - to { - opacity: 0; - } -} - -@keyframes fadeOut { - from { - opacity: 1; - } - - to { - opacity: 0; - } -} - -.fadeOut { - -webkit-animation-name: fadeOut; - animation-name: fadeOut; -} - -@-webkit-keyframes fadeOutDown { - from { - opacity: 1; - } - - to { - opacity: 0; - -webkit-transform: translate3d(0, 100%, 0); - transform: translate3d(0, 100%, 0); - } -} - -@keyframes fadeOutDown { - from { - opacity: 1; - } - - to { - opacity: 0; - -webkit-transform: translate3d(0, 100%, 0); - transform: translate3d(0, 100%, 0); - } -} - -.fadeOutDown { - -webkit-animation-name: fadeOutDown; - animation-name: fadeOutDown; -} - -@-webkit-keyframes fadeOutDownBig { - from { - opacity: 1; - } - - to { - opacity: 0; - -webkit-transform: translate3d(0, 2000px, 0); - transform: translate3d(0, 2000px, 0); - } -} - -@keyframes fadeOutDownBig { - from { - opacity: 1; - } - - to { - opacity: 0; - -webkit-transform: translate3d(0, 2000px, 0); - transform: translate3d(0, 2000px, 0); - } -} - -.fadeOutDownBig { - -webkit-animation-name: fadeOutDownBig; - animation-name: fadeOutDownBig; -} - -@-webkit-keyframes fadeOutLeft { - from { - opacity: 1; - } - - to { - opacity: 0; - -webkit-transform: translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0); - } -} - -@keyframes fadeOutLeft { - from { - opacity: 1; - } - - to { - opacity: 0; - -webkit-transform: translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0); - } -} - -.fadeOutLeft { - -webkit-animation-name: fadeOutLeft; - animation-name: fadeOutLeft; -} - -@-webkit-keyframes fadeOutLeftBig { - from { - opacity: 1; - } - - to { - opacity: 0; - -webkit-transform: translate3d(-2000px, 0, 0); - transform: translate3d(-2000px, 0, 0); - } -} - -@keyframes fadeOutLeftBig { - from { - opacity: 1; - } - - to { - opacity: 0; - -webkit-transform: translate3d(-2000px, 0, 0); - transform: translate3d(-2000px, 0, 0); - } -} - -.fadeOutLeftBig { - -webkit-animation-name: fadeOutLeftBig; - animation-name: fadeOutLeftBig; -} - -@-webkit-keyframes fadeOutRight { - from { - opacity: 1; - } - - to { - opacity: 0; - -webkit-transform: translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0); - } -} - -@keyframes fadeOutRight { - from { - opacity: 1; - } - - to { - opacity: 0; - -webkit-transform: translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0); - } -} - -.fadeOutRight { - -webkit-animation-name: fadeOutRight; - animation-name: fadeOutRight; -} - -@-webkit-keyframes fadeOutRightBig { - from { - opacity: 1; - } - - to { - opacity: 0; - -webkit-transform: translate3d(2000px, 0, 0); - transform: translate3d(2000px, 0, 0); - } -} - -@keyframes fadeOutRightBig { - from { - opacity: 1; - } - - to { - opacity: 0; - -webkit-transform: translate3d(2000px, 0, 0); - transform: translate3d(2000px, 0, 0); - } -} - -.fadeOutRightBig { - -webkit-animation-name: fadeOutRightBig; - animation-name: fadeOutRightBig; -} - -@-webkit-keyframes fadeOutUp { - from { - opacity: 1; - } - - to { - opacity: 0; - -webkit-transform: translate3d(0, -100%, 0); - transform: translate3d(0, -100%, 0); - } -} - -@keyframes fadeOutUp { - from { - opacity: 1; - } - - to { - opacity: 0; - -webkit-transform: translate3d(0, -100%, 0); - transform: translate3d(0, -100%, 0); - } -} - -.fadeOutUp { - -webkit-animation-name: fadeOutUp; - animation-name: fadeOutUp; -} - -@-webkit-keyframes fadeOutUpBig { - from { - opacity: 1; - } - - to { - opacity: 0; - -webkit-transform: translate3d(0, -2000px, 0); - transform: translate3d(0, -2000px, 0); - } -} - -@keyframes fadeOutUpBig { - from { - opacity: 1; - } - - to { - opacity: 0; - -webkit-transform: translate3d(0, -2000px, 0); - transform: translate3d(0, -2000px, 0); - } -} - -.fadeOutUpBig { - -webkit-animation-name: fadeOutUpBig; - animation-name: fadeOutUpBig; -} - -@-webkit-keyframes flip { - from { - -webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) - rotate3d(0, 1, 0, -360deg); - transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, -360deg); - -webkit-animation-timing-function: ease-out; - animation-timing-function: ease-out; - } - - 40% { - -webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px) - rotate3d(0, 1, 0, -190deg); - transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px) - rotate3d(0, 1, 0, -190deg); - -webkit-animation-timing-function: ease-out; - animation-timing-function: ease-out; - } - - 50% { - -webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px) - rotate3d(0, 1, 0, -170deg); - transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px) - rotate3d(0, 1, 0, -170deg); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - } - - 80% { - -webkit-transform: perspective(400px) scale3d(0.95, 0.95, 0.95) translate3d(0, 0, 0) - rotate3d(0, 1, 0, 0deg); - transform: perspective(400px) scale3d(0.95, 0.95, 0.95) translate3d(0, 0, 0) - rotate3d(0, 1, 0, 0deg); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - } - - to { - -webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) - rotate3d(0, 1, 0, 0deg); - transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, 0deg); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - } -} - -@keyframes flip { - from { - -webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) - rotate3d(0, 1, 0, -360deg); - transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, -360deg); - -webkit-animation-timing-function: ease-out; - animation-timing-function: ease-out; - } - - 40% { - -webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px) - rotate3d(0, 1, 0, -190deg); - transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px) - rotate3d(0, 1, 0, -190deg); - -webkit-animation-timing-function: ease-out; - animation-timing-function: ease-out; - } - - 50% { - -webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px) - rotate3d(0, 1, 0, -170deg); - transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px) - rotate3d(0, 1, 0, -170deg); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - } - - 80% { - -webkit-transform: perspective(400px) scale3d(0.95, 0.95, 0.95) translate3d(0, 0, 0) - rotate3d(0, 1, 0, 0deg); - transform: perspective(400px) scale3d(0.95, 0.95, 0.95) translate3d(0, 0, 0) - rotate3d(0, 1, 0, 0deg); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - } - - to { - -webkit-transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) - rotate3d(0, 1, 0, 0deg); - transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, 0deg); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - } -} - -.animated.flip { - -webkit-backface-visibility: visible; - backface-visibility: visible; - -webkit-animation-name: flip; - animation-name: flip; -} - -@-webkit-keyframes flipInX { - from { - -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); - transform: perspective(400px) rotate3d(1, 0, 0, 90deg); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - opacity: 0; - } - - 40% { - -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); - transform: perspective(400px) rotate3d(1, 0, 0, -20deg); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - } - - 60% { - -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg); - transform: perspective(400px) rotate3d(1, 0, 0, 10deg); - opacity: 1; - } - - 80% { - -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg); - transform: perspective(400px) rotate3d(1, 0, 0, -5deg); - } - - to { - -webkit-transform: perspective(400px); - transform: perspective(400px); - } -} - -@keyframes flipInX { - from { - -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); - transform: perspective(400px) rotate3d(1, 0, 0, 90deg); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - opacity: 0; - } - - 40% { - -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); - transform: perspective(400px) rotate3d(1, 0, 0, -20deg); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - } - - 60% { - -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg); - transform: perspective(400px) rotate3d(1, 0, 0, 10deg); - opacity: 1; - } - - 80% { - -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg); - transform: perspective(400px) rotate3d(1, 0, 0, -5deg); - } - - to { - -webkit-transform: perspective(400px); - transform: perspective(400px); - } -} - -.flipInX { - -webkit-backface-visibility: visible !important; - backface-visibility: visible !important; - -webkit-animation-name: flipInX; - animation-name: flipInX; -} - -@-webkit-keyframes flipInY { - from { - -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg); - transform: perspective(400px) rotate3d(0, 1, 0, 90deg); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - opacity: 0; - } - - 40% { - -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg); - transform: perspective(400px) rotate3d(0, 1, 0, -20deg); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - } - - 60% { - -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg); - transform: perspective(400px) rotate3d(0, 1, 0, 10deg); - opacity: 1; - } - - 80% { - -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg); - transform: perspective(400px) rotate3d(0, 1, 0, -5deg); - } - - to { - -webkit-transform: perspective(400px); - transform: perspective(400px); - } -} - -@keyframes flipInY { - from { - -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg); - transform: perspective(400px) rotate3d(0, 1, 0, 90deg); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - opacity: 0; - } - - 40% { - -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg); - transform: perspective(400px) rotate3d(0, 1, 0, -20deg); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - } - - 60% { - -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg); - transform: perspective(400px) rotate3d(0, 1, 0, 10deg); - opacity: 1; - } - - 80% { - -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg); - transform: perspective(400px) rotate3d(0, 1, 0, -5deg); - } - - to { - -webkit-transform: perspective(400px); - transform: perspective(400px); - } -} - -.flipInY { - -webkit-backface-visibility: visible !important; - backface-visibility: visible !important; - -webkit-animation-name: flipInY; - animation-name: flipInY; -} - -@-webkit-keyframes flipOutX { - from { - -webkit-transform: perspective(400px); - transform: perspective(400px); - } - - 30% { - -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); - transform: perspective(400px) rotate3d(1, 0, 0, -20deg); - opacity: 1; - } - - to { - -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); - transform: perspective(400px) rotate3d(1, 0, 0, 90deg); - opacity: 0; - } -} - -@keyframes flipOutX { - from { - -webkit-transform: perspective(400px); - transform: perspective(400px); - } - - 30% { - -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); - transform: perspective(400px) rotate3d(1, 0, 0, -20deg); - opacity: 1; - } - - to { - -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); - transform: perspective(400px) rotate3d(1, 0, 0, 90deg); - opacity: 0; - } -} - -.flipOutX { - -webkit-animation-duration: 0.75s; - animation-duration: 0.75s; - -webkit-animation-name: flipOutX; - animation-name: flipOutX; - -webkit-backface-visibility: visible !important; - backface-visibility: visible !important; -} - -@-webkit-keyframes flipOutY { - from { - -webkit-transform: perspective(400px); - transform: perspective(400px); - } - - 30% { - -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -15deg); - transform: perspective(400px) rotate3d(0, 1, 0, -15deg); - opacity: 1; - } - - to { - -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg); - transform: perspective(400px) rotate3d(0, 1, 0, 90deg); - opacity: 0; - } -} - -@keyframes flipOutY { - from { - -webkit-transform: perspective(400px); - transform: perspective(400px); - } - - 30% { - -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -15deg); - transform: perspective(400px) rotate3d(0, 1, 0, -15deg); - opacity: 1; - } - - to { - -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg); - transform: perspective(400px) rotate3d(0, 1, 0, 90deg); - opacity: 0; - } -} - -.flipOutY { - -webkit-animation-duration: 0.75s; - animation-duration: 0.75s; - -webkit-backface-visibility: visible !important; - backface-visibility: visible !important; - -webkit-animation-name: flipOutY; - animation-name: flipOutY; -} - -@-webkit-keyframes lightSpeedIn { - from { - -webkit-transform: translate3d(100%, 0, 0) skewX(-30deg); - transform: translate3d(100%, 0, 0) skewX(-30deg); - opacity: 0; - } - - 60% { - -webkit-transform: skewX(20deg); - transform: skewX(20deg); - opacity: 1; - } - - 80% { - -webkit-transform: skewX(-5deg); - transform: skewX(-5deg); - } - - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -@keyframes lightSpeedIn { - from { - -webkit-transform: translate3d(100%, 0, 0) skewX(-30deg); - transform: translate3d(100%, 0, 0) skewX(-30deg); - opacity: 0; - } - - 60% { - -webkit-transform: skewX(20deg); - transform: skewX(20deg); - opacity: 1; - } - - 80% { - -webkit-transform: skewX(-5deg); - transform: skewX(-5deg); - } - - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -.lightSpeedIn { - -webkit-animation-name: lightSpeedIn; - animation-name: lightSpeedIn; - -webkit-animation-timing-function: ease-out; - animation-timing-function: ease-out; -} - -@-webkit-keyframes lightSpeedOut { - from { - opacity: 1; - } - - to { - -webkit-transform: translate3d(100%, 0, 0) skewX(30deg); - transform: translate3d(100%, 0, 0) skewX(30deg); - opacity: 0; - } -} - -@keyframes lightSpeedOut { - from { - opacity: 1; - } - - to { - -webkit-transform: translate3d(100%, 0, 0) skewX(30deg); - transform: translate3d(100%, 0, 0) skewX(30deg); - opacity: 0; - } -} - -.lightSpeedOut { - -webkit-animation-name: lightSpeedOut; - animation-name: lightSpeedOut; - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; -} - -@-webkit-keyframes rotateIn { - from { - -webkit-transform-origin: center; - transform-origin: center; - -webkit-transform: rotate3d(0, 0, 1, -200deg); - transform: rotate3d(0, 0, 1, -200deg); - opacity: 0; - } - - to { - -webkit-transform-origin: center; - transform-origin: center; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - opacity: 1; - } -} - -@keyframes rotateIn { - from { - -webkit-transform-origin: center; - transform-origin: center; - -webkit-transform: rotate3d(0, 0, 1, -200deg); - transform: rotate3d(0, 0, 1, -200deg); - opacity: 0; - } - - to { - -webkit-transform-origin: center; - transform-origin: center; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - opacity: 1; - } -} - -.rotateIn { - -webkit-animation-name: rotateIn; - animation-name: rotateIn; -} - -@-webkit-keyframes rotateInDownLeft { - from { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate3d(0, 0, 1, -45deg); - transform: rotate3d(0, 0, 1, -45deg); - opacity: 0; - } - - to { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - opacity: 1; - } -} - -@keyframes rotateInDownLeft { - from { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate3d(0, 0, 1, -45deg); - transform: rotate3d(0, 0, 1, -45deg); - opacity: 0; - } - - to { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - opacity: 1; - } -} - -.rotateInDownLeft { - -webkit-animation-name: rotateInDownLeft; - animation-name: rotateInDownLeft; -} - -@-webkit-keyframes rotateInDownRight { - from { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate3d(0, 0, 1, 45deg); - transform: rotate3d(0, 0, 1, 45deg); - opacity: 0; - } - - to { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - opacity: 1; - } -} - -@keyframes rotateInDownRight { - from { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate3d(0, 0, 1, 45deg); - transform: rotate3d(0, 0, 1, 45deg); - opacity: 0; - } - - to { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - opacity: 1; - } -} - -.rotateInDownRight { - -webkit-animation-name: rotateInDownRight; - animation-name: rotateInDownRight; -} - -@-webkit-keyframes rotateInUpLeft { - from { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate3d(0, 0, 1, 45deg); - transform: rotate3d(0, 0, 1, 45deg); - opacity: 0; - } - - to { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - opacity: 1; - } -} - -@keyframes rotateInUpLeft { - from { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate3d(0, 0, 1, 45deg); - transform: rotate3d(0, 0, 1, 45deg); - opacity: 0; - } - - to { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - opacity: 1; - } -} - -.rotateInUpLeft { - -webkit-animation-name: rotateInUpLeft; - animation-name: rotateInUpLeft; -} - -@-webkit-keyframes rotateInUpRight { - from { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate3d(0, 0, 1, -90deg); - transform: rotate3d(0, 0, 1, -90deg); - opacity: 0; - } - - to { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - opacity: 1; - } -} - -@keyframes rotateInUpRight { - from { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate3d(0, 0, 1, -90deg); - transform: rotate3d(0, 0, 1, -90deg); - opacity: 0; - } - - to { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - opacity: 1; - } -} - -.rotateInUpRight { - -webkit-animation-name: rotateInUpRight; - animation-name: rotateInUpRight; -} - -@-webkit-keyframes rotateOut { - from { - -webkit-transform-origin: center; - transform-origin: center; - opacity: 1; - } - - to { - -webkit-transform-origin: center; - transform-origin: center; - -webkit-transform: rotate3d(0, 0, 1, 200deg); - transform: rotate3d(0, 0, 1, 200deg); - opacity: 0; - } -} - -@keyframes rotateOut { - from { - -webkit-transform-origin: center; - transform-origin: center; - opacity: 1; - } - - to { - -webkit-transform-origin: center; - transform-origin: center; - -webkit-transform: rotate3d(0, 0, 1, 200deg); - transform: rotate3d(0, 0, 1, 200deg); - opacity: 0; - } -} - -.rotateOut { - -webkit-animation-name: rotateOut; - animation-name: rotateOut; -} - -@-webkit-keyframes rotateOutDownLeft { - from { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - opacity: 1; - } - - to { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate3d(0, 0, 1, 45deg); - transform: rotate3d(0, 0, 1, 45deg); - opacity: 0; - } -} - -@keyframes rotateOutDownLeft { - from { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - opacity: 1; - } - - to { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate3d(0, 0, 1, 45deg); - transform: rotate3d(0, 0, 1, 45deg); - opacity: 0; - } -} - -.rotateOutDownLeft { - -webkit-animation-name: rotateOutDownLeft; - animation-name: rotateOutDownLeft; -} - -@-webkit-keyframes rotateOutDownRight { - from { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - opacity: 1; - } - - to { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate3d(0, 0, 1, -45deg); - transform: rotate3d(0, 0, 1, -45deg); - opacity: 0; - } -} - -@keyframes rotateOutDownRight { - from { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - opacity: 1; - } - - to { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate3d(0, 0, 1, -45deg); - transform: rotate3d(0, 0, 1, -45deg); - opacity: 0; - } -} - -.rotateOutDownRight { - -webkit-animation-name: rotateOutDownRight; - animation-name: rotateOutDownRight; -} - -@-webkit-keyframes rotateOutUpLeft { - from { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - opacity: 1; - } - - to { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate3d(0, 0, 1, -45deg); - transform: rotate3d(0, 0, 1, -45deg); - opacity: 0; - } -} - -@keyframes rotateOutUpLeft { - from { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - opacity: 1; - } - - to { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate3d(0, 0, 1, -45deg); - transform: rotate3d(0, 0, 1, -45deg); - opacity: 0; - } -} - -.rotateOutUpLeft { - -webkit-animation-name: rotateOutUpLeft; - animation-name: rotateOutUpLeft; -} - -@-webkit-keyframes rotateOutUpRight { - from { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - opacity: 1; - } - - to { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate3d(0, 0, 1, 90deg); - transform: rotate3d(0, 0, 1, 90deg); - opacity: 0; - } -} - -@keyframes rotateOutUpRight { - from { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - opacity: 1; - } - - to { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate3d(0, 0, 1, 90deg); - transform: rotate3d(0, 0, 1, 90deg); - opacity: 0; - } -} - -.rotateOutUpRight { - -webkit-animation-name: rotateOutUpRight; - animation-name: rotateOutUpRight; -} - -@-webkit-keyframes hinge { - 0% { - -webkit-transform-origin: top left; - transform-origin: top left; - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - } - - 20%, - 60% { - -webkit-transform: rotate3d(0, 0, 1, 80deg); - transform: rotate3d(0, 0, 1, 80deg); - -webkit-transform-origin: top left; - transform-origin: top left; - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - } - - 40%, - 80% { - -webkit-transform: rotate3d(0, 0, 1, 60deg); - transform: rotate3d(0, 0, 1, 60deg); - -webkit-transform-origin: top left; - transform-origin: top left; - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - opacity: 1; - } - - to { - -webkit-transform: translate3d(0, 700px, 0); - transform: translate3d(0, 700px, 0); - opacity: 0; - } -} - -@keyframes hinge { - 0% { - -webkit-transform-origin: top left; - transform-origin: top left; - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - } - - 20%, - 60% { - -webkit-transform: rotate3d(0, 0, 1, 80deg); - transform: rotate3d(0, 0, 1, 80deg); - -webkit-transform-origin: top left; - transform-origin: top left; - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - } - - 40%, - 80% { - -webkit-transform: rotate3d(0, 0, 1, 60deg); - transform: rotate3d(0, 0, 1, 60deg); - -webkit-transform-origin: top left; - transform-origin: top left; - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - opacity: 1; - } - - to { - -webkit-transform: translate3d(0, 700px, 0); - transform: translate3d(0, 700px, 0); - opacity: 0; - } -} - -.hinge { - -webkit-animation-duration: 2s; - animation-duration: 2s; - -webkit-animation-name: hinge; - animation-name: hinge; -} - -@-webkit-keyframes jackInTheBox { - from { - opacity: 0; - -webkit-transform: scale(0.1) rotate(30deg); - transform: scale(0.1) rotate(30deg); - -webkit-transform-origin: center bottom; - transform-origin: center bottom; - } - - 50% { - -webkit-transform: rotate(-10deg); - transform: rotate(-10deg); - } - - 70% { - -webkit-transform: rotate(3deg); - transform: rotate(3deg); - } - - to { - opacity: 1; - -webkit-transform: scale(1); - transform: scale(1); - } -} - -@keyframes jackInTheBox { - from { - opacity: 0; - -webkit-transform: scale(0.1) rotate(30deg); - transform: scale(0.1) rotate(30deg); - -webkit-transform-origin: center bottom; - transform-origin: center bottom; - } - - 50% { - -webkit-transform: rotate(-10deg); - transform: rotate(-10deg); - } - - 70% { - -webkit-transform: rotate(3deg); - transform: rotate(3deg); - } - - to { - opacity: 1; - -webkit-transform: scale(1); - transform: scale(1); - } -} - -.jackInTheBox { - -webkit-animation-name: jackInTheBox; - animation-name: jackInTheBox; -} - -/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ - -@-webkit-keyframes rollIn { - from { - opacity: 0; - -webkit-transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg); - transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg); - } - - to { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -@keyframes rollIn { - from { - opacity: 0; - -webkit-transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg); - transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg); - } - - to { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -.rollIn { - -webkit-animation-name: rollIn; - animation-name: rollIn; -} - -/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ - -@-webkit-keyframes rollOut { - from { - opacity: 1; - } - - to { - opacity: 0; - -webkit-transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg); - transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg); - } -} - -@keyframes rollOut { - from { - opacity: 1; - } - - to { - opacity: 0; - -webkit-transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg); - transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg); - } -} - -.rollOut { - -webkit-animation-name: rollOut; - animation-name: rollOut; -} - -@-webkit-keyframes zoomIn { - from { - opacity: 0; - -webkit-transform: scale3d(0.3, 0.3, 0.3); - transform: scale3d(0.3, 0.3, 0.3); - } - - 50% { - opacity: 1; - } -} - -@keyframes zoomIn { - from { - opacity: 0; - -webkit-transform: scale3d(0.3, 0.3, 0.3); - transform: scale3d(0.3, 0.3, 0.3); - } - - 50% { - opacity: 1; - } -} - -.zoomIn { - -webkit-animation-name: zoomIn; - animation-name: zoomIn; -} - -@-webkit-keyframes zoomInDown { - from { - opacity: 0; - -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -1000px, 0); - transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -1000px, 0); - -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); - animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); - } - - 60% { - opacity: 1; - -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0); - transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0); - -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); - animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); - } -} - -@keyframes zoomInDown { - from { - opacity: 0; - -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -1000px, 0); - transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -1000px, 0); - -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); - animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); - } - - 60% { - opacity: 1; - -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0); - transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0); - -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); - animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); - } -} - -.zoomInDown { - -webkit-animation-name: zoomInDown; - animation-name: zoomInDown; -} - -@-webkit-keyframes zoomInLeft { - from { - opacity: 0; - -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0); - transform: scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0); - -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); - animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); - } - - 60% { - opacity: 1; - -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0); - transform: scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0); - -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); - animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); - } -} - -@keyframes zoomInLeft { - from { - opacity: 0; - -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0); - transform: scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0); - -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); - animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); - } - - 60% { - opacity: 1; - -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0); - transform: scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0); - -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); - animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); - } -} - -.zoomInLeft { - -webkit-animation-name: zoomInLeft; - animation-name: zoomInLeft; -} - -@-webkit-keyframes zoomInRight { - from { - opacity: 0; - -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0); - transform: scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0); - -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); - animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); - } - - 60% { - opacity: 1; - -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0); - transform: scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0); - -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); - animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); - } -} - -@keyframes zoomInRight { - from { - opacity: 0; - -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0); - transform: scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0); - -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); - animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); - } - - 60% { - opacity: 1; - -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0); - transform: scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0); - -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); - animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); - } -} - -.zoomInRight { - -webkit-animation-name: zoomInRight; - animation-name: zoomInRight; -} - -@-webkit-keyframes zoomInUp { - from { - opacity: 0; - -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 1000px, 0); - transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 1000px, 0); - -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); - animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); - } - - 60% { - opacity: 1; - -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0); - transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0); - -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); - animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); - } -} - -@keyframes zoomInUp { - from { - opacity: 0; - -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 1000px, 0); - transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 1000px, 0); - -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); - animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); - } - - 60% { - opacity: 1; - -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0); - transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0); - -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); - animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); - } -} - -.zoomInUp { - -webkit-animation-name: zoomInUp; - animation-name: zoomInUp; -} - -@-webkit-keyframes zoomOut { - from { - opacity: 1; - } - - 50% { - opacity: 0; - -webkit-transform: scale3d(0.3, 0.3, 0.3); - transform: scale3d(0.3, 0.3, 0.3); - } - - to { - opacity: 0; - } -} - -@keyframes zoomOut { - from { - opacity: 1; - } - - 50% { - opacity: 0; - -webkit-transform: scale3d(0.3, 0.3, 0.3); - transform: scale3d(0.3, 0.3, 0.3); - } - - to { - opacity: 0; - } -} - -.zoomOut { - -webkit-animation-name: zoomOut; - animation-name: zoomOut; -} - -@-webkit-keyframes zoomOutDown { - 40% { - opacity: 1; - -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0); - transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0); - -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); - animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); - } - - to { - opacity: 0; - -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 2000px, 0); - transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 2000px, 0); - -webkit-transform-origin: center bottom; - transform-origin: center bottom; - -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); - animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); - } -} - -@keyframes zoomOutDown { - 40% { - opacity: 1; - -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0); - transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0); - -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); - animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); - } - - to { - opacity: 0; - -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 2000px, 0); - transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 2000px, 0); - -webkit-transform-origin: center bottom; - transform-origin: center bottom; - -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); - animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); - } -} - -.zoomOutDown { - -webkit-animation-name: zoomOutDown; - animation-name: zoomOutDown; -} - -@-webkit-keyframes zoomOutLeft { - 40% { - opacity: 1; - -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(42px, 0, 0); - transform: scale3d(0.475, 0.475, 0.475) translate3d(42px, 0, 0); - } - - to { - opacity: 0; - -webkit-transform: scale(0.1) translate3d(-2000px, 0, 0); - transform: scale(0.1) translate3d(-2000px, 0, 0); - -webkit-transform-origin: left center; - transform-origin: left center; - } -} - -@keyframes zoomOutLeft { - 40% { - opacity: 1; - -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(42px, 0, 0); - transform: scale3d(0.475, 0.475, 0.475) translate3d(42px, 0, 0); - } - - to { - opacity: 0; - -webkit-transform: scale(0.1) translate3d(-2000px, 0, 0); - transform: scale(0.1) translate3d(-2000px, 0, 0); - -webkit-transform-origin: left center; - transform-origin: left center; - } -} - -.zoomOutLeft { - -webkit-animation-name: zoomOutLeft; - animation-name: zoomOutLeft; -} - -@-webkit-keyframes zoomOutRight { - 40% { - opacity: 1; - -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(-42px, 0, 0); - transform: scale3d(0.475, 0.475, 0.475) translate3d(-42px, 0, 0); - } - - to { - opacity: 0; - -webkit-transform: scale(0.1) translate3d(2000px, 0, 0); - transform: scale(0.1) translate3d(2000px, 0, 0); - -webkit-transform-origin: right center; - transform-origin: right center; - } -} - -@keyframes zoomOutRight { - 40% { - opacity: 1; - -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(-42px, 0, 0); - transform: scale3d(0.475, 0.475, 0.475) translate3d(-42px, 0, 0); - } - - to { - opacity: 0; - -webkit-transform: scale(0.1) translate3d(2000px, 0, 0); - transform: scale(0.1) translate3d(2000px, 0, 0); - -webkit-transform-origin: right center; - transform-origin: right center; - } -} - -.zoomOutRight { - -webkit-animation-name: zoomOutRight; - animation-name: zoomOutRight; -} - -@-webkit-keyframes zoomOutUp { - 40% { - opacity: 1; - -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0); - transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0); - -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); - animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); - } - - to { - opacity: 0; - -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -2000px, 0); - transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -2000px, 0); - -webkit-transform-origin: center bottom; - transform-origin: center bottom; - -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); - animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); - } -} - -@keyframes zoomOutUp { - 40% { - opacity: 1; - -webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0); - transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0); - -webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); - animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); - } - - to { - opacity: 0; - -webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -2000px, 0); - transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -2000px, 0); - -webkit-transform-origin: center bottom; - transform-origin: center bottom; - -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); - animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); - } -} - -.zoomOutUp { - -webkit-animation-name: zoomOutUp; - animation-name: zoomOutUp; -} - -@-webkit-keyframes slideInDown { - from { - -webkit-transform: translate3d(0, -100%, 0); - transform: translate3d(0, -100%, 0); - visibility: visible; - } - - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -@keyframes slideInDown { - from { - -webkit-transform: translate3d(0, -100%, 0); - transform: translate3d(0, -100%, 0); - visibility: visible; - } - - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -.slideInDown { - -webkit-animation-name: slideInDown; - animation-name: slideInDown; -} - -@-webkit-keyframes slideInLeft { - from { - -webkit-transform: translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0); - visibility: visible; - } - - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -@keyframes slideInLeft { - from { - -webkit-transform: translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0); - visibility: visible; - } - - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -.slideInLeft { - -webkit-animation-name: slideInLeft; - animation-name: slideInLeft; -} - -@-webkit-keyframes slideInRight { - from { - -webkit-transform: translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0); - visibility: visible; - } - - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -@keyframes slideInRight { - from { - -webkit-transform: translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0); - visibility: visible; - } - - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -.slideInRight { - -webkit-animation-name: slideInRight; - animation-name: slideInRight; -} - -@-webkit-keyframes slideInUp { - from { - -webkit-transform: translate3d(0, 100%, 0); - transform: translate3d(0, 100%, 0); - visibility: visible; - } - - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -@keyframes slideInUp { - from { - -webkit-transform: translate3d(0, 100%, 0); - transform: translate3d(0, 100%, 0); - visibility: visible; - } - - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -.slideInUp { - -webkit-animation-name: slideInUp; - animation-name: slideInUp; -} - -@-webkit-keyframes slideOutDown { - from { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } - - to { - visibility: hidden; - -webkit-transform: translate3d(0, 100%, 0); - transform: translate3d(0, 100%, 0); - } -} - -@keyframes slideOutDown { - from { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } - - to { - visibility: hidden; - -webkit-transform: translate3d(0, 100%, 0); - transform: translate3d(0, 100%, 0); - } -} - -.slideOutDown { - -webkit-animation-name: slideOutDown; - animation-name: slideOutDown; -} - -@-webkit-keyframes slideOutLeft { - from { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } - - to { - visibility: hidden; - -webkit-transform: translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0); - } -} - -@keyframes slideOutLeft { - from { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } - - to { - visibility: hidden; - -webkit-transform: translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0); - } -} - -.slideOutLeft { - -webkit-animation-name: slideOutLeft; - animation-name: slideOutLeft; -} - -@-webkit-keyframes slideOutRight { - from { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } - - to { - visibility: hidden; - -webkit-transform: translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0); - } -} - -@keyframes slideOutRight { - from { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } - - to { - visibility: hidden; - -webkit-transform: translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0); - } -} - -.slideOutRight { - -webkit-animation-name: slideOutRight; - animation-name: slideOutRight; -} - -@-webkit-keyframes slideOutUp { - from { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } - - to { - visibility: hidden; - -webkit-transform: translate3d(0, -100%, 0); - transform: translate3d(0, -100%, 0); - } -} - -@keyframes slideOutUp { - from { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } - - to { - visibility: hidden; - -webkit-transform: translate3d(0, -100%, 0); - transform: translate3d(0, -100%, 0); - } -} - -.slideOutUp { - -webkit-animation-name: slideOutUp; - animation-name: slideOutUp; -} - -.animated { - -webkit-animation-duration: 1s; - animation-duration: 1s; - -webkit-animation-fill-mode: both; - animation-fill-mode: both; -} - -.animated.infinite { - -webkit-animation-iteration-count: infinite; - animation-iteration-count: infinite; -} - -.animated.delay-1s { - -webkit-animation-delay: 1s; - animation-delay: 1s; -} - -.animated.delay-2s { - -webkit-animation-delay: 2s; - animation-delay: 2s; -} - -.animated.delay-3s { - -webkit-animation-delay: 3s; - animation-delay: 3s; -} - -.animated.delay-4s { - -webkit-animation-delay: 4s; - animation-delay: 4s; -} - -.animated.delay-5s { - -webkit-animation-delay: 5s; - animation-delay: 5s; -} - -.animated.fast { - -webkit-animation-duration: 800ms; - animation-duration: 800ms; -} - -.animated.faster { - -webkit-animation-duration: 500ms; - animation-duration: 500ms; -} - -.animated.slow { - -webkit-animation-duration: 2s; - animation-duration: 2s; -} - -.animated.slower { - -webkit-animation-duration: 3s; - animation-duration: 3s; -} - -@media (print), (prefers-reduced-motion: reduce) { - .animated { - -webkit-animation-duration: 1ms !important; - animation-duration: 1ms !important; - -webkit-transition-duration: 1ms !important; - transition-duration: 1ms !important; - -webkit-animation-iteration-count: 1 !important; - animation-iteration-count: 1 !important; - } -} \ No newline at end of file diff --git a/smart-admin-web/src/components/active-plate/active-plate.vue b/smart-admin-web/src/components/active-plate/active-plate.vue deleted file mode 100644 index 237e2e05..00000000 --- a/smart-admin-web/src/components/active-plate/active-plate.vue +++ /dev/null @@ -1,67 +0,0 @@ - - - - - diff --git a/smart-admin-web/src/components/charts/bar.vue b/smart-admin-web/src/components/charts/bar.vue deleted file mode 100644 index 49dcd500..00000000 --- a/smart-admin-web/src/components/charts/bar.vue +++ /dev/null @@ -1,73 +0,0 @@ - - - diff --git a/smart-admin-web/src/components/charts/index.js b/smart-admin-web/src/components/charts/index.js deleted file mode 100644 index cd86f348..00000000 --- a/smart-admin-web/src/components/charts/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import ChartPie from './pie.vue'; -import ChartBar from './bar.vue'; -export { ChartPie, ChartBar }; diff --git a/smart-admin-web/src/components/charts/pie.vue b/smart-admin-web/src/components/charts/pie.vue deleted file mode 100644 index 4c4ffc7d..00000000 --- a/smart-admin-web/src/components/charts/pie.vue +++ /dev/null @@ -1,85 +0,0 @@ - - - diff --git a/smart-admin-web/src/components/charts/theme.json b/smart-admin-web/src/components/charts/theme.json deleted file mode 100644 index 909b518a..00000000 --- a/smart-admin-web/src/components/charts/theme.json +++ /dev/null @@ -1,490 +0,0 @@ -{ - "color": [ - "#2d8cf0", - "#19be6b", - "#ff9900", - "#E46CBB", - "#9A66E4", - "#ed3f14" - ], - "backgroundColor": "rgba(0,0,0,0)", - "textStyle": {}, - "title": { - "textStyle": { - "color": "#516b91" - }, - "subtextStyle": { - "color": "#93b7e3" - } - }, - "line": { - "itemStyle": { - "normal": { - "borderWidth": "2" - } - }, - "lineStyle": { - "normal": { - "width": "2" - } - }, - "symbolSize": "6", - "symbol": "emptyCircle", - "smooth": true - }, - "radar": { - "itemStyle": { - "normal": { - "borderWidth": "2" - } - }, - "lineStyle": { - "normal": { - "width": "2" - } - }, - "symbolSize": "6", - "symbol": "emptyCircle", - "smooth": true - }, - "bar": { - "itemStyle": { - "normal": { - "barBorderWidth": 0, - "barBorderColor": "#ccc" - }, - "emphasis": { - "barBorderWidth": 0, - "barBorderColor": "#ccc" - } - } - }, - "pie": { - "itemStyle": { - "normal": { - "borderWidth": 0, - "borderColor": "#ccc" - }, - "emphasis": { - "borderWidth": 0, - "borderColor": "#ccc" - } - } - }, - "scatter": { - "itemStyle": { - "normal": { - "borderWidth": 0, - "borderColor": "#ccc" - }, - "emphasis": { - "borderWidth": 0, - "borderColor": "#ccc" - } - } - }, - "boxplot": { - "itemStyle": { - "normal": { - "borderWidth": 0, - "borderColor": "#ccc" - }, - "emphasis": { - "borderWidth": 0, - "borderColor": "#ccc" - } - } - }, - "parallel": { - "itemStyle": { - "normal": { - "borderWidth": 0, - "borderColor": "#ccc" - }, - "emphasis": { - "borderWidth": 0, - "borderColor": "#ccc" - } - } - }, - "sankey": { - "itemStyle": { - "normal": { - "borderWidth": 0, - "borderColor": "#ccc" - }, - "emphasis": { - "borderWidth": 0, - "borderColor": "#ccc" - } - } - }, - "funnel": { - "itemStyle": { - "normal": { - "borderWidth": 0, - "borderColor": "#ccc" - }, - "emphasis": { - "borderWidth": 0, - "borderColor": "#ccc" - } - } - }, - "gauge": { - "itemStyle": { - "normal": { - "borderWidth": 0, - "borderColor": "#ccc" - }, - "emphasis": { - "borderWidth": 0, - "borderColor": "#ccc" - } - } - }, - "candlestick": { - "itemStyle": { - "normal": { - "color": "#edafda", - "color0": "transparent", - "borderColor": "#d680bc", - "borderColor0": "#8fd3e8", - "borderWidth": "2" - } - } - }, - "graph": { - "itemStyle": { - "normal": { - "borderWidth": 0, - "borderColor": "#ccc" - } - }, - "lineStyle": { - "normal": { - "width": 1, - "color": "#aaa" - } - }, - "symbolSize": "6", - "symbol": "emptyCircle", - "smooth": true, - "color": [ - "#2d8cf0", - "#19be6b", - "#f5ae4a", - "#9189d5", - "#56cae2", - "#cbb0e3" - ], - "label": { - "normal": { - "textStyle": { - "color": "#eee" - } - } - } - }, - "map": { - "itemStyle": { - "normal": { - "areaColor": "#f3f3f3", - "borderColor": "#516b91", - "borderWidth": 0.5 - }, - "emphasis": { - "areaColor": "rgba(165,231,240,1)", - "borderColor": "#516b91", - "borderWidth": 1 - } - }, - "label": { - "normal": { - "textStyle": { - "color": "#000" - } - }, - "emphasis": { - "textStyle": { - "color": "rgb(81,107,145)" - } - } - } - }, - "geo": { - "itemStyle": { - "normal": { - "areaColor": "#f3f3f3", - "borderColor": "#516b91", - "borderWidth": 0.5 - }, - "emphasis": { - "areaColor": "rgba(165,231,240,1)", - "borderColor": "#516b91", - "borderWidth": 1 - } - }, - "label": { - "normal": { - "textStyle": { - "color": "#000" - } - }, - "emphasis": { - "textStyle": { - "color": "rgb(81,107,145)" - } - } - } - }, - "categoryAxis": { - "axisLine": { - "show": true, - "lineStyle": { - "color": "#cccccc" - } - }, - "axisTick": { - "show": false, - "lineStyle": { - "color": "#333" - } - }, - "axisLabel": { - "show": true, - "textStyle": { - "color": "#999999" - } - }, - "splitLine": { - "show": true, - "lineStyle": { - "color": [ - "#eeeeee" - ] - } - }, - "splitArea": { - "show": false, - "areaStyle": { - "color": [ - "rgba(250,250,250,0.05)", - "rgba(200,200,200,0.02)" - ] - } - } - }, - "valueAxis": { - "axisLine": { - "show": true, - "lineStyle": { - "color": "#cccccc" - } - }, - "axisTick": { - "show": false, - "lineStyle": { - "color": "#333" - } - }, - "axisLabel": { - "show": true, - "textStyle": { - "color": "#999999" - } - }, - "splitLine": { - "show": true, - "lineStyle": { - "color": [ - "#eeeeee" - ] - } - }, - "splitArea": { - "show": false, - "areaStyle": { - "color": [ - "rgba(250,250,250,0.05)", - "rgba(200,200,200,0.02)" - ] - } - } - }, - "logAxis": { - "axisLine": { - "show": true, - "lineStyle": { - "color": "#cccccc" - } - }, - "axisTick": { - "show": false, - "lineStyle": { - "color": "#333" - } - }, - "axisLabel": { - "show": true, - "textStyle": { - "color": "#999999" - } - }, - "splitLine": { - "show": true, - "lineStyle": { - "color": [ - "#eeeeee" - ] - } - }, - "splitArea": { - "show": false, - "areaStyle": { - "color": [ - "rgba(250,250,250,0.05)", - "rgba(200,200,200,0.02)" - ] - } - } - }, - "timeAxis": { - "axisLine": { - "show": true, - "lineStyle": { - "color": "#cccccc" - } - }, - "axisTick": { - "show": false, - "lineStyle": { - "color": "#333" - } - }, - "axisLabel": { - "show": true, - "textStyle": { - "color": "#999999" - } - }, - "splitLine": { - "show": true, - "lineStyle": { - "color": [ - "#eeeeee" - ] - } - }, - "splitArea": { - "show": false, - "areaStyle": { - "color": [ - "rgba(250,250,250,0.05)", - "rgba(200,200,200,0.02)" - ] - } - } - }, - "toolbox": { - "iconStyle": { - "normal": { - "borderColor": "#999" - }, - "emphasis": { - "borderColor": "#666" - } - } - }, - "legend": { - "textStyle": { - "color": "#999999" - } - }, - "tooltip": { - "axisPointer": { - "lineStyle": { - "color": "#ccc", - "width": 1 - }, - "crossStyle": { - "color": "#ccc", - "width": 1 - } - } - }, - "timeline": { - "lineStyle": { - "color": "#8fd3e8", - "width": 1 - }, - "itemStyle": { - "normal": { - "color": "#8fd3e8", - "borderWidth": 1 - }, - "emphasis": { - "color": "#8fd3e8" - } - }, - "controlStyle": { - "normal": { - "color": "#8fd3e8", - "borderColor": "#8fd3e8", - "borderWidth": 0.5 - }, - "emphasis": { - "color": "#8fd3e8", - "borderColor": "#8fd3e8", - "borderWidth": 0.5 - } - }, - "checkpointStyle": { - "color": "#8fd3e8", - "borderColor": "rgba(138,124,168,0.37)" - }, - "label": { - "normal": { - "textStyle": { - "color": "#8fd3e8" - } - }, - "emphasis": { - "textStyle": { - "color": "#8fd3e8" - } - } - } - }, - "visualMap": { - "color": [ - "#516b91", - "#59c4e6", - "#a5e7f0" - ] - }, - "dataZoom": { - "backgroundColor": "rgba(0,0,0,0)", - "dataBackgroundColor": "rgba(255,255,255,0.3)", - "fillerColor": "rgba(167,183,204,0.4)", - "handleColor": "#a7b7cc", - "handleSize": "100%", - "textStyle": { - "color": "#333" - } - }, - "markPoint": { - "label": { - "normal": { - "textStyle": { - "color": "#eee" - } - }, - "emphasis": { - "textStyle": { - "color": "#eee" - } - } - } - } -} \ No newline at end of file diff --git a/smart-admin-web/src/components/common-icon/common-icon.vue b/smart-admin-web/src/components/common-icon/common-icon.vue deleted file mode 100644 index 03cbc0e8..00000000 --- a/smart-admin-web/src/components/common-icon/common-icon.vue +++ /dev/null @@ -1,52 +0,0 @@ - - - - - diff --git a/smart-admin-web/src/components/common-icon/index.js b/smart-admin-web/src/components/common-icon/index.js deleted file mode 100644 index ca1bd334..00000000 --- a/smart-admin-web/src/components/common-icon/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import CommonIcon from './common-icon.vue'; -export default CommonIcon; diff --git a/smart-admin-web/src/components/count-to/count-to.vue b/smart-admin-web/src/components/count-to/count-to.vue deleted file mode 100644 index 4c8f274e..00000000 --- a/smart-admin-web/src/components/count-to/count-to.vue +++ /dev/null @@ -1,198 +0,0 @@ - - - diff --git a/smart-admin-web/src/components/count-to/index.js b/smart-admin-web/src/components/count-to/index.js deleted file mode 100644 index 52c7fb88..00000000 --- a/smart-admin-web/src/components/count-to/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import countTo from './count-to.vue'; -export default countTo; diff --git a/smart-admin-web/src/components/count-to/index.less b/smart-admin-web/src/components/count-to/index.less deleted file mode 100644 index e17d7c60..00000000 --- a/smart-admin-web/src/components/count-to/index.less +++ /dev/null @@ -1,10 +0,0 @@ -@prefix: ~"count-to"; - -.@{prefix}-wrapper{ - .content-outer{ - display: inline-block; - .@{prefix}-unit-text{ - font-style: normal; - } - } -} diff --git a/smart-admin-web/src/components/editor/editor.vue b/smart-admin-web/src/components/editor/editor.vue deleted file mode 100644 index da3123dc..00000000 --- a/smart-admin-web/src/components/editor/editor.vue +++ /dev/null @@ -1,77 +0,0 @@ - - - - - diff --git a/smart-admin-web/src/components/editor/index.js b/smart-admin-web/src/components/editor/index.js deleted file mode 100644 index 58c0cd58..00000000 --- a/smart-admin-web/src/components/editor/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import Editor from './editor.vue'; -export default Editor; diff --git a/smart-admin-web/src/components/employee/employee-selector.vue b/smart-admin-web/src/components/employee/employee-selector.vue deleted file mode 100644 index a55f140a..00000000 --- a/smart-admin-web/src/components/employee/employee-selector.vue +++ /dev/null @@ -1,54 +0,0 @@ - - \ No newline at end of file diff --git a/smart-admin-web/src/components/icons/icons.vue b/smart-admin-web/src/components/icons/icons.vue deleted file mode 100644 index 08112f96..00000000 --- a/smart-admin-web/src/components/icons/icons.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - - diff --git a/smart-admin-web/src/components/icons/index.js b/smart-admin-web/src/components/icons/index.js deleted file mode 100644 index 9bce89b3..00000000 --- a/smart-admin-web/src/components/icons/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import Icons from './icons.vue'; -export default Icons; diff --git a/smart-admin-web/src/components/main/components/a-back-top/index.js b/smart-admin-web/src/components/main/components/a-back-top/index.js deleted file mode 100644 index 7c87382d..00000000 --- a/smart-admin-web/src/components/main/components/a-back-top/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import ABackTop from './index.vue'; -export default ABackTop; diff --git a/smart-admin-web/src/components/main/components/a-back-top/index.vue b/smart-admin-web/src/components/main/components/a-back-top/index.vue deleted file mode 100644 index e13c5621..00000000 --- a/smart-admin-web/src/components/main/components/a-back-top/index.vue +++ /dev/null @@ -1,130 +0,0 @@ - - diff --git a/smart-admin-web/src/components/main/components/fullscreen/fullscreen.vue b/smart-admin-web/src/components/main/components/fullscreen/fullscreen.vue deleted file mode 100644 index b5fb231c..00000000 --- a/smart-admin-web/src/components/main/components/fullscreen/fullscreen.vue +++ /dev/null @@ -1,92 +0,0 @@ - - - - - diff --git a/smart-admin-web/src/components/main/components/fullscreen/index.js b/smart-admin-web/src/components/main/components/fullscreen/index.js deleted file mode 100644 index 45c287e9..00000000 --- a/smart-admin-web/src/components/main/components/fullscreen/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import Fullscreen from './fullscreen.vue'; -export default Fullscreen; diff --git a/smart-admin-web/src/components/main/components/header-bar/custom-bread-crumb/custom-bread-crumb.less b/smart-admin-web/src/components/main/components/header-bar/custom-bread-crumb/custom-bread-crumb.less deleted file mode 100644 index 1ace1eb8..00000000 --- a/smart-admin-web/src/components/main/components/header-bar/custom-bread-crumb/custom-bread-crumb.less +++ /dev/null @@ -1,4 +0,0 @@ -.custom-bread-crumb{ - display: inline-block; - vertical-align: top; -} diff --git a/smart-admin-web/src/components/main/components/header-bar/custom-bread-crumb/custom-bread-crumb.vue b/smart-admin-web/src/components/main/components/header-bar/custom-bread-crumb/custom-bread-crumb.vue deleted file mode 100644 index 9d1fc5d7..00000000 --- a/smart-admin-web/src/components/main/components/header-bar/custom-bread-crumb/custom-bread-crumb.vue +++ /dev/null @@ -1,44 +0,0 @@ - - diff --git a/smart-admin-web/src/components/main/components/header-bar/custom-bread-crumb/index.js b/smart-admin-web/src/components/main/components/header-bar/custom-bread-crumb/index.js deleted file mode 100644 index a360517d..00000000 --- a/smart-admin-web/src/components/main/components/header-bar/custom-bread-crumb/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import customBreadCrumb from './custom-bread-crumb.vue'; -export default customBreadCrumb; diff --git a/smart-admin-web/src/components/main/components/header-bar/header-bar.less b/smart-admin-web/src/components/main/components/header-bar/header-bar.less deleted file mode 100644 index 9c62d564..00000000 --- a/smart-admin-web/src/components/main/components/header-bar/header-bar.less +++ /dev/null @@ -1,19 +0,0 @@ -.header-bar{ - width: 100%; - height: 100%; - position: relative; - .custom-content-con{ - float: right; - height: auto; - padding-right: 20px; - // line-height: 64px; - & > *{ - float: right; - } - } -} - - -.step-bottom-btn{ - width: 380px !important; -} diff --git a/smart-admin-web/src/components/main/components/header-bar/header-bar.vue b/smart-admin-web/src/components/main/components/header-bar/header-bar.vue deleted file mode 100644 index 059b69c4..00000000 --- a/smart-admin-web/src/components/main/components/header-bar/header-bar.vue +++ /dev/null @@ -1,106 +0,0 @@ - - - - diff --git a/smart-admin-web/src/components/main/components/header-bar/index.js b/smart-admin-web/src/components/main/components/header-bar/index.js deleted file mode 100644 index 7559bb43..00000000 --- a/smart-admin-web/src/components/main/components/header-bar/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import HeaderBar from './header-bar'; -export default HeaderBar; diff --git a/smart-admin-web/src/components/main/components/header-bar/sider-trigger/index.js b/smart-admin-web/src/components/main/components/header-bar/sider-trigger/index.js deleted file mode 100644 index e474a26d..00000000 --- a/smart-admin-web/src/components/main/components/header-bar/sider-trigger/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import siderTrigger from './sider-trigger.vue'; -export default siderTrigger; diff --git a/smart-admin-web/src/components/main/components/header-bar/sider-trigger/sider-trigger.less b/smart-admin-web/src/components/main/components/header-bar/sider-trigger/sider-trigger.less deleted file mode 100644 index bb852980..00000000 --- a/smart-admin-web/src/components/main/components/header-bar/sider-trigger/sider-trigger.less +++ /dev/null @@ -1,21 +0,0 @@ -.trans{ - transition: transform .2s ease; -} -@size: 40px; -.sider-trigger-a{ - padding: 6px; - width: @size; - height: @size; - display: inline-block; - text-align: center; - color: #5c6b77; - margin-top: 10px; - i{ - .trans; - vertical-align: top; - } - &.collapsed i{ - transform: rotateZ(180deg); - .trans; - } -} diff --git a/smart-admin-web/src/components/main/components/header-bar/sider-trigger/sider-trigger.vue b/smart-admin-web/src/components/main/components/header-bar/sider-trigger/sider-trigger.vue deleted file mode 100644 index 71971884..00000000 --- a/smart-admin-web/src/components/main/components/header-bar/sider-trigger/sider-trigger.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/smart-admin-web/src/components/main/components/language/index.js b/smart-admin-web/src/components/main/components/language/index.js deleted file mode 100644 index 74d5e61b..00000000 --- a/smart-admin-web/src/components/main/components/language/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import Language from './language.vue'; -export default Language; diff --git a/smart-admin-web/src/components/main/components/language/language.vue b/smart-admin-web/src/components/main/components/language/language.vue deleted file mode 100644 index 29a8cbb0..00000000 --- a/smart-admin-web/src/components/main/components/language/language.vue +++ /dev/null @@ -1,54 +0,0 @@ - - - diff --git a/smart-admin-web/src/components/main/components/notice/notice.vue b/smart-admin-web/src/components/main/components/notice/notice.vue deleted file mode 100644 index 337d09ae..00000000 --- a/smart-admin-web/src/components/main/components/notice/notice.vue +++ /dev/null @@ -1,371 +0,0 @@ - - - - - diff --git a/smart-admin-web/src/components/main/components/side-menu/collapsed-menu.vue b/smart-admin-web/src/components/main/components/side-menu/collapsed-menu.vue deleted file mode 100644 index 6011e12b..00000000 --- a/smart-admin-web/src/components/main/components/side-menu/collapsed-menu.vue +++ /dev/null @@ -1,84 +0,0 @@ - - diff --git a/smart-admin-web/src/components/main/components/side-menu/index.js b/smart-admin-web/src/components/main/components/side-menu/index.js deleted file mode 100644 index 4a51d599..00000000 --- a/smart-admin-web/src/components/main/components/side-menu/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import SideMenu from './side-menu.vue'; -export default SideMenu; diff --git a/smart-admin-web/src/components/main/components/side-menu/item-mixin.js b/smart-admin-web/src/components/main/components/side-menu/item-mixin.js deleted file mode 100644 index 921342fe..00000000 --- a/smart-admin-web/src/components/main/components/side-menu/item-mixin.js +++ /dev/null @@ -1,30 +0,0 @@ -export default { - props: { - // 父文件 - parentItem: { - type: Object, - default: () => { } - }, - // 主题 - theme: { - type: String, - require: false - }, - // 图标尺寸 - iconSize: { - type: Number, - require: false - } - }, - computed: { - parentName () { - return this.parentItem.name; - }, - children () { - return this.parentItem.children; - }, - textColor () { - return this.theme === 'dark' ? '#fff' : '#495060'; - } - } -}; diff --git a/smart-admin-web/src/components/main/components/side-menu/mixin.js b/smart-admin-web/src/components/main/components/side-menu/mixin.js deleted file mode 100644 index 770d5bb6..00000000 --- a/smart-admin-web/src/components/main/components/side-menu/mixin.js +++ /dev/null @@ -1,18 +0,0 @@ -import CommonIcon from '_c/common-icon'; -import { showTitle } from '@/lib/menu-func'; -export default { - components: { - CommonIcon - }, - methods: { - showTitle (item) { - return showTitle(item, this); - }, - showChildren (item) { - return item.children && (item.children.length > 0 || (item.meta && item.meta.showAlways)); - }, - getNameOrHref (item, children0) { - return item.href ? `isTurnByHref_${item.href}` : (children0 ? item.children[0].name : item.name); - } - } -}; diff --git a/smart-admin-web/src/components/main/components/side-menu/side-menu-item.vue b/smart-admin-web/src/components/main/components/side-menu/side-menu-item.vue deleted file mode 100644 index d236b7a5..00000000 --- a/smart-admin-web/src/components/main/components/side-menu/side-menu-item.vue +++ /dev/null @@ -1,35 +0,0 @@ - - diff --git a/smart-admin-web/src/components/main/components/side-menu/side-menu.less b/smart-admin-web/src/components/main/components/side-menu/side-menu.less deleted file mode 100644 index e50fae79..00000000 --- a/smart-admin-web/src/components/main/components/side-menu/side-menu.less +++ /dev/null @@ -1,39 +0,0 @@ -.side-menu-wrapper{ - user-select: none; - .menu-collapsed{ - padding-top: 10px; - - .ivu-dropdown{ - .ivu-dropdown-rel a{ - width: 100%; - } - } - .ivu-tooltip{ - width: 100%; - .ivu-tooltip-rel{ - width: 100%; - } - .ivu-tooltip-popper .ivu-tooltip-content{ - .ivu-tooltip-arrow{ - border-right-color: #fff; - } - .ivu-tooltip-inner{ - background: #fff; - color: #495060; - } - } - } - - - } - a.drop-menu-a{ - display: inline-block; - padding: 6px 15px; - width: 100%; - text-align: center; - color: #495060; - } -} -.menu-title{ - padding-left: 6px; -} diff --git a/smart-admin-web/src/components/main/components/side-menu/side-menu.vue b/smart-admin-web/src/components/main/components/side-menu/side-menu.vue deleted file mode 100644 index ceccb359..00000000 --- a/smart-admin-web/src/components/main/components/side-menu/side-menu.vue +++ /dev/null @@ -1,197 +0,0 @@ - - - diff --git a/smart-admin-web/src/components/main/components/tags-nav/index.js b/smart-admin-web/src/components/main/components/tags-nav/index.js deleted file mode 100644 index 56d2f1c2..00000000 --- a/smart-admin-web/src/components/main/components/tags-nav/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import TagsNav from './tags-nav.vue'; -export default TagsNav; diff --git a/smart-admin-web/src/components/main/components/tags-nav/tags-nav.less b/smart-admin-web/src/components/main/components/tags-nav/tags-nav.less deleted file mode 100644 index ddb05134..00000000 --- a/smart-admin-web/src/components/main/components/tags-nav/tags-nav.less +++ /dev/null @@ -1,136 +0,0 @@ -.no-select{ - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} -.size{ - height: 100%; -} -.tags-nav{ - position: relative; - margin:0 auto; - // border-top: 1px solid #F0F0F0; - // border-bottom: 1px solid #F0F0F0; - background: #f4f6f8; - padding:0 20px; - - .no-select; - .size; - .close-con{ - position: absolute; - right: 0; - top: 5px; - height: 30px; - width: 42px; - background: #f3f5f7; - text-align: center; - z-index: 10; - margin-top:5px; - - border-top: 1px solid #F5F7FC; - border-bottom: 1px solid #F5F7FC; - i{ - color:#666666; - } - button{ - margin-top:3px; - - } - } - .btn-con{ - margin-top:10px; - position: absolute; - top: 0px; - height: 30px; - line-height: 30px; - // padding:0 10px; - background: #f3f5f7; - z-index: 10; - - button{ - position: relative; - top:-1px; - line-height: 14px; - text-align: center; - color:#666666; - - } - &.left-btn{ - left: 0px; - border: 1px solid #F5F7FC; - } - &.right-btn{ - right: 42px; - border: 1px solid #F5F7FC; - } - } - .scroll-outer{ - position: absolute; - left: 52px; - right: 61px; - top: 0; - bottom: 0; - padding:10px 0; - .scroll-body{ - display: inline-block; - position: absolute; - box-shadow: border-box; - overflow: visible; - white-space: nowrap; - transition: left .3s ease; - .ivu-tag{ - height:34px; - margin:0; - } - .ivu-tag{ - // min-width:10px; - height:30px; - line-height: 30px; - border-radius: 3px; - padding:0 10px; - background: #fff!important; - border:none; - text-align: center; - color:#1C2B36; - font-size: 14px; - margin:0 5px; - span{ - color:#1C2B36!important; - padding:0 5px; - } - i{ - color:#1C2B36!important; - font-size: 4px; - } - } - .ivu-tag-primary{ - transition: background .2s ease; - background: #2D8CF0!important; - span,i{ - color:#fff!important; - } - } - } - } - .contextmenu { - position: absolute; - margin: 0; - padding: 5px 0; - background: #fff; - z-index: 1000; - list-style-type: none; - border-radius: 3px; - box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, .1); - li { - margin: 0; - padding: 5px 15px; - cursor: pointer; - &:hover { - background: #eee; - } - } - } -} diff --git a/smart-admin-web/src/components/main/components/tags-nav/tags-nav.vue b/smart-admin-web/src/components/main/components/tags-nav/tags-nav.vue deleted file mode 100644 index 00909fa0..00000000 --- a/smart-admin-web/src/components/main/components/tags-nav/tags-nav.vue +++ /dev/null @@ -1,256 +0,0 @@ - - - - - diff --git a/smart-admin-web/src/components/main/components/user/index.js b/smart-admin-web/src/components/main/components/user/index.js deleted file mode 100644 index 54d7ca0b..00000000 --- a/smart-admin-web/src/components/main/components/user/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import User from './user.vue'; -export default User; diff --git a/smart-admin-web/src/components/main/components/user/user.less b/smart-admin-web/src/components/main/components/user/user.less deleted file mode 100644 index 9c5eeba7..00000000 --- a/smart-admin-web/src/components/main/components/user/user.less +++ /dev/null @@ -1,25 +0,0 @@ -.user-avatar-dropdown{ - padding-left:20px; - color:#909ca4; - .dropdown-arrows{ - margin:0 10px; - } - .head{ - position: relative; - top:-2px; - } -} -.user{ - - &-avatar-dropdown{ - cursor: pointer; - display: inline-block; - // height: 64px; - vertical-align: middle; - // line-height: 64px; - .ivu-badge-dot{ - top: 16px; - } - } - -} diff --git a/smart-admin-web/src/components/main/components/user/user.vue b/smart-admin-web/src/components/main/components/user/user.vue deleted file mode 100644 index d7f0324a..00000000 --- a/smart-admin-web/src/components/main/components/user/user.vue +++ /dev/null @@ -1,131 +0,0 @@ - - - - diff --git a/smart-admin-web/src/components/main/index.js b/smart-admin-web/src/components/main/index.js deleted file mode 100644 index 87be9ddf..00000000 --- a/smart-admin-web/src/components/main/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import Main from './main.vue'; -export default Main; diff --git a/smart-admin-web/src/components/main/main.less b/smart-admin-web/src/components/main/main.less deleted file mode 100644 index 588e8c13..00000000 --- a/smart-admin-web/src/components/main/main.less +++ /dev/null @@ -1,129 +0,0 @@ -//滚动条样式 -.scrollbar(@width: 2px){ - &::-webkit-scrollbar { width: @width; height: 8px; } - &::-webkit-scrollbar-thumb { border-radius: 5px; -webkit-box-shadow: inset 0 0 5px rgb(185, 185, 185); background: #c7c5c8; } - &::-webkit-scrollbar-track { border-radius: 0; background: #ddd; } -} -.no-scrollbar{ - &::-webkit-scrollbar {display:none} -} -.main{ - .scrollbar, - .ivu-table-overflowX, - .content-wrapper, - .w-e-text{ - .scrollbar; - } - iframe body{ - .scrollbar; - } - .logo-con{ - padding: 19px 10px 15px 5px; - &.collapsed{ - padding: 19px 0 15px; - text-align: center; - } - } - .menu-dropdown{ - margin-left: 200px; - } - .search-bar{ - padding:0 14px; - margin-bottom: 20px; - &.collapsed{ - padding:0 12px; - i{ - width: 40px; - - } - } - input{ - width: 100%; - height:36px; - background: #152a3a; - color:#44505c; - font-size: 14px; - outline: none; - - &::placeholder{ - color:#44505c; - } - &:focus{ - border:none; - outline: none; - background: #fff; - } - border:none; - } - i{ - line-height: 36px; - color:#44505c; - } - } - .header-con{ - background: #fff; - padding: 0 10px; - width: 100%; - } - .main-layout-con{ - height: 100%; - overflow: hidden; - } - .main-content-con{ - height: ~"calc(100% - 60px)"; - overflow: hidden; - } - .tag-nav-wrapper{ - padding: 0; - height:50px; - // background:#F0F0F0; - } - .content-wrapper{ - padding: 0 18px 18px; - height: ~"calc(100% - 80px)"; - overflow: auto; - } - .left-sider{ - .ivu-layout-sider-children{ - overflow-y: scroll; - margin-right: -18px; - } - } -} -.ivu-menu-light.ivu-menu-vertical .ivu-menu-item-active:not(.ivu-menu-submenu):after{ - right: inherit; left: 0; -} -.ivu-menu-item > i{ - margin-right: 12px !important; -} -.ivu-menu-submenu > .ivu-menu > .ivu-menu-item > i { - margin-right: 8px !important; -} -.collased-menu-dropdown{ - width: 100%; - margin: 0; - line-height: normal; - padding: 7px 0 6px 16px; - clear: both; - font-size: 12px !important; - white-space: nowrap; - list-style: none; - cursor: pointer; - transition: background 0.2s ease-in-out; - &:hover{ - background: rgba(100, 100, 100, 0.1); - } - & * { - color: #515a6e; - } - .ivu-menu-item > i{ - margin-right: 12px !important; - } - .ivu-menu-submenu > .ivu-menu > .ivu-menu-item > i { - margin-right: 8px !important; - } -} - -.ivu-select-dropdown.ivu-dropdown-transfer{ - max-height: 400px; -} diff --git a/smart-admin-web/src/components/main/main.vue b/smart-admin-web/src/components/main/main.vue deleted file mode 100644 index 0be9f2c1..00000000 --- a/smart-admin-web/src/components/main/main.vue +++ /dev/null @@ -1,533 +0,0 @@ - - - diff --git a/smart-admin-web/src/components/smart-admin-ad/ad.vue b/smart-admin-web/src/components/smart-admin-ad/ad.vue deleted file mode 100644 index 43f2d9e1..00000000 --- a/smart-admin-web/src/components/smart-admin-ad/ad.vue +++ /dev/null @@ -1,34 +0,0 @@ - - - diff --git a/smart-admin-web/src/components/smart-admin-ad/index.js b/smart-admin-web/src/components/smart-admin-ad/index.js deleted file mode 100644 index f0b0e3fb..00000000 --- a/smart-admin-web/src/components/smart-admin-ad/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import Ad from './ad.vue'; -export default Ad; diff --git a/smart-admin-web/src/components/tables/edit.vue b/smart-admin-web/src/components/tables/edit.vue deleted file mode 100644 index 55c142ac..00000000 --- a/smart-admin-web/src/components/tables/edit.vue +++ /dev/null @@ -1,102 +0,0 @@ - - - - - diff --git a/smart-admin-web/src/components/tables/handle-btns.js b/smart-admin-web/src/components/tables/handle-btns.js deleted file mode 100644 index 7254b3e1..00000000 --- a/smart-admin-web/src/components/tables/handle-btns.js +++ /dev/null @@ -1,70 +0,0 @@ -// 验证 -const validate = { - operation: (params) => { - if (params.operation === 0) { - return false; - } - return true; - }, - audit: (params) => { - if (params.audit === 0) { - return false; - } - return true; - } -}; -const btns = { - // 删除:需要判定 - delete: (h, params, vm) => { - let disabledFlag = false; - return h('Tooltip', { - props: { - content: '删除', - placement: 'top', - transfer: true - } - }, [h('Button', { - props: { - type: 'error', - size: 'small', - icon: 'md-trash', - disabled: disabledFlag - }, - style: { - marginRight: '5px' - }, - on: { - click: () => { - vm.$emit('on-delete', params); - } - } - })]); - }, - edit: (h, params, vm) => { - let disabledFlag = false; - return h('Tooltip', { - props: { - content: '编辑', - placement: 'top', - transfer: true - } - }, [h('Button', { - props: { - type: 'primary', - size: 'small', - icon: 'md-trash', - disabled: disabledFlag - }, - style: { - marginRight: '5px' - }, - on: { - click: () => { - vm.$emit('on-edit', params); - } - } - })]); - } -}; - -export default btns; diff --git a/smart-admin-web/src/components/tables/index.js b/smart-admin-web/src/components/tables/index.js deleted file mode 100644 index 899190c0..00000000 --- a/smart-admin-web/src/components/tables/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import Tables from './tables.vue'; -export default Tables; diff --git a/smart-admin-web/src/components/tables/index.less b/smart-admin-web/src/components/tables/index.less deleted file mode 100644 index 3c352e11..00000000 --- a/smart-admin-web/src/components/tables/index.less +++ /dev/null @@ -1,17 +0,0 @@ -.search-con{ - padding: 10px 0; - .search{ - &-col{ - display: inline-block; - width: 200px; - } - &-input{ - display: inline-block; - width: 200px; - margin-left: 2px; - } - &-btn{ - margin-left: 2px; - } - } -} diff --git a/smart-admin-web/src/components/tables/tables.vue b/smart-admin-web/src/components/tables/tables.vue deleted file mode 100644 index 0c2329b4..00000000 --- a/smart-admin-web/src/components/tables/tables.vue +++ /dev/null @@ -1,342 +0,0 @@ - - - diff --git a/smart-admin-web/src/config/index.js b/smart-admin-web/src/config/index.js deleted file mode 100644 index a80b6815..00000000 --- a/smart-admin-web/src/config/index.js +++ /dev/null @@ -1,38 +0,0 @@ -console.log('api url : ', process.env.VUE_APP_URL); -console.log('websocket url : ', process.env.VUE_APP_SOCKET_URL); -export default { - /** - * @description 配置显示在浏览器标签的title - */ - title: 'Smart-Admin', - /** - * @description token在Cookie中存储的天数,默认1天 - */ - cookieExpires: 3, - /** - * @description 是否使用国际化,默认为false - * 如果不使用,则需要在路由中给需要在菜单中展示的路由设置meta: {title: 'xxx'} - * 用来在菜单中显示文字 - */ - useI18n: false, - /** - * @description api请求基础路径 - */ - baseUrl: { - apiUrl: process.env.VUE_APP_URL, - webSocketUrl: process.env.VUE_APP_SOCKET_URL - }, - /** - * @description 默认打开的首页的路由name值,默认为home - */ - homeName: 'Home', - /** - * @description 需要加载的插件 - */ - plugin: { - 'error-store': { - showInHeader: true, // 设为false后不会在顶部显示错误日志徽标 - developmentOff: true // 设为true后在开发环境不会收集错误信息,方便开发中排查错误 - } - } -}; diff --git a/smart-admin-web/src/constants/file.js b/smart-admin-web/src/constants/file.js deleted file mode 100644 index 6a205f55..00000000 --- a/smart-admin-web/src/constants/file.js +++ /dev/null @@ -1,24 +0,0 @@ -export const FILE_TYPE = { - LOCAL: { - value: 1, - desc: '本地文件服务' - }, - ALI_OSS: { - value: 2, - desc: '阿里OSS文件服务' - }, - QI_NIU_OSS: { - value: 3, - desc: '七牛文件服务' - } -}; -export const SERVICE_TYPE = { - BACK_USER: { - value: '1', - desc: '用户后台' - } -}; -export default { - FILE_TYPE, - SERVICE_TYPE -}; diff --git a/smart-admin-web/src/constants/index.js b/smart-admin-web/src/constants/index.js deleted file mode 100644 index 55101226..00000000 --- a/smart-admin-web/src/constants/index.js +++ /dev/null @@ -1,10 +0,0 @@ -import notice from './notice.js'; -import login from './login.js'; -import file from './file.js'; -import privilege from './privilege'; -export default { - ...notice, - ...login, - ...file, - ...privilege -}; diff --git a/smart-admin-web/src/constants/login.js b/smart-admin-web/src/constants/login.js deleted file mode 100644 index fb28973b..00000000 --- a/smart-admin-web/src/constants/login.js +++ /dev/null @@ -1,13 +0,0 @@ -export const PRIVILEGE_TYPE = { - MENU: { - value: 1, - desc: '是' - }, - POINTS: { - value: 2, - desc: '否' - } -}; -export default { - PRIVILEGE_TYPE -}; diff --git a/smart-admin-web/src/constants/notice.js b/smart-admin-web/src/constants/notice.js deleted file mode 100644 index 0d5315fa..00000000 --- a/smart-admin-web/src/constants/notice.js +++ /dev/null @@ -1,13 +0,0 @@ -export const NOTICE_STATUS = { - YES: { - value: 1, - desc: '是' - }, - NO: { - value: 0, - desc: '否' - } -}; -export default { - NOTICE_STATUS -}; diff --git a/smart-admin-web/src/constants/privilege.js b/smart-admin-web/src/constants/privilege.js deleted file mode 100644 index 885e86d6..00000000 --- a/smart-admin-web/src/constants/privilege.js +++ /dev/null @@ -1,14 +0,0 @@ -export const PRIVILEGE_TYPE_ENUM = { - MENU: { - value: 1, - desc: '菜单' - }, - POINTS: { - value: 2, - desc: '功能点' - } -}; - -export default { - PRIVILEGE_TYPE_ENUM -}; diff --git a/smart-admin-web/src/constants/table-page.js b/smart-admin-web/src/constants/table-page.js deleted file mode 100644 index 83586bfd..00000000 --- a/smart-admin-web/src/constants/table-page.js +++ /dev/null @@ -1,6 +0,0 @@ - -/** - * table分页 每页条数切换的配置 - */ -export const PAGE_SIZE_OPTIONS = [10,20,30,50,75,100,150,200,300,500,1000]; - diff --git a/smart-admin-web/src/directives/directives.js b/smart-admin-web/src/directives/directives.js deleted file mode 100644 index 701eec5d..00000000 --- a/smart-admin-web/src/directives/directives.js +++ /dev/null @@ -1,11 +0,0 @@ -import draggable from './module/draggable'; -import clipboard from './module/clipboard'; -import privilege from './module/privilege'; - -const directives = { - draggable, - clipboard, - privilege -}; - -export default directives; diff --git a/smart-admin-web/src/directives/index.js b/smart-admin-web/src/directives/index.js deleted file mode 100644 index dcc9ffb3..00000000 --- a/smart-admin-web/src/directives/index.js +++ /dev/null @@ -1,31 +0,0 @@ -import directive from './directives'; - -const importDirective = Vue => { - /** - * 拖拽指令 v-draggable="options" - * options = { - * trigger: /这里传入作为拖拽触发器的CSS选择器/, - * body: /这里传入需要移动容器的CSS选择器/, - * recover: /拖动结束之后是否恢复到原来的位置/ - * } - */ - Vue.directive('draggable', directive.draggable); - /** - * clipboard指令 v-draggable="options" - * options = { - * value: /在输入框中使用v-model绑定的值/, - * success: /复制成功后的回调/, - * error: /复制失败后的回调/ - * } - */ - Vue.directive('clipboard', directive.clipboard); - /** - * privilege指令 v-privilege="options" - * options = { - * value: /当前按钮的唯一权限识别/, - * } - */ - Vue.directive('privilege', directive.privilege); -}; - -export default importDirective; diff --git a/smart-admin-web/src/directives/module/clipboard.js b/smart-admin-web/src/directives/module/clipboard.js deleted file mode 100644 index 0684eb61..00000000 --- a/smart-admin-web/src/directives/module/clipboard.js +++ /dev/null @@ -1,30 +0,0 @@ -import Clipboard from 'clipboard'; -export default { - bind: (el, binding) => { - const clipboard = new Clipboard(el, { - text: () => binding.value.value - }); - el.__success_callback__ = binding.value.success; - el.__error_callback__ = binding.value.error; - clipboard.on('success', e => { - const callback = el.__success_callback__; - callback && callback(e); - }); - clipboard.on('error', e => { - const callback = el.__error_callback__; - callback && callback(e); - }); - el.__clipboard__ = clipboard; - }, - update: (el, binding) => { - el.__clipboard__.text = () => binding.value.value; - el.__success_callback__ = binding.value.success; - el.__error_callback__ = binding.value.error; - }, - unbind: (el, binding) => { - delete el.__success_callback__; - delete el.__error_callback__; - el.__clipboard__.destroy(); - delete el.__clipboard__; - } -}; diff --git a/smart-admin-web/src/directives/module/draggable.js b/smart-admin-web/src/directives/module/draggable.js deleted file mode 100644 index 8bf798b3..00000000 --- a/smart-admin-web/src/directives/module/draggable.js +++ /dev/null @@ -1,42 +0,0 @@ -import { on } from '@/lib/util'; -export default { - inserted: (el, binding, vnode) => { - let triggerDom = document.querySelector(binding.value.trigger); - triggerDom.style.cursor = 'move'; - let bodyDom = document.querySelector(binding.value.body); - let pageX = 0; - let pageY = 0; - let transformX = 0; - let transformY = 0; - let canMove = false; - const handleMousedown = e => { - let transform = /\(.*\)/.exec(bodyDom.style.transform); - if (transform) { - transform = transform[0].slice(1, transform[0].length - 1); - let splitxy = transform.split('px, '); - transformX = parseFloat(splitxy[0]); - transformY = parseFloat(splitxy[1].split('px')[0]); - } - pageX = e.pageX; - pageY = e.pageY; - canMove = true; - }; - const handleMousemove = e => { - let xOffset = e.pageX - pageX + transformX; - let yOffset = e.pageY - pageY + transformY; - if (canMove) - {bodyDom.style.transform = `translate(${xOffset}px, ${yOffset}px)`;} - }; - const handleMouseup = e => { - canMove = false; - }; - on(triggerDom, 'mousedown', handleMousedown); - on(document, 'mousemove', handleMousemove); - on(document, 'mouseup', handleMouseup); - }, - update: (el, binding, vnode) => { - if (!binding.value.recover) return; - let bodyDom = document.querySelector(binding.value.body); - bodyDom.style.transform = ''; - } -}; diff --git a/smart-admin-web/src/directives/module/privilege.js b/smart-admin-web/src/directives/module/privilege.js deleted file mode 100644 index d5016721..00000000 --- a/smart-admin-web/src/directives/module/privilege.js +++ /dev/null @@ -1,23 +0,0 @@ -// 页面内按钮过滤 -import store from '@/store/index'; -export default { - inserted: function (el, binding, vnode) { - // 获取当前路由name - // 如果页面为同一模块下的子页面则取最上级权限 - let routeName = vnode.context.$route.meta.privilegeExtend - ? vnode.context.$route.meta.privilegeExtend - : vnode.context.$route.name; - // 超级管理员 - if (store.state.user.userLoginInfo.isSuperMan) { - return true; - } - // 获取功能点权限 - let functionList = store.state.user.privilegeFunctionPointsMap.get(routeName); - // 有权限 - if (functionList && functionList.includes(binding.value)) { - - } else { - el.parentNode.removeChild(el); - } - } -}; diff --git a/smart-admin-web/src/lib/cookie.js b/smart-admin-web/src/lib/cookie.js deleted file mode 100644 index 83386119..00000000 --- a/smart-admin-web/src/lib/cookie.js +++ /dev/null @@ -1,21 +0,0 @@ -import Cookies from 'js-cookie'; -import config from '@/config'; -const { cookieExpires } = config; -export const TOKEN_KEY = 'token'; - -export default { - setToken: token => { - Cookies.set(TOKEN_KEY, token, { - // token在Cookie中存储的天数,默认1天 - expires: cookieExpires || 7 - }); - }, - getToken: () => { - const token = Cookies.get(TOKEN_KEY); - if (token) return token; - else return null; - }, - clearToken: () => { - Cookies.remove(TOKEN_KEY); - } -}; diff --git a/smart-admin-web/src/lib/http.js b/smart-admin-web/src/lib/http.js deleted file mode 100644 index 0223aa7b..00000000 --- a/smart-admin-web/src/lib/http.js +++ /dev/null @@ -1,161 +0,0 @@ -import Axios from 'axios'; -import config from '@/config'; -import { Message, Spin } from 'view-design'; -import cookie from '@/lib/cookie'; -// 之所以封装这个axios,是因为在一些请求中,无法上传信息,很尴尬,估计原因是继承的有问题,无法携带headers -export const baseUrl = config.baseUrl.apiUrl; -export const socketBaseUrl = config.baseUrl.webSocketUrl; - -let axios = Axios.create({ - baseURL: baseUrl, - timeout: 30000, - headers: { - 'Content-Type': 'application/json; charset=utf-8' - } -}); - -axios.interceptors.request.use( - function (config) { - // 在发送请求之前做些什么 - if (cookie.getToken()) { - config.headers['x-access-token'] = cookie.getToken(); - } - return config; - }, - function (error) { - // 对请求错误做些什么 - Spin.hide(); - return Promise.reject(error); - } -); -// 添加响应拦截器 -axios.interceptors.response.use( - res => { - if (res.config.responseType === 'blob') { - let isReturnJson = res.headers && res.headers['content-type'] && res.headers['content-type'].indexOf("json") > -1; - //后端返回错误信息 - if (isReturnJson) { - let reader = new FileReader() - reader.onload = function (event) { - let content = reader.result - let parseRes = JSON.parse(content) // 错误信息 - return validateResponseCode({ - data: parseRes - }); - } - reader.readAsText(res.data); - return true - } else { - //下载文件 - download(res); - } - } else { - //正常json请求 - return validateResponseCode(res); - } - }, - error => { - Spin.hide(); - Message.error('服务内部错误'); - console.log('1111', error); - // 对响应错误做点什么 - return Promise.reject(error); - } -); - -function validateResponseCode (res) { - let { data } = res; - if (data && data.code && data.code !== 1) { - if (data.code === 1001) { - cookie.clearToken(); - localStorage.clear(); - window.location.href = window.location.pathname + '#/login'; - Message.error('未登录,或登录失效,请登录'); - return; - } else if (data.code === 502) { - window.location.href = window.location.pathname + '#/500'; - return; - } else { - Spin.hide(); - Message.error(data.msg); - return Promise.reject(res); - } - } - return Promise.resolve(data); -} - -function blobToText (blob) { - return new Promise((resolve, reject) => { - const fileReader = new FileReader(); - fileReader.readAsText(blob); - fileReader.onload = function () { - try { - const result = JSON.parse(this.result); - if (result && result['resultCode'] === 'fail') { - resolve(result); - } else { - reject(); - } - } catch (e) { - //TODO handle the exception - reject(); - } - } - }) -} - -export const postAxios = (url, data) => { - return axios.post(url, data); -}; - -export const postFileUploadAxios = (url, data) => { - return axios.post(url, data, { headers: { 'Content-Type': 'multipart/form-data' } }); -}; - -export const getDownloadAxios = (url) => { - return axios.get(url, { responseType: 'blob' }); -}; - -export const postDownloadAxios = (url, data) => { - return axios.post(url, data, { responseType: 'blob' }); -}; - -export const getAxios = (url, data) => { - return axios.get(url, { - params: data - }); -}; - -function download (res) { - let reader = new FileReader(); - let data = res.data; - reader.onload = e => { - if (e.target.result.indexOf('Result') != -1 && JSON.parse(e.target.result).Result == false) { - // 进行错误处理 - } else { - let fileName = "download"; - let contentDisposition = res.headers['Content-Disposition']; - contentDisposition = contentDisposition ? contentDisposition : res.headers['content-disposition']; - if (contentDisposition) { - fileName = window.decodeURI(contentDisposition.split('=')[1], "UTF-8"); - } - executeDownload(data, fileName); - } - }; - reader.readAsText(data); -} - -// 模拟点击a 标签进行下载 -function executeDownload (data, fileName) { - if (!data) { - return - } - let url = window.URL.createObjectURL(new Blob([data])); - let link = document.createElement('a'); - link.style.display = 'none'; - link.href = url; - link.setAttribute('download', fileName); - document.body.appendChild(link); - link.click(); - document.body.removeChild(link); -} diff --git a/smart-admin-web/src/lib/local.js b/smart-admin-web/src/lib/local.js deleted file mode 100644 index c19d7e3d..00000000 --- a/smart-admin-web/src/lib/local.js +++ /dev/null @@ -1,8 +0,0 @@ -export const localSave = (key, value) => { - localStorage.setItem(key, value); -}; - -export const localRead = key => { - return localStorage.getItem(key) || ''; -}; - diff --git a/smart-admin-web/src/lib/menu-func.js b/smart-admin-web/src/lib/menu-func.js deleted file mode 100644 index 914d5379..00000000 --- a/smart-admin-web/src/lib/menu-func.js +++ /dev/null @@ -1,276 +0,0 @@ -import { forEach, hasOneOf, objEqual } from '@/lib/util'; -import config from '@/config'; -import { localRead, localSave } from '@/lib/local'; -const { title, useI18n } = config; -export const hasChild = item => { - return item.children && item.children.length !== 0; -}; - -/** - * 通过权限过滤菜单 - * @param {Object} map 权限对象 - * @param {Array} menuList 菜单列表 - * @returns {Array} - */ -export const getShowMenu = (map = {}, menuList, access = false) => { - // 判断是否为超级管理员 - if (access) { - return menuList; - } - // 返回的菜单列表 - let result = []; - for (let menuItem of menuList) { - let routerObj = JSON.parse(JSON.stringify(menuItem)); - if ( - map.hasOwnProperty(menuItem.name) && - (menuItem.name !== 'home' && menuItem.name !== '_home') - ) { - // 判断该菜单权限下是否为数组,若为数组,则为功能点权限否则为子菜单 - if (getType(map[routerObj.name]) === 'array') { - let funcPrivilege = localRead('funcPrivilegeInfo') - ? JSON.parse(localRead('funcPrivilegeInfo')) - : {}; - localSave( - 'funcPrivilegeInfo', - JSON.stringify({ - ...funcPrivilege, - [routerObj.name]: map[routerObj.name] - }) - ); - } else if ( - getType(map[routerObj.name]) !== 'array' && - !routerObj.children - ) { - // 判断是否为二级菜单,若是则需要多枚举一层赋值 - let funcPrivilege = localRead('funcPrivilegeInfo') - ? JSON.parse(localRead('funcPrivilegeInfo')) - : {}; - localSave( - 'funcPrivilegeInfo', - JSON.stringify({ - ...funcPrivilege, - [routerObj.name]: map[routerObj.name][routerObj.name] - }) - ); - } else if ( - getType(map[routerObj.name]) !== 'array' && - routerObj.children - ) { - // 循环子菜单权限 - routerObj.children = getShowMenu( - map[routerObj.name], - routerObj.children - ); - } - result.push(routerObj); - } - } - return result; -}; -// 获取数据类型 -export const getType = obj => { - return {}.toString - .call(obj) - .match(/\s([a-zA-Z]+)/)[1] - .toLowerCase(); -}; - -/** - * @description 本地存储和获取标签导航列表 - */ -export const setTagNavListInLocalStorage = list => { - localStorage.tagNaveList = JSON.stringify(list); -}; -/** - * @returns {Array} 其中的每个元素只包含路由原信息中的name, path, meta三项 - */ -export const getTagNavListFromLocalStorage = () => { - const list = localStorage.tagNaveList; - return list ? JSON.parse(list) : []; -}; -export const getBreadCrumbList = (route, homeRoute) => { - let homeItem = { - ...homeRoute, - icon: homeRoute.meta.icon - }; - let routeMatched = route.matched; - if (routeMatched.some(item => item.name === homeRoute.name)) { - return [homeItem]; - } - let res = routeMatched - .filter(item => { - return item.meta === undefined || !item.meta.hideInBread; - }) - .map(item => { - let meta = { - ...item.meta - }; - if (meta.title && typeof meta.title === 'function') { - meta.__titleIsFunction__ = true; - meta.title = meta.title(route); - } - let obj = { - icon: (item.meta && item.meta.icon) || '', - name: item.name, - meta: meta - }; - return obj; - }); - res = res.filter(item => { - return !item.meta.hideInMenu; - }); - return [...res]; -}; -/** - * @param {Array} routers 路由列表数组 - * @description 用于找到路由列表中name为home的对象 - */ -export const getHomeRoute = (routers, homeName = 'Home') => { - let i = -1; - let len = routers.length; - let homeRoute = {}; - while (++i < len) { - let item = routers[i]; - if (item.children && item.children.length) { - let res = getHomeRoute(item.children, homeName); - if (res.name) return res; - } else { - if (item.name === homeName) homeRoute = item; - } - } - return homeRoute; -}; -/** - * @param {Array} list 标签列表 - * @param {String} name 当前关闭的标签的name - */ -export const getNextRoute = (list, route) => { - let res = {}; - if (list.length === 2) { - res = getHomeRoute(list); - } else { - const index = list.findIndex(item => routeEqual(item, route)); - if (index === list.length - 1) res = list[list.length - 2]; - else res = list[index + 1]; - } - return res; -}; - -/** - * 判断打开的标签列表里是否已存在这个新添加的路由对象 - */ -export const routeHasExist = (tagNavList, routeItem) => { - let len = tagNavList.length; - let res = false; - doCustomTimes(len, index => { - if (routeEqual(tagNavList[index], routeItem)) res = true; - }); - return res; -}; -/** - * @param {*} list 现有标签导航列表 - * @param {*} newRoute 新添加的路由原信息对象 - * @description 如果该newRoute已经存在则不再添加 - */ -export const getNewTagList = (list, newRoute) => { - const { name, path, meta, query } = newRoute; - let newList = [...list]; - let index = newList.findIndex(item => item.name === name); - if (index >= 0) { - newList[index] = { name, path, meta, query }; - } else newList.push({ name, path, meta, query }); - return newList; -}; -export const routeEqual = (route1, route2) => { - return route1.name === route2.name; -}; -export const getRouteTitleHandled = route => { - let router = { - ...route - }; - let meta = { - ...route.meta - }; - let title = ''; - if (meta.title) { - if (typeof meta.title === 'function') { - meta.__titleIsFunction__ = true; - title = meta.title(router); - } else title = meta.title; - } - meta.title = title; - router.meta = meta; - return router; -}; -/** - * @param {Number} times 回调函数需要执行的次数 - * @param {Function} callback 回调函数 - */ -export const doCustomTimes = (times, callback) => { - let i = -1; - while (++i < times) { - callback(i); - } -}; -export const showTitle = (item, vm) => { - let { title, __titleIsFunction__ } = item.meta; - if (!title) return; - if (useI18n) { - if (title.includes('{{') && title.includes('}}') && useI18n) { - title = title.replace(/({{[\s\S]+?}})/, (m, str) => - str.replace(/{{([\s\S]*)}}/, (m, _) => vm.$t(_.trim())) - ); - } else if (__titleIsFunction__) title = item.meta.title; - else title = vm.$t(item.name); - } else title = (item.meta && item.meta.title) || item.name; - return title; -}; -/** - * @description 根据当前跳转的路由设置显示在浏览器标签的title - * @param {Object} routeItem 路由对象 - * @param {Object} vm Vue实例 - */ -export const setTitle = (routeItem, vm) => { - const handledRoute = getRouteTitleHandled(routeItem); - const pageTitle = showTitle(handledRoute, vm); - const resTitle = pageTitle ? `${pageTitle} - ${title}` : title; - window.document.title = resTitle; -}; - -export const findNodeUpper = (ele, tag) => { - if (ele.parentNode) { - if (ele.parentNode.tagName === tag.toUpperCase()) { - return ele.parentNode; - } else { - return findNodeUpper(ele.parentNode, tag); - } - } -}; - -export const findNodeUpperByClasses = (ele, classes) => { - let parentNode = ele.parentNode; - if (parentNode) { - let classList = parentNode.classList; - if ( - classList && - classes.every(className => classList.contains(className)) - ) { - return parentNode; - } else { - return findNodeUpperByClasses(parentNode, classes); - } - } -}; - -export const findNodeDownward = (ele, tag) => { - const tagName = tag.toUpperCase(); - if (ele.childNodes.length) { - let i = -1; - let len = ele.childNodes.length; - while (++i < len) { - let child = ele.childNodes[i]; - if (child.tagName === tagName) return child; - else return findNodeDownward(child, tag); - } - } -}; diff --git a/smart-admin-web/src/lib/printPlugs.js b/smart-admin-web/src/lib/printPlugs.js deleted file mode 100644 index 9c4295dd..00000000 --- a/smart-admin-web/src/lib/printPlugs.js +++ /dev/null @@ -1,133 +0,0 @@ -// 打印类属性、方法定义 -/* eslint-disable */ -//第二个参数表明是否要关闭当前窗口 -const Print = function(dom, close, options) { - if (!(this instanceof Print)) return new Print(dom, close, options); - - this.options = this.extend( - { - noPrint: '.no-print' - }, - options - ); - - if (typeof dom === 'string') { - this.dom = document.querySelector(dom); - } else { - this.dom = dom; - } - - this.init(close); -}; -Print.prototype = { - init: function(close) { - var content = this.getStyle() + this.getHtml(); - this.writeIframe(content, close); - }, - extend: function(obj, obj2) { - for (var k in obj2) { - obj[k] = obj2[k]; - } - return obj; - }, - - getStyle: function() { - var str = '', - styles = document.querySelectorAll('style,link'); - for (var i = 0; i < styles.length; i++) { - str += styles[i].outerHTML; - } - str += - ''; - - return str; - }, - - getHtml: function() { - var inputs = document.querySelectorAll('input'); - var textareas = document.querySelectorAll('textarea'); - var selects = document.querySelectorAll('select'); - - for (var k in inputs) { - if (inputs[k].type == 'checkbox' || inputs[k].type == 'radio') { - if (inputs[k].checked == true) { - inputs[k].setAttribute('checked', 'checked'); - } else { - inputs[k].removeAttribute('checked'); - } - } else if (inputs[k].type == 'text') { - inputs[k].setAttribute('value', inputs[k].value); - } - } - - for (var k2 in textareas) { - if (textareas[k2].type == 'textarea') { - textareas[k2].innerHTML = textareas[k2].value; - } - } - - for (var k3 in selects) { - if (selects[k3].type == 'select-one') { - var child = selects[k3].children; - for (var i in child) { - if (child[i].tagName == 'OPTION') { - if (child[i].selected == true) { - child[i].setAttribute('selected', 'selected'); - } else { - child[i].removeAttribute('selected'); - } - } - } - } - } - return this.dom.outerHTML; - }, - - writeIframe: function(content, close) { - var w, - doc, - iframe = document.createElement('iframe'), - f = document.body.appendChild(iframe); - iframe.id = 'myIframe'; - iframe.style = 'position:absolute;'; - - w = f.contentWindow || f.contentDocument; - doc = f.contentDocument || f.contentWindow.document; - doc.open(); - doc.write(content); - doc.close(); - this.toPrint(w, close); - setTimeout(function() { - document.body.removeChild(iframe); - }, 500); - }, - - toPrint: function(frameWindow, close) { - try { - setTimeout(function() { - frameWindow.focus(); - try { - if (!frameWindow.document.execCommand('print', false, null)) { - frameWindow.print(); - } - } catch (e) { - frameWindow.print(); - } - frameWindow.close(); - if (close) { - window.close(); - } - }, 500); - } catch (err) { - console.log('err', err); - } - } -}; -const MyPlugin = {}; -MyPlugin.install = function(Vue, options) { - // 4. 添加实例方法 - Vue.prototype.$print = Print; -}; -export default MyPlugin; diff --git a/smart-admin-web/src/lib/render-dom.js b/smart-admin-web/src/lib/render-dom.js deleted file mode 100644 index 1cad207e..00000000 --- a/smart-admin-web/src/lib/render-dom.js +++ /dev/null @@ -1,10 +0,0 @@ -export default { - name: 'RenderDom', - functional: true, - props: { - render: Function - }, - render: (h, ctx) => { - return ctx.props.render(h); - } -}; diff --git a/smart-admin-web/src/lib/table-action.js b/smart-admin-web/src/lib/table-action.js deleted file mode 100644 index f9a541fc..00000000 --- a/smart-admin-web/src/lib/table-action.js +++ /dev/null @@ -1,84 +0,0 @@ -// 处理table操作按钮 -const tableAction = (h, array) => { - let btnArray = []; - let btnMore = []; - array.map((item, index) => { - if (index < 2) { - let btn = h( - 'a', - { - props: { - type: !index ? 'primary' : 'info', - size: 'small', - to: item.to ? item.to : '', - target: item.target ? item.target : '_self', - ghost: true - }, - style: { - marginLeft: '5px' - }, - directives: item.directives, - on: { - click: item.action - } - }, - item.title - ); - btnArray.push(btn); - } else { - btnMore.push( - h( - 'DropdownItem', - { - nativeOn: { - click: item.action - } - }, - item.title - ) - ); - } - }); - let dropdown = h( - 'Dropdown', - { - props: { - transfer: true - } - }, - [ - h( - 'a', - { - props: { - type: 'default', - size: 'small' - }, - style: { - marginLeft: '5px' - } - }, - [ - h('span', '更多'), - h('Icon', { - props: { - type: 'ios-arrow-down' - } - }) - ] - ), - h( - 'DropdownMenu', - { - slot: 'list' - }, - btnMore - ) - ] - ); - if (array.length > 2) { - btnArray.push(dropdown); - } - return btnArray; -}; -export default tableAction; diff --git a/smart-admin-web/src/lib/util.js b/smart-admin-web/src/lib/util.js deleted file mode 100644 index 6a3845b0..00000000 --- a/smart-admin-web/src/lib/util.js +++ /dev/null @@ -1,515 +0,0 @@ -import moment from 'moment'; -/** - * @param {String} url - * @description 从URL中解析参数 - */ -export const getParams = url => { - const keyValueArr = url.split('?')[1].split('&'); - let paramObj = {}; - keyValueArr.forEach(item => { - const keyValue = item.split('='); - paramObj[keyValue[0]] = keyValue[1]; - }); - return paramObj; -}; - -/** - * @param {Any} obj - * @description 获取数据类型 - */ -export const getType = obj => { - return {}.toString - .call(obj) - .match(/\s([a-zA-Z]+)/)[1] - .toLowerCase(); -}; -// 日期格式 -export const dateFormat = { - YMD: 'YMD', - YMDHM: 'YMDHM', - YMDHMS: 'YMDHMS' -}; -export const forEach = (arr, fn) => { - if (!arr.length || !fn) return; - let i = -1; - let len = arr.length; - while (++i < len) { - let item = arr[i]; - fn(item, i, arr); - } -}; - -/** - * @param {Array} arr1 - * @param {Array} arr2 - * @description 得到两个数组的交集, 两个数组的元素为数值或字符串 - */ -export const getIntersection = (arr1, arr2) => { - let len = Math.min(arr1.length, arr2.length); - let i = -1; - let res = []; - while (++i < len) { - const item = arr2[i]; - if (arr1.indexOf(item) > -1) res.push(item); - } - return res; -}; - -/** - * @param {Array} arr1 - * @param {Array} arr2 - * @description 得到两个数组的并集, 两个数组的元素为数值或字符串 - */ -export const getUnion = (arr1, arr2) => { - return Array.from(new Set([...arr1, ...arr2])); -}; - -/** - * @param {Array} target 目标数组 - * @param {Array} arr 需要查询的数组 - * @description 判断要查询的数组是否至少有一个元素包含在目标数组中 - */ -export const hasOneOf = (targetarr, arr) => { - return targetarr.some(_ => arr.indexOf(_) > -1); -}; - -/** - * @param {String|Number} value 要验证的字符串或数值 - * @param {*} validList 用来验证的列表 - */ -export function oneOf (value, validList) { - for (let i = 0; i < validList.length; i++) { - if (value === validList[i]) { - return true; - } - } - return false; -} - -/** - * @param {Number} timeStamp 判断时间戳格式是否是毫秒 - * @returns {Boolean} - */ -const isMillisecond = timeStamp => { - const timeStr = String(timeStamp); - return timeStr.length > 10; -}; - -/** - * @param {Number} timeStamp 传入的时间戳 - * @param {Number} currentTime 当前时间时间戳 - * @returns {Boolean} 传入的时间戳是否早于当前时间戳 - */ -const isEarly = (timeStamp, currentTime) => { - return timeStamp < currentTime; -}; - -/** - * @param {Number} num 数值 - * @returns {String} 处理后的字符串 - * @description 如果传入的数值小于10,即位数只有1位,则在前面补充0 - */ -const getHandledValue = num => { - return num < 10 ? '0' + num : num; -}; - -/** - * @param {Number} timeStamp 传入的时间戳 - * @param {Number} startType 要返回的时间字符串的格式类型,传入'year'则返回年开头的完整时间 - */ -const getDate = (timeStamp, startType) => { - const d = new Date(timeStamp * 1000); - const year = d.getFullYear(); - const month = getHandledValue(d.getMonth() + 1); - const date = getHandledValue(d.getDate()); - const hours = getHandledValue(d.getHours()); - const minutes = getHandledValue(d.getMinutes()); - const second = getHandledValue(d.getSeconds()); - let resStr = ''; - if (startType === 'year') { - resStr = - year + - '-' + - month + - '-' + - date + - ' ' + - hours + - ':' + - minutes + - ':' + - second; - } - else resStr = month + '-' + date + ' ' + hours + ':' + minutes; - return resStr; -}; - -/** - * @param {String|Number} timeStamp 时间戳 - * @returns {String} 相对时间字符串 - */ -export const getRelativeTime = timeStamp => { - // 判断当前传入的时间戳是秒格式还是毫秒 - const IS_MILLISECOND = isMillisecond(timeStamp); - // 如果是毫秒格式则转为秒格式 - if (IS_MILLISECOND) Math.floor((timeStamp /= 1000)); - // 传入的时间戳可以是数值或字符串类型,这里统一转为数值类型 - timeStamp = Number(timeStamp); - // 获取当前时间时间戳 - const currentTime = Math.floor(Date.parse(new Date()) / 1000); - // 判断传入时间戳是否早于当前时间戳 - const IS_EARLY = isEarly(timeStamp, currentTime); - // 获取两个时间戳差值 - let diff = currentTime - timeStamp; - // 如果IS_EARLY为false则差值取反 - if (!IS_EARLY) diff = -diff; - let resStr = ''; - const dirStr = IS_EARLY ? '前' : '后'; - // 少于等于59秒 - if (diff <= 59) resStr = diff + '秒' + dirStr; - // 多于59秒,少于等于59分钟59秒 - else if (diff > 59 && diff <= 3599) { resStr = Math.floor(diff / 60) + '分钟' + dirStr; } - // 多于59分钟59秒,少于等于23小时59分钟59秒 - else if (diff > 3599 && diff <= 86399) { resStr = Math.floor(diff / 3600) + '小时' + dirStr; } - // 多于23小时59分钟59秒,少于等于29天59分钟59秒 - else if (diff > 86399 && diff <= 2623859) { resStr = Math.floor(diff / 86400) + '天' + dirStr; } - // 多于29天59分钟59秒,少于364天23小时59分钟59秒,且传入的时间戳早于当前 - else if (diff > 2623859 && diff <= 31567859 && IS_EARLY) { resStr = getDate(timeStamp); } - else resStr = getDate(timeStamp, 'year'); - return resStr; -}; - -/** - * @returns {String} 当前浏览器名称 - */ -export const getExplorer = () => { - const ua = window.navigator.userAgent; - const isExplorer = exp => { - return ua.indexOf(exp) > -1; - }; - if (isExplorer('MSIE')) return 'IE'; - else if (isExplorer('Firefox')) return 'Firefox'; - else if (isExplorer('Chrome')) return 'Chrome'; - else if (isExplorer('Opera')) return 'Opera'; - else if (isExplorer('Safari')) return 'Safari'; -}; - -/** - * @description 绑定事件 on(element, event, handler) - */ -export const on = (function () { - if (document.addEventListener) { - return function (element, event, handler) { - if (element && event && handler) { - element.addEventListener(event, handler, false); - } - }; - } else { - return function (element, event, handler) { - if (element && event && handler) { - element.attachEvent('on' + event, handler); - } - }; - } -})(); - -/** - * @description 解绑事件 off(element, event, handler) - */ -export const off = (function () { - if (document.removeEventListener) { - return function (element, event, handler) { - if (element && event) { - element.removeEventListener(event, handler, false); - } - }; - } else { - return function (element, event, handler) { - if (element && event) { - element.detachEvent('on' + event, handler); - } - }; - } -})(); - -/** - * 判断一个对象是否存在key,如果传入第二个参数key,则是判断这个obj对象是否存在key这个属性 - * 如果没有传入key这个参数,则判断obj对象是否有键值对 - */ -export const hasKey = (obj, key) => { - if (key) return key in obj; - else { - let keysArr = Object.keys(obj); - return keysArr.length; - } -}; - -/** - * @param {*} obj1 对象 - * @param {*} obj2 对象 - * @description 判断两个对象是否相等,这两个对象的值只能是数字或字符串 - */ -export const objEqual = (obj1, obj2) => { - const keysArr1 = Object.keys(obj1); - const keysArr2 = Object.keys(obj2); - if (keysArr1.length !== keysArr2.length) return false; - else if (keysArr1.length === 0 && keysArr2.length === 0) return true; - /* eslint-disable-next-line */ else { return !keysArr1.some(key => obj1[key] != obj2[key]); } -}; - -// 相关工具类 -export const utils = { - /** - * @description table实现反选 - * @param {Object} vm Vue实例 - * @param {Array} tableSelectDate 选中的数据 - * @param {Array} allData 所有数据 - * @param {Array} key 数据中的唯一值 - */ - reverseSelect (vm, tableSelectDate, allData, key) { - let copyMess = JSON.parse(JSON.stringify(tableSelectDate)); - // 流程:先全部选中->再部分选中 - vm.handleSelectAll(false); - // 选中的idList - let idList = copyMess.map(item => item[key]); - console.log(idList); - for (let item of allData) { - if (idList.every(id => id !== item.id)) { - vm.$set(item, '_checked', true); - tableSelectDate.push(item); - } else { - vm.$set(item, '_checked', false); - } - } - }, - // 校验字符串是否相同 合同使用 - contrastString (originStr, changeStr) { - let origin = originStr - .replace(/\s*/g, '') - .replace(/"/g, '\'') - .replace(/ /g, '') - .replace(/disabled=\/'\/'/g, 'disabled'); - let change = changeStr - .replace(/\s*/g, '') - .replace(/"/g, '\'') - .replace(/ /g, '') - .replace(/disabled=\/'\/'/g, 'disabled'); - return origin === change; - }, - // 获取当前日期getDateStr(0)、前几天getDateStr(-10)、后几天getDateStr(20) - getDateStr (AddDayCount, format) { - let date = new Date(); - // 获取AddDayCount天后的日期 - date.setDate(date.getDate() + AddDayCount); - return this.getDate(date, format); - }, - getDate (date, format) { - let year = date.getFullYear(); - // day获取当前几号,不足10补0 - let day = date.getDate() > 9 ? date.getDate() : '0' + date.getDate(); - // month获取当前月份的日期,不足10补0 - let month = - date.getMonth() + 1 > 9 - ? date.getMonth() + 1 - : '0' + (date.getMonth() + 1); - // h获取当前小时,不足10补0 - let h = date.getHours() > 9 ? date.getHours() : '0' + date.getHours(); - // s获取当前分钟,不足10补0 - let m = date.getMinutes() > 9 ? date.getMinutes() : '0' + date.getMinutes(); - // s获取当前秒数,不足10补0 - let s = date.getSeconds() > 9 ? date.getSeconds() : '0' + date.getSeconds(); - let resultDate = ''; - if (format === dateFormat.YMD) { - resultDate = year + '-' + month + '-' + day; - } - if (format === dateFormat.YMDHM) { - resultDate = year + '-' + month + '-' + day + ' ' + h + ':' + m; - } - if (format === dateFormat.YMDHMS) { - resultDate = year + '-' + month + '-' + day + ' ' + h + ':' + m + ':' + s; - } - return resultDate; - }, - // 获取周一和周日日期,返回两种格式时间 - getDateWeek () { - let now = new Date(); - let nowTime = now.getTime(); - let day = now.getDay(); - let oneDayLong = 1000 * 60 * 60 * 24; - let MondayTime = nowTime - (day - 1) * oneDayLong; - let SundayTime = nowTime + (7 - day) * oneDayLong; - let monday = new Date(MondayTime); - let sunday = new Date(SundayTime); - return { - // first: this.getDateAll(monday), - // last: this.getDateAll(sunday), - firstDate: monday, - lastDate: sunday - }; - }, - // 获取月初与月末日期,返回两种时间格式 - getDateMonth () { - let dateFirter = new Date(); - let dateLast = new Date(); - dateFirter.setDate(1); - - let currentMonth = dateLast.getMonth(); - let nextMonth = ++currentMonth; - let nextMonthFirstDay = new Date(dateLast.getFullYear(), nextMonth, 1); - let oneDay = 1000 * 60 * 60 * 24; - dateLast = new Date(nextMonthFirstDay - oneDay); - - return { - // first: this.getDateAll(dateFirter), - // last: this.getDateAll(dateLast), - firstDate: dateFirter, - lastDate: dateLast - }; - }, - // 计算天数 - getDayBetweenDate (date) { - date = this.getDate(new Date(date), 'YMD'); - let startTime = Date.parse(new Date(date)); // IE支持“yyyy/MM/dd”格式 - let endTime = Date.parse(this.getDate(new Date(), 'YMD')); - let day = parseInt((endTime - startTime) / (1000 * 60 * 60 * 24)); - return day; - }, - getDateIntervalYear (firstDate, secondDate) { - if (!firstDate || !secondDate) { - return 0; - } - let first = new Date(firstDate); - let second = new Date(secondDate); - let firstYear = first.getFullYear(); - let secondYear = second.getFullYear(); - let intervalYear = secondYear - firstYear; - return intervalYear < 0 ? 0 : intervalYear; - }, - getDateIntervalYearFixed2 (firstDate, secondDate) { - if (!firstDate || !secondDate) { - return 0; - } - // 格式化时间 - let startDate = new Date(this.getDate(new Date(firstDate), 'YMD')); - let endDate = new Date(this.getDate(new Date(secondDate), 'YMD')); - // 得到毫秒值 - let startTime = Date.parse(startDate); - let endTime = Date.parse(endDate); - // 得到差了多少天 - let day = parseInt((endTime - startTime) / (1000 * 60 * 60 * 24)); - if (day <= 0) { - return 0; - } - // 得到差的多少年 保留两位小数 - let resultYear = parseFloat((day / (30 * 12)).toFixed(2)); - return resultYear; - }, - // 数字转化为中文大写 - // 代码如下所示: - convertCurrency (money) { - // 汉字的数字 - let cnNums = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']; - // 基本单位 - let cnIntRadice = ['', '拾', '佰', '仟']; - // 对应整数部分扩展单位 - let cnIntUnits = ['', '万', '亿', '兆']; - // 对应小数部分单位 - let cnDecUnits = ['角', '分', '毫', '厘']; - // 整数金额时后面跟的字符 - let cnInteger = '整'; - // 整型完以后的单位 - let cnIntLast = '元'; - // 最大处理的数字 - let maxNum = 999999999999999.9999; - // 金额整数部分 - let integerNum; - // 金额小数部分 - let decimalNum; - // 输出的中文金额字符串 - let chineseStr = ''; - // 分离金额后用的数组,预定义 - let parts; - if (money === '') { - return ''; - } - money = parseFloat(money); - if (money >= maxNum) { - // 超出最大处理数字 - return ''; - } - if (money === 0) { - chineseStr = cnNums[0] + cnIntLast + cnInteger; - return chineseStr; - } - // 转换为字符串 - money = money.toString(); - if (money.indexOf('.') === -1) { - integerNum = money; - decimalNum = ''; - } else { - parts = money.split('.'); - integerNum = parts[0]; - decimalNum = parts[1].substr(0, 4); - } - // 获取整型部分转换 - if (parseInt(integerNum, 10) > 0) { - let zeroCount = 0; - let IntLen = integerNum.length; - for (let i = 0; i < IntLen; i++) { - let n = integerNum.substr(i, 1); - let p = IntLen - i - 1; - let q = p / 4; - let m = p % 4; - if (n === '0') { - zeroCount++; - } else { - if (zeroCount > 0) { - chineseStr += cnNums[0]; - } - // 归零 - zeroCount = 0; - chineseStr += cnNums[parseInt(n)] + cnIntRadice[m]; - } - if (m === 0 && zeroCount < 4) { - chineseStr += cnIntUnits[q]; - } - } - chineseStr += cnIntLast; - } - // 小数部分 - if (decimalNum !== '') { - let decLen = decimalNum.length; - for (let i = 0; i < decLen; i++) { - let n = decimalNum.substr(i, 1); - if (n !== '0') { - chineseStr += cnNums[Number(n)] + cnDecUnits[i]; - } - } - } - if (chineseStr === '') { - chineseStr += cnNums[0] + cnIntLast + cnInteger; - } else if (decimalNum === '') { - chineseStr += cnInteger; - } - return chineseStr; - } -}; - - -export const dateTimeRangeConvert = (timerange) => { - // timerange - let arr = []; - if (timerange[0] === '') { - arr.push(null); - } else { - arr.push(moment(timerange[0]).format("YYYY-MM-DD 00:00:00")); - } - - if (timerange[1] === '') { - arr.push(null); - } else { - arr.push(moment(timerange[1]).format("YYYY-MM-DD 23:59:59")); - } - return arr; -} - diff --git a/smart-admin-web/src/locale/index.js b/smart-admin-web/src/locale/index.js deleted file mode 100644 index 5509260c..00000000 --- a/smart-admin-web/src/locale/index.js +++ /dev/null @@ -1,37 +0,0 @@ -import Vue from 'vue'; -import VueI18n from 'vue-i18n'; -import { localRead } from '@/lib/local'; -import customZhCn from './lang/zh-CN'; -import customZhTw from './lang/zh-TW'; -import customEnUs from './lang/en-US'; -import zhCnLocale from 'view-design/src/locale/lang/zh-CN'; -import enUsLocale from 'view-design/src/locale/lang/en-US'; -import zhTwLocale from 'view-design/src/locale/lang/zh-TW'; - -Vue.use(VueI18n); - -// 自动根据浏览器系统语言设置语言 -const navLang = navigator.language; -const localLang = (navLang === 'zh-CN' || navLang === 'en-US') ? navLang : false; -let lang = localLang || localRead('local') || 'zh-CN'; - -Vue.config.lang = lang; - -// vue-i18n 6.x+写法 -Vue.locale = () => { }; -const messages = { - 'zh-CN': Object.assign(zhCnLocale, customZhCn), - 'zh-TW': Object.assign(zhTwLocale, customZhTw), - 'en-US': Object.assign(enUsLocale, customEnUs) -}; -const i18n = new VueI18n({ - locale: lang, - messages -}); - -export default i18n; - -// vue-i18n 5.x写法 -// Vue.locale('zh-CN', Object.assign(zhCnLocale, customZhCn)) -// Vue.locale('en-US', Object.assign(zhTwLocale, customZhTw)) -// Vue.locale('zh-TW', Object.assign(enUsLocale, customEnUs)) diff --git a/smart-admin-web/src/locale/lang/en-US.js b/smart-admin-web/src/locale/lang/en-US.js deleted file mode 100644 index dc20d8f6..00000000 --- a/smart-admin-web/src/locale/lang/en-US.js +++ /dev/null @@ -1,46 +0,0 @@ -export default { - home: 'Home', - login: 'Login', - components: 'Components', - count_to_page: 'Count-to', - tables_page: 'Table', - split_pane_page: 'Split-pane', - markdown_page: 'Markdown-editor', - editor_page: 'Rich-Text-Editor', - icons_page: 'Custom-icon', - img_cropper_page: 'Image-editor', - update: 'Update', - doc: 'Document', - join_page: 'QQ Group', - update_table_page: 'Update .CSV', - update_paste_page: 'Paste Table Data', - multilevel: 'multilevel', - directive_page: 'Directive', - level_1: 'Level-1', - level_2: 'Level-2', - level_2_1: 'Level-2-1', - level_2_3: 'Level-2-3', - level_2_2: 'Level-2-2', - level_2_2_1: 'Level-2-2-1', - level_2_2_2: 'Level-2-2-2', - excel: 'Excel', - 'upload-excel': 'Upload Excel', - 'export-excel': 'Export Excel', - tools_methods_page: 'Tools Methods', - drag_list_page: 'Drag-list', - i18n_page: 'Internationalization', - modalTitle: 'Modal Title', - content: 'This is the modal box content.', - buttonText: 'Show Modal', - 'i18n-tip': 'Note: Only this page is multi-language, other pages do not add language content to the multi-language package.', - error_store_page: 'Error Collection', - error_logger_page: 'Error Logger', - query: 'Query', - params: 'Params', - cropper_page: 'Cropper', - message_page: 'Message Center', - tree_table_page: 'Tree Table', - org_tree_page: 'Org Tree', - drag_drawer_page: 'Draggable Drawer', - tree_select_page: 'Tree Selector' -} diff --git a/smart-admin-web/src/locale/lang/zh-CN.js b/smart-admin-web/src/locale/lang/zh-CN.js deleted file mode 100644 index 9e402562..00000000 --- a/smart-admin-web/src/locale/lang/zh-CN.js +++ /dev/null @@ -1,46 +0,0 @@ -export default { - home: '首页', - login: '登录', - components: '组件', - count_to_page: '数字渐变', - tables_page: '多功能表格', - split_pane_page: '分割窗口', - markdown_page: 'Markdown编辑器', - editor_page: '富文本编辑器', - icons_page: '自定义图标', - img_cropper_page: '图片编辑器', - update: '上传数据', - join_page: 'QQ群', - doc: '文档', - update_table_page: '上传CSV文件', - update_paste_page: '粘贴表格数据', - multilevel: '多级菜单', - directive_page: '指令', - level_1: 'Level-1', - level_2: 'Level-2', - level_2_1: 'Level-2-1', - level_2_3: 'Level-2-3', - level_2_2: 'Level-2-2', - level_2_2_1: 'Level-2-2-1', - level_2_2_2: 'Level-2-2-2', - excel: 'Excel', - 'upload-excel': '上传excel', - 'export-excel': '导出excel', - tools_methods_page: '工具函数', - drag_list_page: '拖拽列表', - i18n_page: '多语言', - modalTitle: '模态框题目', - content: '这是模态框内容', - buttonText: '显示模态框', - 'i18n-tip': '注:仅此页做了多语言,其他页面没有在多语言包中添加语言内容', - error_store_page: '错误收集', - error_logger_page: '错误日志', - query: '带参路由', - params: '动态路由', - cropper_page: '图片裁剪', - message_page: '消息中心', - tree_table_page: '树状表格', - org_tree_page: '组织结构树', - drag_drawer_page: '可拖动抽屉', - tree_select_page: '树状下拉选择器' -} diff --git a/smart-admin-web/src/locale/lang/zh-TW.js b/smart-admin-web/src/locale/lang/zh-TW.js deleted file mode 100644 index ce51c428..00000000 --- a/smart-admin-web/src/locale/lang/zh-TW.js +++ /dev/null @@ -1,46 +0,0 @@ -export default { - home: '首頁', - login: '登錄', - components: '组件', - count_to_page: '数字渐变', - tables_page: '多功能表格', - split_pane_page: '分割窗口', - markdown_page: 'Markdown編輯器', - editor_page: '富文本編輯器', - icons_page: '自定義圖標', - img_cropper_page: '圖片編輯器', - update: '上傳數據', - join_page: 'QQ群', - doc: '文檔', - update_table_page: '上傳CSV文件', - update_paste_page: '粘貼表格數據', - multilevel: '多级菜单', - directive_page: '指令', - level_1: 'Level-1', - level_2: 'Level-2', - level_2_1: 'Level-2-1', - level_2_3: 'Level-2-3', - level_2_2: 'Level-2-2', - level_2_2_1: 'Level-2-2-1', - level_2_2_2: 'Level-2-2-2', - excel: 'Excel', - 'upload-excel': '上傳excel', - 'export-excel': '導出excel', - tools_methods_page: '工具函數', - drag_list_page: '拖拽列表', - i18n_page: '多語言', - modalTitle: '模態框題目', - content: '這是模態框內容', - buttonText: '顯示模態框', - 'i18n-tip': '注:僅此頁做了多語言,其他頁面沒有在多語言包中添加語言內容', - error_store_page: '錯誤收集', - error_logger_page: '錯誤日誌', - query: '帶參路由', - params: '動態路由', - cropper_page: '圖片裁剪', - message_page: '消息中心', - tree_table_page: '樹狀表格', - org_tree_page: '組織結構樹', - drag_drawer_page: '可拖動抽屜', - tree_select_page: '樹狀下拉選擇器' -} diff --git a/smart-admin-web/src/main.js b/smart-admin-web/src/main.js deleted file mode 100644 index d213c7f2..00000000 --- a/smart-admin-web/src/main.js +++ /dev/null @@ -1,80 +0,0 @@ -// The Vue build version to load with the `import` command -// (runtime-only or standalone) has been set in webpack.base.conf with an alias. -import Vue from 'vue'; -import App from './App'; -import router from './router'; -import store from './store'; -import ViewUI from 'view-design'; -import i18n from '@/locale'; -import config from '@/config'; -import importDirective from '@/directives'; -import JsonViewer from 'vue-json-viewer'; -import _ from 'lodash'; -// import { directive as clickOutside } from 'v-click-outside-x'; -import * as vClickOutside from 'v-click-outside-x'; -import installPlugin from '@/plugins'; -import './themes/index.less'; -import '@/assets/icons/iconfont.css'; -import 'slick-carousel/slick/slick.css'; -import { Decimal } from 'decimal.js'; -// 枚举管理 -import Enum from 'vue-enum'; -import enumInfo from '@/constants'; -// 处理table操作按钮 -import tableAction from './lib/table-action'; - -// 时间 -import moment from 'moment'; - -import 'e-guide-layer/dist/e-guide-layer.css' -import eGuideLayer from 'e-guide-layer' - -Vue.use(eGuideLayer); - -Vue.prototype.$tableAction = tableAction; -Vue.use(Enum, { enumInfo }); -Vue.use(ViewUI, { - i18n: (key, value) => i18n.t(key, value) -}); -Vue.use(JsonViewer); -Vue.use(vClickOutside); - - -Number.prototype.toFixed = function (length) { - let x = new Decimal(this); - return x.toFixed(length); -}; - -//时间处理 -moment.locale('zh-cn'); //设置语言 或 moment.lang('zh-cn'); -Vue.prototype.$moment = moment;//赋值使用 - - -/** - * @description 注册admin内置插件 - */ -installPlugin(Vue); -/** - * @description 生产环境关掉提示 - */ -Vue.config.productionTip = false; -/** - * @description 全局注册应用配置 - */ -Vue.prototype.$config = config; -/** - * 注册指令 - */ -importDirective(Vue); -// Vue.directive('clickOutside', clickOutside); - -window._ = _; - -/* eslint-disable no-new */ -new Vue({ - el: '#app', - router, - i18n, - store, - render: h => h(App) -}); diff --git a/smart-admin-web/src/main.less b/smart-admin-web/src/main.less deleted file mode 100644 index 72a1a030..00000000 --- a/smart-admin-web/src/main.less +++ /dev/null @@ -1,37 +0,0 @@ -.warp-card { - margin-top: 10px; - &:first-child { - margin-top: 0; - } - .action-show { - .ivu-btn { - margin: 0 3px; - } - } - .action-hide { - .ivu-btn { - margin: 0 3px; - span { - //display: none; - } - } - } - .add-form { - padding-top: 15px; - } -} -.areaSelect .areaBox .areaArrow.active { - border-color: #689df6 !important; -} - -.areaSelect .areaBox .areaInput:hover, .areaSelect .areaBox .areaInput:focus { - border-color: #689df6 !important; -} - -.areaSelect .areaBox .areaModal ul li.active[data-v-16a01167] { - background: #fff !important; - color: #689df6 !important; -} -.main{ - .side-menu-wrapper .ivu-menu-dark .ivu-menu .ivu-menu-submenu-has-parent-submenu{ padding-left: 41px; } -} diff --git a/smart-admin-web/src/plugins/error-store/index.js b/smart-admin-web/src/plugins/error-store/index.js deleted file mode 100644 index c8b35b8f..00000000 --- a/smart-admin-web/src/plugins/error-store/index.js +++ /dev/null @@ -1,4 +0,0 @@ -import store from '@/store'; -export default { - install(Vue, options) {} -}; diff --git a/smart-admin-web/src/plugins/index.js b/smart-admin-web/src/plugins/index.js deleted file mode 100644 index 1a1c1870..00000000 --- a/smart-admin-web/src/plugins/index.js +++ /dev/null @@ -1,12 +0,0 @@ -import config from '@/config'; -const { plugin } = config; - -export default Vue => { - for (let name in plugin) { - const value = plugin[name]; - Vue.use( - require(`./${name}`).default, - typeof value === 'object' ? value : undefined - ); - } -}; diff --git a/smart-admin-web/src/router/before-close.js b/smart-admin-web/src/router/before-close.js deleted file mode 100644 index 0d4d61db..00000000 --- a/smart-admin-web/src/router/before-close.js +++ /dev/null @@ -1,17 +0,0 @@ -import { Modal } from 'view-design'; - -const beforeClose = { - before_close_normal: resolve => { - Modal.confirm({ - title: '确定要关闭这一页吗', - onOk: () => { - resolve(true); - }, - onCancel: () => { - resolve(false); - } - }); - } -}; - -export default beforeClose; diff --git a/smart-admin-web/src/router/index.js b/smart-admin-web/src/router/index.js deleted file mode 100644 index c86b14ee..00000000 --- a/smart-admin-web/src/router/index.js +++ /dev/null @@ -1,218 +0,0 @@ -import Vue from 'vue'; -import Router from 'vue-router'; -import { routers } from './routers'; -import store from '@/store'; -import ViewUI from 'view-design'; -import cookie from '@/lib/cookie'; -import { localRead } from '@/lib/local'; -import { setTitle } from '@/lib/menu-func'; -import config from '@/config'; - -const { homeName } = config; - -Vue.use(Router); -const router = new Router({ - // routes: routers, - routes: buildRouters(routers) - // mode: 'history' -}); -const LOGIN_PAGE_NAME = 'login'; - -// 防止用户刷新丢失登录信息 -if ( - Object.keys(store.state.user.userLoginInfo).length === 0 && - localRead('userLoginInfo') -) { - store.commit('setUserLoginInfo', JSON.parse(localRead('userLoginInfo'))); -} -// 解决路由跳转相同的地址报错 -const originalPush = Router.prototype.push; -Router.prototype.push = function (location) { - try { - return originalPush.call(this, location).catch(err => err); - } catch (error) { - // TODO zhuoda sentry - console.error(error); - } -}; - -// 关于当前页面 -Router.prototype.closeCurrentPage = function () { - let current = this.history.current; - store.commit('closeTag', current); - store.commit('deleteKeepAliveIncludes', current.name); -}; - -// 关闭当前页面然后跳转到指定页面 -Router.prototype.closeCurrentPageAndPush = function (pushParam) { - let current = this.history.current; - store.commit('closeTagNotPushNextRoute', current); - store.commit('deleteKeepAliveIncludes', current.name); - this.push(pushParam); -}; -let storeSelf = store; -router.beforeEach((to, from, next) => { - ViewUI.LoadingBar.start(); - const token = cookie.getToken(); - if (!token && to.name !== LOGIN_PAGE_NAME) { - // 未登录且要跳转的页面不是登录页 - next({ - name: LOGIN_PAGE_NAME // 跳转到登录页 - }); - } else if (!token && to.name === LOGIN_PAGE_NAME) { - // 未登陆且要跳转的页面是登录页 - next(); // 跳转 - } else if (token && to.name === LOGIN_PAGE_NAME) { - // 已登录且要跳转的页面是登录页 - next({ - // 跳转到home页 - name: homeName - }); - setTitle(to, router.app); - ViewUI.LoadingBar.finish(); - window.scrollTo(0, 0); - } else { - // 特殊页面直接放行 - if (to.meta.noValidatePrivilege) { - next(); - return; - } - - //如果是超管,直接放行 - if (store.state.user.userLoginInfo.isSuperMan) { - next(); - return; - } - - // 去掉/之后第一个字母 - let key = to.path.substr(1, 1); - let pathArray = storeSelf.state.user.privilegeRouterPathMap.get(key); - if (!(pathArray && pathArray.indexOf(to.path) >= 0)) { - next({ - name: 'Error401' - }); - } else { - next(); - } - } -}); - -router.afterEach(to => { - setTitle(to, router.app); - ViewUI.LoadingBar.finish(); - window.scrollTo(0, 0); -}); - -function buildRouters (routerArray) { - let lineRouters = []; - for (let routerItem of routerArray) { - //如果是顶层菜单 - if (routerItem.meta.topMenu) { - // for (let children of routerItem.children) { - let lineRouterArray = convertRouterTree2Line(routerItem.children); - lineRouters.push(...lineRouterArray); - // } - } else { - let lineRouterArray = convertRouterTree2Line([routerItem]); - lineRouters.push(...lineRouterArray); - } - } - return lineRouters; -} - -function convertRouterTree2Line (routerArray) { - //一级,比如 人员管理 - let topArray = []; - for (let router1Item of routerArray) { - let level2Array = []; - //二级,比如员工管理 - if (router1Item.children) { - for (let level2Item of router1Item.children) { - - let level2ItemCopy = {}; - for (let property in level2Item) { - if ('children' !== property) { - level2ItemCopy[property] = level2Item[property]; - } - } - - //三级, - if (level2Item.children) { - level2Array.push(...level2Item.children) - } - - level2ItemCopy.children = []; - level2Array.push(level2Item); - } - } - - let newTopRouterItem = {}; - for (let property in router1Item) { - if ('children' !== property) { - newTopRouterItem[property] = router1Item[property]; - } - } - - newTopRouterItem.children = level2Array; - topArray.push(newTopRouterItem); - } - - return topArray; -} - -let tempCheckObj = { - checkRouterNameMap: new Map(), - checkRouterPathMap: new Map() -}; - -function recursionCheckRouter (routerArray) { - for (let routerItem of routerArray) { - if (!routerItem.name) { - console.error('没有配置router name', routerItem); - } else { - let existNameRouter = tempCheckObj.checkRouterNameMap.get( - routerItem.name - ); - if (typeof existNameRouter !== 'undefined') { - console.error('存在相同的router name', routerItem, existNameRouter); - } else { - tempCheckObj.checkRouterNameMap.set(routerItem.name, routerItem); - } - } - - if (!routerItem.path) { - console.error('没有配置router path', routerItem); - } else { - // path必须以 / 开头 - if (routerItem.path !== '*' && routerItem.path.indexOf('/') !== 0) { - console.error('path 没有以/开头 ', routerItem); - } - - let existPathRouter = tempCheckObj.checkRouterPathMap.get( - routerItem.path - ); - if (typeof existPathRouter !== 'undefined') { - console.error('存在相同的router path', routerItem, existPathRouter); - } else { - tempCheckObj.checkRouterPathMap.set(routerItem.path, routerItem); - } - } - - if (routerItem.children) { - recursionCheckRouter(routerItem.children); - } - } -} - -//如果是开发环境,需要检测router的规范性 -if (process.env.NODE_ENV === 'development') { - recursionCheckRouter(routers); - delete tempCheckObj.checkRouterNameMap; - delete tempCheckObj.checkRouterPathMap; -} - -const topMenuArray = routers.filter(e => e.meta.topMenu); -export { topMenuArray }; - -export default router; - diff --git a/smart-admin-web/src/router/module/business/email.js b/smart-admin-web/src/router/module/business/email.js deleted file mode 100644 index 55c00de7..00000000 --- a/smart-admin-web/src/router/module/business/email.js +++ /dev/null @@ -1,40 +0,0 @@ -import Main from '@/components/main'; -// 基础设置 -export const emailSetting = [ - { - path: '/email', - name: 'Email', - component: Main, - meta: { - title: '邮件管理', - icon: 'icon iconfont iconyoujianguanli' - }, - children: [ - // 发送email - { - path: '/email/email-list', - name: 'EmailList', - meta: { - title: '邮件管理', - privilege: [ - { title: '查询', name: 'email-query' }, - { title: '新增', name: 'email-add' }, - { title: '编辑', name: 'email-update' }, - { title: '删除', name: 'email-delete' } - ] - }, - component: () => import('@/views/business/email/email-list.vue') - }, - // 发送email - { - path: '/email/send-mail', - name: 'SendMail', - meta: { - title: '发送邮件', - privilege: [{ title: '发送', name: 'email-send' }] - }, - component: () => import('@/views/business/email/send-mail.vue') - } - ] - } -]; diff --git a/smart-admin-web/src/router/module/business/index.js b/smart-admin-web/src/router/module/business/index.js deleted file mode 100644 index cf9ef2e4..00000000 --- a/smart-admin-web/src/router/module/business/index.js +++ /dev/null @@ -1,29 +0,0 @@ - -import Main from '@/components/main'; - -import { peony } from './peony'; -import { emailSetting } from './email'; -import { keepAlive } from './keep-alive'; -import { notice } from './notice'; -import { threeRouter } from './three-router'; - -// 业务 -export const business = [ - { - path: '/business', - name: 'Business', - component: Main, - meta: { - title: '业务功能', - topMenu:true, - icon: 'icon iconfont iconyoujianguanli' - }, - children: [ - ...peony, - ...emailSetting, - ...keepAlive, - ...notice, - ...threeRouter - ] - } -]; diff --git a/smart-admin-web/src/router/module/business/keep-alive.js b/smart-admin-web/src/router/module/business/keep-alive.js deleted file mode 100644 index 98c5e044..00000000 --- a/smart-admin-web/src/router/module/business/keep-alive.js +++ /dev/null @@ -1,31 +0,0 @@ -import Main from '@/components/main'; -// 接口文档 -export const keepAlive = [ - { - path: '/keep-alive', - name: 'KeepAlive', - component: Main, - meta: { - title: 'KeepAlive', - icon: 'icon iconfont iconxitongshezhi' - }, - children: [ - { - path: '/keep-alive/content-list', - name: 'KeepAliveContentList', - meta: { - title: 'KeepAlive列表' - }, - component: () => import('@/views/business/keep-alive/content-list.vue') - }, - { - path: '/keep-alive/add-content', - name: 'KeepAliveAddContent', - meta: { - title: 'KeepAlive表单' - }, - component: () => import('@/views/business/keep-alive/add-content.vue') - } - ] - } -]; diff --git a/smart-admin-web/src/router/module/business/notice.js b/smart-admin-web/src/router/module/business/notice.js deleted file mode 100644 index c4ae9550..00000000 --- a/smart-admin-web/src/router/module/business/notice.js +++ /dev/null @@ -1,52 +0,0 @@ -import Main from '@/components/main'; -// 消息管理 -export const notice = [ - { - path: '/notice', - name: 'Notice', - component: Main, - meta: { - title: '消息管理', - icon: 'icon iconfont iconnews' - }, - children: [ - { - path: '/notice/notice-list', - name: 'NoticeList', - meta: { - title: '通知管理', - privilege: [ - { title: '查询', name: 'notice-query' }, - { title: '添加', name: 'notice-add' }, - { title: '修改', name: 'notice-edit' }, - { title: '删除', name: 'notice-delete' }, - { title: '详情', name: 'notice-detail' }, - { title: '发送', name: 'notice-send' } - ] - }, - component: () => import('@/views/business/notice/notice-list.vue') - }, - { - path: '/notice/person-notice', - name: 'PersonNotice', - meta: { - title: '个人消息', - privilege: [ - { title: '查询', name: 'person-notice-query' }, - { title: '详情', name: 'person-notice-detail' } - ] - }, - component: () => import('@/views/business/notice/person-notice.vue') - }, - { - path: '/notice/notice-detail', - name: 'NoticeDetail', - meta: { - title: '消息详情', - hideInMenu:true - }, - component: () => import('@/views/business/notice/notice-detail.vue') - } - ] - } -]; diff --git a/smart-admin-web/src/router/module/business/peony.js b/smart-admin-web/src/router/module/business/peony.js deleted file mode 100644 index aff33eac..00000000 --- a/smart-admin-web/src/router/module/business/peony.js +++ /dev/null @@ -1,49 +0,0 @@ -import Main from '@/components/main'; -// t_peony路由 -export const peony = [ - { - path: '/peony', - name: 'Peony', - component: Main, - meta: { - title: '牡丹管理', - icon: 'icon iconfont iconyoujianguanli' - }, - children: [ - // 牡丹花 列表 - { - path: '/peony/peony-list', - name: 'PeonyList', - meta: { - title: '牡丹花列表', - privilege: [ - { title: '查询', name: 'peony-list-query' }, - { title: '新增', name: 'peony-list-add' }, - { title: '编辑', name: 'peony-list-update' }, - { title: '批量删除', name: 'peony-list-batch-delete' }, - { title: '批量导出', name: 'peony-list-batch-export' }, - { title: '导出全部', name: 'peony-list-export-all' } - ] - }, - component: () => import('@/views/business/peony/peony-list.vue') - }, - // 牡丹花 列表 1 - { - path: '/peony/peony-list1', - name: 'PeonyList1', - meta: { - title: '牡丹花列表1', - privilege: [ - { title: '查询', name: 'peony1-list-query' }, - { title: '新增', name: 'peony1-list-add' }, - { title: '编辑', name: 'peony1-list-update' }, - { title: '批量删除', name: 'peony1-list-batch-delete' }, - { title: '批量导出', name: 'peony1-list-batch-export' }, - { title: '导出全部', name: 'peony1-list-export-all' } - ] - }, - component: () => import('@/views/business/peony/peony-list.vue') - } - ] - } -]; diff --git a/smart-admin-web/src/router/module/business/three-router.js b/smart-admin-web/src/router/module/business/three-router.js deleted file mode 100644 index bd958adc..00000000 --- a/smart-admin-web/src/router/module/business/three-router.js +++ /dev/null @@ -1,63 +0,0 @@ -import Main from '@/components/main'; -// 三级路由演示 -export const threeRouter = [ - { - path: '/three-router', - name: 'ThreeRouter', - component: Main, - meta: { - title: '三级路由', - icon: 'icon iconfont iconzujian' - }, - children: [ - // 最大支持到三级菜单 - { - path: '/three-router/level-two', - name: 'LevelTwo', - meta: { - title: '三级菜单' - }, - children: [ - { - path: '/three-router/level-two/level-three1', - name: 'ThreeLevelRouterView', - meta: { - title: '三级菜单子颗粒', - privilege: [ - { title: '添加', name: 'three-level-router-view-add' }, - { title: '查询', name: 'three-level-router-view-query' }, - ] - }, - component: () => import('@/views/business/three-level-router/three-level-router-view.vue') - }, - { - path: '/three-router/level-two/level-three2', - name: 'RoleTwoTwo', - meta: { - title: '三级菜单子哈', - privilege: [ - { title: '添加', name: 'roleTwoTwo-add' }, - { title: '删除', name: 'roleTwoTwo-delete' }, - { title: '删除', name: 'roleTwoTwo-delete1' }, - { title: '删除', name: 'roleTwoTwo-delete2' }, - ] - }, - component: () => import('@/views/support/monitor/sql.vue') - } - ] - }, - { - path: '/three-router/level-two2', - name: 'RoleOneOne', - meta: { - title: '二级菜单', - privilege: [ - { title: '添加', name: 'roleOneOne-add' }, - { title: '删除', name: 'roleOneOne-delete' } - ] - }, - component: () => import('@/views/support/monitor/sql.vue') - } - ] - } -]; diff --git a/smart-admin-web/src/router/module/error.js b/smart-admin-web/src/router/module/error.js deleted file mode 100644 index 9ab50841..00000000 --- a/smart-admin-web/src/router/module/error.js +++ /dev/null @@ -1,33 +0,0 @@ -// 错误页 -export const error = [ - { - path: '/401', - name: 'Error401', - meta: { - hideInMenu: true, - access: true, - noValidatePrivilege: true - }, - component: () => import('@/views/error-page/401.vue') - }, - { - path: '/500', - name: 'Error500', - meta: { - hideInMenu: true, - access: true, - noValidatePrivilege: true - }, - component: () => import('@/views/error-page/500.vue') - }, - { - path: '*', - name: 'http://localhost:8080/#employee/role-employee-manage', - meta: { - hideInMenu: true, - access: true, - noValidatePrivilege: true - }, - component: () => import('@/views/error-page/404.vue') - } -]; diff --git a/smart-admin-web/src/router/module/home.js b/smart-admin-web/src/router/module/home.js deleted file mode 100644 index 87ca26a6..00000000 --- a/smart-admin-web/src/router/module/home.js +++ /dev/null @@ -1,29 +0,0 @@ -import Main from '@/components/main'; -// 首页 -export const home = [ - { - path: '/', - name: '_home', - redirect: '/home', - component: Main, - meta: { - title: '首页', - noKeepAlive: true, - hideInMenu: true, - noValidatePrivilege: true, - icon: 'icon iconfont iconxitongshezhi' - }, - children: [ - { - path: '/home', - name: 'Home', - meta: { - title: '首页', - noValidatePrivilege: true, - noKeepAlive: true - }, - component: () => import('@/views/home') - } - ] - } -]; diff --git a/smart-admin-web/src/router/module/support/api-doc.js b/smart-admin-web/src/router/module/support/api-doc.js deleted file mode 100644 index 8336078c..00000000 --- a/smart-admin-web/src/router/module/support/api-doc.js +++ /dev/null @@ -1,25 +0,0 @@ -import Main from '@/components/main'; -// 接口文档 -export const apiDoc = [ - { - path: '/api-doc', - component: Main, - name: 'ApiDoc', - meta: { - title: '接口文档', - icon: 'icon iconfont iconjiekouwendang' - }, - - children: [ - { - path: '/api-doc/swagger', - name: 'Swagger', - meta: { - title: 'Swagger接口文档', - icon: 'icon iconfont iconjiekouwendang' - }, - component: () => import('@/views/support/api-doc/swagger.vue') - } - ] - } -]; diff --git a/smart-admin-web/src/router/module/support/heart-beat.js b/smart-admin-web/src/router/module/support/heart-beat.js deleted file mode 100644 index 82e51a01..00000000 --- a/smart-admin-web/src/router/module/support/heart-beat.js +++ /dev/null @@ -1,31 +0,0 @@ -import Main from '@/components/main'; -// 心跳服务 -export const heartBeat = [ - { - path: '/heart-beat', - name: 'HeartBeat', - component: Main, - meta: { - title: '心跳服务', - icon: 'icon iconfont icondingshirenwu' - }, - - children: [ - { - path: '/heart-beat/heart-beat-list', - name: 'HeartBeatList', - meta: { - title: '心跳服务', - icon: 'icon iconfont icondingshirenwu', - privilege: [ - { - title: '查询任务', - name: 'heart-beat-query' - } - ] - }, - component: () => import('@/views/support/heart-beat/heart-beat-list.vue') - } - ] - } -]; diff --git a/smart-admin-web/src/router/module/support/index.js b/smart-admin-web/src/router/module/support/index.js deleted file mode 100644 index 0f1d4ad0..00000000 --- a/smart-admin-web/src/router/module/support/index.js +++ /dev/null @@ -1,30 +0,0 @@ - -import Main from '@/components/main'; - - -import { apiDoc } from './api-doc'; -import { heartBeat } from './heart-beat'; -import { monitor } from './monitor'; -import { reload } from './reload'; -import { task } from './task'; - -// 业务 -export const support = [ - { - path: '/support', - name: 'Support', - component: Main, - meta: { - title: '开发专用', - topMenu: true, - icon: 'icon iconfont iconjiekouwendang' - }, - children: [ - ...apiDoc, - ...heartBeat, - ...monitor, - ...reload, - ...task - ] - } -]; diff --git a/smart-admin-web/src/router/module/support/monitor.js b/smart-admin-web/src/router/module/support/monitor.js deleted file mode 100644 index 064ec831..00000000 --- a/smart-admin-web/src/router/module/support/monitor.js +++ /dev/null @@ -1,34 +0,0 @@ -import Main from '@/components/main'; -// 系统监控 -export const monitor = [ - { - path: '/monitor', - component: Main, - name: 'Monitor', - meta: { - title: '系统监控', - icon: 'icon iconfont iconxitongjiankong' - }, - children: [ - // 在线人数 - { - path: '/monitor/online-user', - name: 'OnlineUser', - meta: { - title: '在线人数', - privilege: [{ title: '查询', name: 'online-user-search' }] - }, - component: () => import('@/views/support/monitor/online-user.vue') - }, - // SQL监控 - { - path: '/monitor/sql', - name: 'Sql', - meta: { - title: 'SQL监控' - }, - component: () => import('@/views/support/monitor/sql.vue') - } - ] - } -]; diff --git a/smart-admin-web/src/router/module/support/reload.js b/smart-admin-web/src/router/module/support/reload.js deleted file mode 100644 index 929a10d5..00000000 --- a/smart-admin-web/src/router/module/support/reload.js +++ /dev/null @@ -1,40 +0,0 @@ -import Main from '@/components/main'; -// 动态加载 -export const reload = [ - { - path: '/reload', - name: 'Reload', - component: Main, - meta: { - title: '动态加载', - icon: 'icon iconfont icondongtaijiazai' - }, - - children: [ - { - path: '/reload/smart-reload-list', - name: 'SmartReloadList', - meta: { - title: 'SmartReload', - icon: 'icon iconfont icondongtaijiazai', - privilege: [ - { - title: '查询', - name: 'smart-reload-search' - }, - { - title: '执行reload', - name: 'smart-reload-update' - }, - { - title: '查看执行结果', - name: 'smart-reload-result' - } - ] - }, - component: () => - import('@/views/support/reload/smart-reload/smart-reload-list.vue') - } - ] - } -]; diff --git a/smart-admin-web/src/router/module/support/task.js b/smart-admin-web/src/router/module/support/task.js deleted file mode 100644 index 97b2c869..00000000 --- a/smart-admin-web/src/router/module/support/task.js +++ /dev/null @@ -1,63 +0,0 @@ -import Main from '@/components/main'; -// 任务调度 -export const task = [ - { - path: '/task', - name: 'Task', - component: Main, - meta: { - title: '定时任务', - icon: 'icon iconfont icondingshirenwu' - }, - - children: [ - { - path: '/system-setting/task-list', - name: 'TaskList', - meta: { - title: '任务管理', - icon: 'icon iconfont icondingshirenwu', - privilege: [ - { - title: '查询任务', - name: 'task-search' - }, - { - title: '刷新任务', - name: 'task-refresh' - }, - { - title: '添加任务', - name: 'task-add' - }, - { - title: '编辑任务', - name: 'task-update' - }, - { - title: '暂停任务', - name: 'task-pause' - }, - { - title: '恢复任务', - name: 'task-resume' - }, - { - title: '立即运行任务', - name: 'task-run' - }, - { - title: '查看任务日志', - name: 'task-query-log' - }, - { - title: '删除任务', - name: 'task-delete' - } - ] - }, - component: () => import('@/views/support/task/task-list.vue') - } - ] - } -]; diff --git a/smart-admin-web/src/router/module/system/employee.js b/smart-admin-web/src/router/module/system/employee.js deleted file mode 100644 index f01a9c6d..00000000 --- a/smart-admin-web/src/router/module/system/employee.js +++ /dev/null @@ -1,149 +0,0 @@ -import Main from '@/components/main'; -// 基础设置 -export const employee = [ - { - path: '/employee', - component: Main, - name: 'Employee', - meta: { - title: '人员管理', - icon: 'icon iconfont iconrenyuanguanli' - }, - children: [ - // 角色管理页面路由 - { - path: '/employee/role', - name: 'RoleManage', - meta: { - title: '角色管理', - privilege: [ - { - title: '添加角色', - name: 'add-role' - }, - { - title: '删除角色', - name: 'delete-role' - }, - { - title: '编辑角色', - name: 'update-role' - }, - { - title: '修改角色权限', - name: 'update-role-privilege' - }, - { - title: '添加成员', - name: 'add-employee-role' - }, - { - title: '移除成员', - name: 'delete-employee-role' - }, - { - title: '批量移除', - name: 'delete-employee-role-batch' - }, - { - title: '查询成员', - name: 'search-employee-list' - }, - { - title: '查询数据范围', - name: 'query-data-scope' - }, - { - title: '更新数据范围', - name: 'update-data-scope' - } - ] - }, - component: () => import('@/views/system/employee/role/role-manage.vue') - }, - // 岗位管理页面路由 新 - { - path: '/employee/position', - name: 'PositionList', - meta: { - title: '岗位管理', - privilege: [ - { - title: '查询', - name: 'search-position' - }, - { - title: '添加', - name: 'add-position' - }, - { - title: '修改', - name: 'update-position' - }, - { - title: '删除', - name: 'delete-position' - } - ] - }, - component: () => import('@/views/system/employee/position/position-list.vue') - }, - // 人员管理页面路由 - { - path: '/employee/role-employee-manage', - name: 'RoleEmployeeManage', - meta: { - title: '员工管理', - privilege: [ - { - title: '添加部门', - name: 'add-department' - }, - { - title: '编辑部门', - name: 'update-department' - }, - { - title: '删除部门', - name: 'delete-department' - }, - { - title: '查询', - name: 'search-department' - }, - { - title: '添加成员', - name: 'add-employee' - }, - { - title: '编辑成员', - name: 'update-employee' - }, - { - title: '禁用', - name: 'disabled-employee' - }, - { - title: '批量操作', - name: 'disabled-employee-batch' - }, - { - title: '员工角色编辑', - name: 'update-employee-role' - }, - { - title: '删除员工', - name: 'delete-employee' - }, - { - title: '重置密码', - name: 'reset-employee-password' - } - ] - }, - component: () => - import('@/views/system/employee/role-employee/role-employee-manage.vue') - } - ] - } -]; diff --git a/smart-admin-web/src/router/module/system/file.js b/smart-admin-web/src/router/module/system/file.js deleted file mode 100644 index 1d51b19a..00000000 --- a/smart-admin-web/src/router/module/system/file.js +++ /dev/null @@ -1,29 +0,0 @@ -import Main from '@/components/main'; -// 文件服务 -export const file = [ - { - path: '/file', - name: 'File', - component: Main, - meta: { - title: '文件服务', - icon: 'ios-cloud-upload' - }, - children: [ - { - path: '/file/file-list', - name: 'FileList', - meta: { - title: '文件列表', - icon: 'ios-cloud-upload', - privilege: [ - { title: '查询', name: 'file-filePage-query' }, - { title: '上传', name: 'file-filePage-upload' }, - { title: '下载', name: 'file-filePage-download' } - ] - }, - component: () => import('@/views/system/file/file-list.vue') - } - ] - } -]; diff --git a/smart-admin-web/src/router/module/system/index.js b/smart-admin-web/src/router/module/system/index.js deleted file mode 100644 index 1c5592c3..00000000 --- a/smart-admin-web/src/router/module/system/index.js +++ /dev/null @@ -1,28 +0,0 @@ - -import Main from '@/components/main'; - - -import { employee } from './employee'; -import { file } from './file'; -import { userLog } from './user-log'; -import { systemSetting } from './system-setting'; - -// 业务 -export const system = [ - { - path: '/system', - name: 'System', - component: Main, - meta: { - title: '系统设置', - topMenu: true, - icon: 'icon iconfont iconxitongshezhi' - }, - children: [ - ...employee, - ...file, - ...userLog, - ...systemSetting - ] - } -]; diff --git a/smart-admin-web/src/router/module/system/system-setting.js b/smart-admin-web/src/router/module/system/system-setting.js deleted file mode 100644 index 708cd3d7..00000000 --- a/smart-admin-web/src/router/module/system/system-setting.js +++ /dev/null @@ -1,65 +0,0 @@ -import Main from '@/components/main'; -// 基础设置 -export const systemSetting = [ - { - path: '/system-setting', - name: 'SystemSetting', - component: Main, - meta: { - title: '系统设置', - icon: 'icon iconfont iconxitongshezhi' - }, - - children: [ - { - path: '/system-setting/system-config', - name: 'SystemConfig', - meta: { - title: '系统参数', - privilege: [ - { - title: '查询系统参数', - name: 'system-params-search' - }, - { - title: '添加系统参数', - name: 'system-params-add' - }, - { - title: '修改系统参数', - name: 'system-config-update' - }, - { - title: '搜索系统参数', - name: 'system-config-search' - } - ] - }, - component: () => - import('@/views/system/system-setting/system-config/system-config.vue') - }, - { - path: '/system-setting/system-privilege', - name: 'SystemPrivilege', - meta: { - title: '菜单设置', - privilege: [ - { - title: '编辑', - name: 'privilege-main-update' - }, - { - title: '批量保存功能点', - name: 'privilege-batch-save-points' - }, - { - title: '查询', - name: 'privilege-main-search' - } - ] - }, - component: () => import('@/views/system/system-setting/system-privilege/system-privilege.vue') - } - ] - } -]; diff --git a/smart-admin-web/src/router/module/system/user-log.js b/smart-admin-web/src/router/module/system/user-log.js deleted file mode 100644 index 5d868c84..00000000 --- a/smart-admin-web/src/router/module/system/user-log.js +++ /dev/null @@ -1,42 +0,0 @@ -import Main from '@/components/main'; -// 用户日志 -export const userLog = [ - { - path: '/user-log', - name: 'UserLog', - component: Main, - meta: { - title: '用户日志', - icon: 'ios-paper-outline' - }, - children: [ - // 发送email - { - path: '/user-log/user-operate-log', - name: 'UserOperateLog', - meta: { - title: '用户操作日志', - privilege: [ - { title: '查询', name: 'user-operate-log-search' }, - { title: '详情', name: 'user-operate-log-detail' }, - { title: '删除', name: 'user-operate-log-delete' } - ] - }, - component: () => import('@/views/system/user-log/user-operate-log.vue') - }, - // 人员管理页面路由 - { - path: '/user-log/user-login-log', - name: 'UserLoginLog', - meta: { - title: '用户登录日志', - privilege: [ - { title: '查询', name: 'user-login-log-search' }, - { title: '删除', name: 'user-login-log-delete' } - ] - }, - component: () => import('@/views/system/user-log/user-login-log.vue') - } - ] - } -]; diff --git a/smart-admin-web/src/router/routers.js b/smart-admin-web/src/router/routers.js deleted file mode 100644 index afcb628c..00000000 --- a/smart-admin-web/src/router/routers.js +++ /dev/null @@ -1,43 +0,0 @@ -import { home } from './module/home'; -import { error } from './module/error'; -import { business } from './module/business'; -import { support } from './module/support'; -import { system } from './module/system'; - -/** - * - * meta除了原生参数外可配置的参数: - * meta: { - * title: { String|Number|Function } - * 显示在侧边栏、面包屑和标签栏的文字 - * 使用'{{ 多语言字段 }}'形式结合多语言使用,例子看多语言的路由配置; - * 可以传入一个回调函数,参数是当前路由对象,例子看动态路由和带参路由 - * hideInBread: (false) 设为true后此级路由将不会出现在面包屑中,示例看QQ群路由配置 - * hideInMenu: (false) 设为true后在左侧菜单不会显示该页面选项, - * privilegeExtend:{String} 同一功能模块下子页面的功能点权限继承菜单模块创建的路由权限 by lihaifan&lipeng - * noKeepAlive: (false) 设为true后页面在切换标签后不会缓存,如果需要缓存,无需设置这个字段,而且需要设置页面组件name属性和路由配置的name一致 - * noValidatePrivilege: (true) 表示此路由不需要验证权限 - * topMenu:(true),表示为顶级菜单 - * } - */ -// 登录模块 -export const login = { - path: '/login', - name: 'login', - meta: { - hideInMenu: true, - title: 'Login - 登录', - noValidatePrivilege: true - }, - component: () => import('@/views/login/login.vue') -}; - -// 全部路由 -export const routers = [ - login, - ...home, - ...error, - ...business, - ...system, - ...support -]; diff --git a/smart-admin-web/src/store/index.js b/smart-admin-web/src/store/index.js deleted file mode 100644 index 6883f539..00000000 --- a/smart-admin-web/src/store/index.js +++ /dev/null @@ -1,25 +0,0 @@ -import Vue from 'vue'; -import Vuex from 'vuex'; - -import user from './module/user'; -import app from './module/app'; -import notice from './module/notice'; - -Vue.use(Vuex); - -export default new Vuex.Store({ - state: { - // - }, - mutations: { - // - }, - actions: { - // - }, - modules: { - user, - notice, - app - } -}); diff --git a/smart-admin-web/src/store/module/app.js b/smart-admin-web/src/store/module/app.js deleted file mode 100644 index c19eade0..00000000 --- a/smart-admin-web/src/store/module/app.js +++ /dev/null @@ -1,129 +0,0 @@ -import { - getBreadCrumbList, - setTagNavListInLocalStorage, - getMenuByRouter, - getTagNavListFromLocalStorage, - getHomeRoute, - getNextRoute, - routeHasExist, - routeEqual, - getRouteTitleHandled -} from '@/lib/menu-func'; -import { localSave, localRead } from '@/lib/local'; -import router from '@/router'; -import { routers } from '@/router/routers'; -import config from '@/config'; -const { homeName } = config; -// 关闭页面+tag -const closePage = (state, route) => { - const nextRoute = getNextRoute(state.tagNavList, route); - state.tagNavList = state.tagNavList.filter(item => { - return !routeEqual(item, route); - }); - router.push(nextRoute); -}; - -export default { - state: { - // 缓存路由 - keepAliveIncludes: [], - // 面包屑列表 - breadCrumbList: [], - // tag列表 - tagNavList: [], - // 首页路由 - homeRoute: {}, - // 本地缓存 - local: localRead('local'), - // 错误列表 - errorList: [], - hasReadErrorPage: false - }, - getters: { - - errorCount: state => state.errorList.length - }, - mutations: { - // 加入缓存 - pushKeepAliveIncludes (state, val) { - if (state.keepAliveIncludes.length < 30) { - let number = state.keepAliveIncludes.findIndex(e => e === val); - if (number === -1) { - state.keepAliveIncludes.push(val); - } - } - }, - // 删除缓存 - deleteKeepAliveIncludes (state, val) { - let number = state.keepAliveIncludes.findIndex(e => e === val); - if (number !== -1) { - state.keepAliveIncludes.splice(number, 1); - } - }, - // 清空缓存 - clearKeepAliveIncludes (state, val) { - state.keepAliveIncludes = [val]; - }, - // 关闭其他 - deleteOtherKeepAliveIncludes (state, val) { - state.keepAliveIncludes.forEach((item, index, arr) => { - if (item !== config.homeName && item !== val) { - arr.splice(index, 1); - } - }); - }, - // 设置其是否出现在面包屑中 - setBreadCrumb (state, route) { - state.breadCrumbList = getBreadCrumbList(route, state.homeRoute); - }, - // 初始化首页使用 - setHomeRoute (state, routes) { - state.homeRoute = getHomeRoute(routes, homeName); - }, - // 设置tag列表 - setTagNavList (state, list) { - let tagList = []; - if (list) { - tagList = [...list]; - } else tagList = getTagNavListFromLocalStorage() || []; - if (tagList[0] && tagList[0].name !== homeName) tagList.shift(); - let homeTagIndex = tagList.findIndex(item => item.name === homeName); - if (homeTagIndex > 0) { - let homeTag = tagList.splice(homeTagIndex, 1)[0]; - tagList.unshift(homeTag); - } - state.tagNavList = tagList; - setTagNavListInLocalStorage([...tagList]); - }, - // 关闭tag - closeTag (state, route) { - let tag = state.tagNavList.filter(item => routeEqual(item, route)); - route = tag[0] ? tag[0] : null; - if (!route) return; - closePage(state, route); - }, - // 关闭当前tag,且不进行跳转 - closeTagNotPushNextRoute (state, route) { - state.tagNavList = state.tagNavList.filter(item => { - return !routeEqual(item, route); - }); - }, - // 新增tag - addTag (state, { route, type = 'unshift' }) { - let router = getRouteTitleHandled(route); - if (!routeHasExist(state.tagNavList, router)) { - if (type === 'push') state.tagNavList.push(router); - else { - if (router.name === homeName) state.tagNavList.unshift(router); - else state.tagNavList.splice(1, 0, router); - } - setTagNavListInLocalStorage([...state.tagNavList]); - } - }, - // 保存本地信息 - setLocal (state, lang) { - localSave('local', lang); - state.local = lang; - } - } -}; diff --git a/smart-admin-web/src/store/module/notice.js b/smart-admin-web/src/store/module/notice.js deleted file mode 100644 index 3cff149e..00000000 --- a/smart-admin-web/src/store/module/notice.js +++ /dev/null @@ -1,19 +0,0 @@ -import { noticeApi } from '@/api/notice'; -export default { - state: { - noticeList: [], - noticeNumber: 0 - }, - mutations: { - updateNotice(state, data) { - state.noticeList = [...state.noticeList, ...data]; - }, - updateNoticeNum(state, data) { - state.noticeNumber = data; - }, - restNotice(state) { - state.noticeList = []; - state.noticeNumber = 0; - } - } -}; diff --git a/smart-admin-web/src/store/module/user.js b/smart-admin-web/src/store/module/user.js deleted file mode 100644 index eb2ca10a..00000000 --- a/smart-admin-web/src/store/module/user.js +++ /dev/null @@ -1,122 +0,0 @@ -import cookie from '@/lib/cookie.js'; -import { loginApi } from '@/api/login'; -import { localSave, localRead } from '@/lib/local'; -import { getType } from '@/lib/util'; -import { PRIVILEGE_TYPE_ENUM } from '@/constants/privilege'; - -const localReadRouterPrivilege = () => { - let map = new Map(); - let userRouterPrivilegeString = localRead('userRouterPrivilege'); - if (userRouterPrivilegeString) { - let privilegeList = JSON.parse(userRouterPrivilegeString); - if (privilegeList) { - for (const path of privilegeList) { - let key = path.substr(1, 1); - let pathArray = map.get(key); - if (pathArray) { - pathArray.push(path); - } else { - pathArray = []; - pathArray.push(path); - map.set(key, pathArray); - } - } - } - } - return map; -}; - -export default { - state: { - token: cookie.getToken(), - // session信息 - userLoginInfo: {}, - isUpdatePrivilege: false, - // key为router name, value为 key的集合,用于v-privilege,页面功能点判断 - privilegeFunctionPointsMap: new Map(), - // 菜单key权限集合,用于左侧是否有菜单权限判断 - privilegeMenuKeyList: [], - /** - * key为 router path的首字母,value为集合 - * 这样做是为了提高查询效率,用于vue-router拦截判断path - */ - privilegeRouterPathMap: localReadRouterPrivilege() - - }, - mutations: { - // 设置token - setToken (state, token) { - state.token = token; - cookie.setToken(token); - }, - // 保存用户登录信息 - setUserLoginInfo (state, userLoginInfo) { - state.userLoginInfo = userLoginInfo; - localSave('userLoginInfo', JSON.stringify(userLoginInfo)); - }, - setUserPrivilege (state, privilegeList) { - state.isUpdatePrivilege = true; - let routerPathArray = []; - for (const privilege of privilegeList) { - // 是菜单权限 - if (privilege.type === PRIVILEGE_TYPE_ENUM.MENU.value) { - state.privilegeMenuKeyList.push(privilege.key); - if (privilege.url) { - routerPathArray.push(privilege.url); - // 去掉/之后第一个字母 - let key = privilege.url.substr(1, 1); - let pathArray = state.privilegeRouterPathMap.get(key); - if (pathArray) { - pathArray.push(privilege.url); - } else { - pathArray = []; - pathArray.push(privilege.url); - state.privilegeRouterPathMap.set(key, pathArray); - } - } - } - // 如果是功能点 - if (privilege.type === PRIVILEGE_TYPE_ENUM.POINTS.value) { - if (privilege.parentKey) { - let pointArray = state.privilegeFunctionPointsMap.get(privilege.parentKey); - if (pointArray) { - pointArray.push(privilege.key); - } else { - pointArray = []; - pointArray.push(privilege.key); - state.privilegeFunctionPointsMap.set(privilege.parentKey, pointArray); - } - } - } - } - localSave('userRouterPrivilege', JSON.stringify(routerPathArray)); - } - }, - getters: { - // 用户功能点权限 - userFuncPrivilegeInfo: () => localRead('funcPrivilegeInfo'), - // 用户菜单权限 - userMenuPrivilege: state => state.userLoginInfo.privilegeList - }, - actions: { - // 登录 - handleLogin ({ commit }, params) { - params.loginName = params.loginName.trim(); - return new Promise((resolve, reject) => { - loginApi - .login(params) - .then(res => { - localStorage.clear(); - const data = res.data; - commit('setToken', data.xaccessToken); - // 保存用户登录 - commit('setUserLoginInfo', data); - resolve(); - }) - .catch(err => { - reject(err); - }); - }); - } - } -}; diff --git a/smart-admin-web/src/themes/ReadMe.md b/smart-admin-web/src/themes/ReadMe.md deleted file mode 100644 index 57ab76e4..00000000 --- a/smart-admin-web/src/themes/ReadMe.md +++ /dev/null @@ -1 +0,0 @@ -这是配置主题及颜色的 diff --git a/smart-admin-web/src/themes/index.less b/smart-admin-web/src/themes/index.less deleted file mode 100644 index 6870d219..00000000 --- a/smart-admin-web/src/themes/index.less +++ /dev/null @@ -1,328 +0,0 @@ -@import '~view-design/src/styles/index.less'; -/************** - 导航栏 -**************/ -// 导航栏背景 -@menu-dark-title: #001529; -@menu-dark-active-bg: #000c17; -@layout-sider-background: #001529; -@primary-color: #2d8cf0; -@blue: #2d8cf0; -@blueA100: #2e3c5a; -@blueA200: #e7f3ff; -@blueA300: #f0f7fd; -@blueA400: #001529; -@garyA100: #f5f5f5; -@garyA200: #666; -@garyA300: #999; -@tableColor: #eee; -@black: #444; - -.side-menu-wrapper { - // 一级菜单 高亮颜色 - .ivu-menu-dark.ivu-menu-vertical .ivu-menu-item-active:not(.ivu-menu-submenu), - .ivu-menu-dark.ivu-menu-vertical .ivu-menu-submenu-title-active:not(.ivu-menu-submenu){ - color: #fff; - } - .ivu-menu-dark { - .ivu-menu { - .ivu-menu-submenu { - margin-bottom: 0; - } - - .ivu-menu-submenu-title { - padding: 8px 24px !important; - } - - .ivu-menu-submenu-has-parent-submenu { - padding-left: 51px; - } - - // 二级菜单 - .ivu-menu-item, - .ivu-menu-submenu-has-parent-submenu { - padding: 8px 0 9px 48px !important; - background: url('../assets/images/slider/sub_slider_default.png') 30px 0 - no-repeat !important; - - &:hover { - background: url('../assets/images/slider/sub_slider_default.png') 30px - 0 no-repeat !important; - } - - &.ivu-menu-item-active { - background: url('../assets/images/slider/sub_slider_active.png') 30px - 0 no-repeat !important; - border-right: 5px @primary-color solid; - - &:hover { - background: url('../assets/images/slider/sub_slider_active.png') - 30px 0 no-repeat !important; - border-right: 5px @primary-color solid; - } - } - } - .ivu-menu-submenu-has-parent-submenu { - padding-left: 31px !important; - .ivu-menu-submenu-title { - padding: 0 17px !important; - } - &.ivu-menu-child-item-active { - background: url('../assets/images/slider/sub_slider_active.png') 30px - 0 no-repeat !important; - border-right: 0; - } - .ivu-menu { - padding-top: 8px; - } - .ivu-menu-item, - .ivu-menu-item-active:hover { - background: none !important; - padding-left: 32px !important; - } - } - } - } -} - -// 导航栏 -.menu-collapsed { - text-align: center; - padding-top: 0 !important; -} - -// 左侧导航收缩 -.ivu-layout-sider-collapsed { - .ivu-dropdown { - text-align: center; - line-height: 38px; - margin: 0px auto; - color: #515a6e; - - &:hover { - color: @primary-color; - } - } - .ivu-tooltip { - line-height: 38px; - } -} -// 收缩导航栏鼠标经过下拉 -.menu-dropdown { - width: 160px; - left: 65px !important; - background: #001529; - border-radius: 3px; - color: #fff; - .ivu-dropdown-item { - color: #fff; - height: 40px; - line-height: 40px; - padding: 0 20px; - box-sizing: border-box; - .menu-title { - // padding:5px 0; - } - &:hover { - background: none; - border-right: 4px @primary-color solid; - } - } -} -/************** - header -**************/ -@layout-header-height: 52px; - -//面包屑 -.ivu-breadcrumb { - color: #515a6e; -} - -.ivu-breadcrumb-item-separator { - color: #515a6e; -} - - -/************** - table -**************/ -@table-thead-bg: #F7F7F9; -@border-color-split: #F7F7F9; -// @border-color-base: #F7F7F9; - -.ivu-table { - height: auto; - - table { - border-spacing: 0; - width: 100%; - tr { - &.ivu-table-row-hover { - tr, td { - animation: tableHover 0.5s; - } - } - th, td { - border: 1px @tableColor solid; - border-left: 0; - border-top: 0; - text-align: center; - &.ivu-table-column-left { - text-align: left; - } - &:nth-child(1) { - border-left: 0; - } - .ivu-table-cell { - padding: 0 8px; - overflow: inherit; - } - .table-line { - background: @tableColor; - height: 1px; - margin: 8px -18px; - } - } - th { - color: @garyA200; - background: @garyA100; - height: 42px; - font-size: 14px; - color: #808080; - text-align: left; - } - td { - font-weight: normal; - padding: 2px 0; - height: 32px; - text-align: left; - font-size: 12px; - border-bottom: 1px solid #F7F7F9; - .ivu-table-cell-with-expand{ - height: 32px; - line-height: 32px; - } - } - } - } -} - -.ivu-table-body { - &::-webkit-scrollbar { - width: 10px; - height: 10px; - } -} - -.ivu-card-extra { - position: absolute; - right: 8px; - top: 8px; -} - -.ivu-card-head { - background: #fafafa; - border-radius: 4px 4px 0 0; - padding: 12px 16px; - font-size: 14px; - font-weight: bold; - .ivu-icon { - color: #666; - } -} - -.ivu-select-dropdown { - z-index: 10000; - &::-webkit-scrollbar { - width: 10px; - height: 10px; - } -} - -.ivu-dropdown-transfer, -.ivu-select-dropdown-transfer { - position: fixed; -} - -.ivu-table-fixed-body { - overflow: inherit; -} -.ivu-card{ - box-shadow: none !important; -} -// 表单类 -.ivu-btn{ - &:focus{ - box-shadow: none; - } -} - -.ivu-spin-fix{ - background-color: rgba(255, 255, 255, 0.3); -} - -// 重写字体大小 -.ivu-select, -.ivu-select-single .ivu-select-selection .ivu-select-placeholder, -.ivu-select-single .ivu-select-selection .ivu-select-selected-value, -.ivu-select-input, -.ivu-input, -textarea.ivu-input, -.ivu-btn, -.ivu-checkbox-wrapper, -.ivu-form .ivu-form-item-label{ - font-size: 12px; -} -.ivu-btn-large{ - font-size: 14px; -} -.ivu-select-item, -.ivu-dropdown-item{ - font-size: 12px !important; -} - -/****自定义样式***/ - -.search-card .ivu-form-item { - margin-bottom: 0px !important; -} - -.marginRight10{ - margin-right: 10px !important; -} -.marginLeft10{ - margin-left: 10px !important; -} - -.marginBottom10{ - margin-bottom: 10px !important; -} - -.float-right{ - float:right; -} - -.float-left{ - float:left; -} - -.error-color{ - color: #ed4014; -} - -.smart-query-card .ivu-card-body{ - padding: 10px !important; -} - -.smart-query-form-row:not(:first-child){ - margin-top: 8px; -} - -.smart-query-form-row span{ - margin-right: 8px; -} - -.smart-query-table-page{ - margin-top: 10px; -} \ No newline at end of file diff --git a/smart-admin-web/src/views/business/email/email-list.vue b/smart-admin-web/src/views/business/email/email-list.vue deleted file mode 100644 index 357998a8..00000000 --- a/smart-admin-web/src/views/business/email/email-list.vue +++ /dev/null @@ -1,214 +0,0 @@ - - - diff --git a/smart-admin-web/src/views/business/email/send-mail.vue b/smart-admin-web/src/views/business/email/send-mail.vue deleted file mode 100644 index d06261d9..00000000 --- a/smart-admin-web/src/views/business/email/send-mail.vue +++ /dev/null @@ -1,215 +0,0 @@ - - - - diff --git a/smart-admin-web/src/views/business/keep-alive/add-content.vue b/smart-admin-web/src/views/business/keep-alive/add-content.vue deleted file mode 100644 index 0c2290dd..00000000 --- a/smart-admin-web/src/views/business/keep-alive/add-content.vue +++ /dev/null @@ -1,94 +0,0 @@ - - - - diff --git a/smart-admin-web/src/views/business/keep-alive/content-list.vue b/smart-admin-web/src/views/business/keep-alive/content-list.vue deleted file mode 100644 index 11b34887..00000000 --- a/smart-admin-web/src/views/business/keep-alive/content-list.vue +++ /dev/null @@ -1,80 +0,0 @@ - - - - diff --git a/smart-admin-web/src/views/business/notice/notice-detail.vue b/smart-admin-web/src/views/business/notice/notice-detail.vue deleted file mode 100644 index 66687bda..00000000 --- a/smart-admin-web/src/views/business/notice/notice-detail.vue +++ /dev/null @@ -1,49 +0,0 @@ - - - diff --git a/smart-admin-web/src/views/business/notice/notice-list.vue b/smart-admin-web/src/views/business/notice/notice-list.vue deleted file mode 100644 index 8c129b19..00000000 --- a/smart-admin-web/src/views/business/notice/notice-list.vue +++ /dev/null @@ -1,369 +0,0 @@ - - - - diff --git a/smart-admin-web/src/views/business/notice/person-notice.vue b/smart-admin-web/src/views/business/notice/person-notice.vue deleted file mode 100644 index cc2fec01..00000000 --- a/smart-admin-web/src/views/business/notice/person-notice.vue +++ /dev/null @@ -1,221 +0,0 @@ - - - - - diff --git a/smart-admin-web/src/views/business/peony/components/peony-list-form.vue b/smart-admin-web/src/views/business/peony/components/peony-list-form.vue deleted file mode 100644 index 9f99862b..00000000 --- a/smart-admin-web/src/views/business/peony/components/peony-list-form.vue +++ /dev/null @@ -1,133 +0,0 @@ - - \ No newline at end of file diff --git a/smart-admin-web/src/views/business/peony/peony-list.vue b/smart-admin-web/src/views/business/peony/peony-list.vue deleted file mode 100644 index 8c0edaff..00000000 --- a/smart-admin-web/src/views/business/peony/peony-list.vue +++ /dev/null @@ -1,495 +0,0 @@ - - - diff --git a/smart-admin-web/src/views/business/three-level-router/three-level-router-view.vue b/smart-admin-web/src/views/business/three-level-router/three-level-router-view.vue deleted file mode 100644 index 2003c453..00000000 --- a/smart-admin-web/src/views/business/three-level-router/three-level-router-view.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - - diff --git a/smart-admin-web/src/views/error-page/401.vue b/smart-admin-web/src/views/error-page/401.vue deleted file mode 100644 index 70b3c366..00000000 --- a/smart-admin-web/src/views/error-page/401.vue +++ /dev/null @@ -1,19 +0,0 @@ - - - diff --git a/smart-admin-web/src/views/error-page/404.vue b/smart-admin-web/src/views/error-page/404.vue deleted file mode 100644 index 291406f6..00000000 --- a/smart-admin-web/src/views/error-page/404.vue +++ /dev/null @@ -1,19 +0,0 @@ - - - diff --git a/smart-admin-web/src/views/error-page/500.vue b/smart-admin-web/src/views/error-page/500.vue deleted file mode 100644 index e2a6c249..00000000 --- a/smart-admin-web/src/views/error-page/500.vue +++ /dev/null @@ -1,19 +0,0 @@ - - - diff --git a/smart-admin-web/src/views/error-page/back-btn-group.vue b/smart-admin-web/src/views/error-page/back-btn-group.vue deleted file mode 100644 index 7966849b..00000000 --- a/smart-admin-web/src/views/error-page/back-btn-group.vue +++ /dev/null @@ -1,40 +0,0 @@ - - - diff --git a/smart-admin-web/src/views/error-page/error-content.vue b/smart-admin-web/src/views/error-page/error-content.vue deleted file mode 100644 index d81d965e..00000000 --- a/smart-admin-web/src/views/error-page/error-content.vue +++ /dev/null @@ -1,28 +0,0 @@ - - - diff --git a/smart-admin-web/src/views/error-page/error.less b/smart-admin-web/src/views/error-page/error.less deleted file mode 100644 index 63802459..00000000 --- a/smart-admin-web/src/views/error-page/error.less +++ /dev/null @@ -1,46 +0,0 @@ -.error-page{ - width: 100%; - height: 100%; - position: relative; - background: #f8f8f9; - .content-con{ - width: 700px; - height: 600px; - position: absolute; - left: 50%; - top: 50%; - transform: translate(-50%, -60%); - img{ - display: block; - width: 100%; - height: 100%; - } - .text-con{ - position: absolute; - left: 0px; - top: 0px; - h4{ - position: absolute; - left: 0px; - top: 0px; - font-size: 80px; - font-weight: 700; - color: #348EED; - } - h5{ - position: absolute; - width: 700px; - left: 0px; - top: 100px; - font-size: 20px; - font-weight: 700; - color: #67647D; - } - } - .back-btn-group{ - position: absolute; - right: 0px; - bottom: 20px; - } - } -} diff --git a/smart-admin-web/src/views/home/components/card.vue b/smart-admin-web/src/views/home/components/card.vue deleted file mode 100644 index 763eabf4..00000000 --- a/smart-admin-web/src/views/home/components/card.vue +++ /dev/null @@ -1,43 +0,0 @@ - - - - - diff --git a/smart-admin-web/src/views/home/components/chart-bar.vue b/smart-admin-web/src/views/home/components/chart-bar.vue deleted file mode 100644 index 8130be3c..00000000 --- a/smart-admin-web/src/views/home/components/chart-bar.vue +++ /dev/null @@ -1,140 +0,0 @@ - - - - - diff --git a/smart-admin-web/src/views/home/components/chart-funnel.vue b/smart-admin-web/src/views/home/components/chart-funnel.vue deleted file mode 100644 index dd076399..00000000 --- a/smart-admin-web/src/views/home/components/chart-funnel.vue +++ /dev/null @@ -1,106 +0,0 @@ - - - - - diff --git a/smart-admin-web/src/views/home/components/chart-gauge.vue b/smart-admin-web/src/views/home/components/chart-gauge.vue deleted file mode 100644 index 99750aa7..00000000 --- a/smart-admin-web/src/views/home/components/chart-gauge.vue +++ /dev/null @@ -1,87 +0,0 @@ - - - - - diff --git a/smart-admin-web/src/views/home/components/chart-line.vue b/smart-admin-web/src/views/home/components/chart-line.vue deleted file mode 100644 index d7aeed44..00000000 --- a/smart-admin-web/src/views/home/components/chart-line.vue +++ /dev/null @@ -1,123 +0,0 @@ - - - - - diff --git a/smart-admin-web/src/views/home/components/chart-pie.vue b/smart-admin-web/src/views/home/components/chart-pie.vue deleted file mode 100644 index 01037399..00000000 --- a/smart-admin-web/src/views/home/components/chart-pie.vue +++ /dev/null @@ -1,110 +0,0 @@ - - - - - diff --git a/smart-admin-web/src/views/home/components/home-circle.vue b/smart-admin-web/src/views/home/components/home-circle.vue deleted file mode 100644 index 903ec4e2..00000000 --- a/smart-admin-web/src/views/home/components/home-circle.vue +++ /dev/null @@ -1,41 +0,0 @@ - - - - - diff --git a/smart-admin-web/src/views/home/components/home-progress.vue b/smart-admin-web/src/views/home/components/home-progress.vue deleted file mode 100644 index dc9682a7..00000000 --- a/smart-admin-web/src/views/home/components/home-progress.vue +++ /dev/null @@ -1,59 +0,0 @@ - - - - - diff --git a/smart-admin-web/src/views/home/components/theme.json b/smart-admin-web/src/views/home/components/theme.json deleted file mode 100644 index 909b518a..00000000 --- a/smart-admin-web/src/views/home/components/theme.json +++ /dev/null @@ -1,490 +0,0 @@ -{ - "color": [ - "#2d8cf0", - "#19be6b", - "#ff9900", - "#E46CBB", - "#9A66E4", - "#ed3f14" - ], - "backgroundColor": "rgba(0,0,0,0)", - "textStyle": {}, - "title": { - "textStyle": { - "color": "#516b91" - }, - "subtextStyle": { - "color": "#93b7e3" - } - }, - "line": { - "itemStyle": { - "normal": { - "borderWidth": "2" - } - }, - "lineStyle": { - "normal": { - "width": "2" - } - }, - "symbolSize": "6", - "symbol": "emptyCircle", - "smooth": true - }, - "radar": { - "itemStyle": { - "normal": { - "borderWidth": "2" - } - }, - "lineStyle": { - "normal": { - "width": "2" - } - }, - "symbolSize": "6", - "symbol": "emptyCircle", - "smooth": true - }, - "bar": { - "itemStyle": { - "normal": { - "barBorderWidth": 0, - "barBorderColor": "#ccc" - }, - "emphasis": { - "barBorderWidth": 0, - "barBorderColor": "#ccc" - } - } - }, - "pie": { - "itemStyle": { - "normal": { - "borderWidth": 0, - "borderColor": "#ccc" - }, - "emphasis": { - "borderWidth": 0, - "borderColor": "#ccc" - } - } - }, - "scatter": { - "itemStyle": { - "normal": { - "borderWidth": 0, - "borderColor": "#ccc" - }, - "emphasis": { - "borderWidth": 0, - "borderColor": "#ccc" - } - } - }, - "boxplot": { - "itemStyle": { - "normal": { - "borderWidth": 0, - "borderColor": "#ccc" - }, - "emphasis": { - "borderWidth": 0, - "borderColor": "#ccc" - } - } - }, - "parallel": { - "itemStyle": { - "normal": { - "borderWidth": 0, - "borderColor": "#ccc" - }, - "emphasis": { - "borderWidth": 0, - "borderColor": "#ccc" - } - } - }, - "sankey": { - "itemStyle": { - "normal": { - "borderWidth": 0, - "borderColor": "#ccc" - }, - "emphasis": { - "borderWidth": 0, - "borderColor": "#ccc" - } - } - }, - "funnel": { - "itemStyle": { - "normal": { - "borderWidth": 0, - "borderColor": "#ccc" - }, - "emphasis": { - "borderWidth": 0, - "borderColor": "#ccc" - } - } - }, - "gauge": { - "itemStyle": { - "normal": { - "borderWidth": 0, - "borderColor": "#ccc" - }, - "emphasis": { - "borderWidth": 0, - "borderColor": "#ccc" - } - } - }, - "candlestick": { - "itemStyle": { - "normal": { - "color": "#edafda", - "color0": "transparent", - "borderColor": "#d680bc", - "borderColor0": "#8fd3e8", - "borderWidth": "2" - } - } - }, - "graph": { - "itemStyle": { - "normal": { - "borderWidth": 0, - "borderColor": "#ccc" - } - }, - "lineStyle": { - "normal": { - "width": 1, - "color": "#aaa" - } - }, - "symbolSize": "6", - "symbol": "emptyCircle", - "smooth": true, - "color": [ - "#2d8cf0", - "#19be6b", - "#f5ae4a", - "#9189d5", - "#56cae2", - "#cbb0e3" - ], - "label": { - "normal": { - "textStyle": { - "color": "#eee" - } - } - } - }, - "map": { - "itemStyle": { - "normal": { - "areaColor": "#f3f3f3", - "borderColor": "#516b91", - "borderWidth": 0.5 - }, - "emphasis": { - "areaColor": "rgba(165,231,240,1)", - "borderColor": "#516b91", - "borderWidth": 1 - } - }, - "label": { - "normal": { - "textStyle": { - "color": "#000" - } - }, - "emphasis": { - "textStyle": { - "color": "rgb(81,107,145)" - } - } - } - }, - "geo": { - "itemStyle": { - "normal": { - "areaColor": "#f3f3f3", - "borderColor": "#516b91", - "borderWidth": 0.5 - }, - "emphasis": { - "areaColor": "rgba(165,231,240,1)", - "borderColor": "#516b91", - "borderWidth": 1 - } - }, - "label": { - "normal": { - "textStyle": { - "color": "#000" - } - }, - "emphasis": { - "textStyle": { - "color": "rgb(81,107,145)" - } - } - } - }, - "categoryAxis": { - "axisLine": { - "show": true, - "lineStyle": { - "color": "#cccccc" - } - }, - "axisTick": { - "show": false, - "lineStyle": { - "color": "#333" - } - }, - "axisLabel": { - "show": true, - "textStyle": { - "color": "#999999" - } - }, - "splitLine": { - "show": true, - "lineStyle": { - "color": [ - "#eeeeee" - ] - } - }, - "splitArea": { - "show": false, - "areaStyle": { - "color": [ - "rgba(250,250,250,0.05)", - "rgba(200,200,200,0.02)" - ] - } - } - }, - "valueAxis": { - "axisLine": { - "show": true, - "lineStyle": { - "color": "#cccccc" - } - }, - "axisTick": { - "show": false, - "lineStyle": { - "color": "#333" - } - }, - "axisLabel": { - "show": true, - "textStyle": { - "color": "#999999" - } - }, - "splitLine": { - "show": true, - "lineStyle": { - "color": [ - "#eeeeee" - ] - } - }, - "splitArea": { - "show": false, - "areaStyle": { - "color": [ - "rgba(250,250,250,0.05)", - "rgba(200,200,200,0.02)" - ] - } - } - }, - "logAxis": { - "axisLine": { - "show": true, - "lineStyle": { - "color": "#cccccc" - } - }, - "axisTick": { - "show": false, - "lineStyle": { - "color": "#333" - } - }, - "axisLabel": { - "show": true, - "textStyle": { - "color": "#999999" - } - }, - "splitLine": { - "show": true, - "lineStyle": { - "color": [ - "#eeeeee" - ] - } - }, - "splitArea": { - "show": false, - "areaStyle": { - "color": [ - "rgba(250,250,250,0.05)", - "rgba(200,200,200,0.02)" - ] - } - } - }, - "timeAxis": { - "axisLine": { - "show": true, - "lineStyle": { - "color": "#cccccc" - } - }, - "axisTick": { - "show": false, - "lineStyle": { - "color": "#333" - } - }, - "axisLabel": { - "show": true, - "textStyle": { - "color": "#999999" - } - }, - "splitLine": { - "show": true, - "lineStyle": { - "color": [ - "#eeeeee" - ] - } - }, - "splitArea": { - "show": false, - "areaStyle": { - "color": [ - "rgba(250,250,250,0.05)", - "rgba(200,200,200,0.02)" - ] - } - } - }, - "toolbox": { - "iconStyle": { - "normal": { - "borderColor": "#999" - }, - "emphasis": { - "borderColor": "#666" - } - } - }, - "legend": { - "textStyle": { - "color": "#999999" - } - }, - "tooltip": { - "axisPointer": { - "lineStyle": { - "color": "#ccc", - "width": 1 - }, - "crossStyle": { - "color": "#ccc", - "width": 1 - } - } - }, - "timeline": { - "lineStyle": { - "color": "#8fd3e8", - "width": 1 - }, - "itemStyle": { - "normal": { - "color": "#8fd3e8", - "borderWidth": 1 - }, - "emphasis": { - "color": "#8fd3e8" - } - }, - "controlStyle": { - "normal": { - "color": "#8fd3e8", - "borderColor": "#8fd3e8", - "borderWidth": 0.5 - }, - "emphasis": { - "color": "#8fd3e8", - "borderColor": "#8fd3e8", - "borderWidth": 0.5 - } - }, - "checkpointStyle": { - "color": "#8fd3e8", - "borderColor": "rgba(138,124,168,0.37)" - }, - "label": { - "normal": { - "textStyle": { - "color": "#8fd3e8" - } - }, - "emphasis": { - "textStyle": { - "color": "#8fd3e8" - } - } - } - }, - "visualMap": { - "color": [ - "#516b91", - "#59c4e6", - "#a5e7f0" - ] - }, - "dataZoom": { - "backgroundColor": "rgba(0,0,0,0)", - "dataBackgroundColor": "rgba(255,255,255,0.3)", - "fillerColor": "rgba(167,183,204,0.4)", - "handleColor": "#a7b7cc", - "handleSize": "100%", - "textStyle": { - "color": "#333" - } - }, - "markPoint": { - "label": { - "normal": { - "textStyle": { - "color": "#eee" - } - }, - "emphasis": { - "textStyle": { - "color": "#eee" - } - } - } - } -} \ No newline at end of file diff --git a/smart-admin-web/src/views/home/home.vue b/smart-admin-web/src/views/home/home.vue deleted file mode 100644 index 99cdbac2..00000000 --- a/smart-admin-web/src/views/home/home.vue +++ /dev/null @@ -1,154 +0,0 @@ - - - - - diff --git a/smart-admin-web/src/views/home/index.js b/smart-admin-web/src/views/home/index.js deleted file mode 100644 index 5f66ed9d..00000000 --- a/smart-admin-web/src/views/home/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import home from './home.vue'; -export default home; diff --git a/smart-admin-web/src/views/login/canvas.js b/smart-admin-web/src/views/login/canvas.js deleted file mode 100644 index 67b21ffb..00000000 --- a/smart-admin-web/src/views/login/canvas.js +++ /dev/null @@ -1,289 +0,0 @@ -// 离子波浪 -export const lonWave = () => { - var starlings = function (n, r, t, o, e, u, i, f) { - var a = f.onSetup - void 0 === a && (a = null) - var v = f.onRepeat - void 0 === v && (v = null) - var c = f.modifier - void 0 === c && (c = null) - var l = f.perspective - void 0 === l && (l = 1) - var d = f.pixelRatio - void 0 === d && (d = 1) - var m = f.triangles - void 0 === m && (m = !1) - var s - var p - var y = r.length - var w = function (n, r) { - let t = s.createShader(n) - return s.shaderSource(t, r), s.compileShader(t), t - } - var b = function () { - for (var n = 0; n < o.length; n += 1) { - for (var r = s.createBuffer(), e = o[n], u = e.data(0, 0).length, i = new Float32Array(t * y * u), f = 0; f < t; f += 1) { - for (var a = e.data(f, t), v = f * y * u, l = 0; l < y; l += 1) { - for (var d = 0; d < u; d += 1) { - c !== null && e.name === c.attribute ? i[v] = c.value(i[v], a, d, l) : i[v] = a[d] - v += 1 - } - } - } - s.bindBuffer(s.ARRAY_BUFFER, r) - s.bufferData(s.ARRAY_BUFFER, i, s.STATIC_DRAW) - var m = s.getAttribLocation(p, o[n].name) - s.enableVertexAttribArray(m) - s.vertexAttribPointer(m, u, s.FLOAT, !1, !1, 0, 0) - } - } - var A = function () { - e.push({ - name: 'uMVP', - type: 'mat4' - }) - for (var n = 0; n < e.length; n += 1) { - var r = s.getUniformLocation(p, e[n].name) - e[n].location = r - } - } - var F = { - float: function (n, r) { - return s.uniform1f(n, r) - }, - vec2: function (n, r) { - return s.uniform2fv(n, r) - }, - vec3: function (n, r) { - return s.uniform3fv(n, r) - }, - vec4: function (n, r) { - return s.uniform4fv(n, r) - }, - mat2: function (n, r) { - return s.uniformMatrix2fv(n, !1, r) - }, - mat3: function (n, r) { - return s.uniformMatrix3fv(n, !1, r) - }, - mat4: function (n, r) { - return s.uniformMatrix4fv(n, !1, r) - } - } - var g = function () { - s.clear(16640) - s.useProgram(p) - v !== null && v(s, p, e) - for (var n = 0; n < e.length; n += 1) F[e[n].type](e[n].location, e[n].value) - s.drawArrays(m ? s.TRIANGLES : s.POINTS, 0, y * t) - requestAnimationFrame(g) - } - var h = function () { - n.width = n.clientWidth * d - n.height = n.clientHeight * d - var r = s.drawingBufferWidth - var t = s.drawingBufferHeight - s.viewport(0, 0, r, t) - e[e.length - 1].value = [l / (r / t), 0, 0, 0, 0, l, 0, 0, 0, 0, -1, -1, 0, 0, 1, 1] - } - s = n.getContext('webgl') - p = s.createProgram() - s.attachShader(p, w(s.VERTEX_SHADER, u)) - s.attachShader(p, w(s.FRAGMENT_SHADER, i)) - s.linkProgram(p) - A() - h() - b() - a !== null && a(s) - g() - window.addEventListener('resize', h, !1) - } - - // Do you like rainbow waves? - var rainbow = false - - // Need more performance? - var HD = true - - var canvas = document.getElementById('canvas') - var background = document.querySelector('.background') - var bar = document.querySelector('.progress') - var initialize = function initialize (vertices) { - var pixelRatio = HD ? window.devicePixelRatio : 1 - var rows = HD ? 90 : 90 - var multiplier = rows * rows - var duration = 0.4 - var geometry = [{ - x: 0, - y: 0, - z: 0 - }] - var pointSize = (HD ? 6 : 2).toFixed(1) - - var step = 0.004 - var size = 5 - var attributes = [{ - name: 'aPositionStart', - data: function data (i, total) { - return [size - (i % rows / rows + 0.5 / rows) * (size * 2), -1, (size - (Math.floor(i / rows) / rows + 0.5 / rows) * size * 2) * -1] - } - }, - { - name: 'aControlPointOne', - data: function data (i) { - return [size - (i % rows / rows + 0.5 / rows) * (size * 2), -0.5 + getRandom(0.2), (size - (Math.floor(i / rows) / rows + 0.5 / rows) * size * 2) * -1] - } - }, - { - name: 'aControlPointTwo', - data: function data (i) { - return [size - (i % rows / rows + 0.5 / rows) * (size * 2), -0.5 + getRandom(0.2), (size - (Math.floor(i / rows) / rows + 0.5 / rows) * size * 2) * -1] - } - }, - { - name: 'aPositionEnd', - data: function data (i) { - return [size - (i % rows / rows + 0.5 / rows) * (size * 2), -1, (size - (Math.floor(i / rows) / rows + 0.5 / rows) * size * 2) * -1] - } - }, - { - name: 'aOffset', - data: function data (i) { - return [i * ((1 - duration) / (multiplier - 1))] - } - }, - { - name: 'aColor', - data: function data (i, total) { - return getHSL(rainbow ? i / total * 1.0 : 0.5 + i / total * 0.4, 0.5, 0.5) - } - }] - - var uniforms = [{ - name: 'uProgress', - type: 'float', - value: 0.8 - }] - - var vertexShader = '\n attribute vec3 aPositionStart;\n attribute vec3 aControlPointOne;\n attribute vec3 aControlPointTwo;\n attribute vec3 aPositionEnd;\n attribute float aOffset;\n attribute vec3 aColor;\n\n uniform float uProgress;\n uniform mat4 uMVP;\n\n varying vec3 vColor;\n\n vec3 bezier4(vec3 a, vec3 b, vec3 c, vec3 d, float t) {\n return mix(mix(mix(a, b, t), mix(b, c, t), t), mix(mix(b, c, t), mix(c, d, t), t), t);\n }\n\n float easeInOutQuint(float t){\n return t < 0.5 ? 16.0 * t * t * t * t * t : 1.0 + 16.0 * (--t) * t * t * t * t;\n }\n\n void main () {\n float tProgress = easeInOutQuint(min(1.0, max(0.0, (uProgress - aOffset)) / ' + duration + '));\n vec3 newPosition = bezier4(aPositionStart, aControlPointOne, aControlPointTwo, aPositionEnd, tProgress);\n gl_PointSize = ' + pointSize + ' + ((newPosition.y + 1.0) * 80.0);\n gl_Position = uMVP * vec4(newPosition, 1.0);\n vColor = aColor;\n }\n' - - var fragmentShader = '\n precision mediump float;\n\n varying vec3 vColor;\n\n void main() {\n vec2 pc = 2.0 * gl_PointCoord - 1.0;\n gl_FragColor = vec4(vColor, 1.0 - dot(pc, pc));\n }\n' - - var onSetup = function onSetup (gl) { - gl.blendFunc(gl.SRC_ALPHA, gl.ONE) - gl.enable(gl.BLEND) - } - - var onRepeat = function onRepeat () { - rotateY(uniforms[uniforms.length - 1].value, 0.002) - if (uniforms[0].value < 0) { - uniforms[0].value = 1 - } - uniforms[0].value -= step - } - - var options = { - onSetup: onSetup, - onRepeat: onRepeat, - pixelRatio: pixelRatio - } - - starlings(canvas, geometry, multiplier, attributes, uniforms, vertexShader, fragmentShader, options) - } - - var getRandom = function getRandom (value) { - return Math.random() * value - value / 2 - } - - var rotateY = function rotateY (matrix, angle) { - var sin = Math.sin(angle) - var cos = Math.cos(angle) - var clone = JSON.parse(JSON.stringify(matrix)) - - matrix[0] = clone[0] * cos - clone[8] * sin - matrix[1] = clone[1] * cos - clone[9] * sin - matrix[2] = clone[2] * cos - clone[10] * sin - matrix[3] = clone[3] * cos - clone[11] * sin - matrix[8] = clone[0] * sin + clone[8] * cos - matrix[9] = clone[1] * sin + clone[9] * cos - matrix[10] = clone[2] * sin + clone[10] * cos - matrix[11] = clone[3] * sin + clone[11] * cos - } - - var h2r = function h2r (p, q, t) { - if (t < 0) t += 1 - if (t > 1) t -= 1 - if (t < 1 / 6) return p + (q - p) * 6 * t - if (t < 1 / 2) return q - if (t < 2 / 3) return p + (q - p) * 6 * (2 / 3 - t) - return p - } - - var getHSL = function getHSL (h, s, l) { - h = (h % 1 + 1) % 1 - s = Math.max(0, Math.min(1, s)) - l = Math.max(0, Math.min(1, l)) - if (s === 0) return [l, l, l] - var p = l <= 0.5 ? l * (1 + s) : l + s - l * s - var q = 2 * l - p - return [h2r(q, p, h + 1 / 3), h2r(q, p, h), h2r(q, p, h - 1 / 3)] - } - initialize() -} - -// 随机线条 -export const canvasParticle = (function () { - function getElementByTag (name) { return document.getElementsByTagName(name) } - function getELementById (id) { return document.getElementById(id) } - function canvasInit (canvasConfig) { - canvasConfig = canvasConfig || {} - var html = getElementByTag('html')[0] - var body = document.getElementById('canvasView') - var canvasObj = document.createElement('canvas') - var canvas = { element: canvasObj, points: [], config: { vx: canvasConfig.vx || 4, vy: canvasConfig.vy || 4, height: canvasConfig.height || 2, width: canvasConfig.width || 2, count: canvasConfig.count || 100, color: canvasConfig.color || '121, 162, 185', stroke: canvasConfig.stroke || '130,255,255', dist: canvasConfig.dist || 6000, e_dist: canvasConfig.e_dist || 20000, max_conn: 10 } }; if (canvas.element.getContext('2d')) { canvas.context = canvas.element.getContext('2d') } else { return null } - body.style.padding = '0'; body.style.margin = '0'; body.appendChild(canvas.element); canvas.element.style = 'position: fixed; top: 0; left: 0; z-index: -1;'; canvasSize(canvas.element); window.onresize = function () { canvasSize(canvas.element) } - body.onmousemove = function (e) { var event = e || window.event; canvas.mouse = { x: event.clientX, y: event.clientY } } - document.onmouseleave = function () { canvas.mouse = undefined } - setInterval(function () { drawPoint(canvas) }, 40) - } - function canvasSize (canvas) { - var width = document.getElementById('canvasView').style.width - var height = document.getElementById('canvasView').style.height - width = parseInt(width); height = parseInt(height) - canvas.width = width || window.innerWeight || document.documentElement.clientWidth || document.body.clientWidth; canvas.height = height || window.innerWeight || document.documentElement.clientHeight || document.body.clientHeight - } - function drawPoint (canvas) { - var context = canvas.context - var point - var dist - context.clearRect(0, 0, canvas.element.width, canvas.element.height); context.beginPath(); context.fillStyle = 'rgb(' + canvas.config.color + ')'; for (var i = 0, len = canvas.config.count; i < len; i++) { - if (canvas.points.length != canvas.config.count) { point = { x: Math.floor(Math.random() * canvas.element.width), y: Math.floor(Math.random() * canvas.element.height), vx: canvas.config.vx / 2 - Math.random() * canvas.config.vx, vy: canvas.config.vy / 2 - Math.random() * canvas.config.vy } } else { point = borderPoint(canvas.points[i], canvas) } - context.fillRect(point.x - canvas.config.width / 2, point.y - canvas.config.height / 2, canvas.config.width, canvas.config.height); canvas.points[i] = point - } - drawLine(context, canvas, canvas.mouse); context.closePath() - } - function borderPoint (point, canvas) { - var p = point; if (point.x <= 0 || point.x >= canvas.element.width) { p.vx = -p.vx; p.x += p.vx } else if (point.y <= 0 || point.y >= canvas.element.height) { p.vy = -p.vy; p.y += p.vy } else { p = { x: p.x + p.vx, y: p.y + p.vy, vx: p.vx, vy: p.vy } } - return p - } - function drawLine (context, canvas, mouse) { - let dist - context = context || canvas.context; for (var i = 0, len = canvas.config.count; i < len; i++) { - canvas.points[i].max_conn = 0; for (var j = 0; j < len; j++) { - if (i != j) { - dist = Math.round(canvas.points[i].x - canvas.points[j].x) * Math.round(canvas.points[i].x - canvas.points[j].x) + - Math.round(canvas.points[i].y - canvas.points[j].y) * Math.round(canvas.points[i].y - canvas.points[j].y); if (dist <= canvas.config.dist && canvas.points[i].max_conn < canvas.config.max_conn) { - canvas.points[i].max_conn++; context.lineWidth = 0.5 - dist / canvas.config.dist; context.strokeStyle = 'rgba(' + canvas.config.stroke + ',' + (1 - dist / canvas.config.dist) + ')' - context.beginPath(); context.moveTo(canvas.points[i].x, canvas.points[i].y); context.lineTo(canvas.points[j].x, canvas.points[j].y); context.stroke() - } - } - } - if (mouse) { - dist = Math.round(canvas.points[i].x - mouse.x) * Math.round(canvas.points[i].x - mouse.x) + - Math.round(canvas.points[i].y - mouse.y) * Math.round(canvas.points[i].y - mouse.y); if (dist > canvas.config.dist && dist <= canvas.config.e_dist) { canvas.points[i].x = canvas.points[i].x + (mouse.x - canvas.points[i].x) / 20; canvas.points[i].y = canvas.points[i].y + (mouse.y - canvas.points[i].y) / 20 } - if (dist <= canvas.config.e_dist) { context.lineWidth = 1; context.strokeStyle = 'rgba(' + canvas.config.stroke + ',' + (1 - dist / canvas.config.e_dist) + ')'; context.beginPath(); context.moveTo(canvas.points[i].x, canvas.points[i].y); context.lineTo(mouse.x, mouse.y); context.stroke() } - } - } - } - return canvasInit -})() diff --git a/smart-admin-web/src/views/login/components/login-form.vue b/smart-admin-web/src/views/login/components/login-form.vue deleted file mode 100644 index b50ae0e6..00000000 --- a/smart-admin-web/src/views/login/components/login-form.vue +++ /dev/null @@ -1,134 +0,0 @@ - - diff --git a/smart-admin-web/src/views/login/login.less b/smart-admin-web/src/views/login/login.less deleted file mode 100644 index 82a52efc..00000000 --- a/smart-admin-web/src/views/login/login.less +++ /dev/null @@ -1,128 +0,0 @@ -.center { - text-align: center; -} - -.login { - font-family: Arial, "PingFang SC", "Microsoft YaHei"; - width: 100%; - height: 100%; - background: url(../../assets/images/login-bg.jpg) no-repeat fixed; - background-size: cover; - - .content { - width: 424px; - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -56%) - } - .ivu-card { - background: rgba(255, 255, 255, 0.95); - border-radius: 10px; - box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3); - } - .form-con { - margin: 32px 0; - width: 424px; - background: #fff; - padding: 32px 32px; - border-radius: 8px; - .ivu-input { - border: 1px solid #E8E8EE; - border-radius: 4px; - font-size: 16px; - color: #525252; - padding: 0 20px; - &:focus { - border: 1px solid #0097F6; - box-shadow: none; - } - } - .ivu-form-item-error-tip { - height: 30px; - line-height: 30px; - padding: 0; - color: #f66; - top:90%; - } - .ivu-form-item { - margin-bottom: 22px; - } - .remember { - margin: -10px 0 10px; - } - .ivu-input, - .ivu-btn { - height: 48px; - } - .ivu-btn { - font-size: 16px; - } - .ivu-input-group-prepend { - padding: 4px 15px; - } - .code-input { - width: 172px; - } - .codeUrl { - height: 80%; - position: absolute; - z-index: 3; - top: 0; - bottom: 0; - margin: auto; - right: 24px; - border-radius: 0 4px 4px 0; - cursor: pointer; - } - } - .login-tip { - font-size: 10px; - text-align: center; - color: #c3c3c3; - } - .footerDesc { - font-family: "MicrosoftYaHei"; - color: #A6A6A8; - font-size: 14px; - } - .otherWay { - font-size: 14px; - font-family: "Microsoft YaHei"; - .inline { - display: inline-block; - } - .align { - vertical-align: middle; - } - .marginLeft { - margin-left: 20px; - float:right; - } - } - .remember { - font-size: 14px; - } -} -.draw { - position: fixed; - width: 1px; - z-index: 99999; - line-height: 1px; - pointer-events: none; -} - -@keyframes floatOne { - 0% { - opacity: 1; - } - - 50% { - opacity: 1; - } - - 100% { - opacity: 0; - transform: translate3D(0, -20px, 0) scale(5) rotate(45deg); - } -} \ No newline at end of file diff --git a/smart-admin-web/src/views/login/login.vue b/smart-admin-web/src/views/login/login.vue deleted file mode 100644 index 0e529a15..00000000 --- a/smart-admin-web/src/views/login/login.vue +++ /dev/null @@ -1,52 +0,0 @@ - - - - diff --git a/smart-admin-web/src/views/support/api-doc/swagger.vue b/smart-admin-web/src/views/support/api-doc/swagger.vue deleted file mode 100644 index c05f5e73..00000000 --- a/smart-admin-web/src/views/support/api-doc/swagger.vue +++ /dev/null @@ -1,33 +0,0 @@ - - - diff --git a/smart-admin-web/src/views/support/heart-beat/heart-beat-list.vue b/smart-admin-web/src/views/support/heart-beat/heart-beat-list.vue deleted file mode 100644 index 1637378e..00000000 --- a/smart-admin-web/src/views/support/heart-beat/heart-beat-list.vue +++ /dev/null @@ -1,115 +0,0 @@ - - diff --git a/smart-admin-web/src/views/support/monitor/online-user.vue b/smart-admin-web/src/views/support/monitor/online-user.vue deleted file mode 100644 index b133c303..00000000 --- a/smart-admin-web/src/views/support/monitor/online-user.vue +++ /dev/null @@ -1,152 +0,0 @@ - - - - - diff --git a/smart-admin-web/src/views/support/monitor/sql.vue b/smart-admin-web/src/views/support/monitor/sql.vue deleted file mode 100644 index ced71bf8..00000000 --- a/smart-admin-web/src/views/support/monitor/sql.vue +++ /dev/null @@ -1,33 +0,0 @@ - - - diff --git a/smart-admin-web/src/views/support/reload/smart-reload/smart-reload-list.vue b/smart-admin-web/src/views/support/reload/smart-reload/smart-reload-list.vue deleted file mode 100644 index b0027c4c..00000000 --- a/smart-admin-web/src/views/support/reload/smart-reload/smart-reload-list.vue +++ /dev/null @@ -1,273 +0,0 @@ - - diff --git a/smart-admin-web/src/views/support/task/task-list.vue b/smart-admin-web/src/views/support/task/task-list.vue deleted file mode 100644 index d73e96be..00000000 --- a/smart-admin-web/src/views/support/task/task-list.vue +++ /dev/null @@ -1,556 +0,0 @@ - - - - - diff --git a/smart-admin-web/src/views/system/employee/components/department-employee-tree-item/department-employee-tree-item.vue b/smart-admin-web/src/views/system/employee/components/department-employee-tree-item/department-employee-tree-item.vue deleted file mode 100644 index 8f64b4d5..00000000 --- a/smart-admin-web/src/views/system/employee/components/department-employee-tree-item/department-employee-tree-item.vue +++ /dev/null @@ -1,124 +0,0 @@ - - - - diff --git a/smart-admin-web/src/views/system/employee/components/department-employee-tree/department-employee-tree.vue b/smart-admin-web/src/views/system/employee/components/department-employee-tree/department-employee-tree.vue deleted file mode 100644 index be1e3c5a..00000000 --- a/smart-admin-web/src/views/system/employee/components/department-employee-tree/department-employee-tree.vue +++ /dev/null @@ -1,251 +0,0 @@ - - - - diff --git a/smart-admin-web/src/views/system/employee/position/position-list.vue b/smart-admin-web/src/views/system/employee/position/position-list.vue deleted file mode 100644 index 98870609..00000000 --- a/smart-admin-web/src/views/system/employee/position/position-list.vue +++ /dev/null @@ -1,366 +0,0 @@ - - - - diff --git a/smart-admin-web/src/views/system/employee/role-employee/components/employee-table-add/employee-table-add.vue b/smart-admin-web/src/views/system/employee/role-employee/components/employee-table-add/employee-table-add.vue deleted file mode 100644 index e93daec4..00000000 --- a/smart-admin-web/src/views/system/employee/role-employee/components/employee-table-add/employee-table-add.vue +++ /dev/null @@ -1,527 +0,0 @@ - - - diff --git a/smart-admin-web/src/views/system/employee/role-employee/components/employee-table-detail/employee-table-detail.vue b/smart-admin-web/src/views/system/employee/role-employee/components/employee-table-detail/employee-table-detail.vue deleted file mode 100644 index a2cc214d..00000000 --- a/smart-admin-web/src/views/system/employee/role-employee/components/employee-table-detail/employee-table-detail.vue +++ /dev/null @@ -1,72 +0,0 @@ - - - diff --git a/smart-admin-web/src/views/system/employee/role-employee/components/employee-table/employee-table.vue b/smart-admin-web/src/views/system/employee/role-employee/components/employee-table/employee-table.vue deleted file mode 100644 index d75ae5df..00000000 --- a/smart-admin-web/src/views/system/employee/role-employee/components/employee-table/employee-table.vue +++ /dev/null @@ -1,569 +0,0 @@ - - - diff --git a/smart-admin-web/src/views/system/employee/role-employee/role-employee-manage.vue b/smart-admin-web/src/views/system/employee/role-employee/role-employee-manage.vue deleted file mode 100644 index 034407a7..00000000 --- a/smart-admin-web/src/views/system/employee/role-employee/role-employee-manage.vue +++ /dev/null @@ -1,831 +0,0 @@ - - - - diff --git a/smart-admin-web/src/views/system/employee/role/components/role-data-scope/role-data-scope.vue b/smart-admin-web/src/views/system/employee/role/components/role-data-scope/role-data-scope.vue deleted file mode 100644 index 0413ce76..00000000 --- a/smart-admin-web/src/views/system/employee/role/components/role-data-scope/role-data-scope.vue +++ /dev/null @@ -1,144 +0,0 @@ - - - - diff --git a/smart-admin-web/src/views/system/employee/role/components/role-list/role-list.vue b/smart-admin-web/src/views/system/employee/role/components/role-list/role-list.vue deleted file mode 100644 index 55ab14c3..00000000 --- a/smart-admin-web/src/views/system/employee/role/components/role-list/role-list.vue +++ /dev/null @@ -1,407 +0,0 @@ - - - - diff --git a/smart-admin-web/src/views/system/employee/role/components/role-tree/role-tree.vue b/smart-admin-web/src/views/system/employee/role/components/role-tree/role-tree.vue deleted file mode 100644 index fe4eec67..00000000 --- a/smart-admin-web/src/views/system/employee/role/components/role-tree/role-tree.vue +++ /dev/null @@ -1,431 +0,0 @@ - - - - diff --git a/smart-admin-web/src/views/system/employee/role/role-manage.vue b/smart-admin-web/src/views/system/employee/role/role-manage.vue deleted file mode 100644 index 9765f362..00000000 --- a/smart-admin-web/src/views/system/employee/role/role-manage.vue +++ /dev/null @@ -1,339 +0,0 @@ - - - diff --git a/smart-admin-web/src/views/system/file/file-list.vue b/smart-admin-web/src/views/system/file/file-list.vue deleted file mode 100644 index 9f79d984..00000000 --- a/smart-admin-web/src/views/system/file/file-list.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - diff --git a/smart-admin-web/src/views/system/system-setting/system-config/system-config.vue b/smart-admin-web/src/views/system/system-setting/system-config/system-config.vue deleted file mode 100644 index 0fd884a4..00000000 --- a/smart-admin-web/src/views/system/system-setting/system-config/system-config.vue +++ /dev/null @@ -1,397 +0,0 @@ - - - diff --git a/smart-admin-web/src/views/system/system-setting/system-privilege/components/privilege-form.vue b/smart-admin-web/src/views/system/system-setting/system-privilege/components/privilege-form.vue deleted file mode 100644 index f4454771..00000000 --- a/smart-admin-web/src/views/system/system-setting/system-privilege/components/privilege-form.vue +++ /dev/null @@ -1,144 +0,0 @@ - - - diff --git a/smart-admin-web/src/views/system/system-setting/system-privilege/system-privilege.vue b/smart-admin-web/src/views/system/system-setting/system-privilege/system-privilege.vue deleted file mode 100644 index ade7836b..00000000 --- a/smart-admin-web/src/views/system/system-setting/system-privilege/system-privilege.vue +++ /dev/null @@ -1,410 +0,0 @@ - - - diff --git a/smart-admin-web/src/views/system/user-log/user-login-log.vue b/smart-admin-web/src/views/system/user-log/user-login-log.vue deleted file mode 100644 index bc9b0928..00000000 --- a/smart-admin-web/src/views/system/user-log/user-login-log.vue +++ /dev/null @@ -1,185 +0,0 @@ - - - diff --git a/smart-admin-web/src/views/system/user-log/user-operate-log.vue b/smart-admin-web/src/views/system/user-log/user-operate-log.vue deleted file mode 100644 index db47df63..00000000 --- a/smart-admin-web/src/views/system/user-log/user-operate-log.vue +++ /dev/null @@ -1,252 +0,0 @@ - - - - - diff --git a/smart-admin-web/src/views/three-router/three-content.vue b/smart-admin-web/src/views/three-router/three-content.vue deleted file mode 100644 index eeac6f71..00000000 --- a/smart-admin-web/src/views/three-router/three-content.vue +++ /dev/null @@ -1,26 +0,0 @@ - - - diff --git a/smart-admin-web/tests/e2e/.eslintrc b/smart-admin-web/tests/e2e/.eslintrc deleted file mode 100644 index 02023fba..00000000 --- a/smart-admin-web/tests/e2e/.eslintrc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "plugins": [ - "cypress" - ], - "env": { - "mocha": true, - "cypress/globals": true - }, - "rules": { - "strict": "off" - } -} diff --git a/smart-admin-web/tests/e2e/plugins/index.js b/smart-admin-web/tests/e2e/plugins/index.js deleted file mode 100644 index cfefc78b..00000000 --- a/smart-admin-web/tests/e2e/plugins/index.js +++ /dev/null @@ -1,9 +0,0 @@ -// https://docs.cypress.io/guides/guides/plugins-guide.html - -module.exports = (on, config) => Object.assign({}, config, { - fixturesFolder: 'tests/e2e/fixtures', - integrationFolder: 'tests/e2e/specs', - screenshotsFolder: 'tests/e2e/screenshots', - videosFolder: 'tests/e2e/videos', - supportFile: 'tests/e2e/support/index.js' -}) diff --git a/smart-admin-web/tests/e2e/specs/test.js b/smart-admin-web/tests/e2e/specs/test.js deleted file mode 100644 index 41ad94a0..00000000 --- a/smart-admin-web/tests/e2e/specs/test.js +++ /dev/null @@ -1,8 +0,0 @@ -// https://docs.cypress.io/api/introduction/api.html - -describe('My First Test', () => { - it('Visits the app root url', () => { - cy.visit('/') - cy.contains('h1', 'Welcome to Your Vue.js App') - }) -}) diff --git a/smart-admin-web/tests/e2e/support/commands.js b/smart-admin-web/tests/e2e/support/commands.js deleted file mode 100644 index c1f5a772..00000000 --- a/smart-admin-web/tests/e2e/support/commands.js +++ /dev/null @@ -1,25 +0,0 @@ -// *********************************************** -// This example commands.js shows you how to -// create various custom commands and overwrite -// existing commands. -// -// For more comprehensive examples of custom -// commands please read more here: -// https://on.cypress.io/custom-commands -// *********************************************** -// -// -// -- This is a parent command -- -// Cypress.Commands.add("login", (email, password) => { ... }) -// -// -// -- This is a child command -- -// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... }) -// -// -// -- This is a dual command -- -// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... }) -// -// -// -- This is will overwrite an existing command -- -// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) diff --git a/smart-admin-web/tests/e2e/support/index.js b/smart-admin-web/tests/e2e/support/index.js deleted file mode 100644 index d68db96d..00000000 --- a/smart-admin-web/tests/e2e/support/index.js +++ /dev/null @@ -1,20 +0,0 @@ -// *********************************************************** -// This example support/index.js is processed and -// loaded automatically before your test files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.js using ES2015 syntax: -import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/smart-admin-web/tests/unit/.eslintrc.js b/smart-admin-web/tests/unit/.eslintrc.js deleted file mode 100644 index 8038afe9..00000000 --- a/smart-admin-web/tests/unit/.eslintrc.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - env: { - mocha: true - }, - rules: { - 'import/no-extraneous-dependencies': 'off' - } -} diff --git a/smart-admin-web/tests/unit/HelloWorld.spec.js b/smart-admin-web/tests/unit/HelloWorld.spec.js deleted file mode 100644 index bb668bf4..00000000 --- a/smart-admin-web/tests/unit/HelloWorld.spec.js +++ /dev/null @@ -1,13 +0,0 @@ -import { expect } from 'chai' -import { shallow } from '@vue/test-utils' -import HelloWorld from '@/components/HelloWorld.vue' - -describe('HelloWorld.vue', () => { - it('renders props.msg when passed', () => { - const msg = 'new message' - const wrapper = shallow(HelloWorld, { - propsData: { msg } - }) - expect(wrapper.text()).to.include(msg) - }) -}) diff --git a/smart-admin-web/vscode/settings.json b/smart-admin-web/vscode/settings.json deleted file mode 100644 index ab4bb79a..00000000 --- a/smart-admin-web/vscode/settings.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\cmd.exe", - "jetbrainsKeymap.promptV3Features": true, - "editor.multiCursorModifier": "ctrlCmd", - "editor.formatOnPaste": true, - "debug.allowBreakpointsEverywhere": true, - "files.autoSave": "afterDelay", - "workbench.colorTheme": "One Dark Pro", - "workbench.iconTheme": "vscode-icons", - "vetur.validation.template": false, - "[javascript]": { - "editor.defaultFormatter": "vscode.typescript-language-features" - }, - "[less]": { - "editor.defaultFormatter": "HookyQR.beautify" - }, - "javascript.format.insertSpaceBeforeFunctionParenthesis": true, - "eslint.autoFixOnSave": true, - "eslint.alwaysShowStatus": true, - "workbench.startupEditor": "newUntitledFile", - //"vetur.format.defaultFormatter.html": "js-beautify-html", - //"vetur.format.defaultFormatter.js": "vscode-typescript", //让vue中的js按编辑器自带的ts格式进行格式化 - "vetur.format.defaultFormatterOptions": { - // "js-beautify-html": { - // // force|force-aligned | force-expand-multiline - // "wrap_line_length": 100, - // "wrap_attributes": "auto", - // "end_with_newline": false - // //"wrap_attributes": "auto" - // }, - "prettyhtml": { - "printWidth": 100, - "singleQuote": false, - "wrapAttributes": false, - "sortAttributes": true - }, - "prettier": { - "semi": true, - "singleQuote": true - } - }, - "search.location": "panel", -} diff --git a/smart-admin-web/vue.config.js b/smart-admin-web/vue.config.js deleted file mode 100644 index af5bfbf7..00000000 --- a/smart-admin-web/vue.config.js +++ /dev/null @@ -1,77 +0,0 @@ -const path = require('path'); -const resolve = dir => { - return path.join(__dirname, dir); -}; -const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); -const CompressionWebpackPlugin = require('compression-webpack-plugin'); -const productionGzipExtensions = ['js', 'css']; -// 项目部署基础 -// 默认情况下,我们假设你的应用将被部署在域的根目录下, -// 例如:https://www.my-app.com/ -// 默认:'/' -// 如果您的应用程序部署在子路径中,则需要在这指定子路径 -// 例如:https://www.foobar.com/my-app/ -// 需要将它改为'/my-app/' -const publicPath = process.env.NODE_ENV === 'production' ? '/' : '/'; -const lintOnSave = process.env.NODE_ENV === 'production'; - -module.exports = { - // Project deployment base - // By default we assume your app will be deployed at the root of a domain, - // e.g. https://www.my-app.com/ - // If your app is deployed at a sub-path, you will need to specify that - // sub-path here. For example, if your app is deployed at - // https://www.foobar.com/my-app/ - // then change this to '/my-app/' - publicPath, - // tweak internal webpack configuration. - // see https://github.com/vuejs/vue-cli/blob/dev/docs/webpack.md - // 如果你不需要使用eslint,把lintOnSave设为false即可 - lintOnSave, - chainWebpack: config => { - config.entry = { - main: ['babel-polyfill', './src/main'], - vendors: './src/vendors' - }; - config.module - .rule('view-design') - .test(/view-design.src.*?js$/) - .use('babel') - .loader('babel-loader') - .end(); - config.resolve.alias - .set('@', resolve('src')) // key,value自行定义,比如.set('@@', resolve('src/components')) - .set('_c', resolve('src/components')); - }, - // 设为false打包时不生成.map文件 - productionSourceMap: false, - // 这里写你调用接口的基础路径,来解决跨域,如果设置了代理,那你本地开发环境的axios的baseUrl要写为 '' ,即空字符串 - // devServer: { - // proxy: 'localhost:3000' - // } - configureWebpack: { - plugins: [ - // 开启gzip压缩 - new CompressionWebpackPlugin({ - algorithm: 'gzip', - test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'), - threshold: 10240, - minRatio: 0.8 - }) - ], - optimization: { - minimizer: [ - new UglifyJsPlugin({ - uglifyOptions: { - compress: { - warnings: true, - drop_console: true, // console - drop_debugger: true, - pure_funcs: ['console.log'] // 移除console - } - } - }) - ] - } - } -}; diff --git a/代码规范/api接口规范.md b/代码规范/api接口规范.md deleted file mode 100644 index 044b17dd..00000000 --- a/代码规范/api接口规范.md +++ /dev/null @@ -1,38 +0,0 @@ -### Restful接口规范 -1、不推荐使用 rest 命名 url, 只能使用 get/post 方法。url 命名上规范如下:虽然 Rest 大法好,但是有时并不能一眼根据 url看出来是什么操作。 -url 格式为: - -/业务模块/子模块/动作 - -举例: -``` -GET /department/get/{id} 查询某个部门详细信息 -POST /department/query 复杂查询 -POST /department/add 添加部门 -POST /department/update 更新部门 -GET /department/delete/{id} 删除部门 -``` -### controller 里接口 swagger 规范 -1、controller每个方法必须添加 swagger 文档注解 @ApiOperation ,并填写接口描述信息,描述最后必须加上作者信息 @author 哪吒 -比如: -```java - @ApiOperation("更新部门信息 @author 哪吒") - @PostMapping("/department/update") - public ResponseDTO updateDepartment(@Valid @RequestBody DeptUpdateDTO deptUpdateDTO) { - return departmentService.updateDepartment(deptUpdateDTO); - } -``` - -### controller 里 传入和返回 JavaBean 规范 -1、类中的每个字段添加注释 -2、对于枚举值的类型,要清楚标注清楚可能的值,以及每个值表示什么含义 -比如: -``` -public class UserVO{ - - @ApiModelProperty("性别:0表示 女,1表示 男,2表示 未知") - private Integer gender; - -} - -``` \ No newline at end of file diff --git a/代码规范/front-standard-guide.md b/代码规范/front-standard-guide.md deleted file mode 100644 index 629b060d..00000000 --- a/代码规范/front-standard-guide.md +++ /dev/null @@ -1,1148 +0,0 @@ -# 前端 JS 项目开发规范 - -规范的目的是为了编写高质量的代码,让你的团队成员每天得心情都是愉悦的,大家在一起是快乐的。 - -引自《阿里规约》的开头片段: - -_----现代软件架构的复杂性需要协同开发完成,如何高效地协同呢?无规矩不成方圆,无规范难以协同,比如,制订交通法规表面上是要限制行车权,实际上是保障公众的人身安全,试想如果没有限速,没有红绿灯,谁还敢上路行驶。对软件来说,适当的规范和标准绝不是消灭代码内容的创造性、优雅性,而是限制过度个性化,以一种普遍认可的统一方式一起做事,提升协作效率,降低沟通成本。代码的字里行间流淌的是软件系统的血液,质量的提升是尽可能少踩坑,杜绝踩重复的坑,切实提升系统稳定性,码出质量。_ - -# 一、编程规约 - -### (一)命名规范 - -#### 1.1.1 项目命名 - -全部采用小写方式, 以中划线分隔。 - -正例:`mall-management-system` - -反例:`mall_management-system / mallManagementSystem` - -#### 1.1.2 目录命名 - -全部采用小写方式, 以中划线分隔,有复数结构时,要采用复数命名法, 缩写不用复数 - -正例: `scripts / styles / components / images / utils / layouts / demo-styles / demo-scripts / img / doc` - -反例: `script / style / demo_scripts / demoStyles / imgs / docs` - -【特殊】VUE 的项目中的 components 中的组件目录,使用 kebab-case 命名 - -正例: `head-search / page-loading / authorized / notice-icon` - -反例: `HeadSearch / PageLoading` - -【特殊】VUE 的项目中的除 components 组件目录外的所有目录也使用 kebab-case 命名 -正例: `page-one / shopping-car / user-management` - -反例: `ShoppingCar / UserManagement` - -#### 1.1.3 JS、CSS、SCSS、HTML、PNG 文件命名 - -全部采用小写方式, 以中划线分隔 - -正例: `render-dom.js / signup.css / index.html / company-logo.png` - -反例: `renderDom.js / UserManagement.html` - -#### 1.1.4 命名严谨性 - -代码中的命名严禁使用拼音与英文混合的方式,更不允许直接使用中文的方式。 说明:正确的英文拼写和语法可以让阅读者易于理解,避免歧义。注意,即使纯拼音命名方式也要避免采用 - -正例:`henan / luoyang / rmb 等国际通用的名称,可视同英文。` - -反例:`DaZhePromotion [打折] / getPingfenByName() [评分] / int 某变量 = 3` - -**杜绝完全不规范的缩写,避免望文不知义:** - -反例:AbstractClass“缩写”命名成 AbsClass;condition“缩写”命名成 condi,此类随意缩写严重降低了代码的可阅读性。 - -### (二)HTML 规范 (Vue Template 同样适用) - -#### 1.2.1 HTML 类型 - -推荐使用 HTML5 的文档类型申明: . -(建议使用 text/html 格式的 HTML。避免使用 XHTML。XHTML 以及它的属性,比如 application/xhtml+xml 在浏览器中的应用支持与优化空间都十分有限)。 - -- 规定字符编码 -- IE 兼容模式 -- 规定字符编码 -- doctype 大写 - -正例: - -```html - - - - - - Page title - - - Company - - -``` - -#### 1.2.2 缩进 - -缩进使用 2 个空格(一个 tab) - -嵌套的节点应该缩进。 - -#### 1.2.3 分块注释 - -在每一个块状元素,列表元素和表格元素后,加上一对 HTML 注释。注释格式 - -\ -
- -
- - -``` - -### 1.2.4 语义化标签 - -HTML5 中新增很多语义化标签,所以优先使用语义化标签,避免一个页面都是 div 或者 p 标签 - -正例 - -```html -
-
-``` - -反例 - -```html -
-

-
-``` - -#### 1.2.5 引号 - -使用双引号(" ") 而不是单引号(' ') 。 - -正例: `
` - -反例: `
` - -### (三) CSS 规范 - -#### 1.3.1 命名 - -- 类名使用小写字母,以中划线分隔 -- id 采用驼峰式命名 -- scss 中的变量、函数、混合、placeholder 采用驼峰式命名 - -ID 和 class 的名称总是使用可以反应元素目的和用途的名称,或其他通用的名称,代替表象和晦涩难懂的名称 - - -不推荐: -```css -.fw-800 { - font-weight: 800; -} - -.red { - color: red; -} -``` -推荐: -``` -.heavy { - font-weight: 800; -} - -.important { - color: red; -} -``` - -#### 1.3.2 选择器 - -1)css 选择器中避免使用标签名 -从结构、表现、行为分离的原则来看,应该尽量避免 css 中出现 HTML 标签,并且在 css 选择器中出现标签名会存在潜在的问题。 - -2)很多前端开发人员写选择器链的时候不使用 直接子选择器(注:直接子选择器和后代选择器的区别)。有时,这可能会导致疼痛的设计问题并且有时候可能会很耗性能。然而,在任何情况下,这是一个非常不好的做法。如果你不写很通用的,需要匹配到 DOM 末端的选择器, 你应该总是考虑直接子选择器。 - -不推荐: - -```css -.content .title { - font-size: 2rem; -} -``` - -推荐: - -```css -.content > .title { - font-size: 2rem; -} -``` - -#### 1.3.3 尽量使用缩写属性 - -不推荐: - -```css -border-top-style: none; -font-family: palatino, georgia, serif; -font-size: 100%; -line-height: 1.6; -padding-bottom: 2em; -padding-left: 1em; -padding-right: 1em; -padding-top: 0; -``` - -推荐: - -```css -border-top: 0; -font: 100%/1.6 palatino, georgia, serif; -padding: 0 1em 2em; -``` -#### 1.3.4 每个选择器及属性独占一行 -不推荐: -``` -button{ - width:100px;height:50px;color:#fff;background:#00a0e9; -} -``` -推荐: -``` -button{ - width:100px; - height:50px; - color:#fff; - background:#00a0e9; -} -``` -#### 1.3.5 省略0后面的单位 -不推荐: -``` -div{ - padding-bottom: 0px; - margin: 0em; -} -``` -推荐: -``` -div{ - padding-bottom: 0; - margin: 0; -} -``` -#### 1.3.6 避免使用ID选择器及全局标签选择器防止污染全局样式 -不推荐: -```css -#header{ - padding-bottom: 0px; - margin: 0em; -} -``` -推荐: -``` -.header{ - padding-bottom: 0px; - margin: 0em; -} -``` - -### (四) LESS 规范 - -#### 1.4.1 代码组织 -##### 1)将公共less文件放置在style/less/common文件夹 -例:// color.less,common.less - - -##### 2)按以下顺序组织 -1、@import; -2、变量声明; -3、样式声明; -``` -@import "mixins/size.less"; - -@default-text-color: #333; - -.page { - width: 960px; - margin: 0 auto; -} -``` -#### 1.4.2 避免嵌套层级过多 - 将嵌套深度限制在3级。对于超过4级的嵌套,给予重新评估。这可以避免出现过于详实的CSS选择器。 -避免大量的嵌套规则。当可读性受到影响时,将之打断。推荐避免出现多于20行的嵌套规则出现 - -不推荐: -```less -.main{ - .title{ - .name{ - color:#fff - } - } -} -``` -推荐: -``` -.main-title{ - .name{ - color:#fff - } -} -``` - -### (五) Javascript 规范 - -#### 1.5.1 命名 - -##### 1) 采用小写驼峰命名 lowerCamelCase,代码中的命名均不能以下划线,也不能以下划线或美元符号结束 - -反例: `_name / name_ / name$` - -##### 2) 方法名、参数名、成员变量、局部变量都统一使用 lowerCamelCase 风格,必须遵从驼峰形式。 - -正例: `localValue / getHttpMessage() / inputUserId` - -\***\*其中 method 方法命名必须是 动词 或者 动词+名词 形式\*\*** - -正例:`saveShopCarData /openShopCarInfoDialog` - -反例:`save / open / show / go` - -\***\*特此说明,增删查改,详情统一使用如下 5 个单词,不得使用其他(目的是为了统一各个端)\*\*** - -`add / update / delete / detail / get` - -**附: 函数方法常用的动词:** - -```js -get 获取/set 设置, -add 增加/remove 删除 -create 创建/destory 移除 -start 启动/stop 停止 -open 打开/close 关闭, -read 读取/write 写入 -load 载入/save 保存, -create 创建/destroy 销毁 -begin 开始/end 结束, -backup 备份/restore 恢复 -import 导入/export 导出, -split 分割/merge 合并 -inject 注入/extract 提取, -attach 附着/detach 脱离 -bind 绑定/separate 分离, -view 查看/browse 浏览 -edit 编辑/modify 修改, -select 选取/mark 标记 -copy 复制/paste 粘贴, -undo 撤销/redo 重做 -insert 插入/delete 移除, -add 加入/append 添加 -clean 清理/clear 清除, -index 索引/sort 排序 -find 查找/search 搜索, -increase 增加/decrease 减少 -play 播放/pause 暂停, -launch 启动/run 运行 -compile 编译/execute 执行, -debug 调试/trace 跟踪 -observe 观察/listen 监听, -build 构建/publish 发布 -input 输入/output 输出, -encode 编码/decode 解码 -encrypt 加密/decrypt 解密, -compress 压缩/decompress 解压缩 -pack 打包/unpack 解包, -parse 解析/emit 生成 -connect 连接/disconnect 断开, -send 发送/receive 接收 -download 下载/upload 上传, -refresh 刷新/synchronize 同步 -update 更新/revert 复原, -lock 锁定/unlock 解锁 -check out 签出/check in 签入, -submit 提交/commit 交付 -push 推/pull 拉, -expand 展开/collapse 折叠 -begin 起始/end 结束, -start 开始/finish 完成 -enter 进入/exit 退出, -abort 放弃/quit 离开 -obsolete 废弃/depreciate 废旧, -collect 收集/aggregate 聚集 -``` - -##### 3) 常量命名全部大写,单词间用下划线隔开,力求语义表达完整清楚,不要嫌名字长。 - -正例: `MAX_STOCK_COUNT` - -反例: `MAX_COUNT` - -#### 1.5.2 代码格式 - -##### 1) 使用 2 个空格进行缩进 - -正例: - -```js -if (x < y) { - x += 10; -} else { - x += 1; -} -``` - -##### 2) 不同逻辑、不同语义、不同业务的代码之间插入一个空行分隔开来以提升可读性。 - -> 说明:任何情形,没有必要插入多个空行进行隔开。 - -#### 1.5.3 字符串 - -统一使用单引号(‘),不使用双引号(“)。这在创建 HTML 字符串非常有好处: - -正例: - -```js -let str = 'foo'; -let testDiv = '
'; -``` - -反例: - -```js -let str = 'foo'; -let testDiv = "
"; -``` - -#### 1.5.4 对象声明 - -##### 1)使用字面值创建对象 - -正例: `let user = {};` - -反例: `let user = new Object();` - -##### 2) 使用字面量来代替对象构造器 - -正例: - -```js -var user = { - age: 0, - name: 1, - city: 3 -}; -``` - -反例: - -```js -var user = new Object(); -user.age = 0; -user.name = 0; -user.city = 0; -``` - -#### 1.5.5 使用 ES6,7 - -必须优先使用 ES6,7 中新增的语法糖和函数。这将简化你的程序,并让你的代码更加灵活和可复用。 - -> 必须强制使用 ES6, ES7 的新语法,比如箭头函数、await/async , 解构, let , for...of 等等 - -#### 1.5.6 括号 - -下列关键字后必须有大括号(即使代码块的内容只有一行):if, else, for, while, do, switch, try, catch, finally, with。 - -正例: - -```js -if (condition) { - doSomething(); -} -``` - -反例: - -```js -if (condition) doSomething(); -``` - -#### 1.5.7 undefined 判断 - -永远不要直接使用 undefined 进行变量判断;使用 typeof 和字符串'undefined'对变量进行判断。 - -正例: - -```js -if (typeof person === 'undefined') { - ... -} -``` - -反例: - -```js -if (person === undefined) { - ... -} -``` - -#### 1.5.8 条件判断和循环最多三层 - -条件判断能使用三目运算符和逻辑运算符解决的,就不要使用条件判断,但是谨记不要写太长的三目运算符。如果超过 3 层请抽成函数,并写清楚注释。 - -#### 1.5.9 this 的转换命名 - -对上下文 this 的引用只能使用'self'来命名 - -#### 1.5.10 慎用 console.log - -因 console.log 大量使用会有性能问题,所以在非 webpack 项目中谨慎使用 log 功能 - -# 二、Vue 项目规范 - -### (一) Vue 编码基础 - -vue 项目规范以 Vue 官方规范 (https://cn.vuejs.org/v2/style-guide/) 中的 A 规范为基础,在其上面进行项目开发,故所有代码均遵守该规范。 - -> 请仔仔细细阅读 Vue 官方规范,切记,此为第一步。 - -#### 2.1.1. 组件规范 - -##### 1) 组件名为多个单词。 - -组件名应该始终是多个单词组成(大于等于 2),且命名规范为`KebabCase`格式。 -这样做可以避免跟现有的以及未来的 HTML 元素相冲突,因为所有的 HTML 元素名称都是单个单词的。 - -正例: - -```js -export default { - name: 'TodoItem' - // ... -}; -``` - -反例: - -```js -export default { - name: 'Todo', - // ... -} -export default { - name: 'todo-item', - // ... -} -``` - -##### 2) 组件文件名为 pascal-case 格式 - -正例: - -``` -components/ -|- my-component.vue -``` - -反例: - -``` -components/ -|- myComponent.vue -|- MyComponent.vue -``` - -##### 3) 基础组件文件名为 base 开头,使用完整单词而不是缩写。 - -正例: - -``` -components/ -|- base-button.vue -|- base-table.vue -|- base-icon.vue -``` - -反例: - -``` -components/ -|- MyButton.vue -|- VueTable.vue -|- Icon.vue -``` - -##### 4) 和父组件紧密耦合的子组件应该以父组件名作为前缀命名 - -正例: - -``` -components/ -|- todo-list.vue -|- todo-list-item.vue -|- todo-list-item-button.vue -|- user-profile-options.vue (完整单词) -``` - -反例: - -``` -components/ -|- TodoList.vue -|- TodoItem.vue -|- TodoButton.vue -|- UProfOpts.vue (使用了缩写) -``` - -##### 5) 在 Template 模版中使用组件,应使用 PascalCase 模式,并且使用自闭合组件。 - -正例: - -```html - - - -``` - -反例: - -```html -
-``` - -##### 6) 组件的 data 必须是一个函数 - -当在组件中使用 data 属性的时候 (除了 new Vue 外的任何地方),它的值必须是返回一个对象的函数。 因为如果直接是一个对象的话,子组件之间的属性值会互相影响。 - -正例: - -```js -export default { - data () { -​ return { -​ name: 'jack' -​ } - } -} -``` - -反例: - -```js -export default { - data: { -​ name: 'jack' - } -} -``` - -##### 7) Prop 定义应该尽量详细 - -- 必须使用 camelCase 驼峰命名 -- 必须指定类型 -- 必须加上注释,表明其含义 -- 必须加上 required 或者 default,两者二选其一 -- 如果有业务需要,必须加上 validator 验证 - -正例: - -```js - props: { - // 组件状态,用于控制组件的颜色 - status: { - ​ type: String, - required: true, - ​ validator: function (value) { - ​ return [ - ​ 'succ', - ​ 'info', - ​ 'error' - ​ ].indexOf(value) !== -1 - ​ } - }, - // 用户级别,用于显示皇冠个数 - userLevel:{ - type: String, - required: true - } -} -``` - -##### 8) 为组件样式设置作用域 - -正例: - -```html - - - - -``` - -反例: - -```html - - - -``` - -##### 9) 如果特性元素较多,应该主动换行。 - -正例: -```html - -``` - - -反例: -```html - -``` - -#### 2.1.2. 模板中使用简单的表达式 - -组件模板应该只包含简单的表达式,复杂的表达式则应该重构为计算属性或方法。复杂表达式会让你的模板变得不那么声明式。我们应该尽量描述应该出现的是什么,而非如何计算那个值。而且计算属性和方法使得代码可以重用。 - -正例: - -```js - - -// 复杂表达式已经移入一个计算属性 -computed: { - normalizedFullName: function () { -​ return this.fullName.split(' ').map(function (word) { -​ return word[0].toUpperCase() + word.slice(1) -​ }).join(' ') - } -} -``` - -反例: - -```js - -``` - -#### 2.1.3 指令都使用缩写形式 - -指令推荐都使用缩写形式,(用 : 表示 v-bind: 、用 @ 表示 v-on: 和用 # 表示 v-slot:) - -正例: - -```js - -``` - -反例: - -```js - - -``` - -#### 2.1.4 标签顺序保持一致 - -单文件组件应该总是让标签顺序保持为 `