Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 397ae3f

Browse files
Java:MultiDataSource 更新 APIAuto 和升级 APIJSON 5.4.0, apijson-framework-5.4.0, apijson-column-1.2.9, apijson-router-1.1.0
1 parent 6343fc5 commit 397ae3f

File tree

10 files changed

+1063
-57
lines changed

10 files changed

+1063
-57
lines changed
-202 KB
Binary file not shown.
205 KB
Binary file not shown.
5.39 KB
Binary file not shown.
-40.7 KB
Binary file not shown.
2.28 KB
Binary file not shown.
13.4 KB
Binary file not shown.

‎APIJSON-Java-Server/APIJSONBoot-MultiDataSource/pom.xml‎

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>apijson.boot</groupId>
77
<artifactId>apijson-boot-multi-datasource</artifactId>
8-
<version>5.3.0</version>
8+
<version>5.4.0</version>
99
<packaging>jar</packaging>
1010

1111
<name>APIJSONBoot-MultiDataSource</name>
@@ -62,40 +62,28 @@
6262
<dependency>
6363
<groupId>com.github.Tencent</groupId>
6464
<artifactId>APIJSON</artifactId>
65-
<version>5.3.0</version>
65+
<version>5.4.0</version>
6666
</dependency>
6767
<dependency>
6868
<groupId>com.github.APIJSON</groupId>
6969
<artifactId>apijson-framework</artifactId>
70-
<version>5.3.0</version>
71-
<!-- <exclusions>-->
72-
<!-- <exclusion>-->
73-
<!-- <groupId>com.github.Tencent</groupId>-->
74-
<!-- <artifactId>APIJSON</artifactId>-->
75-
<!-- </exclusion>-->
76-
<!-- </exclusions>-->
70+
<version>5.4.0</version>
7771
</dependency>
7872
<dependency>
7973
<groupId>com.github.APIJSON</groupId>
8074
<artifactId>apijson-column</artifactId>
81-
<version>1.2.7</version>
82-
<!-- <exclusions>-->
83-
<!-- <exclusion>-->
84-
<!-- <groupId>com.github.Tencent</groupId>-->
85-
<!-- <artifactId>APIJSON</artifactId>-->
86-
<!-- </exclusion>-->
87-
<!-- </exclusions>-->
75+
<version>1.2.9</version>
8876
</dependency>
8977
<dependency>
9078
<groupId>com.github.APIJSON</groupId>
9179
<artifactId>apijson-router</artifactId>
92-
<version>1.0.8</version>
93-
<!-- <exclusions>-->
94-
<!-- <exclusion>-->
95-
<!-- <groupId>com.github.Tencent</groupId>-->
96-
<!-- <artifactId>APIJSON</artifactId>-->
97-
<!-- </exclusion>-->
98-
<!-- </exclusions>-->
80+
<version>1.1.0</version>
81+
<exclusions>
82+
<exclusion>
83+
<groupId>com.github.Tencent</groupId>
84+
<artifactId>APIJSON</artifactId>
85+
</exclusion>
86+
</exclusions>
9987
</dependency>
10088
<!-- 可使用 libs 目录的 apijson-orm.jar, apijson-framework.jar, apijson-column.jar 来替代,两种方式二选一 >>>>>>>>>> -->
10189

‎APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/apijson/CodeUtil.js‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5880,7 +5880,7 @@ var CodeUtil = {
58805880
},
58815881
DATABASE_KEYS: ['MYSQL', 'POSTGRESQL', 'SQLSERVER', 'ORACLE', 'DB2', 'DAMENG', 'CLICKHOUSE', 'SQLITE', 'TDENGINE'],
58825882

