上传支付补充和优化
This commit is contained in:
parent
499fff37b6
commit
12299736e0
@ -336,4 +336,8 @@ type (
|
||||
IGrowtask interface {
|
||||
BingoAllGrowTask(session IUserSession) error
|
||||
}
|
||||
//支付发货
|
||||
IPayDelivery interface {
|
||||
Delivery(session IUserSession, pid string) (code pb.ErrorCode, items []*pb.UserAssets)
|
||||
}
|
||||
)
|
||||
|
@ -29,6 +29,7 @@ type Pay struct {
|
||||
modelPay *modelPayComp
|
||||
modelPayUser *modelPayUserComp
|
||||
modelDaily *modelDailyComp
|
||||
privilege comm.IPayDelivery //月卡
|
||||
configure *configureComp
|
||||
}
|
||||
|
||||
@ -45,6 +46,11 @@ func (this *Pay) Init(service core.IService, module core.IModule, options core.I
|
||||
}
|
||||
func (this *Pay) Start() (err error) {
|
||||
err = this.ModuleBase.Start()
|
||||
var module core.IModule
|
||||
if module, err = this.service.GetModule(comm.ModuleMainline); err != nil {
|
||||
return
|
||||
}
|
||||
this.privilege = module.(comm.IPayDelivery)
|
||||
this.service.RegisterFunctionName(string(comm.Rpc_ModulePayDelivery), this.Rpc_ModulePayDelivery)
|
||||
return
|
||||
}
|
||||
@ -115,6 +121,9 @@ func (this *Pay) Rpc_ModulePayDelivery(ctx context.Context, args *pb.PayDelivery
|
||||
case 2:
|
||||
reply.Code, items = this.modelDaily.delivery(session, args.Productid)
|
||||
break
|
||||
case 3:
|
||||
reply.Code, items = this.privilege.Delivery(session, args.Productid)
|
||||
break
|
||||
}
|
||||
for _, v := range res {
|
||||
items = append(items, &pb.UserAssets{A: v.A, T: v.T, N: v.N})
|
||||
@ -131,6 +140,6 @@ func (this *Pay) Rpc_ModulePayDelivery(ctx context.Context, args *pb.PayDelivery
|
||||
return
|
||||
}
|
||||
}
|
||||
this.ModuleHero.RechargeMoney(session.GetUserId(), conf.Amount)
|
||||
go this.ModuleHero.RechargeMoney(session.GetUserId(), conf.Amount)
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user