GetStoresSkusNew没有正确处理PayPercentage

This commit is contained in:
gazebo
2019-11-17 21:30:44 +08:00
parent d0d5e1752d
commit 262b5da3c5

View File

@@ -88,15 +88,14 @@ type StoreSkuNameExt struct {
StoreName string `json:"storeName"`
model.SkuName
UnitPrice int `json:"unitPrice"`
Skus []map[string]interface{} `orm:"-" json:"skus2,omitempty"`
Skus2 []*StoreSkuExt `orm:"-" json:"skus,omitempty"`
SkusStr string `json:"-"`
PayPercentage int `json:"-"`
UnitPrice int `json:"unitPrice"`
Skus []map[string]interface{} `orm:"-" json:"skus2,omitempty"`
Skus2 []*StoreSkuExt `orm:"-" json:"skus,omitempty"`
SkusStr string `json:"-"`
PendingOpType int8 `json:"pendingOpType"` // 取值同 StoreOpRequest.Type
PendingUnitPrice int `json:"pendingUnitPrice"` // 这个是待审核的价格申请
PayPercentage int `json:"-"`
}
// GetStoreSkus用
@@ -167,6 +166,7 @@ type tGetStoresSkusInfo struct {
StoreName string
model.SkuName
PayPercentage int `json:"-"`
StoreSkuExt
}
@@ -469,10 +469,11 @@ func GetStoresSkusNew(ctx *jxcontext.Context, storeIDs, skuIDs []int, isFocus bo
index := jxutils.Combine2Int(v.StoreID, v.ID)
if isBySku || storeNameMap[index] == nil {
storeName = &StoreSkuNameExt{
StoreID: v.StoreID,
StoreName: v.StoreName,
SkuName: v.SkuName,
UnitPrice: v.UnitPrice,
StoreID: v.StoreID,
StoreName: v.StoreName,
SkuName: v.SkuName,
UnitPrice: v.UnitPrice,
PayPercentage: v.PayPercentage,
}
if !isBySku {
storeNameMap[index] = storeName