5883-
getComment4Function: function (funCallStr, method) {
5883+
getComment4Function: function (funCallStr, method,language) {
58845884
if (typeof funCallStr != 'string') {
58855885
return '远程函数 value 必须是 String 类型!';
58865886
}
@@ -5928,7 +5928,7 @@ var CodeUtil = {
59285928
throw new Error('远程函数参数数量 ' + argLen + ' 非法!必须是 ' + allowArgLen + ' 个!格式为 ' + fun + '(' + StringUtil.trim(allowArgStr) + ')')
59295929
}
59305930

5931-
return funObj.rawDetail || funObj.detail
5931+
return CodeUtil.getType4Language(language,funObj.returntype)+', '+(funObj.rawDetail || funObj.detail)
59325932
},
59335933

59345934
getFunctionFromList: function (name, method) {
@@ -6086,7 +6086,7 @@ var CodeUtil = {
60866086
var c = ''
60876087
if (StringUtil.isNotEmpty(value)) { // isValueNotEmpty 居然不对
60886088
try {
6089-
c = CodeUtil.getComment4Function(value, method)
6089+
c = CodeUtil.getComment4Function(value, method,language)
60906090
} catch (e) {
60916091
return ' ! ' + e.message
60926092
}
@@ -6137,7 +6137,9 @@ var CodeUtil = {
61376137
else if (value instanceof Object) {
61386138
if ((isReq != true || isRestful != true) && StringUtil.isEmpty(key, true)) {
61396139
if (names == null || names.length <= 0) {
6140-
return isReq != true || isWarning ? '' : ' ' + CodeUtil.getComment('根对象,可在内部加 format,tag,version,@role,@database,@schema,@datasource,@explain,@cache 等全局关键词键值对', false, ' ');
6140+
return isReq != true || isWarning ? '' : ' ' + CodeUtil.getComment('根对象,可在内部加 Table:{}'
6141+
+ (method == null || method == 'GET' || method == 'GETS' ? ', []:{}' : (method == 'POST' || method == 'PUT' ? ', []:[{}]' : ''))
6142+
+ ' 等或 format,tag,version,@role,@database,@schema,@datasource,@explain,@cache 等全局关键词键值对', false, ' ');
61416143
}
61426144

61436145
// 解决 APIJSON 批量 POST/PUT "Table[]": [{ key:value }] 中 {} 不显示注释
@@ -6170,7 +6172,7 @@ var CodeUtil = {
61706172
return CodeUtil.getComment('子查询,里面必须有 "from":Table, Table:{} < ' + CodeUtil.getCommentFromDoc(tableList, objName, key.substring(0, key.length - 1),
61716173
method, database, language, isReq != true || isRestful, isReq, pathKeys, isRestful, value, null, null, true, isWarning), false, ' ') + extraComment;
61726174
}
6173-
return CodeUtil.getComment('子查询,可在内部加 from,range 或 数组关键词 等键值对,需要被下面的表字段相关 key 引用赋值', false, ' ') + extraComment;
6175+
return CodeUtil.getComment('子查询,可在内部加 Table:{} 或 from,range 或 数组关键词 等键值对,需要被下面的表字段相关 key 引用赋值', false, ' ') + extraComment;
61746176
}
61756177

61766178
if (isRestful != true && JSONObject.isArrayKey(key)) {
@@ -6191,7 +6193,8 @@ var CodeUtil = {
61916193
var firstIndex = objName.indexOf('-');
61926194
var firstKey = firstIndex < 0 ? objName : objName.substring(0, firstIndex);
61936195
alias = alias.length <= 0 ? '' : '新建别名: ' + alias + ' < ';
6194-
return CodeUtil.getComment((JSONObject.isTableKey(firstKey) ? '提取' + objName + ' < ' : '') + alias + '数组,可在内部加 count,page,query,join 等关键词键值对', false, ' ') + extraComment;
6196+
return CodeUtil.getComment((JSONObject.isTableKey(firstKey) ? '提取' + objName + ' < ' : '') + alias
6197+
+ '数组,可在内部加 Table:{}, []:{} 等或 count,page,query,compat,join 等关键词键值对', false, ' ') + extraComment;
61956198
}
61966199

61976200
var aliaIndex = key.indexOf(':');

‎APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/index.html‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,18 @@
293293

294294

295295
</textarea>
296+
<!-- <select id="vOption" style="position: fixed" v-show="options != null && options.length > 0">-->
297+
<!-- <option selected="index == 0" style="width: 100%" v-for="(item, index) in options" :id="'option' + index" >{{item.name + ': ' + item.comment}}</option>-->
298+
<!-- </select>-->
299+
<!-- <div class="dropdown-menu" id="vOption" style="position: fixed;background: red" v-show="options != null && options.length > 0">-->
300+
<!-- <a class="dropdown-item" style="width: 100%;background: blue" v-for="(item, index) in options" :id="'option' + index" @keyup="doOnKeyUp(event, 'option', false, item)" >{{item.name + ': ' + item.comment}}</a>-->
301+
<!-- </div>-->
302+
<!-- <select class="form-control dropdown-menu" id="vOption" style="position: fixed;background: red" v-show="options != null && options.length > 0">-->
303+
<!-- <option class="dropdown-item" style="width: 100%;background: blue" v-for="(item, index) in options" :id="'option' + index" @keyup="doOnKeyUp(event, 'option', false, item)" >{{StringUtil.get(item.name) + ': ' + StringUtil.get(item.type) + ',' + StringUtil.trim(item.comment)}}</option>-->
304+
<!-- </select>-->
305+
<!-- <ul class="dropdown-menu" id="vOption" style="display: block; position: fixed; top: 20px; left: 10px" v-show="options != null && options.length > 0">-->
306+
<!-- <li class="dropdown-item" style="width: 100%" :style="{'color': (index == selectIndex ? 'orangered' : 'black')}" v-for="(item, index) in options" :id="'option' + index" @click="selectInput(vInput, item, index, true)" >{{StringUtil.get(item.name) + ': ' + StringUtil.get(item.type) + ', ' + StringUtil.trim(item.comment)}}</li>-->
307+
<!-- </ul>-->
296308
</div>
297309
<div id="vRequestMarkdown" v-show="isPreviewEnabled" style="width: 100%;height: 100%;position: relative;"></div>
298310

@@ -600,6 +612,10 @@
600612
<input id="vCount" v-model="count" style="width: 30px;text-align: center" type="number" @keyup="doOnKeyUp(event, 'document', true)" />
601613
<a ></a>
602614
</div>
615+
616+
<ul class="dropdown-menu" id="vOption" style="display: block; left: 0px; top: 0px; max-height: 100%; max-width: 100%; overflow: scroll; overflow-x: scroll; overflow-y:scroll;" v-show="options != null && options.length > 0">
617+
<li class="dropdown-item" style="width: 100%" :style="{'color': (index == selectIndex ? 'orangered' : 'black')}" v-for="(item, index) in options" :id="'option' + index" @click="onClickSelectInput(item, index)" >{{StringUtil.get(item.name) + ': ' + StringUtil.get(item.type) + ', ' + StringUtil.trim(item.comment)}}</li>
618+
</ul>
603619
</div>
604620

605621

@@ -867,6 +883,7 @@
867883
var vType = document.getElementById("vType");
868884
var vSend = document.getElementById("vSend");
869885

886+
var vOption = document.getElementById("vOption");
870887
var vInput = document.getElementById("vInput");
871888
var vWarning = document.getElementById("vWarning");
872889
var vComment = document.getElementById("vComment");

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /