|
@@ -188,6 +188,8 @@ type PermissionLookItem struct {
|
|
|
Points float64 `description:"研选扣点包点数"`
|
|
|
ParentId int `description:"父级权限id"`
|
|
|
IsPublic int `description:"是否是公有权限1:公有权限,0私有权限"`
|
|
|
+ ShowInput bool `description:"是否包含输入框"`
|
|
|
+ ChartContent string `description:"权限申请时下面的框点数回显"`
|
|
|
Child []*PermissionLookItem `description:"子权限"`
|
|
|
}
|
|
|
|
|
@@ -199,6 +201,13 @@ func GetPermissionLookItems(productId int, classifyName string) (items []*Permis
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+func GetPermissionLookItems2(productId int, classifyName string) (items []*PermissionLookItem, err error) {
|
|
|
+ o := orm.NewOrm()
|
|
|
+ sql := ` SELECT * FROM chart_permission WHERE enabled=1 AND product_id=? AND classify_name=? AND parent_id>0 AND permission_type!=2 ORDER BY sort ASC `
|
|
|
+ _, err = o.Raw(sql, productId, classifyName).QueryRows(&items)
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
func GetPermissionLookItemsByProductId(productId int) (items []*PermissionLookItem, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := ` SELECT * FROM chart_permission WHERE enabled=1 AND product_id=? ORDER BY sort ASC `
|