解决冲突

This commit is contained in:
苏尹岚
2020-09-27 09:52:07 +08:00
7 changed files with 79 additions and 13 deletions

View File

@@ -138,16 +138,16 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
if err = dao.GetRows(db, &stores, sql, model.VendorIDJD, utils.DefaultTimeValue, storeID); err == nil {
for _, store := range stores {
a := getAPI(store.VendorOrgCode)
phone := ""
if store.MarketManPhone != "" {
phone = store.MarketManPhone
} else {
phone = model.VendorStoreTel
}
// phone := ""
// if store.MarketManPhone != "" {
// phone = store.MarketManPhone
// } else {
// phone = model.VendorStoreTel
// }
storeParams := &jdapi.OpStoreParams{
StationNo: store.VendorStoreID,
Operator: userName,
Phone: phone,
Phone: store.Tel1,
Mobile: store.Tel1,
}
if store.SyncStatus&model.SyncFlagDeletedMask == 0 {

View File

@@ -246,7 +246,7 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
syncType = "更新商品"
}
for i, storeSku := range storeSkuList {
isNeedUpdatePrice := isCreate //storeSku.SkuSyncStatus&(model.SyncFlagPriceMask|model.SyncFlagNewMask) != 0
// isNeedUpdatePrice := isCreate //storeSku.SkuSyncStatus&(model.SyncFlagPriceMask|model.SyncFlagNewMask) != 0
foodData := make(map[string]interface{})
foodDataList[i] = foodData
foodData[mtwmapi.KeyAppFoodCode] = utils.Int2Str(storeSku.SkuID)
@@ -258,9 +258,9 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
foodData["skus"] = skus
foodData["name"] = utils.LimitUTF8StringLen(utils.FilterEmoji(storeSku.SkuName), mtwmapi.MaxSkuNameCharCount)
foodData["description"] = storeSku.Comment
if isNeedUpdatePrice {
foodData["price"] = jxutils.IntPrice2Standard(storeSku.VendorPrice)
}
// if isNeedUpdatePrice {
foodData["price"] = jxutils.IntPrice2Standard(storeSku.VendorPrice)
// }
if storeSku.MinOrderCount != 0 {
foodData["min_order_count"] = storeSku.MinOrderCount
} else {