From 7b69b96a8a8181f19a8dac2fd5c3046e32d1f397 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, 5 Nov 2020 14:56:42 +0800 Subject: [PATCH] auditmilit at --- business/model/dao/dao_job.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/business/model/dao/dao_job.go b/business/model/dao/dao_job.go index 230e561b7..376870537 100644 --- a/business/model/dao/dao_job.go +++ b/business/model/dao/dao_job.go @@ -158,6 +158,9 @@ func GetJob(db *DaoDB, userIDs []string, categoryIDs, statuss, types []int, from if err != nil { return job, err } + if len(jobs) == 0 { + return job, fmt.Errorf("未查询到对应的京东快递任务!") + } if data, err := json.Marshal(jobs[0]); err == nil { json.Unmarshal(data, job) }