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 f5dacb5

Browse files
APIAuto:解决自动生成场景用例参数传递配置的 bug
1 parent 38bd16e commit f5dacb5

File tree

2 files changed

+11
-11
lines changed
  • APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api

2 files changed

+11
-11
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ var StringUtil = {
160160
return keys[keys.length - 2];
161161
}
162162

163-
boolean hasBig = false;
163+
var hasBig = false;
164164
var lastInd = -1;
165165
for (var i = s.length - 1; i >= 0; i--) {
166166
var c = s.substring(i, i + 1);
@@ -184,7 +184,7 @@ var StringUtil = {
184184
return keys[keys.length - 1];
185185
}
186186

187-
boolean hasBig = false;
187+
var hasBig = false;
188188
var lastInd = -1;
189189
for (var i = s.length - 1; i >= 0; i--) {
190190
var c = s.substring(i, i + 1);

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3590,7 +3590,7 @@ https://github.com/Tencent/APIJSON/issues
35903590
var col = StringUtil.getColumnName(key)
35913591
col = StringUtil.firstCase(tbl, false)
35923592

3593-
var ks = keys == null ? [] : keys.subarray(0, keys.length - 1)
3593+
var ks = keys == null ? [] : keys.slice(0, keys.length - 1)
35943594
ks.push(tbl)
35953595
var p = ks.join('/')
35963596
var cp = StringUtil.isNotEmpty(tbl) ? childPath : (StringUtil.isEmpty(p) ? '' : p + '/') + col
@@ -3689,8 +3689,8 @@ https://github.com/Tencent/APIJSON/issues
36893689
config += '\n// 可替代上面的 ' + prefix + 'PRE_DATA("' + 'data/0/' + table.toLowerCase() + '_id")';
36903690
config += '\n// 可替代上面的 ' + prefix + 'PRE_DATA("' + 'list/0/' + StringUtil.firstCase((tbl || table) + 'Id') + '")';
36913691
} else {
3692-
config += prefix + 'PRE_DATA("' + kp + '[]') + '/0/' + StringUtil.firstCase((tbl || table) + 'Id') + '")';
3693-
config += '\n// 可替代上面的 ' + prefix + 'PRE_DATA("' + (path || '') + '[]/0/' + (tbl || table).toLowerCase() + '_id")';
3692+
config += prefix + 'PRE_DATA("' + kp + '[]/0/' + StringUtil.firstCase((tbl || table) + 'Id') + '")';
3693+
config += '\n// 可替代上面的 ' + prefix + 'PRE_DATA("' + kp + '[]/0/' + (tbl || table).toLowerCase() + '_id")';
36943694
}
36953695

36963696
config += '\n// 可替代上面的 ' + prefix + 'PRE_DATA("' + StringUtil.firstCase((tbl || table) + 'Id') + '")';
@@ -3705,7 +3705,7 @@ https://github.com/Tencent/APIJSON/issues
37053705
config += '\n// 可替代上面的 ' + prefix + 'CTX_GET("' + StringUtil.firstCase((tbl || table) + 'Id') + '")';
37063706
config += '\n// 可替代上面的 ' + prefix + 'CTX_GET("' + table.toLowerCase() + '_id")';
37073707
config += '\n// 可替代上面的 ' + prefix + 'PRE_DATA("' + (StringUtil.isEmpty(path) ? '' : path + '/') + StringUtil.firstCase((tbl || table) + 'Id') + '")';
3708-
config += '\n// 可替代上面的 ' + prefix + 'PRE_DATA("' + (StringUtil.isEmpty(path) ? '' : path + '/') + table.toLowerCase() + '_id")';
3708+
config += '\n// 可替代上面的 ' + prefix + 'PRE_DATA("' + (StringUtil.isEmpty(path) ? '' : path + '/') + (tbl || table).toLowerCase() + '_id")';
37093709
}
37103710
else if (StringUtil.isIdKey(key)) {
37113711
if (isRestful) {
@@ -3719,8 +3719,8 @@ https://github.com/Tencent/APIJSON/issues
37193719
config += prefix + 'PRE_DATA("[]/0/' + (StringUtil.isEmpty(p) ? '' : p + '/') + 'id")';
37203720
config += '\n// 可替代上面的 ' + prefix + 'PRE_DATA("[]/0/' + fd + (col || key) + '")';
37213721
config += '\n// 可替代上面的 ' + prefix + 'PRE_DATA("[]/0/' + fd + 'id")';
3722-
config += '\n// 可替代上面的 ' + prefix + 'PRE_DATA("' + (p || path || '') + '[]/0/' + (col || key) + '")';
3723-
config += '\n// 可替代上面的 ' + prefix + 'PRE_DATA("' + (p || path || '') + '[]/0/id")';
3722+
config += '\n// 可替代上面的 ' + prefix + 'PRE_DATA("' + kp + '[]/0/' + (col || key) + '")';
3723+
config += '\n// 可替代上面的 ' + prefix + 'PRE_DATA("' + kp + '[]/0/id")';
37243724
}
37253725
config += '\n// 可替代上面的 ' + prefix + 'PRE_DATA("' + cp + '")';
37263726
if (isRestful) {
@@ -3775,14 +3775,14 @@ https://github.com/Tencent/APIJSON/issues
37753775
config += '\n// 可替代上面的 ' + prefix + 'CTX_PUT("list/0' + cp + '", PRE_DATA")';
37763776
} else {
37773777
config += '\n// 可替代上面的 ' + prefix + 'PRE_DATA("[]/0/' + cp + '")';
3778-
config += '\n// 可替代上面的 ' + prefix + 'PRE_DATA("' + (p || path || '') + '[]/0/' + (col || key) + '")';
3779-
config += '\n// 可替代上面的 ' + prefix + 'CTX_PUT("' + (p || path || '') + '[]/0/' + (col || key) + '", PRE_DATA")';
3778+
config += '\n// 可替代上面的 ' + prefix + 'PRE_DATA("' + kp + '[]/0/' + (col || key) + '")';
3779+
config += '\n// 可替代上面的 ' + prefix + 'CTX_PUT("' + kp + '[]/0/' + (col || key) + '", PRE_DATA")';
37803780
config += '\n// 可替代上面的 ' + prefix + 'CTX_PUT("[]/0' + cp + '", PRE_DATA")';
37813781
}
37823782
}
37833783

37843784
config += '\n// 可替代上面的 ' + prefix + 'CTX_PUT("' + key + '", App.getCurrentAccount())';
3785-
config += '\n// 可替代上面的 ' + prefix + 'CTX_PUT("' + childPath + '", PRE_DATA")';
3785+
config += '\n// 可替代上面的 ' + prefix + 'CTX_PUT("' + cp + '", PRE_DATA")';
37863786
config += '\n// 可替代上面的 ' + prefix + 'CTX_PUT("' + childPath + '", PRE_ARG")';
37873787
if (key != childPath) {
37883788
config += '\n// 可替代上面的 ' + prefix + 'CTX_PUT("' + key + '", PRE_DATA")';

0 commit comments

Comments
(0)

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