feat: 添加金豆消费记录功能
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed

在购买金豆商品成功后记录消费信息,并简化消费记录模型字段
This commit is contained in:
xinian
2026-02-23 07:52:36 +08:00
committed by cnb
parent 75cfc7bcb1
commit c78e8e13c3
3 changed files with 17 additions and 3 deletions

View File

@@ -9,6 +9,21 @@ type GoldService struct {
BaseService
}
func (s *GoldService) Log(pid, count uint32) {
if cool.Config.ServerInfo.IsVip != 0 {
return
}
record := &model.GoldBeanConsume{
PlayerID: uint64(s.userid),
ConsumeNum: count,
BizID: pid,
}
return
}
func NewGoldService(id uint32) *GoldService {
return &GoldService{