mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-13 22:09:00 +08:00
✨ Introducing new features. close #4134 【低代码】表单设计以后直接运行无需下载代码
This commit is contained in:
1 parent
c631e665a5
commit
ec6a17570c
27 files changed
+1206
-243
No files matched your search
@@ -0,0 +1,6 @@
|
||||
import com.baomidou.mybatisplus.core.incrementer.DefaultIdentifierGenerator;
|
||||
import response;
|
||||
import log;
|
||||
|
||||
var dbId = new DefaultIdentifierGenerator().nextId(null)
|
||||
return db.${dsName}.table("${tableName}").primary("$pk.columnName", dbId).save(body)
|
||||
@@ -0,0 +1,8 @@
|
||||
import response;
|
||||
|
||||
var data = db.${dsName}.table("${tableName}").primary("$pk.columnName").update({
|
||||
id: id,
|
||||
del_flag: 1
|
||||
})
|
||||
|
||||
return response.json(data)
|
||||
@@ -0,0 +1,17 @@
|
||||
import request;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import response;
|
||||
|
||||
var queryDsl = db.${dsName}.table("${tableName}")
|
||||
.where()
|
||||
.eq("del_flag", 0)
|
||||
|
||||
if (query != null) {
|
||||
var jsonObj = JSONUtil.parseObj(query)
|
||||
for (key in jsonObj.keySet()) {
|
||||
queryDsl.like(key, "%" + jsonObj.get(key) + "%")
|
||||
}
|
||||
}
|
||||
|
||||
// 执行DSL 输出结果
|
||||
return response.json(queryDsl.page())
|
||||
@@ -0,0 +1,5 @@
|
||||
import response;
|
||||
|
||||
var data = db.${dsName}.table("${tableName}").primary("$pk.columnName").update(body)
|
||||
|
||||
return response.json(data)
|
||||
Reference in new issue
Block a user