mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-12-19 10:58:32 +08:00
完善功能
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"github.com/astaxie/beego/orm"
|
||||
"strings"
|
||||
"github.com/astaxie/beego/logs"
|
||||
"github.com/lifei6671/godoc/conf"
|
||||
)
|
||||
|
||||
type BookResult struct {
|
||||
@@ -93,17 +94,18 @@ func (m *BookResult) FindByIdentify(identify string,member_id int) (*BookResult,
|
||||
m.RoleId = relationship.RoleId
|
||||
m.RelationshipId = relationship.RelationshipId
|
||||
|
||||
if m.RoleId == 0{
|
||||
if m.RoleId == conf.BookFounder {
|
||||
m.RoleName = "创始人"
|
||||
}else if m.RoleId == 1 {
|
||||
}else if m.RoleId == conf.BookAdmin {
|
||||
m.RoleName = "管理员"
|
||||
}else if m.RoleId == 2 {
|
||||
}else if m.RoleId == conf.BookEditor {
|
||||
m.RoleName = "编辑者"
|
||||
}else if m.RoleId == 2 {
|
||||
}else if m.RoleId == conf.BookObserver {
|
||||
m.RoleName = "观察者"
|
||||
}
|
||||
|
||||
|
||||
|
||||
doc := NewDocument()
|
||||
|
||||
err = o.QueryTable(doc.TableNameWithPrefix()).Filter("book_id",book.BookId).OrderBy("modify_time").One(doc)
|
||||
|
||||
Reference in New Issue
Block a user