mirror of https://github.com/elunez/eladmin
support FIND_IN_SET cond (#745)
* fix weird prefixes keys when use RedisUtils.scan * Column use `` for reserved key ref: https://stackoverflow.com/questions/2224503/how-to-map-an-entity-field-whose-name-is-a-reserved-word-in-jpa * add FIND_IN_SET 条件查询 * notepull/805/head
parent
f72efb8044
commit
f0ed88c51e
|
@ -74,7 +74,9 @@ public @interface Query {
|
||||||
// 不为空
|
// 不为空
|
||||||
,NOT_NULL
|
,NOT_NULL
|
||||||
// 为空
|
// 为空
|
||||||
,IS_NULL
|
,IS_NULL,
|
||||||
|
// Aborn Jiang 2022/06/01, 对应SQL: SELECT * FROM table WHERE FIND_IN_SET('querytag', table.tags);
|
||||||
|
FIND_IN_SET
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -166,6 +166,10 @@ public class QueryHelp {
|
||||||
(Comparable) between.get(0), (Comparable) between.get(1)));
|
(Comparable) between.get(0), (Comparable) between.get(1)));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case FIND_IN_SET:
|
||||||
|
list.add(cb.greaterThan(cb.function("FIND_IN_SET", Integer.class,
|
||||||
|
cb.literal(val.toString()), root.get(attributeName)), 0));
|
||||||
|
break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue