package public import ( "context" "fmt" "github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/util/gconv" "time" ) func GetPayUser() map[string]bool { var ( pay = make(map[string]bool) ctx = context.Background() ) res, err := g.DB("subjectdb").Query(ctx, fmt.Sprintf(`SELECT id,user_id FROM dwd_f_data_equity_info WHERE endtime>?`, time.Now().Format(time.DateTime))) if err == nil && !res.IsEmpty() { for _, m := range res.List() { pay[gconv.String(m["user_id"])] = true } } return pay }