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" : "c7ce65f5b3cf4aaa913f6fec7d35d176",
|
||||
"name" : "保存",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1634734554311,
|
||||
"updateTime" : 1644046408348,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"path" : "/save",
|
||||
@@ -23,4 +23,8 @@
|
||||
}
|
||||
}
|
||||
================================
|
||||
var typeCount = db.selectInt("select count(1) from sys_dict where is_del = 0 and type = #{data.type} ?{id, and id != #{data.id}}")
|
||||
if(typeCount > 0){
|
||||
exit 0,'类型已存在'
|
||||
}
|
||||
return db.table("sys_dict").primary("id").saveOrUpdate(data)
|
||||
@@ -5,7 +5,7 @@
|
||||
"groupId" : "376f26eb43a44a3daeafd27020a96f48",
|
||||
"name" : "保存",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1634735495162,
|
||||
"updateTime" : 1644046552214,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"path" : "/save",
|
||||
@@ -23,4 +23,8 @@
|
||||
}
|
||||
}
|
||||
================================
|
||||
var valueCount = db.selectInt("select count(1) from sys_dict_items where is_del = 0 and dict_id = #{data.dictId} and value = #{data.value} ?{id, and id != #{data.id}}")
|
||||
if(valueCount > 0){
|
||||
exit 0,'值已存在'
|
||||
}
|
||||
return db.table("sys_dict_items").primary("id").saveOrUpdate(data)
|
||||
Reference in New Issue
Block a user