上传协议

This commit is contained in:
liwei1dao 2024-01-05 17:47:41 +08:00
parent 9f26d7dab2
commit 982e34faa6

View File

@ -117,7 +117,7 @@ func (this *ShopCenter) Delivery(session comm.IUserSession, pId int32) (errdata
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.String(),
Message: fmt.Sprintf("no found Point:%s", pId),
Message: fmt.Sprintf("no found Point:%d", pId),
}
return
}
@ -130,19 +130,18 @@ func (this *ShopCenter) Delivery(session comm.IUserSession, pId int32) (errdata
}
return
}
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 {
if _, ok := info.Item[conf.Id]; ok {
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)
} else {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.String(),
Message: fmt.Sprintf("no found Point:%d", pId),
}
return
}
if err = this.modelshop.Change(session.GetUserId(), map[string]interface{}{
"item": info.Item,