feat:完善信息

This commit is contained in:
henry
2022-01-24 11:28:21 +08:00
parent 26271bfeff
commit 295ca23dcc
8 changed files with 159 additions and 15 deletions

View File

@ -46,17 +46,23 @@ func (c *Project) Instance(tenantID uint64, title string, page, pageSize int) (*
if err != nil {
return nil, err
}
list := make([]*ProjectInstance, 0)
list := make([]*ProjectInstance, len(out))
for _, v := range out {
list = append(list, &ProjectInstance{
for k, v := range out {
list[k] = &ProjectInstance{
ID: v.GetEncodeID(), TenantID: v.GetEncodeTenantID(),
TechnologyProject: v.TechnologyProject, Area: v.FormatBasic(),
})
}
}
return &controller.ReturnPages{Data: list, Count: count}, nil
}
// Shelf 上下架操作
func (c *Project) Shelf(id uint64) error {
return controller.NewShelf(controller.WithShelfSessionAdmin(c.Admin)).
Handle(model2.NewTechnologyProject(), id)
}
// Delete 删除操作
func (c *Project) Delete(id uint64) error {
mTechnologyProject := model.NewTechnologyProject()