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:
@@ -55,12 +55,6 @@ func (s *BaseSysUserService) SetdepartmentId(userId, departmentId uint32) (res *
|
||||
|
||||
// 单位是分
|
||||
func (s *BaseSysUserService) UpdateGold(userId uint32, gold int64) {
|
||||
// updateData := g.Map{
|
||||
// "views": &gdb.Counter{
|
||||
// Field: "goldbean",
|
||||
// Value: 1,
|
||||
// },
|
||||
// }
|
||||
|
||||
if cool.Config.ServerInfo.IsVip != 0 {
|
||||
cool.Logger.Info(context.TODO(), "测试服不操作金币")
|
||||
@@ -68,10 +62,6 @@ func (s *BaseSysUserService) UpdateGold(userId uint32, gold int64) {
|
||||
}
|
||||
m := cool.DBM(s.Model).Where("id", userId)
|
||||
m.Increment("goldbean", gold)
|
||||
// // UPDATE `article` SET `views`=`views`+1 WHERE `id`=1
|
||||
// result, err := db.Update("article", updateData, "id", 1)
|
||||
|
||||
//res.GoldBean, _ = alpacadecimal.NewFromFloat(float64(gold)).Div(alpacadecimal.NewFromFloat(100)).Float64()
|
||||
|
||||
}
|
||||
func (s *BaseSysUserService) GetGold(userId uint) (res int64) {
|
||||
|
||||
Reference in New Issue
Block a user