|
@@ -55,6 +55,8 @@ type SandboxClassifyItems struct {
|
|
|
Level int `description:"层级"`
|
|
|
Sort int `description:"排序字段,越小越靠前,默认值:10"`
|
|
|
SandboxId int `description:"沙盘id"`
|
|
|
+ ChartPermissionId int `description:"品种id"`
|
|
|
+ ChartPermissionName string `description:"品种名称"`
|
|
|
Children []*SandboxClassifyItems
|
|
|
}
|
|
|
|
|
@@ -99,7 +101,7 @@ func GetSandboxClassifyById(classifyId int) (item *SandboxClassify, err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-func EditSandboxClassify(classifyId ,ChartPermissionId int, sandboxClassifyName, ChartPermissionName string) (err error) {
|
|
|
+func EditSandboxClassify(classifyId, ChartPermissionId int, sandboxClassifyName, ChartPermissionName string) (err error) {
|
|
|
o := orm.NewOrmUsingDB("data")
|
|
|
sql := `UPDATE sandbox_classify SET sandbox_classify_name=?,chart_permission_id = ?, chart_permission_name = ?, modify_time=NOW() WHERE sandbox_classify_id=? `
|
|
|
_, err = o.Raw(sql, sandboxClassifyName, ChartPermissionId, ChartPermissionName, classifyId).Exec()
|
|
@@ -207,6 +209,8 @@ func GetSandboxClassifyAndInfoByParentId(parentId int) (items []*SandboxClassify
|
|
|
sys_user_real_name AS sys_user_name,
|
|
|
sort,
|
|
|
level,
|
|
|
+ chart_permission_id,
|
|
|
+ chart_permission_name,
|
|
|
0 AS is_delete
|
|
|
FROM
|
|
|
sandbox_classify
|
|
@@ -223,6 +227,8 @@ SELECT
|
|
|
sys_user_name,
|
|
|
sort,
|
|
|
0 AS level,
|
|
|
+ chart_permission_id,
|
|
|
+ chart_permission_name,
|
|
|
is_delete
|
|
|
FROM
|
|
|
sandbox
|