File tree Expand file tree Collapse file tree 1 file changed +33
-8
lines changed
APIJSONORM/src/main/java/apijson/orm Expand file tree Collapse file tree 1 file changed +33
-8
lines changed Original file line number Diff line number Diff line change @@ -2197,18 +2197,42 @@ else if (prior && andList.isEmpty() == false) {
21972197 String userIdKey = getUserIdKey ();
21982198 String userIdInKey = userIdKey + "{}" ;
21992199
2200- if (andList .contains (idKey )) {
2201- i ++;
2200+ int lastIndex ;
2201+ if (key .equals (idKey )) {
2202+ lastIndex = -1 ;
22022203 }
2203- if (andList . contains (idInKey )) {
2204- i ++ ;
2204+ else if (key . equals (idInKey )) {
2205+ lastIndex = andList . lastIndexOf ( idKey ) ;
22052206 }
2206- if (andList .contains (userIdKey )) {
2207- i ++;
2207+ else if (key .equals (userIdKey )) {
2208+ lastIndex = andList .lastIndexOf (idInKey );
2209+ if (lastIndex < 0 ) {
2210+ lastIndex = andList .lastIndexOf (idKey );
2211+ }
22082212 }
2209- if (andList .contains (userIdInKey )) {
2210- i ++;
2213+ else if (key .equals (userIdInKey )) {
2214+ lastIndex = andList .lastIndexOf (userIdKey );
2215+ if (lastIndex < 0 ) {
2216+ lastIndex = andList .lastIndexOf (idInKey );
2217+ }
2218+ if (lastIndex < 0 ) {
2219+ lastIndex = andList .lastIndexOf (idKey );
2220+ }
2221+ }
2222+ else {
2223+ lastIndex = andList .lastIndexOf (userIdInKey );
2224+ if (lastIndex < 0 ) {
2225+ lastIndex = andList .lastIndexOf (userIdKey );
2226+ }
2227+ if (lastIndex < 0 ) {
2228+ lastIndex = andList .lastIndexOf (idInKey );
2229+ }
2230+ if (lastIndex < 0 ) {
2231+ lastIndex = andList .lastIndexOf (idKey );
2232+ }
22112233 }
2234+
2235+ i = lastIndex + 1 ;
22122236 }
22132237
22142238 if (prior ) {
@@ -2219,6 +2243,7 @@ else if (prior && andList.isEmpty() == false) {
22192243 }
22202244 combine .put ("&" , andList );
22212245 }
2246+
22222247 return this ;
22232248 }
22242249
You can’t perform that action at this time.
0 commit comments