[用户]实现对平台用户的增删改查

This commit is contained in:
GoEdgeLab
2020-12-04 16:00:55 +08:00
parent 9e3dc3d2d2
commit 000b5c79e3
19 changed files with 681 additions and 3 deletions

View File

@@ -0,0 +1,26 @@
package users
import (
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
)
type DeleteAction struct {
actionutils.ParentAction
}
func (this *DeleteAction) RunPost(params struct {
UserId int64
}) {
defer this.CreateLogInfo("删除用户 %d", params.UserId)
// TODO 检查用户是否有未完成的业务
_, err := this.RPC().UserRPC().DeleteUser(this.AdminContext(), &pb.DeleteUserRequest{UserId: params.UserId})
if err != nil {
this.ErrorPage(err)
return
}
this.Success()
}