refactor🎨 : 修正模版
This commit is contained in:
1 parent
46ea5f18aa
commit
eaa135e2ad
2 files changed
+4
-4
No files matched your search
@@ -109,7 +109,7 @@ func (e *{{.ClassName}}) Insert{{.ClassName}}(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
// 设置创建人
|
||||
object.SetCreateBy(tools.GetUserIdUint(c))
|
||||
object.SetCreateBy(tools.GetUserId(c))
|
||||
|
||||
service{{.ClassName}} := service.{{.ClassName}}{}
|
||||
service{{.ClassName}}.Orm = db
|
||||
@@ -146,7 +146,7 @@ func (e *{{.ClassName}}) Update{{.ClassName}}(c *gin.Context) {
|
||||
e.Error(c, http.StatusInternalServerError, err, "模型生成失败")
|
||||
return
|
||||
}
|
||||
object.SetUpdateBy(tools.GetUserIdUint(c))
|
||||
object.SetUpdateBy(tools.GetUserId(c))
|
||||
|
||||
//数据权限检查
|
||||
p := actions.GetPermissionFromContext(c)
|
||||
@@ -187,7 +187,7 @@ func (e *{{.ClassName}}) Delete{{.ClassName}}(c *gin.Context) {
|
||||
}
|
||||
|
||||
// 设置编辑人
|
||||
object.SetUpdateBy(tools.GetUserIdUint(c))
|
||||
object.SetUpdateBy(tools.GetUserId(c))
|
||||
|
||||
// 数据权限检查
|
||||
p := actions.GetPermissionFromContext(c)
|
||||
|
||||
Reference in new issue
Block a user