2
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
昔念
2026-04-26 04:57:38 +08:00
parent c07e521e4e
commit 8e28e030c1
6 changed files with 32 additions and 43 deletions

View File

@@ -145,6 +145,22 @@ func (s *CdkService) GetByID(id uint32) *model.CDKConfig {
return item
}
func (s *CdkService) GetRewardByIDIncludeDeleted(id uint32) *model.CDKConfig {
if id == 0 {
return nil
}
var item *model.CDKConfig
dbm_nocache_noenable(s.Model).Unscoped().Where("id", id).Where("type", CDKTypeReward).Scan(&item)
return item
}
func (s *CdkService) SignRewardOptions() []model.CDKConfig {
var items []model.CDKConfig
dbm_nocache_noenable(s.Model).Unscoped().Where("type", CDKTypeReward).OrderDesc("id").Scan(&items)
return items
}
func (s *CdkService) All() []model.CDKConfig {
var item []model.CDKConfig
dbm_notenable(s.Model).WhereLT("exchange_remain_count", 0).Scan(&item)