@@ -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(':');
0 commit comments