优化积分获得
This commit is contained in:
parent
784a1c9106
commit
9f26d7dab2
@ -134,7 +134,10 @@ func (this *Pay) Rpc_ModulePayDelivery(ctx context.Context, args *pb.HttpPayDeli
|
||||
} else {
|
||||
res = conf.DiamondNumDouble
|
||||
}
|
||||
res = append(res, &cfg.Gameatn{A: comm.AttrType, T: comm.Integral, N: conf.Integral})
|
||||
if conf.Integral > 0 {
|
||||
res = append(res, &cfg.Gameatn{A: comm.AttrType, T: comm.Integral, N: conf.Integral})
|
||||
}
|
||||
|
||||
info.Record[order.Bpoints]++
|
||||
defer func() {
|
||||
this.PutUserSession(session)
|
||||
|
@ -68,7 +68,15 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.ShopCenterInfoReq)
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
if err = this.module.modelshop.Change(session.GetUserId(), map[string]interface{}{
|
||||
"item": info.Item,
|
||||
}); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "info", &pb.ShopCenterInfoResp{Info: info})
|
||||
return
|
||||
}
|
||||
|
@ -226,7 +226,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.ShopCenterReceiv
|
||||
}
|
||||
return
|
||||
}
|
||||
days := int32(utils.DiffDays(configure.Now().Unix(), item.Buytime)) + 1
|
||||
days := int32(utils.DiffDays(configure.Now().Unix(), item.Opemtime)) + 1
|
||||
for _, v := range fconfs {
|
||||
if conf.Type == v.Type && v.Position == conf.Index {
|
||||
if _, ok = item.Record[v.Id]; !ok {
|
||||
|
@ -130,13 +130,19 @@ func (this *ShopCenter) Delivery(session comm.IUserSession, pId int32) (errdata
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
info.Item[conf.Id] = &pb.DBShopCenterItem{
|
||||
Id: conf.Id,
|
||||
Vip: true,
|
||||
Open: true,
|
||||
Buytime: configure.Now().Unix(),
|
||||
Record: make(map[int32]bool),
|
||||
if _, ok := info.Item[conf.Id]; !ok {
|
||||
info.Item[conf.Id] = &pb.DBShopCenterItem{
|
||||
Id: conf.Id,
|
||||
Vip: true,
|
||||
Open: true,
|
||||
Buytime: configure.Now().Unix(),
|
||||
Record: make(map[int32]bool),
|
||||
}
|
||||
} else {
|
||||
info.Item[conf.Id].Open = true
|
||||
info.Item[conf.Id].Vip = true
|
||||
info.Item[conf.Id].Buytime = configure.Now().Unix()
|
||||
info.Item[conf.Id].Record = make(map[int32]bool)
|
||||
}
|
||||
if err = this.modelshop.Change(session.GetUserId(), map[string]interface{}{
|
||||
"item": info.Item,
|
||||
|
Loading…
Reference in New Issue
Block a user