This commit is contained in:
邹宗楠
2023-03-27 18:16:12 +08:00
parent 1c2785dd87
commit b14e7640f2
4 changed files with 22 additions and 6 deletions

View File

@@ -1262,12 +1262,20 @@ func updateOrCreateSkuVendorCategoryMap(db *dao.DaoDB, ctx *jxcontext.Context, n
if payload["mtwmCategoryID"] != nil {
mtwmCategoryID = payload["mtwmCategoryID"].(string)
}
if payload["categoryID2"] != nil {
if payload["categoryID2"] != nil && !utils.IsNil(payload["categoryID2"]) {
jxCategoryIDNumber, err := payload["categoryID2"].(json.Number).Int64()
if err != nil {
return false
}
jxCategoryID = int(jxCategoryIDNumber)
} else if payload["categoryID"] != nil && !utils.IsNil(payload["categoryID"]) {
jxCategoryIDNumber, err := payload["categoryID"].(json.Number).Int64()
if err != nil {
return false
}
jxCategoryID = int(jxCategoryIDNumber)
} else {
jxCategoryID = 0
}
if jdCategoryId != "" {

View File

@@ -1762,6 +1762,7 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor
panic(r)
}
}()
if isStoreMapNeedSync(vendorID, valid) { // 对于store vendor map只有Status改变才需要同步到厂商
num, err = dao.UpdateEntityLogicallyAndUpdateSyncStatus(db, storeMap, valid, userName, map[string]interface{}{
model.FieldStoreID: storeID,