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

This commit is contained in:
苏尹岚
2020-01-09 10:32:28 +08:00
13 changed files with 132 additions and 52 deletions

View File

@@ -1042,7 +1042,7 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
err = AddEventDetail(model.OperateAdd, v.RealSkuID, model.ThingTypeSku, storeID, ctx.GetTrackInfo(), "", "")
setStoreSkuBindStatus(skuBind, model.SyncFlagNewMask)
dao.WrapAddIDCULDEntity(skuBind, userName)
globals.SugarLogger.Debug(utils.Format4Output(skuBind, false))
// globals.SugarLogger.Debug(utils.Format4Output(skuBind, false))
if deletedSku := dao.GetDeletedStoreSkuBind(db, skuBind.StoreID, skuBind.SkuID); deletedSku == nil {
if err = dao.CreateEntity(db, skuBind); err != nil {
dao.Rollback(db)
@@ -1094,7 +1094,7 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
setStoreSkuBindStatus(skuBind, model.SyncFlagSaleMask)
updateFieldMap[model.FieldStatus] = 1
}
if skuBindInfo.UnitPrice != 0 && isCanChangePrice { // 这里是否需要加此条件限制
if skuBindInfo.UnitPrice != 0 && skuBind.UnitPrice != unitPrice && isCanChangePrice { // 这里是否需要加此条件限制
skuBind.UnitPrice = unitPrice
skuBind.Price = jxutils.CaculateSkuPrice(unitPrice, v.SpecQuality, v.SpecUnit, v.SkuNameUnit)
skuBind.JxPrice = jxutils.CaculatePriceByPricePack(storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage), skuBind.Price)