Merge remote-tracking branch 'origin/mark' into yonghui
This commit is contained in:
@@ -138,7 +138,9 @@ func ActStoreSkuParam2Model(ctx *jxcontext.Context, db *dao.DaoDB, act *model.Ac
|
||||
for _, vendorID := range vendorIDs {
|
||||
storeDetail, err2 := dao.GetStoreDetail(db, storeID, vendorID)
|
||||
if err = err2; err == nil {
|
||||
if storeDetail.IsSync != 0 && storeDetail.Status != model.StoreStatusDisabled && storeDetail.VendorStatus != model.StoreStatusDisabled {
|
||||
if storeDetail.IsSync != 0 {
|
||||
if act.Type == model.ActSkuFake ||
|
||||
storeDetail.Status != model.StoreStatusDisabled && storeDetail.VendorStatus != model.StoreStatusDisabled {
|
||||
for _, v := range oneStoreSkuParam {
|
||||
validVendorMap[vendorID] = 1
|
||||
validSkuMap[v.SkuID] = 1
|
||||
@@ -149,7 +151,6 @@ func ActStoreSkuParam2Model(ctx *jxcontext.Context, db *dao.DaoDB, act *model.Ac
|
||||
SkuID: v.SkuID,
|
||||
VendorID: vendorID,
|
||||
}
|
||||
v.OriginalPrice = actSkuMap.VendorPrice
|
||||
storeSkuInfo := storeSkuMap[jxutils.Combine2Int(v.StoreID, v.SkuID)]
|
||||
if storeSkuInfo != nil {
|
||||
jxPrice := storeSkuInfo.Price
|
||||
@@ -195,6 +196,7 @@ func ActStoreSkuParam2Model(ctx *jxcontext.Context, db *dao.DaoDB, act *model.Ac
|
||||
}
|
||||
wholeValidVendorMap[vendorID] = 1
|
||||
}
|
||||
}
|
||||
} else if !dao.IsNoRowsError(err) {
|
||||
return nil, nil, nil, err
|
||||
} else {
|
||||
|
||||
@@ -168,9 +168,9 @@ func skuInfo2Param(ctx *jxcontext.Context, sku *dao.StoreSkuSyncInfo) (param *jd
|
||||
Images: jxutils.BatchString2Slice(sku.Img, sku.Img2),
|
||||
}
|
||||
// 不为份的SKU,如果没有设置upc,自动生成一个假的
|
||||
// if sku.Unit != model.SpecialUnit && param.Upc == "" {
|
||||
// param.Upc = jxutils.GenFakeUPC(sku.SkuID)
|
||||
// }
|
||||
if sku.Unit != model.SpecialUnit && param.Upc == "" {
|
||||
param.Upc = jxutils.GenFakeUPC(sku.SkuID)
|
||||
}
|
||||
if param.CategoryID == 0 {
|
||||
param.CategoryID = int64(getDefJdCategoryID())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user