hongze 7 mēneši atpakaļ
vecāks
revīzija
b480f61cf1

+ 0 - 1
controllers/sys_role.go

@@ -246,7 +246,6 @@ func (this *SysRoleController) ListSysRole() {
 		br.ErrMsg = "获取失败,Err:" + err.Error()
 		return
 	}
-
 	list, err := system.GetSysRoleList(condition, pars, startSize, pageSize)
 	if err != nil {
 		br.Msg = "获取失败"

+ 1 - 1
models/data_manage/edb_classify.go

@@ -262,7 +262,7 @@ type EdbClassifyItems struct {
 	EdbCode          string
 	EdbType          int                    `description:"指标类型:1:基础指标,2:计算指标"`
 	Children         []*EdbClassifyItems    `gorm:"-"`
-	Button           EdbClassifyItemsButton `description:"操作权限"`
+	Button           EdbClassifyItemsButton `gorm:"-" description:"操作权限"`
 	IsJoinPermission int                    `description:"是否加入权限管控,0:不加入;1:加入;默认:0"`
 	HaveOperaAuth    bool                   `description:"是否有数据权限"`
 }

+ 2 - 1
models/system/sys_role.go

@@ -102,7 +102,7 @@ func GetSysRoleListCount(condition string, pars []interface{}) (count int, err e
 		sql += condition
 	}
 	//err = o.Raw(sql, pars).QueryRow(&count)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars).Scan(&count).Error
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Scan(&count).Error
 	return
 }
 
@@ -116,6 +116,7 @@ func GetSysRoleList(condition string, pars []interface{}, startSize, pageSize in
 	//_, err = o.Raw(sql, pars...).QueryRows(&items)
 	pars = append(pars, startSize)
 	pars = append(pars, pageSize)
+
 	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&items).Error
 	return
 }