normalcc01 commented on pull request #3742:
URL:
https://github.com/apache/incubator-dolphinscheduler/pull/3742#issuecomment-699800936
## PR的目的
- 该PR为工作流添加标签功能。 完成了controller, sercive,
mapper三层的代码,以便可以独立完成标签简单的CRUD。还有添加和删除工作流的标签,并根据标签查找工作流等功能。
## 简要变更日志
- 创建 `t_ds_process_definiton_tags` 表以存储标签信息,例如 `TagName` `project_id`
`user_id`。
创建 `t_ds_relation_process_tag` 表以存储 `Tag` 和 `ProcessDefinition` 之间的关系。
- 添加 `Tag` `ProcessTag` 类,`Tag` 和 `ProcessTag` 的 `controller` `sercive`
`mapper` `xml` 的代码。 为了实现标签的验证权限,将`project_id`
`user_id`字段添加到`t_ds_process_definiton_tags`表中,以模仿`ProcessDefinition`中的相似验证功能代码。
- `addProcessDefinitionTags` `deleteProcessDefinitionTags`
`queryProcessDefinitionByTagId`
在`ProcessDefinitionService`中添加了三个新方法,以实现工作流添加,删除标签以及基于标签查询工作流。
## 验证这次PR
增加了测试,可以验证如下:
- 添加 `TagControllerTest` `TagServiceTest` `TagMapperTest`.
- 添加 `ProcessTagMapperTest`.
- 添加 在`controller` `sercive`层的 `testAddProcessDefinitionTags`
`testDeleteProcessDefinitionTags` `testQueryProcessDefinitionByTagId.`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]