perf: 优化 api 和 service 中方法注释不正确的问题 (#1765)

This commit is contained in:
Deng
2024-06-05 20:30:08 +08:00
committed by GitHub
parent 53d0338218
commit 21266be1ed
6 changed files with 15 additions and 12 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ package system
import (
"errors"
"fmt"
"github.com/flipped-aurora/gin-vue-admin/server/global"
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
@@ -162,7 +163,7 @@ func (apiService *ApiService) UpdateApi(api system.SysApi) (err error) {
}
//@author: [piexlmax](https://github.com/piexlmax)
//@function: DeleteApis
//@function: DeleteApisByIds
//@description: 删除选中API
//@param: apis []model.SysApi
//@return: err error
+5 -4
View File
@@ -2,10 +2,11 @@ package system
import (
"errors"
"gorm.io/gorm"
"strconv"
"sync"
"gorm.io/gorm"
"github.com/casbin/casbin/v2"
"github.com/casbin/casbin/v2/model"
gormadapter "github.com/casbin/gorm-adapter/v3"
@@ -107,7 +108,7 @@ func (casbinService *CasbinService) RemoveFilteredPolicy(db *gorm.DB, authorityI
}
//@author: [piexlmax](https://github.com/piexlmax)
//@function: RemoveFilteredPolicy
//@function: SyncPolicy
//@description: 同步目前数据库的policy 此方法需要调用FreshCasbin方法才可以在系统中即刻生效
//@param: db *gorm.DB, authorityId string, rules [][]string
//@return: error
@@ -121,8 +122,8 @@ func (casbinService *CasbinService) SyncPolicy(db *gorm.DB, authorityId string,
}
//@author: [piexlmax](https://github.com/piexlmax)
//@function: ClearCasbin
//@description: 清除匹配的权限
//@function: AddPolicies
//@description: 添加匹配的权限
//@param: v int, p ...string
//@return: bool
+1 -1
View File
@@ -9,7 +9,7 @@ import (
)
//@author: [piexlmax](https://github.com/piexlmax)
//@function: DeleteSysDictionary
//@function: CreateSysDictionary
//@description: 创建字典数据
//@param: sysDictionary model.SysDictionary
//@return: err error
@@ -44,7 +44,7 @@ func (operationRecordService *OperationRecordService) DeleteSysOperationRecord(s
}
//@author: [granty1](https://github.com/granty1)
//@function: DeleteSysOperationRecord
//@function: GetSysOperationRecord
//@description: 根据id获取单条操作记录
//@param: id uint
//@return: sysOperationRecord system.SysOperationRecord, err error
+2 -2
View File
@@ -187,7 +187,7 @@ func (userService *UserService) SetUserInfo(req system.SysUser) error {
}
//@author: [piexlmax](https://github.com/piexlmax)
//@function: SetUserInfo
//@function: SetSelfInfo
//@description: 设置用户信息
//@param: reqUser model.SysUser
//@return: err error, user model.SysUser
@@ -242,7 +242,7 @@ func (userService *UserService) FindUserByUuid(uuid string) (user *system.SysUse
}
//@author: [piexlmax](https://github.com/piexlmax)
//@function: resetPassword
//@function: ResetPassword
//@description: 修改用户密码
//@param: ID uint
//@return: err error