修改createBy和updateBy为uint类型

This commit is contained in:
linwenxiang committed 2020-09-03 22:14:34 +08:00
1 parent 0ae41f247c
commit 41b06c806a
7 files changed
+25 -9

No files matched your search

+1 -1
View File
@@ -31,7 +31,7 @@ func CreateAction(control dto.Control) gin.HandlerFunc {
var object model.ActiveRecord
object, err = req.GenerateM()
tools.HasError(err, "模型生成失败", 422)
object.SetCreateBy(tools.GetUserIdStr(c))
object.SetCreateBy(tools.GetUserIdUint(c))
err = db.WithContext(c).Create(object).Error
tools.HasError(err, "创建失败", 500)
app.OK(c, object.GetId(), "创建成功")
+1 -1
View File
@@ -32,7 +32,7 @@ func DeleteAction(control dto.Control) gin.HandlerFunc {
object, err = req.GenerateM()
tools.HasError(err, "模型生成失败", 500)
object.SetUpdateBy(tools.GetUserIdStr(c))
object.SetUpdateBy(tools.GetUserIdUint(c))
//数据权限检查
p := getPermissionFromContext(c)
+1 -1
View File
@@ -31,7 +31,7 @@ func UpdateAction(control dto.Control) gin.HandlerFunc {
var object model.ActiveRecord
object, err = req.GenerateM()
tools.HasError(err, "参数验证失败", 422)
object.SetUpdateBy(tools.GetUserIdStr(c))
object.SetUpdateBy(tools.GetUserIdUint(c))
//数据权限检查
p := getPermissionFromContext(c)