package dao import ( "context" "database/sql" "time" "go-common/app/job/main/aegis/model" xsql "go-common/library/database/sql" "go-common/library/log" "github.com/pkg/errors" ) const ( _queryTaskSQL = "SELECT id,business_id,flow_id,rid,admin_id,uid,state,weight,utime,gtime,mid,fans,`group`,reason,ctime,mtime FROM task WHERE state=? AND mtime<=? AND id>? ORDER BY id LIMIT ?" _upSetWeightSQL = "UPDATE task SET weight=? WHERE id=?" _assignTaskSQL = "UPDATE task SET admin_id=?,uid=? WHERE id=? AND state=?" _checkTaskSQL = "SELECT id FROM task WHERE flow_id=? AND rid=? AND state