fix(项目设置): 存储过程sql修改补充sql
--user=郭雨琦 存储过程sql修改补充sql fix(项目设置): 存储过程sql修改 --user=郭雨琦 存储过程sql修改
This commit is contained in:
parent
6f67696291
commit
01b7461b8e
|
@ -70,19 +70,21 @@ CREATE PROCEDURE test_personal()
|
||||||
|
|
||||||
#打开游标
|
#打开游标
|
||||||
OPEN group_curosr;
|
OPEN group_curosr;
|
||||||
|
|
||||||
#遍历游标
|
|
||||||
REPEAT
|
|
||||||
#获取当前游标指针记录,取出值赋给自定义的变量
|
#获取当前游标指针记录,取出值赋给自定义的变量
|
||||||
FETCH group_curosr INTO groupId;
|
FETCH group_curosr INTO groupId;
|
||||||
#利用取到的值进行数据库的操作
|
#遍历游标
|
||||||
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
REPEAT
|
||||||
VALUES (uuid(), groupId, 'PERSONAL_INFORMATION:READ+EDIT', 'PERSONAL_INFORMATION'),
|
|
||||||
(uuid(), groupId, 'PERSONAL_INFORMATION:READ+THIRD_ACCOUNT', 'PERSONAL_INFORMATION'),
|
#利用取到的值进行数据库的操作
|
||||||
(uuid(), groupId, 'PERSONAL_INFORMATION:READ+API_KEYS', 'PERSONAL_INFORMATION'),
|
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
||||||
(uuid(), groupId, 'PERSONAL_INFORMATION:READ+EDIT_PASSWORD', 'PERSONAL_INFORMATION');
|
VALUES (uuid(), groupId, 'PERSONAL_INFORMATION:READ+EDIT', 'PERSONAL_INFORMATION'),
|
||||||
# 根据 end_flag 判断是否结束
|
(uuid(), groupId, 'PERSONAL_INFORMATION:READ+THIRD_ACCOUNT', 'PERSONAL_INFORMATION'),
|
||||||
UNTIL end_flag END REPEAT;
|
(uuid(), groupId, 'PERSONAL_INFORMATION:READ+API_KEYS', 'PERSONAL_INFORMATION'),
|
||||||
|
(uuid(), groupId, 'PERSONAL_INFORMATION:READ+EDIT_PASSWORD', 'PERSONAL_INFORMATION');
|
||||||
|
# 根据 end_flag 判断是否结束
|
||||||
|
# 将游标中的值再赋值给变量,供下次循环使用
|
||||||
|
FETCH group_curosr INTO groupId;
|
||||||
|
UNTIL end_flag END REPEAT;
|
||||||
|
|
||||||
#关闭游标
|
#关闭游标
|
||||||
close group_curosr;
|
close group_curosr;
|
||||||
|
@ -105,7 +107,7 @@ INSERT INTO test_case_issues (id, resource_id, issues_id, ref_id, ref_type)
|
||||||
INNER JOIN test_case_issues tci
|
INNER JOIN test_case_issues tci
|
||||||
ON tci.issues_id = i.id
|
ON tci.issues_id = i.id
|
||||||
INNER JOIN test_plan_test_case tptc
|
INNER JOIN test_plan_test_case tptc
|
||||||
ON tci.resource_id = tptc.case_id AND i.resource_id = tptc.plan_id
|
ON tci.resource_id = tptc.case_id AND i.resource_id = tptc.plan_id;
|
||||||
|
|
||||||
DELETE FROM test_case_issues WHERE id IN (
|
DELETE FROM test_case_issues WHERE id IN (
|
||||||
SELECT id FROM (
|
SELECT id FROM (
|
||||||
|
@ -116,7 +118,7 @@ DELETE FROM test_case_issues WHERE id IN (
|
||||||
INNER JOIN test_plan_test_case tptc
|
INNER JOIN test_plan_test_case tptc
|
||||||
ON tci.resource_id = tptc.case_id AND i.resource_id = tptc.plan_id
|
ON tci.resource_id = tptc.case_id AND i.resource_id = tptc.plan_id
|
||||||
) tmp
|
) tmp
|
||||||
)
|
);
|
||||||
|
|
||||||
|
|
||||||
DROP PROCEDURE IF EXISTS project_appl;
|
DROP PROCEDURE IF EXISTS project_appl;
|
||||||
|
@ -136,17 +138,17 @@ BEGIN
|
||||||
|
|
||||||
#打开游标
|
#打开游标
|
||||||
OPEN project_curosr;
|
OPEN project_curosr;
|
||||||
|
|
||||||
#遍历游标
|
|
||||||
REPEAT
|
|
||||||
#获取当前游标指针记录,取出值赋给自定义的变量
|
#获取当前游标指针记录,取出值赋给自定义的变量
|
||||||
FETCH project_curosr INTO projectId;
|
FETCH project_curosr INTO projectId;
|
||||||
#利用取到的值进行数据库的操作
|
#遍历游标
|
||||||
INSERT INTO project_application (project_id, type, share_report_expr)
|
REPEAT
|
||||||
VALUES (projectId, 'TRACK', '24H'),
|
#利用取到的值进行数据库的操作
|
||||||
(projectId, 'PERFORMANCE', '24H');
|
INSERT INTO project_application (project_id, type, share_report_expr)
|
||||||
# 根据 end_flag 判断是否结束
|
VALUES (projectId, 'TRACK', '24H'),
|
||||||
UNTIL end_flag END REPEAT;
|
(projectId, 'PERFORMANCE', '24H');
|
||||||
|
# 将游标中的值再赋值给变量,供下次循环使用
|
||||||
|
FETCH project_curosr INTO projectId;
|
||||||
|
UNTIL end_flag END REPEAT;
|
||||||
|
|
||||||
#关闭游标
|
#关闭游标
|
||||||
close project_curosr;
|
close project_curosr;
|
||||||
|
|
Loading…
Reference in New Issue