mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-04 00:10:25 +08:00
refactor: 新增base.Repo与base.App,重构repo与app层代码
This commit is contained in:
@@ -2,23 +2,15 @@ package repository
|
||||
|
||||
import (
|
||||
"mayfly-go/internal/redis/domain/entity"
|
||||
"mayfly-go/pkg/base"
|
||||
"mayfly-go/pkg/model"
|
||||
)
|
||||
|
||||
type Redis interface {
|
||||
base.Repo[*entity.Redis]
|
||||
|
||||
// 分页获取机器信息列表
|
||||
GetRedisList(condition *entity.RedisQuery, pageParam *model.PageParam, toEntity any, orderBy ...string) *model.PageResult[any]
|
||||
GetRedisList(condition *entity.RedisQuery, pageParam *model.PageParam, toEntity any, orderBy ...string) (*model.PageResult[any], error)
|
||||
|
||||
Count(condition *entity.RedisQuery) int64
|
||||
|
||||
// 根据id获取
|
||||
GetById(id uint64, cols ...string) *entity.Redis
|
||||
|
||||
GetRedis(condition *entity.Redis, cols ...string) error
|
||||
|
||||
Insert(redis *entity.Redis)
|
||||
|
||||
Update(redis *entity.Redis)
|
||||
|
||||
Delete(id uint64)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user