修复选择用户的BUG

This commit is contained in:
Minho 2018-02-03 17:19:47 +08:00
parent 3a904d0f04
commit 2e90763493

View File

@ -97,7 +97,7 @@ func (m *MemberRelationshipResult) FindForUsersByBookId(bookId, pageIndex, pageS
func (m *MemberRelationshipResult) FindNotJoinUsersByAccount(bookId, limit int,account string) ([]*Member,error){
o := orm.NewOrm()
sql := "SELECT m.* FROM md_members as m LEFT JOIN md_relationship as rel ON m.member_id=rel.member_id WHERE (rel.book_id <> ? OR rel.relationship_id IS NULL) AND m.account LIKE ? LIMIT 0,?;"
sql := "SELECT m.* FROM md_members as m LEFT JOIN md_relationship as rel ON m.member_id=rel.member_id AND rel.book_id = ? WHERE rel.relationship_id IS NULL AND m.account LIKE ? LIMIT 0,?;"
var members []*Member