Kaynağa Gözat

阅读记录

kobe6258 2 hafta önce
ebeveyn
işleme
6ee3320249
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      models/permission.go

+ 1 - 1
models/permission.go

@@ -98,7 +98,7 @@ func GetClassifyIdByPermissionIds(permissionIds []int) (classifyIds []int, err e
 	if len(permissionIds) == 0 {
 		return
 	}
-	sql := `SELECT distinct classify_id FROM permission_classify_mapping  where permission_id in (?) order by permission_id asc`
+	sql := `SELECT distinct classify_id FROM permission_classify_mapping  where permission_id in (` + utils.GetOrmReplaceHolder(len(permissionIds)) + `) order by permission_id asc`
 	_, err = o.Raw(sql, permissionIds).QueryRows(&classifyIds)
 	return
 }