瀏覽代碼

更新

master
huangjiajun 6 月之前
父節點
當前提交
65d2f8e8cb
共有 1 個檔案被更改,包括 7 行新增2 行删除
  1. +7
    -2
      hdl/hdl_condition.go

+ 7
- 2
hdl/hdl_condition.go 查看文件

@@ -392,8 +392,13 @@ func TotalSmallTeam(eg *xorm.Engine, uid string) string {
}
return "0"
}
func GetOwnTaskVideoNum(eg *xorm.Engine, uid, startTime, endTime string) int {
sess := eg.Where("uid=? and time>=? and time<? and task_type=? and task_id>0", uid, startTime, endTime, 3)
func GetOwnTaskVideoNum(eg *xorm.Engine, uid int, task map[string]string, t time.Time) int {
stime := time.Date(t.Year(), t.Month(), t.Day()-zhios_condition_statistics_utils.StrToInt(task["within_days"]), t.Hour(), 0, 0, 0, t.Location()).Format("20060102")
if zhios_condition_statistics_utils.StrToInt(task["within_days"]) == 0 {
stime = "0"
}
etime := t.Format("20060102")
sess := eg.Where("uid=? and time>=? and time<? and task_type=? and task_id>0", uid, stime, etime, 3)
sum, _ := sess.Sum(&model.TaskVideoNum{}, "count")
return int(sum)
}

Loading…
取消
儲存