@@ -5880,7 +5880,7 @@ var CodeUtil = {
5880
5880
} ,
5881
5881
DATABASE_KEYS : [ 'MYSQL' , 'POSTGRESQL' , 'SQLSERVER' , 'ORACLE' , 'DB2' , 'DAMENG' , 'CLICKHOUSE' , 'SQLITE' , 'TDENGINE' ] ,
5882
5882
5883
- getComment4Function : function ( funCallStr , method ) {
5883
+ getComment4Function : function ( funCallStr , method , language ) {
5884
5884
if ( typeof funCallStr != 'string' ) {
5885
5885
return '远程函数 value 必须是 String 类型!' ;
5886
5886
}
@@ -5928,7 +5928,7 @@ var CodeUtil = {
5928
5928
throw new Error ( '远程函数参数数量 ' + argLen + ' 非法!必须是 ' + allowArgLen + ' 个!格式为 ' + fun + '(' + StringUtil . trim ( allowArgStr ) + ')' )
5929
5929
}
5930
5930
5931
- return funObj . rawDetail || funObj . detail
5931
+ return CodeUtil . getType4Language ( language , funObj . returntype ) + ', ' + ( funObj . rawDetail || funObj . detail )
5932
5932
} ,
5933
5933
5934
5934
getFunctionFromList : function ( name , method ) {
@@ -6086,7 +6086,7 @@ var CodeUtil = {
6086
6086
var c = ''
6087
6087
if ( StringUtil . isNotEmpty ( value ) ) { // isValueNotEmpty 居然不对
6088
6088
try {
6089
- c = CodeUtil . getComment4Function ( value , method )
6089
+ c = CodeUtil . getComment4Function ( value , method , language )
6090
6090
} catch ( e ) {
6091
6091
return ' ! ' + e . message
6092
6092
}
@@ -6137,7 +6137,9 @@ var CodeUtil = {
6137
6137
else if ( value instanceof Object ) {
6138
6138
if ( ( isReq != true || isRestful != true ) && StringUtil . isEmpty ( key , true ) ) {
6139
6139
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 , ' ' ) ;
6141
6143
}
6142
6144
6143
6145
// 解决 APIJSON 批量 POST/PUT "Table[]": [{ key:value }] 中 {} 不显示注释
@@ -6170,7 +6172,7 @@ var CodeUtil = {
6170
6172
return CodeUtil . getComment ( '子查询,里面必须有 "from":Table, Table:{} < ' + CodeUtil . getCommentFromDoc ( tableList , objName , key . substring ( 0 , key . length - 1 ) ,
6171
6173
method , database , language , isReq != true || isRestful , isReq , pathKeys , isRestful , value , null , null , true , isWarning ) , false , ' ' ) + extraComment ;
6172
6174
}
6173
- return CodeUtil . getComment ( '子查询,可在内部加 from,range 或 数组关键词 等键值对,需要被下面的表字段相关 key 引用赋值' , false , ' ' ) + extraComment ;
6175
+ return CodeUtil . getComment ( '子查询,可在内部加 Table:{} 或 from,range 或 数组关键词 等键值对,需要被下面的表字段相关 key 引用赋值' , false , ' ' ) + extraComment ;
6174
6176
}
6175
6177
6176
6178
if ( isRestful != true && JSONObject . isArrayKey ( key ) ) {
@@ -6191,7 +6193,8 @@ var CodeUtil = {
6191
6193
var firstIndex = objName . indexOf ( '-' ) ;
6192
6194
var firstKey = firstIndex < 0 ? objName : objName . substring ( 0 , firstIndex ) ;
6193
6195
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 ;
6195
6198
}
6196
6199
6197
6200
var aliaIndex = key . indexOf ( ':' ) ;
0 commit comments