feat:完善项目信息

This commit is contained in:
henry
2022-01-19 22:13:28 +08:00
parent f0a450b2e5
commit 641e738033
7 changed files with 416 additions and 22 deletions

View File

@ -46,7 +46,7 @@ func (m *ManageExpert) Expert(id uint64) (*ManageExpertDetail, error) {
func (m *ManageExpert) Experts(page, pageSize int, count *int64, where ...*model.ModelWhere) ([]*ManageExpertInfo, error) {
db := orm.GetDB().Table(m.TableName()+" AS e").
Select("e.id", "e.name", "e.industry", "r.name AS research_name", "l.name AS laboratory_name",
"e.province", "e.city", "e.address", "e.created_at",
"e.province", "e.city", "e.created_at",
"t.province AS tenant_province", "t.city AS tenant_city").
Joins(fmt.Sprintf("LEFT JOIN %s AS r ON e.research_id = r.id", model.NewManageResearch().TableName())).
Joins(fmt.Sprintf("LEFT JOIN %s AS l ON e.laboratory_id = l.id", model.NewManageLaboratory().TableName())).