Jenkins自动合并

yun-zuoyi
jenkins 5 years ago
commit 33e68b7e9f

@ -1843,151 +1843,6 @@ public class BlockFormEnumUtil {
} }
} }
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum DATA_SOURCE_TYPE {
SOURCE_MARIA_DB(100, "MariaDB", "MariaDB 10.1","com.mysql.jdbc.Driver",3306,null),
SOURCE_SQL_SERVER(200, "SQL Server", "SQL Server 2017","com.microsoft.sqlserver.jdbc.SQLServerDriver",1433,"dbo"),
SOURCE_ORACLE(300, "Oracle", "Oralce 12C","oracle.jdbc.driver.OracleDriver",1521,null),
SOURCE_POSTGRE_SQL(400, "PostgreSql", "PostgreSql 10.5","org.postgresql.Driver",5432,"public");
private int value;
private String code;
private String description;
private String driverClassName;
private int defaultPort;
private String defaultSchemaPattern;
private DATA_SOURCE_TYPE (int value, String code, String description,String driverClassName,int port,String defaultSchemaPattern) {
this.value = value;
this.code = code;
this.description = description;
this.driverClassName = driverClassName;
this.defaultPort = port;
this.defaultSchemaPattern = defaultSchemaPattern;
}
public int getValue() {
return value;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
public String getDriverClassName() {
return driverClassName;
}
public int getDefaultPort() {
return defaultPort;
}
public String getDefaultSchemaPattern() {
return defaultSchemaPattern;
}
public static String valueOfCode(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].code;
}
}
return tmp;
}
public static int codeOfValue(String code) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].value;
}
}
return tmp;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static DATA_SOURCE_TYPE valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
return values()[i];
}
}
return null;
}
public static String codeOfDescription(String code) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].description;
}
}
return tmp;
}
public String getJDBCUrl(String database,String host,Integer port){
if(this.getValue() == SOURCE_MARIA_DB.getValue()){
return getJDBCUrlMySQL(database,host,port);
}else if(this.getValue() == SOURCE_ORACLE.getValue()){
return getJDBCUrlOracle(database,host,port);
}else if(this.getValue() == SOURCE_POSTGRE_SQL.getValue()){
return getJDBCUrlPostgreSQL(database,host,port);
}else if(this.getValue() == SOURCE_SQL_SERVER.getValue()){
return getJDBCUrlSQLServer(database,host,port);
}
return null;
}
public static DATA_SOURCE_TYPE getDataSourceURL(String databaseProductName){
if(StringUtils.isNotBlank(databaseProductName)){
if(databaseProductName.indexOf(":mysql:") != -1){
return SOURCE_MARIA_DB;
}else if(databaseProductName.indexOf(":oracle:") != -1){
return SOURCE_ORACLE;
}else if(databaseProductName.indexOf(":postgresql:") != -1){
return SOURCE_POSTGRE_SQL;
}else if(databaseProductName.indexOf(":sqlserver:") != -1){
return SOURCE_SQL_SERVER;
}
}
return null;
}
private String getJDBCUrlMySQL(String database,String host,Integer port){
return "jdbc:mysql://"+host+":"+port+"/"+database+"?autoReconnect=true&useSSL=false&characterEncoding=utf-8";
}
private String getJDBCUrlOracle(String database,String host,Integer port){
return "jdbc:oracle:thin:@"+host+":"+port+":"+database;
}
private String getJDBCUrlPostgreSQL(String database,String host,Integer port){
return "jdbc:postgresql://"+host+":"+port+"/"+database;
}
private String getJDBCUrlSQLServer(String database,String host,Integer port){
return "jdbc:sqlserver://" + host + ":" + port + ";database=" + database+";autoReconnect=true";
}
}
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum DATA_SOURCE_STATUS { public enum DATA_SOURCE_STATUS {
CONN_SUCCESS(10, "连接成功", "连接成功"), CONN_SUCCESS(10, "连接成功", "连接成功"),

@ -331,6 +331,7 @@ public class BlockSoftSwitchEnumUtil {
/** /**
* *
*/ */
@Deprecated // 不建议使用 推荐使用 CommonEnumUtil.DATA_SOURCE_TYPE
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum DATA_SOURCE_TYPE { public enum DATA_SOURCE_TYPE {
SOURCE_MARIA_DB(100, "MariaDB", "MariaDB 10.1","com.mysql.jdbc.Driver",3306,null), SOURCE_MARIA_DB(100, "MariaDB", "MariaDB 10.1","com.mysql.jdbc.Driver",3306,null),

@ -1397,17 +1397,17 @@ public class CommonEnumUtil {
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SQL_WHERE { public enum SQL_WHERE {
EQUAL(1, " = ", "等于"), EQUAL(10, " = ", "等于"),
NOT_EQUAL(2, " <> ", "不等于"), NOT_EQUAL(11, " <> ", "不等于"),
MORE(3, " > ", "大于"), MORE(20, " > ", "大于"),
LESS(4, " < ", "小于"), LESS(30, " < ", "小于"),
MORE_OR_EQUAL(5, " >= ", "大于等于"), MORE_OR_EQUAL(21, " >= ", "大于等于"),
LESS_OR_EQUAL (6, " <= ", "小于等于"), LESS_OR_EQUAL (31, " <= ", "小于等于"),
LIKE(7, " LIKE ", "全模糊"), LIKE(40, " LIKE ", "全模糊"),
START_LIKE(7, " LIKE ", "前模糊"), START_LIKE(41, " LIKE ", "前模糊"),
END_LIKE(7, " LIKE ", "后模糊"), END_LIKE(52, " LIKE ", "后模糊"),
IN(8, " IN ", " in "), IN(50, " IN ", " in "),
BETWEEN(9, " BETWEEN ", "区间查询(逗号区分)"),; BETWEEN(60, " BETWEEN ", "区间查询(逗号区分)"),;
private int value; private int value;
private String code; private String code;
@ -1724,4 +1724,150 @@ public class CommonEnumUtil {
} }
} }
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum DATA_SOURCE_TYPE {
SOURCE_MARIA_DB(100, "MariaDB", "MariaDB 10.1","com.mysql.jdbc.Driver",3306,null),
SOURCE_SQL_SERVER(200, "SQL Server", "SQL Server 2017","com.microsoft.sqlserver.jdbc.SQLServerDriver",1433,"dbo"),
SOURCE_ORACLE(300, "Oracle", "Oralce 12C","oracle.jdbc.driver.OracleDriver",1521,null),
SOURCE_POSTGRE_SQL(400, "PostgreSql", "PostgreSql 10.5","org.postgresql.Driver",5432,"public");
private int value;
private String code;
private String description;
private String driverClassName;
private int defaultPort;
private String defaultSchemaPattern;
private DATA_SOURCE_TYPE (int value, String code, String description,String driverClassName,int port,String defaultSchemaPattern) {
this.value = value;
this.code = code;
this.description = description;
this.driverClassName = driverClassName;
this.defaultPort = port;
this.defaultSchemaPattern = defaultSchemaPattern;
}
public int getValue() {
return value;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
public String getDriverClassName() {
return driverClassName;
}
public int getDefaultPort() {
return defaultPort;
}
public String getDefaultSchemaPattern() {
return defaultSchemaPattern;
}
public static String valueOfCode(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].code;
}
}
return tmp;
}
public static int codeOfValue(String code) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].value;
}
}
return tmp;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static DATA_SOURCE_TYPE valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
return values()[i];
}
}
return null;
}
public static String codeOfDescription(String code) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].description;
}
}
return tmp;
}
public String getJDBCUrl(String database,String host,Integer port){
if(this.getValue() == SOURCE_MARIA_DB.getValue()){
return getJDBCUrlMySQL(database,host,port);
}else if(this.getValue() == SOURCE_ORACLE.getValue()){
return getJDBCUrlOracle(database,host,port);
}else if(this.getValue() == SOURCE_POSTGRE_SQL.getValue()){
return getJDBCUrlPostgreSQL(database,host,port);
}else if(this.getValue() == SOURCE_SQL_SERVER.getValue()){
return getJDBCUrlSQLServer(database,host,port);
}
return null;
}
public static DATA_SOURCE_TYPE getDataSourceURL(String databaseProductName){
if(StringUtils.isNotBlank(databaseProductName)){
if(databaseProductName.indexOf(":mysql:") != -1){
return SOURCE_MARIA_DB;
}else if(databaseProductName.indexOf(":oracle:") != -1){
return SOURCE_ORACLE;
}else if(databaseProductName.indexOf(":postgresql:") != -1){
return SOURCE_POSTGRE_SQL;
}else if(databaseProductName.indexOf(":sqlserver:") != -1){
return SOURCE_SQL_SERVER;
}
}
return null;
}
private String getJDBCUrlMySQL(String database,String host,Integer port){
return "jdbc:mysql://"+host+":"+port+"/"+database+"?autoReconnect=true&useSSL=false&characterEncoding=utf-8";
}
private String getJDBCUrlOracle(String database,String host,Integer port){
return "jdbc:oracle:thin:@"+host+":"+port+":"+database;
}
private String getJDBCUrlPostgreSQL(String database,String host,Integer port){
return "jdbc:postgresql://"+host+":"+port+"/"+database;
}
private String getJDBCUrlSQLServer(String database,String host,Integer port){
return "jdbc:sqlserver://" + host + ":" + port + ";database=" + database+";autoReconnect=true";
}
}
} }

