@@ -1140,7 +1140,7 @@ else if (key.endsWith("<>")) {
11401140
11411141
11421142 @ JSONField (serialize = false )
1143- public String getEqualString (String key , Object value ) {
1143+ public String getEqualString (String key , Object value ) throws Exception {
11441144 if (value instanceof Collection <?>) {
11451145 throw new IllegalArgumentException (key + ":value 中value不合法!非PUT请求只支持 [Boolean, Number, String] 内的类型 !" );
11461146 }
@@ -1152,7 +1152,8 @@ public String getEqualString(String key, Object value) {
11521152 if (StringUtil .isName (key ) == false ) {
11531153 throw new IllegalArgumentException (key + ":value 中key不合法!不支持 ! 以外的逻辑符 !" );
11541154 }
1155- return getKey (key ) + (not ? "!=" : "=" ) + getValue (value );
1155+
1156+ return getKey (key ) + (not ? "!=" : "=" ) + (value instanceof Subquery ? getSubqueryString ((Subquery ) value ) : getValue (value ));
11561157 }
11571158
11581159 public String getKey (String key ) {
@@ -1852,13 +1853,13 @@ else if (id instanceof String) {
18521853 throw new NotExistException (TAG + ": newSQLConfig StringUtil.isEmpty(" + table + ".id, true)" );
18531854 }
18541855 }
1856+ else if (id instanceof Subquery ) {}
18551857 else {
1856- throw new IllegalArgumentException (KEY_ID + ":value 中 value 的类型只能是 Long 或 String !" );
1858+ throw new IllegalArgumentException (KEY_ID + ":value 中 value 的类型只能是 Long , String 或 Subquery !" );
18571859 }
18581860
1859- if (idIn != null && idIn instanceof List ) { //共用idIn场景少性能差
1860- if (idIn != null && ((List <?>) idIn ).contains (id ) == false ) {//empty有效 BaseModel.isEmpty(idIn) == false) {
1861- Log .w (TAG , "newSQLConfig id > 0 >> idInObj != null && idInObj.contains(id) == false >> return null;" );
1861+ if (idIn instanceof List ) { //共用idIn场景少性能差
1862+ if (((List <?>) idIn ).contains (id ) == false ) {//empty有效 BaseModel.isEmpty(idIn) == false) {
18621863 throw new NotExistException (TAG + ": newSQLConfig idIn != null && ((JSONArray) idIn).contains(id) == false" );
18631864 }
18641865 }
0 commit comments