1
This commit is contained in:
@@ -967,6 +967,7 @@ func UpdateSkuName(ctx *jxcontext.Context, nameID int, payload map[string]interf
|
||||
valid = utils.RemoveGeneralMapKeys(valid, model.FieldSpecQuality, model.FieldSpecUnit)
|
||||
_, hasPlaces := payload["places"]
|
||||
flag := updateOrCreateSkuVendorCategoryMap(db, ctx, nameID, payload, nil, false)
|
||||
globals.SugarLogger.Debugf("-------updateOrCreateSkuVendorCategoryMap := %s", utils.Format4Output(payload, false))
|
||||
if len(valid) > 0 || hasPlaces || flag {
|
||||
if valid["Upc"] != nil {
|
||||
//if upc, _ := valid["Upc"].(string); upc == "" {
|
||||
@@ -1287,7 +1288,6 @@ func updateOrCreateSkuVendorCategoryMap(db *dao.DaoDB, ctx *jxcontext.Context, n
|
||||
}
|
||||
}
|
||||
|
||||
globals.SugarLogger.Debugf("------jdCategoryId := %s", jdCategoryId)
|
||||
if payload["jdsCategoryID"] != nil {
|
||||
value, ok := payload["jdCategoryID"].(string)
|
||||
if ok && value != "" && value != "0" {
|
||||
@@ -1387,7 +1387,6 @@ func updateOrCreateSkuVendorCategoryMap(db *dao.DaoDB, ctx *jxcontext.Context, n
|
||||
updateOrCreate(model.VendorIDJD, nameID, jdCategoryId)
|
||||
flag = true
|
||||
payload["jdCategoryID"] = jdCategoryId
|
||||
globals.SugarLogger.Debugf("------jdCategoryId := %s", jdCategoryId)
|
||||
}
|
||||
if jxCategoryID != 0 && jxCategoryID != 291 {
|
||||
dao.ExecuteSQL(dao.GetDB(), `UPDATE sku_name SET category_id = ? WHERE id = ?`, []interface{}{jxCategoryID, nameID}...)
|
||||
@@ -1395,6 +1394,7 @@ func updateOrCreateSkuVendorCategoryMap(db *dao.DaoDB, ctx *jxcontext.Context, n
|
||||
}
|
||||
|
||||
}
|
||||
globals.SugarLogger.Debugf("---------payload := %s", utils.Format4Output(payload, false))
|
||||
return flag
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user