上传推送礼包
This commit is contained in:
parent
972b5a4df7
commit
d247d3e723
@ -167,17 +167,25 @@ func (this *PushGiftbag) BuriedsNotify(session comm.IUserSession, condis []*pb.C
|
||||
|
||||
if len(targets) > 0 {
|
||||
item = make([]*pb.DBPushGiftbagItem, 0)
|
||||
for _, v := range info.Item {
|
||||
if _, ok = targets[v.Id]; ok {
|
||||
v.Stime = configure.Now().Unix()
|
||||
} else {
|
||||
for _, target := range targets {
|
||||
ok = false
|
||||
for _, v := range info.Item {
|
||||
if target.Id == v.Id {
|
||||
v.Stime = configure.Now().Unix()
|
||||
ok = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !ok {
|
||||
item = append(item, &pb.DBPushGiftbagItem{
|
||||
Id: v.Id,
|
||||
Id: target.Id,
|
||||
Stime: configure.Now().Unix(),
|
||||
})
|
||||
}
|
||||
}
|
||||
info.Item = append(info.Item, item...)
|
||||
if len(item) > 0 {
|
||||
info.Item = append(info.Item, item...)
|
||||
}
|
||||
session.SendMsg(string(this.GetType()), "chanage", &pb.PushGiftbagChanagePush{Item: info.Item})
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user