Browse Source
* processdefinition create/delete method * init * add relation parse * delete process_definition_jsonpull/3/MERGE
Simon
4 years ago
committed by
GitHub
5 changed files with 221 additions and 29 deletions
@ -0,0 +1,51 @@ |
|||||||
|
/* |
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||||
|
* contributor license agreements. See the NOTICE file distributed with |
||||||
|
* this work for additional information regarding copyright ownership. |
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||||
|
* (the "License"); you may not use this file except in compliance with |
||||||
|
* the License. You may obtain a copy of the License at |
||||||
|
* |
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
* |
||||||
|
* Unless required by applicable law or agreed to in writing, software |
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, |
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||||
|
* See the License for the specific language governing permissions and |
||||||
|
* limitations under the License. |
||||||
|
*/ |
||||||
|
|
||||||
|
package org.apache.dolphinscheduler.dao.mapper; |
||||||
|
|
||||||
|
import org.apache.dolphinscheduler.dao.entity.ProcessDefinitionLog; |
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||||
|
|
||||||
|
/** |
||||||
|
* process definition log mapper interface
|
||||||
|
*/ |
||||||
|
public interface ProcessDefinitionLogMapper extends BaseMapper<ProcessDefinitionLog> { |
||||||
|
|
||||||
|
/** |
||||||
|
* query process definition log by name |
||||||
|
* |
||||||
|
* @param projectCode projectCode |
||||||
|
* @param name process name |
||||||
|
* @return process definition log list |
||||||
|
*/ |
||||||
|
List<ProcessDefinitionLog> queryByDefinitionName(@Param("projectCode") Long projectCode, |
||||||
|
@Param("processDefinitionName") String name); |
||||||
|
|
||||||
|
/** |
||||||
|
* query process definition log list |
||||||
|
* |
||||||
|
* @param processDefinitionCode processDefinitionCode |
||||||
|
* @return process definition log list |
||||||
|
*/ |
||||||
|
List<ProcessDefinitionLog> queryByDefinitionCode(@Param("processDefinitionCode") long processDefinitionCode); |
||||||
|
|
||||||
|
} |
@ -0,0 +1,48 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||||
|
<!-- |
||||||
|
~ Licensed to the Apache Software Foundation (ASF) under one or more |
||||||
|
~ contributor license agreements. See the NOTICE file distributed with |
||||||
|
~ this work for additional information regarding copyright ownership. |
||||||
|
~ The ASF licenses this file to You under the Apache License, Version 2.0 |
||||||
|
~ (the "License"); you may not use this file except in compliance with |
||||||
|
~ the License. You may obtain a copy of the License at |
||||||
|
~ |
||||||
|
~ http://www.apache.org/licenses/LICENSE-2.0 |
||||||
|
~ |
||||||
|
~ Unless required by applicable law or agreed to in writing, software |
||||||
|
~ distributed under the License is distributed on an "AS IS" BASIS, |
||||||
|
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||||
|
~ See the License for the specific language governing permissions and |
||||||
|
~ limitations under the License. |
||||||
|
--> |
||||||
|
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
||||||
|
<mapper namespace="org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionLogMapper"> |
||||||
|
|
||||||
|
<sql id="baseSql"> |
||||||
|
pd.id, pd.code, pd.name, pd.version, pd.description, pd.project_code, |
||||||
|
pd.release_state, pd.user_id,pd.global_params, pd.flag, pd.locations, pd.connects, |
||||||
|
pd.warning_group_id, pd.timeout, pd.tenant_id,pd.operator, pd.operate_time, pd.create_time, |
||||||
|
pd.update_time, u.user_name,p.name as project_name |
||||||
|
</sql> |
||||||
|
|
||||||
|
<select id="queryByDefinitionName" resultType="org.apache.dolphinscheduler.dao.entity.ProcessDefinitionLog"> |
||||||
|
select |
||||||
|
<include refid="baseSql"/> |
||||||
|
from t_ds_process_definition_log pd |
||||||
|
JOIN t_ds_user u ON pd.user_id = u.id |
||||||
|
JOIN t_ds_project p ON pd.project_code = p.code |
||||||
|
WHERE p.code = #{projectCode} |
||||||
|
and pd.name = #{processDefinitionName} |
||||||
|
</select> |
||||||
|
|
||||||
|
<select id="queryByDefinitionCode" resultType="org.apache.dolphinscheduler.dao.entity.ProcessDefinitionLog"> |
||||||
|
select |
||||||
|
<include refid="baseSql"/> |
||||||
|
from t_ds_process_definition_log pd |
||||||
|
JOIN t_ds_user u ON pd.user_id = u.id |
||||||
|
JOIN t_ds_project p ON pd.project_code = p.code |
||||||
|
WHERE pd.code = #{processDefinitionCode} |
||||||
|
</select> |
||||||
|
|
||||||
|
</mapper> |
Loading…
Reference in new issue