fix: 修复商品购买和服务相关逻辑问题
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed

This commit is contained in:
xinian
2026-03-27 12:56:29 +08:00
committed by cnb
parent f6745bd2a6
commit 40411ba84b
10 changed files with 27 additions and 147 deletions

View File

@@ -24,12 +24,12 @@ type ShopConfig struct {
JindouPrice int32 `gorm:"not null;default:0;comment:'金豆价格'" json:"jindou_price" description:"金豆价格"`
// 库存信息
Stock uint32 `gorm:"not null;default:0;comment:'商品库存数量0表示无限库存'" json:"stock" description:"库存数量"`
//Stock uint32 `gorm:"not null;default:0;comment:'商品库存数量0表示无限库存'" json:"stock" description:"库存数量"`
// 限购信息
QuotaLimit uint32 `gorm:"not null;default:0;comment:'单位时间内的限购数量'" json:"quota_limit" description:"限购数量"`
//限购类型
QuotaType uint32 `gorm:"not null;default:0;comment:'限购类型(0-不限购 1-每日限购 2-每周限购 3-每月限购)'" json:"quota_type" description:"限购类型"`
// // 限购信息
// QuotaLimit uint32 `gorm:"not null;default:0;comment:'单位时间内的限购数量'" json:"quota_limit" description:"限购数量"`
// //限购类型
// QuotaType uint32 `gorm:"not null;default:0;comment:'限购类型(0-不限购 1-每日限购 2-每周限购 3-每月限购)'" json:"quota_type" description:"限购类型"`
}
// -------------------------- 核心配套方法(遵循项目规范)--------------------------

View File

@@ -20,9 +20,9 @@ func NewTalkConfigService() *TalkConfigService {
}
func (s *TalkConfigService) GetCache(flag int) model.MineralCollectionConfig {
func (s *TalkConfigService) GetCache(flag int) *model.MineralCollectionConfig {
var config model.MineralCollectionConfig
var config *model.MineralCollectionConfig
dbm_enable(s.Model).Where("type", flag).Scan(&config)
return config