Browse Source

更新

order_statistics
huangjiajun 7 months ago
parent
commit
866533bf05
2 changed files with 22 additions and 0 deletions
  1. +16
    -0
      app/db/model/task_video_num.go
  2. +6
    -0
      consume/zhios_valid_user.go

+ 16
- 0
app/db/model/task_video_num.go View File

@@ -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)"`
}

+ 6
- 0
consume/zhios_valid_user.go View File

@@ -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)


Loading…
Cancel
Save