feat(shop): 添加商品限购功能并优化购买逻辑 - 修改购买黄金商品接口,添加商品配额检查功能 - 新增月、周、日三种限购类型检查逻辑 - 当商品超出库存或达到购买限制时返回相应错误码 - 移除gold_log表中PlayerID字段的唯一索引约束 - 修复GoldService中的Cheak方法实现,支持多种时间维度限购检查 ```
This commit is contained in:
@@ -14,7 +14,7 @@ const (
|
||||
type GoldBeanConsume struct {
|
||||
*cool.Model
|
||||
|
||||
PlayerID uint64 `gorm:"not null;uniqueIndex;index:idx_pet_by_player_id;comment:'所属玩家ID'" json:"player_id"`
|
||||
PlayerID uint64 `gorm:"not null;index:idx_pet_by_player_id;comment:'所属玩家ID'" json:"player_id"`
|
||||
ConsumeNum uint32 `gorm:"not null;default:0;comment:'消费数量'" json:"consume_num" description:"消费数量"`
|
||||
BizID uint32 `gorm:"not null;default:0;comment:'关联业务ID(如道具ID/扭蛋池ID,无则填0)'" json:"biz_id" description:"关联业务ID"`
|
||||
///消费年份
|
||||
|
||||
Reference in New Issue
Block a user