查询指定书籍的创始人.
(bookId int)
| 49 | |
| 50 | //查询指定书籍的创始人. |
| 51 | func (m *Relationship) FindFounder(bookId int) (*Relationship, error) { |
| 52 | o := orm.NewOrm() |
| 53 | |
| 54 | err := o.QueryTable(m.TableNameWithPrefix()).Filter("book_id", bookId).Filter("role_id", 0).One(m) |
| 55 | |
| 56 | return m, err |
| 57 | } |
| 58 | |
| 59 | func (m *Relationship) UpdateRoleId(bookId, memberId, roleId int) (*Relationship, error) { |
| 60 | o := orm.NewOrm() |
no test coverage detected