fix plantIs save
This commit is contained in:
parent
7d3af46a22
commit
b27f2feadb
@ -135,7 +135,7 @@ object Entities {
|
|||||||
val sql = ctx.bodyAsClass<SearchParams>()
|
val sql = ctx.bodyAsClass<SearchParams>()
|
||||||
verifyKeys(sql.params)
|
verifyKeys(sql.params)
|
||||||
|
|
||||||
val entity = ctx.pathParam("entity")
|
val entity = ctx.pathParam("entity").lowercase()
|
||||||
val searchJsonMap = sql.params.map { e -> Pair(e.key, e.value.getValue()) }.toMap()
|
val searchJsonMap = sql.params.map { e -> Pair(e.key, e.value.getValue()) }.toMap()
|
||||||
val fl = database.find(DataModel::class.java)
|
val fl = database.find(DataModel::class.java)
|
||||||
.setRawSql(
|
.setRawSql(
|
||||||
@ -163,6 +163,7 @@ object Entities {
|
|||||||
where entity_name = :e
|
where entity_name = :e
|
||||||
and created_at between :from and :to
|
and created_at between :from and :to
|
||||||
and data @> cast(:search as jsonb)
|
and data @> cast(:search as jsonb)
|
||||||
|
order by sysPk
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
).create()
|
).create()
|
||||||
)
|
)
|
||||||
@ -188,6 +189,7 @@ object Entities {
|
|||||||
.eq("entityName", entity.lowercase())
|
.eq("entityName", entity.lowercase())
|
||||||
.setFirstRow((pageNo - 1) * perPage)
|
.setFirstRow((pageNo - 1) * perPage)
|
||||||
.setMaxRows(perPage)
|
.setMaxRows(perPage)
|
||||||
|
.orderBy("sysPk")
|
||||||
.findPagedList()
|
.findPagedList()
|
||||||
|
|
||||||
ctx.json(cnt)
|
ctx.json(cnt)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user