feat: RBAC 基本完成
This commit is contained in:
@@ -20,7 +20,7 @@ func (s *ClientApi) SaveClient(c *gin.Context) {
|
||||
response.FailWithMsg(err.Error(), c)
|
||||
return
|
||||
}
|
||||
err = ClientService.SaveClient(client)
|
||||
err = clientService.SaveClient(client)
|
||||
if err != nil {
|
||||
global.Logger.Error("保存客户端失败!", zap.Error(err))
|
||||
response.FailWithMsg(err.Error(), c)
|
||||
@@ -36,7 +36,7 @@ func (s *ClientApi) UpdateClient(c *gin.Context) {
|
||||
response.FailWithMsg(err.Error(), c)
|
||||
return
|
||||
}
|
||||
err = ClientService.UpdateClient(client)
|
||||
err = clientService.UpdateClient(client)
|
||||
if err != nil {
|
||||
global.Logger.Error("更新客户端失败!", zap.Error(err))
|
||||
response.FailWithMsg(err.Error(), c)
|
||||
@@ -52,7 +52,7 @@ func (s *ClientApi) GetClientList(c *gin.Context) {
|
||||
response.FailWithMsg(err.Error(), c)
|
||||
return
|
||||
}
|
||||
list, total, err := ClientService.GetClientList(pageInfo)
|
||||
list, total, err := clientService.GetClientList(pageInfo)
|
||||
if err != nil {
|
||||
global.Logger.Error("获取客户端列表失败!", zap.Error(err))
|
||||
response.FailWithMsg(err.Error(), c)
|
||||
@@ -73,7 +73,7 @@ func (s *ClientApi) Delete(c *gin.Context) {
|
||||
response.FailWithMsg(err.Error(), c)
|
||||
return
|
||||
}
|
||||
err = ClientService.DeleteClientByIds(ids)
|
||||
err = clientService.DeleteClientByIds(ids)
|
||||
if err != nil {
|
||||
global.Logger.Error("删除客户端失败!", zap.Error(err))
|
||||
response.FailWithMsg(err.Error(), c)
|
||||
@@ -89,7 +89,7 @@ func (s *ClientApi) Detail(c *gin.Context) {
|
||||
response.FailWithMsg(err.Error(), c)
|
||||
return
|
||||
}
|
||||
client, err := ClientService.GetClientById(idInfo.ID)
|
||||
client, err := clientService.GetClientById(idInfo.ID)
|
||||
if err != nil {
|
||||
global.Logger.Error("获取客户端详情失败!", zap.Error(err))
|
||||
response.FailWithMsg(err.Error(), c)
|
||||
|
||||
Reference in New Issue
Block a user