This commit is contained in:
苏尹岚
2021-01-26 15:11:14 +08:00
parent 5f4d0bcad3
commit f6d1d0a272
2 changed files with 1 additions and 3 deletions

View File

@@ -2798,10 +2798,8 @@ func UpdateVendorCategoryMap(ctx *jxcontext.Context, ID int, vendorCategoryMap *
}
if vendorCategoryMap.CategoryID != 0 {
valid["categoryID"] = vendorCategoryMap.CategoryID
fmt.Println("111111", utils.Format4Output(vendorCategoryMap2, false))
if !isDelete {
storeCatMaps, _ := dao.GetVendorCategoryMap(db, -1, 0, vendorCategoryMap2.VendorID, vendorCategoryMap2.VendorOrgCode, vendorCategoryMap.CategoryID)
fmt.Println("2222222", utils.Format4Output(storeCatMaps, false))
if len(storeCatMaps) > 0 {
for _, v := range storeCatMaps {
if v.ID != ID {

View File

@@ -468,7 +468,7 @@ func GetVendorCategoryMap(db *DaoDB, parentID, level, vendorID int, vendorOrgCod
sqlParams = append(sqlParams, vendorOrgCode)
}
if categoryID > 0 {
sql += " AND a.categoryID = ?"
sql += " AND a.category_id = ?"
sqlParams = append(sqlParams, categoryID)
}
err = GetRows(db, &vendorMaps, sql, sqlParams)