feat(app): update

This commit is contained in:
Yangtao
2025-11-19 14:24:13 +08:00
parent 1eac66d7fd
commit 0c34585649
329 changed files with 10760 additions and 281 deletions

View File

@ -179,14 +179,14 @@ type IUserDo interface {
Find() ([]*model.User, error)
FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.User, err error)
FindInBatches(result *[]*model.User, batchSize int, fc func(tx gen.Dao, batch int) error) error
Pluck(column field.Expr, dest interface{}) error
Pluck(column field.Expr, dest any) error
Delete(...*model.User) (info gen.ResultInfo, err error)
Update(column field.Expr, value interface{}) (info gen.ResultInfo, err error)
Update(column field.Expr, value any) (info gen.ResultInfo, err error)
UpdateSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error)
Updates(value interface{}) (info gen.ResultInfo, err error)
UpdateColumn(column field.Expr, value interface{}) (info gen.ResultInfo, err error)
Updates(value any) (info gen.ResultInfo, err error)
UpdateColumn(column field.Expr, value any) (info gen.ResultInfo, err error)
UpdateColumnSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error)
UpdateColumns(value interface{}) (info gen.ResultInfo, err error)
UpdateColumns(value any) (info gen.ResultInfo, err error)
UpdateFrom(q gen.SubQuery) gen.Dao
Attrs(attrs ...field.AssignExpr) IUserDo
Assign(attrs ...field.AssignExpr) IUserDo
@ -195,9 +195,9 @@ type IUserDo interface {
FirstOrInit() (*model.User, error)
FirstOrCreate() (*model.User, error)
FindByPage(offset int, limit int) (result []*model.User, count int64, err error)
ScanByPage(result interface{}, offset int, limit int) (count int64, err error)
Scan(result interface{}) (err error)
Returning(value interface{}, columns ...string) IUserDo
ScanByPage(result any, offset int, limit int) (count int64, err error)
Scan(result any) (err error)
Returning(value any, columns ...string) IUserDo
UnderlyingDB() *gorm.DB
schema.Tabler
}
@ -226,7 +226,7 @@ func (u userDo) Clauses(conds ...clause.Expression) IUserDo {
return u.withDO(u.DO.Clauses(conds...))
}
func (u userDo) Returning(value interface{}, columns ...string) IUserDo {
func (u userDo) Returning(value any, columns ...string) IUserDo {
return u.withDO(u.DO.Returning(value, columns...))
}
@ -409,7 +409,7 @@ func (u userDo) FindByPage(offset int, limit int) (result []*model.User, count i
return
}
func (u userDo) ScanByPage(result interface{}, offset int, limit int) (count int64, err error) {
func (u userDo) ScanByPage(result any, offset int, limit int) (count int64, err error) {
count, err = u.Count()
if err != nil {
return
@ -419,7 +419,7 @@ func (u userDo) ScanByPage(result interface{}, offset int, limit int) (count int
return
}
func (u userDo) Scan(result interface{}) (err error) {
func (u userDo) Scan(result any) (err error) {
return u.DO.Scan(result)
}