refactor(listing): 卖家发布定价改用整数分与基点
This commit is contained in:
@@ -148,9 +148,11 @@ type PublishOptionGroup struct {
|
||||
}
|
||||
|
||||
type PublishQuantityItem struct {
|
||||
Key string `json:"key"`
|
||||
Label string `json:"label"`
|
||||
Price string `json:"price"`
|
||||
Key string `json:"key"`
|
||||
Label string `json:"label"`
|
||||
Price string `json:"price"`
|
||||
// PriceCent 是规范化单价(分);大于 0 时优先于 Price 字符串。
|
||||
PriceCent int64 `json:"price_cent,omitempty"`
|
||||
Placeholder string `json:"placeholder,omitempty"`
|
||||
}
|
||||
|
||||
@@ -169,7 +171,9 @@ type PublishPriceConfig struct {
|
||||
}
|
||||
|
||||
type PublishDepositRecommend struct {
|
||||
BaseAmount float64 `json:"base_amount"`
|
||||
BaseAmount float64 `json:"base_amount"`
|
||||
// BaseAmountCent 是规范化基础押金(分);大于 0 时优先于 BaseAmount。
|
||||
BaseAmountCent int64 `json:"base_amount_cent,omitempty"`
|
||||
SkinGroupRules []PublishDepositSkinGroupRule `json:"skin_group_rules"`
|
||||
}
|
||||
|
||||
@@ -177,6 +181,8 @@ type PublishDepositSkinGroupRule struct {
|
||||
GroupKey string `json:"group_key"`
|
||||
Label string `json:"label"`
|
||||
AmountPerItem float64 `json:"amount_per_item"`
|
||||
// AmountPerItemCent 是规范化单件押金(分);大于 0 时优先于 AmountPerItem。
|
||||
AmountPerItemCent int64 `json:"amount_per_item_cent,omitempty"`
|
||||
}
|
||||
|
||||
type PublishRatioConfig struct {
|
||||
@@ -188,6 +194,8 @@ type PublishRatioConfig struct {
|
||||
type PublishInsuranceBaseRatio struct {
|
||||
Insurance string `json:"insurance"`
|
||||
Ratio float64 `json:"ratio"`
|
||||
// RatioBPS 是规范化的基准比例(基点,1% = 100 bps);大于 0 时优先于 Ratio。
|
||||
RatioBPS int64 `json:"ratio_bps,omitempty"`
|
||||
}
|
||||
|
||||
type PublishRatioConfigItem struct {
|
||||
@@ -196,11 +204,15 @@ type PublishRatioConfigItem struct {
|
||||
Kind string `json:"kind"`
|
||||
GroupKey string `json:"group_key,omitempty"`
|
||||
MissingPenalty float64 `json:"missing_penalty"`
|
||||
// MissingPenaltyBPS 是规范化的缺失扣减比例(基点);大于 0 时优先于 MissingPenalty。
|
||||
MissingPenaltyBPS int64 `json:"missing_penalty_bps,omitempty"`
|
||||
}
|
||||
|
||||
type PublishCoinCorrection struct {
|
||||
ThresholdM float64 `json:"threshold_m"`
|
||||
Correction float64 `json:"correction"`
|
||||
// CorrectionBPS 是规范化的哈夫币修正比例(基点);大于 0 时优先于 Correction。
|
||||
CorrectionBPS int64 `json:"correction_bps,omitempty"`
|
||||
}
|
||||
|
||||
type PublishSalePriceConfig struct {
|
||||
@@ -212,10 +224,14 @@ type PublishSaleFixedMarkupRule struct {
|
||||
MinM float64 `json:"min_m"`
|
||||
MaxM float64 `json:"max_m"`
|
||||
MarkupAmount float64 `json:"markup_amount"`
|
||||
// MarkupAmountCent 是规范化的固定加价(分);大于 0 时优先于 MarkupAmount。
|
||||
MarkupAmountCent int64 `json:"markup_amount_cent,omitempty"`
|
||||
}
|
||||
|
||||
type PublishSaleRatioAdjustmentRule struct {
|
||||
MinM float64 `json:"min_m"`
|
||||
MaxM float64 `json:"max_m,omitempty"`
|
||||
RatioSubtract float64 `json:"ratio_subtract"`
|
||||
// RatioSubtractBPS 是规范化的比例修正(基点);大于 0 时优先于 RatioSubtract。
|
||||
RatioSubtractBPS int64 `json:"ratio_subtract_bps,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user