Commit 13e2aadc by guominglei

添加maven自动生成插件

parent 667e040b
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.byit</groupId>
<artifactId>byit-mybatis-plugin</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>byit-mybatis-plugin</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-core</artifactId>
<version>1.3.5</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
package com.byit.plugin;
import java.util.List;
import org.mybatis.generator.api.*;
import org.mybatis.generator.api.dom.java.Field;
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
import org.mybatis.generator.api.dom.java.JavaVisibility;
import org.mybatis.generator.api.dom.java.Method;
import org.mybatis.generator.api.dom.java.Parameter;
import org.mybatis.generator.api.dom.java.PrimitiveTypeWrapper;
import org.mybatis.generator.api.dom.java.TopLevelClass;
import org.mybatis.generator.api.dom.xml.Attribute;
import org.mybatis.generator.api.dom.xml.TextElement;
import org.mybatis.generator.api.dom.xml.XmlElement;
public class AddLimitOffsetPlugin extends PluginAdapter {
@Override
public boolean validate(List<String> warnings) {
return true;
}
@Override
public boolean modelExampleClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
PrimitiveTypeWrapper integerWrapper = FullyQualifiedJavaType.getIntInstance().getPrimitiveTypeWrapper();
Field limit = new Field();
limit.setName("limit");
limit.setVisibility(JavaVisibility.PRIVATE);
limit.setType(integerWrapper);
topLevelClass.addField(limit);
Method limitSet = new Method();
limitSet.setVisibility(JavaVisibility.PUBLIC);
limitSet.setName("setLimit");
limitSet.addParameter(new Parameter(integerWrapper, "limit"));
limitSet.addBodyLine("this.limit = limit;");
topLevelClass.addMethod(limitSet);
Method limitGet = new Method();
limitGet.setVisibility(JavaVisibility.PUBLIC);
limitGet.setReturnType(integerWrapper);
limitGet.setName("getLimit");
limitGet.addBodyLine("return limit;");
topLevelClass.addMethod(limitGet);
Field offset = new Field();
offset.setName("offset");
offset.setVisibility(JavaVisibility.PRIVATE);
offset.setType(integerWrapper);
topLevelClass.addField(offset);
Method offsetSet = new Method();
offsetSet.setVisibility(JavaVisibility.PUBLIC);
offsetSet.setName("setOffset");
offsetSet.addParameter(new Parameter(integerWrapper, "offset"));
offsetSet.addBodyLine("this.offset = offset;");
topLevelClass.addMethod(offsetSet);
Method offsetGet = new Method();
offsetGet.setVisibility(JavaVisibility.PUBLIC);
offsetGet.setReturnType(integerWrapper);
offsetGet.setName("getOffset");
offsetGet.addBodyLine("return offset;");
topLevelClass.addMethod(offsetGet);
return true;
}
@Override
public boolean sqlMapSelectByExampleWithoutBLOBsElementGenerated(XmlElement element,
IntrospectedTable introspectedTable) {
@SuppressWarnings("unused")
FullyQualifiedTable table = introspectedTable.getFullyQualifiedTable();
// XmlElement lastElement =
// (XmlElement)element.getElements().get(element.getElements().size());
XmlElement isNotNullElement = new XmlElement("if");
isNotNullElement.addAttribute(new Attribute("test", "limit != null"));
isNotNullElement.addElement(new TextElement("limit ${limit}"));
element.getElements().add(isNotNullElement);
isNotNullElement = new XmlElement("if");
isNotNullElement.addAttribute(new Attribute("test", "offset != null"));
isNotNullElement.addElement(new TextElement("offset ${offset}"));
element.getElements().add(isNotNullElement);
return true;
}
@Override
public boolean modelGetterMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, ModelClassType modelClassType) {
return false;
}
@Override
public boolean modelSetterMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, ModelClassType modelClassType) {
return false;
}
}
package com.byit.plugin;
import org.mybatis.generator.api.PluginAdapter;
import org.mybatis.generator.internal.util.StringUtility;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
/**
* @program: ddmp-parent
* @description:
* @author: guoqingming
* @create: 2019-03-07 22:55
**/
public class BasePlugin extends PluginAdapter {
protected static final Logger logger = LoggerFactory.getLogger(BasePlugin.class);
@Override
public boolean validate(List<String> warnings) {
// 插件使用前提是targetRuntime为MyBatis3
if (StringUtility.stringHasValue(getContext().getTargetRuntime()) && "MyBatis3".equalsIgnoreCase(getContext().getTargetRuntime()) == false) {
warnings.add("assembly mybatis:插件" + this.getClass().getTypeName() + "要求运行targetRuntime必须为MyBatis3!");
return false;
}
return true;
}
}
package com.byit.plugin;
import java.sql.Types;
import java.util.Properties;
import org.mybatis.generator.api.IntrospectedColumn;
import org.mybatis.generator.api.IntrospectedTable;
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
import org.mybatis.generator.api.dom.java.Method;
import org.mybatis.generator.api.dom.java.TopLevelClass;
import org.mybatis.generator.internal.types.JavaTypeResolverDefaultImpl;
public class DefaultJavaTypeResolverDefault extends JavaTypeResolverDefaultImpl {
public DefaultJavaTypeResolverDefault() {
super();
super.typeMap.put(Types.SMALLINT, new JdbcTypeInformation("SMALLINT", //$NON-NLS-1$
new FullyQualifiedJavaType(Integer.class.getName())));
super.typeMap.put(Types.TINYINT, new JdbcTypeInformation("TINYINT", //$NON-NLS-1$
new FullyQualifiedJavaType(Integer.class.getName())));
typeMap.put(Types.BIT, new JdbcTypeInformation("BIT", //$NON-NLS-1$
new FullyQualifiedJavaType(Integer.class.getName())));
}
@Override
public void addConfigurationProperties(Properties properties) {
super.addConfigurationProperties(properties);
}
}
package com.byit.plugin;
import java.util.List;
import org.mybatis.generator.api.GeneratedXmlFile;
import org.mybatis.generator.api.IntrospectedColumn;
import org.mybatis.generator.api.IntrospectedTable;
import org.mybatis.generator.api.PluginAdapter;
import org.mybatis.generator.api.dom.java.Interface;
import org.mybatis.generator.api.dom.java.Method;
import org.mybatis.generator.api.dom.java.TopLevelClass;
import org.mybatis.generator.config.Context;
import org.mybatis.generator.config.TableConfiguration;
public class DefaultNamePlugin extends PluginAdapter {
@Override
public boolean validate(List<String> warnings) {
return true;
}
private void defaultRename(IntrospectedTable introspectedTable) {
introspectedTable.setSelectByPrimaryKeyStatementId("getById");
introspectedTable.setDeleteByPrimaryKeyStatementId("deleteById");
introspectedTable.setUpdateByPrimaryKeyStatementId("updateById");
introspectedTable.setUpdateByPrimaryKeySelectiveStatementId("updateByIdSelective");
}
/**
* int deleteByPrimaryKey(Long id);
*
* int insert(UserRegister record);
*
* int insertSelective(UserRegister record);
*
* UserRegister selectByPrimaryKey(Long id);
*
* int updateByPrimaryKeySelective(UserRegister record);
*
* int updateByPrimaryKey(UserRegister record);
*/
@Override
public boolean clientGenerated(Interface interfaze, TopLevelClass topLevelClass,
IntrospectedTable introspectedTable) {
defaultRename(introspectedTable);
for (Method method : interfaze.getMethods()) {
String methodName = method.getName();
if (methodName.contains("PrimaryKey")) {
method.setName(methodName.replace("PrimaryKey", "Id"));
}
methodName = method.getName();
if (methodName.contains("select")) {
method.setName(methodName.replace("select", "get"));
}
}
return true;
}
@Override
public boolean sqlMapGenerated(GeneratedXmlFile sqlMap, IntrospectedTable introspectedTable) {
defaultRename(introspectedTable);
return true;
}
@Override
public void setContext(Context context) {
List<TableConfiguration> list = context.getTableConfigurations();
for (TableConfiguration tableConfiguration : list) {
tableConfiguration.setCountByExampleStatementEnabled(false);
tableConfiguration.setDeleteByExampleStatementEnabled(false);
tableConfiguration.setSelectByExampleStatementEnabled(false);
tableConfiguration.setUpdateByExampleStatementEnabled(false);
}
super.setContext(context);
}
@Override
public boolean modelGetterMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, ModelClassType modelClassType) {
return false;
}
@Override
public boolean modelSetterMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, ModelClassType modelClassType) {
return false;
}
}
package com.byit.plugin;
import java.util.List;
import org.mybatis.generator.api.IntrospectedColumn;
import org.mybatis.generator.api.IntrospectedTable;
import org.mybatis.generator.api.PluginAdapter;
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
import org.mybatis.generator.api.dom.java.Interface;
import org.mybatis.generator.api.dom.java.Method;
import org.mybatis.generator.api.dom.java.Parameter;
import org.mybatis.generator.api.dom.java.TopLevelClass;
import org.mybatis.generator.api.dom.xml.Attribute;
import org.mybatis.generator.api.dom.xml.Document;
import org.mybatis.generator.api.dom.xml.TextElement;
import org.mybatis.generator.api.dom.xml.XmlElement;
public class DeleteLogicByIdsPlugin extends PluginAdapter {
/**
* {@inheritDoc}
*/
@Override
public boolean validate(List<String> warnings) {
return true;
}
/**
* {@inheritDoc}
*/
@Override
public boolean clientSelectByExampleWithBLOBsMethodGenerated(Method method,
Interface interfaze, IntrospectedTable introspectedTable) {
interfaze.addMethod(generateDeleteLogicByIds(method,
introspectedTable));
return true;
}
/**
* {@inheritDoc}
*/
@Override
public boolean clientSelectByExampleWithoutBLOBsMethodGenerated(
Method method, Interface interfaze,
IntrospectedTable introspectedTable) {
interfaze.addMethod(generateDeleteLogicByIds(method,
introspectedTable));
return true;
}
/**
* {@inheritDoc}
*/
@Override
public boolean clientSelectByExampleWithBLOBsMethodGenerated(Method method,
TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
topLevelClass.addMethod(generateDeleteLogicByIds(method,
introspectedTable));
return true;
}
/**
* {@inheritDoc}
*/
@Override
public boolean clientSelectByExampleWithoutBLOBsMethodGenerated(
Method method, TopLevelClass topLevelClass,
IntrospectedTable introspectedTable) {
topLevelClass.addMethod(generateDeleteLogicByIds(method,
introspectedTable));
return true;
}
@Override
public boolean sqlMapDocumentGenerated(Document document, IntrospectedTable introspectedTable) {
String tableName = introspectedTable.getAliasedFullyQualifiedTableNameAtRuntime();//数据库表名
XmlElement parentElement = document.getRootElement();
// 产生分页语句前半部分
XmlElement deleteLogicByIdsElement = new XmlElement("update");
deleteLogicByIdsElement.addAttribute(new Attribute("id", "deleteLogicByIds"));
deleteLogicByIdsElement.addElement(
new TextElement(
"update " + tableName + " set deleteFlag = #{deleteFlag,jdbcType=INTEGER} where id in "
+ " <foreach item=\"item\" index=\"index\" collection=\"ids\" open=\"(\" separator=\",\" close=\")\">#{item}</foreach> "
));
parentElement.addElement(deleteLogicByIdsElement);
return super.sqlMapDocumentGenerated(document, introspectedTable);
}
private Method generateDeleteLogicByIds(Method method, IntrospectedTable introspectedTable) {
Method m = new Method("deleteLogicByIds");
m.setVisibility(method.getVisibility());
m.setReturnType(FullyQualifiedJavaType.getIntInstance());
m.addParameter(new Parameter(FullyQualifiedJavaType.getIntInstance(), "deleteFlag", "@Param(\"deleteFlag\")"));
m.addParameter(new Parameter(new FullyQualifiedJavaType("Integer[]"), "ids", "@Param(\"ids\")"));
context.getCommentGenerator().addGeneralMethodComment(m,
introspectedTable);
return m;
}
@Override
public boolean modelGetterMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, ModelClassType modelClassType) {
return false;
}
@Override
public boolean modelSetterMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, ModelClassType modelClassType) {
return false;
}
}
package com.byit.plugin;
import com.byit.plugin.utils.FormatTools;
import com.byit.plugin.utils.JavaElementGeneratorTools;
import com.byit.plugin.utils.XmlElementGeneratorTools;
import org.mybatis.generator.api.IntrospectedColumn;
import org.mybatis.generator.api.IntrospectedTable;
import org.mybatis.generator.api.dom.java.*;
import org.mybatis.generator.api.dom.xml.*;
import org.mybatis.generator.codegen.ibatis2.sqlmap.elements.AbstractXmlElementGenerator;
import org.mybatis.generator.codegen.mybatis3.ListUtilities;
import org.mybatis.generator.config.GeneratedKey;
import java.util.List;
/**
* @program: ddmp-parent
* @description:
* @author: guoqingming
* @create: 2019-03-07 22:53
**/
public class InsertIgnorePlugin extends BasePlugin{
public InsertIgnorePlugin() {
}
public static final String METHOD_INSERT_IGNORE = "insertIgnore"; // 方法名
@Override
public boolean validate(List<String> warnings) {
// 该插件只支持MYSQL
if ("com.mysql.jdbc.Driver".equalsIgnoreCase(this.getContext().getJdbcConnectionConfiguration().getDriverClass()) == false
&& "com.mysql.cj.jdbc.Driver".equalsIgnoreCase(this.getContext().getJdbcConnectionConfiguration().getDriverClass()) == false) {
warnings.add("assembly mybatis:插件" + this.getClass().getTypeName() + "只支持MySQL数据库!");
return false;
}
return super.validate(warnings);
}
@Override
public boolean clientGenerated(Interface interfaze, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
Method mUpsert = JavaElementGeneratorTools.generateMethod(
METHOD_INSERT_IGNORE,
JavaVisibility.DEFAULT,
FullyQualifiedJavaType.getIntInstance(),
new Parameter(JavaElementGeneratorTools.getModelTypeWithoutBLOBs(introspectedTable), "record")
);
// interface 增加方法
FormatTools.addMethodWithBestPosition(interfaze, mUpsert);
return super.clientGenerated(interfaze, topLevelClass, introspectedTable);
}
@Override
public boolean sqlMapDocumentGenerated(Document document, IntrospectedTable introspectedTable) {
XmlElement insertIgnoreElement = new XmlElement("insert");
//添加ID
insertIgnoreElement.addAttribute(new Attribute("id", METHOD_INSERT_IGNORE));
// 参数类型
FullyQualifiedJavaType parameterType = JavaElementGeneratorTools.getModelTypeWithoutBLOBs(introspectedTable);
insertIgnoreElement.addAttribute(new Attribute("parameterType", //$NON-NLS-1$
parameterType.getFullyQualifiedName()));
// insertIgnoreElement.addAttribute(new Attribute("parameterType", "map"));
GeneratedKey gk = introspectedTable.getGeneratedKey();
if (gk != null) {
IntrospectedColumn introspectedColumn = introspectedTable
.getColumn(gk.getColumn());
// if the column is null, then it's a configuration error. The
// warning has already been reported
if (introspectedColumn != null) {
if (gk.isJdbcStandard()) {
insertIgnoreElement.addAttribute(new Attribute(
"useGeneratedKeys", "true")); //$NON-NLS-1$ //$NON-NLS-2$
insertIgnoreElement.addAttribute(new Attribute(
"keyProperty", introspectedColumn.getJavaProperty())); //$NON-NLS-1$
insertIgnoreElement.addAttribute(new Attribute(
"keyColumn", introspectedColumn.getActualColumnName())); //$NON-NLS-1$
} else {
insertIgnoreElement.addElement(new XMLElementGenerator().getSelectKeyPublic(introspectedColumn, gk));
}
}
}
//insert
insertIgnoreElement.addElement(new TextElement("insert ignore into " + introspectedTable.getFullyQualifiedTableNameAtRuntime()));
for (Element element : XmlElementGeneratorTools.generateKeys(ListUtilities.removeIdentityAndGeneratedAlwaysColumns(introspectedTable.getAllColumns()), true)) {
insertIgnoreElement.addElement(element);
}
insertIgnoreElement.addElement(new TextElement("values"));
for (Element element : XmlElementGeneratorTools.generateValues(ListUtilities.removeIdentityAndGeneratedAlwaysColumns(introspectedTable.getAllColumns()), "")) {
insertIgnoreElement.addElement(element);
}
document.getRootElement().addElement(insertIgnoreElement);
return super.sqlMapDocumentGenerated(document, introspectedTable);
}
private static class XMLElementGenerator extends AbstractXmlElementGenerator {
public XmlElement getSelectKeyPublic(IntrospectedColumn introspectedColumn,
GeneratedKey generatedKey) {
return this.getSelectKey(introspectedColumn, generatedKey);
}
@Override
public void addElements(XmlElement parentElement) {
}
}
}
package com.byit.plugin;
import java.util.ArrayList;
import java.util.List;
import org.mybatis.generator.api.IntrospectedColumn;
import org.mybatis.generator.api.IntrospectedTable;
import org.mybatis.generator.api.PluginAdapter;
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
import org.mybatis.generator.api.dom.java.Method;
import org.mybatis.generator.api.dom.java.TopLevelClass;
public class LombokAnnotationPlugin extends PluginAdapter {
@Override
public boolean validate(List<String> list) {
return false;
}
@Override
public boolean modelBaseRecordClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
topLevelClass.addAnnotation("@Data");
topLevelClass.addImportedType(new FullyQualifiedJavaType("lombok.Data"));
List<Method> methods = topLevelClass.getMethods();
List<Method> remove = new ArrayList<Method>();
for (Method method : methods) {
if (method.getBodyLines().size() < 2) {
remove.add(method);
}
}
methods.removeAll(remove);
return true;
}
@Override
public boolean modelGetterMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, ModelClassType modelClassType) {
return false;
}
@Override
public boolean modelSetterMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, ModelClassType modelClassType) {
return false;
}
}
\ No newline at end of file
package com.byit.plugin;
import java.util.List;
import org.mybatis.generator.api.CommentGenerator;
import org.mybatis.generator.api.IntrospectedColumn;
import org.mybatis.generator.api.IntrospectedTable;
import org.mybatis.generator.api.PluginAdapter;
import org.mybatis.generator.api.dom.java.Field;
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
import org.mybatis.generator.api.dom.java.JavaVisibility;
import org.mybatis.generator.api.dom.java.Method;
import org.mybatis.generator.api.dom.java.Parameter;
import org.mybatis.generator.api.dom.java.TopLevelClass;
import org.mybatis.generator.api.dom.xml.Attribute;
import org.mybatis.generator.api.dom.xml.TextElement;
import org.mybatis.generator.api.dom.xml.XmlElement;
public class MySQLPaginationPlugin extends PluginAdapter
{
@Override
public boolean modelExampleClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
{
// add field, getter, setter for limit clause
addPage(topLevelClass, introspectedTable, "page");
return super.modelExampleClassGenerated(topLevelClass, introspectedTable);
}
@Override
public boolean sqlMapSelectByExampleWithoutBLOBsElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
{
XmlElement page = new XmlElement("if");
page.addAttribute(new Attribute("test", "page != null"));
page.addElement(new TextElement("limit #{page.begin} , #{page.length}"));
element.addElement(page);
return super.sqlMapUpdateByExampleWithoutBLOBsElementGenerated(element, introspectedTable);
}
/**
* @param topLevelClass
* @param introspectedTable
* @param name
*/
private void addPage(TopLevelClass topLevelClass, IntrospectedTable introspectedTable, String name)
{
topLevelClass.addImportedType(new FullyQualifiedJavaType("net.javaw.mybatis.generator.Page"));
CommentGenerator commentGenerator = context.getCommentGenerator();
Field field = new Field();
field.setVisibility(JavaVisibility.PROTECTED);
field.setType(new FullyQualifiedJavaType("net.javaw.mybatis.generator.Page"));
field.setName(name);
commentGenerator.addFieldComment(field, introspectedTable);
topLevelClass.addField(field);
char c = name.charAt(0);
String camel = Character.toUpperCase(c) + name.substring(1);
Method method = new Method();
method.setVisibility(JavaVisibility.PUBLIC);
method.setName("set" + camel);
method.addParameter(new Parameter(new FullyQualifiedJavaType("net.javaw.mybatis.generator.Page"), name));
method.addBodyLine("this." + name + "=" + name + ";");
commentGenerator.addGeneralMethodComment(method, introspectedTable);
topLevelClass.addMethod(method);
method = new Method();
method.setVisibility(JavaVisibility.PUBLIC);
method.setReturnType(new FullyQualifiedJavaType("net.javaw.mybatis.generator.Page"));
method.setName("get" + camel);
method.addBodyLine("return " + name + ";");
commentGenerator.addGeneralMethodComment(method, introspectedTable);
topLevelClass.addMethod(method);
}
/**
* This plugin is always valid - no properties are required
*/
@Override
public boolean validate(List<String> warnings)
{
return true;
}
@Override
public boolean modelGetterMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, ModelClassType modelClassType) {
return false;
}
@Override
public boolean modelSetterMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, ModelClassType modelClassType) {
return false;
}
}
package com.byit.plugin;
import static org.mybatis.generator.internal.util.StringUtility.isTrue;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Properties;
import org.mybatis.generator.api.CommentGenerator;
import org.mybatis.generator.api.IntrospectedColumn;
import org.mybatis.generator.api.IntrospectedTable;
import org.mybatis.generator.api.PluginAdapter;
import org.mybatis.generator.api.dom.java.*;
import org.mybatis.generator.api.dom.xml.TextElement;
import org.mybatis.generator.api.dom.xml.XmlElement;
import org.mybatis.generator.config.MergeConstants;
import org.mybatis.generator.config.PropertyRegistry;
import org.mybatis.generator.internal.util.StringUtility;
public class NormalCommentGenerator extends PluginAdapter implements CommentGenerator {
@Override
public boolean validate(List<String> warnings) {
return false;
}
/** The properties. */
private Properties properties;
/** The suppress date. */
private boolean suppressDate;
/** The suppress all comments. */
private boolean suppressAllComments;
/**
* The addition of table remark's comments.
* If suppressAllComments is true, this option is ignored
*/
private boolean addRemarkComments;
private SimpleDateFormat dateFormat;
/**
* Instantiates a new default comment generator.
*/
public NormalCommentGenerator() {
super();
properties = new Properties();
suppressDate = false;
suppressAllComments = false;
addRemarkComments = false;
}
/* (non-Javadoc)
* @see org.mybatis.generator.api.CommentGenerator#addJavaFileComment(org.mybatis.generator.api.dom.java.CompilationUnit)
*/
@Override
public void addJavaFileComment(CompilationUnit compilationUnit) {
// add no file level comments by default
}
/**
* Adds a suitable comment to warn users that the element was generated, and
* when it was generated.
* xml格式生成
*
* @param xmlElement
* the xml element
*/
@Override
public void addComment(XmlElement xmlElement) {
if (suppressAllComments) {
return;
}
StringBuilder sb = new StringBuilder();
sb.append("<!-- generated "); //$NON-NLS-1$
sb.append(MergeConstants.NEW_ELEMENT_TAG);
String s = getDateString();
if (s != null) {
sb.append(" date: "); //$NON-NLS-1$
sb.append(s);
}
sb.append(" -->");
xmlElement.addElement(new TextElement(sb.toString()));
}
/* (non-Javadoc)
* @see org.mybatis.generator.api.CommentGenerator#addRootComment(org.mybatis.generator.api.dom.xml.XmlElement)
*/
@Override
public void addRootComment(XmlElement rootElement) {
// add no document level comments by default
}
/* (non-Javadoc)
* @see org.mybatis.generator.api.CommentGenerator#addConfigurationProperties(java.utils.Properties)
*/
@Override
public void addConfigurationProperties(Properties properties) {
this.properties.putAll(properties);
suppressDate = isTrue(properties.getProperty(PropertyRegistry.COMMENT_GENERATOR_SUPPRESS_DATE));
suppressAllComments = isTrue(properties.getProperty(PropertyRegistry.COMMENT_GENERATOR_SUPPRESS_ALL_COMMENTS));
addRemarkComments = isTrue(properties.getProperty(PropertyRegistry.COMMENT_GENERATOR_ADD_REMARK_COMMENTS));
String dateFormatString = properties.getProperty(PropertyRegistry.COMMENT_GENERATOR_DATE_FORMAT);
if (StringUtility.stringHasValue(dateFormatString)) {
dateFormat = new SimpleDateFormat(dateFormatString);
}
}
/**
* This method adds the custom javadoc tag for. You may do nothing if you do
* not wish to include the Javadoc tag -
* however, if you do not include the Javadoc tag then the Java merge
* capability of the eclipse plugin will break.
*
* @param javaElement
* the java element
* @param markAsDoNotDelete
* the mark as do not delete
*/
protected void addJavadocTag(JavaElement javaElement, boolean markAsDoNotDelete) {
javaElement.addJavaDocLine(" *"); //$NON-NLS-1$
StringBuilder sb = new StringBuilder();
sb.append(" * "); //$NON-NLS-1$
sb.append(MergeConstants.NEW_ELEMENT_TAG);
if (markAsDoNotDelete) {
sb.append(" for merge"); //$NON-NLS-1$
}
String s = getDateString();
if (s != null) {
sb.append(' ');
sb.append(s);
}
javaElement.addJavaDocLine(sb.toString());
}
/**
* This method returns a formated date string to include in the Javadoc tag
* and XML comments. You may return null if you do not want the date in
* these documentation elements.
*
* @return a string representing the current timestamp, or null
*/
protected String getDateString() {
if (suppressDate) {
return null;
} else if (dateFormat != null) {
return dateFormat.format(new Date());
} else {
return new Date().toString();
}
}
/* (non-Javadoc)
* @see org.mybatis.generator.api.CommentGenerator#addClassComment(org.mybatis.generator.api.dom.java.InnerClass, org.mybatis.generator.api.IntrospectedTable)
*/
@Override
public void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable) {
if (suppressAllComments) {
return;
}
innerClass.addJavaDocLine("/**"); //$NON-NLS-1$
innerClass.addJavaDocLine(" * "); //$NON-NLS-1$
//addJavadocTag(innerClass, false);
innerClass.addJavaDocLine(" */"); //$NON-NLS-1$
}
/* (non-Javadoc)
* @see org.mybatis.generator.api.CommentGenerator#addTopLevelClassComment(org.mybatis.generator.api.dom.java.TopLevelClass, org.mybatis.generator.api.IntrospectedTable)
*/
@Override
public void addModelClassComment(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
if (suppressAllComments || !addRemarkComments) {
return;
}
StringBuilder sb = new StringBuilder();
topLevelClass.addJavaDocLine("/**"); //$NON-NLS-1$
String remarks = introspectedTable.getRemarks();
if (addRemarkComments && StringUtility.stringHasValue(remarks)) {
String[] remarkLines = remarks.split(System.getProperty("line.separator")); //$NON-NLS-1$
for (String remarkLine : remarkLines) {
topLevelClass.addJavaDocLine(" * " + remarkLine); //$NON-NLS-1$
}
}
sb.append(" * "); //$NON-NLS-1$
topLevelClass.addJavaDocLine(sb.toString());
//addJavadocTag(topLevelClass, true);
topLevelClass.addJavaDocLine(" */"); //$NON-NLS-1$
topLevelClass.addAnnotation("@ApiModel");
topLevelClass.addImportedType(new FullyQualifiedJavaType("io.swagger.annotations.ApiModel"));
topLevelClass.addImportedType(new FullyQualifiedJavaType("io.swagger.annotations.ApiModelProperty"));
topLevelClass.addAnnotation("@Data");
topLevelClass.addImportedType(new FullyQualifiedJavaType("lombok.Data"));
List<Method> methods = topLevelClass.getMethods();
List<Method> remove = new ArrayList<Method>();
for (Method method : methods) {
if (method.getBodyLines().size() < 2) {
remove.add(method);
}
}
methods.removeAll(remove);
}
/* (non-Javadoc)
* @see org.mybatis.generator.api.CommentGenerator#addEnumComment(org.mybatis.generator.api.dom.java.InnerEnum, org.mybatis.generator.api.IntrospectedTable)
*/
@Override
public void addEnumComment(InnerEnum innerEnum, IntrospectedTable introspectedTable) {
if (suppressAllComments) {
return;
}
StringBuilder sb = new StringBuilder();
innerEnum.addJavaDocLine("/**"); //$NON-NLS-1$
innerEnum.addJavaDocLine(" * This enum was generated by MyBatis Generator."); //$NON-NLS-1$
sb.append(" * This enum corresponds to the database table "); //$NON-NLS-1$
sb.append(introspectedTable.getFullyQualifiedTable());
innerEnum.addJavaDocLine(sb.toString());
//addJavadocTag(innerEnum, false);
innerEnum.addJavaDocLine(" */"); //$NON-NLS-1$
}
/* (non-Javadoc)
* @see org.mybatis.generator.api.CommentGenerator#addFieldComment(org.mybatis.generator.api.dom.java.Field, org.mybatis.generator.api.IntrospectedTable, org.mybatis.generator.api.IntrospectedColumn)
*/
@Override
public void addFieldComment(Field field, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn) {
if (suppressAllComments) {
return;
}
String remarks = introspectedColumn.getRemarks();
field.addJavaDocLine("/**"); //$NON-NLS-1$
if (addRemarkComments && StringUtility.stringHasValue(remarks)) {
String[] remarkLines = remarks.split(System.getProperty("line.separator")); //$NON-NLS-1$
for (String remarkLine : remarkLines) {
field.addJavaDocLine(" * " + remarkLine); //$NON-NLS-1$
}
}
//addJavadocTag(field, false);
field.addJavaDocLine(" */"); //$NON-NLS-1$
String annotation = "@ApiModelProperty(\""+remarks+ "\")";
if(annotation != null && !"".equals(annotation)){
field.addAnnotation(annotation);
}
}
/* (non-Javadoc)
* @see org.mybatis.generator.api.CommentGenerator#addFieldComment(org.mybatis.generator.api.dom.java.Field, org.mybatis.generator.api.IntrospectedTable)
*/
@Override
public void addFieldComment(Field field, IntrospectedTable introspectedTable) {
if (suppressAllComments) {
return;
}
field.addJavaDocLine("/**"); //$NON-NLS-1$
//addJavadocTag(field, false);
field.addJavaDocLine(" */"); //$NON-NLS-1$
}
/* (non-Javadoc)
* @see org.mybatis.generator.api.CommentGenerator#addGeneralMethodComment(org.mybatis.generator.api.dom.java.Method, org.mybatis.generator.api.IntrospectedTable)
*/
@Override
public void addGeneralMethodComment(Method method, IntrospectedTable introspectedTable) {
if (suppressAllComments) {
return;
}
// method.addJavaDocLine("/**"); //$NON-NLS-1$
// addJavadocTag(method, false);
//
// method.addJavaDocLine(" */"); //$NON-NLS-1$
}
/* (non-Javadoc)
* @see org.mybatis.generator.api.CommentGenerator#addGetterComment(org.mybatis.generator.api.dom.java.Method, org.mybatis.generator.api.IntrospectedTable, org.mybatis.generator.api.IntrospectedColumn)
*/
@Override
public void addGetterComment(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn) {
if (suppressAllComments) {
return;
}
// method.addJavaDocLine("/**"); //$NON-NLS-1$
//
// addJavadocTag(method, false);
//
// method.addJavaDocLine(" */"); //$NON-NLS-1$
}
/* (non-Javadoc)
* @see org.mybatis.generator.api.CommentGenerator#addSetterComment(org.mybatis.generator.api.dom.java.Method, org.mybatis.generator.api.IntrospectedTable, org.mybatis.generator.api.IntrospectedColumn)
*/
@Override
public void addSetterComment(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn) {
if (suppressAllComments) {
return;
}
// method.addJavaDocLine("/**"); //$NON-NLS-1$
//
// addJavadocTag(method, false);
//
// method.addJavaDocLine(" */"); //$NON-NLS-1$
}
/* (non-Javadoc)
* @see org.mybatis.generator.api.CommentGenerator#addClassComment(org.mybatis.generator.api.dom.java.InnerClass, org.mybatis.generator.api.IntrospectedTable, boolean)
*/
@Override
public void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable, boolean markAsDoNotDelete) {
if (suppressAllComments) {
return;
}
StringBuilder sb = new StringBuilder();
innerClass.addJavaDocLine("/**"); //$NON-NLS-1$
//innerClass.addJavaDocLine(" * "); //$NON-NLS-1$
//addJavadocTag(innerClass, markAsDoNotDelete);
innerClass.addJavaDocLine(" */"); //$NON-NLS-1$
}
@Override
public boolean modelBaseRecordClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
List<Method> methods = topLevelClass.getMethods();
List<Method> remove = new ArrayList<Method>();
for (Method method : methods) {
if (method.getBodyLines().size() < 2) {
remove.add(method);
}
}
methods.removeAll(remove);
return true;
}
@Override
public boolean modelGetterMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, ModelClassType modelClassType) {
return false;
}
@Override
public boolean modelSetterMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, ModelClassType modelClassType) {
return false;
}
}
package com.byit.plugin.utils;
import org.mybatis.generator.api.CommentGenerator;
import org.mybatis.generator.api.IntrospectedTable;
import org.mybatis.generator.api.dom.java.*;
import org.mybatis.generator.api.dom.xml.Attribute;
import org.mybatis.generator.api.dom.xml.Element;
import org.mybatis.generator.api.dom.xml.TextElement;
import org.mybatis.generator.api.dom.xml.XmlElement;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
/**
* @program: ddmp-parent
* @description:
* @author: guoqingming
* @create: 2019-03-07 23:02
**/
public class FormatTools {
/**
* 在最佳位置添加方法
* @param innerClass
* @param method
*/
public static void addMethodWithBestPosition(InnerClass innerClass, Method method) {
addMethodWithBestPosition(method, innerClass.getMethods());
}
/**
* 在最佳位置添加方法
* @param interfacz
* @param method
*/
public static void addMethodWithBestPosition(Interface interfacz, Method method) {
// import
Set<FullyQualifiedJavaType> importTypes = new TreeSet<>();
// 返回
if (method.getReturnType() != null) {
importTypes.add(method.getReturnType());
importTypes.addAll(method.getReturnType().getTypeArguments());
}
// 参数 比较特殊的是ModelColumn生成的Column
for (Parameter parameter : method.getParameters()) {
boolean flag = true;
for (String annotation : parameter.getAnnotations()) {
if (annotation.startsWith("@Param")) {
importTypes.add(new FullyQualifiedJavaType("org.apache.ibatis.annotations.Param"));
if (annotation.matches(".*selective.*")) {
flag = false;
}
}
}
if (flag) {
importTypes.add(parameter.getType());
importTypes.addAll(parameter.getType().getTypeArguments());
}
}
interfacz.addImportedTypes(importTypes);
addMethodWithBestPosition(method, interfacz.getMethods());
}
/**
* 在最佳位置添加方法
* @param innerEnum
* @param method
*/
public static void addMethodWithBestPosition(InnerEnum innerEnum, Method method) {
addMethodWithBestPosition(method, innerEnum.getMethods());
}
/**
* 在最佳位置添加方法
* @param topLevelClass
* @param method
*/
public static void addMethodWithBestPosition(TopLevelClass topLevelClass, Method method) {
addMethodWithBestPosition(method, topLevelClass.getMethods());
}
/**
* 在最佳位置添加节点
* @param rootElement
* @param element
*/
public static void addElementWithBestPosition(XmlElement rootElement, XmlElement element) {
// sql 元素都放在sql后面
if (element.getName().equals("sql")) {
int index = 0;
for (Element ele : rootElement.getElements()) {
if (ele instanceof XmlElement && ((XmlElement) ele).getName().equals("sql")) {
index++;
}
}
rootElement.addElement(index, element);
} else {
// 根据id 排序
String id = getIdFromElement(element);
if (id == null) {
rootElement.addElement(element);
} else {
List<Element> elements = rootElement.getElements();
int index = -1;
for (int i = 0; i < elements.size(); i++) {
Element ele = elements.get(i);
if (ele instanceof XmlElement) {
String eleId = getIdFromElement((XmlElement) ele);
if (eleId != null) {
if (eleId.startsWith(id)) {
if (index == -1) {
index = i;
}
} else if (id.startsWith(eleId)) {
index = i + 1;
}
}
}
}
if (index == -1 || index >= elements.size()) {
rootElement.addElement(element);
} else {
elements.add(index, element);
}
}
}
}
/**
* 找出节点ID值
* @param element
* @return
*/
private static String getIdFromElement(XmlElement element) {
for (Attribute attribute : element.getAttributes()) {
if (attribute.getName().equals("id")) {
return attribute.getValue();
}
}
return null;
}
/**
* 获取最佳添加位置
* @param method
* @param methods
* @return
*/
private static void addMethodWithBestPosition(Method method, List<Method> methods) {
int index = -1;
for (int i = 0; i < methods.size(); i++) {
Method m = methods.get(i);
if (m.getName().equals(method.getName())) {
if (m.getParameters().size() <= method.getParameters().size()) {
index = i + 1;
} else {
index = i;
}
} else if (m.getName().startsWith(method.getName())) {
if (index == -1) {
index = i;
}
} else if (method.getName().startsWith(m.getName())) {
index = i + 1;
}
}
if (index == -1 || index >= methods.size()) {
methods.add(methods.size(), method);
} else {
methods.add(index, method);
}
}
/**
* 替换已有方法注释
* @param commentGenerator
* @param method
* @param introspectedTable
*/
public static void replaceGeneralMethodComment(CommentGenerator commentGenerator, Method method, IntrospectedTable introspectedTable) {
method.getJavaDocLines().clear();
commentGenerator.addGeneralMethodComment(method, introspectedTable);
}
/**
* 替换已有注释
* @param commentGenerator
* @param element
*/
public static void replaceComment(CommentGenerator commentGenerator, XmlElement element) {
Iterator<Element> elementIterator = element.getElements().iterator();
boolean flag = false;
while (elementIterator.hasNext()) {
Element ele = elementIterator.next();
if (ele instanceof TextElement && ((TextElement) ele).getContent().matches("<!--")) {
flag = true;
}
if (flag) {
elementIterator.remove();
}
if (ele instanceof TextElement && ((TextElement) ele).getContent().matches("-->")) {
flag = false;
}
}
XmlElement tmpEle = new XmlElement("tmp");
commentGenerator.addComment(tmpEle);
for (int i = tmpEle.getElements().size() - 1; i >= 0; i--) {
element.addElement(0, tmpEle.getElements().get(i));
}
}
}
package com.byit.plugin.utils;
import org.mybatis.generator.api.IntrospectedTable;
import org.mybatis.generator.api.dom.java.*;
import static org.mybatis.generator.internal.util.messages.Messages.getString;
public class JavaElementGeneratorTools {
/**
* 生成静态常量
* @param fieldName 常量名称
* @param javaType 类型
* @param initString 初始化字段
* @return
*/
public static Field generateStaticFinalField(String fieldName, FullyQualifiedJavaType javaType, String initString) {
Field field = new Field(fieldName, javaType);
field.setVisibility(JavaVisibility.PUBLIC);
field.setStatic(true);
field.setFinal(true);
if (initString != null) {
field.setInitializationString(initString);
}
return field;
}
/**
* 生成属性
* @param fieldName 常量名称
* @param visibility 可见性
* @param javaType 类型
* @param initString 初始化字段
* @return
*/
public static Field generateField(String fieldName, JavaVisibility visibility, FullyQualifiedJavaType javaType, String initString) {
Field field = new Field(fieldName, javaType);
field.setVisibility(visibility);
if (initString != null) {
field.setInitializationString(initString);
}
return field;
}
/**
* 生成方法
* @param methodName 方法名
* @param visibility 可见性
* @param returnType 返回值类型
* @param parameters 参数列表
* @return
*/
public static Method generateMethod(String methodName, JavaVisibility visibility, FullyQualifiedJavaType returnType, Parameter... parameters) {
Method method = new Method(methodName);
method.setVisibility(visibility);
method.setReturnType(returnType);
if (parameters != null) {
for (Parameter parameter : parameters) {
method.addParameter(parameter);
}
}
return method;
}
/**
* 生成方法实现体
* @param method 方法
* @param bodyLines 方法实现行
* @return
*/
public static Method generateMethodBody(Method method, String... bodyLines) {
if (bodyLines != null) {
for (String bodyLine : bodyLines) {
method.addBodyLine(bodyLine);
}
}
return method;
}
/**
* 生成Filed的Set方法
* @param field field
* @return
*/
public static Method generateSetterMethod(Field field) {
Method method = generateMethod(
"set" + field.getName().substring(0, 1).toUpperCase() + field.getName().substring(1),
JavaVisibility.PUBLIC,
null,
new Parameter(field.getType(), field.getName())
);
return generateMethodBody(method, "this." + field.getName() + " = " + field.getName() + ";");
}
/**
* 生成Filed的Get方法
* @param field field
* @return
*/
public static Method generateGetterMethod(Field field) {
Method method = generateMethod(
"get" + field.getName().substring(0, 1).toUpperCase() + field.getName().substring(1),
JavaVisibility.PUBLIC,
field.getType()
);
return generateMethodBody(method, "return this." + field.getName() + ";");
}
/**
* 获取Model没有BLOBs类时的类型
* @param introspectedTable
* @return
*/
public static FullyQualifiedJavaType getModelTypeWithoutBLOBs(IntrospectedTable introspectedTable) {
FullyQualifiedJavaType type;
if (introspectedTable.getRules().generateBaseRecordClass()) {
type = new FullyQualifiedJavaType(introspectedTable.getBaseRecordType());
} else if (introspectedTable.getRules().generatePrimaryKeyClass()) {
type = new FullyQualifiedJavaType(introspectedTable.getPrimaryKeyType());
} else {
throw new RuntimeException(getString("RuntimeError.12"));
}
return type;
}
/**
* 获取Model有BLOBs类时的类型
* @param introspectedTable
* @return
*/
public static FullyQualifiedJavaType getModelTypeWithBLOBs(IntrospectedTable introspectedTable) {
FullyQualifiedJavaType type;
if (introspectedTable.getRules().generateRecordWithBLOBsClass()) {
type = new FullyQualifiedJavaType(introspectedTable.getRecordWithBLOBsType());
} else {
// the blob fields must be rolled up into the base class
type = new FullyQualifiedJavaType(introspectedTable.getBaseRecordType());
}
return type;
}
}
package com.byit.plugin.utils;
import org.mybatis.generator.api.IntrospectedColumn;
import org.mybatis.generator.api.IntrospectedTable;
import org.mybatis.generator.api.dom.OutputUtilities;
import org.mybatis.generator.api.dom.xml.Attribute;
import org.mybatis.generator.api.dom.xml.Element;
import org.mybatis.generator.api.dom.xml.TextElement;
import org.mybatis.generator.api.dom.xml.XmlElement;
import org.mybatis.generator.codegen.mybatis3.MyBatis3FormattingUtilities;
import org.mybatis.generator.config.GeneratedKey;
import org.mybatis.generator.internal.util.StringUtility;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import static org.mybatis.generator.internal.util.StringUtility.stringHasValue;
public class XmlElementGeneratorTools {
public static Element getSelectKey(IntrospectedColumn introspectedColumn, GeneratedKey generatedKey) {
return getSelectKey(introspectedColumn, generatedKey, null);
}
public static Element getSelectKey(IntrospectedColumn introspectedColumn, GeneratedKey generatedKey, String prefix) {
String identityColumnType = introspectedColumn.getFullyQualifiedJavaType().getFullyQualifiedName();
XmlElement answer = new XmlElement("selectKey");
answer.addAttribute(new Attribute("resultType", identityColumnType));
answer.addAttribute(new Attribute("keyProperty", (prefix == null ? "" : prefix) + introspectedColumn.getJavaProperty()));
answer.addAttribute(new Attribute("order", generatedKey.getMyBatis3Order()));
answer.addElement(new TextElement(generatedKey.getRuntimeSqlStatement()));
return answer;
}
public static Element getBaseColumnListElement(IntrospectedTable introspectedTable) {
XmlElement answer = new XmlElement("include");
answer.addAttribute(new Attribute("refid", introspectedTable.getBaseColumnListId()));
return answer;
}
public static Element getBlobColumnListElement(IntrospectedTable introspectedTable) {
XmlElement answer = new XmlElement("include");
answer.addAttribute(new Attribute("refid", introspectedTable.getBlobColumnListId()));
return answer;
}
public static Element getExampleIncludeElement(IntrospectedTable introspectedTable) {
XmlElement ifElement = new XmlElement("if");
ifElement.addAttribute(new Attribute("test", "_parameter != null"));
XmlElement includeElement = new XmlElement("include");
includeElement.addAttribute(new Attribute("refid", introspectedTable.getExampleWhereClauseId()));
ifElement.addElement(includeElement);
return ifElement;
}
public static Element getUpdateByExampleIncludeElement(IntrospectedTable introspectedTable) {
XmlElement ifElement = new XmlElement("if");
ifElement.addAttribute(new Attribute("test", "_parameter != null"));
XmlElement includeElement = new XmlElement("include");
includeElement.addAttribute(new Attribute("refid", introspectedTable.getMyBatis3UpdateByExampleWhereClauseId()));
ifElement.addElement(includeElement);
return ifElement;
}
/**
* 使用JDBC的getGenereatedKeys方法获取主键并赋值到keyProperty设置的领域模型属性中。所以只支持MYSQL和SQLServer
* @param element
* @param introspectedTable
*/
public static void useGeneratedKeys(XmlElement element, IntrospectedTable introspectedTable) {
useGeneratedKeys(element, introspectedTable, null);
}
/**
* 使用JDBC的getGenereatedKeys方法获取主键并赋值到keyProperty设置的领域模型属性中。所以只支持MYSQL和SQLServer
* @param element
* @param introspectedTable
* @param prefix
*/
public static void useGeneratedKeys(XmlElement element, IntrospectedTable introspectedTable, String prefix) {
GeneratedKey gk = introspectedTable.getGeneratedKey();
if (gk != null) {
IntrospectedColumn introspectedColumn = safeGetColumn(introspectedTable, gk.getColumn());
// if the column is null, then it's a configuration error. The
// warning has already been reported
if (introspectedColumn != null) {
// 使用JDBC的getGenereatedKeys方法获取主键并赋值到keyProperty设置的领域模型属性中。所以只支持MYSQL和SQLServer
element.addAttribute(new Attribute("useGeneratedKeys", "true"));
element.addAttribute(new Attribute("keyProperty", (prefix == null ? "" : prefix) + introspectedColumn.getJavaProperty()));
element.addAttribute(new Attribute("keyColumn", introspectedColumn.getActualColumnName()));
}
}
}
public static IntrospectedColumn safeGetColumn(IntrospectedTable introspectedTable, String columnName) {
// columnName
columnName = columnName.trim();
// 过滤
String beginningDelimiter = introspectedTable.getContext().getBeginningDelimiter();
if (StringUtility.stringHasValue(beginningDelimiter)) {
columnName = columnName.replaceFirst("^" + beginningDelimiter, "");
}
String endingDelimiter = introspectedTable.getContext().getEndingDelimiter();
if (StringUtility.stringHasValue(endingDelimiter)) {
columnName = columnName.replaceFirst(endingDelimiter + "$", "");
}
return introspectedTable.getColumn(columnName);
}
/**
* 生成keys Ele
* @param columns
* @return
*/
public static List<Element> generateKeys(List<IntrospectedColumn> columns) {
return generateKeys(columns, false);
}
/**
* 生成keys Ele
* @param columns
* @param bracket
* @return
*/
public static List<Element> generateKeys(List<IntrospectedColumn> columns, boolean bracket) {
return generateCommColumns(columns, null, bracket, 1);
}
/**
* 生成keys Selective Ele
* @param columns
* @return
*/
public static XmlElement generateKeysSelective(List<IntrospectedColumn> columns) {
return generateKeysSelective(columns, null);
}
/**
* 生成keys Selective Ele
* @param columns
* @param prefix
* @return
*/
public static XmlElement generateKeysSelective(List<IntrospectedColumn> columns, String prefix) {
return generateKeysSelective(columns, prefix, true);
}
/**
* 生成keys Selective Ele
* @param columns
* @param prefix
* @param bracket
* @return
*/
public static XmlElement generateKeysSelective(List<IntrospectedColumn> columns, String prefix, boolean bracket) {
return generateCommColumnsSelective(columns, prefix, bracket, 1);
}
/**
* 生成values Ele
* @param columns
* @return
*/
public static List<Element> generateValues(List<IntrospectedColumn> columns) {
return generateValues(columns, null);
}
/**
* 生成values Ele
* @param columns
* @param prefix
* @return
*/
public static List<Element> generateValues(List<IntrospectedColumn> columns, String prefix) {
return generateValues(columns, prefix, true);
}
/**
* 生成values Ele
* @param columns
* @param prefix
* @param bracket
* @return
*/
public static List<Element> generateValues(List<IntrospectedColumn> columns, String prefix, boolean bracket) {
return generateCommColumns(columns, prefix, bracket, 2);
}
/**
* 生成values Selective Ele
* @param columns
* @return
*/
public static XmlElement generateValuesSelective(List<IntrospectedColumn> columns) {
return generateValuesSelective(columns, null);
}
/**
* 生成values Selective Ele
* @param columns
* @param prefix
* @return
*/
public static XmlElement generateValuesSelective(List<IntrospectedColumn> columns, String prefix) {
return generateValuesSelective(columns, prefix, true);
}
/**
* 生成values Selective Ele
* @param columns
* @param prefix
* @param bracket
* @return
*/
public static XmlElement generateValuesSelective(List<IntrospectedColumn> columns, String prefix, boolean bracket) {
return generateCommColumnsSelective(columns, prefix, bracket, 2);
}
/**
* 生成sets Ele
* @param columns
* @return
*/
public static List<Element> generateSets(List<IntrospectedColumn> columns) {
return generateSets(columns, null);
}
/**
* 生成sets Ele
* @param columns
* @param prefix
* @return
*/
public static List<Element> generateSets(List<IntrospectedColumn> columns, String prefix) {
return generateCommColumns(columns, prefix, false, 3);
}
/**
* 生成sets Selective Ele
* @param columns
* @return
*/
public static XmlElement generateSetsSelective(List<IntrospectedColumn> columns) {
return generateSetsSelective(columns, null);
}
/**
* 生成sets Selective Ele
* @param columns
* @param prefix
* @return
*/
public static XmlElement generateSetsSelective(List<IntrospectedColumn> columns, String prefix) {
return generateCommColumnsSelective(columns, prefix, false, 3);
}
/**
* 生成keys Ele (upsert)
* @param columns
* @param prefix
* @return
*/
public static List<Element> generateUpsertKeys(List<IntrospectedColumn> columns, String prefix) {
return generateCommColumns(columns, prefix, true, 1, true);
}
/**
* 生成values Ele (upsert)
* @param columns
* @param prefix
* @param bracket
* @return
*/
public static List<Element> generateUpsertValues(List<IntrospectedColumn> columns, String prefix, boolean bracket) {
return generateCommColumns(columns, prefix, bracket, 2, true);
}
/**
* 生成sets Ele (upsert)
* @param columns
* @param prefix
* @return
*/
public static List<Element> generateUpsertSets(List<IntrospectedColumn> columns, String prefix) {
return generateCommColumns(columns, prefix, false, 3, true);
}
/**
* 通用遍历columns
* @param columns
* @param prefix
* @param bracket
* @param type 1:key,2:value,3:set
* @return
*/
private static List<Element> generateCommColumns(List<IntrospectedColumn> columns, String prefix, boolean bracket, int type) {
return generateCommColumns(columns, prefix, bracket, type, false);
}
/**
* 通用遍历columns
* @param columns
* @param prefix
* @param bracket
* @param type 1:key,2:value,3:set
* @param upsert
* @return
*/
private static List<Element> generateCommColumns(List<IntrospectedColumn> columns, String prefix, boolean bracket, int type, boolean upsert) {
List<Element> list = new ArrayList<>();
// 只有upsert插件才会传入 IdentityAndGeneratedAlwaysColumn
if (upsert && hasIdentityAndGeneratedAlwaysColumns(columns)) {
XmlElement trimEle = generateTrim(bracket);
for (IntrospectedColumn introspectedColumn : columns) {
if (introspectedColumn.isGeneratedAlways() || introspectedColumn.isIdentity()) {
generateSelectiveToTrimEleTo(trimEle, introspectedColumn, prefix, type);
} else {
generateSelectiveCommColumnTo(trimEle, introspectedColumn, prefix, type);
}
}
return Arrays.asList(trimEle);
} else {
StringBuilder sb = new StringBuilder(bracket ? "(" : "");
Iterator<IntrospectedColumn> columnIterator = columns.iterator();
while (columnIterator.hasNext()) {
IntrospectedColumn introspectedColumn = columnIterator.next();
switch (type) {
case 3:
sb.append(MyBatis3FormattingUtilities.getEscapedColumnName(introspectedColumn));
sb.append(" = ");
sb.append(MyBatis3FormattingUtilities.getParameterClause(introspectedColumn, prefix));
break;
case 2:
sb.append(MyBatis3FormattingUtilities.getParameterClause(introspectedColumn, prefix));
break;
case 1:
sb.append(MyBatis3FormattingUtilities.getEscapedColumnName(introspectedColumn));
break;
}
if (columnIterator.hasNext()) {
sb.append(", ");
}
// 保持和官方一致 80 进行换行
if (type == 1 || type == 2) {
if (sb.length() > 80) {
list.add(new TextElement(sb.toString()));
sb.setLength(0);
OutputUtilities.xmlIndent(sb, 1);
}
} else {
list.add(new TextElement(sb.toString()));
sb.setLength(0);
}
}
if (sb.length() > 0 || bracket) {
list.add(new TextElement(sb.append(bracket ? ")" : "").toString()));
}
return list;
}
}
/**
* 通用遍历columns
* @param columns
* @param prefix
* @param bracket
* @param type 1:key,2:value,3:set
* @return
*/
private static XmlElement generateCommColumnsSelective(List<IntrospectedColumn> columns, String prefix, boolean bracket, int type) {
XmlElement trimEle = generateTrim(bracket);
for (IntrospectedColumn introspectedColumn : columns) {
generateSelectiveToTrimEleTo(trimEle, introspectedColumn, prefix, type);
}
return trimEle;
}
/**
* trim 节点
* @param bracket
* @return
*/
private static XmlElement generateTrim(boolean bracket) {
XmlElement trimEle = new XmlElement("trim");
if (bracket) {
trimEle.addAttribute(new Attribute("prefix", "("));
trimEle.addAttribute(new Attribute("suffix", ")"));
trimEle.addAttribute(new Attribute("suffixOverrides", ","));
} else {
trimEle.addAttribute(new Attribute("suffixOverrides", ","));
}
return trimEle;
}
/**
* 生成选择列到trim 节点
* @param trimEle
* @param introspectedColumn
* @param prefix
* @param type 1:key,2:value,3:set
*/
private static void generateSelectiveToTrimEleTo(XmlElement trimEle, IntrospectedColumn introspectedColumn, String prefix, int type) {
if (type != 3 && (introspectedColumn.isSequenceColumn() || introspectedColumn.getFullyQualifiedJavaType().isPrimitive())) {
// if it is a sequence column, it is not optional
// This is required for MyBatis3 because MyBatis3 parses
// and calculates the SQL before executing the selectKey
// if it is primitive, we cannot do a null check
generateSelectiveCommColumnTo(trimEle, introspectedColumn, prefix, type);
} else {
XmlElement eleIf = new XmlElement("if");
eleIf.addAttribute(new Attribute("test", introspectedColumn.getJavaProperty(prefix) + " != null"));
generateSelectiveCommColumnTo(eleIf, introspectedColumn, prefix, type);
trimEle.addElement(eleIf);
}
}
/**
* 生成
* @param element
* @param introspectedColumn
* @param prefix
* @param type 1:key,2:value,3:set
*/
private static void generateSelectiveCommColumnTo(XmlElement element, IntrospectedColumn introspectedColumn, String prefix, int type) {
switch (type) {
case 3:
element.addElement(new TextElement(MyBatis3FormattingUtilities.getEscapedColumnName(introspectedColumn) + " = " + MyBatis3FormattingUtilities.getParameterClause(introspectedColumn, prefix) + ","));
break;
case 2:
element.addElement(new TextElement(MyBatis3FormattingUtilities.getParameterClause(introspectedColumn, prefix) + ","));
break;
case 1:
element.addElement(new TextElement(MyBatis3FormattingUtilities.getEscapedColumnName(introspectedColumn) + ","));
break;
}
}
/**
* 生成 xxxByPrimaryKey 的where 语句
* @param element
* @param primaryKeyColumns
* @return
*/
public static void generateWhereByPrimaryKeyTo(XmlElement element, List<IntrospectedColumn> primaryKeyColumns) {
generateWhereByPrimaryKeyTo(element, primaryKeyColumns, null);
}
/**
* 生成 xxxByPrimaryKey 的where 语句
* @param element
* @param primaryKeyColumns
* @param prefix
* @return
*/
public static void generateWhereByPrimaryKeyTo(XmlElement element, List<IntrospectedColumn> primaryKeyColumns, String prefix) {
StringBuilder sb = new StringBuilder();
boolean and = false;
for (IntrospectedColumn introspectedColumn : primaryKeyColumns) {
sb.setLength(0);
if (and) {
sb.append(" and ");
} else {
sb.append("where ");
and = true;
}
sb.append(MyBatis3FormattingUtilities.getEscapedColumnName(introspectedColumn));
sb.append(" = ");
sb.append(MyBatis3FormattingUtilities.getParameterClause(introspectedColumn, prefix));
element.addElement(new TextElement(sb.toString()));
}
}
/**
* 是否存在自增或者生成的column
* @param columns
* @return
*/
private static boolean hasIdentityAndGeneratedAlwaysColumns(List<IntrospectedColumn> columns) {
for (IntrospectedColumn ic : columns) {
if (ic.isGeneratedAlways() || ic.isIdentity()) {
return true;
}
}
return false;
}
/**
* 生成resultMap的result 节点
* @param name
* @param introspectedColumn
* @return
*/
public static XmlElement generateResultMapResultElement(String name, IntrospectedColumn introspectedColumn) {
XmlElement resultElement = new XmlElement(name);
resultElement.addAttribute(new Attribute("column", MyBatis3FormattingUtilities.getRenamedColumnNameForResultMap(introspectedColumn)));
resultElement.addAttribute(new Attribute("property", introspectedColumn.getJavaProperty()));
resultElement.addAttribute(new Attribute("jdbcType", introspectedColumn.getJdbcTypeName()));
if (stringHasValue(introspectedColumn.getTypeHandler())) {
resultElement.addAttribute(new Attribute("typeHandler", introspectedColumn.getTypeHandler()));
}
return resultElement;
}
}
...@@ -31,6 +31,49 @@ ...@@ -31,6 +31,49 @@
<artifactId>fastjson</artifactId> <artifactId>fastjson</artifactId>
</dependency> </dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
</dependency>
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.5</version>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.44</version>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>com.byit</groupId>
<artifactId>byit-mybatis-plugin</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
</dependencies>
<configuration>
<configurationFile>${basedir}/src/main/resources/Generator-config.xml</configurationFile>
<verbose>true</verbose>
<overwrite>true</overwrite>
<skip>false</skip>
</configuration>
</plugin>
</plugins>
</build>
</project> </project>
\ No newline at end of file
package com.byit.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @description: 工作流
* @author: gml
* @create: 2019-12-23 15:25
*/
@RestController
@RequestMapping("flow")
public class FlowController {
}
package com.byit.vo;
/**
* @description: 工作流VO类
* @author: gml
* @create: 2019-12-23 15:39
*/
public class MythJobFlowVo {
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE generatorConfiguration PUBLIC
"-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" >
<generatorConfiguration>
<context id="context" targetRuntime="MyBatis3">
<!-- 识别关键字 -->
<property name="autoDelimitKeywords" value="true"/>
<property name="beginningDelimiter" value="`"/>
<property name="endingDelimiter" value="`"/>
<!-- 配置相关插件-->
<plugin type="org.mybatis.generator.plugins.SerializablePlugin"/>
<plugin type="com.byit.plugin.DefaultNamePlugin"/>
<plugin type="com.byit.plugin.LombokAnnotationPlugin"/>
<!-- 统一格式-->
<commentGenerator type="com.byit.plugin.NormalCommentGenerator">
<property name="suppressAllComments" value="false"/>
<property name="addRemarkComments" value="true"/>
<property name="dateFormat" value="yyyy-MM-dd"/>
</commentGenerator>
<!--<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://10.1.2.104:3306/byitact?tinyInt1isBit=false&amp;
useUnicode=true&amp;characterEncoding=UTF-8&amp;zeroDateTimeBehavior=convertToNull"
userId="dev_oper" password="0755oper"/>-->
<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://10.0.10.118:3306/myth-job?tinyInt1isBit=false&amp;
useUnicode=true&amp;characterEncoding=UTF-8&amp;zeroDateTimeBehavior=convertToNull"
userId="root" password="123456"/>
<!-- 处理TINYINT(1) 等 -->
<javaTypeResolver type="com.byit.plugin.DefaultJavaTypeResolverDefault">
<property name="forceBigDecimals" value="true"/>
</javaTypeResolver>
<!-- domaim=po持久化对象-->
<javaModelGenerator targetPackage="com.byit.model" targetProject="src/main/java">
<property name="enableSubPackages" value="false"/>
<property name="trimStrings" value="true"/>
</javaModelGenerator>
<!-- xml生成地址 -->
<sqlMapGenerator targetPackage="mapper" targetProject="src/main/resources">
<property name="enableSubPackages" value="false"/>
<property name="rootInterface" value="idata.dmp.dc.mapper"/>
</sqlMapGenerator>
<!-- mapper接口地址 -->
<javaClientGenerator targetPackage="com.byit.mapper" targetProject="src/main/java"
type="XMLMAPPER">
<property name="enableSubPackages" value="false"/>
</javaClientGenerator>
<table tableName="job_flow_current" domainObjectName="JobFlowCurrent" />
<!--<table tableName="t_publish_result" domainObjectName="PublishResult" />
<table tableName="t_publish_approve" domainObjectName="PublishApprove" />-->
</context>
</generatorConfiguration>
...@@ -6,7 +6,7 @@ spring: ...@@ -6,7 +6,7 @@ spring:
password: 123456 password: 123456
jpa: jpa:
hibernate: hibernate:
ddl-auto: update ddl-auto: none
show-sql: false show-sql: false
mybatis: mybatis:
......
...@@ -66,6 +66,49 @@ ...@@ -66,6 +66,49 @@
<artifactId>spring-boot-starter-data-jpa</artifactId> <artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency> </dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
</dependency>
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.5</version>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.44</version>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>com.byit</groupId>
<artifactId>byit-mybatis-plugin</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
</dependencies>
<configuration>
<configurationFile>${basedir}/src/main/resources/Generator-config.xml</configurationFile>
<verbose>true</verbose>
<overwrite>true</overwrite>
<skip>false</skip>
</configuration>
</plugin>
</plugins>
</build>
</project> </project>
\ No newline at end of file
package com.byit.mapper;
import com.byit.model.JobFlowDependentKey;
public interface JobFlowDependentMapper {
int deleteById(JobFlowDependentKey key);
int insert(JobFlowDependentKey record);
int insertSelective(JobFlowDependentKey record);
}
\ No newline at end of file
package com.byit.mapper;
import com.byit.model.JobFlow;
public interface JobFlowMapper {
int deleteById(Integer flowId);
int insert(JobFlow record);
int insertSelective(JobFlow record);
JobFlow getById(Integer flowId);
int updateByIdSelective(JobFlow record);
int updateById(JobFlow record);
}
\ No newline at end of file
package com.byit.mapper;
import com.byit.model.JobFlowNode;
public interface JobFlowNodeMapper {
int deleteById(Integer nodeId);
int insert(JobFlowNode record);
int insertSelective(JobFlowNode record);
JobFlowNode getById(Integer nodeId);
int updateByIdSelective(JobFlowNode record);
int updateByIdWithBLOBs(JobFlowNode record);
int updateById(JobFlowNode record);
}
\ No newline at end of file
package com.byit.mapper;
import com.byit.model.JobFlowNodeVersion;
public interface JobFlowNodeVersionMapper {
int deleteById(Integer nodeId);
int insert(JobFlowNodeVersion record);
int insertSelective(JobFlowNodeVersion record);
JobFlowNodeVersion getById(Integer nodeId);
int updateByIdSelective(JobFlowNodeVersion record);
int updateByIdWithBLOBs(JobFlowNodeVersion record);
int updateById(JobFlowNodeVersion record);
}
\ No newline at end of file
package com.byit.mapper;
import com.byit.model.JobFlowRunRecording;
public interface JobFlowRunRecordingMapper {
int deleteById(Integer recordingId);
int insert(JobFlowRunRecording record);
int insertSelective(JobFlowRunRecording record);
JobFlowRunRecording getById(Integer recordingId);
int updateByIdSelective(JobFlowRunRecording record);
int updateById(JobFlowRunRecording record);
}
\ No newline at end of file
package com.byit.mapper;
import com.byit.model.JobFlowVersion;
public interface JobFlowVersionMapper {
int deleteById(Integer versionId);
int insert(JobFlowVersion record);
int insertSelective(JobFlowVersion record);
JobFlowVersion getById(Integer versionId);
int updateByIdSelective(JobFlowVersion record);
int updateById(JobFlowVersion record);
}
\ No newline at end of file
package com.byit.mapper;
import com.byit.model.JobTask;
public interface JobTaskMapper {
int deleteById(Integer nodeId);
int insert(JobTask record);
int insertSelective(JobTask record);
JobTask getById(Integer nodeId);
int updateByIdSelective(JobTask record);
int updateByIdWithBLOBs(JobTask record);
int updateById(JobTask record);
}
\ No newline at end of file
package com.byit.mapper;
import com.byit.model.JobTaskRunLog;
import com.byit.model.JobTaskRunLogWithBLOBs;
public interface JobTaskRunLogMapper {
int deleteById(Integer logId);
int insert(JobTaskRunLogWithBLOBs record);
int insertSelective(JobTaskRunLogWithBLOBs record);
JobTaskRunLogWithBLOBs getById(Integer logId);
int updateByIdSelective(JobTaskRunLogWithBLOBs record);
int updateByIdWithBLOBs(JobTaskRunLogWithBLOBs record);
int updateById(JobTaskRunLog record);
}
\ No newline at end of file
package com.byit.mapper;
import com.byit.model.JobTaskSchedule;
public interface JobTaskScheduleMapper {
int deleteById(Integer nodeId);
int insert(JobTaskSchedule record);
int insertSelective(JobTaskSchedule record);
JobTaskSchedule getById(Integer nodeId);
int updateByIdSelective(JobTaskSchedule record);
int updateByIdWithBLOBs(JobTaskSchedule record);
int updateById(JobTaskSchedule record);
}
\ No newline at end of file
package com.byit.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import lombok.Data;
/**
*
*/
@ApiModel
@Data
public class JobFlow implements Serializable {
/**
* 当前版本工作流主键
*/
@ApiModelProperty("当前版本工作流主键")
private Integer flowId;
/**
* 当前工作流版本的报警邮箱
*/
@ApiModelProperty("当前工作流版本的报警邮箱")
private String alarmEmail;
/**
* 执行类型 周期执行1 手动执行2
*/
@ApiModelProperty("执行类型 周期执行1 手动执行2")
private String execType;
/**
* 任务流的cron表达式
*/
@ApiModelProperty("任务流的cron表达式")
private String flowCron;
/**
* 当前工作流的介绍
*/
@ApiModelProperty("当前工作流的介绍")
private String flowDesc;
/**
* 当前版本工作流名字
*/
@ApiModelProperty("当前版本工作流名字")
private String flowName;
/**
* 前版本工作流节点数目
*/
@ApiModelProperty("前版本工作流节点数目")
private Integer flowNodeCount;
/**
* 档期啊版本的工作流的超时时间
*/
@ApiModelProperty("档期啊版本的工作流的超时时间")
private Long flowTimeout;
/**
* 是否有下游节点 0 否,1 是
*/
@ApiModelProperty("是否有下游节点 0 否,1 是")
private String isHaveDepend;
/**
* 是否是内嵌工作流 0 否, 1 是
*/
@ApiModelProperty("是否是内嵌工作流 0 否, 1 是")
private String isInner;
/**
* 是否是顶级工作流 0 否, 1 是
*/
@ApiModelProperty("是否是顶级工作流 0 否, 1 是")
private String isTop;
/**
* 当前工作流版本的告警的时机
*/
@ApiModelProperty("当前工作流版本的告警的时机")
private String mailAction;
/**
* 节点是否跟随任务流,1跟随 2不跟随
*/
@ApiModelProperty("节点是否跟随任务流,1跟随 2不跟随")
private String nodeDateIsFollowFlow;
/**
* 设置任务的优先级,1最低 2最高
*/
@ApiModelProperty("设置任务的优先级,1最低 2最高")
private String priority;
/**
* 当前工作流版本的执行剩余次数
*/
@ApiModelProperty("当前工作流版本的执行剩余次数")
private Integer remainingCount;
/**
* 当前工作流版本额重复次数
*/
@ApiModelProperty("当前工作流版本额重复次数")
private Integer repeatCount;
/**
* 当前版本的工作流的下次执行时间
*/
@ApiModelProperty("当前版本的工作流的下次执行时间")
private Long triggerNextTime;
/**
* 工作空间的id
*/
@ApiModelProperty("工作空间的id")
private Integer workspaceId;
/**
*/
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.byit.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import lombok.Data;
/**
*
*/
@ApiModel
@Data
public class JobFlowDependentKey implements Serializable {
/**
* 工作流Id
*/
@ApiModelProperty("工作流Id")
private Integer flowId;
/**
* 上游依赖的工作流Id
*/
@ApiModelProperty("上游依赖的工作流Id")
private Integer dependFlowId;
/**
*/
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.byit.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
*
*/
@ApiModel
@Data
public class JobFlowNode implements Serializable {
/**
* 当前版本节点主键
*/
@ApiModelProperty("当前版本节点主键")
private Integer nodeId;
/**
* 当前工作流版本的报警邮箱
*/
@ApiModelProperty("当前工作流版本的报警邮箱")
private String alarmEmail;
/**
* 阻塞策略
*/
@ApiModelProperty("阻塞策略")
private String blockStrategy;
/**
* 调度中心端请求插件时的令牌
*/
@ApiModelProperty("调度中心端请求插件时的令牌")
private String callbackToken;
/**
* 该节点的依赖节点
*/
@ApiModelProperty("该节点的依赖节点")
private String dependencyNodes;
/**
* 当前节点的失败重试次数
*/
@ApiModelProperty("当前节点的失败重试次数")
private Integer failedRetryCount;
/**
* 工作流ID
*/
@ApiModelProperty("工作流ID")
private Integer flowId;
/**
* 是否跟随任务流 1跟随 2不跟随
*/
@ApiModelProperty("是否跟随任务流 1跟随 2不跟随")
private String followTaskFlow;
/**
* 插件端请求调度中心的令牌
*/
@ApiModelProperty("插件端请求调度中心的令牌")
private String gatewayToken;
/**
* 当前任务的类型 java python shell sql script
*/
@ApiModelProperty("当前任务的类型 java python shell sql script")
private String jobType;
/**
* 本地节点(插件方) 的节点的名字
*/
@ApiModelProperty("本地节点(插件方) 的节点的名字")
private String localNodeHandlerName;
/**
* 当前工作流版本的告警的时机
*/
@ApiModelProperty("当前工作流版本的告警的时机")
private String mailAction;
/**
* 这个在设置节点执行时间跟随任务流的时候,他是没用的,但是设置不跟随的时候,节点的执行按照他自己的时间执行
*/
@ApiModelProperty("这个在设置节点执行时间跟随任务流的时候,他是没用的,但是设置不跟随的时候,节点的执行按照他自己的时间执行")
private String nodeCron;
/**
* 节点的说明
*/
@ApiModelProperty("节点的说明")
private String nodeDesc;
/**
* 当前节点的名称
*/
@ApiModelProperty("当前节点的名称")
private String nodeName;
/**
* nodeOfFlowId
*/
@ApiModelProperty("nodeOfFlowId")
private Integer nodeOfFlowId;
/**
* 节点的超时时间 -1不超时
*/
@ApiModelProperty("节点的超时时间 -1不超时")
private Long nodeTimeout;
/**
* 节点的类型 node flow
*/
@ApiModelProperty("节点的类型 node flow")
private String nodeType;
/**
* 插件端的url集合
*/
@ApiModelProperty("插件端的url集合")
private String pluginUrls;
/**
* 设置任务的优先级,1最低 2最高
*/
@ApiModelProperty("设置任务的优先级,1最低 2最高")
private String priority;
/**
* 节点的剩余次数
*/
@ApiModelProperty("节点的剩余次数")
private Integer remainingCount;
/**
* 当前节点总共重复次数
*/
@ApiModelProperty("当前节点总共重复次数")
private Integer repeatCount;
/**
* 重试的间隔
*/
@ApiModelProperty("重试的间隔")
private Long retryInterval;
/**
* 路由策略
*/
@ApiModelProperty("路由策略")
private String routingStrategy;
/**
* 节点的参数
*/
@ApiModelProperty("节点的参数")
private String runParam;
/**
* 源码备注
*/
@ApiModelProperty("源码备注")
private String runSourceDesc;
/**
* 脚本的文件服务器路径集
*/
@ApiModelProperty("脚本的文件服务器路径集")
private String scriptUrls;
/**
* 源码负责人
*/
@ApiModelProperty("源码负责人")
private String sourcePrincipal;
/**
* 源码的修改时间
*/
@ApiModelProperty("源码的修改时间")
private Date sourceUpdateTime;
/**
* 当前版本的节点的下次执行时间
*/
@ApiModelProperty("当前版本的节点的下次执行时间")
private Long triggerNextTime;
/**
* 源码
*/
@ApiModelProperty("源码")
private String runSource;
/**
*/
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.byit.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
*
*/
@ApiModel
@Data
public class JobFlowNodeVersion implements Serializable {
/**
* 当前版本节点主键
*/
@ApiModelProperty("当前版本节点主键")
private Integer nodeId;
/**
* 当前工作流版本的报警邮箱
*/
@ApiModelProperty("当前工作流版本的报警邮箱")
private String alarmEmail;
/**
* 阻塞策略
*/
@ApiModelProperty("阻塞策略")
private String blockStrategy;
/**
* 调度中心端请求插件时的令牌
*/
@ApiModelProperty("调度中心端请求插件时的令牌")
private String callbackToken;
/**
* 该节点的依赖节点
*/
@ApiModelProperty("该节点的依赖节点")
private String dependencyNodes;
/**
* 当前节点的失败重试次数
*/
@ApiModelProperty("当前节点的失败重试次数")
private Integer failedRetryCount;
/**
* 工作流ID
*/
@ApiModelProperty("工作流ID")
private Integer flowId;
/**
* 所属工作流的id
*/
@ApiModelProperty("所属工作流的id")
private Integer flowVersionId;
/**
* 是否跟随任务流 1跟随 2不跟随
*/
@ApiModelProperty("是否跟随任务流 1跟随 2不跟随")
private String followTaskFlow;
/**
* 插件端请求调度中心的令牌
*/
@ApiModelProperty("插件端请求调度中心的令牌")
private String gatewayToken;
/**
* 当前任务的类型 java python shell sql script
*/
@ApiModelProperty("当前任务的类型 java python shell sql script")
private String jobType;
/**
* 本地节点(插件方) 的节点的名字
*/
@ApiModelProperty("本地节点(插件方) 的节点的名字")
private String localNodeHandlerName;
/**
* 当前工作流版本的告警的时机
*/
@ApiModelProperty("当前工作流版本的告警的时机")
private String mailAction;
/**
* 这个在设置节点执行时间跟随任务流的时候,他是没用的,但是设置不跟随的时候,节点的执行按照他自己的时间执行
*/
@ApiModelProperty("这个在设置节点执行时间跟随任务流的时候,他是没用的,但是设置不跟随的时候,节点的执行按照他自己的时间执行")
private String nodeCron;
/**
* 节点的说明
*/
@ApiModelProperty("节点的说明")
private String nodeDesc;
/**
* 当前节点的名称
*/
@ApiModelProperty("当前节点的名称")
private String nodeName;
/**
* nodeOfFlowId
*/
@ApiModelProperty("nodeOfFlowId")
private Integer nodeOfFlowId;
/**
* 节点的超时时间 -1不超时
*/
@ApiModelProperty("节点的超时时间 -1不超时")
private Long nodeTimeout;
/**
* 节点的类型 node flow
*/
@ApiModelProperty("节点的类型 node flow")
private String nodeType;
/**
* 插件端的url集合
*/
@ApiModelProperty("插件端的url集合")
private String pluginUrls;
/**
* 设置任务的优先级,1最低 2最高
*/
@ApiModelProperty("设置任务的优先级,1最低 2最高")
private String priority;
/**
* 删除标识 1正常 2 删除
*/
@ApiModelProperty("删除标识 1正常 2 删除")
private String removeMark;
/**
* 当前节点总共重复次数
*/
@ApiModelProperty("当前节点总共重复次数")
private Integer repeatCount;
/**
* 重试的间隔
*/
@ApiModelProperty("重试的间隔")
private Long retryInterval;
/**
* 路由策略
*/
@ApiModelProperty("路由策略")
private String routingStrategy;
/**
* 节点的参数
*/
@ApiModelProperty("节点的参数")
private String runParam;
/**
* 源码备注
*/
@ApiModelProperty("源码备注")
private String runSourceDesc;
/**
* 脚本的文件服务器路径集
*/
@ApiModelProperty("脚本的文件服务器路径集")
private String scriptUrls;
/**
* 源码负责人
*/
@ApiModelProperty("源码负责人")
private String sourcePrincipal;
/**
* 源码的修改时间
*/
@ApiModelProperty("源码的修改时间")
private Date sourceUpdateTime;
/**
* 当前版本的节点的下次执行时间
*/
@ApiModelProperty("当前版本的节点的下次执行时间")
private Long triggerNextTime;
/**
* 当前节点的版本标识
*/
@ApiModelProperty("当前节点的版本标识")
private String versionMark;
/**
* 源码
*/
@ApiModelProperty("源码")
private String runSource;
/**
*/
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.byit.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import lombok.Data;
/**
*
*/
@ApiModel
@Data
public class JobFlowRunRecording implements Serializable {
/**
* 记录主键
*/
@ApiModelProperty("记录主键")
private Integer recordingId;
/**
* 运行标识
*/
@ApiModelProperty("运行标识")
private String runId;
/**
* 当前工作流版本的报警邮箱
*/
@ApiModelProperty("当前工作流版本的报警邮箱")
private String alarmEmail;
/**
* 被哪一个调度器加载的
*/
@ApiModelProperty("被哪一个调度器加载的")
private String dispatchIp;
/**
* 工作流的名字
*/
@ApiModelProperty("工作流的名字")
private String flowName;
/**
* 执行结果
*/
@ApiModelProperty("执行结果")
private String flowRunResult;
/**
* 1 未开始 2运行中 3暂停 4成功 5失败
*/
@ApiModelProperty("1 未开始 2运行中 3暂停 4成功 5失败")
private String flowStatus;
/**
* 工作流的超时时间
*/
@ApiModelProperty("工作流的超时时间")
private Long flowTimeout;
/**
* 工作流的版本id
*/
@ApiModelProperty("工作流的版本id")
private Integer flowVersionId;
/**
* 当前工作流版本的告警的时机
*/
@ApiModelProperty("当前工作流版本的告警的时机")
private String mailAction;
/**
* 节点数量
*/
@ApiModelProperty("节点数量")
private Integer nodeCount;
/**
* 设置任务的优先级,1最低 2最高
*/
@ApiModelProperty("设置任务的优先级,1最低 2最高")
private String priority;
/**
* 初始值为节点总数,每次一个节点运行完就将总数-1
*/
@ApiModelProperty("初始值为节点总数,每次一个节点运行完就将总数-1")
private Integer remainingNode;
/**
* 调度状态:0-未开始,1-调度成功, 2-调度失败
*/
@ApiModelProperty("调度状态:0-未开始,1-调度成功, 2-调度失败")
private String triggerStatus;
/**
* 本次任务的执行时间
*/
@ApiModelProperty("本次任务的执行时间")
private Long triggerTime;
/**
*/
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.byit.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
*
*/
@ApiModel
@Data
public class JobFlowVersion implements Serializable {
/**
* 版本工作流主键
*/
@ApiModelProperty("版本工作流主键")
private Integer versionId;
/**
* 添加时间
*/
@ApiModelProperty("添加时间")
private Date addTime;
/**
* 工作流版本的报警邮箱
*/
@ApiModelProperty("工作流版本的报警邮箱")
private String alarmEmail;
/**
* 执行类型 周期执行1 手动执行2
*/
@ApiModelProperty("执行类型 周期执行1 手动执行2")
private String execType;
/**
* 任务流的cron表达式
*/
@ApiModelProperty("任务流的cron表达式")
private String flowCron;
/**
* 工作流的介绍
*/
@ApiModelProperty("工作流的介绍")
private String flowDesc;
/**
* 工作流主键
*/
@ApiModelProperty("工作流主键")
private Integer flowId;
/**
* 版本工作流名字
*/
@ApiModelProperty("版本工作流名字")
private String flowName;
/**
* 前版本工作流节点数目
*/
@ApiModelProperty("前版本工作流节点数目")
private Integer flowNodeCount;
/**
* 档期啊版本的工作流的超时时间
*/
@ApiModelProperty("档期啊版本的工作流的超时时间")
private Long flowTimeout;
/**
* 工作流版本的告警的时机
*/
@ApiModelProperty("工作流版本的告警的时机")
private String mailAction;
/**
* 节点是否跟随任务流,1跟随 2不跟随
*/
@ApiModelProperty("节点是否跟随任务流,1跟随 2不跟随")
private String nodeDateIsFollowFlow;
/**
* 设置任务的优先级,1最低 2最高
*/
@ApiModelProperty("设置任务的优先级,1最低 2最高")
private String priority;
/**
* 删除标志 1正常 2删除
*/
@ApiModelProperty("删除标志 1正常 2删除")
private String removeMark;
/**
* 工作流版本额重复次数
*/
@ApiModelProperty("工作流版本额重复次数")
private Integer repeatCount;
/**
* 修改时间
*/
@ApiModelProperty("修改时间")
private Date updateTime;
/**
* 当前版本的标志 this
*/
@ApiModelProperty("当前版本的标志 this")
private String versionMark;
/**
* 工作空间的id
*/
@ApiModelProperty("工作空间的id")
private Integer workspaceId;
/**
*/
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.byit.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
*
*/
@ApiModel
@Data
public class JobTask implements Serializable {
/**
* 当前版本节点主键
*/
@ApiModelProperty("当前版本节点主键")
private Integer nodeId;
/**
* 当前工作流版本的报警邮箱
*/
@ApiModelProperty("当前工作流版本的报警邮箱")
private String alarmEmail;
/**
* 阻塞策略
*/
@ApiModelProperty("阻塞策略")
private String blockStrategy;
/**
* 调度中心端请求插件时的令牌
*/
@ApiModelProperty("调度中心端请求插件时的令牌")
private String callbackToken;
/**
* 该节点的依赖节点
*/
@ApiModelProperty("该节点的依赖节点")
private String dependencyNodes;
/**
* 当前节点的失败重试次数
*/
@ApiModelProperty("当前节点的失败重试次数")
private Integer failedRetryCount;
/**
* 工作流ID
*/
@ApiModelProperty("工作流ID")
private Integer flowId;
/**
* 是否跟随任务流 1跟随 2不跟随
*/
@ApiModelProperty("是否跟随任务流 1跟随 2不跟随")
private String followTaskFlow;
/**
* 插件端请求调度中心的令牌
*/
@ApiModelProperty("插件端请求调度中心的令牌")
private String gatewayToken;
/**
* 当前任务的类型 java python shell sql script
*/
@ApiModelProperty("当前任务的类型 java python shell sql script")
private String jobType;
/**
* 本地节点(插件方) 的节点的名字
*/
@ApiModelProperty("本地节点(插件方) 的节点的名字")
private String localNodeHandlerName;
/**
* 当前工作流版本的告警的时机
*/
@ApiModelProperty("当前工作流版本的告警的时机")
private String mailAction;
/**
* 这个在设置节点执行时间跟随任务流的时候,他是没用的,但是设置不跟随的时候,节点的执行按照他自己的时间执行
*/
@ApiModelProperty("这个在设置节点执行时间跟随任务流的时候,他是没用的,但是设置不跟随的时候,节点的执行按照他自己的时间执行")
private String nodeCron;
/**
* 节点的说明
*/
@ApiModelProperty("节点的说明")
private String nodeDesc;
/**
* 当前节点的名称
*/
@ApiModelProperty("当前节点的名称")
private String nodeName;
/**
* nodeOfFlowId
*/
@ApiModelProperty("nodeOfFlowId")
private Integer nodeOfFlowId;
/**
* 节点的超时时间 -1不超时
*/
@ApiModelProperty("节点的超时时间 -1不超时")
private Long nodeTimeout;
/**
* 节点的类型 node flow
*/
@ApiModelProperty("节点的类型 node flow")
private String nodeType;
/**
* 插件端的url集合
*/
@ApiModelProperty("插件端的url集合")
private String pluginUrls;
/**
* 设置任务的优先级,1最低 2最高
*/
@ApiModelProperty("设置任务的优先级,1最低 2最高")
private String priority;
/**
* 节点的剩余次数
*/
@ApiModelProperty("节点的剩余次数")
private Integer remainingCount;
/**
* 当前节点总共重复次数
*/
@ApiModelProperty("当前节点总共重复次数")
private Integer repeatCount;
/**
* 重试的间隔
*/
@ApiModelProperty("重试的间隔")
private Long retryInterval;
/**
* 路由策略
*/
@ApiModelProperty("路由策略")
private String routingStrategy;
/**
* 运行标识
*/
@ApiModelProperty("运行标识")
private String runId;
/**
* 节点的参数
*/
@ApiModelProperty("节点的参数")
private String runParam;
/**
* 源码备注
*/
@ApiModelProperty("源码备注")
private String runSourceDesc;
/**
* 脚本的文件服务器路径集
*/
@ApiModelProperty("脚本的文件服务器路径集")
private String scriptUrls;
/**
* 源码负责人
*/
@ApiModelProperty("源码负责人")
private String sourcePrincipal;
/**
* 源码的修改时间
*/
@ApiModelProperty("源码的修改时间")
private Date sourceUpdateTime;
/**
* 当前版本的节点的下次执行时间
*/
@ApiModelProperty("当前版本的节点的下次执行时间")
private Long triggerNextTime;
/**
* 调度状态:0-暂停,1-运行
*/
@ApiModelProperty("调度状态:0-暂停,1-运行")
private String triggerStatus;
/**
* 源码
*/
@ApiModelProperty("源码")
private String runSource;
/**
*/
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.byit.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
*
*/
@ApiModel
@Data
public class JobTaskRunLog implements Serializable {
/**
* 日志ID
*/
@ApiModelProperty("日志ID")
private Integer logId;
/**
* 当前工作流版本的报警邮箱
*/
@ApiModelProperty("当前工作流版本的报警邮箱")
private String alarmEmail;
/**
* 告警结果,1-告警成功 2-告警失败
*/
@ApiModelProperty("告警结果,1-告警成功 2-告警失败")
private String alarmStatus;
/**
* 当前节点的失败剩余重试次数 初始阶段为初始的重试次数
*/
@ApiModelProperty("当前节点的失败剩余重试次数 初始阶段为初始的重试次数")
private Integer failedRemainingCount;
/**
* 任务流版本的主键
*/
@ApiModelProperty("任务流版本的主键")
private Integer flowVersionId;
/**
* 任务流主键
*/
@ApiModelProperty("任务流主键")
private Integer jobFlowId;
/**
* 所属任务流的名称
*/
@ApiModelProperty("所属任务流的名称")
private String jobFlowName;
/**
* 执行机主键
*/
@ApiModelProperty("执行机主键")
private Integer jobGroupId;
/**
* 任务类型 BEAN ACTUATOR
*/
@ApiModelProperty("任务类型 BEAN ACTUATOR")
private String jobType;
/**
* 插件方节点key
*/
@ApiModelProperty("插件方节点key")
private String localNodeHandlerName;
/**
* 当前工作流版本的告警的时机
*/
@ApiModelProperty("当前工作流版本的告警的时机")
private String mailAction;
/**
* 节点名称
*/
@ApiModelProperty("节点名称")
private String nodeName;
/**
* 节点类型 node type
*/
@ApiModelProperty("节点类型 node type")
private String nodeType;
/**
* 运行结果
*/
@ApiModelProperty("运行结果")
private String runCode;
/**
* 运行参数
*/
@ApiModelProperty("运行参数")
private String runParams;
/**
* 执行时间
*/
@ApiModelProperty("执行时间")
private Date runTime;
/**
* 运行方式 1执行机运行,2本地运行
*/
@ApiModelProperty("运行方式 1执行机运行,2本地运行")
private String runType;
/**
* 调度结果 1成功 2失败
*/
@ApiModelProperty("调度结果 1成功 2失败")
private String triggerCode;
/**
* 触发时间
*/
@ApiModelProperty("触发时间")
private Date triggerTime;
/**
*/
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.byit.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import lombok.Data;
/**
*
*/
@ApiModel
@Data
public class JobTaskRunLogWithBLOBs extends JobTaskRunLog implements Serializable {
/**
* 运行结果信息
*/
@ApiModelProperty("运行结果信息")
private String runMsg;
/**
* 调度信息
*/
@ApiModelProperty("调度信息")
private String triggerMsg;
/**
*/
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.byit.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
*
*/
@ApiModel
@Data
public class JobTaskSchedule implements Serializable {
/**
* 当前版本节点主键
*/
@ApiModelProperty("当前版本节点主键")
private Integer nodeId;
/**
* 当前工作流版本的报警邮箱
*/
@ApiModelProperty("当前工作流版本的报警邮箱")
private String alarmEmail;
/**
* 阻塞策略
*/
@ApiModelProperty("阻塞策略")
private String blockStrategy;
/**
* 调度中心端请求插件时的令牌
*/
@ApiModelProperty("调度中心端请求插件时的令牌")
private String callbackToken;
/**
* 该节点的依赖节点
*/
@ApiModelProperty("该节点的依赖节点")
private String dependencyNodes;
/**
* 当前节点的失败重试次数
*/
@ApiModelProperty("当前节点的失败重试次数")
private Integer failedRetryCount;
/**
* 工作流ID
*/
@ApiModelProperty("工作流ID")
private Integer flowId;
/**
* 是否跟随任务流 1跟随 2不跟随
*/
@ApiModelProperty("是否跟随任务流 1跟随 2不跟随")
private String followTaskFlow;
/**
* 插件端请求调度中心的令牌
*/
@ApiModelProperty("插件端请求调度中心的令牌")
private String gatewayToken;
/**
* 当前任务的类型 java python shell sql script
*/
@ApiModelProperty("当前任务的类型 java python shell sql script")
private String jobType;
/**
* 本地节点(插件方) 的节点的名字
*/
@ApiModelProperty("本地节点(插件方) 的节点的名字")
private String localNodeHandlerName;
/**
* 日志ID
*/
@ApiModelProperty("日志ID")
private Integer logId;
/**
* 当前工作流版本的告警的时机
*/
@ApiModelProperty("当前工作流版本的告警的时机")
private String mailAction;
/**
* 这个在设置节点执行时间跟随任务流的时候,他是没用的,但是设置不跟随的时候,节点的执行按照他自己的时间执行
*/
@ApiModelProperty("这个在设置节点执行时间跟随任务流的时候,他是没用的,但是设置不跟随的时候,节点的执行按照他自己的时间执行")
private String nodeCron;
/**
* 节点的说明
*/
@ApiModelProperty("节点的说明")
private String nodeDesc;
/**
* 当前节点的名称
*/
@ApiModelProperty("当前节点的名称")
private String nodeName;
/**
* nodeOfFlowId
*/
@ApiModelProperty("nodeOfFlowId")
private Integer nodeOfFlowId;
/**
* 节点的超时时间 -1不超时
*/
@ApiModelProperty("节点的超时时间 -1不超时")
private Long nodeTimeout;
/**
* 节点的类型 node flow
*/
@ApiModelProperty("节点的类型 node flow")
private String nodeType;
/**
* 插件端的url集合
*/
@ApiModelProperty("插件端的url集合")
private String pluginUrls;
/**
* 设置任务的优先级,1最低 2最高
*/
@ApiModelProperty("设置任务的优先级,1最低 2最高")
private String priority;
/**
* 节点的剩余次数
*/
@ApiModelProperty("节点的剩余次数")
private Integer remainingCount;
/**
* 当前节点总共重复次数
*/
@ApiModelProperty("当前节点总共重复次数")
private Integer repeatCount;
/**
* 重试的间隔
*/
@ApiModelProperty("重试的间隔")
private Long retryInterval;
/**
* 路由策略
*/
@ApiModelProperty("路由策略")
private String routingStrategy;
/**
* 运行标识
*/
@ApiModelProperty("运行标识")
private String runId;
/**
* 节点的参数
*/
@ApiModelProperty("节点的参数")
private String runParam;
/**
* 源码备注
*/
@ApiModelProperty("源码备注")
private String runSourceDesc;
/**
* 脚本的文件服务器路径集
*/
@ApiModelProperty("脚本的文件服务器路径集")
private String scriptUrls;
/**
* 源码负责人
*/
@ApiModelProperty("源码负责人")
private String sourcePrincipal;
/**
* 源码的修改时间
*/
@ApiModelProperty("源码的修改时间")
private Date sourceUpdateTime;
/**
* 当前版本的节点的下次执行时间
*/
@ApiModelProperty("当前版本的节点的下次执行时间")
private Long triggerNextTime;
/**
* 调度状态:0-暂停,1-运行
*/
@ApiModelProperty("调度状态:0-暂停,1-运行")
private String triggerStatus;
/**
* 源码
*/
@ApiModelProperty("源码")
private String runSource;
/**
*/
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE generatorConfiguration PUBLIC
"-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" >
<generatorConfiguration>
<context id="context" targetRuntime="MyBatis3">
<!-- 识别关键字 -->
<property name="autoDelimitKeywords" value="true"/>
<property name="beginningDelimiter" value="`"/>
<property name="endingDelimiter" value="`"/>
<!-- 配置相关插件-->
<plugin type="org.mybatis.generator.plugins.SerializablePlugin"/>
<plugin type="com.byit.plugin.DefaultNamePlugin"/>
<plugin type="com.byit.plugin.LombokAnnotationPlugin"/>
<!-- 统一格式-->
<commentGenerator type="com.byit.plugin.NormalCommentGenerator">
<property name="suppressAllComments" value="false"/>
<property name="addRemarkComments" value="true"/>
<property name="dateFormat" value="yyyy-MM-dd"/>
</commentGenerator>
<!--<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://10.1.2.104:3306/byitact?tinyInt1isBit=false&amp;
useUnicode=true&amp;characterEncoding=UTF-8&amp;zeroDateTimeBehavior=convertToNull"
userId="dev_oper" password="0755oper"/>-->
<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://10.0.10.118:3306/myth-job?tinyInt1isBit=false&amp;
useUnicode=true&amp;characterEncoding=UTF-8&amp;zeroDateTimeBehavior=convertToNull"
userId="root" password="123456"/>
<!-- 处理TINYINT(1) 等 -->
<javaTypeResolver type="com.byit.plugin.DefaultJavaTypeResolverDefault">
<property name="forceBigDecimals" value="true"/>
</javaTypeResolver>
<!-- domaim=po持久化对象-->
<javaModelGenerator targetPackage="com.byit.model" targetProject="src/main/java">
<property name="enableSubPackages" value="false"/>
<property name="trimStrings" value="true"/>
</javaModelGenerator>
<!-- xml生成地址 -->
<sqlMapGenerator targetPackage="mapper" targetProject="src/main/resources">
<property name="enableSubPackages" value="false"/>
<property name="rootInterface" value="idata.dmp.dc.mapper"/>
</sqlMapGenerator>
<!-- mapper接口地址 -->
<javaClientGenerator targetPackage="com.byit.mapper" targetProject="src/main/java"
type="XMLMAPPER">
<property name="enableSubPackages" value="false"/>
</javaClientGenerator>
<table tableName="job_flow_current" domainObjectName="JobFlow" />
<table tableName="job_flow_dependent" domainObjectName="JobFlowDependent" />
<table tableName="job_flow_node_current" domainObjectName="JobFlowNode" />
<table tableName="job_flow_node_version" domainObjectName="JobFlowNodeVersion" />
<table tableName="job_flow_run_recording" domainObjectName="JobFlowRunRecording" />
<table tableName="job_flow_version" domainObjectName="JobFlowVersion" />
<table tableName="job_task" domainObjectName="JobTask" />
<table tableName="job_task_run_log" domainObjectName="JobTaskRunLog" />
<table tableName="job_task_schedule" domainObjectName="JobTaskSchedule" />
</context>
</generatorConfiguration>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.byit.mapper.JobFlowDependentMapper">
<resultMap id="BaseResultMap" type="com.byit.model.JobFlowDependentKey">
<!-- generated @mbg.generated date: 2019-12-23 -->
<id column="flow_id" jdbcType="INTEGER" property="flowId" />
<id column="depend_flow_id" jdbcType="INTEGER" property="dependFlowId" />
</resultMap>
<delete id="deleteById" parameterType="com.byit.model.JobFlowDependentKey">
<!-- generated @mbg.generated date: 2019-12-23 -->
delete from job_flow_dependent
where flow_id = #{flowId,jdbcType=INTEGER}
and depend_flow_id = #{dependFlowId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.byit.model.JobFlowDependentKey">
<!-- generated @mbg.generated date: 2019-12-23 -->
insert into job_flow_dependent (flow_id, depend_flow_id)
values (#{flowId,jdbcType=INTEGER}, #{dependFlowId,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.byit.model.JobFlowDependentKey">
<!-- generated @mbg.generated date: 2019-12-23 -->
insert into job_flow_dependent
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="flowId != null">
flow_id,
</if>
<if test="dependFlowId != null">
depend_flow_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="flowId != null">
#{flowId,jdbcType=INTEGER},
</if>
<if test="dependFlowId != null">
#{dependFlowId,jdbcType=INTEGER},
</if>
</trim>
</insert>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.byit.mapper.JobFlowMapper">
<resultMap id="BaseResultMap" type="com.byit.model.JobFlow">
<!-- generated @mbg.generated date: 2019-12-23 -->
<id column="flow_id" jdbcType="INTEGER" property="flowId" />
<result column="alarm_email" jdbcType="VARCHAR" property="alarmEmail" />
<result column="exec_type" jdbcType="CHAR" property="execType" />
<result column="flow_cron" jdbcType="VARCHAR" property="flowCron" />
<result column="flow_desc" jdbcType="VARCHAR" property="flowDesc" />
<result column="flow_name" jdbcType="VARCHAR" property="flowName" />
<result column="flow_node_count" jdbcType="INTEGER" property="flowNodeCount" />
<result column="flow_timeout" jdbcType="BIGINT" property="flowTimeout" />
<result column="is_have_depend" jdbcType="CHAR" property="isHaveDepend" />
<result column="is_inner" jdbcType="CHAR" property="isInner" />
<result column="is_top" jdbcType="CHAR" property="isTop" />
<result column="mail_action" jdbcType="CHAR" property="mailAction" />
<result column="node_date_is_follow_flow" jdbcType="CHAR" property="nodeDateIsFollowFlow" />
<result column="priority" jdbcType="CHAR" property="priority" />
<result column="remaining_count" jdbcType="INTEGER" property="remainingCount" />
<result column="repeat_count" jdbcType="INTEGER" property="repeatCount" />
<result column="trigger_next_time" jdbcType="BIGINT" property="triggerNextTime" />
<result column="workspace_id" jdbcType="INTEGER" property="workspaceId" />
</resultMap>
<sql id="Base_Column_List">
<!-- generated @mbg.generated date: 2019-12-23 -->
flow_id, alarm_email, exec_type, flow_cron, flow_desc, flow_name, flow_node_count,
flow_timeout, is_have_depend, is_inner, is_top, mail_action, node_date_is_follow_flow,
priority, remaining_count, repeat_count, trigger_next_time, workspace_id
</sql>
<select id="getById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!-- generated @mbg.generated date: 2019-12-23 -->
select
<include refid="Base_Column_List" />
from job_flow_current
where flow_id = #{flowId,jdbcType=INTEGER}
</select>
<delete id="deleteById" parameterType="java.lang.Integer">
<!-- generated @mbg.generated date: 2019-12-23 -->
delete from job_flow_current
where flow_id = #{flowId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.byit.model.JobFlow">
<!-- generated @mbg.generated date: 2019-12-23 -->
insert into job_flow_current (flow_id, alarm_email, exec_type,
flow_cron, flow_desc, flow_name,
flow_node_count, flow_timeout, is_have_depend,
is_inner, is_top, mail_action,
node_date_is_follow_flow, priority, remaining_count,
repeat_count, trigger_next_time, workspace_id
)
values (#{flowId,jdbcType=INTEGER}, #{alarmEmail,jdbcType=VARCHAR}, #{execType,jdbcType=CHAR},
#{flowCron,jdbcType=VARCHAR}, #{flowDesc,jdbcType=VARCHAR}, #{flowName,jdbcType=VARCHAR},
#{flowNodeCount,jdbcType=INTEGER}, #{flowTimeout,jdbcType=BIGINT}, #{isHaveDepend,jdbcType=CHAR},
#{isInner,jdbcType=CHAR}, #{isTop,jdbcType=CHAR}, #{mailAction,jdbcType=CHAR},
#{nodeDateIsFollowFlow,jdbcType=CHAR}, #{priority,jdbcType=CHAR}, #{remainingCount,jdbcType=INTEGER},
#{repeatCount,jdbcType=INTEGER}, #{triggerNextTime,jdbcType=BIGINT}, #{workspaceId,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.byit.model.JobFlow">
<!-- generated @mbg.generated date: 2019-12-23 -->
insert into job_flow_current
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="flowId != null">
flow_id,
</if>
<if test="alarmEmail != null">
alarm_email,
</if>
<if test="execType != null">
exec_type,
</if>
<if test="flowCron != null">
flow_cron,
</if>
<if test="flowDesc != null">
flow_desc,
</if>
<if test="flowName != null">
flow_name,
</if>
<if test="flowNodeCount != null">
flow_node_count,
</if>
<if test="flowTimeout != null">
flow_timeout,
</if>
<if test="isHaveDepend != null">
is_have_depend,
</if>
<if test="isInner != null">
is_inner,
</if>
<if test="isTop != null">
is_top,
</if>
<if test="mailAction != null">
mail_action,
</if>
<if test="nodeDateIsFollowFlow != null">
node_date_is_follow_flow,
</if>
<if test="priority != null">
priority,
</if>
<if test="remainingCount != null">
remaining_count,
</if>
<if test="repeatCount != null">
repeat_count,
</if>
<if test="triggerNextTime != null">
trigger_next_time,
</if>
<if test="workspaceId != null">
workspace_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="flowId != null">
#{flowId,jdbcType=INTEGER},
</if>
<if test="alarmEmail != null">
#{alarmEmail,jdbcType=VARCHAR},
</if>
<if test="execType != null">
#{execType,jdbcType=CHAR},
</if>
<if test="flowCron != null">
#{flowCron,jdbcType=VARCHAR},
</if>
<if test="flowDesc != null">
#{flowDesc,jdbcType=VARCHAR},
</if>
<if test="flowName != null">
#{flowName,jdbcType=VARCHAR},
</if>
<if test="flowNodeCount != null">
#{flowNodeCount,jdbcType=INTEGER},
</if>
<if test="flowTimeout != null">
#{flowTimeout,jdbcType=BIGINT},
</if>
<if test="isHaveDepend != null">
#{isHaveDepend,jdbcType=CHAR},
</if>
<if test="isInner != null">
#{isInner,jdbcType=CHAR},
</if>
<if test="isTop != null">
#{isTop,jdbcType=CHAR},
</if>
<if test="mailAction != null">
#{mailAction,jdbcType=CHAR},
</if>
<if test="nodeDateIsFollowFlow != null">
#{nodeDateIsFollowFlow,jdbcType=CHAR},
</if>
<if test="priority != null">
#{priority,jdbcType=CHAR},
</if>
<if test="remainingCount != null">
#{remainingCount,jdbcType=INTEGER},
</if>
<if test="repeatCount != null">
#{repeatCount,jdbcType=INTEGER},
</if>
<if test="triggerNextTime != null">
#{triggerNextTime,jdbcType=BIGINT},
</if>
<if test="workspaceId != null">
#{workspaceId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByIdSelective" parameterType="com.byit.model.JobFlow">
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_flow_current
<set>
<if test="alarmEmail != null">
alarm_email = #{alarmEmail,jdbcType=VARCHAR},
</if>
<if test="execType != null">
exec_type = #{execType,jdbcType=CHAR},
</if>
<if test="flowCron != null">
flow_cron = #{flowCron,jdbcType=VARCHAR},
</if>
<if test="flowDesc != null">
flow_desc = #{flowDesc,jdbcType=VARCHAR},
</if>
<if test="flowName != null">
flow_name = #{flowName,jdbcType=VARCHAR},
</if>
<if test="flowNodeCount != null">
flow_node_count = #{flowNodeCount,jdbcType=INTEGER},
</if>
<if test="flowTimeout != null">
flow_timeout = #{flowTimeout,jdbcType=BIGINT},
</if>
<if test="isHaveDepend != null">
is_have_depend = #{isHaveDepend,jdbcType=CHAR},
</if>
<if test="isInner != null">
is_inner = #{isInner,jdbcType=CHAR},
</if>
<if test="isTop != null">
is_top = #{isTop,jdbcType=CHAR},
</if>
<if test="mailAction != null">
mail_action = #{mailAction,jdbcType=CHAR},
</if>
<if test="nodeDateIsFollowFlow != null">
node_date_is_follow_flow = #{nodeDateIsFollowFlow,jdbcType=CHAR},
</if>
<if test="priority != null">
priority = #{priority,jdbcType=CHAR},
</if>
<if test="remainingCount != null">
remaining_count = #{remainingCount,jdbcType=INTEGER},
</if>
<if test="repeatCount != null">
repeat_count = #{repeatCount,jdbcType=INTEGER},
</if>
<if test="triggerNextTime != null">
trigger_next_time = #{triggerNextTime,jdbcType=BIGINT},
</if>
<if test="workspaceId != null">
workspace_id = #{workspaceId,jdbcType=INTEGER},
</if>
</set>
where flow_id = #{flowId,jdbcType=INTEGER}
</update>
<update id="updateById" parameterType="com.byit.model.JobFlow">
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_flow_current
set alarm_email = #{alarmEmail,jdbcType=VARCHAR},
exec_type = #{execType,jdbcType=CHAR},
flow_cron = #{flowCron,jdbcType=VARCHAR},
flow_desc = #{flowDesc,jdbcType=VARCHAR},
flow_name = #{flowName,jdbcType=VARCHAR},
flow_node_count = #{flowNodeCount,jdbcType=INTEGER},
flow_timeout = #{flowTimeout,jdbcType=BIGINT},
is_have_depend = #{isHaveDepend,jdbcType=CHAR},
is_inner = #{isInner,jdbcType=CHAR},
is_top = #{isTop,jdbcType=CHAR},
mail_action = #{mailAction,jdbcType=CHAR},
node_date_is_follow_flow = #{nodeDateIsFollowFlow,jdbcType=CHAR},
priority = #{priority,jdbcType=CHAR},
remaining_count = #{remainingCount,jdbcType=INTEGER},
repeat_count = #{repeatCount,jdbcType=INTEGER},
trigger_next_time = #{triggerNextTime,jdbcType=BIGINT},
workspace_id = #{workspaceId,jdbcType=INTEGER}
where flow_id = #{flowId,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.byit.mapper.JobFlowNodeMapper">
<resultMap id="BaseResultMap" type="com.byit.model.JobFlowNode">
<!-- generated @mbg.generated date: 2019-12-23 -->
<id column="node_id" jdbcType="INTEGER" property="nodeId" />
<result column="alarm_email" jdbcType="VARCHAR" property="alarmEmail" />
<result column="block_strategy" jdbcType="VARCHAR" property="blockStrategy" />
<result column="callback_token" jdbcType="VARCHAR" property="callbackToken" />
<result column="dependency_nodes" jdbcType="VARCHAR" property="dependencyNodes" />
<result column="failed_retry_count" jdbcType="INTEGER" property="failedRetryCount" />
<result column="flow_id" jdbcType="INTEGER" property="flowId" />
<result column="follow_task_flow" jdbcType="CHAR" property="followTaskFlow" />
<result column="gateway_token" jdbcType="VARCHAR" property="gatewayToken" />
<result column="job_type" jdbcType="VARCHAR" property="jobType" />
<result column="local_node_handler_name" jdbcType="VARCHAR" property="localNodeHandlerName" />
<result column="mail_action" jdbcType="CHAR" property="mailAction" />
<result column="node_cron" jdbcType="VARCHAR" property="nodeCron" />
<result column="node_desc" jdbcType="VARCHAR" property="nodeDesc" />
<result column="node_name" jdbcType="VARCHAR" property="nodeName" />
<result column="node_of_flow_id" jdbcType="INTEGER" property="nodeOfFlowId" />
<result column="node_timeout" jdbcType="BIGINT" property="nodeTimeout" />
<result column="node_type" jdbcType="VARCHAR" property="nodeType" />
<result column="plugin_urls" jdbcType="VARCHAR" property="pluginUrls" />
<result column="priority" jdbcType="CHAR" property="priority" />
<result column="remaining_count" jdbcType="INTEGER" property="remainingCount" />
<result column="repeat_count" jdbcType="INTEGER" property="repeatCount" />
<result column="retry_interval" jdbcType="BIGINT" property="retryInterval" />
<result column="routing_strategy" jdbcType="VARCHAR" property="routingStrategy" />
<result column="run_param" jdbcType="VARCHAR" property="runParam" />
<result column="run_source_desc" jdbcType="VARCHAR" property="runSourceDesc" />
<result column="script_urls" jdbcType="VARCHAR" property="scriptUrls" />
<result column="source_principal" jdbcType="VARCHAR" property="sourcePrincipal" />
<result column="source_update_time" jdbcType="DATE" property="sourceUpdateTime" />
<result column="trigger_next_time" jdbcType="BIGINT" property="triggerNextTime" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.byit.model.JobFlowNode">
<!-- generated @mbg.generated date: 2019-12-23 -->
<result column="run_source" jdbcType="LONGVARCHAR" property="runSource" />
</resultMap>
<sql id="Base_Column_List">
<!-- generated @mbg.generated date: 2019-12-23 -->
node_id, alarm_email, block_strategy, callback_token, dependency_nodes, failed_retry_count,
flow_id, follow_task_flow, gateway_token, job_type, local_node_handler_name, mail_action,
node_cron, node_desc, node_name, node_of_flow_id, node_timeout, node_type, plugin_urls,
priority, remaining_count, repeat_count, retry_interval, routing_strategy, run_param,
run_source_desc, script_urls, source_principal, source_update_time, trigger_next_time
</sql>
<sql id="Blob_Column_List">
<!-- generated @mbg.generated date: 2019-12-23 -->
run_source
</sql>
<select id="getById" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
<!-- generated @mbg.generated date: 2019-12-23 -->
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from job_flow_node_current
where node_id = #{nodeId,jdbcType=INTEGER}
</select>
<delete id="deleteById" parameterType="java.lang.Integer">
<!-- generated @mbg.generated date: 2019-12-23 -->
delete from job_flow_node_current
where node_id = #{nodeId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.byit.model.JobFlowNode">
<!-- generated @mbg.generated date: 2019-12-23 -->
insert into job_flow_node_current (node_id, alarm_email, block_strategy,
callback_token, dependency_nodes, failed_retry_count,
flow_id, follow_task_flow, gateway_token,
job_type, local_node_handler_name, mail_action,
node_cron, node_desc, node_name,
node_of_flow_id, node_timeout, node_type,
plugin_urls, priority, remaining_count,
repeat_count, retry_interval, routing_strategy,
run_param, run_source_desc, script_urls,
source_principal, source_update_time, trigger_next_time,
run_source)
values (#{nodeId,jdbcType=INTEGER}, #{alarmEmail,jdbcType=VARCHAR}, #{blockStrategy,jdbcType=VARCHAR},
#{callbackToken,jdbcType=VARCHAR}, #{dependencyNodes,jdbcType=VARCHAR}, #{failedRetryCount,jdbcType=INTEGER},
#{flowId,jdbcType=INTEGER}, #{followTaskFlow,jdbcType=CHAR}, #{gatewayToken,jdbcType=VARCHAR},
#{jobType,jdbcType=VARCHAR}, #{localNodeHandlerName,jdbcType=VARCHAR}, #{mailAction,jdbcType=CHAR},
#{nodeCron,jdbcType=VARCHAR}, #{nodeDesc,jdbcType=VARCHAR}, #{nodeName,jdbcType=VARCHAR},
#{nodeOfFlowId,jdbcType=INTEGER}, #{nodeTimeout,jdbcType=BIGINT}, #{nodeType,jdbcType=VARCHAR},
#{pluginUrls,jdbcType=VARCHAR}, #{priority,jdbcType=CHAR}, #{remainingCount,jdbcType=INTEGER},
#{repeatCount,jdbcType=INTEGER}, #{retryInterval,jdbcType=BIGINT}, #{routingStrategy,jdbcType=VARCHAR},
#{runParam,jdbcType=VARCHAR}, #{runSourceDesc,jdbcType=VARCHAR}, #{scriptUrls,jdbcType=VARCHAR},
#{sourcePrincipal,jdbcType=VARCHAR}, #{sourceUpdateTime,jdbcType=DATE}, #{triggerNextTime,jdbcType=BIGINT},
#{runSource,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.byit.model.JobFlowNode">
<!-- generated @mbg.generated date: 2019-12-23 -->
insert into job_flow_node_current
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="nodeId != null">
node_id,
</if>
<if test="alarmEmail != null">
alarm_email,
</if>
<if test="blockStrategy != null">
block_strategy,
</if>
<if test="callbackToken != null">
callback_token,
</if>
<if test="dependencyNodes != null">
dependency_nodes,
</if>
<if test="failedRetryCount != null">
failed_retry_count,
</if>
<if test="flowId != null">
flow_id,
</if>
<if test="followTaskFlow != null">
follow_task_flow,
</if>
<if test="gatewayToken != null">
gateway_token,
</if>
<if test="jobType != null">
job_type,
</if>
<if test="localNodeHandlerName != null">
local_node_handler_name,
</if>
<if test="mailAction != null">
mail_action,
</if>
<if test="nodeCron != null">
node_cron,
</if>
<if test="nodeDesc != null">
node_desc,
</if>
<if test="nodeName != null">
node_name,
</if>
<if test="nodeOfFlowId != null">
node_of_flow_id,
</if>
<if test="nodeTimeout != null">
node_timeout,
</if>
<if test="nodeType != null">
node_type,
</if>
<if test="pluginUrls != null">
plugin_urls,
</if>
<if test="priority != null">
priority,
</if>
<if test="remainingCount != null">
remaining_count,
</if>
<if test="repeatCount != null">
repeat_count,
</if>
<if test="retryInterval != null">
retry_interval,
</if>
<if test="routingStrategy != null">
routing_strategy,
</if>
<if test="runParam != null">
run_param,
</if>
<if test="runSourceDesc != null">
run_source_desc,
</if>
<if test="scriptUrls != null">
script_urls,
</if>
<if test="sourcePrincipal != null">
source_principal,
</if>
<if test="sourceUpdateTime != null">
source_update_time,
</if>
<if test="triggerNextTime != null">
trigger_next_time,
</if>
<if test="runSource != null">
run_source,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="nodeId != null">
#{nodeId,jdbcType=INTEGER},
</if>
<if test="alarmEmail != null">
#{alarmEmail,jdbcType=VARCHAR},
</if>
<if test="blockStrategy != null">
#{blockStrategy,jdbcType=VARCHAR},
</if>
<if test="callbackToken != null">
#{callbackToken,jdbcType=VARCHAR},
</if>
<if test="dependencyNodes != null">
#{dependencyNodes,jdbcType=VARCHAR},
</if>
<if test="failedRetryCount != null">
#{failedRetryCount,jdbcType=INTEGER},
</if>
<if test="flowId != null">
#{flowId,jdbcType=INTEGER},
</if>
<if test="followTaskFlow != null">
#{followTaskFlow,jdbcType=CHAR},
</if>
<if test="gatewayToken != null">
#{gatewayToken,jdbcType=VARCHAR},
</if>
<if test="jobType != null">
#{jobType,jdbcType=VARCHAR},
</if>
<if test="localNodeHandlerName != null">
#{localNodeHandlerName,jdbcType=VARCHAR},
</if>
<if test="mailAction != null">
#{mailAction,jdbcType=CHAR},
</if>
<if test="nodeCron != null">
#{nodeCron,jdbcType=VARCHAR},
</if>
<if test="nodeDesc != null">
#{nodeDesc,jdbcType=VARCHAR},
</if>
<if test="nodeName != null">
#{nodeName,jdbcType=VARCHAR},
</if>
<if test="nodeOfFlowId != null">
#{nodeOfFlowId,jdbcType=INTEGER},
</if>
<if test="nodeTimeout != null">
#{nodeTimeout,jdbcType=BIGINT},
</if>
<if test="nodeType != null">
#{nodeType,jdbcType=VARCHAR},
</if>
<if test="pluginUrls != null">
#{pluginUrls,jdbcType=VARCHAR},
</if>
<if test="priority != null">
#{priority,jdbcType=CHAR},
</if>
<if test="remainingCount != null">
#{remainingCount,jdbcType=INTEGER},
</if>
<if test="repeatCount != null">
#{repeatCount,jdbcType=INTEGER},
</if>
<if test="retryInterval != null">
#{retryInterval,jdbcType=BIGINT},
</if>
<if test="routingStrategy != null">
#{routingStrategy,jdbcType=VARCHAR},
</if>
<if test="runParam != null">
#{runParam,jdbcType=VARCHAR},
</if>
<if test="runSourceDesc != null">
#{runSourceDesc,jdbcType=VARCHAR},
</if>
<if test="scriptUrls != null">
#{scriptUrls,jdbcType=VARCHAR},
</if>
<if test="sourcePrincipal != null">
#{sourcePrincipal,jdbcType=VARCHAR},
</if>
<if test="sourceUpdateTime != null">
#{sourceUpdateTime,jdbcType=DATE},
</if>
<if test="triggerNextTime != null">
#{triggerNextTime,jdbcType=BIGINT},
</if>
<if test="runSource != null">
#{runSource,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByIdSelective" parameterType="com.byit.model.JobFlowNode">
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_flow_node_current
<set>
<if test="alarmEmail != null">
alarm_email = #{alarmEmail,jdbcType=VARCHAR},
</if>
<if test="blockStrategy != null">
block_strategy = #{blockStrategy,jdbcType=VARCHAR},
</if>
<if test="callbackToken != null">
callback_token = #{callbackToken,jdbcType=VARCHAR},
</if>
<if test="dependencyNodes != null">
dependency_nodes = #{dependencyNodes,jdbcType=VARCHAR},
</if>
<if test="failedRetryCount != null">
failed_retry_count = #{failedRetryCount,jdbcType=INTEGER},
</if>
<if test="flowId != null">
flow_id = #{flowId,jdbcType=INTEGER},
</if>
<if test="followTaskFlow != null">
follow_task_flow = #{followTaskFlow,jdbcType=CHAR},
</if>
<if test="gatewayToken != null">
gateway_token = #{gatewayToken,jdbcType=VARCHAR},
</if>
<if test="jobType != null">
job_type = #{jobType,jdbcType=VARCHAR},
</if>
<if test="localNodeHandlerName != null">
local_node_handler_name = #{localNodeHandlerName,jdbcType=VARCHAR},
</if>
<if test="mailAction != null">
mail_action = #{mailAction,jdbcType=CHAR},
</if>
<if test="nodeCron != null">
node_cron = #{nodeCron,jdbcType=VARCHAR},
</if>
<if test="nodeDesc != null">
node_desc = #{nodeDesc,jdbcType=VARCHAR},
</if>
<if test="nodeName != null">
node_name = #{nodeName,jdbcType=VARCHAR},
</if>
<if test="nodeOfFlowId != null">
node_of_flow_id = #{nodeOfFlowId,jdbcType=INTEGER},
</if>
<if test="nodeTimeout != null">
node_timeout = #{nodeTimeout,jdbcType=BIGINT},
</if>
<if test="nodeType != null">
node_type = #{nodeType,jdbcType=VARCHAR},
</if>
<if test="pluginUrls != null">
plugin_urls = #{pluginUrls,jdbcType=VARCHAR},
</if>
<if test="priority != null">
priority = #{priority,jdbcType=CHAR},
</if>
<if test="remainingCount != null">
remaining_count = #{remainingCount,jdbcType=INTEGER},
</if>
<if test="repeatCount != null">
repeat_count = #{repeatCount,jdbcType=INTEGER},
</if>
<if test="retryInterval != null">
retry_interval = #{retryInterval,jdbcType=BIGINT},
</if>
<if test="routingStrategy != null">
routing_strategy = #{routingStrategy,jdbcType=VARCHAR},
</if>
<if test="runParam != null">
run_param = #{runParam,jdbcType=VARCHAR},
</if>
<if test="runSourceDesc != null">
run_source_desc = #{runSourceDesc,jdbcType=VARCHAR},
</if>
<if test="scriptUrls != null">
script_urls = #{scriptUrls,jdbcType=VARCHAR},
</if>
<if test="sourcePrincipal != null">
source_principal = #{sourcePrincipal,jdbcType=VARCHAR},
</if>
<if test="sourceUpdateTime != null">
source_update_time = #{sourceUpdateTime,jdbcType=DATE},
</if>
<if test="triggerNextTime != null">
trigger_next_time = #{triggerNextTime,jdbcType=BIGINT},
</if>
<if test="runSource != null">
run_source = #{runSource,jdbcType=LONGVARCHAR},
</if>
</set>
where node_id = #{nodeId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.byit.model.JobFlowNode">
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_flow_node_current
set alarm_email = #{alarmEmail,jdbcType=VARCHAR},
block_strategy = #{blockStrategy,jdbcType=VARCHAR},
callback_token = #{callbackToken,jdbcType=VARCHAR},
dependency_nodes = #{dependencyNodes,jdbcType=VARCHAR},
failed_retry_count = #{failedRetryCount,jdbcType=INTEGER},
flow_id = #{flowId,jdbcType=INTEGER},
follow_task_flow = #{followTaskFlow,jdbcType=CHAR},
gateway_token = #{gatewayToken,jdbcType=VARCHAR},
job_type = #{jobType,jdbcType=VARCHAR},
local_node_handler_name = #{localNodeHandlerName,jdbcType=VARCHAR},
mail_action = #{mailAction,jdbcType=CHAR},
node_cron = #{nodeCron,jdbcType=VARCHAR},
node_desc = #{nodeDesc,jdbcType=VARCHAR},
node_name = #{nodeName,jdbcType=VARCHAR},
node_of_flow_id = #{nodeOfFlowId,jdbcType=INTEGER},
node_timeout = #{nodeTimeout,jdbcType=BIGINT},
node_type = #{nodeType,jdbcType=VARCHAR},
plugin_urls = #{pluginUrls,jdbcType=VARCHAR},
priority = #{priority,jdbcType=CHAR},
remaining_count = #{remainingCount,jdbcType=INTEGER},
repeat_count = #{repeatCount,jdbcType=INTEGER},
retry_interval = #{retryInterval,jdbcType=BIGINT},
routing_strategy = #{routingStrategy,jdbcType=VARCHAR},
run_param = #{runParam,jdbcType=VARCHAR},
run_source_desc = #{runSourceDesc,jdbcType=VARCHAR},
script_urls = #{scriptUrls,jdbcType=VARCHAR},
source_principal = #{sourcePrincipal,jdbcType=VARCHAR},
source_update_time = #{sourceUpdateTime,jdbcType=DATE},
trigger_next_time = #{triggerNextTime,jdbcType=BIGINT},
run_source = #{runSource,jdbcType=LONGVARCHAR}
where node_id = #{nodeId,jdbcType=INTEGER}
</update>
<update id="updateById" parameterType="com.byit.model.JobFlowNode">
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_flow_node_current
set alarm_email = #{alarmEmail,jdbcType=VARCHAR},
block_strategy = #{blockStrategy,jdbcType=VARCHAR},
callback_token = #{callbackToken,jdbcType=VARCHAR},
dependency_nodes = #{dependencyNodes,jdbcType=VARCHAR},
failed_retry_count = #{failedRetryCount,jdbcType=INTEGER},
flow_id = #{flowId,jdbcType=INTEGER},
follow_task_flow = #{followTaskFlow,jdbcType=CHAR},
gateway_token = #{gatewayToken,jdbcType=VARCHAR},
job_type = #{jobType,jdbcType=VARCHAR},
local_node_handler_name = #{localNodeHandlerName,jdbcType=VARCHAR},
mail_action = #{mailAction,jdbcType=CHAR},
node_cron = #{nodeCron,jdbcType=VARCHAR},
node_desc = #{nodeDesc,jdbcType=VARCHAR},
node_name = #{nodeName,jdbcType=VARCHAR},
node_of_flow_id = #{nodeOfFlowId,jdbcType=INTEGER},
node_timeout = #{nodeTimeout,jdbcType=BIGINT},
node_type = #{nodeType,jdbcType=VARCHAR},
plugin_urls = #{pluginUrls,jdbcType=VARCHAR},
priority = #{priority,jdbcType=CHAR},
remaining_count = #{remainingCount,jdbcType=INTEGER},
repeat_count = #{repeatCount,jdbcType=INTEGER},
retry_interval = #{retryInterval,jdbcType=BIGINT},
routing_strategy = #{routingStrategy,jdbcType=VARCHAR},
run_param = #{runParam,jdbcType=VARCHAR},
run_source_desc = #{runSourceDesc,jdbcType=VARCHAR},
script_urls = #{scriptUrls,jdbcType=VARCHAR},
source_principal = #{sourcePrincipal,jdbcType=VARCHAR},
source_update_time = #{sourceUpdateTime,jdbcType=DATE},
trigger_next_time = #{triggerNextTime,jdbcType=BIGINT}
where node_id = #{nodeId,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.byit.mapper.JobFlowNodeVersionMapper">
<resultMap id="BaseResultMap" type="com.byit.model.JobFlowNodeVersion">
<!-- generated @mbg.generated date: 2019-12-23 -->
<id column="node_id" jdbcType="INTEGER" property="nodeId" />
<result column="alarm_email" jdbcType="VARCHAR" property="alarmEmail" />
<result column="block_strategy" jdbcType="VARCHAR" property="blockStrategy" />
<result column="callback_token" jdbcType="VARCHAR" property="callbackToken" />
<result column="dependency_nodes" jdbcType="VARCHAR" property="dependencyNodes" />
<result column="failed_retry_count" jdbcType="INTEGER" property="failedRetryCount" />
<result column="flow_id" jdbcType="INTEGER" property="flowId" />
<result column="flow_version_id" jdbcType="INTEGER" property="flowVersionId" />
<result column="follow_task_flow" jdbcType="CHAR" property="followTaskFlow" />
<result column="gateway_token" jdbcType="VARCHAR" property="gatewayToken" />
<result column="job_type" jdbcType="VARCHAR" property="jobType" />
<result column="local_node_handler_name" jdbcType="VARCHAR" property="localNodeHandlerName" />
<result column="mail_action" jdbcType="CHAR" property="mailAction" />
<result column="node_cron" jdbcType="VARCHAR" property="nodeCron" />
<result column="node_desc" jdbcType="VARCHAR" property="nodeDesc" />
<result column="node_name" jdbcType="VARCHAR" property="nodeName" />
<result column="node_of_flow_id" jdbcType="INTEGER" property="nodeOfFlowId" />
<result column="node_timeout" jdbcType="BIGINT" property="nodeTimeout" />
<result column="node_type" jdbcType="VARCHAR" property="nodeType" />
<result column="plugin_urls" jdbcType="VARCHAR" property="pluginUrls" />
<result column="priority" jdbcType="CHAR" property="priority" />
<result column="remove_mark" jdbcType="CHAR" property="removeMark" />
<result column="repeat_count" jdbcType="INTEGER" property="repeatCount" />
<result column="retry_interval" jdbcType="BIGINT" property="retryInterval" />
<result column="routing_strategy" jdbcType="VARCHAR" property="routingStrategy" />
<result column="run_param" jdbcType="VARCHAR" property="runParam" />
<result column="run_source_desc" jdbcType="VARCHAR" property="runSourceDesc" />
<result column="script_urls" jdbcType="VARCHAR" property="scriptUrls" />
<result column="source_principal" jdbcType="VARCHAR" property="sourcePrincipal" />
<result column="source_update_time" jdbcType="DATE" property="sourceUpdateTime" />
<result column="trigger_next_time" jdbcType="BIGINT" property="triggerNextTime" />
<result column="version_mark" jdbcType="CHAR" property="versionMark" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.byit.model.JobFlowNodeVersion">
<!-- generated @mbg.generated date: 2019-12-23 -->
<result column="run_source" jdbcType="LONGVARCHAR" property="runSource" />
</resultMap>
<sql id="Base_Column_List">
<!-- generated @mbg.generated date: 2019-12-23 -->
node_id, alarm_email, block_strategy, callback_token, dependency_nodes, failed_retry_count,
flow_id, flow_version_id, follow_task_flow, gateway_token, job_type, local_node_handler_name,
mail_action, node_cron, node_desc, node_name, node_of_flow_id, node_timeout, node_type,
plugin_urls, priority, remove_mark, repeat_count, retry_interval, routing_strategy,
run_param, run_source_desc, script_urls, source_principal, source_update_time, trigger_next_time,
version_mark
</sql>
<sql id="Blob_Column_List">
<!-- generated @mbg.generated date: 2019-12-23 -->
run_source
</sql>
<select id="getById" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
<!-- generated @mbg.generated date: 2019-12-23 -->
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from job_flow_node_version
where node_id = #{nodeId,jdbcType=INTEGER}
</select>
<delete id="deleteById" parameterType="java.lang.Integer">
<!-- generated @mbg.generated date: 2019-12-23 -->
delete from job_flow_node_version
where node_id = #{nodeId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.byit.model.JobFlowNodeVersion">
<!-- generated @mbg.generated date: 2019-12-23 -->
insert into job_flow_node_version (node_id, alarm_email, block_strategy,
callback_token, dependency_nodes, failed_retry_count,
flow_id, flow_version_id, follow_task_flow,
gateway_token, job_type, local_node_handler_name,
mail_action, node_cron, node_desc,
node_name, node_of_flow_id, node_timeout,
node_type, plugin_urls, priority,
remove_mark, repeat_count, retry_interval,
routing_strategy, run_param, run_source_desc,
script_urls, source_principal, source_update_time,
trigger_next_time, version_mark, run_source
)
values (#{nodeId,jdbcType=INTEGER}, #{alarmEmail,jdbcType=VARCHAR}, #{blockStrategy,jdbcType=VARCHAR},
#{callbackToken,jdbcType=VARCHAR}, #{dependencyNodes,jdbcType=VARCHAR}, #{failedRetryCount,jdbcType=INTEGER},
#{flowId,jdbcType=INTEGER}, #{flowVersionId,jdbcType=INTEGER}, #{followTaskFlow,jdbcType=CHAR},
#{gatewayToken,jdbcType=VARCHAR}, #{jobType,jdbcType=VARCHAR}, #{localNodeHandlerName,jdbcType=VARCHAR},
#{mailAction,jdbcType=CHAR}, #{nodeCron,jdbcType=VARCHAR}, #{nodeDesc,jdbcType=VARCHAR},
#{nodeName,jdbcType=VARCHAR}, #{nodeOfFlowId,jdbcType=INTEGER}, #{nodeTimeout,jdbcType=BIGINT},
#{nodeType,jdbcType=VARCHAR}, #{pluginUrls,jdbcType=VARCHAR}, #{priority,jdbcType=CHAR},
#{removeMark,jdbcType=CHAR}, #{repeatCount,jdbcType=INTEGER}, #{retryInterval,jdbcType=BIGINT},
#{routingStrategy,jdbcType=VARCHAR}, #{runParam,jdbcType=VARCHAR}, #{runSourceDesc,jdbcType=VARCHAR},
#{scriptUrls,jdbcType=VARCHAR}, #{sourcePrincipal,jdbcType=VARCHAR}, #{sourceUpdateTime,jdbcType=DATE},
#{triggerNextTime,jdbcType=BIGINT}, #{versionMark,jdbcType=CHAR}, #{runSource,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.byit.model.JobFlowNodeVersion">
<!-- generated @mbg.generated date: 2019-12-23 -->
insert into job_flow_node_version
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="nodeId != null">
node_id,
</if>
<if test="alarmEmail != null">
alarm_email,
</if>
<if test="blockStrategy != null">
block_strategy,
</if>
<if test="callbackToken != null">
callback_token,
</if>
<if test="dependencyNodes != null">
dependency_nodes,
</if>
<if test="failedRetryCount != null">
failed_retry_count,
</if>
<if test="flowId != null">
flow_id,
</if>
<if test="flowVersionId != null">
flow_version_id,
</if>
<if test="followTaskFlow != null">
follow_task_flow,
</if>
<if test="gatewayToken != null">
gateway_token,
</if>
<if test="jobType != null">
job_type,
</if>
<if test="localNodeHandlerName != null">
local_node_handler_name,
</if>
<if test="mailAction != null">
mail_action,
</if>
<if test="nodeCron != null">
node_cron,
</if>
<if test="nodeDesc != null">
node_desc,
</if>
<if test="nodeName != null">
node_name,
</if>
<if test="nodeOfFlowId != null">
node_of_flow_id,
</if>
<if test="nodeTimeout != null">
node_timeout,
</if>
<if test="nodeType != null">
node_type,
</if>
<if test="pluginUrls != null">
plugin_urls,
</if>
<if test="priority != null">
priority,
</if>
<if test="removeMark != null">
remove_mark,
</if>
<if test="repeatCount != null">
repeat_count,
</if>
<if test="retryInterval != null">
retry_interval,
</if>
<if test="routingStrategy != null">
routing_strategy,
</if>
<if test="runParam != null">
run_param,
</if>
<if test="runSourceDesc != null">
run_source_desc,
</if>
<if test="scriptUrls != null">
script_urls,
</if>
<if test="sourcePrincipal != null">
source_principal,
</if>
<if test="sourceUpdateTime != null">
source_update_time,
</if>
<if test="triggerNextTime != null">
trigger_next_time,
</if>
<if test="versionMark != null">
version_mark,
</if>
<if test="runSource != null">
run_source,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="nodeId != null">
#{nodeId,jdbcType=INTEGER},
</if>
<if test="alarmEmail != null">
#{alarmEmail,jdbcType=VARCHAR},
</if>
<if test="blockStrategy != null">
#{blockStrategy,jdbcType=VARCHAR},
</if>
<if test="callbackToken != null">
#{callbackToken,jdbcType=VARCHAR},
</if>
<if test="dependencyNodes != null">
#{dependencyNodes,jdbcType=VARCHAR},
</if>
<if test="failedRetryCount != null">
#{failedRetryCount,jdbcType=INTEGER},
</if>
<if test="flowId != null">
#{flowId,jdbcType=INTEGER},
</if>
<if test="flowVersionId != null">
#{flowVersionId,jdbcType=INTEGER},
</if>
<if test="followTaskFlow != null">
#{followTaskFlow,jdbcType=CHAR},
</if>
<if test="gatewayToken != null">
#{gatewayToken,jdbcType=VARCHAR},
</if>
<if test="jobType != null">
#{jobType,jdbcType=VARCHAR},
</if>
<if test="localNodeHandlerName != null">
#{localNodeHandlerName,jdbcType=VARCHAR},
</if>
<if test="mailAction != null">
#{mailAction,jdbcType=CHAR},
</if>
<if test="nodeCron != null">
#{nodeCron,jdbcType=VARCHAR},
</if>
<if test="nodeDesc != null">
#{nodeDesc,jdbcType=VARCHAR},
</if>
<if test="nodeName != null">
#{nodeName,jdbcType=VARCHAR},
</if>
<if test="nodeOfFlowId != null">
#{nodeOfFlowId,jdbcType=INTEGER},
</if>
<if test="nodeTimeout != null">
#{nodeTimeout,jdbcType=BIGINT},
</if>
<if test="nodeType != null">
#{nodeType,jdbcType=VARCHAR},
</if>
<if test="pluginUrls != null">
#{pluginUrls,jdbcType=VARCHAR},
</if>
<if test="priority != null">
#{priority,jdbcType=CHAR},
</if>
<if test="removeMark != null">
#{removeMark,jdbcType=CHAR},
</if>
<if test="repeatCount != null">
#{repeatCount,jdbcType=INTEGER},
</if>
<if test="retryInterval != null">
#{retryInterval,jdbcType=BIGINT},
</if>
<if test="routingStrategy != null">
#{routingStrategy,jdbcType=VARCHAR},
</if>
<if test="runParam != null">
#{runParam,jdbcType=VARCHAR},
</if>
<if test="runSourceDesc != null">
#{runSourceDesc,jdbcType=VARCHAR},
</if>
<if test="scriptUrls != null">
#{scriptUrls,jdbcType=VARCHAR},
</if>
<if test="sourcePrincipal != null">
#{sourcePrincipal,jdbcType=VARCHAR},
</if>
<if test="sourceUpdateTime != null">
#{sourceUpdateTime,jdbcType=DATE},
</if>
<if test="triggerNextTime != null">
#{triggerNextTime,jdbcType=BIGINT},
</if>
<if test="versionMark != null">
#{versionMark,jdbcType=CHAR},
</if>
<if test="runSource != null">
#{runSource,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByIdSelective" parameterType="com.byit.model.JobFlowNodeVersion">
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_flow_node_version
<set>
<if test="alarmEmail != null">
alarm_email = #{alarmEmail,jdbcType=VARCHAR},
</if>
<if test="blockStrategy != null">
block_strategy = #{blockStrategy,jdbcType=VARCHAR},
</if>
<if test="callbackToken != null">
callback_token = #{callbackToken,jdbcType=VARCHAR},
</if>
<if test="dependencyNodes != null">
dependency_nodes = #{dependencyNodes,jdbcType=VARCHAR},
</if>
<if test="failedRetryCount != null">
failed_retry_count = #{failedRetryCount,jdbcType=INTEGER},
</if>
<if test="flowId != null">
flow_id = #{flowId,jdbcType=INTEGER},
</if>
<if test="flowVersionId != null">
flow_version_id = #{flowVersionId,jdbcType=INTEGER},
</if>
<if test="followTaskFlow != null">
follow_task_flow = #{followTaskFlow,jdbcType=CHAR},
</if>
<if test="gatewayToken != null">
gateway_token = #{gatewayToken,jdbcType=VARCHAR},
</if>
<if test="jobType != null">
job_type = #{jobType,jdbcType=VARCHAR},
</if>
<if test="localNodeHandlerName != null">
local_node_handler_name = #{localNodeHandlerName,jdbcType=VARCHAR},
</if>
<if test="mailAction != null">
mail_action = #{mailAction,jdbcType=CHAR},
</if>
<if test="nodeCron != null">
node_cron = #{nodeCron,jdbcType=VARCHAR},
</if>
<if test="nodeDesc != null">
node_desc = #{nodeDesc,jdbcType=VARCHAR},
</if>
<if test="nodeName != null">
node_name = #{nodeName,jdbcType=VARCHAR},
</if>
<if test="nodeOfFlowId != null">
node_of_flow_id = #{nodeOfFlowId,jdbcType=INTEGER},
</if>
<if test="nodeTimeout != null">
node_timeout = #{nodeTimeout,jdbcType=BIGINT},
</if>
<if test="nodeType != null">
node_type = #{nodeType,jdbcType=VARCHAR},
</if>
<if test="pluginUrls != null">
plugin_urls = #{pluginUrls,jdbcType=VARCHAR},
</if>
<if test="priority != null">
priority = #{priority,jdbcType=CHAR},
</if>
<if test="removeMark != null">
remove_mark = #{removeMark,jdbcType=CHAR},
</if>
<if test="repeatCount != null">
repeat_count = #{repeatCount,jdbcType=INTEGER},
</if>
<if test="retryInterval != null">
retry_interval = #{retryInterval,jdbcType=BIGINT},
</if>
<if test="routingStrategy != null">
routing_strategy = #{routingStrategy,jdbcType=VARCHAR},
</if>
<if test="runParam != null">
run_param = #{runParam,jdbcType=VARCHAR},
</if>
<if test="runSourceDesc != null">
run_source_desc = #{runSourceDesc,jdbcType=VARCHAR},
</if>
<if test="scriptUrls != null">
script_urls = #{scriptUrls,jdbcType=VARCHAR},
</if>
<if test="sourcePrincipal != null">
source_principal = #{sourcePrincipal,jdbcType=VARCHAR},
</if>
<if test="sourceUpdateTime != null">
source_update_time = #{sourceUpdateTime,jdbcType=DATE},
</if>
<if test="triggerNextTime != null">
trigger_next_time = #{triggerNextTime,jdbcType=BIGINT},
</if>
<if test="versionMark != null">
version_mark = #{versionMark,jdbcType=CHAR},
</if>
<if test="runSource != null">
run_source = #{runSource,jdbcType=LONGVARCHAR},
</if>
</set>
where node_id = #{nodeId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.byit.model.JobFlowNodeVersion">
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_flow_node_version
set alarm_email = #{alarmEmail,jdbcType=VARCHAR},
block_strategy = #{blockStrategy,jdbcType=VARCHAR},
callback_token = #{callbackToken,jdbcType=VARCHAR},
dependency_nodes = #{dependencyNodes,jdbcType=VARCHAR},
failed_retry_count = #{failedRetryCount,jdbcType=INTEGER},
flow_id = #{flowId,jdbcType=INTEGER},
flow_version_id = #{flowVersionId,jdbcType=INTEGER},
follow_task_flow = #{followTaskFlow,jdbcType=CHAR},
gateway_token = #{gatewayToken,jdbcType=VARCHAR},
job_type = #{jobType,jdbcType=VARCHAR},
local_node_handler_name = #{localNodeHandlerName,jdbcType=VARCHAR},
mail_action = #{mailAction,jdbcType=CHAR},
node_cron = #{nodeCron,jdbcType=VARCHAR},
node_desc = #{nodeDesc,jdbcType=VARCHAR},
node_name = #{nodeName,jdbcType=VARCHAR},
node_of_flow_id = #{nodeOfFlowId,jdbcType=INTEGER},
node_timeout = #{nodeTimeout,jdbcType=BIGINT},
node_type = #{nodeType,jdbcType=VARCHAR},
plugin_urls = #{pluginUrls,jdbcType=VARCHAR},
priority = #{priority,jdbcType=CHAR},
remove_mark = #{removeMark,jdbcType=CHAR},
repeat_count = #{repeatCount,jdbcType=INTEGER},
retry_interval = #{retryInterval,jdbcType=BIGINT},
routing_strategy = #{routingStrategy,jdbcType=VARCHAR},
run_param = #{runParam,jdbcType=VARCHAR},
run_source_desc = #{runSourceDesc,jdbcType=VARCHAR},
script_urls = #{scriptUrls,jdbcType=VARCHAR},
source_principal = #{sourcePrincipal,jdbcType=VARCHAR},
source_update_time = #{sourceUpdateTime,jdbcType=DATE},
trigger_next_time = #{triggerNextTime,jdbcType=BIGINT},
version_mark = #{versionMark,jdbcType=CHAR},
run_source = #{runSource,jdbcType=LONGVARCHAR}
where node_id = #{nodeId,jdbcType=INTEGER}
</update>
<update id="updateById" parameterType="com.byit.model.JobFlowNodeVersion">
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_flow_node_version
set alarm_email = #{alarmEmail,jdbcType=VARCHAR},
block_strategy = #{blockStrategy,jdbcType=VARCHAR},
callback_token = #{callbackToken,jdbcType=VARCHAR},
dependency_nodes = #{dependencyNodes,jdbcType=VARCHAR},
failed_retry_count = #{failedRetryCount,jdbcType=INTEGER},
flow_id = #{flowId,jdbcType=INTEGER},
flow_version_id = #{flowVersionId,jdbcType=INTEGER},
follow_task_flow = #{followTaskFlow,jdbcType=CHAR},
gateway_token = #{gatewayToken,jdbcType=VARCHAR},
job_type = #{jobType,jdbcType=VARCHAR},
local_node_handler_name = #{localNodeHandlerName,jdbcType=VARCHAR},
mail_action = #{mailAction,jdbcType=CHAR},
node_cron = #{nodeCron,jdbcType=VARCHAR},
node_desc = #{nodeDesc,jdbcType=VARCHAR},
node_name = #{nodeName,jdbcType=VARCHAR},
node_of_flow_id = #{nodeOfFlowId,jdbcType=INTEGER},
node_timeout = #{nodeTimeout,jdbcType=BIGINT},
node_type = #{nodeType,jdbcType=VARCHAR},
plugin_urls = #{pluginUrls,jdbcType=VARCHAR},
priority = #{priority,jdbcType=CHAR},
remove_mark = #{removeMark,jdbcType=CHAR},
repeat_count = #{repeatCount,jdbcType=INTEGER},
retry_interval = #{retryInterval,jdbcType=BIGINT},
routing_strategy = #{routingStrategy,jdbcType=VARCHAR},
run_param = #{runParam,jdbcType=VARCHAR},
run_source_desc = #{runSourceDesc,jdbcType=VARCHAR},
script_urls = #{scriptUrls,jdbcType=VARCHAR},
source_principal = #{sourcePrincipal,jdbcType=VARCHAR},
source_update_time = #{sourceUpdateTime,jdbcType=DATE},
trigger_next_time = #{triggerNextTime,jdbcType=BIGINT},
version_mark = #{versionMark,jdbcType=CHAR}
where node_id = #{nodeId,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.byit.mapper.JobFlowRunRecordingMapper">
<resultMap id="BaseResultMap" type="com.byit.model.JobFlowRunRecording">
<!-- generated @mbg.generated date: 2019-12-23 -->
<id column="recording_id" jdbcType="INTEGER" property="recordingId" />
<result column="run_id" jdbcType="VARCHAR" property="runId" />
<result column="alarm_email" jdbcType="VARCHAR" property="alarmEmail" />
<result column="dispatch_ip" jdbcType="VARCHAR" property="dispatchIp" />
<result column="flow_name" jdbcType="VARCHAR" property="flowName" />
<result column="flow_run_result" jdbcType="CHAR" property="flowRunResult" />
<result column="flow_status" jdbcType="CHAR" property="flowStatus" />
<result column="flow_timeout" jdbcType="BIGINT" property="flowTimeout" />
<result column="flow_version_id" jdbcType="INTEGER" property="flowVersionId" />
<result column="mail_action" jdbcType="CHAR" property="mailAction" />
<result column="node_count" jdbcType="INTEGER" property="nodeCount" />
<result column="priority" jdbcType="CHAR" property="priority" />
<result column="remaining_node" jdbcType="INTEGER" property="remainingNode" />
<result column="trigger_status" jdbcType="CHAR" property="triggerStatus" />
<result column="trigger_time" jdbcType="BIGINT" property="triggerTime" />
</resultMap>
<sql id="Base_Column_List">
<!-- generated @mbg.generated date: 2019-12-23 -->
recording_id, run_id, alarm_email, dispatch_ip, flow_name, flow_run_result, flow_status,
flow_timeout, flow_version_id, mail_action, node_count, priority, remaining_node,
trigger_status, trigger_time
</sql>
<select id="getById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!-- generated @mbg.generated date: 2019-12-23 -->
select
<include refid="Base_Column_List" />
from job_flow_run_recording
where recording_id = #{recordingId,jdbcType=INTEGER}
</select>
<delete id="deleteById" parameterType="java.lang.Integer">
<!-- generated @mbg.generated date: 2019-12-23 -->
delete from job_flow_run_recording
where recording_id = #{recordingId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.byit.model.JobFlowRunRecording">
<!-- generated @mbg.generated date: 2019-12-23 -->
insert into job_flow_run_recording (recording_id, run_id, alarm_email,
dispatch_ip, flow_name, flow_run_result,
flow_status, flow_timeout, flow_version_id,
mail_action, node_count, priority,
remaining_node, trigger_status, trigger_time
)
values (#{recordingId,jdbcType=INTEGER}, #{runId,jdbcType=VARCHAR}, #{alarmEmail,jdbcType=VARCHAR},
#{dispatchIp,jdbcType=VARCHAR}, #{flowName,jdbcType=VARCHAR}, #{flowRunResult,jdbcType=CHAR},
#{flowStatus,jdbcType=CHAR}, #{flowTimeout,jdbcType=BIGINT}, #{flowVersionId,jdbcType=INTEGER},
#{mailAction,jdbcType=CHAR}, #{nodeCount,jdbcType=INTEGER}, #{priority,jdbcType=CHAR},
#{remainingNode,jdbcType=INTEGER}, #{triggerStatus,jdbcType=CHAR}, #{triggerTime,jdbcType=BIGINT}
)
</insert>
<insert id="insertSelective" parameterType="com.byit.model.JobFlowRunRecording">
<!-- generated @mbg.generated date: 2019-12-23 -->
insert into job_flow_run_recording
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="recordingId != null">
recording_id,
</if>
<if test="runId != null">
run_id,
</if>
<if test="alarmEmail != null">
alarm_email,
</if>
<if test="dispatchIp != null">
dispatch_ip,
</if>
<if test="flowName != null">
flow_name,
</if>
<if test="flowRunResult != null">
flow_run_result,
</if>
<if test="flowStatus != null">
flow_status,
</if>
<if test="flowTimeout != null">
flow_timeout,
</if>
<if test="flowVersionId != null">
flow_version_id,
</if>
<if test="mailAction != null">
mail_action,
</if>
<if test="nodeCount != null">
node_count,
</if>
<if test="priority != null">
priority,
</if>
<if test="remainingNode != null">
remaining_node,
</if>
<if test="triggerStatus != null">
trigger_status,
</if>
<if test="triggerTime != null">
trigger_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="recordingId != null">
#{recordingId,jdbcType=INTEGER},
</if>
<if test="runId != null">
#{runId,jdbcType=VARCHAR},
</if>
<if test="alarmEmail != null">
#{alarmEmail,jdbcType=VARCHAR},
</if>
<if test="dispatchIp != null">
#{dispatchIp,jdbcType=VARCHAR},
</if>
<if test="flowName != null">
#{flowName,jdbcType=VARCHAR},
</if>
<if test="flowRunResult != null">
#{flowRunResult,jdbcType=CHAR},
</if>
<if test="flowStatus != null">
#{flowStatus,jdbcType=CHAR},
</if>
<if test="flowTimeout != null">
#{flowTimeout,jdbcType=BIGINT},
</if>
<if test="flowVersionId != null">
#{flowVersionId,jdbcType=INTEGER},
</if>
<if test="mailAction != null">
#{mailAction,jdbcType=CHAR},
</if>
<if test="nodeCount != null">
#{nodeCount,jdbcType=INTEGER},
</if>
<if test="priority != null">
#{priority,jdbcType=CHAR},
</if>
<if test="remainingNode != null">
#{remainingNode,jdbcType=INTEGER},
</if>
<if test="triggerStatus != null">
#{triggerStatus,jdbcType=CHAR},
</if>
<if test="triggerTime != null">
#{triggerTime,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update id="updateByIdSelective" parameterType="com.byit.model.JobFlowRunRecording">
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_flow_run_recording
<set>
<if test="runId != null">
run_id = #{runId,jdbcType=VARCHAR},
</if>
<if test="alarmEmail != null">
alarm_email = #{alarmEmail,jdbcType=VARCHAR},
</if>
<if test="dispatchIp != null">
dispatch_ip = #{dispatchIp,jdbcType=VARCHAR},
</if>
<if test="flowName != null">
flow_name = #{flowName,jdbcType=VARCHAR},
</if>
<if test="flowRunResult != null">
flow_run_result = #{flowRunResult,jdbcType=CHAR},
</if>
<if test="flowStatus != null">
flow_status = #{flowStatus,jdbcType=CHAR},
</if>
<if test="flowTimeout != null">
flow_timeout = #{flowTimeout,jdbcType=BIGINT},
</if>
<if test="flowVersionId != null">
flow_version_id = #{flowVersionId,jdbcType=INTEGER},
</if>
<if test="mailAction != null">
mail_action = #{mailAction,jdbcType=CHAR},
</if>
<if test="nodeCount != null">
node_count = #{nodeCount,jdbcType=INTEGER},
</if>
<if test="priority != null">
priority = #{priority,jdbcType=CHAR},
</if>
<if test="remainingNode != null">
remaining_node = #{remainingNode,jdbcType=INTEGER},
</if>
<if test="triggerStatus != null">
trigger_status = #{triggerStatus,jdbcType=CHAR},
</if>
<if test="triggerTime != null">
trigger_time = #{triggerTime,jdbcType=BIGINT},
</if>
</set>
where recording_id = #{recordingId,jdbcType=INTEGER}
</update>
<update id="updateById" parameterType="com.byit.model.JobFlowRunRecording">
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_flow_run_recording
set run_id = #{runId,jdbcType=VARCHAR},
alarm_email = #{alarmEmail,jdbcType=VARCHAR},
dispatch_ip = #{dispatchIp,jdbcType=VARCHAR},
flow_name = #{flowName,jdbcType=VARCHAR},
flow_run_result = #{flowRunResult,jdbcType=CHAR},
flow_status = #{flowStatus,jdbcType=CHAR},
flow_timeout = #{flowTimeout,jdbcType=BIGINT},
flow_version_id = #{flowVersionId,jdbcType=INTEGER},
mail_action = #{mailAction,jdbcType=CHAR},
node_count = #{nodeCount,jdbcType=INTEGER},
priority = #{priority,jdbcType=CHAR},
remaining_node = #{remainingNode,jdbcType=INTEGER},
trigger_status = #{triggerStatus,jdbcType=CHAR},
trigger_time = #{triggerTime,jdbcType=BIGINT}
where recording_id = #{recordingId,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.byit.mapper.JobFlowVersionMapper">
<resultMap id="BaseResultMap" type="com.byit.model.JobFlowVersion">
<!-- generated @mbg.generated date: 2019-12-23 -->
<id column="version_id" jdbcType="INTEGER" property="versionId" />
<result column="add_time" jdbcType="DATE" property="addTime" />
<result column="alarm_email" jdbcType="VARCHAR" property="alarmEmail" />
<result column="exec_type" jdbcType="CHAR" property="execType" />
<result column="flow_cron" jdbcType="VARCHAR" property="flowCron" />
<result column="flow_desc" jdbcType="VARCHAR" property="flowDesc" />
<result column="flow_id" jdbcType="INTEGER" property="flowId" />
<result column="flow_name" jdbcType="VARCHAR" property="flowName" />
<result column="flow_node_count" jdbcType="INTEGER" property="flowNodeCount" />
<result column="flow_timeout" jdbcType="BIGINT" property="flowTimeout" />
<result column="mail_action" jdbcType="CHAR" property="mailAction" />
<result column="node_date_is_follow_flow" jdbcType="CHAR" property="nodeDateIsFollowFlow" />
<result column="priority" jdbcType="CHAR" property="priority" />
<result column="remove_mark" jdbcType="CHAR" property="removeMark" />
<result column="repeat_count" jdbcType="INTEGER" property="repeatCount" />
<result column="update_time" jdbcType="DATE" property="updateTime" />
<result column="version_mark" jdbcType="CHAR" property="versionMark" />
<result column="workspace_id" jdbcType="INTEGER" property="workspaceId" />
</resultMap>
<sql id="Base_Column_List">
<!-- generated @mbg.generated date: 2019-12-23 -->
version_id, add_time, alarm_email, exec_type, flow_cron, flow_desc, flow_id, flow_name,
flow_node_count, flow_timeout, mail_action, node_date_is_follow_flow, priority, remove_mark,
repeat_count, update_time, version_mark, workspace_id
</sql>
<select id="getById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!-- generated @mbg.generated date: 2019-12-23 -->
select
<include refid="Base_Column_List" />
from job_flow_version
where version_id = #{versionId,jdbcType=INTEGER}
</select>
<delete id="deleteById" parameterType="java.lang.Integer">
<!-- generated @mbg.generated date: 2019-12-23 -->
delete from job_flow_version
where version_id = #{versionId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.byit.model.JobFlowVersion">
<!-- generated @mbg.generated date: 2019-12-23 -->
insert into job_flow_version (version_id, add_time, alarm_email,
exec_type, flow_cron, flow_desc,
flow_id, flow_name, flow_node_count,
flow_timeout, mail_action, node_date_is_follow_flow,
priority, remove_mark, repeat_count,
update_time, version_mark, workspace_id
)
values (#{versionId,jdbcType=INTEGER}, #{addTime,jdbcType=DATE}, #{alarmEmail,jdbcType=VARCHAR},
#{execType,jdbcType=CHAR}, #{flowCron,jdbcType=VARCHAR}, #{flowDesc,jdbcType=VARCHAR},
#{flowId,jdbcType=INTEGER}, #{flowName,jdbcType=VARCHAR}, #{flowNodeCount,jdbcType=INTEGER},
#{flowTimeout,jdbcType=BIGINT}, #{mailAction,jdbcType=CHAR}, #{nodeDateIsFollowFlow,jdbcType=CHAR},
#{priority,jdbcType=CHAR}, #{removeMark,jdbcType=CHAR}, #{repeatCount,jdbcType=INTEGER},
#{updateTime,jdbcType=DATE}, #{versionMark,jdbcType=CHAR}, #{workspaceId,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.byit.model.JobFlowVersion">
<!-- generated @mbg.generated date: 2019-12-23 -->
insert into job_flow_version
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="versionId != null">
version_id,
</if>
<if test="addTime != null">
add_time,
</if>
<if test="alarmEmail != null">
alarm_email,
</if>
<if test="execType != null">
exec_type,
</if>
<if test="flowCron != null">
flow_cron,
</if>
<if test="flowDesc != null">
flow_desc,
</if>
<if test="flowId != null">
flow_id,
</if>
<if test="flowName != null">
flow_name,
</if>
<if test="flowNodeCount != null">
flow_node_count,
</if>
<if test="flowTimeout != null">
flow_timeout,
</if>
<if test="mailAction != null">
mail_action,
</if>
<if test="nodeDateIsFollowFlow != null">
node_date_is_follow_flow,
</if>
<if test="priority != null">
priority,
</if>
<if test="removeMark != null">
remove_mark,
</if>
<if test="repeatCount != null">
repeat_count,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="versionMark != null">
version_mark,
</if>
<if test="workspaceId != null">
workspace_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="versionId != null">
#{versionId,jdbcType=INTEGER},
</if>
<if test="addTime != null">
#{addTime,jdbcType=DATE},
</if>
<if test="alarmEmail != null">
#{alarmEmail,jdbcType=VARCHAR},
</if>
<if test="execType != null">
#{execType,jdbcType=CHAR},
</if>
<if test="flowCron != null">
#{flowCron,jdbcType=VARCHAR},
</if>
<if test="flowDesc != null">
#{flowDesc,jdbcType=VARCHAR},
</if>
<if test="flowId != null">
#{flowId,jdbcType=INTEGER},
</if>
<if test="flowName != null">
#{flowName,jdbcType=VARCHAR},
</if>
<if test="flowNodeCount != null">
#{flowNodeCount,jdbcType=INTEGER},
</if>
<if test="flowTimeout != null">
#{flowTimeout,jdbcType=BIGINT},
</if>
<if test="mailAction != null">
#{mailAction,jdbcType=CHAR},
</if>
<if test="nodeDateIsFollowFlow != null">
#{nodeDateIsFollowFlow,jdbcType=CHAR},
</if>
<if test="priority != null">
#{priority,jdbcType=CHAR},
</if>
<if test="removeMark != null">
#{removeMark,jdbcType=CHAR},
</if>
<if test="repeatCount != null">
#{repeatCount,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=DATE},
</if>
<if test="versionMark != null">
#{versionMark,jdbcType=CHAR},
</if>
<if test="workspaceId != null">
#{workspaceId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByIdSelective" parameterType="com.byit.model.JobFlowVersion">
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_flow_version
<set>
<if test="addTime != null">
add_time = #{addTime,jdbcType=DATE},
</if>
<if test="alarmEmail != null">
alarm_email = #{alarmEmail,jdbcType=VARCHAR},
</if>
<if test="execType != null">
exec_type = #{execType,jdbcType=CHAR},
</if>
<if test="flowCron != null">
flow_cron = #{flowCron,jdbcType=VARCHAR},
</if>
<if test="flowDesc != null">
flow_desc = #{flowDesc,jdbcType=VARCHAR},
</if>
<if test="flowId != null">
flow_id = #{flowId,jdbcType=INTEGER},
</if>
<if test="flowName != null">
flow_name = #{flowName,jdbcType=VARCHAR},
</if>
<if test="flowNodeCount != null">
flow_node_count = #{flowNodeCount,jdbcType=INTEGER},
</if>
<if test="flowTimeout != null">
flow_timeout = #{flowTimeout,jdbcType=BIGINT},
</if>
<if test="mailAction != null">
mail_action = #{mailAction,jdbcType=CHAR},
</if>
<if test="nodeDateIsFollowFlow != null">
node_date_is_follow_flow = #{nodeDateIsFollowFlow,jdbcType=CHAR},
</if>
<if test="priority != null">
priority = #{priority,jdbcType=CHAR},
</if>
<if test="removeMark != null">
remove_mark = #{removeMark,jdbcType=CHAR},
</if>
<if test="repeatCount != null">
repeat_count = #{repeatCount,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=DATE},
</if>
<if test="versionMark != null">
version_mark = #{versionMark,jdbcType=CHAR},
</if>
<if test="workspaceId != null">
workspace_id = #{workspaceId,jdbcType=INTEGER},
</if>
</set>
where version_id = #{versionId,jdbcType=INTEGER}
</update>
<update id="updateById" parameterType="com.byit.model.JobFlowVersion">
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_flow_version
set add_time = #{addTime,jdbcType=DATE},
alarm_email = #{alarmEmail,jdbcType=VARCHAR},
exec_type = #{execType,jdbcType=CHAR},
flow_cron = #{flowCron,jdbcType=VARCHAR},
flow_desc = #{flowDesc,jdbcType=VARCHAR},
flow_id = #{flowId,jdbcType=INTEGER},
flow_name = #{flowName,jdbcType=VARCHAR},
flow_node_count = #{flowNodeCount,jdbcType=INTEGER},
flow_timeout = #{flowTimeout,jdbcType=BIGINT},
mail_action = #{mailAction,jdbcType=CHAR},
node_date_is_follow_flow = #{nodeDateIsFollowFlow,jdbcType=CHAR},
priority = #{priority,jdbcType=CHAR},
remove_mark = #{removeMark,jdbcType=CHAR},
repeat_count = #{repeatCount,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=DATE},
version_mark = #{versionMark,jdbcType=CHAR},
workspace_id = #{workspaceId,jdbcType=INTEGER}
where version_id = #{versionId,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.byit.mapper.JobTaskMapper">
<resultMap id="BaseResultMap" type="com.byit.model.JobTask">
<!-- generated @mbg.generated date: 2019-12-23 -->
<id column="node_id" jdbcType="INTEGER" property="nodeId" />
<result column="alarm_email" jdbcType="VARCHAR" property="alarmEmail" />
<result column="block_strategy" jdbcType="VARCHAR" property="blockStrategy" />
<result column="callback_token" jdbcType="VARCHAR" property="callbackToken" />
<result column="dependency_nodes" jdbcType="VARCHAR" property="dependencyNodes" />
<result column="failed_retry_count" jdbcType="INTEGER" property="failedRetryCount" />
<result column="flow_id" jdbcType="INTEGER" property="flowId" />
<result column="follow_task_flow" jdbcType="CHAR" property="followTaskFlow" />
<result column="gateway_token" jdbcType="VARCHAR" property="gatewayToken" />
<result column="job_type" jdbcType="VARCHAR" property="jobType" />
<result column="local_node_handler_name" jdbcType="VARCHAR" property="localNodeHandlerName" />
<result column="mail_action" jdbcType="CHAR" property="mailAction" />
<result column="node_cron" jdbcType="VARCHAR" property="nodeCron" />
<result column="node_desc" jdbcType="VARCHAR" property="nodeDesc" />
<result column="node_name" jdbcType="VARCHAR" property="nodeName" />
<result column="node_of_flow_id" jdbcType="INTEGER" property="nodeOfFlowId" />
<result column="node_timeout" jdbcType="BIGINT" property="nodeTimeout" />
<result column="node_type" jdbcType="VARCHAR" property="nodeType" />
<result column="plugin_urls" jdbcType="VARCHAR" property="pluginUrls" />
<result column="priority" jdbcType="CHAR" property="priority" />
<result column="remaining_count" jdbcType="INTEGER" property="remainingCount" />
<result column="repeat_count" jdbcType="INTEGER" property="repeatCount" />
<result column="retry_interval" jdbcType="BIGINT" property="retryInterval" />
<result column="routing_strategy" jdbcType="VARCHAR" property="routingStrategy" />
<result column="run_id" jdbcType="VARCHAR" property="runId" />
<result column="run_param" jdbcType="VARCHAR" property="runParam" />
<result column="run_source_desc" jdbcType="VARCHAR" property="runSourceDesc" />
<result column="script_urls" jdbcType="VARCHAR" property="scriptUrls" />
<result column="source_principal" jdbcType="VARCHAR" property="sourcePrincipal" />
<result column="source_update_time" jdbcType="DATE" property="sourceUpdateTime" />
<result column="trigger_next_time" jdbcType="BIGINT" property="triggerNextTime" />
<result column="trigger_status" jdbcType="CHAR" property="triggerStatus" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.byit.model.JobTask">
<!-- generated @mbg.generated date: 2019-12-23 -->
<result column="run_source" jdbcType="LONGVARCHAR" property="runSource" />
</resultMap>
<sql id="Base_Column_List">
<!-- generated @mbg.generated date: 2019-12-23 -->
node_id, alarm_email, block_strategy, callback_token, dependency_nodes, failed_retry_count,
flow_id, follow_task_flow, gateway_token, job_type, local_node_handler_name, mail_action,
node_cron, node_desc, node_name, node_of_flow_id, node_timeout, node_type, plugin_urls,
priority, remaining_count, repeat_count, retry_interval, routing_strategy, run_id,
run_param, run_source_desc, script_urls, source_principal, source_update_time, trigger_next_time,
trigger_status
</sql>
<sql id="Blob_Column_List">
<!-- generated @mbg.generated date: 2019-12-23 -->
run_source
</sql>
<select id="getById" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
<!-- generated @mbg.generated date: 2019-12-23 -->
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from job_task
where node_id = #{nodeId,jdbcType=INTEGER}
</select>
<delete id="deleteById" parameterType="java.lang.Integer">
<!-- generated @mbg.generated date: 2019-12-23 -->
delete from job_task
where node_id = #{nodeId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.byit.model.JobTask">
<!-- generated @mbg.generated date: 2019-12-23 -->
insert into job_task (node_id, alarm_email, block_strategy,
callback_token, dependency_nodes, failed_retry_count,
flow_id, follow_task_flow, gateway_token,
job_type, local_node_handler_name, mail_action,
node_cron, node_desc, node_name,
node_of_flow_id, node_timeout, node_type,
plugin_urls, priority, remaining_count,
repeat_count, retry_interval, routing_strategy,
run_id, run_param, run_source_desc,
script_urls, source_principal, source_update_time,
trigger_next_time, trigger_status, run_source
)
values (#{nodeId,jdbcType=INTEGER}, #{alarmEmail,jdbcType=VARCHAR}, #{blockStrategy,jdbcType=VARCHAR},
#{callbackToken,jdbcType=VARCHAR}, #{dependencyNodes,jdbcType=VARCHAR}, #{failedRetryCount,jdbcType=INTEGER},
#{flowId,jdbcType=INTEGER}, #{followTaskFlow,jdbcType=CHAR}, #{gatewayToken,jdbcType=VARCHAR},
#{jobType,jdbcType=VARCHAR}, #{localNodeHandlerName,jdbcType=VARCHAR}, #{mailAction,jdbcType=CHAR},
#{nodeCron,jdbcType=VARCHAR}, #{nodeDesc,jdbcType=VARCHAR}, #{nodeName,jdbcType=VARCHAR},
#{nodeOfFlowId,jdbcType=INTEGER}, #{nodeTimeout,jdbcType=BIGINT}, #{nodeType,jdbcType=VARCHAR},
#{pluginUrls,jdbcType=VARCHAR}, #{priority,jdbcType=CHAR}, #{remainingCount,jdbcType=INTEGER},
#{repeatCount,jdbcType=INTEGER}, #{retryInterval,jdbcType=BIGINT}, #{routingStrategy,jdbcType=VARCHAR},
#{runId,jdbcType=VARCHAR}, #{runParam,jdbcType=VARCHAR}, #{runSourceDesc,jdbcType=VARCHAR},
#{scriptUrls,jdbcType=VARCHAR}, #{sourcePrincipal,jdbcType=VARCHAR}, #{sourceUpdateTime,jdbcType=DATE},
#{triggerNextTime,jdbcType=BIGINT}, #{triggerStatus,jdbcType=CHAR}, #{runSource,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.byit.model.JobTask">
<!-- generated @mbg.generated date: 2019-12-23 -->
insert into job_task
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="nodeId != null">
node_id,
</if>
<if test="alarmEmail != null">
alarm_email,
</if>
<if test="blockStrategy != null">
block_strategy,
</if>
<if test="callbackToken != null">
callback_token,
</if>
<if test="dependencyNodes != null">
dependency_nodes,
</if>
<if test="failedRetryCount != null">
failed_retry_count,
</if>
<if test="flowId != null">
flow_id,
</if>
<if test="followTaskFlow != null">
follow_task_flow,
</if>
<if test="gatewayToken != null">
gateway_token,
</if>
<if test="jobType != null">
job_type,
</if>
<if test="localNodeHandlerName != null">
local_node_handler_name,
</if>
<if test="mailAction != null">
mail_action,
</if>
<if test="nodeCron != null">
node_cron,
</if>
<if test="nodeDesc != null">
node_desc,
</if>
<if test="nodeName != null">
node_name,
</if>
<if test="nodeOfFlowId != null">
node_of_flow_id,
</if>
<if test="nodeTimeout != null">
node_timeout,
</if>
<if test="nodeType != null">
node_type,
</if>
<if test="pluginUrls != null">
plugin_urls,
</if>
<if test="priority != null">
priority,
</if>
<if test="remainingCount != null">
remaining_count,
</if>
<if test="repeatCount != null">
repeat_count,
</if>
<if test="retryInterval != null">
retry_interval,
</if>
<if test="routingStrategy != null">
routing_strategy,
</if>
<if test="runId != null">
run_id,
</if>
<if test="runParam != null">
run_param,
</if>
<if test="runSourceDesc != null">
run_source_desc,
</if>
<if test="scriptUrls != null">
script_urls,
</if>
<if test="sourcePrincipal != null">
source_principal,
</if>
<if test="sourceUpdateTime != null">
source_update_time,
</if>
<if test="triggerNextTime != null">
trigger_next_time,
</if>
<if test="triggerStatus != null">
trigger_status,
</if>
<if test="runSource != null">
run_source,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="nodeId != null">
#{nodeId,jdbcType=INTEGER},
</if>
<if test="alarmEmail != null">
#{alarmEmail,jdbcType=VARCHAR},
</if>
<if test="blockStrategy != null">
#{blockStrategy,jdbcType=VARCHAR},
</if>
<if test="callbackToken != null">
#{callbackToken,jdbcType=VARCHAR},
</if>
<if test="dependencyNodes != null">
#{dependencyNodes,jdbcType=VARCHAR},
</if>
<if test="failedRetryCount != null">
#{failedRetryCount,jdbcType=INTEGER},
</if>
<if test="flowId != null">
#{flowId,jdbcType=INTEGER},
</if>
<if test="followTaskFlow != null">
#{followTaskFlow,jdbcType=CHAR},
</if>
<if test="gatewayToken != null">
#{gatewayToken,jdbcType=VARCHAR},
</if>
<if test="jobType != null">
#{jobType,jdbcType=VARCHAR},
</if>
<if test="localNodeHandlerName != null">
#{localNodeHandlerName,jdbcType=VARCHAR},
</if>
<if test="mailAction != null">
#{mailAction,jdbcType=CHAR},
</if>
<if test="nodeCron != null">
#{nodeCron,jdbcType=VARCHAR},
</if>
<if test="nodeDesc != null">
#{nodeDesc,jdbcType=VARCHAR},
</if>
<if test="nodeName != null">
#{nodeName,jdbcType=VARCHAR},
</if>
<if test="nodeOfFlowId != null">
#{nodeOfFlowId,jdbcType=INTEGER},
</if>
<if test="nodeTimeout != null">
#{nodeTimeout,jdbcType=BIGINT},
</if>
<if test="nodeType != null">
#{nodeType,jdbcType=VARCHAR},
</if>
<if test="pluginUrls != null">
#{pluginUrls,jdbcType=VARCHAR},
</if>
<if test="priority != null">
#{priority,jdbcType=CHAR},
</if>
<if test="remainingCount != null">
#{remainingCount,jdbcType=INTEGER},
</if>
<if test="repeatCount != null">
#{repeatCount,jdbcType=INTEGER},
</if>
<if test="retryInterval != null">
#{retryInterval,jdbcType=BIGINT},
</if>
<if test="routingStrategy != null">
#{routingStrategy,jdbcType=VARCHAR},
</if>
<if test="runId != null">
#{runId,jdbcType=VARCHAR},
</if>
<if test="runParam != null">
#{runParam,jdbcType=VARCHAR},
</if>
<if test="runSourceDesc != null">
#{runSourceDesc,jdbcType=VARCHAR},
</if>
<if test="scriptUrls != null">
#{scriptUrls,jdbcType=VARCHAR},
</if>
<if test="sourcePrincipal != null">
#{sourcePrincipal,jdbcType=VARCHAR},
</if>
<if test="sourceUpdateTime != null">
#{sourceUpdateTime,jdbcType=DATE},
</if>
<if test="triggerNextTime != null">
#{triggerNextTime,jdbcType=BIGINT},
</if>
<if test="triggerStatus != null">
#{triggerStatus,jdbcType=CHAR},
</if>
<if test="runSource != null">
#{runSource,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByIdSelective" parameterType="com.byit.model.JobTask">
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_task
<set>
<if test="alarmEmail != null">
alarm_email = #{alarmEmail,jdbcType=VARCHAR},
</if>
<if test="blockStrategy != null">
block_strategy = #{blockStrategy,jdbcType=VARCHAR},
</if>
<if test="callbackToken != null">
callback_token = #{callbackToken,jdbcType=VARCHAR},
</if>
<if test="dependencyNodes != null">
dependency_nodes = #{dependencyNodes,jdbcType=VARCHAR},
</if>
<if test="failedRetryCount != null">
failed_retry_count = #{failedRetryCount,jdbcType=INTEGER},
</if>
<if test="flowId != null">
flow_id = #{flowId,jdbcType=INTEGER},
</if>
<if test="followTaskFlow != null">
follow_task_flow = #{followTaskFlow,jdbcType=CHAR},
</if>
<if test="gatewayToken != null">
gateway_token = #{gatewayToken,jdbcType=VARCHAR},
</if>
<if test="jobType != null">
job_type = #{jobType,jdbcType=VARCHAR},
</if>
<if test="localNodeHandlerName != null">
local_node_handler_name = #{localNodeHandlerName,jdbcType=VARCHAR},
</if>
<if test="mailAction != null">
mail_action = #{mailAction,jdbcType=CHAR},
</if>
<if test="nodeCron != null">
node_cron = #{nodeCron,jdbcType=VARCHAR},
</if>
<if test="nodeDesc != null">
node_desc = #{nodeDesc,jdbcType=VARCHAR},
</if>
<if test="nodeName != null">
node_name = #{nodeName,jdbcType=VARCHAR},
</if>
<if test="nodeOfFlowId != null">
node_of_flow_id = #{nodeOfFlowId,jdbcType=INTEGER},
</if>
<if test="nodeTimeout != null">
node_timeout = #{nodeTimeout,jdbcType=BIGINT},
</if>
<if test="nodeType != null">
node_type = #{nodeType,jdbcType=VARCHAR},
</if>
<if test="pluginUrls != null">
plugin_urls = #{pluginUrls,jdbcType=VARCHAR},
</if>
<if test="priority != null">
priority = #{priority,jdbcType=CHAR},
</if>
<if test="remainingCount != null">
remaining_count = #{remainingCount,jdbcType=INTEGER},
</if>
<if test="repeatCount != null">
repeat_count = #{repeatCount,jdbcType=INTEGER},
</if>
<if test="retryInterval != null">
retry_interval = #{retryInterval,jdbcType=BIGINT},
</if>
<if test="routingStrategy != null">
routing_strategy = #{routingStrategy,jdbcType=VARCHAR},
</if>
<if test="runId != null">
run_id = #{runId,jdbcType=VARCHAR},
</if>
<if test="runParam != null">
run_param = #{runParam,jdbcType=VARCHAR},
</if>
<if test="runSourceDesc != null">
run_source_desc = #{runSourceDesc,jdbcType=VARCHAR},
</if>
<if test="scriptUrls != null">
script_urls = #{scriptUrls,jdbcType=VARCHAR},
</if>
<if test="sourcePrincipal != null">
source_principal = #{sourcePrincipal,jdbcType=VARCHAR},
</if>
<if test="sourceUpdateTime != null">
source_update_time = #{sourceUpdateTime,jdbcType=DATE},
</if>
<if test="triggerNextTime != null">
trigger_next_time = #{triggerNextTime,jdbcType=BIGINT},
</if>
<if test="triggerStatus != null">
trigger_status = #{triggerStatus,jdbcType=CHAR},
</if>
<if test="runSource != null">
run_source = #{runSource,jdbcType=LONGVARCHAR},
</if>
</set>
where node_id = #{nodeId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.byit.model.JobTask">
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_task
set alarm_email = #{alarmEmail,jdbcType=VARCHAR},
block_strategy = #{blockStrategy,jdbcType=VARCHAR},
callback_token = #{callbackToken,jdbcType=VARCHAR},
dependency_nodes = #{dependencyNodes,jdbcType=VARCHAR},
failed_retry_count = #{failedRetryCount,jdbcType=INTEGER},
flow_id = #{flowId,jdbcType=INTEGER},
follow_task_flow = #{followTaskFlow,jdbcType=CHAR},
gateway_token = #{gatewayToken,jdbcType=VARCHAR},
job_type = #{jobType,jdbcType=VARCHAR},
local_node_handler_name = #{localNodeHandlerName,jdbcType=VARCHAR},
mail_action = #{mailAction,jdbcType=CHAR},
node_cron = #{nodeCron,jdbcType=VARCHAR},
node_desc = #{nodeDesc,jdbcType=VARCHAR},
node_name = #{nodeName,jdbcType=VARCHAR},
node_of_flow_id = #{nodeOfFlowId,jdbcType=INTEGER},
node_timeout = #{nodeTimeout,jdbcType=BIGINT},
node_type = #{nodeType,jdbcType=VARCHAR},
plugin_urls = #{pluginUrls,jdbcType=VARCHAR},
priority = #{priority,jdbcType=CHAR},
remaining_count = #{remainingCount,jdbcType=INTEGER},
repeat_count = #{repeatCount,jdbcType=INTEGER},
retry_interval = #{retryInterval,jdbcType=BIGINT},
routing_strategy = #{routingStrategy,jdbcType=VARCHAR},
run_id = #{runId,jdbcType=VARCHAR},
run_param = #{runParam,jdbcType=VARCHAR},
run_source_desc = #{runSourceDesc,jdbcType=VARCHAR},
script_urls = #{scriptUrls,jdbcType=VARCHAR},
source_principal = #{sourcePrincipal,jdbcType=VARCHAR},
source_update_time = #{sourceUpdateTime,jdbcType=DATE},
trigger_next_time = #{triggerNextTime,jdbcType=BIGINT},
trigger_status = #{triggerStatus,jdbcType=CHAR},
run_source = #{runSource,jdbcType=LONGVARCHAR}
where node_id = #{nodeId,jdbcType=INTEGER}
</update>
<update id="updateById" parameterType="com.byit.model.JobTask">
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_task
set alarm_email = #{alarmEmail,jdbcType=VARCHAR},
block_strategy = #{blockStrategy,jdbcType=VARCHAR},
callback_token = #{callbackToken,jdbcType=VARCHAR},
dependency_nodes = #{dependencyNodes,jdbcType=VARCHAR},
failed_retry_count = #{failedRetryCount,jdbcType=INTEGER},
flow_id = #{flowId,jdbcType=INTEGER},
follow_task_flow = #{followTaskFlow,jdbcType=CHAR},
gateway_token = #{gatewayToken,jdbcType=VARCHAR},
job_type = #{jobType,jdbcType=VARCHAR},
local_node_handler_name = #{localNodeHandlerName,jdbcType=VARCHAR},
mail_action = #{mailAction,jdbcType=CHAR},
node_cron = #{nodeCron,jdbcType=VARCHAR},
node_desc = #{nodeDesc,jdbcType=VARCHAR},
node_name = #{nodeName,jdbcType=VARCHAR},
node_of_flow_id = #{nodeOfFlowId,jdbcType=INTEGER},
node_timeout = #{nodeTimeout,jdbcType=BIGINT},
node_type = #{nodeType,jdbcType=VARCHAR},
plugin_urls = #{pluginUrls,jdbcType=VARCHAR},
priority = #{priority,jdbcType=CHAR},
remaining_count = #{remainingCount,jdbcType=INTEGER},
repeat_count = #{repeatCount,jdbcType=INTEGER},
retry_interval = #{retryInterval,jdbcType=BIGINT},
routing_strategy = #{routingStrategy,jdbcType=VARCHAR},
run_id = #{runId,jdbcType=VARCHAR},
run_param = #{runParam,jdbcType=VARCHAR},
run_source_desc = #{runSourceDesc,jdbcType=VARCHAR},
script_urls = #{scriptUrls,jdbcType=VARCHAR},
source_principal = #{sourcePrincipal,jdbcType=VARCHAR},
source_update_time = #{sourceUpdateTime,jdbcType=DATE},
trigger_next_time = #{triggerNextTime,jdbcType=BIGINT},
trigger_status = #{triggerStatus,jdbcType=CHAR}
where node_id = #{nodeId,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.byit.mapper.JobTaskRunLogMapper">
<resultMap id="BaseResultMap" type="com.byit.model.JobTaskRunLog">
<!-- generated @mbg.generated date: 2019-12-23 -->
<id column="log_id" jdbcType="INTEGER" property="logId" />
<result column="alarm_email" jdbcType="VARCHAR" property="alarmEmail" />
<result column="alarm_status" jdbcType="CHAR" property="alarmStatus" />
<result column="failed_remaining_count" jdbcType="INTEGER" property="failedRemainingCount" />
<result column="flow_version_id" jdbcType="INTEGER" property="flowVersionId" />
<result column="job_flow_id" jdbcType="INTEGER" property="jobFlowId" />
<result column="job_flow_name" jdbcType="VARCHAR" property="jobFlowName" />
<result column="job_group_id" jdbcType="INTEGER" property="jobGroupId" />
<result column="job_type" jdbcType="VARCHAR" property="jobType" />
<result column="local_node_handler_name" jdbcType="VARCHAR" property="localNodeHandlerName" />
<result column="mail_action" jdbcType="CHAR" property="mailAction" />
<result column="node_name" jdbcType="VARCHAR" property="nodeName" />
<result column="node_type" jdbcType="VARCHAR" property="nodeType" />
<result column="run_code" jdbcType="VARCHAR" property="runCode" />
<result column="run_params" jdbcType="VARCHAR" property="runParams" />
<result column="run_time" jdbcType="DATE" property="runTime" />
<result column="run_type" jdbcType="CHAR" property="runType" />
<result column="trigger_code" jdbcType="VARCHAR" property="triggerCode" />
<result column="trigger_time" jdbcType="DATE" property="triggerTime" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.byit.model.JobTaskRunLogWithBLOBs">
<!-- generated @mbg.generated date: 2019-12-23 -->
<result column="run_msg" jdbcType="LONGVARCHAR" property="runMsg" />
<result column="trigger_msg" jdbcType="LONGVARCHAR" property="triggerMsg" />
</resultMap>
<sql id="Base_Column_List">
<!-- generated @mbg.generated date: 2019-12-23 -->
log_id, alarm_email, alarm_status, failed_remaining_count, flow_version_id, job_flow_id,
job_flow_name, job_group_id, job_type, local_node_handler_name, mail_action, node_name,
node_type, run_code, run_params, run_time, run_type, trigger_code, trigger_time
</sql>
<sql id="Blob_Column_List">
<!-- generated @mbg.generated date: 2019-12-23 -->
run_msg, trigger_msg
</sql>
<select id="getById" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
<!-- generated @mbg.generated date: 2019-12-23 -->
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from job_task_run_log
where log_id = #{logId,jdbcType=INTEGER}
</select>
<delete id="deleteById" parameterType="java.lang.Integer">
<!-- generated @mbg.generated date: 2019-12-23 -->
delete from job_task_run_log
where log_id = #{logId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.byit.model.JobTaskRunLogWithBLOBs">
<!-- generated @mbg.generated date: 2019-12-23 -->
insert into job_task_run_log (log_id, alarm_email, alarm_status,
failed_remaining_count, flow_version_id, job_flow_id,
job_flow_name, job_group_id, job_type,
local_node_handler_name, mail_action, node_name,
node_type, run_code, run_params,
run_time, run_type, trigger_code,
trigger_time, run_msg, trigger_msg
)
values (#{logId,jdbcType=INTEGER}, #{alarmEmail,jdbcType=VARCHAR}, #{alarmStatus,jdbcType=CHAR},
#{failedRemainingCount,jdbcType=INTEGER}, #{flowVersionId,jdbcType=INTEGER}, #{jobFlowId,jdbcType=INTEGER},
#{jobFlowName,jdbcType=VARCHAR}, #{jobGroupId,jdbcType=INTEGER}, #{jobType,jdbcType=VARCHAR},
#{localNodeHandlerName,jdbcType=VARCHAR}, #{mailAction,jdbcType=CHAR}, #{nodeName,jdbcType=VARCHAR},
#{nodeType,jdbcType=VARCHAR}, #{runCode,jdbcType=VARCHAR}, #{runParams,jdbcType=VARCHAR},
#{runTime,jdbcType=DATE}, #{runType,jdbcType=CHAR}, #{triggerCode,jdbcType=VARCHAR},
#{triggerTime,jdbcType=DATE}, #{runMsg,jdbcType=LONGVARCHAR}, #{triggerMsg,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.byit.model.JobTaskRunLogWithBLOBs">
<!-- generated @mbg.generated date: 2019-12-23 -->
insert into job_task_run_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="logId != null">
log_id,
</if>
<if test="alarmEmail != null">
alarm_email,
</if>
<if test="alarmStatus != null">
alarm_status,
</if>
<if test="failedRemainingCount != null">
failed_remaining_count,
</if>
<if test="flowVersionId != null">
flow_version_id,
</if>
<if test="jobFlowId != null">
job_flow_id,
</if>
<if test="jobFlowName != null">
job_flow_name,
</if>
<if test="jobGroupId != null">
job_group_id,
</if>
<if test="jobType != null">
job_type,
</if>
<if test="localNodeHandlerName != null">
local_node_handler_name,
</if>
<if test="mailAction != null">
mail_action,
</if>
<if test="nodeName != null">
node_name,
</if>
<if test="nodeType != null">
node_type,
</if>
<if test="runCode != null">
run_code,
</if>
<if test="runParams != null">
run_params,
</if>
<if test="runTime != null">
run_time,
</if>
<if test="runType != null">
run_type,
</if>
<if test="triggerCode != null">
trigger_code,
</if>
<if test="triggerTime != null">
trigger_time,
</if>
<if test="runMsg != null">
run_msg,
</if>
<if test="triggerMsg != null">
trigger_msg,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="logId != null">
#{logId,jdbcType=INTEGER},
</if>
<if test="alarmEmail != null">
#{alarmEmail,jdbcType=VARCHAR},
</if>
<if test="alarmStatus != null">
#{alarmStatus,jdbcType=CHAR},
</if>
<if test="failedRemainingCount != null">
#{failedRemainingCount,jdbcType=INTEGER},
</if>
<if test="flowVersionId != null">
#{flowVersionId,jdbcType=INTEGER},
</if>
<if test="jobFlowId != null">
#{jobFlowId,jdbcType=INTEGER},
</if>
<if test="jobFlowName != null">
#{jobFlowName,jdbcType=VARCHAR},
</if>
<if test="jobGroupId != null">
#{jobGroupId,jdbcType=INTEGER},
</if>
<if test="jobType != null">
#{jobType,jdbcType=VARCHAR},
</if>
<if test="localNodeHandlerName != null">
#{localNodeHandlerName,jdbcType=VARCHAR},
</if>
<if test="mailAction != null">
#{mailAction,jdbcType=CHAR},
</if>
<if test="nodeName != null">
#{nodeName,jdbcType=VARCHAR},
</if>
<if test="nodeType != null">
#{nodeType,jdbcType=VARCHAR},
</if>
<if test="runCode != null">
#{runCode,jdbcType=VARCHAR},
</if>
<if test="runParams != null">
#{runParams,jdbcType=VARCHAR},
</if>
<if test="runTime != null">
#{runTime,jdbcType=DATE},
</if>
<if test="runType != null">
#{runType,jdbcType=CHAR},
</if>
<if test="triggerCode != null">
#{triggerCode,jdbcType=VARCHAR},
</if>
<if test="triggerTime != null">
#{triggerTime,jdbcType=DATE},
</if>
<if test="runMsg != null">
#{runMsg,jdbcType=LONGVARCHAR},
</if>
<if test="triggerMsg != null">
#{triggerMsg,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByIdSelective" parameterType="com.byit.model.JobTaskRunLogWithBLOBs">
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_task_run_log
<set>
<if test="alarmEmail != null">
alarm_email = #{alarmEmail,jdbcType=VARCHAR},
</if>
<if test="alarmStatus != null">
alarm_status = #{alarmStatus,jdbcType=CHAR},
</if>
<if test="failedRemainingCount != null">
failed_remaining_count = #{failedRemainingCount,jdbcType=INTEGER},
</if>
<if test="flowVersionId != null">
flow_version_id = #{flowVersionId,jdbcType=INTEGER},
</if>
<if test="jobFlowId != null">
job_flow_id = #{jobFlowId,jdbcType=INTEGER},
</if>
<if test="jobFlowName != null">
job_flow_name = #{jobFlowName,jdbcType=VARCHAR},
</if>
<if test="jobGroupId != null">
job_group_id = #{jobGroupId,jdbcType=INTEGER},
</if>
<if test="jobType != null">
job_type = #{jobType,jdbcType=VARCHAR},
</if>
<if test="localNodeHandlerName != null">
local_node_handler_name = #{localNodeHandlerName,jdbcType=VARCHAR},
</if>
<if test="mailAction != null">
mail_action = #{mailAction,jdbcType=CHAR},
</if>
<if test="nodeName != null">
node_name = #{nodeName,jdbcType=VARCHAR},
</if>
<if test="nodeType != null">
node_type = #{nodeType,jdbcType=VARCHAR},
</if>
<if test="runCode != null">
run_code = #{runCode,jdbcType=VARCHAR},
</if>
<if test="runParams != null">
run_params = #{runParams,jdbcType=VARCHAR},
</if>
<if test="runTime != null">
run_time = #{runTime,jdbcType=DATE},
</if>
<if test="runType != null">
run_type = #{runType,jdbcType=CHAR},
</if>
<if test="triggerCode != null">
trigger_code = #{triggerCode,jdbcType=VARCHAR},
</if>
<if test="triggerTime != null">
trigger_time = #{triggerTime,jdbcType=DATE},
</if>
<if test="runMsg != null">
run_msg = #{runMsg,jdbcType=LONGVARCHAR},
</if>
<if test="triggerMsg != null">
trigger_msg = #{triggerMsg,jdbcType=LONGVARCHAR},
</if>
</set>
where log_id = #{logId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.byit.model.JobTaskRunLogWithBLOBs">
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_task_run_log
set alarm_email = #{alarmEmail,jdbcType=VARCHAR},
alarm_status = #{alarmStatus,jdbcType=CHAR},
failed_remaining_count = #{failedRemainingCount,jdbcType=INTEGER},
flow_version_id = #{flowVersionId,jdbcType=INTEGER},
job_flow_id = #{jobFlowId,jdbcType=INTEGER},
job_flow_name = #{jobFlowName,jdbcType=VARCHAR},
job_group_id = #{jobGroupId,jdbcType=INTEGER},
job_type = #{jobType,jdbcType=VARCHAR},
local_node_handler_name = #{localNodeHandlerName,jdbcType=VARCHAR},
mail_action = #{mailAction,jdbcType=CHAR},
node_name = #{nodeName,jdbcType=VARCHAR},
node_type = #{nodeType,jdbcType=VARCHAR},
run_code = #{runCode,jdbcType=VARCHAR},
run_params = #{runParams,jdbcType=VARCHAR},
run_time = #{runTime,jdbcType=DATE},
run_type = #{runType,jdbcType=CHAR},
trigger_code = #{triggerCode,jdbcType=VARCHAR},
trigger_time = #{triggerTime,jdbcType=DATE},
run_msg = #{runMsg,jdbcType=LONGVARCHAR},
trigger_msg = #{triggerMsg,jdbcType=LONGVARCHAR}
where log_id = #{logId,jdbcType=INTEGER}
</update>
<update id="updateById" parameterType="com.byit.model.JobTaskRunLog">
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_task_run_log
set alarm_email = #{alarmEmail,jdbcType=VARCHAR},
alarm_status = #{alarmStatus,jdbcType=CHAR},
failed_remaining_count = #{failedRemainingCount,jdbcType=INTEGER},
flow_version_id = #{flowVersionId,jdbcType=INTEGER},
job_flow_id = #{jobFlowId,jdbcType=INTEGER},
job_flow_name = #{jobFlowName,jdbcType=VARCHAR},
job_group_id = #{jobGroupId,jdbcType=INTEGER},
job_type = #{jobType,jdbcType=VARCHAR},
local_node_handler_name = #{localNodeHandlerName,jdbcType=VARCHAR},
mail_action = #{mailAction,jdbcType=CHAR},
node_name = #{nodeName,jdbcType=VARCHAR},
node_type = #{nodeType,jdbcType=VARCHAR},
run_code = #{runCode,jdbcType=VARCHAR},
run_params = #{runParams,jdbcType=VARCHAR},
run_time = #{runTime,jdbcType=DATE},
run_type = #{runType,jdbcType=CHAR},
trigger_code = #{triggerCode,jdbcType=VARCHAR},
trigger_time = #{triggerTime,jdbcType=DATE}
where log_id = #{logId,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.byit.mapper.JobTaskScheduleMapper">
<resultMap id="BaseResultMap" type="com.byit.model.JobTaskSchedule">
<!-- generated @mbg.generated date: 2019-12-23 -->
<id column="node_id" jdbcType="INTEGER" property="nodeId" />
<result column="alarm_email" jdbcType="VARCHAR" property="alarmEmail" />
<result column="block_strategy" jdbcType="VARCHAR" property="blockStrategy" />
<result column="callback_token" jdbcType="VARCHAR" property="callbackToken" />
<result column="dependency_nodes" jdbcType="VARCHAR" property="dependencyNodes" />
<result column="failed_retry_count" jdbcType="INTEGER" property="failedRetryCount" />
<result column="flow_id" jdbcType="INTEGER" property="flowId" />
<result column="follow_task_flow" jdbcType="CHAR" property="followTaskFlow" />
<result column="gateway_token" jdbcType="VARCHAR" property="gatewayToken" />
<result column="job_type" jdbcType="VARCHAR" property="jobType" />
<result column="local_node_handler_name" jdbcType="VARCHAR" property="localNodeHandlerName" />
<result column="log_id" jdbcType="INTEGER" property="logId" />
<result column="mail_action" jdbcType="CHAR" property="mailAction" />
<result column="node_cron" jdbcType="VARCHAR" property="nodeCron" />
<result column="node_desc" jdbcType="VARCHAR" property="nodeDesc" />
<result column="node_name" jdbcType="VARCHAR" property="nodeName" />
<result column="node_of_flow_id" jdbcType="INTEGER" property="nodeOfFlowId" />
<result column="node_timeout" jdbcType="BIGINT" property="nodeTimeout" />
<result column="node_type" jdbcType="VARCHAR" property="nodeType" />
<result column="plugin_urls" jdbcType="VARCHAR" property="pluginUrls" />
<result column="priority" jdbcType="CHAR" property="priority" />
<result column="remaining_count" jdbcType="INTEGER" property="remainingCount" />
<result column="repeat_count" jdbcType="INTEGER" property="repeatCount" />
<result column="retry_interval" jdbcType="BIGINT" property="retryInterval" />
<result column="routing_strategy" jdbcType="VARCHAR" property="routingStrategy" />
<result column="run_id" jdbcType="VARCHAR" property="runId" />
<result column="run_param" jdbcType="VARCHAR" property="runParam" />
<result column="run_source_desc" jdbcType="VARCHAR" property="runSourceDesc" />
<result column="script_urls" jdbcType="VARCHAR" property="scriptUrls" />
<result column="source_principal" jdbcType="VARCHAR" property="sourcePrincipal" />
<result column="source_update_time" jdbcType="DATE" property="sourceUpdateTime" />
<result column="trigger_next_time" jdbcType="BIGINT" property="triggerNextTime" />
<result column="trigger_status" jdbcType="CHAR" property="triggerStatus" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.byit.model.JobTaskSchedule">
<!-- generated @mbg.generated date: 2019-12-23 -->
<result column="run_source" jdbcType="LONGVARCHAR" property="runSource" />
</resultMap>
<sql id="Base_Column_List">
<!-- generated @mbg.generated date: 2019-12-23 -->
node_id, alarm_email, block_strategy, callback_token, dependency_nodes, failed_retry_count,
flow_id, follow_task_flow, gateway_token, job_type, local_node_handler_name, log_id,
mail_action, node_cron, node_desc, node_name, node_of_flow_id, node_timeout, node_type,
plugin_urls, priority, remaining_count, repeat_count, retry_interval, routing_strategy,
run_id, run_param, run_source_desc, script_urls, source_principal, source_update_time,
trigger_next_time, trigger_status
</sql>
<sql id="Blob_Column_List">
<!-- generated @mbg.generated date: 2019-12-23 -->
run_source
</sql>
<select id="getById" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
<!-- generated @mbg.generated date: 2019-12-23 -->
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from job_task_schedule
where node_id = #{nodeId,jdbcType=INTEGER}
</select>
<delete id="deleteById" parameterType="java.lang.Integer">
<!-- generated @mbg.generated date: 2019-12-23 -->
delete from job_task_schedule
where node_id = #{nodeId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.byit.model.JobTaskSchedule">
<!-- generated @mbg.generated date: 2019-12-23 -->
insert into job_task_schedule (node_id, alarm_email, block_strategy,
callback_token, dependency_nodes, failed_retry_count,
flow_id, follow_task_flow, gateway_token,
job_type, local_node_handler_name, log_id,
mail_action, node_cron, node_desc,
node_name, node_of_flow_id, node_timeout,
node_type, plugin_urls, priority,
remaining_count, repeat_count, retry_interval,
routing_strategy, run_id, run_param,
run_source_desc, script_urls, source_principal,
source_update_time, trigger_next_time, trigger_status,
run_source)
values (#{nodeId,jdbcType=INTEGER}, #{alarmEmail,jdbcType=VARCHAR}, #{blockStrategy,jdbcType=VARCHAR},
#{callbackToken,jdbcType=VARCHAR}, #{dependencyNodes,jdbcType=VARCHAR}, #{failedRetryCount,jdbcType=INTEGER},
#{flowId,jdbcType=INTEGER}, #{followTaskFlow,jdbcType=CHAR}, #{gatewayToken,jdbcType=VARCHAR},
#{jobType,jdbcType=VARCHAR}, #{localNodeHandlerName,jdbcType=VARCHAR}, #{logId,jdbcType=INTEGER},
#{mailAction,jdbcType=CHAR}, #{nodeCron,jdbcType=VARCHAR}, #{nodeDesc,jdbcType=VARCHAR},
#{nodeName,jdbcType=VARCHAR}, #{nodeOfFlowId,jdbcType=INTEGER}, #{nodeTimeout,jdbcType=BIGINT},
#{nodeType,jdbcType=VARCHAR}, #{pluginUrls,jdbcType=VARCHAR}, #{priority,jdbcType=CHAR},
#{remainingCount,jdbcType=INTEGER}, #{repeatCount,jdbcType=INTEGER}, #{retryInterval,jdbcType=BIGINT},
#{routingStrategy,jdbcType=VARCHAR}, #{runId,jdbcType=VARCHAR}, #{runParam,jdbcType=VARCHAR},
#{runSourceDesc,jdbcType=VARCHAR}, #{scriptUrls,jdbcType=VARCHAR}, #{sourcePrincipal,jdbcType=VARCHAR},
#{sourceUpdateTime,jdbcType=DATE}, #{triggerNextTime,jdbcType=BIGINT}, #{triggerStatus,jdbcType=CHAR},
#{runSource,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.byit.model.JobTaskSchedule">
<!-- generated @mbg.generated date: 2019-12-23 -->
insert into job_task_schedule
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="nodeId != null">
node_id,
</if>
<if test="alarmEmail != null">
alarm_email,
</if>
<if test="blockStrategy != null">
block_strategy,
</if>
<if test="callbackToken != null">
callback_token,
</if>
<if test="dependencyNodes != null">
dependency_nodes,
</if>
<if test="failedRetryCount != null">
failed_retry_count,
</if>
<if test="flowId != null">
flow_id,
</if>
<if test="followTaskFlow != null">
follow_task_flow,
</if>
<if test="gatewayToken != null">
gateway_token,
</if>
<if test="jobType != null">
job_type,
</if>
<if test="localNodeHandlerName != null">
local_node_handler_name,
</if>
<if test="logId != null">
log_id,
</if>
<if test="mailAction != null">
mail_action,
</if>
<if test="nodeCron != null">
node_cron,
</if>
<if test="nodeDesc != null">
node_desc,
</if>
<if test="nodeName != null">
node_name,
</if>
<if test="nodeOfFlowId != null">
node_of_flow_id,
</if>
<if test="nodeTimeout != null">
node_timeout,
</if>
<if test="nodeType != null">
node_type,
</if>
<if test="pluginUrls != null">
plugin_urls,
</if>
<if test="priority != null">
priority,
</if>
<if test="remainingCount != null">
remaining_count,
</if>
<if test="repeatCount != null">
repeat_count,
</if>
<if test="retryInterval != null">
retry_interval,
</if>
<if test="routingStrategy != null">
routing_strategy,
</if>
<if test="runId != null">
run_id,
</if>
<if test="runParam != null">
run_param,
</if>
<if test="runSourceDesc != null">
run_source_desc,
</if>
<if test="scriptUrls != null">
script_urls,
</if>
<if test="sourcePrincipal != null">
source_principal,
</if>
<if test="sourceUpdateTime != null">
source_update_time,
</if>
<if test="triggerNextTime != null">
trigger_next_time,
</if>
<if test="triggerStatus != null">
trigger_status,
</if>
<if test="runSource != null">
run_source,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="nodeId != null">
#{nodeId,jdbcType=INTEGER},
</if>
<if test="alarmEmail != null">
#{alarmEmail,jdbcType=VARCHAR},
</if>
<if test="blockStrategy != null">
#{blockStrategy,jdbcType=VARCHAR},
</if>
<if test="callbackToken != null">
#{callbackToken,jdbcType=VARCHAR},
</if>
<if test="dependencyNodes != null">
#{dependencyNodes,jdbcType=VARCHAR},
</if>
<if test="failedRetryCount != null">
#{failedRetryCount,jdbcType=INTEGER},
</if>
<if test="flowId != null">
#{flowId,jdbcType=INTEGER},
</if>
<if test="followTaskFlow != null">
#{followTaskFlow,jdbcType=CHAR},
</if>
<if test="gatewayToken != null">
#{gatewayToken,jdbcType=VARCHAR},
</if>
<if test="jobType != null">
#{jobType,jdbcType=VARCHAR},
</if>
<if test="localNodeHandlerName != null">
#{localNodeHandlerName,jdbcType=VARCHAR},
</if>
<if test="logId != null">
#{logId,jdbcType=INTEGER},
</if>
<if test="mailAction != null">
#{mailAction,jdbcType=CHAR},
</if>
<if test="nodeCron != null">
#{nodeCron,jdbcType=VARCHAR},
</if>
<if test="nodeDesc != null">
#{nodeDesc,jdbcType=VARCHAR},
</if>
<if test="nodeName != null">
#{nodeName,jdbcType=VARCHAR},
</if>
<if test="nodeOfFlowId != null">
#{nodeOfFlowId,jdbcType=INTEGER},
</if>
<if test="nodeTimeout != null">
#{nodeTimeout,jdbcType=BIGINT},
</if>
<if test="nodeType != null">
#{nodeType,jdbcType=VARCHAR},
</if>
<if test="pluginUrls != null">
#{pluginUrls,jdbcType=VARCHAR},
</if>
<if test="priority != null">
#{priority,jdbcType=CHAR},
</if>
<if test="remainingCount != null">
#{remainingCount,jdbcType=INTEGER},
</if>
<if test="repeatCount != null">
#{repeatCount,jdbcType=INTEGER},
</if>
<if test="retryInterval != null">
#{retryInterval,jdbcType=BIGINT},
</if>
<if test="routingStrategy != null">
#{routingStrategy,jdbcType=VARCHAR},
</if>
<if test="runId != null">
#{runId,jdbcType=VARCHAR},
</if>
<if test="runParam != null">
#{runParam,jdbcType=VARCHAR},
</if>
<if test="runSourceDesc != null">
#{runSourceDesc,jdbcType=VARCHAR},
</if>
<if test="scriptUrls != null">
#{scriptUrls,jdbcType=VARCHAR},
</if>
<if test="sourcePrincipal != null">
#{sourcePrincipal,jdbcType=VARCHAR},
</if>
<if test="sourceUpdateTime != null">
#{sourceUpdateTime,jdbcType=DATE},
</if>
<if test="triggerNextTime != null">
#{triggerNextTime,jdbcType=BIGINT},
</if>
<if test="triggerStatus != null">
#{triggerStatus,jdbcType=CHAR},
</if>
<if test="runSource != null">
#{runSource,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByIdSelective" parameterType="com.byit.model.JobTaskSchedule">
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_task_schedule
<set>
<if test="alarmEmail != null">
alarm_email = #{alarmEmail,jdbcType=VARCHAR},
</if>
<if test="blockStrategy != null">
block_strategy = #{blockStrategy,jdbcType=VARCHAR},
</if>
<if test="callbackToken != null">
callback_token = #{callbackToken,jdbcType=VARCHAR},
</if>
<if test="dependencyNodes != null">
dependency_nodes = #{dependencyNodes,jdbcType=VARCHAR},
</if>
<if test="failedRetryCount != null">
failed_retry_count = #{failedRetryCount,jdbcType=INTEGER},
</if>
<if test="flowId != null">
flow_id = #{flowId,jdbcType=INTEGER},
</if>
<if test="followTaskFlow != null">
follow_task_flow = #{followTaskFlow,jdbcType=CHAR},
</if>
<if test="gatewayToken != null">
gateway_token = #{gatewayToken,jdbcType=VARCHAR},
</if>
<if test="jobType != null">
job_type = #{jobType,jdbcType=VARCHAR},
</if>
<if test="localNodeHandlerName != null">
local_node_handler_name = #{localNodeHandlerName,jdbcType=VARCHAR},
</if>
<if test="logId != null">
log_id = #{logId,jdbcType=INTEGER},
</if>
<if test="mailAction != null">
mail_action = #{mailAction,jdbcType=CHAR},
</if>
<if test="nodeCron != null">
node_cron = #{nodeCron,jdbcType=VARCHAR},
</if>
<if test="nodeDesc != null">
node_desc = #{nodeDesc,jdbcType=VARCHAR},
</if>
<if test="nodeName != null">
node_name = #{nodeName,jdbcType=VARCHAR},
</if>
<if test="nodeOfFlowId != null">
node_of_flow_id = #{nodeOfFlowId,jdbcType=INTEGER},
</if>
<if test="nodeTimeout != null">
node_timeout = #{nodeTimeout,jdbcType=BIGINT},
</if>
<if test="nodeType != null">
node_type = #{nodeType,jdbcType=VARCHAR},
</if>
<if test="pluginUrls != null">
plugin_urls = #{pluginUrls,jdbcType=VARCHAR},
</if>
<if test="priority != null">
priority = #{priority,jdbcType=CHAR},
</if>
<if test="remainingCount != null">
remaining_count = #{remainingCount,jdbcType=INTEGER},
</if>
<if test="repeatCount != null">
repeat_count = #{repeatCount,jdbcType=INTEGER},
</if>
<if test="retryInterval != null">
retry_interval = #{retryInterval,jdbcType=BIGINT},
</if>
<if test="routingStrategy != null">
routing_strategy = #{routingStrategy,jdbcType=VARCHAR},
</if>
<if test="runId != null">
run_id = #{runId,jdbcType=VARCHAR},
</if>
<if test="runParam != null">
run_param = #{runParam,jdbcType=VARCHAR},
</if>
<if test="runSourceDesc != null">
run_source_desc = #{runSourceDesc,jdbcType=VARCHAR},
</if>
<if test="scriptUrls != null">
script_urls = #{scriptUrls,jdbcType=VARCHAR},
</if>
<if test="sourcePrincipal != null">
source_principal = #{sourcePrincipal,jdbcType=VARCHAR},
</if>
<if test="sourceUpdateTime != null">
source_update_time = #{sourceUpdateTime,jdbcType=DATE},
</if>
<if test="triggerNextTime != null">
trigger_next_time = #{triggerNextTime,jdbcType=BIGINT},
</if>
<if test="triggerStatus != null">
trigger_status = #{triggerStatus,jdbcType=CHAR},
</if>
<if test="runSource != null">
run_source = #{runSource,jdbcType=LONGVARCHAR},
</if>
</set>
where node_id = #{nodeId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.byit.model.JobTaskSchedule">
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_task_schedule
set alarm_email = #{alarmEmail,jdbcType=VARCHAR},
block_strategy = #{blockStrategy,jdbcType=VARCHAR},
callback_token = #{callbackToken,jdbcType=VARCHAR},
dependency_nodes = #{dependencyNodes,jdbcType=VARCHAR},
failed_retry_count = #{failedRetryCount,jdbcType=INTEGER},
flow_id = #{flowId,jdbcType=INTEGER},
follow_task_flow = #{followTaskFlow,jdbcType=CHAR},
gateway_token = #{gatewayToken,jdbcType=VARCHAR},
job_type = #{jobType,jdbcType=VARCHAR},
local_node_handler_name = #{localNodeHandlerName,jdbcType=VARCHAR},
log_id = #{logId,jdbcType=INTEGER},
mail_action = #{mailAction,jdbcType=CHAR},
node_cron = #{nodeCron,jdbcType=VARCHAR},
node_desc = #{nodeDesc,jdbcType=VARCHAR},
node_name = #{nodeName,jdbcType=VARCHAR},
node_of_flow_id = #{nodeOfFlowId,jdbcType=INTEGER},
node_timeout = #{nodeTimeout,jdbcType=BIGINT},
node_type = #{nodeType,jdbcType=VARCHAR},
plugin_urls = #{pluginUrls,jdbcType=VARCHAR},
priority = #{priority,jdbcType=CHAR},
remaining_count = #{remainingCount,jdbcType=INTEGER},
repeat_count = #{repeatCount,jdbcType=INTEGER},
retry_interval = #{retryInterval,jdbcType=BIGINT},
routing_strategy = #{routingStrategy,jdbcType=VARCHAR},
run_id = #{runId,jdbcType=VARCHAR},
run_param = #{runParam,jdbcType=VARCHAR},
run_source_desc = #{runSourceDesc,jdbcType=VARCHAR},
script_urls = #{scriptUrls,jdbcType=VARCHAR},
source_principal = #{sourcePrincipal,jdbcType=VARCHAR},
source_update_time = #{sourceUpdateTime,jdbcType=DATE},
trigger_next_time = #{triggerNextTime,jdbcType=BIGINT},
trigger_status = #{triggerStatus,jdbcType=CHAR},
run_source = #{runSource,jdbcType=LONGVARCHAR}
where node_id = #{nodeId,jdbcType=INTEGER}
</update>
<update id="updateById" parameterType="com.byit.model.JobTaskSchedule">
<!-- generated @mbg.generated date: 2019-12-23 -->
update job_task_schedule
set alarm_email = #{alarmEmail,jdbcType=VARCHAR},
block_strategy = #{blockStrategy,jdbcType=VARCHAR},
callback_token = #{callbackToken,jdbcType=VARCHAR},
dependency_nodes = #{dependencyNodes,jdbcType=VARCHAR},
failed_retry_count = #{failedRetryCount,jdbcType=INTEGER},
flow_id = #{flowId,jdbcType=INTEGER},
follow_task_flow = #{followTaskFlow,jdbcType=CHAR},
gateway_token = #{gatewayToken,jdbcType=VARCHAR},
job_type = #{jobType,jdbcType=VARCHAR},
local_node_handler_name = #{localNodeHandlerName,jdbcType=VARCHAR},
log_id = #{logId,jdbcType=INTEGER},
mail_action = #{mailAction,jdbcType=CHAR},
node_cron = #{nodeCron,jdbcType=VARCHAR},
node_desc = #{nodeDesc,jdbcType=VARCHAR},
node_name = #{nodeName,jdbcType=VARCHAR},
node_of_flow_id = #{nodeOfFlowId,jdbcType=INTEGER},
node_timeout = #{nodeTimeout,jdbcType=BIGINT},
node_type = #{nodeType,jdbcType=VARCHAR},
plugin_urls = #{pluginUrls,jdbcType=VARCHAR},
priority = #{priority,jdbcType=CHAR},
remaining_count = #{remainingCount,jdbcType=INTEGER},
repeat_count = #{repeatCount,jdbcType=INTEGER},
retry_interval = #{retryInterval,jdbcType=BIGINT},
routing_strategy = #{routingStrategy,jdbcType=VARCHAR},
run_id = #{runId,jdbcType=VARCHAR},
run_param = #{runParam,jdbcType=VARCHAR},
run_source_desc = #{runSourceDesc,jdbcType=VARCHAR},
script_urls = #{scriptUrls,jdbcType=VARCHAR},
source_principal = #{sourcePrincipal,jdbcType=VARCHAR},
source_update_time = #{sourceUpdateTime,jdbcType=DATE},
trigger_next_time = #{triggerNextTime,jdbcType=BIGINT},
trigger_status = #{triggerStatus,jdbcType=CHAR}
where node_id = #{nodeId,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
<module>byit-myth-core</module> <module>byit-myth-core</module>
<module>byit-myth-executor</module> <module>byit-myth-executor</module>
<module>byit-myth-rpc</module> <module>byit-myth-rpc</module>
<module>byit-mybatis-plugin</module>
<module>demo-client</module> <module>demo-client</module>
</modules> </modules>
...@@ -61,6 +62,10 @@ ...@@ -61,6 +62,10 @@
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version> <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
<byit.validation.starter>1.0-SNAPSHOT</byit.validation.starter> <byit.validation.starter>1.0-SNAPSHOT</byit.validation.starter>
<mysql-connector-java.version>5.1.47</mysql-connector-java.version>
<springfox-swagger2.version>2.7.0</springfox-swagger2.version>
<springfox-swagger-ui>2.7.0</springfox-swagger-ui>
</properties> </properties>
...@@ -163,9 +168,14 @@ ...@@ -163,9 +168,14 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.byit</groupId> <groupId>io.springfox</groupId>
<artifactId>byit-validation-starter</artifactId> <artifactId>springfox-swagger2</artifactId>
<version>${byit.validation.starter}</version> <version>${springfox-swagger2.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${springfox-swagger-ui}</version>
</dependency> </dependency>
</dependencies> </dependencies>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment