aa
This commit is contained in:
@@ -78,6 +78,7 @@ func PublishJob(ctx *jxcontext.Context, jobExt *model.JobExt) (errCode string, e
|
||||
return errCode, fmt.Errorf("一件代发任务请输入商品价格!")
|
||||
}
|
||||
job.CashbackType = model.JobCashbackPrice
|
||||
job.LimitCountType = model.JobLimitCountTypeNoLimit
|
||||
default:
|
||||
return errCode, fmt.Errorf("暂不支持的任务类型! %v", job.JobCategoryID)
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ func GetJobImgs(db *DaoDB, jobID int) (jobImgs []*model.JobImg, err error) {
|
||||
func GetJobs(db *DaoDB, userIDs []string, categoryIDs, statuss, vendorIDs, types, cityCodes []int, includeStep bool, fromTime, toTime time.Time, lng, lat float64, cityCode, span int, keyword string, sortType, pageSize, offset int) (pagedInfo *model.PagedInfo, err error) {
|
||||
var (
|
||||
jobs []*GetJobsResult
|
||||
sqlParams = []interface{}{}
|
||||
sqlParams = []interface{}{lng, lat, utils.DefaultTimeValue, utils.DefaultTimeValue}
|
||||
)
|
||||
sql := `
|
||||
SELECT SQL_CALC_FOUND_ROWS a.*, b.name, getDistance(?, ?, CAST(a.lng AS DECIMAL(15,6))/1000000, CAST(a.lat AS DECIMAL(15,6))/1000000) distance
|
||||
@@ -76,7 +76,6 @@ func GetJobs(db *DaoDB, userIDs []string, categoryIDs, statuss, vendorIDs, types
|
||||
sql += " AND (a.job_city_code = ? OR a.job_city_code = ?)"
|
||||
sqlParams = append(sqlParams, cityCode, model.JobCountrywideCode)
|
||||
}
|
||||
sqlParams = append(sqlParams, lng, lat, utils.DefaultTimeValue, utils.DefaultTimeValue)
|
||||
if len(userIDs) > 0 {
|
||||
sql += ` AND a.user_id IN (` + GenQuestionMarks(len(userIDs)) + `)`
|
||||
sqlParams = append(sqlParams, userIDs)
|
||||
|
||||
Reference in New Issue
Block a user