feat: 添加金豆消费记录功能
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
添加金豆消费记录表和相关服务,用于记录用户金豆消耗明细 在购买逻辑中预留记录消费的注释位置
This commit is contained in:
21
modules/player/service/gold_log.go
Normal file
21
modules/player/service/gold_log.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"blazing/cool"
|
||||
"blazing/modules/player/model"
|
||||
)
|
||||
|
||||
type GoldService struct {
|
||||
BaseService
|
||||
}
|
||||
|
||||
func NewGoldService(id uint32) *GoldService {
|
||||
return &GoldService{
|
||||
|
||||
BaseService: BaseService{userid: id,
|
||||
|
||||
Service: &cool.Service{Model: model.NewGoldBeanConsume()},
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
@@ -22,6 +22,7 @@ type UserService struct {
|
||||
Cdk *CdkService //cdk
|
||||
Friend *FriendService //好友
|
||||
Egg *EggService //孵化
|
||||
GoldLog *GoldService
|
||||
}
|
||||
|
||||
func NewUserService(id uint32) *UserService {
|
||||
@@ -39,6 +40,7 @@ func NewUserService(id uint32) *UserService {
|
||||
Cdk: NewCdkService(id),
|
||||
Friend: NewFriendService(id),
|
||||
Egg: NewEggService(id),
|
||||
GoldLog: NewGoldService(id),
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user