feat: 添加订单提供者,优化路由注册,增强用户角色管理

This commit is contained in:
2025-12-24 10:45:36 +08:00
parent 1e1132718c
commit 63107ca23f
4 changed files with 28 additions and 27 deletions

View File

@@ -50,7 +50,7 @@ func (t *UserTestSuite) Test_Create() {
m := &models.User{
Username: "test-user",
Password: "test-password",
Roles: types.NewArray([]consts.Role{consts.RoleUser}),
Roles: types.NewArray([]consts.Role{consts.RoleUser, consts.RoleSuperAdmin}),
Status: consts.UserStatusPendingVerify,
}
@@ -83,7 +83,7 @@ func (t *UserTestSuite) Test_FindByUsername() {
m := &models.User{
Username: username,
Password: "test-password",
Roles: types.NewArray([]consts.Role{consts.RoleUser}),
Roles: types.NewArray([]consts.Role{consts.RoleUser, consts.RoleSuperAdmin}),
Status: consts.UserStatusPendingVerify,
}
@@ -109,7 +109,7 @@ func (t *UserTestSuite) Test_Page() {
m := &models.User{
Username: username,
Password: "test-password",
Roles: types.NewArray([]consts.Role{consts.RoleUser}),
Roles: types.NewArray([]consts.Role{consts.RoleUser, consts.RoleSuperAdmin}),
Status: consts.UserStatusPendingVerify,
}
@@ -137,7 +137,7 @@ func (t *UserTestSuite) Test_Page() {
m := &models.User{
Username: username,
Password: "test-password",
Roles: types.NewArray([]consts.Role{consts.RoleUser}),
Roles: types.NewArray([]consts.Role{consts.RoleUser, consts.RoleSuperAdmin}),
Status: consts.UserStatusPendingVerify,
}