package services import ( "app/commons/model/entity" "gorm.io/gorm" ) // tips: // 分批查询表中所有数据 -- // 对数据量很大的表适用 --推荐使用 func (s *CommonService) BatchUser(db *gorm.DB) ([]*entity.User, error) { return FindAllWithBatch[entity.User](db) } func (s *CommonService) BatchUserLogs(db *gorm.DB) ([]*entity.UserLogs, error) { return FindAllWithBatch[entity.UserLogs](db) } func (s *CommonService) BatchUserQuota(db *gorm.DB) ([]*entity.UserQuota, error) { return FindAllWithBatch[entity.UserQuota](db) } func (s *CommonService) BatchAssets(db *gorm.DB) ([]*entity.Asset, error) { return FindAllWithBatch[entity.Asset](db) } func (s *CommonService) BatchTransferRecord(db *gorm.DB) ([]*entity.AssetRwRecord, error) { return FindAllWithBatch[entity.AssetRwRecord](db) } func (s *CommonService) BatchAssetRwCallbackLog(db *gorm.DB) ([]*entity.AssetRwCallbackLog, error) { return FindAllWithBatch[entity.AssetRwCallbackLog](db) } func (s *CommonService) BatchNodeOrder(db *gorm.DB) ([]*entity.NodeOrder, error) { return FindAllWithBatch[entity.NodeOrder](db) }