浏览代码

修复图片列表查询

kobe6258 7 月之前
父节点
当前提交
45f7c4c606
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      controllers/image.go

+ 2 - 3
controllers/image.go

@@ -285,14 +285,13 @@ func (this *ImageController) ImageList() {
 	if KeyWord != "" {
 		condition += " AND img_name like '%" + KeyWord + "%'"
 	}
-	var permissionPars []interface{}
 	if permissionIds != "" {
 		permissionArr := strings.Split(permissionIds, ",")
 		for _, permissionId := range permissionArr {
 			perId, _ := strconv.Atoi(permissionId)
-			permissionPars = append(permissionPars, perId)
+			pars = append(pars, perId)
 		}
-		condition += " AND permission_id in (" + utils.GetOrmReplaceHolder(len(permissionPars)) + ")"
+		condition += " AND permission_id in (" + utils.GetOrmReplaceHolder(len(pars)) + ")"
 	}
 
 	sortCondition := " ORDER BY created_time "