aa
This commit is contained in:
@@ -71,16 +71,13 @@ func GetJobs(db *DaoDB, userIDs []string, categoryIDs, statuss, vendorIDs, types
|
|||||||
FROM job a
|
FROM job a
|
||||||
JOIN job_category b ON b.id = a.job_category_id AND b.deleted_at = ?
|
JOIN job_category b ON b.id = a.job_category_id AND b.deleted_at = ?
|
||||||
WHERE a.deleted_at = ?
|
WHERE a.deleted_at = ?
|
||||||
AND (a.job_city_code = ? OR a.job_city_code = ?)
|
|
||||||
`
|
`
|
||||||
if cityCode == 0 {
|
if cityCode > 0 {
|
||||||
if len(cityCodes) > 0 {
|
sql += " AND (a.job_city_code = ? OR a.job_city_code = ?)"
|
||||||
cityCode = cityCodes[0]
|
sqlParams = append(sqlParams, cityCode, model.JobCountrywideCode)
|
||||||
} else {
|
|
||||||
cityCode = 510100
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
sqlParams = append(sqlParams, lng, lat, utils.DefaultTimeValue, utils.DefaultTimeValue, cityCode, model.JobCountrywideCode)
|
sqlParams = append(sqlParams, lng, lat, utils.DefaultTimeValue, utils.DefaultTimeValue)
|
||||||
if len(userIDs) > 0 {
|
if len(userIDs) > 0 {
|
||||||
sql += ` AND a.user_id IN (` + GenQuestionMarks(len(userIDs)) + `)`
|
sql += ` AND a.user_id IN (` + GenQuestionMarks(len(userIDs)) + `)`
|
||||||
sqlParams = append(sqlParams, userIDs)
|
sqlParams = append(sqlParams, userIDs)
|
||||||
|
|||||||
Reference in New Issue
Block a user