浏览代码

阅读记录

kobe6258 2 周之前
父节点
当前提交
6ee3320249
共有 1 个文件被更改,包括 1 次插入1 次删除
  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 {
 	if len(permissionIds) == 0 {
 		return
 		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)
 	_, err = o.Raw(sql, permissionIds).QueryRows(&classifyIds)
 	return
 	return
 }
 }