imrecord userid

This commit is contained in:
苏尹岚
2020-11-11 14:45:12 +08:00
parent 28fbbe1a45
commit 9b220dbc68
5 changed files with 15 additions and 9 deletions

View File

@@ -98,13 +98,7 @@ func GetUsers(db *DaoDB, userType int, keyword string, userIDs, userID2s, mobile
return userList, totalCount, err
}
type GetUserResult struct {
model.User
AcceptOrderCount int `json:"acceptOrderCount"`
FinishedOrderCount int `json:"finishedOrderCount"`
}
func GetUser(db *DaoDB, userID string) (user *GetUserResult, err error) {
func GetUser(db *DaoDB, userID string) (user *model.GetUserResult, err error) {
sqlParams := []interface{}{}
sql := `
SELECT

View File

@@ -63,6 +63,8 @@ type ImMessageRecord struct {
GroupID int `orm:"column(group_id)" json:"groupID"` //组ID
Content string `orm:"type(text)" json:"content"` //消息内容
MessageType int `json:"messageType"` //消息类型,文字,图片
UserInfo *GetUserResult `orm:"-" json:"userInfo"`
}
func (*ImMessageRecord) TableIndex() [][]string {

View File

@@ -249,3 +249,9 @@ func (*RoleMenu) TableUnique() [][]string {
[]string{"MenuID", "RoleID", "DeletedAt"},
}
}
type GetUserResult struct {
User
AcceptOrderCount int `json:"acceptOrderCount"`
FinishedOrderCount int `json:"finishedOrderCount"`
}