正在显示
2 个修改的文件
包含
13 行增加
和
2 行删除
@@ -288,8 +288,18 @@ func (dao *TaskDao) CalculatePersonTask(uid int64) (map[string]interface{}, erro | @@ -288,8 +288,18 @@ func (dao *TaskDao) CalculatePersonTask(uid int64) (map[string]interface{}, erro | ||
288 | } else { | 288 | } else { |
289 | completedAsParticipator = int64(count) | 289 | completedAsParticipator = int64(count) |
290 | } | 290 | } |
291 | - //if count, err := tx.Model(taskModel). | ||
292 | - // Where(`task.sponsor @> '{}'`) | 291 | + // TODO 已过期竞标任务统计 |
292 | + if count, err := tx.Model(taskModel). | ||
293 | + Where(`task.sponsor @> '{"uid":?}'`, uid). | ||
294 | + //Where(`task.task_type = ? `, domain.TASK_STATUS_EXPIRED). | ||
295 | + Where(`task.task_type = ?`, 2). | ||
296 | + Where("task.task_status = ? ", domain.TASK_STATUS_UNCLAIMED). | ||
297 | + Where(`task.planned_completion_time < ?`, time.Now()). | ||
298 | + Count(); err != nil { | ||
299 | + return nil, err | ||
300 | + } else { | ||
301 | + expiredAsSponsor = int64(count) | ||
302 | + } | ||
293 | return map[string]interface{}{ | 303 | return map[string]interface{}{ |
294 | "underwayAsAssignedPerson": underwayAsAssignedPerson, | 304 | "underwayAsAssignedPerson": underwayAsAssignedPerson, |
295 | "unAcceptanceAsAssignedPerson": unAcceptanceAsAssignedPerson, | 305 | "unAcceptanceAsAssignedPerson": unAcceptanceAsAssignedPerson, |
-
请 注册 或 登录 后发表评论