mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2026-04-26 00:00:04 +08:00
动态组件升级
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
"groupId" : "6f106ebdee21489db34b956f7770ff03",
|
||||
"name" : "保存tree",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1709468623502,
|
||||
"updateTime" : 1709539934808,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
@@ -22,7 +22,16 @@
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
return db.table("sys_dynamic_component").primary("id").saveOrUpdate({
|
||||
pid,
|
||||
name
|
||||
})
|
||||
let data
|
||||
if(id){
|
||||
data = {id, name}
|
||||
if(db.selectInt("select count(1) from sys_dynamic_component where is_del = 0 and name = #{name} and id != #{id}") > 0){
|
||||
exit 0, '名称不能重复'
|
||||
}
|
||||
}else{
|
||||
data = {pid, name}
|
||||
if(db.selectInt("select count(1) from sys_dynamic_component where is_del = 0 and name = #{name}") > 0){
|
||||
exit 0, '名称不能重复'
|
||||
}
|
||||
}
|
||||
return db.table("sys_dynamic_component").primary("id").saveOrUpdate(data)
|
||||
Reference in New Issue
Block a user