This commit is contained in:
liangzai
2025-07-20 20:53:26 +08:00
parent 83bf9aea7d
commit 8ad1d7288e
158 changed files with 18156 additions and 13188 deletions

View File

@@ -21,6 +21,8 @@ type UserRepository interface {
// 基础查询 - 直接使用实体
GetByPhone(ctx context.Context, phone string) (*entities.User, error)
GetByUsername(ctx context.Context, username string) (*entities.User, error)
GetByUserType(ctx context.Context, userType string) ([]*entities.User, error)
// 复杂查询 - 使用查询参数
ListUsers(ctx context.Context, query *queries.ListUsersQuery) ([]*entities.User, int64, error)
@@ -32,6 +34,7 @@ type UserRepository interface {
CheckPassword(ctx context.Context, userID string, password string) (bool, error)
ActivateUser(ctx context.Context, userID string) error
DeactivateUser(ctx context.Context, userID string) error
UpdateLoginStats(ctx context.Context, userID string) error
// 统计信息
GetStats(ctx context.Context) (*UserStats, error)