|
@@ -67,7 +67,7 @@ func EditHelpDocClassify(classifyId int, HelpDocClassifyName string) (err error)
|
|
|
func GetHelpDocClassifyByParentId(parentId int, keyWord string) (items []HelpDocClassifyItems, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := ``
|
|
|
- if keyWord != ""{
|
|
|
+ if keyWord != "" {
|
|
|
sql = ` SELECT * FROM help_doc_classify WHERE parent_id=? AND (classify_name LIKE '%` + keyWord + `%' ) order by sort asc,classify_id asc`
|
|
|
} else {
|
|
|
sql = ` SELECT * FROM help_doc_classify WHERE parent_id=? order by sort asc,classify_id asc`
|
|
@@ -80,7 +80,7 @@ func GetHelpDocClassifyByParentId(parentId int, keyWord string) (items []HelpDoc
|
|
|
func GetHelpDocClassifyAll(keyWord string) (items []*HelpDocClassifyItems, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := ``
|
|
|
- if keyWord != ""{
|
|
|
+ if keyWord != "" {
|
|
|
sql = ` SELECT * FROM help_doc_classify WHERE parent_id<>0 AND (classify_name LIKE '%` + keyWord + `%' ) order by sort asc,classify_id asc`
|
|
|
} else {
|
|
|
sql = ` SELECT * FROM help_doc_classify WHERE parent_id<>0 order by sort asc,classify_id asc`
|
|
@@ -90,19 +90,20 @@ func GetHelpDocClassifyAll(keyWord string) (items []*HelpDocClassifyItems, err e
|
|
|
}
|
|
|
|
|
|
type HelpDocClassifyItems struct {
|
|
|
- ClassifyId int `description:"分类id"`
|
|
|
- ClassifyName string
|
|
|
- ParentId int
|
|
|
- Level int `description:"层级"`
|
|
|
- Sort int `description:"排序字段,越小越靠前,默认值:10"`
|
|
|
- SourceName string `description:"来源名称"`
|
|
|
- SysUserId int `description:"创建人id"`
|
|
|
- SysUserRealName string `description:"创建人姓名"`
|
|
|
- Children []*HelpDocClassifyItems
|
|
|
+ ClassifyId int `description:"分类id"`
|
|
|
+ ClassifyName string
|
|
|
+ ParentId int
|
|
|
+ Level int `description:"层级"`
|
|
|
+ Sort int `description:"排序字段,越小越靠前,默认值:10"`
|
|
|
+ SourceName string `description:"来源名称"`
|
|
|
+ SysUserId int `description:"创建人id"`
|
|
|
+ SysUserRealName string `description:"创建人姓名"`
|
|
|
+ VisibleBusinessIds string
|
|
|
+ Children []*HelpDocClassifyItems
|
|
|
}
|
|
|
|
|
|
type HelpDocClassifyListResp struct {
|
|
|
- AllNodes []*HelpDocClassifyItems
|
|
|
+ AllNodes []*HelpDocClassifyItems
|
|
|
TwoLevelNodes []*HelpDocClassifyItems
|
|
|
}
|
|
|
|
|
@@ -174,7 +175,6 @@ type HelpDocClassifyView struct {
|
|
|
ParentId int `description:"父级id"`
|
|
|
}
|
|
|
|
|
|
-
|
|
|
func EditHelpDocClassifySysUser(classifyId, sysUserId int, HelpDocClassifyName string) (err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := `UPDATE help_doc_classify SET sys_user_id=?,sys_user_real_name=?,modify_time=NOW() WHERE parent_id=? AND level=3 `
|
|
@@ -204,7 +204,6 @@ func DeleteHelpDocClassify(classifyId int) (err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
// MoveClassifyReq 移动分类请求参数
|
|
|
type MoveClassifyReq struct {
|
|
|
ClassifyId int `description:"分类id"`
|
|
@@ -213,7 +212,6 @@ type MoveClassifyReq struct {
|
|
|
NextClassifyId int `description:"下一个兄弟节点分类id"`
|
|
|
}
|
|
|
|
|
|
-
|
|
|
// GetHelpDocClassifyLevel
|
|
|
func GetHelpDocClassifyLevel() (items []*HelpDocClassifyItems, err error) {
|
|
|
o := orm.NewOrm()
|
|
@@ -224,7 +222,7 @@ func GetHelpDocClassifyLevel() (items []*HelpDocClassifyItems, err error) {
|
|
|
}
|
|
|
|
|
|
type EditHelpDocClassifyVisibleReq struct {
|
|
|
- HelpDocClassifyId int `description:"分类id"`
|
|
|
+ HelpDocClassifyId int `description:"分类id"`
|
|
|
VisibleBusinessIds string
|
|
|
}
|
|
|
|