refactor🎨: 缩减函数名称
This commit is contained in:
1 parent
bb77450f2c
commit
6e01c13e1c
23 files changed
+326
-377
No files matched your search
@@ -68,7 +68,7 @@ func (e SysPost) GetSysPost(c *gin.Context) {
|
||||
req := dto.SysPostById{}
|
||||
err := e.MakeContext(c).
|
||||
MakeOrm().
|
||||
Bind(&req).
|
||||
Bind(&req, nil).
|
||||
MakeService(&s.Service).
|
||||
Errors
|
||||
if err != nil {
|
||||
@@ -103,7 +103,7 @@ func (e SysPost) InsertSysPost(c *gin.Context) {
|
||||
req := dto.SysPostControl{}
|
||||
err := e.MakeContext(c).
|
||||
MakeOrm().
|
||||
Bind(&req).
|
||||
Bind(&req, binding.JSON).
|
||||
MakeService(&s.Service).
|
||||
Errors
|
||||
if err != nil {
|
||||
@@ -141,7 +141,7 @@ func (e SysPost) UpdateSysPost(c *gin.Context) {
|
||||
req := dto.SysPostControl{}
|
||||
err := e.MakeContext(c).
|
||||
MakeOrm().
|
||||
Bind(&req).
|
||||
Bind(&req, binding.JSON, nil).
|
||||
MakeService(&s.Service).
|
||||
Errors
|
||||
if err != nil {
|
||||
@@ -173,7 +173,7 @@ func (e SysPost) DeleteSysPost(c *gin.Context) {
|
||||
req := dto.SysPostById{}
|
||||
err := e.MakeContext(c).
|
||||
MakeOrm().
|
||||
Bind(&req).
|
||||
Bind(&req, binding.JSON, nil).
|
||||
MakeService(&s.Service).
|
||||
Errors
|
||||
if err != nil {
|
||||
@@ -189,4 +189,4 @@ func (e SysPost) DeleteSysPost(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
e.OK(req.GetId(), "删除成功")
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user