Skip to content

Commit ecf658d

Browse files
committed
Java: MultiDataSource 更新内置 APIAuto
1 parent fa9bca8 commit ecf658d

File tree

7 files changed

+819
-247
lines changed

7 files changed

+819
-247
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ var CodeUtil = {
8686
*/
8787
parseComment: function (reqStr, tableList, method, database, language, isReq, standardObj, isExtract, isWarning, isAPIJSONRouter) { //怎么都获取不到真正的长度,cols不行,默认20不变,maxLineLength不行,默认undefined不变 , maxLineLength) {
8888
if (StringUtil.isEmpty(reqStr)) {
89-
return;
89+
return '';
9090
}
9191

9292
var reqObj = JSON5.parse(reqStr);
@@ -132,8 +132,8 @@ var CodeUtil = {
132132

133133
var comment = '';
134134
if (cIndex >= 0) {
135-
if (isExtract && standardObj != null && (depth != 1
136-
|| (isReq != true && [JSONResponse.KEY_CODE, JSONResponse.KEY_MSG, JSONResponse.KEY_THROW].indexOf(key) < 0))) {
135+
if (isExtract && standardObj != null && (isReq || depth != 1
136+
|| [JSONResponse.KEY_CODE, JSONResponse.KEY_MSG, JSONResponse.KEY_THROW].indexOf(key) < 0)) {
137137
comment = line.substring(cIndex + ccLen).trim();
138138
// standardObj = CodeUtil.updateStandardPart(standardObj, names, key, value, comment)
139139
}
@@ -295,7 +295,7 @@ var CodeUtil = {
295295

296296
getOperation: function (method, json) {
297297
var ind = method == null ? -1 : method.indexOf('?');
298-
var method = StringUtil.toLowerCase(ind < 0 ? method : method.substring(0, ind));
298+
method = StringUtil.toLowerCase(ind < 0 ? method : method.substring(0, ind));
299299
if (method.startsWith('insert') || method.startsWith('post') || method.startsWith('add')
300300
|| method.startsWith('pub') || method.startsWith('write')) {
301301
return 'INSERT'

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,15 +518,15 @@ var JSONResponse = {
518518
if (real != null && real.throw != null) {
519519
return {
520520
code: JSONResponse.COMPARE_CODE_CHANGE, //未上传对比标准
521-
msg: '没有校验标准,且 throw 不是 null,而是 ' + real.throw,
521+
msg: '没有校验标准,且 throw ' + real.throw,
522522
path: folder == null ? '' : folder
523523
};
524524
}
525525

526526
if (real == null || real.data == null) {
527527
return {
528528
code: JSONResponse.COMPARE_KEY_LESS, //未上传对比标准
529-
msg: '没有校验标准,且缺少非 null 值的 data 字段',
529+
msg: '没有校验标准,且缺少有效 data ',
530530
path: folder == null ? '' : folder
531531
};
532532
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,9 @@ var StringUtil = {
490490
isCountKey: function (key) {
491491
return StringUtil.isKeyOfCategory(key, 'Count');
492492
},
493+
isPageKey: function (key) {
494+
return StringUtil.isKeyOfCategory(key, 'Page');
495+
},
493496
isTotalKey: function (key) {
494497
return StringUtil.isKeyOfCategory(key, 'Total');
495498
},

APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/css/main.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ textarea {
387387
padding-bottom: 12px;
388388
padding-left: 10px;
389389
padding-right: 10px;
390-
z-index: 100;
390+
z-index: 300;
391391
border: #bbbbbb 1px solid;
392392
border-radius: 6px;
393393
}

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

Lines changed: 110 additions & 73 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)