获取评分内容
(p, listRows, bookId int)
| 210 | |
| 211 | //获取评分内容 |
| 212 | func (this *Score) BookScores(p, listRows, bookId int) (scores []BookScoresResult, err error) { |
| 213 | sql := `select s.score,s.time_create,m.avatar,m.nickname from md_score s left join md_members m on m.member_id=s.uid where s.book_id=? order by s.id desc limit %v offset %v` |
| 214 | sql = fmt.Sprintf(sql, listRows, (p-1)*listRows) |
| 215 | _, err = orm.NewOrm().Raw(sql, bookId).QueryRows(&scores) |
| 216 | return |
| 217 | } |
| 218 | |
| 219 | //查询用户对文档的评分 |
| 220 | func (this *Score) BookScoreByUid(uid, bookId interface{}) int { |
nothing calls this directly
no outgoing calls
no test coverage detected