Commit 7e57e227 authored by brent's avatar brent

modify task type

parent 5b7780ca
...@@ -1391,11 +1391,8 @@ func (server *TaskController) GetTaskTypes() { ...@@ -1391,11 +1391,8 @@ func (server *TaskController) GetTaskTypes() {
var types []*models.TaskType var types []*models.TaskType
sql := "SELECT count(*) FROM task_type WHERE deleted = 0;" sql := "SELECT count(*) FROM task_type WHERE deleted = 0;"
total, err := postgres.QueryTotal(sql) var total int64
if err != nil { mysql.GetMysqlInstace().Ormer.Raw(sql).QueryRow(&total)
server.respond(models.BusinessFailed, err.Error())
return
}
logs.Debug("total = %d", total) logs.Debug("total = %d", total)
if total == 0 { if total == 0 {
responseData := struct { responseData := struct {
......
{"/Users/brent/Documents/wubanWork/ai_developer_admin/controllers":1708678164620771077} {"/Users/brent/Documents/wubanWork/ai_developer_admin/controllers":1708684702731316975}
\ No newline at end of file \ No newline at end of file
...@@ -61,5 +61,4 @@ func init() { ...@@ -61,5 +61,4 @@ func init() {
} }
orm.SetMaxIdleConns("default", 10) orm.SetMaxIdleConns("default", 10)
orm.SetMaxOpenConns("default", 100) orm.SetMaxOpenConns("default", 100)
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment