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.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;
}
}
...@@ -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.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
...@@ -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