Skip to content

Commit f6166a9

Browse files
committed
Java:MultiDataSource 静态网页新增 主页、UnitAuto、SQLAuto、UIGO
1 parent bca8a37 commit f6166a9

File tree

1,586 files changed

+366816
-1223
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,586 files changed

+366816
-1223
lines changed

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

Lines changed: 94 additions & 68 deletions
Large diffs are not rendered by default.

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

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,10 +1764,26 @@ var JSONResponse = {
17641764
if (tgt == null) {
17651765
tgt = {};
17661766
}
1767-
var startsWithQuestion = comment.startsWith('?')
1768-
tgt.type = JSONResponse.getType(real);
1769-
tgt.notNull = real != null && startsWithQuestion != true
1770-
tgt.comment = startsWithQuestion ? comment.substring(1) : comment
1767+
var ind = comment.indexOf(', ')
1768+
if (ind < 0) {
1769+
ind = comment.indexOf(',')
1770+
}
1771+
1772+
var prefix = ind <= 0 ? '' : comment.substring(0, ind).trim()
1773+
comment = ind < 0 ? comment : comment.substring(ind + 1)
1774+
var nullable = prefix.endsWith('?')
1775+
var notEmpty = prefix.endsWith('!')
1776+
var name = nullable || notEmpty ? prefix.substring(0, prefix.length - 1) : prefix
1777+
if (StringUtil.isName(name)) {
1778+
tgt.name = name
1779+
} else {
1780+
nullable = notEmpty = null
1781+
}
1782+
1783+
tgt.type = JSONResponse.getType(real)
1784+
tgt.notNull = notEmpty == true || nullable == false || (nullable == null && real != null)
1785+
tgt.notEmpty = notEmpty == true || (notEmpty == null && StringUtil.isNotEmpty(real))
1786+
tgt.comment = comment
17711787

17721788
return target;
17731789
},

0 commit comments

Comments
 (0)