feat:完善信息,优化入驻接口

This commit is contained in:
henry
2022-01-28 16:59:15 +08:00
parent 4c57ca2878
commit aafff0f3fd
22 changed files with 275 additions and 137 deletions

View File

@ -28,6 +28,10 @@ type (
ID string `json:"id"`
*model.ManageExpertCompanyVisitInfo
}
ResearchSelect struct {
ID string `json:"id"`
Name string `json:"name"`
}
)
// Laboratory 实验室信息
@ -71,6 +75,27 @@ func (c *Research) Laboratory(title string, page, pageSize int) (*controller.Ret
return &controller.ReturnPages{Data: list, Count: count}, nil
}
// Select 筛选信息
func (c *Research) Select() ([]*ResearchSelect, error) {
mManageResearch := model.NewManageResearch()
out := make([]*model2.ManageResearch, 0)
if err := model2.ScanFields(mManageResearch.ManageResearch, &out, []string{"id", "name"}, &model2.ModelWhereOrder{
Where: model2.NewWhere("examine_status", model2.ExamineStatusForAgree)}); err != nil {
return nil, err
}
list := make([]*ResearchSelect, 0)
for _, v := range out {
list = append(list, &ResearchSelect{
ID: v.GetEncodeID(),
Name: v.Name,
})
}
return list, nil
}
// Visit 访问记录
func (c *Research) Visit(page, pageSize int) (*controller.ReturnPages, error) {
// 获取当前科研机构下所有的专家人员