Merge remote-tracking branch 'origin/mark' into yonghui

This commit is contained in:
苏尹岚
2019-12-13 16:55:10 +08:00
2 changed files with 53 additions and 51 deletions

View File

@@ -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 {

View File

@@ -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())
}