Skip to content

Commit

Permalink
Merge pull request #599 from shanmengm/master
Browse files Browse the repository at this point in the history
Merge dev-0.3
  • Loading branch information
RichardShan authored Nov 27, 2018
2 parents 21abbbb + 1d4d1a3 commit 7d9b7b9
Show file tree
Hide file tree
Showing 157 changed files with 4,976 additions and 742 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ spark-warehouse
*.log
*.conf
config/application.yml
config/datasource_driver.yml
swagger-ui/
tempFiles/
userfiles/
Expand Down
2 changes: 1 addition & 1 deletion assembly/src/main/assembly/assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@


<assembly>
<id>dist-beta.3</id>
<id>dist-beta.4</id>
<formats>
<format>zip</format>
</formats>
Expand Down
2 changes: 1 addition & 1 deletion assembly/src/main/assembly/release.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@


<assembly>
<id>release</id>
<id>release-beta.4</id>
<formats>
<format>zip</format>
</formats>
Expand Down
53 changes: 27 additions & 26 deletions bin/davinci.sql
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ CREATE TABLE `cron_job` (
`update_time` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `name_UNIQUE` (`name`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Table structure for dashboard
Expand All @@ -39,7 +39,7 @@ CREATE TABLE `dashboard` (
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_dashboard_id` (`dashboard_portal_id`) USING BTREE,
KEY `idx_parent_id` (`parent_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=175 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for dashboard_portal
Expand All @@ -54,7 +54,7 @@ CREATE TABLE `dashboard_portal` (
`publish` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否发布(0:否,1:是)',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_project_id` (`project_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for display
Expand All @@ -69,7 +69,7 @@ CREATE TABLE `display` (
`publish` tinyint(1) NOT NULL COMMENT '是否发布',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_project_id` (`project_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for display_slide
Expand All @@ -82,7 +82,7 @@ CREATE TABLE `display_slide` (
`config` text NOT NULL COMMENT '配置\n',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_display_id` (`display_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for favorite
Expand All @@ -95,7 +95,7 @@ CREATE TABLE `favorite` (
`create_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `idx_user_project` (`user_id`,`project_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=699 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for mem_dashboard_widget
Expand All @@ -114,7 +114,7 @@ CREATE TABLE `mem_dashboard_widget` (
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_protal_id` (`dashboard_id`) USING BTREE,
KEY `idx_widget_id` (`widget_Id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=186 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for mem_display_slide_widget
Expand All @@ -132,7 +132,7 @@ CREATE TABLE `mem_display_slide_widget` (
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_slide_id` (`display_slide_id`) USING BTREE,
KEY `idx_widget_id` (`widget_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=181 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for organization
Expand All @@ -154,7 +154,7 @@ CREATE TABLE `organization` (
`update_time` timestamp NULL DEFAULT NULL,
`update_by` bigint(20) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for project
Expand All @@ -172,7 +172,7 @@ CREATE TABLE `project` (
`is_transfer` tinyint(1) NOT NULL DEFAULT '0',
`initial_org_id` bigint(20) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=101 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=194 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for rel_team_project
Expand All @@ -191,7 +191,7 @@ CREATE TABLE `rel_team_project` (
`download_permission` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `idx_team_project` (`team_id`,`project_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for rel_user_organization
Expand All @@ -204,7 +204,7 @@ CREATE TABLE `rel_user_organization` (
`role` smallint(1) NOT NULL DEFAULT '0' COMMENT 'member/owner\n0/1',
PRIMARY KEY (`id`),
UNIQUE KEY `idx_org_user` (`org_id`,`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for rel_user_team
Expand All @@ -217,7 +217,7 @@ CREATE TABLE `rel_user_team` (
`role` smallint(1) NOT NULL DEFAULT '0' COMMENT 'member/Maintainer\n0/1',
PRIMARY KEY (`id`),
UNIQUE KEY `idx_team_user` (`team_id`,`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=96 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for source
Expand All @@ -232,7 +232,7 @@ CREATE TABLE `source` (
`project_id` bigint(20) NOT NULL COMMENT '所属项目Id',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_project_id` (`project_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for star
Expand All @@ -247,7 +247,7 @@ CREATE TABLE `star` (
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_target_id` (`target_id`) USING BTREE,
KEY `idx_user_id` (`user_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for team
Expand All @@ -262,7 +262,7 @@ CREATE TABLE `team` (
`avatar` varchar(255) DEFAULT NULL,
`visibility` tinyint(1) DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=60 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for user
Expand All @@ -284,7 +284,7 @@ CREATE TABLE `user` (
`update_time` timestamp NOT NULL DEFAULT '1970-01-01 08:00:01',
`update_by` bigint(20) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for view
Expand All @@ -301,7 +301,7 @@ CREATE TABLE `view` (
`config` text COMMENT '配置',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_project_id` (`project_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for widget
Expand All @@ -319,7 +319,7 @@ CREATE TABLE `widget` (
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_project_id` (`project_id`) USING BTREE,
KEY `idx_view_id` (`view_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=117 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Function structure for childTeamIds
Expand Down Expand Up @@ -415,11 +415,11 @@ DROP FUNCTION IF EXISTS `userTeamStruct`;
delimiter ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `userTeamStruct`(userId BIGINT(20)) RETURNS varchar(4000) CHARSET utf8
BEGIN
declare teamIds VARCHAR(4000);
declare teamIds TEXT;
declare tempId BIGINT(20);
declare done int DEFAULT false;
declare parentId BIGINT(20);
declare childId BIGINT(20);
declare childIds VARCHAR(4000);

declare cur CURSOR for
select t.id FROM team t, rel_user_team r WHERE r.user_id = userId and t.id = r.team_id;
Expand All @@ -429,19 +429,20 @@ BEGIN
open cur;
cur_loop: loop
FETCH cur INTO tempId;
SET childId = tempId;
SET childIds = tempId;

WHILE childId <> '' and locate(childId, teamIds) <= 0 DO
SELECT `id`, parent_team_id INTO parentId,childId FROM team WHERE id = childId;
SET teamIds = CONCAT(',',parentId,teamIds);
WHILE childIds is not null DO
SET teamIds = CONCAT(childIds,',',teamIds);
SELECT GROUP_CONCAT(id) into childIds FROM team WHERE FIND_IN_SET(parent_team_id,childIds) > 0;
END WHILE;

if done then
LEAVE cur_loop;
end if;
end loop;

RETURN SUBSTR(teamIds,2);
SELECT GROUP_CONCAT(id) INTO childIds FROM team WHERE FIND_IN_SET(id,teamIds);
RETURN childIds;
END;
;;
delimiter ;
Expand Down
7 changes: 7 additions & 0 deletions config/application.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,11 @@ spring:
ssl:
enable: false

ldap:
urls:
username:
password:
base:
domainName: # domainName 指 企业邮箱后缀,如企业邮箱为:[email protected], 这里值为 '@example.com'

phantomjs_home: $your_phantomjs_path$/phantomjs
2 changes: 1 addition & 1 deletion config/datasource_driver.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
## vertica: com.vertica.jdbc.Driver
## hana: com.sap.db.jdbc.Driver
## impala: com.cloudera.impala.jdbc41.Driver
## this means that if your datasource is in the above list, you don't need to use this method,
## this means that if your datasource is in the above list, you don't need to use this way,
## unless you know what you are doing.

## How to use:
Expand Down
Loading

0 comments on commit 7d9b7b9

Please sign in to comment.