master
howell 4 years ago
parent e12c55a929
commit 10aec789de

@ -132,14 +132,14 @@ func SyncPageData(page, size uint, brand string, categories []RecookJCookCategor
continue
}
var second goods.RecookGoodsCategoryModel
fmt.Println(rCate)
tx.First(&second, "name = ? AND parent_id <> 0", rCate)
fmt.Println(rCate, "===============")
tx.Where("name = ? AND parent_id <> 0", rCate).First(&second)
if second.Id == 0 {
continue
}
var first goods.RecookGoodsCategoryModel
tx.First(&first, "id = ?", second.ParentId)
tx.Where("id = ?", second.ParentId).First(&first)
if first.Id == 0 {
continue
}

Loading…
Cancel
Save