41 lines
951 B
Go
41 lines
951 B
Go
package maincity
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/pb"
|
|
)
|
|
|
|
func (this *apiComp) SynchPosCheck(session comm.IUserSession, req *pb.MainCitySynchPosPeek) (errdata *pb.ErrorData) {
|
|
|
|
return
|
|
}
|
|
|
|
// 查看某一封邮件
|
|
func (this *apiComp) SynchPos(session comm.IUserSession, req *pb.MainCitySynchPosPeek) (errdata *pb.ErrorData) {
|
|
var (
|
|
friends []string
|
|
groupUser map[string][]string = make(map[string][]string)
|
|
stage string
|
|
err error
|
|
ok bool
|
|
)
|
|
|
|
friends = this.module.model.getplayerPos(session.GetUserId())
|
|
|
|
for _, v := range friends {
|
|
stage, err = comm.UidToSTag(v)
|
|
if err != nil {
|
|
this.module.Errorln(err)
|
|
continue
|
|
}
|
|
if _, ok = groupUser[stage]; !ok {
|
|
groupUser[stage] = make([]string, 0)
|
|
}
|
|
groupUser[stage] = append(groupUser[stage], v)
|
|
}
|
|
this.module.SendMsgToSession(string(this.module.GetType()), "synchpos", &pb.MainCitySynchPosPush{
|
|
Pos: req.Pos,
|
|
}, groupUser)
|
|
return
|
|
}
|