提交支付系统

This commit is contained in:
liwei1dao 2022-11-04 18:46:27 +08:00
parent 556bf52ca4
commit aaa219a7ce
3 changed files with 19 additions and 4 deletions

View File

@ -41,6 +41,11 @@ func (this *modelPayComp) queryUserPayData(uId string) (result []*pb.DBPayOrder,
return return
} }
func (this *modelPayComp) addUserPayOrder() { //添加用户订单数据
func (this *modelPayComp) addUserPayOrder(order *pb.DBPayOrder) (err error) {
if err = this.AddList(order.Uid, order.Orderid, order); err != nil {
this.module.Errorf("err:%v", err)
return
}
return
} }

View File

@ -9,6 +9,7 @@ import (
"go_dreamfactory/modules" "go_dreamfactory/modules"
"go_dreamfactory/pb" "go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs" cfg "go_dreamfactory/sys/configure/structs"
"time"
) )
/* /*
@ -98,13 +99,20 @@ func (this *Pay) Rpc_ModulePayDelivery(ctx context.Context, args *pb.PayDelivery
return return
} }
} }
if err = this.modelPay.addUserPayOrder(&pb.DBPayOrder{
Orderid: args.Orderid,
Uid: args.Uid,
Productid: args.Productid,
Ctime: time.Now().Unix(),
}); err != nil {
reply.Code = pb.ErrorCode_DBError
return
}
switch conf.RechargeType { switch conf.RechargeType {
case 1: case 1:
break break
case 2: case 2:
break break
} }
return return
} }

View File

@ -24,6 +24,7 @@ import (
"go_dreamfactory/modules/moonfantasy" "go_dreamfactory/modules/moonfantasy"
"go_dreamfactory/modules/notify" "go_dreamfactory/modules/notify"
"go_dreamfactory/modules/pagoda" "go_dreamfactory/modules/pagoda"
"go_dreamfactory/modules/pay"
"go_dreamfactory/modules/rtask" "go_dreamfactory/modules/rtask"
"go_dreamfactory/modules/shop" "go_dreamfactory/modules/shop"
"go_dreamfactory/modules/smithy" "go_dreamfactory/modules/smithy"
@ -96,6 +97,7 @@ func main() {
troll.NewModule(), troll.NewModule(),
sociaty.NewModule(), sociaty.NewModule(),
horoscope.NewModule(), horoscope.NewModule(),
pay.NewModule(),
) )
} }