feat:完善项目信息

This commit is contained in:
henry
2022-01-13 10:14:02 +08:00
parent a15f0fff2b
commit e3909112ce
9 changed files with 40 additions and 36 deletions

View File

@ -46,10 +46,10 @@ func (c *Industry) tree(src []*model2.SysIndustry, parentID uint64) []*IndustryI
// Instance 首页信息
func (c *Industry) Instance() ([]*IndustryInfo, error) {
mSysIndustry := new(model.SysIndustry)
mSysIndustry := model.NewSysIndustry()
out := make([]*model2.SysIndustry, 0)
if err := model2.ScanFields(mSysIndustry.SysIndustry, out, []string{"id", "parent_id", "name"}); err != nil {
if err := model2.ScanFields(mSysIndustry.SysIndustry, &out, []string{"id", "parent_id", "name"}); err != nil {
return nil, err
}
return c.tree(out, 0), nil