调整角色ID为uint格式,增加embed打包,更改日志格式。 (#1144)

* feature: 根据 #377 pr进行修改embed, 打包静态文件夹与配置文件

* 修改角色id为uint

* 修改日志格式

Co-authored-by: SliverHorn <503551462@qq.com>
Co-authored-by: cg81344 <cg831344@126.com>
This commit is contained in:
奇淼(piexlmax
2022-06-29 22:12:53 +08:00
committed by GitHub
co-authored by SliverHorn cg81344
parent cd68d1f198
commit 0610419e38
30 changed files with 223 additions and 76 deletions
+2 -2
View File
@@ -117,7 +117,7 @@ func (userService *UserService) GetUserInfoList(info request.PageInfo) (list int
//@param: uuid uuid.UUID, authorityId string
//@return: err error
func (userService *UserService) SetUserAuthority(id uint, uuid uuid.UUID, authorityId string) (err error) {
func (userService *UserService) SetUserAuthority(id uint, uuid uuid.UUID, authorityId uint) (err error) {
assignErr := global.GVA_DB.Where("sys_user_id = ? AND sys_authority_authority_id = ?", id, authorityId).First(&system.SysUseAuthority{}).Error
if errors.Is(assignErr, gorm.ErrRecordNotFound) {
return errors.New("该用户无此角色")
@@ -132,7 +132,7 @@ func (userService *UserService) SetUserAuthority(id uint, uuid uuid.UUID, author
//@param: id uint, authorityIds []string
//@return: err error
func (userService *UserService) SetUserAuthorities(id uint, authorityIds []string) (err error) {
func (userService *UserService) SetUserAuthorities(id uint, authorityIds []uint) (err error) {
return global.GVA_DB.Transaction(func(tx *gorm.DB) error {
TxErr := tx.Delete(&[]system.SysUseAuthority{}, "sys_user_id = ?", id).Error
if TxErr != nil {