调整角色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:
committed by
GitHub
co-authored by
SliverHorn
cg81344
parent
cd68d1f198
commit
0610419e38
@@ -54,7 +54,7 @@ func (i *initUser) InitializeData(ctx context.Context) (next context.Context, er
|
||||
Password: adminPassword,
|
||||
NickName: "超级管理员",
|
||||
HeaderImg: "https://qmplusimg.henrongyi.top/gva_header.jpg",
|
||||
AuthorityId: "888",
|
||||
AuthorityId: 888,
|
||||
Phone: "17611111111",
|
||||
Email: "333333333@qq.com",
|
||||
},
|
||||
@@ -64,7 +64,7 @@ func (i *initUser) InitializeData(ctx context.Context) (next context.Context, er
|
||||
Password: password,
|
||||
NickName: "QMPlusUser",
|
||||
HeaderImg: "https:///qmplusimg.henrongyi.top/1572075907logo.png",
|
||||
AuthorityId: "9528",
|
||||
AuthorityId: 9528,
|
||||
Phone: "17611111111",
|
||||
Email: "333333333@qq.com"},
|
||||
}
|
||||
@@ -95,5 +95,5 @@ func (i *initUser) DataInserted(ctx context.Context) bool {
|
||||
Preload("Authorities").First(&record).Error, gorm.ErrRecordNotFound) { // 判断是否存在数据
|
||||
return false
|
||||
}
|
||||
return len(record.Authorities) > 0 && record.Authorities[0].AuthorityId == "888"
|
||||
return len(record.Authorities) > 0 && record.Authorities[0].AuthorityId == 888
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user