package service import ( "log" cm "bp.jydev.jianyu360.cn/CRM/application/api/common" "bp.jydev.jianyu360.cn/SocialPlatform/socialPlatform/rpc/social/social" "github.com/gogf/gf/v2/os/gctx" ) type Group struct { EntId int64 PositionId int64 UserIdArr []int64 AppId string EntUserId int64 AccountId int64 } //GroupAdd 创建群组 //return 群组id func (this *Group) GroupAdd() string { resp, err := cm.SocialPlatformRpc.ChatGroupAdd(gctx.New(), &social.ChatGroupAddReq{ EntId: this.EntId, PositionId: this.PositionId, UserIdArr: this.UserIdArr, AppId: this.AppId, EntUserId: this.EntUserId, AccountId: this.AccountId, }) if err != nil { log.Println("新建群组出错", this.PositionId, err) return "" } else if resp == nil { log.Println("positionId用户", this.PositionId, "新建群组失败") return "" } return resp.Data }