@ -1530,7 +1530,10 @@ public class MesPcnEnumUtil {
/** /**
* *
* wei.peng
* Copy , ;
*/ */
@Deprecated // 不推荐使用 推荐使用 CommonEnumUtil.DATA_SOURCE_TYPE
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum DATA_SOURCE_TYPE { public enum DATA_SOURCE_TYPE {
SOURCE_MARIA_DB(100, "MariaDB", "MariaDB 10.1", "com.mysql.jdbc.Driver", 3306, null), SOURCE_MARIA_DB(100, "MariaDB", "MariaDB 10.1", "com.mysql.jdbc.Driver", 3306, null),

@ -30,6 +30,9 @@ public class ClassFieldModel implements Serializable {
@ApiParam(value ="属性名") @ApiParam(value ="属性名")
private String fieldName; private String fieldName;
@ApiParam(value ="字段名称")
private String fieldColumnName;
@ApiParam(value ="属性类型名称") @ApiParam(value ="属性类型名称")
private String fieldTypeName; private String fieldTypeName;

@ -40,6 +40,9 @@ public class ClassModel implements Serializable {
@ApiParam(value ="类名") @ApiParam(value ="类名")
private String clzSimpleName; private String clzSimpleName;
@ApiParam(value ="表名称名")
private String clzTableName;
@ApiParam(value ="类全名") @ApiParam(value ="类全名")
private String clzFullName; private String clzFullName;

@ -1,5 +1,6 @@
package cn.estsh.i3plus.pojo.model.report; package cn.estsh.i3plus.pojo.model.report;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.Data; import lombok.Data;
@ -17,7 +18,8 @@ public class BrDataSourceModel {
/** /**
* *
*/ */
public static final BrDataSourceModel DEFAULT_DATA_SOURCE = new BrDataSourceModel("默认数据源", "DEFAULT", null, null, "使用默认数据源"); public static final BrDataSourceModel DEFAULT_DATA_SOURCE = new BrDataSourceModel("默认数据源", "DEFAULT",
CommonEnumUtil.DATA_SOURCE_TYPE.SOURCE_MARIA_DB.getValue(), null, "使用默认数据源");
@ApiParam(value ="数据源名称") @ApiParam(value ="数据源名称")
private String sourceName; private String sourceName;

@ -1,6 +1,7 @@
package cn.estsh.i3plus.pojo.model.report; package cn.estsh.i3plus.pojo.model.report;
import cn.estsh.i3plus.pojo.base.bean.BaseResultBean; import cn.estsh.i3plus.pojo.base.bean.BaseResultBean;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.report.bean.*; import cn.estsh.i3plus.pojo.report.bean.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
@ -71,18 +72,18 @@ public class TemplateModel implements Serializable {
@ApiParam(value = "跨服务调用解析后数据") @ApiParam(value = "跨服务调用解析后数据")
private Object option; private Object option;
@ApiParam(value = "分页参数")
private Pager pager;
@ApiParam(value = "页面查询条件") @ApiParam(value = "页面查询条件")
private Map<String,Object> findParam; private Map<String,Object> findParam;
@ApiParam("执行 HQL ") @ApiParam("执行 HQL ")
private String selectHql; private String selectSql;
@ApiParam("执行 HQL 返回数量")
private String countSql;
@ApiParam("执行 HQL 返回数量") @ApiParam("执行 HQL 返回数量")
private String countHql; private String querySql;
//
// @ApiParam("执行 HQL 参数名称 ")
// private String[] paramName;
//
// @ApiParam("执行 HQL 参数值 ")
// private Object[] paramValue;
} }

@ -55,21 +55,21 @@ public class BrPojo extends BaseBean {
@ApiParam(value ="数据源编码") @ApiParam(value ="数据源编码")
private String sourceCode; private String sourceCode;
@Column(name="SOURCE_TYPE")
@ApiParam(value ="数据源类型")
private Integer sourceType;
@Column(name="SOURCE_NAME") @Column(name="SOURCE_NAME")
@ApiParam(value ="数据源名称") @ApiParam(value ="数据源名称")
private String sourceName; private String sourceName;
@Column(name="POJO_PACKAGE_CODE") @Column(name="POJO_TABLE_NAME")
@ApiParam(value ="对象全路径") @ApiParam(value ="对象表名称")
private String pojoPackageCode; private String pojoTableName;
@Column(name="POJO_CODE")
@ApiParam(value ="对象代码")
private String pojoCode;
@Column(name="POJO_CODE_ALIAS") @Column(name="POJO_TABLE_NAME_ALIAS")
@ApiParam(value ="对象别名") @ApiParam(value ="对象表别名")
private String pojoCodeAlias; private String pojoTableNameAlias;
@Column(name="pojo_name") @Column(name="pojo_name")
@ApiParam(value ="对象名称") @ApiParam(value ="对象名称")
@ -79,9 +79,9 @@ public class BrPojo extends BaseBean {
@ApiParam(value ="对象排序") @ApiParam(value ="对象排序")
private Integer pojoSort; private Integer pojoSort;
@Column(name="POJO_ATTR") @Column(name="POJO_COLUMN_NAME")
@ApiParam(value ="连接属性") @ApiParam(value ="连接属性")
private String pojoAttr; private String pojoColumnName;
@Column(name="JOIN_TYPE") @Column(name="JOIN_TYPE")
@ApiParam(value ="连接关系") @ApiParam(value ="连接关系")
@ -107,20 +107,20 @@ public class BrPojo extends BaseBean {
private String joinPojoNameRdd; private String joinPojoNameRdd;
@Column(name="JOIN_POJO_CODE_RDD") @Column(name="JOIN_POJO_CODE_RDD")
@ApiParam(value ="连接对象代码") @ApiParam(value ="连接对象名称")
private String joinPojoCodeRdd; private String joinTableNameRdd;
@Column(name="JOIN_POJO_CODE_ALIAS_RDD") @Column(name="JOIN_POJO_CODE_ALIAS_RDD")
@ApiParam(value ="连接对象别名") @ApiParam(value ="连接对象别名")
private String joinPojoCodeAliasRdd; private String joinTableNameAliasRdd;
@Column(name="JOIN_POJO_ATTR") @Column(name="JOIN_COLUMN_NAME")
@ApiParam(value ="连接对象属性") @ApiParam(value ="连接字段名称")
private String joinPojoAttr; private String joinColumnName;
@Column(name="POJO_HQL") @Column(name="POJO_SQL")
@ApiParam(value ="对象名称") @ApiParam(value ="对象名称")
private String pojoHql; private String pojoSql;
@Column(name="POJO_DESCRIPTION") @Column(name="POJO_DESCRIPTION")
@ApiParam(value ="对象描述") @ApiParam(value ="对象描述")

@ -52,17 +52,17 @@ public class BrPojoAttr extends BaseBean {
@ApiParam(value ="主服务对象包名称" , access ="服务对象包名称") @ApiParam(value ="主服务对象包名称" , access ="服务对象包名称")
private String packageNameRdd; private String packageNameRdd;
@Column(name="POJO_NAME_ALIAS") @Column(name="POJO_TABLE_NAME_ALIAS")
@ApiParam(value ="对象别名") @ApiParam(value ="对象别名")
private String pojoNameAlias; private String pojoTableNameAlias;
@Column(name="ATTR_NAME") @Column(name="ATTR_COLUMN_NAME")
@ApiParam(value ="属性别名") @ApiParam(value ="属性别名")
private String attrName; private String attrColumnName;
@Column(name="ATTR_NAME_ALIAS") @Column(name="ATTR_COLUMN_NAME_ALIAS")
@ApiParam(value ="属性别名") @ApiParam(value ="属性别名")
private String attrNameAlias; private String attrColumnNameAlias;
@Column(name="PARENT_ID") @Column(name="PARENT_ID")
@ApiParam(value ="上级ID",example = "-1") @ApiParam(value ="上级ID",example = "-1")

@ -53,21 +53,25 @@ public class BrPojoFilterAttr extends BaseBean {
@ApiParam(value ="对象名称") @ApiParam(value ="对象名称")
private String pojoNameRdd; private String pojoNameRdd;
@Column(name="POJO_CODE_RDD") @Column(name="POJO_TABLE_NAME_RDD")
@ApiParam(value ="对象代码") @ApiParam(value ="对象表名称")
private String pojoCodeRdd; private String pojoTableNameRdd;
@Column(name="POJO_CODE_ALIAS_RDD") @Column(name="POJO_TABLE_NAME_ALIAS_RDD")
@ApiParam(value ="对象别名") @ApiParam(value ="对象别名")
private String pojoCodeAliasRdd; private String pojoTableNameAliasRdd;
@Column(name="POJO_ATTR") @Column(name="POJO_COLUMN_NAME")
@ApiParam(value ="对象属性") @ApiParam(value ="对象属性")
private String pojoAttr; private String pojoColumnName;
@Column(name="PACKAGE_POJO_ATTR") // @Column(name="POJO_CODE_NAME")
// @ApiParam(value ="对象属性")
// private String pojoCodeName;
//
@Column(name="POJO_TABLE_COLUMN_NAME")
@ApiParam(value ="对象属性全路径") @ApiParam(value ="对象属性全路径")
private String packagePojoAttr; private String pojoTableColumnName;
/************************************** 属性信息 **************************************/ /************************************** 属性信息 **************************************/

@ -48,21 +48,26 @@ public class BrPojoViewAttr extends BaseBean {
@ApiParam(value = "对象名称") @ApiParam(value = "对象名称")
private String pojoNameRdd; private String pojoNameRdd;
@Column(name = "POJO_CODE_RDD") @Column(name = "POJO_TABLE_NAME_RDD")
@ApiParam(value = "对象代码") @ApiParam(value = "对象代码")
private String pojoCodeRdd; private String pojoTableNameRdd;
@Column(name = "POJO_CODE_ALIAS_RDD") @Column(name = "POJO_TABLE_NAME_ALIAS_RDD")
@ApiParam(value = "对象别名") @ApiParam(value = "对象别名")
private String pojoCodeAliasRdd; private String pojoTableNameAliasRdd;
@Column(name="POJO_ATTR") @Column(name="POJO_COLUMN_NAME")
@ApiParam(value ="对象属性") @ApiParam(value ="对象属性")
private String pojoAttr; private String pojoColumnName;
@Column(name="PACKAGE_POJO_ATTR")
@ApiParam(value ="对象属性全路径") // @Column(name="POJO_CODE_NAME")
private String packagePojoAttr; // @ApiParam(value ="对象属性")
// private String pojoCodeName;
//
// @Column(name="PACKAGE_POJO_ATTR")
// @ApiParam(value ="对象属性全路径")
// private String packagePojoAttr;
@Column(name="VIEW_ATTR_ALIAS") @Column(name="VIEW_ATTR_ALIAS")
@ApiParam(value ="视图属性别名") @ApiParam(value ="视图属性别名")

@ -192,9 +192,9 @@ public class ReportHqlPack {
DdlPreparedPack.getNumEqualPack(pojo.getJoinType(),"joinType",result); DdlPreparedPack.getNumEqualPack(pojo.getJoinType(),"joinType",result);
DdlPreparedPack.getNumEqualPack(pojo.getPojoType(),"pojoType",result); DdlPreparedPack.getNumEqualPack(pojo.getPojoType(),"pojoType",result);
DdlPreparedPack.getNumEqualPack(pojo.getWhereType(),"whereType",result); DdlPreparedPack.getNumEqualPack(pojo.getWhereType(),"whereType",result);
DdlPreparedPack.getStringEqualPack(pojo.getPojoCodeAlias(),"pojoCodeAlias",result); DdlPreparedPack.getStringEqualPack(pojo.getPojoTableNameAlias(),"pojoTableNameAlias",result);
DdlPreparedPack.getStringLikerPack(pojo.getPojoName(),"pojoName",result); DdlPreparedPack.getStringLikerPack(pojo.getPojoName(),"pojoName",result);
DdlPreparedPack.getStringLikerPack(pojo.getPojoCode(),"pojoCode",result); DdlPreparedPack.getStringLikerPack(pojo.getPojoTableName(),"pojoTableName",result);
return result; return result;
} }

Loading…
Cancel
Save