File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
APIJSON-Java-Server/APIJSONORM/src/main/java/apijson Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ public JSONResponse(JSONObject object) {
7070 public static final String KEY_MSG = "msg" ;
7171 public static final String KEY_COUNT = "count" ;
7272 public static final String KEY_TOTAL = "total" ;
73- public static final String KEY_PAGE = "page " ; //详细的分页信息
73+ public static final String KEY_INFO = "info " ; //详细的分页信息
7474 public static final String KEY_FIRST = "first" ; //是否为首页
7575 public static final String KEY_LAST = "last" ; //是否为尾页
7676 public static final String KEY_MAX = "max" ; //最大页码
Original file line number Diff line number Diff line change @@ -361,7 +361,7 @@ else if (value instanceof String) { // 引用赋值路径
361361 return true ;
362362 }
363363 if (target instanceof Map ) { //target可能是从requestObject里取出的 {}
364- if (isTable || targetPath .endsWith ("[]/" + JSONResponse .KEY_PAGE ) == false ) {
364+ if (isTable || targetPath .endsWith ("[]/" + JSONResponse .KEY_INFO ) == false ) {
365365 Log .d (TAG , "onParse target instanceof Map >> return false;" );
366366 return false ; //FIXME 这个判断现在来看是否还有必要?为啥不允许为 JSONObject ?以前可能因为防止二次遍历再解析,现在只有一次遍历
367367 }
Original file line number Diff line number Diff line change @@ -757,12 +757,12 @@ public JSONObject onObjectParse(final JSONObject request
757757 JSONObject pagination = new JSONObject (true );
758758 pagination .put (JSONResponse .KEY_TOTAL , total );
759759 pagination .put (JSONResponse .KEY_COUNT , count );
760- pagination .put (JSONResponse .KEY_PAGE , page );
760+ pagination .put (JSONResponse .KEY_INFO , page );
761761 pagination .put (JSONResponse .KEY_MAX , max );
762762 pagination .put (JSONResponse .KEY_MORE , page < max );
763763 pagination .put (JSONResponse .KEY_FIRST , page == 0 );
764764 pagination .put (JSONResponse .KEY_LAST , page == max );
765- putQueryResult (pathPrefix + JSONResponse .KEY_PAGE , pagination );
765+ putQueryResult (pathPrefix + JSONResponse .KEY_INFO , pagination );
766766
767767 if (total <= count *page ) {
768768 query = JSONRequest .QUERY_TOTAL ;//数量不够了,不再往后查询
You can’t perform that action at this time.
0 commit comments