10 |
11 |
37 |
--------------------------------------------------------------------------------
/snow-ui/src/api/system/post.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询岗位列表
4 | export function listPost(query) {
5 | return request({
6 | url: '/system/post/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 查询岗位详细
13 | export function getPost(postId) {
14 | return request({
15 | url: '/system/post/' + postId,
16 | method: 'get'
17 | })
18 | }
19 |
20 | // 新增岗位
21 | export function addPost(data) {
22 | return request({
23 | url: '/system/post',
24 | method: 'post',
25 | data: data
26 | })
27 | }
28 |
29 | // 修改岗位
30 | export function updatePost(data) {
31 | return request({
32 | url: '/system/post',
33 | method: 'put',
34 | data: data
35 | })
36 | }
37 |
38 | // 删除岗位
39 | export function delPost(postId) {
40 | return request({
41 | url: '/system/post/' + postId,
42 | method: 'delete'
43 | })
44 | }
45 |
--------------------------------------------------------------------------------
/snow-ui/src/layout/components/Sidebar/Link.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
44 |
--------------------------------------------------------------------------------
/snow-ui/src/settings.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | /**
3 | * 侧边栏主题 深色主题theme-dark,浅色主题theme-light
4 | */
5 | sideTheme: 'theme-dark',
6 |
7 | /**
8 | * 是否系统布局配置
9 | */
10 | showSettings: false,
11 |
12 | /**
13 | * 是否显示顶部导航
14 | */
15 | topNav: false,
16 |
17 | /**
18 | * 是否显示 tagsView
19 | */
20 | tagsView: true,
21 |
22 | /**
23 | * 是否固定头部
24 | */
25 | fixedHeader: false,
26 |
27 | /**
28 | * 是否显示logo
29 | */
30 | sidebarLogo: true,
31 |
32 | /**
33 | * 是否显示动态标题
34 | */
35 | dynamicTitle: false,
36 |
37 | /**
38 | * @type {string | array} 'production' | ['production', 'development']
39 | * @description Need show err logs component.
40 | * The default is only used in the production env
41 | * If you want to also use it in dev, you can pass ['production', 'development']
42 | */
43 | errorLog: 'production'
44 | }
45 |
--------------------------------------------------------------------------------
/snow-common/snow-common-datascope/src/main/java/com/snow/common/datascope/annotation/DataScope.java:
--------------------------------------------------------------------------------
1 | package com.snow.common.datascope.annotation;
2 |
3 | import java.lang.annotation.Documented;
4 | import java.lang.annotation.ElementType;
5 | import java.lang.annotation.Retention;
6 | import java.lang.annotation.RetentionPolicy;
7 | import java.lang.annotation.Target;
8 |
9 | /**
10 | * 数据权限过滤注解
11 | *
12 | * @author snow
13 | */
14 | @Target(ElementType.METHOD)
15 | @Retention(RetentionPolicy.RUNTIME)
16 | @Documented
17 | public @interface DataScope
18 | {
19 | /**
20 | * 部门表的别名
21 | */
22 | public String deptAlias() default "";
23 |
24 | /**
25 | * 用户表的别名
26 | */
27 | public String userAlias() default "";
28 |
29 | /**
30 | * 权限字符(用于多个角色匹配符合要求的权限)默认根据权限注解@RequiresPermissions获取,多个权限用逗号分隔开来
31 | */
32 | public String permission() default "";
33 | }
34 |
--------------------------------------------------------------------------------
/snow-common/snow-common-sensitive/src/main/java/com/snow/common/sensitive/annotation/Sensitive.java:
--------------------------------------------------------------------------------
1 | package com.snow.common.sensitive.annotation;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 | import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
8 | import com.fasterxml.jackson.databind.annotation.JsonSerialize;
9 | import com.snow.common.sensitive.config.SensitiveJsonSerializer;
10 | import com.snow.common.sensitive.enums.DesensitizedType;
11 |
12 | /**
13 | * 数据脱敏注解
14 | *
15 | * @author snow
16 | */
17 | @Retention(RetentionPolicy.RUNTIME)
18 | @Target(ElementType.FIELD)
19 | @JacksonAnnotationsInside
20 | @JsonSerialize(using = SensitiveJsonSerializer.class)
21 | public @interface Sensitive
22 | {
23 | DesensitizedType desensitizedType();
24 | }
25 |
--------------------------------------------------------------------------------
/snow-modules/snow-dinky/src/main/resources/static/1471.7b64dafb.async.js:
--------------------------------------------------------------------------------
1 | "use strict";(self.webpackChunkdinky_web=self.webpackChunkdinky_web||[]).push([[1471],{50126:function(s,e,n){n.r(e),n.d(e,{conf:function(){return t},language:function(){return o}});var t={comments:{lineComment:"#"}},o={defaultToken:"keyword",ignoreCase:!0,tokenPostfix:".azcli",str:/[^#\s]/,tokenizer:{root:[{include:"@comment"},[/\s-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}],[/^-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}]],type:[{include:"@comment"},[/-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":"key.identifier"}}],[/@str+\s*/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}]],comment:[[/#.*$/,{cases:{"@eos":{token:"comment",next:"@popall"}}}]]}}}}]);
2 |
--------------------------------------------------------------------------------
/snow-api/snow-api-system/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | com.snow
7 | snow-api
8 | 3.6.4
9 |
10 | 4.0.0
11 |
12 | snow-api-system
13 |
14 |
15 | snow-api-system系统接口模块
16 |
17 |
18 |
19 |
20 |
21 |
22 | com.snow
23 | snow-common-core
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/snow-ui/src/assets/icons/svg/tree-table.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/snow-common/snow-common-log/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | com.snow
7 | snow-common
8 | 3.6.4
9 |
10 | 4.0.0
11 |
12 | snow-common-log
13 |
14 |
15 | snow-common-log日志记录
16 |
17 |
18 |
19 |
20 |
21 |
22 | com.snow
23 | snow-common-security
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/snow-ui/src/api/system/notice.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询公告列表
4 | export function listNotice(query) {
5 | return request({
6 | url: '/system/notice/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 查询公告详细
13 | export function getNotice(noticeId) {
14 | return request({
15 | url: '/system/notice/' + noticeId,
16 | method: 'get'
17 | })
18 | }
19 |
20 | // 新增公告
21 | export function addNotice(data) {
22 | return request({
23 | url: '/system/notice',
24 | method: 'post',
25 | data: data
26 | })
27 | }
28 |
29 | // 修改公告
30 | export function updateNotice(data) {
31 | return request({
32 | url: '/system/notice',
33 | method: 'put',
34 | data: data
35 | })
36 | }
37 |
38 | // 删除公告
39 | export function delNotice(noticeId) {
40 | return request({
41 | url: '/system/notice/' + noticeId,
42 | method: 'delete'
43 | })
44 | }
--------------------------------------------------------------------------------
/snow-modules/snow-dinky/src/main/resources/DinkyFlinkDockerfile:
--------------------------------------------------------------------------------
1 | # 用来构建dinky环境
2 | ARG FLINK_VERSION=1.14.5
3 | ARG FLINK_BIG_VERSION=1.14
4 |
5 | FROM flink:${FLINK_VERSION}
6 |
7 | ARG FLINK_VERSION
8 | ARG FLINK_BIG_VERSION
9 | ENV PYTHON_HOME /opt/miniconda3
10 |
11 | USER root
12 | RUN wget "https://s3.jcloud.sjtu.edu.cn/899a892efef34b1b944a19981040f55b-oss01/anaconda/miniconda/Miniconda3-py38_4.9.2-Linux-x86_64.sh" -O "miniconda.sh" && chmod +x miniconda.sh
13 | RUN ./miniconda.sh -b -p $PYTHON_HOME && chown -R flink $PYTHON_HOME && ls $PYTHON_HOME
14 |
15 | USER flink
16 |
17 | ENV PATH $PYTHON_HOME/bin:$PATH
18 | RUN pip install "apache-flink==${FLINK_VERSION}" -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
19 |
20 | RUN cp /opt/flink/opt/flink-python_* /opt/flink/lib/
21 |
22 | RUN wget -O dinky-app-${FLINK_BIG_VERSION}.jar - ${DINKY_HTTP}/downloadAppJar/${FLINK_BIG_VERSION} | mv dinky-app-${FLINK_BIG_VERSION}.jar
--------------------------------------------------------------------------------
/snow-common/snow-common-datascope/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | com.snow
7 | snow-common
8 | 3.6.4
9 |
10 | 4.0.0
11 |
12 | snow-common-datascope
13 |
14 |
15 | snow-common-datascope权限范围
16 |
17 |
18 |
19 |
20 |
21 |
22 | com.snow
23 | snow-common-security
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/snow-common/snow-common-sensitive/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | com.snow
7 | snow-common
8 | 3.6.4
9 |
10 | 4.0.0
11 |
12 | snow-common-sensitive
13 |
14 |
15 | snow-common-sensitive数据脱敏
16 |
17 |
18 |
19 |
20 |
21 |
22 | com.snow
23 | snow-common-security
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/snow-gateway/src/main/java/com/snow/gateway/config/properties/IgnoreWhiteProperties.java:
--------------------------------------------------------------------------------
1 | package com.snow.gateway.config.properties;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 | import org.springframework.boot.context.properties.ConfigurationProperties;
6 | import org.springframework.cloud.context.config.annotation.RefreshScope;
7 | import org.springframework.context.annotation.Configuration;
8 |
9 | /**
10 | * 放行白名单配置
11 | *
12 | * @author snow
13 | */
14 | @Configuration
15 | @RefreshScope
16 | @ConfigurationProperties(prefix = "security.ignore")
17 | public class IgnoreWhiteProperties
18 | {
19 | /**
20 | * 放行白名单配置,网关不校验此处的白名单
21 | */
22 | private List whites = new ArrayList<>();
23 |
24 | public List getWhites()
25 | {
26 | return whites;
27 | }
28 |
29 | public void setWhites(List whites)
30 | {
31 | this.whites = whites;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/snow-common/snow-common-seata/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | com.snow
7 | snow-common
8 | 3.6.4
9 |
10 | 4.0.0
11 |
12 | snow-common-seata
13 |
14 |
15 | snow-common-seata分布式事务
16 |
17 |
18 |
19 |
20 |
21 |
22 | com.alibaba.cloud
23 | spring-cloud-starter-alibaba-seata
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/snow-ui/src/assets/icons/svg/eye.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/snow-modules/snow-dinky/src/main/resources/json/openapi_explainsql.json:
--------------------------------------------------------------------------------
1 | /* http://127.0.0.1:8888/openapi/explainSql */
2 | {
3 | /* required-start */
4 | "statement":"CREATE TABLE Orders (\r\n order_number INT,\r\n price DECIMAL(32,2),\r\n order_time TIMESTAMP(3)\r\n) WITH (\r\n 'connector' = 'datagen',\r\n 'rows-per-second' = '1',\r\n 'fields.order_number.kind' = 'sequence',\r\n 'fields.order_number.start' = '1',\r\n 'fields.order_number.end' = '1000'\r\n);\r\nCREATE TABLE pt (\r\nordertotal INT,\r\nnumtotal INT\r\n) WITH (\r\n 'connector' = 'print'\r\n);\r\ninsert into pt select 1 as ordertotal ,sum(order_number)*2 as numtotal from Orders",
5 | /* required-end */
6 | /* default-start */
7 | "useStatementSet":false,
8 | "fragment":false,
9 | "parallelism":1,
10 | /* default-start */
11 | /* custom-start */
12 | "configuration":{
13 | "table.exec.resource.default-parallelism":2
14 | }
15 | /* custom-end */
16 | }
--------------------------------------------------------------------------------
/snow-modules/snow-dinky/src/main/resources/json/openapi_getjobplan.json:
--------------------------------------------------------------------------------
1 | /* http://127.0.0.1:8888/openapi/getJobPlan */
2 | {
3 | /* required-start */
4 | "statement":"CREATE TABLE Orders (\r\n order_number INT,\r\n price DECIMAL(32,2),\r\n order_time TIMESTAMP(3)\r\n) WITH (\r\n 'connector' = 'datagen',\r\n 'rows-per-second' = '1',\r\n 'fields.order_number.kind' = 'sequence',\r\n 'fields.order_number.start' = '1',\r\n 'fields.order_number.end' = '1000'\r\n);\r\nCREATE TABLE pt (\r\nordertotal INT,\r\nnumtotal INT\r\n) WITH (\r\n 'connector' = 'print'\r\n);\r\ninsert into pt select 1 as ordertotal ,sum(order_number)*2 as numtotal from Orders",
5 | /* required-end */
6 | /* default-start */
7 | "useStatementSet":false,
8 | "fragment":false,
9 | "parallelism":1,
10 | /* default-start */
11 | /* custom-start */
12 | "configuration":{
13 | "table.exec.resource.default-parallelism":2
14 | }
15 | /* custom-end */
16 | }
--------------------------------------------------------------------------------
/snow-modules/snow-dinky/src/main/resources/json/openapi_getstreamgraph.json:
--------------------------------------------------------------------------------
1 | /* http://127.0.0.1:8888/openapi/getStreamGraph */
2 | {
3 | /* required-start */
4 | "statement":"CREATE TABLE Orders (\r\n order_number INT,\r\n price DECIMAL(32,2),\r\n order_time TIMESTAMP(3)\r\n) WITH (\r\n 'connector' = 'datagen',\r\n 'rows-per-second' = '1',\r\n 'fields.order_number.kind' = 'sequence',\r\n 'fields.order_number.start' = '1',\r\n 'fields.order_number.end' = '1000'\r\n);\r\nCREATE TABLE pt (\r\nordertotal INT,\r\nnumtotal INT\r\n) WITH (\r\n 'connector' = 'print'\r\n);\r\ninsert into pt select 1 as ordertotal ,sum(order_number)*2 as numtotal from Orders",
5 | /* required-end */
6 | /* default-start */
7 | "useStatementSet":false,
8 | "fragment":false,
9 | "parallelism":1,
10 | /* default-start */
11 | /* custom-start */
12 | "configuration":{
13 | "table.exec.resource.default-parallelism":2
14 | }
15 | /* custom-end */
16 | }
--------------------------------------------------------------------------------
/snow-ui/src/assets/icons/svg/build.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/snow-ui/src/assets/styles/element-variables.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * I think element-ui's default theme color is too light for long-term use.
3 | * So I modified the default color and you can modify it to your liking.
4 | **/
5 |
6 | /* theme color */
7 | $--color-primary: #1890ff;
8 | $--color-success: #13ce66;
9 | $--color-warning: #ffba00;
10 | $--color-danger: #ff4949;
11 | // $--color-info: #1E1E1E;
12 |
13 | $--button-font-weight: 400;
14 |
15 | // $--color-text-regular: #1f2d3d;
16 |
17 | $--border-color-light: #dfe4ed;
18 | $--border-color-lighter: #e6ebf5;
19 |
20 | $--table-border:1px solid#dfe6ec;
21 |
22 | /* icon font path, required */
23 | $--font-path: '~element-ui/lib/theme-chalk/fonts';
24 |
25 | @import "~element-ui/packages/theme-chalk/src/index";
26 |
27 | // the :export directive is the magic sauce for webpack
28 | // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
29 | :export {
30 | theme: $--color-primary;
31 | }
32 |
--------------------------------------------------------------------------------
/snow-modules/snow-dinky/src/main/resources/json/openapi_executeJar_application.json:
--------------------------------------------------------------------------------
1 | /* http://127.0.0.1:8888/openapi/executeJar */
2 | {
3 | /* required-start */
4 | "type":"yarn-application",
5 | "gatewayConfig":{
6 | "clusterConfig":{
7 | "flinkConfigPath":"/opt/src/flink-1.13.3_conf/conf",
8 | "flinkLibPath":"hdfs:///flink13/lib/flinklib",
9 | "yarnConfigPath":"/usr/local/hadoop/hadoop-2.7.7/etc/hadoop"
10 | },
11 | "appConfig":{
12 | "userJarPath":"hdfs:///flink12/jar/currencyAppJar.jar",
13 | "userJarParas":["--id","2774,2775,2776"," --type","dwd"],
14 | "userJarMainAppClass":"com.app.MainApp"
15 | },
16 | "flinkConfig": {
17 | "configuration":{
18 | "parallelism.default": 1
19 | }
20 | }
21 | },
22 | /* required-end */
23 | /* custom-start */
24 | "jobName":"openapitest",
25 | "savePointPath":"hdfs://ns/flink/savepoints/savepoint-5f4b8c-4326844a6843"
26 | /* custom-end */
27 | }
--------------------------------------------------------------------------------
/snow-ui/src/layout/components/IframeToggle/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
13 |
34 |
--------------------------------------------------------------------------------
/snow-modules/snow-system/src/main/java/com/snow/system/service/ISysLogininforService.java:
--------------------------------------------------------------------------------
1 | package com.snow.system.service;
2 |
3 | import java.util.List;
4 | import com.snow.system.api.domain.SysLogininfor;
5 |
6 | /**
7 | * 系统访问日志情况信息 服务层
8 | *
9 | * @author snow
10 | */
11 | public interface ISysLogininforService
12 | {
13 | /**
14 | * 新增系统登录日志
15 | *
16 | * @param logininfor 访问日志对象
17 | */
18 | public int insertLogininfor(SysLogininfor logininfor);
19 |
20 | /**
21 | * 查询系统登录日志集合
22 | *
23 | * @param logininfor 访问日志对象
24 | * @return 登录记录集合
25 | */
26 | public List selectLogininforList(SysLogininfor logininfor);
27 |
28 | /**
29 | * 批量删除系统登录日志
30 | *
31 | * @param infoIds 需要删除的登录日志ID
32 | * @return 结果
33 | */
34 | public int deleteLogininforByIds(Long[] infoIds);
35 |
36 | /**
37 | * 清空系统登录日志
38 | */
39 | public void cleanLogininfor();
40 | }
41 |
--------------------------------------------------------------------------------
/snow-ui/src/assets/icons/svg/clipboard.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/snow-ui/src/assets/styles/transition.scss:
--------------------------------------------------------------------------------
1 | // global transition css
2 |
3 | /* fade */
4 | .fade-enter-active,
5 | .fade-leave-active {
6 | transition: opacity 0.28s;
7 | }
8 |
9 | .fade-enter,
10 | .fade-leave-active {
11 | opacity: 0;
12 | }
13 |
14 | /* fade-transform */
15 | .fade-transform--move,
16 | .fade-transform-leave-active,
17 | .fade-transform-enter-active {
18 | transition: all .5s;
19 | }
20 |
21 | .fade-transform-enter {
22 | opacity: 0;
23 | transform: translateX(-30px);
24 | }
25 |
26 | .fade-transform-leave-to {
27 | opacity: 0;
28 | transform: translateX(30px);
29 | }
30 |
31 | /* breadcrumb transition */
32 | .breadcrumb-enter-active,
33 | .breadcrumb-leave-active {
34 | transition: all .5s;
35 | }
36 |
37 | .breadcrumb-enter,
38 | .breadcrumb-leave-active {
39 | opacity: 0;
40 | transform: translateX(20px);
41 | }
42 |
43 | .breadcrumb-move {
44 | transition: all .5s;
45 | }
46 |
47 | .breadcrumb-leave-active {
48 | position: absolute;
49 | }
50 |
--------------------------------------------------------------------------------
/snow-modules/snow-system/src/main/java/com/snow/system/mapper/SysLogininforMapper.java:
--------------------------------------------------------------------------------
1 | package com.snow.system.mapper;
2 |
3 | import java.util.List;
4 | import com.snow.system.api.domain.SysLogininfor;
5 |
6 | /**
7 | * 系统访问日志情况信息 数据层
8 | *
9 | * @author snow
10 | */
11 | public interface SysLogininforMapper
12 | {
13 | /**
14 | * 新增系统登录日志
15 | *
16 | * @param logininfor 访问日志对象
17 | */
18 | public int insertLogininfor(SysLogininfor logininfor);
19 |
20 | /**
21 | * 查询系统登录日志集合
22 | *
23 | * @param logininfor 访问日志对象
24 | * @return 登录记录集合
25 | */
26 | public List selectLogininforList(SysLogininfor logininfor);
27 |
28 | /**
29 | * 批量删除系统登录日志
30 | *
31 | * @param infoIds 需要删除的登录日志ID
32 | * @return 结果
33 | */
34 | public int deleteLogininforByIds(Long[] infoIds);
35 |
36 | /**
37 | * 清空系统登录日志
38 | *
39 | * @return 结果
40 | */
41 | public int cleanLogininfor();
42 | }
43 |
--------------------------------------------------------------------------------
/snow-modules/snow-gen/src/main/java/com/snow/gen/util/VelocityInitializer.java:
--------------------------------------------------------------------------------
1 | package com.snow.gen.util;
2 |
3 | import java.util.Properties;
4 | import org.apache.velocity.app.Velocity;
5 | import com.snow.common.core.constant.Constants;
6 |
7 | /**
8 | * VelocityEngine工厂
9 | *
10 | * @author snow
11 | */
12 | public class VelocityInitializer
13 | {
14 | /**
15 | * 初始化vm方法
16 | */
17 | public static void initVelocity()
18 | {
19 | Properties p = new Properties();
20 | try
21 | {
22 | // 加载classpath目录下的vm文件
23 | p.setProperty("resource.loader.file.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
24 | // 定义字符集
25 | p.setProperty(Velocity.INPUT_ENCODING, Constants.UTF8);
26 | // 初始化Velocity引擎,指定配置Properties
27 | Velocity.init(p);
28 | }
29 | catch (Exception e)
30 | {
31 | throw new RuntimeException(e);
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/snow-modules/snow-system/src/main/java/com/snow/system/mapper/SysRoleMenuMapper.java:
--------------------------------------------------------------------------------
1 | package com.snow.system.mapper;
2 |
3 | import java.util.List;
4 | import com.snow.system.domain.SysRoleMenu;
5 |
6 | /**
7 | * 角色与菜单关联表 数据层
8 | *
9 | * @author snow
10 | */
11 | public interface SysRoleMenuMapper
12 | {
13 | /**
14 | * 查询菜单使用数量
15 | *
16 | * @param menuId 菜单ID
17 | * @return 结果
18 | */
19 | public int checkMenuExistRole(Long menuId);
20 |
21 | /**
22 | * 通过角色ID删除角色和菜单关联
23 | *
24 | * @param roleId 角色ID
25 | * @return 结果
26 | */
27 | public int deleteRoleMenuByRoleId(Long roleId);
28 |
29 | /**
30 | * 批量删除角色菜单关联信息
31 | *
32 | * @param ids 需要删除的数据ID
33 | * @return 结果
34 | */
35 | public int deleteRoleMenu(Long[] ids);
36 |
37 | /**
38 | * 批量新增角色菜单信息
39 | *
40 | * @param roleMenuList 角色菜单列表
41 | * @return 结果
42 | */
43 | public int batchRoleMenu(List roleMenuList);
44 | }
45 |
--------------------------------------------------------------------------------
/snow-modules/snow-system/src/main/java/com/snow/system/mapper/SysUserPostMapper.java:
--------------------------------------------------------------------------------
1 | package com.snow.system.mapper;
2 |
3 | import java.util.List;
4 | import com.snow.system.domain.SysUserPost;
5 |
6 | /**
7 | * 用户与岗位关联表 数据层
8 | *
9 | * @author snow
10 | */
11 | public interface SysUserPostMapper
12 | {
13 | /**
14 | * 通过用户ID删除用户和岗位关联
15 | *
16 | * @param userId 用户ID
17 | * @return 结果
18 | */
19 | public int deleteUserPostByUserId(Long userId);
20 |
21 | /**
22 | * 通过岗位ID查询岗位使用数量
23 | *
24 | * @param postId 岗位ID
25 | * @return 结果
26 | */
27 | public int countUserPostById(Long postId);
28 |
29 | /**
30 | * 批量删除用户和岗位关联
31 | *
32 | * @param ids 需要删除的数据ID
33 | * @return 结果
34 | */
35 | public int deleteUserPost(Long[] ids);
36 |
37 | /**
38 | * 批量新增用户岗位信息
39 | *
40 | * @param userPostList 用户岗位列表
41 | * @return 结果
42 | */
43 | public int batchUserPost(List userPostList);
44 | }
45 |
--------------------------------------------------------------------------------
/snow-ui/src/assets/icons/svg/list.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/snow-modules/snow-system/src/main/java/com/snow/system/mapper/SysRoleDeptMapper.java:
--------------------------------------------------------------------------------
1 | package com.snow.system.mapper;
2 |
3 | import java.util.List;
4 | import com.snow.system.domain.SysRoleDept;
5 |
6 | /**
7 | * 角色与部门关联表 数据层
8 | *
9 | * @author snow
10 | */
11 | public interface SysRoleDeptMapper
12 | {
13 | /**
14 | * 通过角色ID删除角色和部门关联
15 | *
16 | * @param roleId 角色ID
17 | * @return 结果
18 | */
19 | public int deleteRoleDeptByRoleId(Long roleId);
20 |
21 | /**
22 | * 批量删除角色部门关联信息
23 | *
24 | * @param ids 需要删除的数据ID
25 | * @return 结果
26 | */
27 | public int deleteRoleDept(Long[] ids);
28 |
29 | /**
30 | * 查询部门使用数量
31 | *
32 | * @param deptId 部门ID
33 | * @return 结果
34 | */
35 | public int selectCountRoleDeptByDeptId(Long deptId);
36 |
37 | /**
38 | * 批量新增角色部门信息
39 | *
40 | * @param roleDeptList 角色部门列表
41 | * @return 结果
42 | */
43 | public int batchRoleDept(List roleDeptList);
44 | }
45 |
--------------------------------------------------------------------------------
/snow-modules/snow-dinky/src/main/java/org/dinky/service/sse/SseService.java:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Licensed to the Apache Software Foundation (ASF) under one or more
4 | * contributor license agreements. See the NOTICE file distributed with
5 | * this work for additional information regarding copyright ownership.
6 | * The ASF licenses this file to You under the Apache License, Version 2.0
7 | * (the "License"); you may not use this file except in compliance with
8 | * the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | *
18 | */
19 |
20 | package org.dinky.service.sse;
21 |
22 | public interface SseService {}
23 |
--------------------------------------------------------------------------------
/snow-ui/src/assets/icons/svg/download.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/snow-modules/snow-dolphinscheduler/src/main/resources/swagger.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | springfox.documentation.swagger.v2.path=/api-docs
19 |
20 | # If set to false, will disable swagger-ui
21 | springdoc.api-docs.enabled=false
22 |
--------------------------------------------------------------------------------
/snow-ui/build/index.js:
--------------------------------------------------------------------------------
1 | const { run } = require('runjs')
2 | const chalk = require('chalk')
3 | const config = require('../vue.config.js')
4 | const rawArgv = process.argv.slice(2)
5 | const args = rawArgv.join(' ')
6 |
7 | if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
8 | const report = rawArgv.includes('--report')
9 |
10 | run(`vue-cli-service build ${args}`)
11 |
12 | const port = 9526
13 | const publicPath = config.publicPath
14 |
15 | var connect = require('connect')
16 | var serveStatic = require('serve-static')
17 | const app = connect()
18 |
19 | app.use(
20 | publicPath,
21 | serveStatic('./dist', {
22 | index: ['index.html', '/']
23 | })
24 | )
25 |
26 | app.listen(port, function () {
27 | console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`))
28 | if (report) {
29 | console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`))
30 | }
31 |
32 | })
33 | } else {
34 | run(`vue-cli-service build ${args}`)
35 | }
36 |
--------------------------------------------------------------------------------
/snow-gateway/src/main/resources/bootstrap.yml:
--------------------------------------------------------------------------------
1 | # Tomcat
2 | server:
3 | port: 8080
4 |
5 | # Spring
6 | spring:
7 | application:
8 | # 应用名称
9 | name: snow-gateway
10 | profiles:
11 | # 环境配置
12 | active: dev
13 | cloud:
14 | nacos:
15 | discovery:
16 | # 服务注册地址
17 | server-addr: 192.168.210.10:8848
18 | config:
19 | # 配置中心地址
20 | server-addr: 192.168.210.10:8848
21 | # 配置文件格式
22 | file-extension: yml
23 | # 共享配置
24 | shared-configs:
25 | - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
26 | sentinel:
27 | # 取消控制台懒加载
28 | eager: true
29 | transport:
30 | # 控制台地址
31 | dashboard: 192.169.210.10:8718
32 | # nacos配置持久化
33 | datasource:
34 | ds1:
35 | nacos:
36 | server-addr: 192.168.210.10:8848
37 | dataId: sentinel-snow-gateway
38 | groupId: DEFAULT_GROUP
39 | data-type: json
40 | rule-type: gw-flow
41 |
--------------------------------------------------------------------------------
/snow-modules/snow-dinky/src/main/resources/static/t__plugin-layout__Layout.6cae69f5.chunk.css:
--------------------------------------------------------------------------------
1 | @media screen and (max-width: 480px){.umi-plugin-layout-container{width:100%!important}.umi-plugin-layout-container>*{border-radius:0!important}}.umi-plugin-layout-menu .anticon{margin-right:8px}.umi-plugin-layout-menu .ant-dropdown-menu-item{min-width:160px}.umi-plugin-layout-right{display:flex!important;float:right;height:100%;margin-left:auto;overflow:hidden}.umi-plugin-layout-right .umi-plugin-layout-action{display:flex;align-items:center;height:100%;padding:0 12px;cursor:pointer;transition:all .3s}.umi-plugin-layout-right .umi-plugin-layout-action>i{color:#ffffffd9;vertical-align:middle}.umi-plugin-layout-right .umi-plugin-layout-action:hover,.umi-plugin-layout-right .umi-plugin-layout-action.opened{background:rgba(0,0,0,.025)}.umi-plugin-layout-right .umi-plugin-layout-search{padding:0 12px}.umi-plugin-layout-right .umi-plugin-layout-search:hover{background:transparent}.umi-plugin-layout-name{margin-left:8px}.umi-plugin-layout-name.umi-plugin-layout-hide-avatar-img{margin-left:0}
2 |
--------------------------------------------------------------------------------
/snow-modules/snow-dolphinscheduler/src/main/java/org/apache/dolphinscheduler/api/executor/ExecuteResult.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.dolphinscheduler.api.executor;
19 |
20 | public interface ExecuteResult {
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/snow-modules/snow-dolphinscheduler/src/main/java/org/apache/dolphinscheduler/api/executor/ExecuteRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.dolphinscheduler.api.executor;
19 |
20 | public interface ExecuteRequest {
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/snow-ui/src/assets/icons/svg/icon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/snow-ui/src/store/modules/dict.js:
--------------------------------------------------------------------------------
1 | const state = {
2 | dict: new Array()
3 | }
4 | const mutations = {
5 | SET_DICT: (state, { key, value }) => {
6 | if (key !== null && key !== "") {
7 | state.dict.push({
8 | key: key,
9 | value: value
10 | })
11 | }
12 | },
13 | REMOVE_DICT: (state, key) => {
14 | try {
15 | for (let i = 0; i < state.dict.length; i++) {
16 | if (state.dict[i].key == key) {
17 | state.dict.splice(i, 1)
18 | return true
19 | }
20 | }
21 | } catch (e) {
22 | }
23 | },
24 | CLEAN_DICT: (state) => {
25 | state.dict = new Array()
26 | }
27 | }
28 |
29 | const actions = {
30 | // 设置字典
31 | setDict({ commit }, data) {
32 | commit('SET_DICT', data)
33 | },
34 | // 删除字典
35 | removeDict({ commit }, key) {
36 | commit('REMOVE_DICT', key)
37 | },
38 | // 清空字典
39 | cleanDict({ commit }) {
40 | commit('CLEAN_DICT')
41 | }
42 | }
43 |
44 | export default {
45 | namespaced: true,
46 | state,
47 | mutations,
48 | actions
49 | }
50 |
51 |
--------------------------------------------------------------------------------
/snow-common/snow-common-security/src/main/java/com/snow/common/security/config/WebMvcConfig.java:
--------------------------------------------------------------------------------
1 | package com.snow.common.security.config;
2 |
3 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
4 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
5 | import com.snow.common.security.interceptor.HeaderInterceptor;
6 |
7 | /**
8 | * 拦截器配置
9 | *
10 | * @author snow
11 | */
12 | public class WebMvcConfig implements WebMvcConfigurer
13 | {
14 | /** 不需要拦截地址 */
15 | public static final String[] excludeUrls = { "/login", "/logout", "/refresh" };
16 |
17 | @Override
18 | public void addInterceptors(InterceptorRegistry registry)
19 | {
20 | registry.addInterceptor(getHeaderInterceptor())
21 | .addPathPatterns("/**")
22 | .excludePathPatterns(excludeUrls)
23 | .order(-10);
24 | }
25 |
26 | /**
27 | * 自定义请求头拦截器
28 | */
29 | public HeaderInterceptor getHeaderInterceptor()
30 | {
31 | return new HeaderInterceptor();
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/snow-modules/snow-gen/src/main/java/com/snow/gen/service/IGenTableColumnService.java:
--------------------------------------------------------------------------------
1 | package com.snow.gen.service;
2 |
3 | import java.util.List;
4 | import com.snow.gen.domain.GenTableColumn;
5 |
6 | /**
7 | * 业务字段 服务层
8 | *
9 | * @author snow
10 | */
11 | public interface IGenTableColumnService
12 | {
13 | /**
14 | * 查询业务字段列表
15 | *
16 | * @param tableId 业务字段编号
17 | * @return 业务字段集合
18 | */
19 | public List selectGenTableColumnListByTableId(Long tableId);
20 |
21 | /**
22 | * 新增业务字段
23 | *
24 | * @param genTableColumn 业务字段信息
25 | * @return 结果
26 | */
27 | public int insertGenTableColumn(GenTableColumn genTableColumn);
28 |
29 | /**
30 | * 修改业务字段
31 | *
32 | * @param genTableColumn 业务字段信息
33 | * @return 结果
34 | */
35 | public int updateGenTableColumn(GenTableColumn genTableColumn);
36 |
37 | /**
38 | * 删除业务字段信息
39 | *
40 | * @param ids 需要删除的数据ID
41 | * @return 结果
42 | */
43 | public int deleteGenTableColumnByIds(String ids);
44 | }
45 |
--------------------------------------------------------------------------------
/snow-ui/src/api/system/dept.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询部门列表
4 | export function listDept(query) {
5 | return request({
6 | url: '/system/dept/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 查询部门列表(排除节点)
13 | export function listDeptExcludeChild(deptId) {
14 | return request({
15 | url: '/system/dept/list/exclude/' + deptId,
16 | method: 'get'
17 | })
18 | }
19 |
20 | // 查询部门详细
21 | export function getDept(deptId) {
22 | return request({
23 | url: '/system/dept/' + deptId,
24 | method: 'get'
25 | })
26 | }
27 |
28 | // 新增部门
29 | export function addDept(data) {
30 | return request({
31 | url: '/system/dept',
32 | method: 'post',
33 | data: data
34 | })
35 | }
36 |
37 | // 修改部门
38 | export function updateDept(data) {
39 | return request({
40 | url: '/system/dept',
41 | method: 'put',
42 | data: data
43 | })
44 | }
45 |
46 | // 删除部门
47 | export function delDept(deptId) {
48 | return request({
49 | url: '/system/dept/' + deptId,
50 | method: 'delete'
51 | })
52 | }
--------------------------------------------------------------------------------
/snow-ui/src/utils/dict/index.js:
--------------------------------------------------------------------------------
1 | import Dict from './Dict'
2 | import { mergeOptions } from './DictOptions'
3 |
4 | export default function(Vue, options) {
5 | mergeOptions(options)
6 | Vue.mixin({
7 | data() {
8 | if (this.$options === undefined || this.$options.dicts === undefined || this.$options.dicts === null) {
9 | return {}
10 | }
11 | const dict = new Dict()
12 | dict.owner = this
13 | return {
14 | dict
15 | }
16 | },
17 | created() {
18 | if (!(this.dict instanceof Dict)) {
19 | return
20 | }
21 | options.onCreated && options.onCreated(this.dict)
22 | this.dict.init(this.$options.dicts).then(() => {
23 | options.onReady && options.onReady(this.dict)
24 | this.$nextTick(() => {
25 | this.$emit('dictReady', this.dict)
26 | if (this.$options.methods && this.$options.methods.onDictReady instanceof Function) {
27 | this.$options.methods.onDictReady.call(this, this.dict)
28 | }
29 | })
30 | })
31 | },
32 | })
33 | }
34 |
--------------------------------------------------------------------------------
/snow-modules/snow-system/src/main/java/com/snow/system/mapper/SysOperLogMapper.java:
--------------------------------------------------------------------------------
1 | package com.snow.system.mapper;
2 |
3 | import java.util.List;
4 | import com.snow.system.api.domain.SysOperLog;
5 |
6 | /**
7 | * 操作日志 数据层
8 | *
9 | * @author snow
10 | */
11 | public interface SysOperLogMapper
12 | {
13 | /**
14 | * 新增操作日志
15 | *
16 | * @param operLog 操作日志对象
17 | */
18 | public int insertOperlog(SysOperLog operLog);
19 |
20 | /**
21 | * 查询系统操作日志集合
22 | *
23 | * @param operLog 操作日志对象
24 | * @return 操作日志集合
25 | */
26 | public List selectOperLogList(SysOperLog operLog);
27 |
28 | /**
29 | * 批量删除系统操作日志
30 | *
31 | * @param operIds 需要删除的操作日志ID
32 | * @return 结果
33 | */
34 | public int deleteOperLogByIds(Long[] operIds);
35 |
36 | /**
37 | * 查询操作日志详细
38 | *
39 | * @param operId 操作ID
40 | * @return 操作日志对象
41 | */
42 | public SysOperLog selectOperLogById(Long operId);
43 |
44 | /**
45 | * 清空操作日志
46 | */
47 | public void cleanOperLog();
48 | }
49 |
--------------------------------------------------------------------------------
/snow-modules/snow-dinky/src/main/java/org/dinky/service/APIService.java:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Licensed to the Apache Software Foundation (ASF) under one or more
4 | * contributor license agreements. See the NOTICE file distributed with
5 | * this work for additional information regarding copyright ownership.
6 | * The ASF licenses this file to You under the Apache License, Version 2.0
7 | * (the "License"); you may not use this file except in compliance with
8 | * the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | *
18 | */
19 |
20 | package org.dinky.service;
21 |
22 | /**
23 | * APIService
24 | *
25 | * @since 2021/12/11 21:45
26 | */
27 | public interface APIService {}
28 |
--------------------------------------------------------------------------------
/snow-api/snow-api-system/src/main/java/com/snow/system/api/domain/SysFile.java:
--------------------------------------------------------------------------------
1 | package com.snow.system.api.domain;
2 |
3 | import org.apache.commons.lang3.builder.ToStringBuilder;
4 | import org.apache.commons.lang3.builder.ToStringStyle;
5 |
6 | /**
7 | * 文件信息
8 | *
9 | * @author snow
10 | */
11 | public class SysFile
12 | {
13 | /**
14 | * 文件名称
15 | */
16 | private String name;
17 |
18 | /**
19 | * 文件地址
20 | */
21 | private String url;
22 |
23 | public String getName()
24 | {
25 | return name;
26 | }
27 |
28 | public void setName(String name)
29 | {
30 | this.name = name;
31 | }
32 |
33 | public String getUrl()
34 | {
35 | return url;
36 | }
37 |
38 | public void setUrl(String url)
39 | {
40 | this.url = url;
41 | }
42 |
43 | @Override
44 | public String toString() {
45 | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
46 | .append("name", getName())
47 | .append("url", getUrl())
48 | .toString();
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/snow-modules/snow-dinky/src/main/java/org/dinky/mybatis/annotation/Save.java:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Licensed to the Apache Software Foundation (ASF) under one or more
4 | * contributor license agreements. See the NOTICE file distributed with
5 | * this work for additional information regarding copyright ownership.
6 | * The ASF licenses this file to You under the Apache License, Version 2.0
7 | * (the "License"); you may not use this file except in compliance with
8 | * the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | *
18 | */
19 |
20 | package org.dinky.mybatis.annotation;
21 |
22 | /**
23 | * 新增接口
24 | *
25 | * @since 2021/5/3 20:57
26 | */
27 | public interface Save {}
28 |
--------------------------------------------------------------------------------
/snow-common/snow-common-core/src/main/java/com/snow/common/core/utils/ExceptionUtil.java:
--------------------------------------------------------------------------------
1 | package com.snow.common.core.utils;
2 |
3 | import java.io.PrintWriter;
4 | import java.io.StringWriter;
5 | import org.apache.commons.lang3.exception.ExceptionUtils;
6 |
7 | /**
8 | * 错误信息处理类。
9 | *
10 | * @author snow
11 | */
12 | public class ExceptionUtil
13 | {
14 | /**
15 | * 获取exception的详细错误信息。
16 | */
17 | public static String getExceptionMessage(Throwable e)
18 | {
19 | StringWriter sw = new StringWriter();
20 | e.printStackTrace(new PrintWriter(sw, true));
21 | return sw.toString();
22 | }
23 |
24 | public static String getRootErrorMessage(Exception e)
25 | {
26 | Throwable root = ExceptionUtils.getRootCause(e);
27 | root = (root == null ? e : root);
28 | if (root == null)
29 | {
30 | return "";
31 | }
32 | String msg = root.getMessage();
33 | if (msg == null)
34 | {
35 | return "null";
36 | }
37 | return StringUtils.defaultString(msg);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/snow-common/snow-common-core/src/main/java/com/snow/common/core/utils/PageUtils.java:
--------------------------------------------------------------------------------
1 | package com.snow.common.core.utils;
2 |
3 | import com.github.pagehelper.PageHelper;
4 | import com.snow.common.core.utils.sql.SqlUtil;
5 | import com.snow.common.core.web.page.PageDomain;
6 | import com.snow.common.core.web.page.TableSupport;
7 |
8 | /**
9 | * 分页工具类
10 | *
11 | * @author snow
12 | */
13 | public class PageUtils extends PageHelper
14 | {
15 | /**
16 | * 设置请求分页数据
17 | */
18 | public static void startPage()
19 | {
20 | PageDomain pageDomain = TableSupport.buildPageRequest();
21 | Integer pageNum = pageDomain.getPageNum();
22 | Integer pageSize = pageDomain.getPageSize();
23 | String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
24 | Boolean reasonable = pageDomain.getReasonable();
25 | PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable);
26 | }
27 |
28 | /**
29 | * 清理分页的线程变量
30 | */
31 | public static void clearPage()
32 | {
33 | PageHelper.clearPage();
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/snow-modules/snow-system/src/main/java/com/snow/system/domain/SysRoleDept.java:
--------------------------------------------------------------------------------
1 | package com.snow.system.domain;
2 |
3 | import org.apache.commons.lang3.builder.ToStringBuilder;
4 | import org.apache.commons.lang3.builder.ToStringStyle;
5 |
6 | /**
7 | * 角色和部门关联 sys_role_dept
8 | *
9 | * @author snow
10 | */
11 | public class SysRoleDept
12 | {
13 | /** 角色ID */
14 | private Long roleId;
15 |
16 | /** 部门ID */
17 | private Long deptId;
18 |
19 | public Long getRoleId()
20 | {
21 | return roleId;
22 | }
23 |
24 | public void setRoleId(Long roleId)
25 | {
26 | this.roleId = roleId;
27 | }
28 |
29 | public Long getDeptId()
30 | {
31 | return deptId;
32 | }
33 |
34 | public void setDeptId(Long deptId)
35 | {
36 | this.deptId = deptId;
37 | }
38 |
39 | @Override
40 | public String toString() {
41 | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
42 | .append("roleId", getRoleId())
43 | .append("deptId", getDeptId())
44 | .toString();
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/snow-modules/snow-system/src/main/java/com/snow/system/domain/SysRoleMenu.java:
--------------------------------------------------------------------------------
1 | package com.snow.system.domain;
2 |
3 | import org.apache.commons.lang3.builder.ToStringBuilder;
4 | import org.apache.commons.lang3.builder.ToStringStyle;
5 |
6 | /**
7 | * 角色和菜单关联 sys_role_menu
8 | *
9 | * @author snow
10 | */
11 | public class SysRoleMenu
12 | {
13 | /** 角色ID */
14 | private Long roleId;
15 |
16 | /** 菜单ID */
17 | private Long menuId;
18 |
19 | public Long getRoleId()
20 | {
21 | return roleId;
22 | }
23 |
24 | public void setRoleId(Long roleId)
25 | {
26 | this.roleId = roleId;
27 | }
28 |
29 | public Long getMenuId()
30 | {
31 | return menuId;
32 | }
33 |
34 | public void setMenuId(Long menuId)
35 | {
36 | this.menuId = menuId;
37 | }
38 |
39 | @Override
40 | public String toString() {
41 | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
42 | .append("roleId", getRoleId())
43 | .append("menuId", getMenuId())
44 | .toString();
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/snow-modules/snow-system/src/main/java/com/snow/system/domain/SysUserRole.java:
--------------------------------------------------------------------------------
1 | package com.snow.system.domain;
2 |
3 | import org.apache.commons.lang3.builder.ToStringBuilder;
4 | import org.apache.commons.lang3.builder.ToStringStyle;
5 |
6 | /**
7 | * 用户和角色关联 sys_user_role
8 | *
9 | * @author snow
10 | */
11 | public class SysUserRole
12 | {
13 | /** 用户ID */
14 | private Long userId;
15 |
16 | /** 角色ID */
17 | private Long roleId;
18 |
19 | public Long getUserId()
20 | {
21 | return userId;
22 | }
23 |
24 | public void setUserId(Long userId)
25 | {
26 | this.userId = userId;
27 | }
28 |
29 | public Long getRoleId()
30 | {
31 | return roleId;
32 | }
33 |
34 | public void setRoleId(Long roleId)
35 | {
36 | this.roleId = roleId;
37 | }
38 |
39 | @Override
40 | public String toString() {
41 | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
42 | .append("userId", getUserId())
43 | .append("roleId", getRoleId())
44 | .toString();
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/snow-modules/snow-dinky/src/test/java/org/dinky/service/impl/PrintTableServiceImplTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Licensed to the Apache Software Foundation (ASF) under one or more
4 | * contributor license agreements. See the NOTICE file distributed with
5 | * this work for additional information regarding copyright ownership.
6 | * The ASF licenses this file to You under the Apache License, Version 2.0
7 | * (the "License"); you may not use this file except in compliance with
8 | * the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | *
18 | */
19 |
20 | package org.dinky.service.impl;
21 |
22 | import static org.junit.jupiter.api.Assertions.*;
23 |
24 | class PrintTableServiceImplTest {}
25 |
--------------------------------------------------------------------------------
/snow-modules/snow-system/src/main/java/com/snow/system/domain/SysUserPost.java:
--------------------------------------------------------------------------------
1 | package com.snow.system.domain;
2 |
3 | import org.apache.commons.lang3.builder.ToStringBuilder;
4 | import org.apache.commons.lang3.builder.ToStringStyle;
5 |
6 | /**
7 | * 用户和岗位关联 sys_user_post
8 | *
9 | * @author snow
10 | */
11 | public class SysUserPost
12 | {
13 | /** 用户ID */
14 | private Long userId;
15 |
16 | /** 岗位ID */
17 | private Long postId;
18 |
19 | public Long getUserId()
20 | {
21 | return userId;
22 | }
23 |
24 | public void setUserId(Long userId)
25 | {
26 | this.userId = userId;
27 | }
28 |
29 | public Long getPostId()
30 | {
31 | return postId;
32 | }
33 |
34 | public void setPostId(Long postId)
35 | {
36 | this.postId = postId;
37 | }
38 |
39 | @Override
40 | public String toString() {
41 | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
42 | .append("userId", getUserId())
43 | .append("postId", getPostId())
44 | .toString();
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/snow-gateway/src/main/java/com/snow/gateway/config/properties/CaptchaProperties.java:
--------------------------------------------------------------------------------
1 | package com.snow.gateway.config.properties;
2 |
3 | import org.springframework.boot.context.properties.ConfigurationProperties;
4 | import org.springframework.cloud.context.config.annotation.RefreshScope;
5 | import org.springframework.context.annotation.Configuration;
6 |
7 | /**
8 | * 验证码配置
9 | *
10 | * @author snow
11 | */
12 | @Configuration
13 | @RefreshScope
14 | @ConfigurationProperties(prefix = "security.captcha")
15 | public class CaptchaProperties
16 | {
17 | /**
18 | * 验证码开关
19 | */
20 | private Boolean enabled;
21 |
22 | /**
23 | * 验证码类型(math 数组计算 char 字符)
24 | */
25 | private String type;
26 |
27 | public Boolean getEnabled()
28 | {
29 | return enabled;
30 | }
31 |
32 | public void setEnabled(Boolean enabled)
33 | {
34 | this.enabled = enabled;
35 | }
36 |
37 | public String getType()
38 | {
39 | return type;
40 | }
41 |
42 | public void setType(String type)
43 | {
44 | this.type = type;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/snow-ui/src/utils/dict/DictMeta.js:
--------------------------------------------------------------------------------
1 | import { mergeRecursive } from "@/utils/snow";
2 | import DictOptions from './DictOptions'
3 |
4 | /**
5 | * @classdesc 字典元数据
6 | * @property {String} type 类型
7 | * @property {Function} request 请求
8 | * @property {String} label 标签字段
9 | * @property {String} value 值字段
10 | */
11 | export default class DictMeta {
12 | constructor(options) {
13 | this.type = options.type
14 | this.request = options.request
15 | this.responseConverter = options.responseConverter
16 | this.labelField = options.labelField
17 | this.valueField = options.valueField
18 | this.lazy = options.lazy === true
19 | }
20 | }
21 |
22 |
23 | /**
24 | * 解析字典元数据
25 | * @param {Object} options
26 | * @returns {DictMeta}
27 | */
28 | DictMeta.parse= function(options) {
29 | let opts = null
30 | if (typeof options === 'string') {
31 | opts = DictOptions.metas[options] || {}
32 | opts.type = options
33 | } else if (typeof options === 'object') {
34 | opts = options
35 | }
36 | opts = mergeRecursive(DictOptions.metas['*'], opts)
37 | return new DictMeta(opts)
38 | }
39 |
--------------------------------------------------------------------------------
/snow-common/snow-common-core/src/main/java/com/snow/common/core/utils/uuid/IdUtils.java:
--------------------------------------------------------------------------------
1 | package com.snow.common.core.utils.uuid;
2 |
3 | /**
4 | * ID生成器工具类
5 | *
6 | * @author snow
7 | */
8 | public class IdUtils
9 | {
10 | /**
11 | * 获取随机UUID
12 | *
13 | * @return 随机UUID
14 | */
15 | public static String randomUUID()
16 | {
17 | return UUID.randomUUID().toString();
18 | }
19 |
20 | /**
21 | * 简化的UUID,去掉了横线
22 | *
23 | * @return 简化的UUID,去掉了横线
24 | */
25 | public static String simpleUUID()
26 | {
27 | return UUID.randomUUID().toString(true);
28 | }
29 |
30 | /**
31 | * 获取随机UUID,使用性能更好的ThreadLocalRandom生成UUID
32 | *
33 | * @return 随机UUID
34 | */
35 | public static String fastUUID()
36 | {
37 | return UUID.fastUUID().toString();
38 | }
39 |
40 | /**
41 | * 简化的UUID,去掉了横线,使用性能更好的ThreadLocalRandom生成UUID
42 | *
43 | * @return 简化的UUID,去掉了横线
44 | */
45 | public static String fastSimpleUUID()
46 | {
47 | return UUID.fastUUID().toString(true);
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/snow-modules/snow-dinky/src/main/resources/mapper/RoleMenuMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
16 |
17 |
18 | delete from dinky_sys_role_menu where role_id=#{roleId}
19 |
20 |
21 |
22 | insert into dinky_sys_role_menu(role_id, menu_id) values
23 |
24 | (#{item.roleId},#{item.menuId})
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/snow-modules/snow-dolphinscheduler/src/main/java/org/apache/dolphinscheduler/api/dto/resources/FileLeaf.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package org.apache.dolphinscheduler.api.dto.resources;
18 |
19 | /**
20 | * file leaf
21 | */
22 | public class FileLeaf extends ResourceComponent {
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/snow-modules/snow-system/src/main/java/com/snow/system/service/ISysOperLogService.java:
--------------------------------------------------------------------------------
1 | package com.snow.system.service;
2 |
3 | import java.util.List;
4 | import com.snow.system.api.domain.SysOperLog;
5 |
6 | /**
7 | * 操作日志 服务层
8 | *
9 | * @author snow
10 | */
11 | public interface ISysOperLogService
12 | {
13 | /**
14 | * 新增操作日志
15 | *
16 | * @param operLog 操作日志对象
17 | * @return 结果
18 | */
19 | public int insertOperlog(SysOperLog operLog);
20 |
21 | /**
22 | * 查询系统操作日志集合
23 | *
24 | * @param operLog 操作日志对象
25 | * @return 操作日志集合
26 | */
27 | public List selectOperLogList(SysOperLog operLog);
28 |
29 | /**
30 | * 批量删除系统操作日志
31 | *
32 | * @param operIds 需要删除的操作日志ID
33 | * @return 结果
34 | */
35 | public int deleteOperLogByIds(Long[] operIds);
36 |
37 | /**
38 | * 查询操作日志详细
39 | *
40 | * @param operId 操作ID
41 | * @return 操作日志对象
42 | */
43 | public SysOperLog selectOperLogById(Long operId);
44 |
45 | /**
46 | * 清空操作日志
47 | */
48 | public void cleanOperLog();
49 | }
50 |
--------------------------------------------------------------------------------
/snow-ui/src/assets/icons/svg/international.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/snow-ui/src/api/system/dict/data.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询字典数据列表
4 | export function listData(query) {
5 | return request({
6 | url: '/system/dict/data/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 查询字典数据详细
13 | export function getData(dictCode) {
14 | return request({
15 | url: '/system/dict/data/' + dictCode,
16 | method: 'get'
17 | })
18 | }
19 |
20 | // 根据字典类型查询字典数据信息
21 | export function getDicts(dictType) {
22 | return request({
23 | url: '/system/dict/data/type/' + dictType,
24 | method: 'get'
25 | })
26 | }
27 |
28 | // 新增字典数据
29 | export function addData(data) {
30 | return request({
31 | url: '/system/dict/data',
32 | method: 'post',
33 | data: data
34 | })
35 | }
36 |
37 | // 修改字典数据
38 | export function updateData(data) {
39 | return request({
40 | url: '/system/dict/data',
41 | method: 'put',
42 | data: data
43 | })
44 | }
45 |
46 | // 删除字典数据
47 | export function delData(dictCode) {
48 | return request({
49 | url: '/system/dict/data/' + dictCode,
50 | method: 'delete'
51 | })
52 | }
53 |
--------------------------------------------------------------------------------
/snow-ui/src/directive/dialog/dragWidth.js:
--------------------------------------------------------------------------------
1 | /**
2 | * v-dialogDragWidth 可拖动弹窗宽度(右侧边)
3 | * Copyright (c) 2019 snow
4 | */
5 |
6 | export default {
7 | bind(el) {
8 | const dragDom = el.querySelector('.el-dialog');
9 | const lineEl = document.createElement('div');
10 | lineEl.style = 'width: 5px; background: inherit; height: 80%; position: absolute; right: 0; top: 0; bottom: 0; margin: auto; z-index: 1; cursor: w-resize;';
11 | lineEl.addEventListener('mousedown',
12 | function (e) {
13 | // 鼠标按下,计算当前元素距离可视区的距离
14 | const disX = e.clientX - el.offsetLeft;
15 | // 当前宽度
16 | const curWidth = dragDom.offsetWidth;
17 | document.onmousemove = function (e) {
18 | e.preventDefault(); // 移动时禁用默认事件
19 | // 通过事件委托,计算移动的距离
20 | const l = e.clientX - disX;
21 | dragDom.style.width = `${curWidth + l}px`;
22 | };
23 | document.onmouseup = function (e) {
24 | document.onmousemove = null;
25 | document.onmouseup = null;
26 | };
27 | }, false);
28 | dragDom.appendChild(lineEl);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/snow-common/snow-common-core/src/main/java/com/snow/common/core/constant/SecurityConstants.java:
--------------------------------------------------------------------------------
1 | package com.snow.common.core.constant;
2 |
3 | /**
4 | * 权限相关通用常量
5 | *
6 | * @author snow
7 | */
8 | public class SecurityConstants
9 | {
10 | /**
11 | * 用户ID字段
12 | */
13 | public static final String DETAILS_USER_ID = "user_id";
14 |
15 | /**
16 | * 用户名字段
17 | */
18 | public static final String DETAILS_USERNAME = "username";
19 |
20 | /**
21 | * 授权信息字段
22 | */
23 | public static final String AUTHORIZATION_HEADER = "authorization";
24 |
25 | /**
26 | * 请求来源
27 | */
28 | public static final String FROM_SOURCE = "from-source";
29 |
30 | /**
31 | * 内部请求
32 | */
33 | public static final String INNER = "inner";
34 |
35 | /**
36 | * 用户标识
37 | */
38 | public static final String USER_KEY = "user_key";
39 |
40 | /**
41 | * 登录用户
42 | */
43 | public static final String LOGIN_USER = "login_user";
44 |
45 | /**
46 | * 角色权限
47 | */
48 | public static final String ROLE_PERMISSION = "role_permission";
49 | }
50 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 snow
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/snow-ui/src/assets/icons/svg/question.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/snow-api/snow-api-system/src/main/java/com/snow/system/api/RemoteFileService.java:
--------------------------------------------------------------------------------
1 | package com.snow.system.api;
2 |
3 | import org.springframework.cloud.openfeign.FeignClient;
4 | import org.springframework.http.MediaType;
5 | import org.springframework.web.bind.annotation.PostMapping;
6 | import org.springframework.web.bind.annotation.RequestPart;
7 | import org.springframework.web.multipart.MultipartFile;
8 | import com.snow.common.core.constant.ServiceNameConstants;
9 | import com.snow.common.core.domain.R;
10 | import com.snow.system.api.domain.SysFile;
11 | import com.snow.system.api.factory.RemoteFileFallbackFactory;
12 |
13 | /**
14 | * 文件服务
15 | *
16 | * @author snow
17 | */
18 | @FeignClient(contextId = "remoteFileService", value = ServiceNameConstants.FILE_SERVICE, fallbackFactory = RemoteFileFallbackFactory.class)
19 | public interface RemoteFileService
20 | {
21 | /**
22 | * 上传文件
23 | *
24 | * @param file 文件信息
25 | * @return 结果
26 | */
27 | @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
28 | public R upload(@RequestPart(value = "file") MultipartFile file);
29 | }
30 |
--------------------------------------------------------------------------------
/snow-common/snow-common-redis/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | com.snow
7 | snow-common
8 | 3.6.4
9 |
10 | 4.0.0
11 |
12 | snow-common-redis
13 |
14 |
15 | snow-common-redis缓存服务
16 |
17 |
18 |
19 |
20 |
21 |
22 | org.springframework.boot
23 | spring-boot-starter-data-redis
24 |
25 |
26 |
27 |
28 | com.snow
29 | snow-common-core
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/snow-modules/snow-dinky/src/main/resources/static/2798.4a06d39c.async.js:
--------------------------------------------------------------------------------
1 | "use strict";(self.webpackChunkdinky_web=self.webpackChunkdinky_web||[]).push([[2798],{59607:function(t,e,n){n.r(e),n.d(e,{conf:function(){return s},language:function(){return o}});var s={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},o={defaultToken:"",tokenPostfix:".ini",escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^\[[^\]]*\]/,"metatag"],[/(^\w+)(\s*)(\=)/,["key","","delimiter"]],{include:"@whitespace"},[/\d+/,"number"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],whitespace:[[/[ \t\r\n]+/,""],[/^\s*[#;].*$/,"comment"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}}}}]);
2 |
--------------------------------------------------------------------------------
/snow-common/snow-common-translation/src/main/java/com/snow/common/translation/annotation/Translation.java:
--------------------------------------------------------------------------------
1 | package com.snow.common.translation.annotation;
2 |
3 | import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
4 | import com.fasterxml.jackson.databind.annotation.JsonSerialize;
5 | import com.snow.common.translation.core.handler.TranslationHandler;
6 |
7 | import java.lang.annotation.*;
8 |
9 | /**
10 | * 通用翻译注解
11 | *
12 | * @author Lion Li
13 | */
14 | @Inherited
15 | @Retention(RetentionPolicy.RUNTIME)
16 | @Target({ElementType.FIELD, ElementType.METHOD})
17 | @Documented
18 | @JacksonAnnotationsInside
19 | @JsonSerialize(using = TranslationHandler.class)
20 | public @interface Translation {
21 |
22 | /**
23 | * 类型 (需与实现类上的 {@link com.snow.common.translation.annotation.TranslationType} 注解type对应)
24 | *
25 | * 默认取当前字段的值 如果设置了 @{@link Translation#mapper()} 则取映射字段的值
26 | */
27 | String type();
28 |
29 | /**
30 | * 映射字段 (如果不为空则取此字段的值)
31 | */
32 | String mapper() default "";
33 |
34 | /**
35 | * 其他条件 例如: 字典type(sys_user_sex)
36 | */
37 | String other() default "";
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/snow-gateway/src/main/java/com/snow/gateway/config/RouterFunctionConfiguration.java:
--------------------------------------------------------------------------------
1 | package com.snow.gateway.config;
2 |
3 | import org.springframework.beans.factory.annotation.Autowired;
4 | import org.springframework.context.annotation.Bean;
5 | import org.springframework.context.annotation.Configuration;
6 | import org.springframework.http.MediaType;
7 | import org.springframework.web.reactive.function.server.RequestPredicates;
8 | import org.springframework.web.reactive.function.server.RouterFunction;
9 | import org.springframework.web.reactive.function.server.RouterFunctions;
10 | import com.snow.gateway.handler.ValidateCodeHandler;
11 |
12 | /**
13 | * 路由配置信息
14 | *
15 | * @author snow
16 | */
17 | @Configuration
18 | public class RouterFunctionConfiguration
19 | {
20 | @Autowired
21 | private ValidateCodeHandler validateCodeHandler;
22 |
23 | @SuppressWarnings("rawtypes")
24 | @Bean
25 | public RouterFunction routerFunction()
26 | {
27 | return RouterFunctions.route(
28 | RequestPredicates.GET("/code").and(RequestPredicates.accept(MediaType.TEXT_PLAIN)),
29 | validateCodeHandler);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/snow-modules/snow-dinky/src/main/java/org/dinky/mapper/MetricsMapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Licensed to the Apache Software Foundation (ASF) under one or more
4 | * contributor license agreements. See the NOTICE file distributed with
5 | * this work for additional information regarding copyright ownership.
6 | * The ASF licenses this file to You under the Apache License, Version 2.0
7 | * (the "License"); you may not use this file except in compliance with
8 | * the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | *
18 | */
19 |
20 | package org.dinky.mapper;
21 |
22 | import org.dinky.data.model.Metrics;
23 |
24 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
25 |
26 | public interface MetricsMapper extends BaseMapper {}
27 |
--------------------------------------------------------------------------------
/snow-modules/snow-dinky/src/main/java/org/dinky/service/FlinkService.java:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Licensed to the Apache Software Foundation (ASF) under one or more
4 | * contributor license agreements. See the NOTICE file distributed with
5 | * this work for additional information regarding copyright ownership.
6 | * The ASF licenses this file to You under the Apache License, Version 2.0
7 | * (the "License"); you may not use this file except in compliance with
8 | * the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | *
18 | */
19 |
20 | package org.dinky.service;
21 |
22 | import org.dinky.data.vo.CascaderVO;
23 |
24 | import java.util.List;
25 |
26 | public interface FlinkService {
27 |
28 | List loadConfigOptions();
29 | }
30 |
--------------------------------------------------------------------------------
/snow-modules/snow-dolphinscheduler/src/main/java/org/apache/dolphinscheduler/api/service/TaskDefinitionLogService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.dolphinscheduler.api.service;
19 |
20 | public interface TaskDefinitionLogService {
21 |
22 | void deleteTaskByWorkflowDefinitionCode(long workflowDefinitionCode);
23 | }
24 |
--------------------------------------------------------------------------------
/snow-modules/snow-dinky/src/main/java/org/dinky/job/handler/AbsJobHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Licensed to the Apache Software Foundation (ASF) under one or more
4 | * contributor license agreements. See the NOTICE file distributed with
5 | * this work for additional information regarding copyright ownership.
6 | * The ASF licenses this file to You under the Apache License, Version 2.0
7 | * (the "License"); you may not use this file except in compliance with
8 | * the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | *
18 | */
19 |
20 | package org.dinky.job.handler;
21 |
22 | import org.dinky.job.Job;
23 | import org.dinky.job.JobHandler;
24 |
25 | public abstract class AbsJobHandler implements JobHandler {
26 | protected Job job;
27 | }
28 |
--------------------------------------------------------------------------------
/snow-ui/src/assets/icons/svg/wechat.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/snow-modules/snow-dinky/src/main/java/org/dinky/mapper/ResourcesMapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Licensed to the Apache Software Foundation (ASF) under one or more
4 | * contributor license agreements. See the NOTICE file distributed with
5 | * this work for additional information regarding copyright ownership.
6 | * The ASF licenses this file to You under the Apache License, Version 2.0
7 | * (the "License"); you may not use this file except in compliance with
8 | * the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | *
18 | */
19 |
20 | package org.dinky.mapper;
21 |
22 | import org.dinky.data.model.Resources;
23 |
24 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
25 |
26 | public interface ResourcesMapper extends BaseMapper {}
27 |
--------------------------------------------------------------------------------
/snow-modules/snow-dinky/src/main/java/org/dinky/service/AlertRuleService.java:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Licensed to the Apache Software Foundation (ASF) under one or more
4 | * contributor license agreements. See the NOTICE file distributed with
5 | * this work for additional information regarding copyright ownership.
6 | * The ASF licenses this file to You under the Apache License, Version 2.0
7 | * (the "License"); you may not use this file except in compliance with
8 | * the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | *
18 | */
19 |
20 | package org.dinky.service;
21 |
22 | import org.dinky.data.model.alert.AlertRule;
23 | import org.dinky.mybatis.service.ISuperService;
24 |
25 | public interface AlertRuleService extends ISuperService {}
26 |
--------------------------------------------------------------------------------
/snow-modules/snow-dinky/src/main/resources/mapper/JobHistoryMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
11 |
12 |
30 |
31 |
--------------------------------------------------------------------------------
/snow-modules/snow-dinky/src/main/java/org/dinky/data/dto/SseSubscribeDTO.java:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Licensed to the Apache Software Foundation (ASF) under one or more
4 | * contributor license agreements. See the NOTICE file distributed with
5 | * this work for additional information regarding copyright ownership.
6 | * The ASF licenses this file to You under the Apache License, Version 2.0
7 | * (the "License"); you may not use this file except in compliance with
8 | * the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | *
18 | */
19 |
20 | package org.dinky.data.dto;
21 |
22 | import java.util.List;
23 |
24 | import lombok.Data;
25 |
26 | @Data
27 | public class SseSubscribeDTO {
28 | private String sessionKey;
29 | private List topics;
30 | }
31 |
--------------------------------------------------------------------------------
/snow-modules/snow-gen/src/main/resources/vm/js/api.js.vm:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | // 查询${functionName}列表
4 | export function list${BusinessName}(query) {
5 | return request({
6 | url: '/${moduleName}/${businessName}/list',
7 | method: 'get',
8 | params: query
9 | })
10 | }
11 |
12 | // 查询${functionName}详细
13 | export function get${BusinessName}(${pkColumn.javaField}) {
14 | return request({
15 | url: '/${moduleName}/${businessName}/' + ${pkColumn.javaField},
16 | method: 'get'
17 | })
18 | }
19 |
20 | // 新增${functionName}
21 | export function add${BusinessName}(data) {
22 | return request({
23 | url: '/${moduleName}/${businessName}',
24 | method: 'post',
25 | data: data
26 | })
27 | }
28 |
29 | // 修改${functionName}
30 | export function update${BusinessName}(data) {
31 | return request({
32 | url: '/${moduleName}/${businessName}',
33 | method: 'put',
34 | data: data
35 | })
36 | }
37 |
38 | // 删除${functionName}
39 | export function del${BusinessName}(${pkColumn.javaField}) {
40 | return request({
41 | url: '/${moduleName}/${businessName}/' + ${pkColumn.javaField},
42 | method: 'delete'
43 | })
44 | }
45 |
--------------------------------------------------------------------------------
/snow-ui/src/assets/icons/svg/skill.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/snow-common/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | com.snow
6 | snow
7 | 3.6.4
8 |
9 | 4.0.0
10 |
11 |
12 | snow-common-log
13 | snow-common-core
14 | snow-common-redis
15 | snow-common-seata
16 | snow-common-swagger
17 | snow-common-security
18 | snow-common-sensitive
19 | snow-common-datascope
20 | snow-common-datasource
21 | snow-common-translation
22 |
23 |
24 | snow-common
25 | pom
26 |
27 |
28 | snow-common通用模块
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/snow-common/snow-common-swagger/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | com.snow
7 | snow-common
8 | 3.6.4
9 |
10 | 4.0.0
11 |
12 | snow-common-swagger
13 |
14 |
15 | snow-common-swagger系统接口
16 |
17 |
18 |
19 |
20 |
21 |
22 | org.springframework.boot
23 | spring-boot-starter-web
24 |
25 |
26 |
27 |
28 | io.springfox
29 | springfox-swagger2
30 | ${swagger.fox.version}
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/snow-modules/snow-dolphinscheduler/src/main/java/org/apache/dolphinscheduler/api/security/impl/AbstractSsoAuthenticator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.dolphinscheduler.api.security.impl;
19 |
20 | public abstract class AbstractSsoAuthenticator extends AbstractAuthenticator {
21 |
22 | public abstract String getSignInUrl(String state);
23 | }
24 |
--------------------------------------------------------------------------------
/snow-modules/snow-dolphinscheduler/src/main/java/org/apache/dolphinscheduler/api/dto/ProcessInstanceDto.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.dolphinscheduler.api.dto;
19 |
20 | import org.apache.dolphinscheduler.dao.entity.ProcessInstance;
21 |
22 | /**
23 | * ProcessInstanceDto
24 | */
25 | public class ProcessInstanceDto extends ProcessInstance {
26 | }
27 |
--------------------------------------------------------------------------------
/snow-modules/snow-dolphinscheduler/src/main/bin/jvm_args_env.sh:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | -Xms1g
19 | -Xmx1g
20 | -Xmn512m
21 |
22 | -XX:+IgnoreUnrecognizedVMOptions
23 | -XX:+PrintGCDateStamps
24 | -XX:+PrintGCDetails
25 | -Xloggc:gc.log
26 |
27 | -XX:+ExitOnOutOfMemoryError
28 | -XX:+HeapDumpOnOutOfMemoryError
29 | -XX:HeapDumpPath=dump.hprof
30 |
31 | -Duser.timezone=${SPRING_JACKSON_TIME_ZONE}
--------------------------------------------------------------------------------
/snow-ui/src/assets/icons/svg/people.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------