package cygx import ( "github.com/beego/beego/v2/client/orm" ) type ArticleAsk struct { AskId int `description:"主键ID"` ArticleId int `description:"活动ID"` UserId int `description:"用户ID"` CreateTime string `description:"创建时间"` Mobile string `description:"手机号"` CompanyName string `description:"公司名称"` RealName string `description:"姓名"` Content string `description:"内容"` } type ArticleAskListResp struct { List []*ArticleAsk } // 列表 func GetArticleAskList(articleId int) (items []*ArticleAsk, err error) { o := orm.NewOrmUsingDB("hz_cygx") sql := `SELECT k.* FROM cygx_article_ask as k WHERE article_id = ? ORDER BY create_time DESC` _, err = o.Raw(sql, articleId).QueryRows(&items) return }