1
This commit is contained in:
@@ -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
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user