@@ -866,6 +866,71 @@ var CodeUtil = {
866
866
return table . TABLE_COMMENT ;
867
867
}
868
868
869
+ if ( columnName . endsWith ( "()" ) ) { //方法,查询完后处理,先用一个Map<key,function>保存?
870
+ return '远程函数' ;
871
+ }
872
+
873
+ var prefix ;
874
+ var at = '' ;
875
+ var key ;
876
+
877
+ if ( columnName . endsWith ( "@" ) ) { //引用,引用对象查询完后处理。fillTarget中暂时不用处理,因为非GET请求都是由给定的id确定,不需要引用
878
+ at = '引用赋值' ;
879
+ columnName = columnName . substring ( 0 , columnName . length - 1 ) ;
880
+ }
881
+
882
+ if ( columnName . endsWith ( "$" ) ) { //搜索,查询时处理
883
+ prefix = '模糊搜索' ;
884
+ key = columnName . substring ( 0 , columnName . length - 1 ) ;
885
+ }
886
+ else if ( columnName . endsWith ( "?" ) ) { //匹配正则表达式,查询时处理
887
+ prefix = '正则匹配' ;
888
+ key = columnName . substring ( 0 , columnName . length - 1 ) ;
889
+ }
890
+ else if ( columnName . endsWith ( "{}" ) ) { //被包含,或者说key对应值处于value的范围内。查询时处理
891
+ prefix = '匹配 选项/条件' ;
892
+ key = columnName . substring ( 0 , columnName . length - 2 ) ;
893
+ }
894
+ else if ( columnName . endsWith ( "<>" ) ) { //包含,或者说value处于key对应值的范围内。查询时处理
895
+ prefix = '包含选项' ;
896
+ key = columnName . substring ( 0 , columnName . length - 2 ) ;
897
+ }
898
+ else if ( columnName . endsWith ( "+" ) ) { //延长,PUT查询时处理
899
+ //if (method == PUT) {//不为PUT就抛异常
900
+ prefix = '增加 或 扩展 ' ;
901
+ key = columnName . substring ( 0 , columnName . length - 1 ) ;
902
+ //}
903
+ }
904
+ else if ( columnName . endsWith ( "-" ) ) { //缩减,PUT查询时处理
905
+ //if (method == PUT) {//不为PUT就抛异常
906
+ prefix = '减少 或 去除' ;
907
+ key = columnName . substring ( 0 , columnName . length - 1 ) ;
908
+ //}
909
+ }
910
+ else {
911
+ prefix = '' ;
912
+ key = new String ( columnName ) ;
913
+ }
914
+
915
+
916
+ var last = null ; //不用Logic优化代码,否则 key 可能变为 key| 导致 key=value 变成 key|=value 而出错
917
+ //if (RequestMethod.isQueryMethod(method)) {//逻辑运算符仅供GET,HEAD方法使用
918
+ last = key . length <= 0 ? "" : key . substring ( key . length - 1 ) ;
919
+ if ( "&" == last || "|" == last || "!" == last ) {
920
+ key = key . substring ( 0 , key . length - 1 ) ;
921
+ } else {
922
+ last = null ; //避免key + StringUtil.getString(last)错误延长
923
+ }
924
+ //}
925
+
926
+ if ( StringUtil . isName ( key ) == false ) {
927
+ return ' ! 字符' + key + '不合法!' ;
928
+ }
929
+
930
+
931
+
932
+
933
+
869
934
columnList = item [ 'Column[]' ] ;
870
935
if ( columnList == null ) {
871
936
continue ;
@@ -876,11 +941,12 @@ var CodeUtil = {
876
941
for ( var j = 0 ; j < columnList . length ; j ++ ) {
877
942
column = columnList [ j ] ;
878
943
name = column == null ? null : column . COLUMN_NAME ;
879
- if ( name == null || columnName != name ) {
944
+ if ( name == null || key != name ) {
880
945
continue ;
881
946
}
882
947
883
- return column . COLUMN_COMMENT ;
948
+ var p = ( at . length <= 0 ? '' : at + ' > ' ) + ( prefix . length <= 0 ? '' : prefix + ' > ' ) ;
949
+ return ( p . length <= 0 ? '' : p + key + ': ' ) + column . COLUMN_COMMENT ;
884
950
}
885
951
886
952
break ;
0 commit comments