This commit is contained in:
richboo111
2023-09-01 16:23:24 +08:00
parent 6ee80aa437
commit 22ff84a59d
2 changed files with 6 additions and 0 deletions

View File

@@ -501,7 +501,9 @@ func SwitchAttr(apiObj *mtwmapi.API, vendorStoreID string, vendorCatID int64, na
attrValues []CommonAttrValue
)
if nameID != 0 { //是否为纯创建
globals.SugarLogger.Debugf("SwitchAttr nameID=%d", nameID)
if tData, err := dao.GetSkuNames(db, []int{nameID}, nil, "", false); err == nil && len(tData) > 0 {
globals.SugarLogger.Debugf("SwitchAttr tData=%s", utils.Format4Output(tData, false))
if tData[0].MtAttribute != "[]" && tData[0].MtAttribute != "{}" && tData[0].MtAttribute != "" {
return tData[0].MtAttribute
}