com_base_all.go 626 B

123456789101112131415161718192021222324
  1. package services
  2. import (
  3. "app/commons/model/entity"
  4. "gorm.io/gorm"
  5. )
  6. // 查询表中所有数据 --未分批 用于查询已知数据量有限的表
  7. func (s *CommonService) AllCoins(db *gorm.DB) ([]*entity.SysCoin, error) {
  8. return Find[entity.SysCoin](db)
  9. }
  10. func (s *CommonService) AllSysLevelConfig(db *gorm.DB) ([]*entity.SysLevelConfig, error) {
  11. return Find[entity.SysLevelConfig](db)
  12. }
  13. func (s *CommonService) AllAssets(db *gorm.DB) ([]*entity.Asset, error) {
  14. return Find[entity.Asset](db)
  15. }
  16. func (s *CommonService) AllUserQuota(db *gorm.DB) ([]*entity.UserQuota, error) {
  17. return Find[entity.UserQuota](db)
  18. }