package utility import ( "context" "github.com/gogf/gf/v2/frame/g" ) //获取我的收藏 func GetMyBidCollect(ctx context.Context, positionId int64) map[string]bool { m := map[string]bool{} res, err := g.DB().GetArray(ctx, `select bid from jianyu.bdcollection where userid=?`, positionId) if err != nil { g.Log().Error(ctx, positionId, "查询标讯收藏出错", err) return m } for _, v := range res { m[v.String()] = true } return m }