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