This commit is contained in:
苏尹岚
2021-01-04 18:16:30 +08:00
parent 78bb668fad
commit 007fdd7342
6 changed files with 255 additions and 1 deletions

View File

@@ -116,6 +116,9 @@ func PublishJob(ctx *jxcontext.Context, jobExt *model.JobExt) (errCode string, e
if job.FinishedAt.Sub(time.Now()) <= 0 {
return errCode, fmt.Errorf("任务截止日期必须大于今天!")
}
if job2, _ := dao.GetJobWithTitle(db, job.Title); job2 != nil {
return errCode, fmt.Errorf("任务标题重复,请重新输入!")
}
if job.JobCityCode != model.JobCountrywideCode {
_, _, job.JobCityCode, err = getAddressInfoFromCoord(db, job.JobLng, job.JobLat)
}