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

This commit is contained in:
昔念
2026-02-05 23:44:07 +08:00
parent 30c89dcd2a
commit a0d4567d3f
10 changed files with 110 additions and 47 deletions

View File

@@ -11,12 +11,18 @@ import (
// 获取任务信息
func (s *TaskService) Exec(id uint32, t func(*model.TaskEX) bool) {
var gg model.TaskEX
m1 := s.PModel(s.Model).Where("task_id", id)
m1.Scan(&gg)
tre := t(&gg)
if !tre { //不需要更新
return
}
if cool.Config.ServerInfo.IsVip != 0 {
return
}
gg.PlayerID = uint64(s.userid)
gg.TaskID = id
_, err := m1.Save(gg)