From d515dcc656124b4bd390d175fadaa9da60e187f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Thu, 29 Oct 2020 11:37:25 +0800 Subject: [PATCH] job --- business/jxstore/cms/job.go | 2 +- business/model/job.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/business/jxstore/cms/job.go b/business/jxstore/cms/job.go index 6acffa2fb..5565fcff8 100644 --- a/business/jxstore/cms/job.go +++ b/business/jxstore/cms/job.go @@ -506,7 +506,7 @@ func RefreshJobStatus(ctx *jxcontext.Context) (err error) { return } for _, job := range jobs { - if time.Now().Sub(job.FinishedAt) >= 0 { + if time.Now().Sub(*job.FinishedAt) >= 0 { job.Status = model.JobStatusOverdue dao.UpdateEntity(db, job, "Status") } diff --git a/business/model/job.go b/business/model/job.go index 74719f598..10e847898 100644 --- a/business/model/job.go +++ b/business/model/job.go @@ -49,7 +49,7 @@ type Job struct { Lat int `json:"lat"` //乘了10的6次方 JobLimitAt int `json:"jobLimitAt"` //任务限时完成小时数 AuditLimitAt int `json:"auditLimitAt"` //任务审核限时小时数 - FinishedAt time.Time `json:"finishedAt"` //接单截止日期 + FinishedAt *time.Time `orm:"null" json:"finishedAt"` //接单截止日期 LimitCountType int `json:"limitCountType"` //任务限次类型,1为每人一次,2为每人每天一次,3为每人每周一次,4为不限制 VendorID int `orm:"column(vendor_id)" json:"vendorID"` //推广平台 StoreURL string `orm:"column(store_url)" json:"storeURL"` //门店链接