kimi
2020-05-27 c007f0ca1785db093d48f4846cda82fe8e955765
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
package com.highdatas.mdm.util;
 
public interface Constant {
    public static final String dbName = "dbName";
    public static final String USER = "user";
    public static final String ID = "id";
    public static final String HID = "h.id";
    public static final String STD_ID = "std_id";
    public static final String COMMA = " , ";
    public static final String COMMA_TRIM = ",";
    public static final String WHERE_DEFAULT = " 1 = 1 ";
    public static final String WHERE_DEFAULTUN = " 1 <> 1 ";
    public static final String SEGMENT_COMMON = "value = {0}";
    public static final String SEGMENT_STRING = "value = '{0}'";
    public static final String EQUAL = " = ";
    public static final String LIKE = " like ";
    public static final String EMPTY = " ";
    public static final String EMPTY_Str = "";
    public static final String SEMICOLON = ";";
    public static final String colon = ":";
    public static final String UnderLine = "_";
    public static final String WHERE_SEGMENT = "whereSegment";
    public static final String VERSION = "version";
    public static final String VERSION_Default = "V1.0";
    public static final String UPDATE_SEGMENT = "updateSegment";
    public static final String TOTAL = "total";
    public static final String FIELDS = "fields";
    public static final String DEAL = "deal";
    public static final String PARENT_ID = "parent_id";
 
    public static final String RECORD = "_record";
    public static final String MAX = "max";
 
    String Dot = "\\.";
    String Default_Patter = "(?<=@\\{)(.+?)(?=\\})";
    String addDataType = "addDataType";
    String addAll = "addAll";
 
    String UnMatched  = "未生效";
    String Current = "当前版本";
    String History = "历史版本";
    String afterDate = "afterData";
    String currentData = "currentData";
    String beforeData = "beforeData";
 
    String StructureMenu = "StructureMenu";
    String tableName = "tableName";
    String Alias = "{0}.{1}";
    String extent = "{0}~{1}";
    String FieldAsAlias = "{0} AS {1}";
    String caseWhen = " case when a2.{0} != null then a2.{0} else a1.{0} end  as {0}";
    String H = "h";
    String A1 = "a1";
    String A2 = "a2";
    String All = "all";
    String All_UPCASE = "All";
    String DataMenu = "DataMenu";
    String AND = " and ";
    String MD = "md_";
 
    String CNT = "cnt";
    String checkFieldSqlTemplate = "select count(1) as cnt from (select {0} from {1}) a1";
    String selectRecordFieldSqlTemplate = "select {0}, 0 as deal from {1}";
    String selectFieldSqlTemplate = "select {0} from ({1}) a  where {2}";
    String selectFieldTableTemplate = "select {0} from {1}  where {2}";
    String selectFieldSqlMysqlTemplate = "select * from {0} limit 1";
    String STEP_READ_FROM_TABLE = "Read data from table";
    String STEP_INSERT_UPDATE = "Insert or update";
    String STEP_DUMMY = "Dummy";
    String MYSQL_UUID = " UUID_SHORT() ";
    String TYPE =  "type";
    String Active =  "active";
    String AssembleTempTable = "hj_table_";
    String AssembleTempSql = "hj_sql_";
    String CreateFieldMysql = "`{0}` VARCHAR(255)  NULL";
    String CreateTableMysql = "CREATE TABLE IF NOT EXISTS `{0}` ({1}) ENGINE=InnoDB DEFAULT CHARSET=utf8;";
    String checkTableByNameBySchema = "select table_name from information_schema.tables where table_schema={0} and table_name = {1};";
    String Temp =  "temp_";
    String Temp2RecordMySQLTemplate = "INSERT INTO {0} ({1}) SELECT {2}, UUID_SHORT() as std_id, UUID_SHORT() as id, 0 as deal from  {3}";
    String MYSQLJoinUpdateSql = "INSERT INTO {0} ({1})  SELECT {2} , UUID_SHORT() as id, s1.id as std_id, 0 as deal  FROM {3} t1 inner join {4} s1  on  {5};";
    String MYSQLJoinAddSql = "INSERT INTO {0} ({1})  SELECT {2} , UUID_SHORT() as std_id, UUID_SHORT() as id, 0 as deal  FROM {3} t1 WHERE NOT EXISTS(SELECT * FROM  {4} s1 WHERE {5});";
    String Temp2RecordHbaseTemplate = "INSERT INTO {0} ({1}) SELECT ({2}, ) from {3}";
    String ParamsShell = "@\\{{0}\\}";
    String Cron = "cron";
    String TABLE_NAME = "TABLE_NAME";
    String Success = "success";
    String Data = "data";
    String Mysql_UUID = "replace(uuid(),''-'', '''')";
    String MainData = "MainData";
    String MYSQLJoinParse =  " t1.{0} = s1.{0} ";
    String T1 = "t1";
    String S1 = "s1";
    String Code = "code";
    String truncateTableMysql = "truncate table {0};";
    String DropTableMysql = "DROP TABLE IF EXISTS {0};";
    String DeleteDealMysqlTemplate = "delete from {0} where deal = 0";
    String QUESTION = "?";
 
    String MysqlAddField = "alter table {0} add {1} {2} null;"; //alter table table1 add transactor varchar(10) not Null;
    String ResultList = "resultList";
    String fieldName = "fieldName";
    String sucPercent = "sucPercent";
    String varchar = "varchar";
    String varcharSize = " (255) ";
    String Text = " text ";
    String Default = "default";
    String USERID = "user_id";
    String FIELD = "field";
    String DISTINCT = "distinct {0}";
    String InSql = "{0} in ( {1} )";
    String asTempSql = "( {0} ) {1}";
    String z_AllVal = "z_AllVal";
 
    int queueSize = 20;
    int cntCoefficient = 50;
    String VIEW = "view_";
    String InnerJoinTemplate = " {0} {1} on {2}";
    String changedField = "change_field";
    String XLS = "xls";
    String xlsx = "xlsx";
    String LeftJoin = " left join ";
    String InnerJoin = " inner join ";
    String Pre = "pre";
    String PreValue = "原始值";
    String fix = "fix";
    String fixValue = "转换值";
    String userDO = "userDO";
    String MasterDispense = "Master-Dispense";
    String Master = "master";
    String View = "view";
    String Token = "token";
 
    int MaxDispenseSize = Double.valueOf(1024 * 1024 * 0.5).intValue();
    String RECORDS =  "records";
    String SUCCESSCODE = "200";
    String Star = "*";
    String operate  = "operate";
    String timeZone = "serverTimezone";
    String TM = "tm";
    String MT = "mt";
    String IDX_TEMPLATE = "IDX_{0}_{1}";
 
}