Commit 7e57e227 authored by brent's avatar brent

modify task type

parent 5b7780ca
......@@ -1391,11 +1391,8 @@ func (server *TaskController) GetTaskTypes() {
var types []*models.TaskType
sql := "SELECT count(*) FROM task_type WHERE deleted = 0;"
total, err := postgres.QueryTotal(sql)
if err != nil {
server.respond(models.BusinessFailed, err.Error())
return
}
var total int64
mysql.GetMysqlInstace().Ormer.Raw(sql).QueryRow(&total)
logs.Debug("total = %d", total)
if total == 0 {
responseData := struct {
......
{"/Users/brent/Documents/wubanWork/ai_developer_admin/controllers":1708678164620771077}
\ No newline at end of file
{"/Users/brent/Documents/wubanWork/ai_developer_admin/controllers":1708684702731316975}
\ No newline at end of file
......@@ -61,5 +61,4 @@ func init() {
}
orm.SetMaxIdleConns("default", 10)
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