This commit is contained in:
1
2026-01-22 16:01:52 +00:00
parent 3af709f633
commit 7d8497250d
9 changed files with 143 additions and 163 deletions

View File

@@ -45,15 +45,15 @@ func (s *TaskService) GetDaily() []model.TaskConfig {
return item
}
func (s *TaskService) IsAcceptable(taskid uint32) bool {
func (s *TaskService) IsAcceptable(taskid uint32) (out *model.TaskConfig) {
con, _ := cool.DBM(s.Model).Where("is_acceptable", 1).Where("task_id", taskid).
cool.DBM(s.Model).Where("is_acceptable", 1).Where("task_id", taskid).
Cache(gdb.CacheOption{
// Duration: time.Hour,
Force: false,
}).Count()
}).Scan(&out)
return con > 0
return
}