验证,样式调整等

This commit is contained in:
吕金泽
2022-02-05 17:20:12 +08:00
parent 854a860aa7
commit 0edba9b3cc
16 changed files with 167 additions and 85 deletions
@@ -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)