充值接口调整

This commit is contained in:
meixiongfeng 2023-11-22 14:35:07 +08:00
parent 47accf4860
commit 6f3d6416c3
6 changed files with 20 additions and 22 deletions

View File

@ -544,9 +544,9 @@ func (this *ModuleBase) DispenseRes(session comm.IUserSession, res []*cfg.Gameat
this.Debugf("发放装备资源: %v errdata: %v", equips, errdata)
}
if len(vip) > 0 { //卡片资源
for k := range vip {
errdata, _ = this.ModulePrivilege.Delivery(session, k)
this.Debugf("发放月卡资源: %v errdata: %v", k, errdata)
for _, v := range vip {
errdata, _ = this.ModulePrivilege.Delivery(session, v)
this.Debugf("发放月卡资源: %v errdata: %v", v, errdata)
}
}
if len(atlas) > 0 {
@ -809,9 +809,9 @@ func (this *ModuleBase) DispenseAtno(session comm.IUserSession, res []*cfg.Gamea
this.Debugf("发放装备资源: %v errdata: %v", equips, errdata)
}
if len(vip) > 0 { //卡片资源
for k := range vip {
errdata, _ = this.ModulePrivilege.Delivery(session, k)
this.Debugf("发放月卡资源: %v errdata: %v", k, errdata)
for _, v := range vip {
errdata, _ = this.ModulePrivilege.Delivery(session, v)
this.Debugf("发放月卡资源: %v errdata: %v", v, errdata)
}
for k, v := range vip {
atno = append(atno, &pb.UserAtno{

View File

@ -22,6 +22,6 @@ func (this *apiComp) BuyYueka(session comm.IUserSession, req *pb.PrivilegeBuyYue
if errdata = this.BuyYuekaCheck(session, req); errdata != nil {
return
}
errdata, _ = this.module.Delivery(session, req.CID)
//errdata, _ = this.module.Delivery(session, req.CID)
return
}

View File

@ -70,14 +70,12 @@ func (this *Privilege) EventUserOffline(uid, sessionid string) {
}
// 购买了一个新的特权
func (this *Privilege) Delivery(session comm.IUserSession, pid string) (errdata *pb.ErrorData, items []*pb.UserAssets) {
func (this *Privilege) Delivery(session comm.IUserSession, pId int32) (errdata *pb.ErrorData, items []*pb.UserAssets) {
var (
bFind bool
cId int32
)
// 通过计费点获取
cId = this.configure.GetPrivilegeCardByPid(pid)
conf, err := this.configure.GetPrivilegeCard(cId)
conf, err := this.configure.GetPrivilegeCard(pId)
if err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,

View File

@ -52,7 +52,7 @@ func (this *PushGiftbag) OnInstallComp() {
}
// 发货
func (this *PushGiftbag) Delivery(session comm.IUserSession, pid string) (errdata *pb.ErrorData, items []*pb.UserAssets) {
func (this *PushGiftbag) Delivery(session comm.IUserSession, pId int32) (errdata *pb.ErrorData, items []*pb.UserAssets) {
var (
confs []*cfg.GamePushGiftData
conf *cfg.GamePushGiftData
@ -68,7 +68,7 @@ func (this *PushGiftbag) Delivery(session comm.IUserSession, pid string) (errdat
return
}
for _, v := range confs {
if v.Recharge == pid {
if v.Id == pId {
conf = v
break
}
@ -78,7 +78,7 @@ func (this *PushGiftbag) Delivery(session comm.IUserSession, pid string) (errdat
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.String(),
Message: fmt.Sprintf("no found pid:%s", pid),
Message: fmt.Sprintf("no found pid:%s", pId),
}
return
}

View File

@ -92,7 +92,7 @@ func (this *ShopCenter) ActivityCloseNotice(hdlist *pb.DBHuodong) {
}
// 发货
func (this *ShopCenter) Delivery(session comm.IUserSession, pid string) (errdata *pb.ErrorData, items []*pb.UserAssets) {
func (this *ShopCenter) Delivery(session comm.IUserSession, pId int32) (errdata *pb.ErrorData, items []*pb.UserAssets) {
var (
confs []*cfg.GameShopCenterControlData
conf *cfg.GameShopCenterControlData
@ -109,7 +109,7 @@ func (this *ShopCenter) Delivery(session comm.IUserSession, pid string) (errdata
}
for _, v := range confs {
if v.Point == pid {
if v.Id == pId {
conf = v
}
}
@ -117,7 +117,7 @@ func (this *ShopCenter) Delivery(session comm.IUserSession, pid string) (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:%s", pId),
}
return
}

View File

@ -51,7 +51,7 @@ func (this *Warorder) OnInstallComp() {
}
// 发货
func (this *Warorder) Delivery(session comm.IUserSession, pid string) (errdata *pb.ErrorData, items []*pb.UserAssets) {
func (this *Warorder) Delivery(session comm.IUserSession, pId int32) (errdata *pb.ErrorData, items []*pb.UserAssets) {
var (
confs []*cfg.GamePassCheckPriceData
conf *cfg.GamePassCheckPriceData
@ -71,7 +71,7 @@ func (this *Warorder) Delivery(session comm.IUserSession, pid string) (errdata *
return
}
for _, v := range confs {
if v.PayId == pid || v.PayproId == pid || v.PaymidId == pid {
if v.PasscheckType == pId {
conf = v
break
}
@ -80,7 +80,7 @@ func (this *Warorder) Delivery(session comm.IUserSession, pid string) (errdata *
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.String(),
Message: fmt.Sprintf("no found pid:%s", pid),
Message: fmt.Sprintf("no found pid:%s", pId),
}
return
}
@ -108,12 +108,12 @@ func (this *Warorder) Delivery(session comm.IUserSession, pid string) (errdata *
dwarorder = &pb.DreamWarorder{}
info.Warorder[conf.PasscheckType] = warorder
}
if conf.PayId == pid {
if conf.PasscheckType == pId {
dwarorder.Vip = 1
} else {
dwarorder.Vip = 2
}
if conf.PayproId == pid || conf.PaymidId == pid {
if conf.PasscheckType == pId {
if expconf, err = this.configure.getWarorderLvpMax(conf.PasscheckType); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,