添加获取所有分类以及分类按层级显示的逻辑
This commit is contained in:
1 parent
fc259ba274
commit
e42a4549e9
4 files changed
+60
-6
No files matched your search
@@ -36,6 +36,19 @@ func (e *Category) GetPage(c *dto.CategoryGetPageReq, p *actions.DataPermission,
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetPageAll 获取Category所有
|
||||
func (e *Category) GetPageAll(list *[]models.Category) error {
|
||||
var err error
|
||||
var data models.Category
|
||||
|
||||
err = e.Orm.Model(&data).Find(list).Limit(-1).Offset(-1).Error
|
||||
if err != nil {
|
||||
e.Log.Errorf("CategoryService GetPageAll error:%s \r\n", err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Get 获取Category对象
|
||||
func (e *Category) Get(d *dto.CategoryGetReq, p *actions.DataPermission, model *models.Category) error {
|
||||
var data models.Category
|
||||
|
||||
Reference in new issue
Block a user