diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..a09c56df5c7fd744f3166e151ae91dd41e57fec9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/.idea diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b81b018ad684f3a35fee301741b2734c8f4..0000000000000000000000000000000000000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 6560a98983ec708cf9d8b5c5c3776d7bd39c475b..0000000000000000000000000000000000000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/lanius-orchestrate-2.iml b/.idea/lanius-orchestrate-2.iml deleted file mode 100644 index d6ebd4805981b8400db3e3291c74a743fef9a824..0000000000000000000000000000000000000000 --- a/.idea/lanius-orchestrate-2.iml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index f6f995234691e773cbce772f8fbf4a240de177bf..0000000000000000000000000000000000000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1ddfbbc029bcab630581847471d7f238ec53..0000000000000000000000000000000000000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/db/lanius_orchestrate_oracle.sql b/db/lanius_orchestrate_oracle.sql new file mode 100644 index 0000000000000000000000000000000000000000..7aede328bfdbf9cb5badaff4f377bb89078c8aa3 --- /dev/null +++ b/db/lanius_orchestrate_oracle.sql @@ -0,0 +1,384 @@ + +-- ---------------------------- +-- Table structure for LANIUS.lo_manager +-- --------------------------- +CREATE TABLE LANIUS.lo_manager ( + id number NOT NULL, + user_name varchar(64), + password varchar(512), + create_time TIMESTAMP, + PRIMARY KEY (id) +); + +-- ---------------------------- +-- Records of LANIUS.lo_manager +-- ---------------------------- +INSERT INTO LANIUS.lo_manager VALUES (1519516605054758913, 'admin', '$2a$10$ASCA3cm8IcdQ3Ul83aRff.0HTAATo263PThnzEe25JLi5y8KULfgq', to_date('2022-04-28 11:19:24', 'YYYY-MM-DD HH24:MI:SS')); + +-- ---------------------------- +-- Table structure for LANIUS.lo_menu +-- ---------------------------- +CREATE TABLE LANIUS.lo_menu ( + id number NOT NULL, + menu_name varchar(64), + menu_url varchar(128), + PRIMARY KEY (id) +); + +-- ---------------------------- +-- Records of LANIUS.lo_menu +-- ---------------------------- +INSERT INTO LANIUS.lo_menu VALUES (1513357791062450177, '用户管理', '/user'); +INSERT INTO LANIUS.lo_menu VALUES (1514493518265548802, '角色管理', '/role'); +INSERT INTO LANIUS.lo_menu VALUES (1514505549144240129, '主机配置', '/resource/server'); +INSERT INTO LANIUS.lo_menu VALUES (1516241554120908804, '服务节点', '/resource/serverProgram'); +INSERT INTO LANIUS.lo_menu VALUES (1516241554120908805, '资源配置', '/resource/taskResourceConfig'); +INSERT INTO LANIUS.lo_menu VALUES (1516241554120908806, '任务资源', '/resource/taskResource'); +INSERT INTO LANIUS.lo_menu VALUES (1516241554120908807, '总览查询', '/tatistic'); +INSERT INTO LANIUS.lo_menu VALUES (1516241554120908874, '用户日志', '/userLog'); +INSERT INTO LANIUS.lo_menu VALUES (1516241554120908876, '任务编排', '/task'); +INSERT INTO LANIUS.lo_menu VALUES (1516241554120908877, '任务实例', '/task/instance'); + +-- ---------------------------- +-- Table structure for LANIUS.lo_monitor_indicator +-- ---------------------------- +CREATE TABLE LANIUS.lo_monitor_indicator ( + id number NOT NULL, + indicator_name varchar(128), + indicator_type number, + remark varchar(512), + code varchar(64), + org_id number, + PRIMARY KEY (id) +); + +-- ---------------------------- +-- Table structure for LANIUS.lo_monitor_statistics +-- ---------------------------- +CREATE TABLE LANIUS.lo_monitor_statistics ( + id number NOT NULL, + indicator_id number NOT NULL, + statistic varchar(128) NOT NULL, + statistic_unit number NOT NULL, + statistic_time TIMESTAMP NOT NULL, + target_id number NOT NULL, + target_symbol varchar(64) NOT NULL, + PRIMARY KEY (id) +); + +-- ---------------------------- +-- Table structure for LANIUS.lo_org +-- ---------------------------- +CREATE TABLE LANIUS.lo_org ( + id number NOT NULL, + org_name varchar(64) NOT NULL, + create_time TIMESTAMP NOT NULL, + frozen char(1), + PRIMARY KEY (id) +); + +-- ---------------------------- +-- Table structure for LANIUS.lo_permission +-- ---------------------------- +CREATE TABLE LANIUS.lo_permission ( + id number NOT NULL, + permission_name varchar(64) NOT NULL, + menu_id number NOT NULL, + permission_code varchar(64), + sort number, + PRIMARY KEY (id) +); + +-- ---------------------------- +-- Records of LANIUS.lo_permission +-- ---------------------------- +INSERT INTO LANIUS.lo_permission VALUES (1513749187481149441, '编辑', 1513357791062450177, 'system::user::edit', 0); +INSERT INTO LANIUS.lo_permission VALUES (1513749728030408705, '查询', 1513357791062450177, 'system::user::query', 0); +INSERT INTO LANIUS.lo_permission VALUES (1514847509251997698, '编辑', 1514493518265548802, 'system::role::edit', 0); +INSERT INTO LANIUS.lo_permission VALUES (1514847629699825666, '查询', 1514493518265548802, 'system::role::query', 0); +INSERT INTO LANIUS.lo_permission VALUES (1516238191002214402, '查询', 1514505549144240129, 'resource::server::query', 0); +INSERT INTO LANIUS.lo_permission VALUES (1516238191002214403, '编辑', 1514505549144240129, 'resource::server::edit', 0); +INSERT INTO LANIUS.lo_permission VALUES (1516238191002214404, '查询', 1516241554120908804, 'resource::serverProgram::query', 0); +INSERT INTO LANIUS.lo_permission VALUES (1516238191002214405, '编辑', 1516241554120908805, 'resource::taskResourceConfig::edit', 0); +INSERT INTO LANIUS.lo_permission VALUES (1516238191002214406, '查询', 1516241554120908805, 'resource::taskResourceConfig::query', 0); +INSERT INTO LANIUS.lo_permission VALUES (1516238191002214407, '编辑', 1516241554120908806, 'resource::taskResource::edit', 0); +INSERT INTO LANIUS.lo_permission VALUES (1516238191002214408, '查询', 1516241554120908806, 'resource::taskResource::query', 0); +INSERT INTO LANIUS.lo_permission VALUES (1516241554120908804, '编辑', 1516241554120908804, 'resource::serverProgram::edit', 0); +INSERT INTO LANIUS.lo_permission VALUES (1516241554120908808, '查询', 1516241554120908807, 'resource::statistic::query', 0); +INSERT INTO LANIUS.lo_permission VALUES (1516241554120908872, '删除', 1513357791062450177, 'system::user::delete', 0); +INSERT INTO LANIUS.lo_permission VALUES (1516241554120908873, '删除', 1514493518265548802, 'system::role::delete', 0); +INSERT INTO LANIUS.lo_permission VALUES (1516241554120908875, '查询', 1516241554120908874, 'system::userLog::query', 0); +INSERT INTO LANIUS.lo_permission VALUES (1516241554120908878, '查询', 1516241554120908876, 'task::plan::query', 0); +INSERT INTO LANIUS.lo_permission VALUES (1516241554120908879, '编辑', 1516241554120908876, 'task::plan::edit', 0); +INSERT INTO LANIUS.lo_permission VALUES (1516241554120908880, '删除', 1516241554120908876, 'task::plan::delete', 0); +INSERT INTO LANIUS.lo_permission VALUES (1516241554120908881, '查询', 1516241554120908877, 'task::plan::instance::query', 0); + +-- ---------------------------- +-- Table structure for LANIUS.lo_role +-- ---------------------------- +CREATE TABLE LANIUS.lo_role ( + id number NOT NULL, + role_name varchar(64) NOT NULL, + create_time TIMESTAMP, + create_id varchar(64), + last_modify TIMESTAMP, + modified varchar(64), + org_id number NOT NULL, + deleted char(1), + PRIMARY KEY (id) +); + +-- ---------------------------- +-- Table structure for LANIUS.lo_role_permission +-- ---------------------------- +CREATE TABLE LANIUS.lo_role_permission ( + id number NOT NULL, + role_id number NOT NULL, + permission_id number NOT NULL, + PRIMARY KEY (id) +); + +-- ---------------------------- +-- Table structure for LANIUS.lo_server +-- ---------------------------- +CREATE TABLE LANIUS.lo_server ( + id number NOT NULL, + server_name varchar(64) NOT NULL, + server_ip varchar(64) NOT NULL, + server_port number NOT NULL, + account_name varchar(64) NOT NULL, + password varchar(128) NOT NULL, + remark varchar(512), + status number NOT NULL, + org_id number NOT NULL, + create_time TIMESTAMP, + create_id number , + last_modify TIMESTAMP, + modified number, + deleted char(1), + PRIMARY KEY (id) +); + +-- ---------------------------- +-- Table structure for LANIUS.lo_server_program +-- ---------------------------- +CREATE TABLE LANIUS.lo_server_program ( + id number NOT NULL, + program_name varchar(64) NOT NULL, + server_id number NOT NULL, + program_port number NOT NULL, + category number NOT NULL, + remark varchar(512), + program_config number, + status number NOT NULL, + auth_config CLOB NOT NULL, + org_id number NOT NULL, + create_time TIMESTAMP NOT NULL, + create_id number NOT NULL, + last_modify TIMESTAMP, + modified number, + deleted char(1), + PRIMARY KEY (id) +); + +-- ---------------------------- +-- Table structure for LANIUS.lo_task_instance +-- ---------------------------- +CREATE TABLE LANIUS.lo_task_instance ( + id number NOT NULL, + task_plan_id number NOT NULL, + begin_time TIMESTAMP NOT NULL, + end_time TIMESTAMP, + status number NOT NULL, + server_program_id number NOT NULL, + create_time TIMESTAMP NOT NULL, + task_info CLOB, + org_id number, + log_level number NOT NULL, + task_resource_id number NOT NULL, + PRIMARY KEY (id) +); + +create index lo_task_instance_org_id_index on LANIUS.lo_task_instance(org_id); + +-- ---------------------------- +-- Table structure for LANIUS.lo_task_plan +-- ---------------------------- +CREATE TABLE LANIUS.lo_task_plan ( + id number NOT NULL, + task_name varchar(64) NOT NULL, + task_cron varchar(512) NOT NULL, + server_program_id number NOT NULL, + task_resource_id number NOT NULL, + remark varchar(512), + json_config CLOB, + status number NOT NULL, + group_id number, + log_level number NOT NULL, + org_id number, + create_id number, + create_time TIMESTAMP, + last_modify TIMESTAMP, + modified number, + PRIMARY KEY (id) +); + +create index lo_task_plan_org_id_index on LANIUS.lo_task_plan(org_id); + +-- ---------------------------- +-- Table structure for LANIUS.lo_task_plan_group +-- ---------------------------- +CREATE TABLE LANIUS.lo_task_plan_group ( + id number NOT NULL, + group_name varchar(64), + org_id number NOT NULL, + pid number, + PRIMARY KEY (id) +); + +create index lo_task_plan_group_index on LANIUS.lo_task_plan_group(org_id); + +-- ---------------------------- +-- Table structure for LANIUS.lo_task_resource +-- ---------------------------- +CREATE TABLE LANIUS.lo_task_resource ( + id number NOT NULL, + resource_type number NOT NULL, + remark varchar(512), + resource_content CLOB , + resource_config_id number NOT NULL, + create_id number NOT NULL, + create_time TIMESTAMP NOT NULL, + modified number , + last_modify TIMESTAMP, + group_id number, + org_id number NOT NULL, + resource_name varchar(64) NOT NULL, + deleted char(1), + PRIMARY KEY (id) +); + +create index lo_task_resource_org_id_index on LANIUS.lo_task_resource(org_id); + +-- ---------------------------- +-- Table structure for LANIUS.lo_task_resource_config +-- ---------------------------- +CREATE TABLE LANIUS.lo_task_resource_config ( + id number NOT NULL, + connect_name varchar(64) NOT NULL, + connect_url varchar(512) NOT NULL, + connect_account varchar(64) NOT NULL, + connect_password varchar(128), + remark varchar(512), + create_id number NOT NULL, + create_time TIMESTAMP NOT NULL, + modified number, + last_modify TIMESTAMP, + org_id number NOT NULL, + connect_category number NOT NULL, + deleted char(1), + status number, + PRIMARY KEY (id) +); + +create index lo_task_res_config_index on LANIUS.lo_task_resource_config(org_id); + +-- ---------------------------- +-- Table structure for LANIUS.lo_task_resource_group +-- ---------------------------- +CREATE TABLE LANIUS.lo_task_resource_group ( + id number NOT NULL, + group_name varchar(64), + org_id number NOT NULL, + pid number, + create_time TIMESTAMP, + create_id number, + last_modify TIMESTAMP, + modified number, + deleted char(1), + PRIMARY KEY (id) +); + +create index lo_task_res_group_index on LANIUS.lo_task_resource_group(org_id); + +-- ---------------------------- +-- Table structure for LANIUS.lo_task_step_log +-- ---------------------------- +CREATE TABLE LANIUS.lo_task_step_log ( + id number NOT NULL, + task_instance_id number, + log_date varchar(30), + trans_name CLOB, + step_name varchar(100) NOT NULL, + step_copy number, + lines_read number, + lines_written number, + lines_updated number, + lines_input number, + lines_output number, + lines_rejected number, + errors number, + status_description varchar(20), + input_buffer_rows number, + output_buffer_rows number, + speed number, + running_time float, + PRIMARY KEY (id) +); + +-- ---------------------------- +-- Table structure for LANIUS.lo_user +-- ---------------------------- +CREATE TABLE LANIUS.lo_user ( + id number NOT NULL, + user_name varchar(64) NOT NULL, + password varchar(512) NOT NULL, + nick_name varchar(64) NOT NULL, + phone varchar(11), + email varchar(64), + create_time TIMESTAMP, + create_id varchar(64), + last_modify TIMESTAMP, + modified varchar(64), + deleted char(1), + status number +); + +-- ---------------------------- +-- Table structure for LANIUS.lo_user_log +-- ---------------------------- +CREATE TABLE LANIUS.lo_user_log ( + id number NOT NULL, + create_time TIMESTAMP, + create_id number, + url varchar(512), + method varchar(32), + event_name varchar(64), + event_content varchar(512), + org_id number, + PRIMARY KEY (id) +); + +create index lo_user_log_org_id_index on LANIUS.lo_user_log(org_id); + +-- ---------------------------- +-- Table structure for LANIUS.lo_user_org +-- ---------------------------- +CREATE TABLE LANIUS.lo_user_org ( + id number NOT NULL, + user_id number NOT NULL, + org_id number NOT NULL, + org_chief char(1), + PRIMARY KEY (id) +); + +-- ---------------------------- +-- Table structure for LANIUS.lo_user_role +-- ---------------------------- +CREATE TABLE LANIUS.lo_user_role ( + id number NOT NULL, + user_id number NOT NULL, + role_id number NOT NULL, + PRIMARY KEY (id) +); + diff --git a/docs/Build.md b/docs/Build.md index 859e3b03d374b459928218bc4d168187ac16df7d..21eb0de82eeb972c7707cb7b248ca54cbb563a64 100644 --- a/docs/Build.md +++ b/docs/Build.md @@ -2,7 +2,7 @@ ## 1.1 基本环境(必备) -​ JDK:11+、Maven:3.5+、MYSQL:8+ | 达梦:8、Node:16+ +​ JDK:11+、Maven:3.5+、MYSQL:8+ | 达梦:8 | Oracle:11g、Node:16+ ## 1.2 后台系统工程(JAVA端) @@ -31,7 +31,7 @@ db/lanius_orchestrate_latest.sql ![db-mysql-script.png](img/build/fast/db-mysql-script.png) #### 1.2.3.2 达梦 -##### 1.2.3.2.1 使用默认模式SYSDBA +##### 1.2.3.2.1 创建新模式LANIUS ![db-dm-schema.png](img/build/fast/db-dm-schema.png) ##### 1.2.3.2.2 导入数据库,文件路径如下: @@ -39,6 +39,15 @@ db/lanius_orchestrate_dm.sql ![db-dm-script.png](img/build/fast/db-dm-script.png) +#### 1.2.3.3 Oracle +##### 1.2.3.3.1 创建新用户LANIUS,使用LANIUS模式 +![db-oracle-schema.png](img/build/fast/db-oracle-schema.png) +##### 1.2.3.3.2 导入数据库,文件路径如下: + +db/lanius_orchestrate_oracle.sql + +![db-oracle-script.png](img/build/fast/db-oracle-script.png) + ### 1.2.4 在lanius-orchestrate-common模块的pom.xml中添加数据库依赖 #### 1.2.4.1 Mysql @@ -64,6 +73,20 @@ mvn install:install-file -Dfile=D:\tool\dm\DmJdbcDriver18.jar -DgroupId=dm.jdbc ``` +#### 1.2.4.3 Oracle +``` + + com.oracle.database.jdbc + ojdbc8 + 21.1.0.0 + + + com.oracle.database.nls + orai18n + 21.1.0.0 + +``` + ### 1.2.5 在lanius-orchestrate模块的resource下提供了默认的yml配置文件 ![orchestrate-resource.png](img/build/fast/orchestrate-resource.png) @@ -75,6 +98,10 @@ mvn install:install-file -Dfile=D:\tool\dm\DmJdbcDriver18.jar -DgroupId=dm.jdbc ![dm-yml.png](img/build/fast/dm-yml.png) +#### 1.2.5.3 Oracle + +![oracle-yml.png](img/build/fast/oracle-yml.png) + ### 1.2.6 执行打包编译脚本,路径如下 ![server-complie-package.png](img/build/fast/server-complie-package.png) @@ -112,6 +139,7 @@ spring: ![server-dm-yml.png](img/build/fast/server-dm-yml.png) ![dm-db-yml.png](img/build/fast/dm-db-yml.png) + ``` spring: datasource: @@ -120,6 +148,21 @@ spring: username: SYSDBA password: 123456789 ``` + +#### 1.2.10.3 Oracle,文件路径如下: +![server-oracle-yml.png](img/build/fast/server-oracle-yml.png) + +![oracle-db-yml.png](img/build/fast/oracle-db-yml.png) + +``` +spring: + datasource: + driver-class-name: oracle.jdbc.OracleDriver + url: jdbc:oracle:thin:@127.0.0.1:1521:orcl + username: LANIUS + password: LANIUS +``` + ### 1.2.11 启动程序,启动程序路径如下: 进入目录/dist @@ -127,7 +170,7 @@ spring: ![application-yml-path.png](img/build/fast/application-yml-path.png) ![application-active.png](img/build/fast/application-active.png) -dev配置的是Mysql数据库,dm配置的是达梦数据库 +dev配置的是Mysql数据库,dm配置的是达梦数据库,oracle配置的是Oracle数据库 #### 1.2.11.2 启动程序脚本 diff --git a/docs/Development.md b/docs/Development.md index 12acb736fdcebbad3eae551be3e4dda0b3cefb32..094ed7880395cca94b5cc9745600854aa5e3a219 100644 --- a/docs/Development.md +++ b/docs/Development.md @@ -2,7 +2,7 @@ ## 1.1 基本环境 -​ JDK:11+、Maven:3.5+、MYSQL:8+ | 达梦:8、Node:16+、npm:8.16.0+、vue/cli:5+ +​ JDK:11+、Maven:3.5+、MYSQL:8+ | 达梦:8 | Oracle:11g、Node:16+、npm:8.16.0+、vue/cli:5+ ## 1.2 开发环境 @@ -42,6 +42,19 @@ mvn install:install-file -Dfile=D:\tool\dm\DmJdbcDriver18.jar -DgroupId=dm.jdbc runtime ``` +#### 1.3.4.3 Oracle +``` + + com.oracle.database.jdbc + ojdbc8 + 21.1.0.0 + + + com.oracle.database.nls + orai18n + 21.1.0.0 + +``` ### 1.3.5 配置开发环境数据库信息 #### 1.3.5.1 使用Mysql数据库,文件路径如下: @@ -54,6 +67,11 @@ mvn install:install-file -Dfile=D:\tool\dm\DmJdbcDriver18.jar -DgroupId=dm.jdbc ![dm-db-yml.png](img/develop/dm-db-yml.png) +#### 1.3.5.3 使用Oracle数据库,文件路径如下: +![oracle-yml.png](img/develop/oracle-yml.png) + +![oracle-db-yml.png](img/develop/oracle-db-yml.png) + ### 1.3.6 在父级pom.xml输入命令mvn clean install 或者 idea操作 install ![parent-clean-install.png](img/develop/parent-clean-install.png) ### 1.3.7 启动程序 @@ -61,7 +79,9 @@ mvn install:install-file -Dfile=D:\tool\dm\DmJdbcDriver18.jar -DgroupId=dm.jdbc ![application-dev-active.png](img/develop/application-dev-active.png) #### 1.3.7.2 使用达梦数据库 ![application-dm-active.png](img/develop/application-dm-active.png) -#### 1.3.7.3 启动后端程序 +#### 1.3.7.3 使用Oracle数据库 +![application-oracle-active.png](img/develop/application-oracle-active.png) +#### 1.3.7.4 启动后端程序 ![start-program.png](img/develop/start-program.png) ## 1.4 前端工程(VUE) diff --git a/docs/FAQ.md b/docs/FAQ.md index 4fc4da466b25b2431d13db808a5adc44d42667bf..3f5a18fd73de20aa68d9fa668f6de6ef31f4b42e 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -1,6 +1,6 @@ Lanius常见问题列表 ----------------- -#### 2022-09-09 +#### 2022-09-20 #### Q: 如何部署并开始使用? - 请参阅《README.md》中的部署教程进行产品的部署,需要注意按部署文档中的说明步骤操作,提高一次性部署成功率,遇到问题可以在QQ群155800768 进行交流。 @@ -95,5 +95,11 @@ Lanius常见问题列表 #### Q: Lanius用于商业需要授权吗? - Lanius的来源协议是MulanPSL 2.0,不需要授权,可以用于商业。 +#### Q: Lanius需要哪个版本的JDK? +- Lanius v1.0支持JDK8,Lanius v1.0.5支持JDK11。 +#### Q: 在什么情况下使用git资源库? +- 用于ktr、kjb的版本管理。Git资源库在跟程序集成之后,就不需要搭建数据库资源库或者文件资源库了,程序启动后就可以使用。 +#### Q: 在离线环境下,Lanius的所有功能能不能正常运行? +- 可以正常运行。 diff --git a/docs/img/build/fast/db-dm-schema.png b/docs/img/build/fast/db-dm-schema.png index 8936c7e6741ac9af038285f3a49c4f15dfddded8..0a38dab829454531a053d0bdc2ebe67d2bc00376 100644 Binary files a/docs/img/build/fast/db-dm-schema.png and b/docs/img/build/fast/db-dm-schema.png differ diff --git a/docs/img/build/fast/db-oracle-schema.png b/docs/img/build/fast/db-oracle-schema.png new file mode 100644 index 0000000000000000000000000000000000000000..fd53e6d2fabb2cccf29f6249d55b60c44f6ad43a Binary files /dev/null and b/docs/img/build/fast/db-oracle-schema.png differ diff --git a/docs/img/build/fast/db-oracle-script.png b/docs/img/build/fast/db-oracle-script.png new file mode 100644 index 0000000000000000000000000000000000000000..3a2e1fa1de5409a46077b1c611f7b0afd28ca131 Binary files /dev/null and b/docs/img/build/fast/db-oracle-script.png differ diff --git a/docs/img/build/fast/oracle-db-yml.png b/docs/img/build/fast/oracle-db-yml.png new file mode 100644 index 0000000000000000000000000000000000000000..a6121f05f7947894c932d5ce26e6847ed86d5677 Binary files /dev/null and b/docs/img/build/fast/oracle-db-yml.png differ diff --git a/docs/img/build/fast/oracle-yml.png b/docs/img/build/fast/oracle-yml.png new file mode 100644 index 0000000000000000000000000000000000000000..ba66a3b613a1a4f5223d8faeaea4c367fa906ab8 Binary files /dev/null and b/docs/img/build/fast/oracle-yml.png differ diff --git a/docs/img/build/fast/server-oracle-yml.png b/docs/img/build/fast/server-oracle-yml.png new file mode 100644 index 0000000000000000000000000000000000000000..80093ea8832001c5541087757fc7c0cc7d9f3be3 Binary files /dev/null and b/docs/img/build/fast/server-oracle-yml.png differ diff --git a/docs/img/develop/application-oracle-active.png b/docs/img/develop/application-oracle-active.png new file mode 100644 index 0000000000000000000000000000000000000000..21ee3dcee157af9a13da4cfeebcd1b1d4946bd5d Binary files /dev/null and b/docs/img/develop/application-oracle-active.png differ diff --git a/docs/img/develop/oracle-db-yml.png b/docs/img/develop/oracle-db-yml.png new file mode 100644 index 0000000000000000000000000000000000000000..2824049d0bb596ae67d564068552c97574baf4d3 Binary files /dev/null and b/docs/img/develop/oracle-db-yml.png differ diff --git a/docs/img/develop/oracle-yml.png b/docs/img/develop/oracle-yml.png new file mode 100644 index 0000000000000000000000000000000000000000..223440468841ded5912c7e0aade230b5f8d4c1ef Binary files /dev/null and b/docs/img/develop/oracle-yml.png differ diff --git a/lanius-orchestrate-client/.env.development b/lanius-orchestrate-client/.env.development index 18398cfb487c9f2e205fcf1bcc779fe2a09e38ba..c03bf3b061f91ce0e4b06dbb303222f7eb45cb12 100644 --- a/lanius-orchestrate-client/.env.development +++ b/lanius-orchestrate-client/.env.development @@ -1,2 +1,3 @@ -VITE_API_BASE_URL=http://localhost:8081 -VITE_TITLE=大数据治理平台 \ No newline at end of file +VITE_API_BASE_URL=/api +VITE_TITLE=大数据治理平台 +VITE_AES_ENCRYPT_KEY=5JYuikF0B9JKi89i \ No newline at end of file diff --git a/lanius-orchestrate-client/.env.production b/lanius-orchestrate-client/.env.production index 6bfe34ba539a2676d173cdb9956751967a3108be..c03bf3b061f91ce0e4b06dbb303222f7eb45cb12 100644 --- a/lanius-orchestrate-client/.env.production +++ b/lanius-orchestrate-client/.env.production @@ -1,2 +1,3 @@ VITE_API_BASE_URL=/api -VITE_TITLE=大数据治理平台 \ No newline at end of file +VITE_TITLE=大数据治理平台 +VITE_AES_ENCRYPT_KEY=5JYuikF0B9JKi89i \ No newline at end of file diff --git a/lanius-orchestrate-client/package.json b/lanius-orchestrate-client/package.json index ea41a8b60fe5b7fb2f978ebda8d400847b70799f..cf565267c1e5ec4680e992dc04531c4fa0939cec 100644 --- a/lanius-orchestrate-client/package.json +++ b/lanius-orchestrate-client/package.json @@ -9,7 +9,9 @@ }, "dependencies": { "@element-plus/icons-vue": "^1.1.4", + "@types/crypto-js": "^4.1.1", "axios": "^0.26.1", + "crypto-js": "^4.1.1", "element-plus": "^2.1.11", "path": "^0.12.7", "sass": "^1.49.9", diff --git a/lanius-orchestrate-client/src/components/lanius/lanius-password-input.vue b/lanius-orchestrate-client/src/components/lanius/lanius-password-input.vue new file mode 100644 index 0000000000000000000000000000000000000000..f92ef4734f3fdda111d1a27854349803915383de --- /dev/null +++ b/lanius-orchestrate-client/src/components/lanius/lanius-password-input.vue @@ -0,0 +1,69 @@ + + + + + + + diff --git a/lanius-orchestrate-client/src/env.d.ts b/lanius-orchestrate-client/src/env.d.ts index d0a683f803e0f19fd7bed122cf02128520d773e0..d679d93ca999e502fa2c13691d91b88dcd7e4f95 100644 --- a/lanius-orchestrate-client/src/env.d.ts +++ b/lanius-orchestrate-client/src/env.d.ts @@ -1,8 +1,26 @@ +/* Copyright (c) 2022 渝州大数据实验室 + * + * Lanius is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * + * http://license.coscl.org.cn/MulanPSL2 + * + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ +/* + * @description: TS类型定义 + * @fileName: env.d.ts + * @author: zoujunjie@yzbdl.ac.cn + * @date: 2022-09-21 + */ /// interface ImportMetaEnv { - readonly VITE_API_BASE_URL: String; - readonly VITE_TITLE: String; + readonly VITE_API_BASE_URL: string; + readonly VITE_TITLE: string; + readonly VITE_AES_ENCRYPT_KEY: string; } interface ImportMeta { diff --git a/lanius-orchestrate-client/src/services/common/tool.ts b/lanius-orchestrate-client/src/services/common/tool.ts index 32dba5cd98906263a298bb0ee372378f24eacf4f..ea1ab77ea1ea4537e2d1487ccf61a43f2a856822 100644 --- a/lanius-orchestrate-client/src/services/common/tool.ts +++ b/lanius-orchestrate-client/src/services/common/tool.ts @@ -15,6 +15,10 @@ * @author zoujunjie@yzbdl.ac.cn * @date 2022-4-28 */ +import CryptoJS from "crypto-js"; + +const ENCRYPT_KEY: string = import.meta.env.VITE_AES_ENCRYPT_KEY; + const createGuid = (hasLine: Boolean = true): String => { function s4() { return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); @@ -70,6 +74,24 @@ interface IKeyValue { value: TValue; } -export { createGuid, checkPassword, checkIpV4 }; +const encryptAes = (text: string): string => { + return CryptoJS.AES.encrypt(text, CryptoJS.enc.Utf8.parse(ENCRYPT_KEY), { + mode: CryptoJS.mode.ECB, + padding: CryptoJS.pad.Pkcs7, + }).ciphertext.toString(); +}; + +const decryptAes = (encryptedText: string): string => { + return CryptoJS.AES.decrypt( + CryptoJS.enc.Base64.stringify(CryptoJS.enc.Hex.parse(encryptedText)), + CryptoJS.enc.Utf8.parse(ENCRYPT_KEY), + { + mode: CryptoJS.mode.ECB, + padding: CryptoJS.pad.Pkcs7, + } + ).toString(CryptoJS.enc.Utf8); +}; + +export { createGuid, checkPassword, checkIpV4, encryptAes, decryptAes }; export type { IHash, IKeyValue }; diff --git a/lanius-orchestrate-client/src/services/user.ts b/lanius-orchestrate-client/src/services/user.ts index e07dbafba40d0c8ee3ae077aa0945f0feeee0837..a04e0fc0bf267362e1002d79a987e52f5bf7794d 100644 --- a/lanius-orchestrate-client/src/services/user.ts +++ b/lanius-orchestrate-client/src/services/user.ts @@ -18,11 +18,12 @@ import http from "./common/http"; import localTokenStrategy from "@/common/util/auth"; import { clearMenuPermissionsCache } from "./user-permission"; +import { encryptAes } from "./common/tool"; interface ChangePasswordModel { - old: String; //旧密码 - new: String; //新密码 - confirm: String; //确认密码 + old: string; //旧密码 + new: string; //新密码 + confirm: string; //确认密码 } /** @@ -38,8 +39,8 @@ const changePassword = async ( .post({ url: "/manager/password", data: { - newPassword: data.new, - oldPassword: data.old, + newPassword: encryptAes(data.new), + oldPassword: encryptAes(data.old), }, }) .then((r) => { @@ -53,8 +54,8 @@ const changePassword = async ( .post({ url: "/personal/password", data: { - newPassword: data.new, - oldPassword: data.old, + newPassword: encryptAes(data.new), + oldPassword: encryptAes(data.old), }, }) .then((r) => { diff --git a/lanius-orchestrate-client/src/views/Admin/Login/Login.vue b/lanius-orchestrate-client/src/views/Admin/Login/Login.vue index f912d8b4b874aec8303911e379ae22afc4693c06..ccd2ade8dae112125ae26621df3a9b9545dfda14 100644 --- a/lanius-orchestrate-client/src/views/Admin/Login/Login.vue +++ b/lanius-orchestrate-client/src/views/Admin/Login/Login.vue @@ -118,12 +118,12 @@ import localTokenStrategy from "@/common/util/auth"; import { HttpClient } from "@/common/http"; import LaniusImage from "@/components/lanius/LaniusImage.vue"; import { createGuid } from "@/services/common/tool"; -import { checkPassword } from "@/services/common/tool"; +import { checkPassword, encryptAes } from "@/services/common/tool"; interface LoginModel { - username: String; - password: String; - code: String; + username: string; + password: string; + code: string; } const route = useRoute(); @@ -198,7 +198,7 @@ const submit = async (formInstance: FormInstance | undefined) => { data: { code: loginModel.value.code, userName: loginModel.value.username, - password: loginModel.value.password, + password: encryptAes(loginModel.value.password), }, }) .then((result: any) => { diff --git a/lanius-orchestrate-client/src/views/Admin/SystemManagement/Organization/components/organization-search.vue b/lanius-orchestrate-client/src/views/Admin/SystemManagement/Organization/components/organization-search.vue index 34e272dbb220b2e9b9e8f07be2856700edb07ecf..8cb31c1b20950e63bd560d123ec1c1b52e273078 100644 --- a/lanius-orchestrate-client/src/views/Admin/SystemManagement/Organization/components/organization-search.vue +++ b/lanius-orchestrate-client/src/views/Admin/SystemManagement/Organization/components/organization-search.vue @@ -16,7 +16,7 @@ * @date:2022-4-6 !-->