job
This commit is contained in:
19
business/model/dao/job.go
Normal file
19
business/model/dao/job.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
)
|
||||
|
||||
func GetJobCategories(db *DaoDB, name string) (jobCategories []*model.JobCategory, err error) {
|
||||
sql := `
|
||||
SELECT * FROM job_category WHERE deleted_at = ?
|
||||
`
|
||||
sqlParams := []interface{}{utils.DefaultTimeValue}
|
||||
if name != "" {
|
||||
sql += ` AND name LIKE ?`
|
||||
sqlParams = append(sqlParams, "%"+name+"%")
|
||||
}
|
||||
err = GetRows(db, &jobCategories, sql, sqlParams)
|
||||
return jobCategories, err
|
||||
}
|
||||
Reference in New Issue
Block a user