上传代码
This commit is contained in:
parent
7424b5c57b
commit
36d26e0448
@ -32,15 +32,16 @@ type Pay struct {
|
||||
modelPayUser *modelPayUserComp
|
||||
modelDaily *modelDailyComp
|
||||
privilege comm.IPayDelivery //月卡
|
||||
warorder comm.IWarorder //月卡
|
||||
configure *configureComp
|
||||
}
|
||||
|
||||
//模块名
|
||||
// 模块名
|
||||
func (this *Pay) GetType() core.M_Modules {
|
||||
return comm.ModulePay
|
||||
}
|
||||
|
||||
//模块初始化接口 注册用户创建角色事件
|
||||
// 模块初始化接口 注册用户创建角色事件
|
||||
func (this *Pay) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
||||
err = this.ModuleBase.Init(service, module, options)
|
||||
this.service = service.(base.IRPCXService)
|
||||
@ -57,7 +58,7 @@ func (this *Pay) Start() (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
//装备组件
|
||||
// 装备组件
|
||||
func (this *Pay) OnInstallComp() {
|
||||
this.ModuleBase.OnInstallComp()
|
||||
|
||||
@ -68,7 +69,7 @@ func (this *Pay) OnInstallComp() {
|
||||
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
|
||||
}
|
||||
|
||||
//RPC-----------------------------------------------------------------------------------------------------------------------
|
||||
// RPC-----------------------------------------------------------------------------------------------------------------------
|
||||
func (this *Pay) Rpc_ModulePayDelivery(ctx context.Context, args *pb.PayDeliveryReq, reply *pb.PayDeliveryResp) (err error) {
|
||||
this.Debug("Rpc_ModulePayDelivery", log.Field{Key: "args", Value: args.String()})
|
||||
var (
|
||||
@ -136,6 +137,12 @@ func (this *Pay) Rpc_ModulePayDelivery(ctx context.Context, args *pb.PayDelivery
|
||||
return
|
||||
}
|
||||
break
|
||||
case 4:
|
||||
if errdata, items = this.privilege.Delivery(session, args.Productid); errdata != nil {
|
||||
reply.Code = errdata.Code
|
||||
return
|
||||
}
|
||||
break
|
||||
}
|
||||
for _, v := range res {
|
||||
items = append(items, &pb.UserAssets{A: v.A, T: v.T, N: v.N})
|
||||
@ -156,7 +163,7 @@ func (this *Pay) Rpc_ModulePayDelivery(ctx context.Context, args *pb.PayDelivery
|
||||
return
|
||||
}
|
||||
|
||||
//发货
|
||||
// 发货
|
||||
func (this *Pay) ModulePayDelivery(session comm.IUserSession, Productid string, Price int32) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
conf *cfg.GameRechargeData
|
||||
|
@ -77,6 +77,14 @@ func (this *apiComp) Accept(session comm.IUserSession, req *pb.WTaskAcceptReq) (
|
||||
wtask.Accepts = append(wtask.Accepts, req.Tid)
|
||||
update["activations"] = wtask.Activations
|
||||
update["accepts"] = wtask.Accepts
|
||||
if err = this.module.ModuleBuried.ActiveCondition(session.GetUserId(), conf.Completetask...); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ExternalModule,
|
||||
Title: pb.ErrorCode_ExternalModule.ToString(),
|
||||
Message: fmt.Sprintf("ModuleBuried.ActiveCondition uid:%s condiIds:%v", session.GetUserId(), conf.Completetask),
|
||||
}
|
||||
return
|
||||
}
|
||||
if progress, errdata = this.module.pushtaskprogress(session, wtask, false); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user