...
|
...
|
@@ -288,8 +288,18 @@ func (dao *TaskDao) CalculatePersonTask(uid int64) (map[string]interface{}, erro |
|
|
} else {
|
|
|
completedAsParticipator = int64(count)
|
|
|
}
|
|
|
//if count, err := tx.Model(taskModel).
|
|
|
// Where(`task.sponsor @> '{}'`)
|
|
|
// TODO 已过期竞标任务统计
|
|
|
if count, err := tx.Model(taskModel).
|
|
|
Where(`task.sponsor @> '{"uid":?}'`, uid).
|
|
|
//Where(`task.task_type = ? `, domain.TASK_STATUS_EXPIRED).
|
|
|
Where(`task.task_type = ?`, 2).
|
|
|
Where("task.task_status = ? ", domain.TASK_STATUS_UNCLAIMED).
|
|
|
Where(`task.planned_completion_time < ?`, time.Now()).
|
|
|
Count(); err != nil {
|
|
|
return nil, err
|
|
|
} else {
|
|
|
expiredAsSponsor = int64(count)
|
|
|
}
|
|
|
return map[string]interface{}{
|
|
|
"underwayAsAssignedPerson": underwayAsAssignedPerson,
|
|
|
"unAcceptanceAsAssignedPerson": unAcceptanceAsAssignedPerson,
|
...
|
...
|
|