修复(#84): 补齐促销管理API实现文件
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -22,6 +22,46 @@ func (m fakePromoModel) InsertUsage(context.Context, *promo.Usage, ...*gorm.DB)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m fakePromoModel) InsertRule(context.Context, *promo.Rule) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m fakePromoModel) FindRule(context.Context, int64) (*promo.Rule, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (m fakePromoModel) UpdateRule(context.Context, *promo.Rule) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m fakePromoModel) DeleteRule(context.Context, int64) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m fakePromoModel) QueryRuleList(context.Context, promo.RuleFilter) (int64, []*promo.Rule, error) {
|
||||
return 0, nil, nil
|
||||
}
|
||||
|
||||
func (m fakePromoModel) UpsertSubscribePromos(context.Context, []*promo.SubscribePromo) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m fakePromoModel) FindSubscribePromo(context.Context, int64) (*promo.SubscribePromo, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (m fakePromoModel) DeleteSubscribePromo(context.Context, int64) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m fakePromoModel) QuerySubscribePromoList(context.Context, promo.SubscribePromoFilter) (int64, []*promo.SubscribePromo, error) {
|
||||
return 0, nil, nil
|
||||
}
|
||||
|
||||
func (m fakePromoModel) QueryUsageList(context.Context, promo.UsageFilter) (int64, []*promo.Usage, error) {
|
||||
return 0, nil, nil
|
||||
}
|
||||
|
||||
func TestCalculatePurchasePricePromoSkipsPercentDiscount(t *testing.T) {
|
||||
svcCtx := &svc.ServiceContext{
|
||||
DB: &gorm.DB{},
|
||||
|
||||
Reference in New Issue
Block a user