create messagegroup
This commit is contained in:
@@ -189,15 +189,31 @@ func (c *EventController) GetImMessageRecord() {
|
||||
|
||||
// @Title 创建聊天组
|
||||
// @Description 创建聊天组
|
||||
// @Param token header string true "认证token"
|
||||
// @Param userID formData string true "创建者id"
|
||||
// @Param userID2 formData string false "被拉的id 如果userID2为空就默认为是创建的群聊"
|
||||
// @Param token header string true "认证token"
|
||||
// @Param userID formData string true "创建者id"
|
||||
// @Param userID2 formData string false "被拉的id 如果userID2为空就默认为是创建的群聊"
|
||||
// @Param name formData string false "如果是群聊,则要传入群名"
|
||||
// @Param dividePercentage formData int false "如果是群聊,则要传入分成比例"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /CreateMessageGroup [post]
|
||||
func (c *EventController) CreateMessageGroup() {
|
||||
c.callCreateMessageGroup(func(params *tEventCreateMessageGroupParams) (retVal interface{}, errCode string, err error) {
|
||||
retVal, err = event.CreateMessageGroup(params.Ctx, params.UserID, params.UserID2)
|
||||
retVal, err = event.CreateMessageGroup(params.Ctx, params.UserID, params.UserID2, params.Name, params.DividePercentage)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 查询某个用户所有聊天组
|
||||
// @Description 查询某个用户所有聊天组
|
||||
// @Param token header string true "认证token"
|
||||
// @Param userID formData string true "userid"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /GetMessageGroupByUser [get]
|
||||
func (c *EventController) GetMessageGroupByUser() {
|
||||
c.callGetMessageGroupByUser(func(params *tEventGetMessageGroupByUserParams) (retVal interface{}, errCode string, err error) {
|
||||
retVal, err = event.GetMessageGroupByUser(params.Ctx, params.UserID)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user