feat(item_buy): 优化购买逻辑并添加库存限制功能 - 将变量名 is 改为 ok,提高代码可读性 - 移除未使用的变量 addSuccess - 重构购买成功逻辑,确保物品添加成功后才扣减金币 - 在 talk.go 中修改判断条件,使用 Limit 字段而非 Type 字段 - 在 user_talk.go 中添加 Limit 字段用于限制数量配置 ```
This commit is contained in:
@@ -15,6 +15,8 @@ type MineralCollectionConfig struct {
|
||||
// MapID 矿产所在地图ID
|
||||
MapID uint32 `gorm:"column:map_id;not null;index:idx_mineral_collection_config_map_id;comment:矿产所在地图ID" json:"map_id"`
|
||||
//uint32 `gorm:"not null;default:0;comment:'限购类型( 0-每日限购 1-每周限购 2-每月限购)'" json:"quota_type" description:"限购类型"`
|
||||
Limit uint32 `gorm:"column:limit;default:0;comment:限制数量" json:"limit"`
|
||||
|
||||
Type uint32 `gorm:"column:type;not null;index:idx_mineral_collection_config_type;comment:类型" json:"type"`
|
||||
|
||||
// DailyCollectCount 每日可采集次数
|
||||
|
||||
Reference in New Issue
Block a user