```
feat(item): 实现新的金豆商品购买功能 - 移除原有的GoldProductMap配置映射,改用新的商店服务查询商品信息 - 添加购买类型区分(豆子购买和金豆购买)支持 - 集成新的商店服务接口,通过productId查询商品配置 - 完善购买逻辑,支持不同类型的货币扣减和余额更新 - 更新数据结构定义,
This commit is contained in:
@@ -14,8 +14,16 @@ func NewShopService() *ShopService {
|
||||
&cool.Service{
|
||||
Model: model.NewShopConfig(),
|
||||
PageQueryOp: &cool.QueryOp{
|
||||
KeyWordField: []string{"desc"},
|
||||
KeyWordField: []string{"desc", "product_name"},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
func (s *ShopService) Get(product_id uint32) *model.ShopConfig {
|
||||
m := dbm(s.Model).Where("product_id", product_id)
|
||||
var tt *model.ShopConfig
|
||||
m.Scan(&tt)
|
||||
|
||||
return tt
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user