diff --git a/app/db/model/task_video_num.go b/app/db/model/task_video_num.go new file mode 100644 index 0000000..6a246a6 --- /dev/null +++ b/app/db/model/task_video_num.go @@ -0,0 +1,16 @@ +package model + +import ( + "time" +) + +type TaskVideoNum struct { + Id int `json:"id" xorm:"not null pk autoincr INT(11)"` + Uid int `json:"uid" xorm:"default 0 INT(11)"` + Time int `json:"time" xorm:"default 0 INT(11)"` + InviteTime time.Time `json:"invite_time" xorm:"DATETIME"` + ParentUid int `json:"parent_uid" xorm:"default 0 INT(11)"` + Count int `json:"count" xorm:"default 0 INT(11)"` + TaskId int `json:"task_id" xorm:"default 0 INT(11)"` + TaskType int `json:"task_type" xorm:"default 0 INT(11)"` +} diff --git a/consume/zhios_valid_user.go b/consume/zhios_valid_user.go index c6f6e31..ea79227 100644 --- a/consume/zhios_valid_user.go +++ b/consume/zhios_valid_user.go @@ -2,6 +2,7 @@ package consume import ( "applet/app/db" + "applet/app/db/model" "applet/app/utils" "applet/app/utils/logx" "applet/consume/md" @@ -103,6 +104,11 @@ func RoutineUpdateUserComm(eg *xorm.Engine, dbName, uid string) { for k, v := range checkMap { switch k { + case "taskVideo": + sum, _ := eg.Where("uid=? and task_type=?", user.Uid, 3).Sum(&model.TaskVideoNum{}, "count") + if sum >= utils.AnyToFloat64(v) { + todone-- + } case "realCheck": // 检查实名认证 one, _ := db.GetRealNameAuthByUidWithState(eg, user.Uid, 1)