This commit is contained in:
苏尹岚
2020-12-21 18:18:21 +08:00
parent 92f0cca62d
commit 4a7f691525
2 changed files with 8 additions and 0 deletions

View File

@@ -250,6 +250,13 @@ func GetJobDetail(ctx *jxcontext.Context, jobID int, lng, lat float64) (job *dao
if job.Lng != 0 && job.Lat != 0 {
job.Distance = jxutils.EarthDistance(lng, lat, jxutils.IntCoordinate2Standard(job.Lng), jxutils.IntCoordinate2Standard(job.Lat))
}
utils.CallFuncAsync(func() {
job2 := &model.Job{}
job2.ID = job.ID
dao.GetEntity(db, job2)
job2.BrowseCount++
dao.UpdateEntity(db, job2, "BrowseCount")
})
return job, err
}