feat:完善项目信息
This commit is contained in:
@ -36,7 +36,7 @@ type (
|
||||
// Company 公司企业信息
|
||||
func (m *ManageCompany) Company(id uint64) (*ManageCompanyDetail, error) {
|
||||
db := orm.GetDB().Table(m.TableName()+" AS c").
|
||||
Select("c.*", "t.province", "t.city").
|
||||
Select("c.*").
|
||||
Joins(fmt.Sprintf("LEFT JOIN %s AS t ON c.tenant_id = t.id", model.NewSysTenant().TableName())).
|
||||
Where("c.id = ?", id)
|
||||
|
||||
|
@ -24,14 +24,15 @@ type (
|
||||
// ManageExpertDetail 专家信息
|
||||
ManageExpertDetail struct {
|
||||
*model.ManageExpert
|
||||
model.Area
|
||||
TenantProvince string `json:"-"`
|
||||
TenantCity string `json:"-"`
|
||||
}
|
||||
)
|
||||
|
||||
// Expert 专家信息
|
||||
func (m *ManageExpert) Expert(id uint64) (*ManageExpertDetail, error) {
|
||||
db := orm.GetDB().Table(m.TableName()+" AS e").
|
||||
Select("e.*", "t.province", "t.city").
|
||||
Select("e.*").
|
||||
Joins(fmt.Sprintf("LEFT JOIN %s AS t ON e.tenant_id = t.id", model.NewSysTenant().TableName())).
|
||||
Where("e.id = ?", id)
|
||||
|
||||
|
@ -34,7 +34,7 @@ type (
|
||||
// Laboratory 实验室信息
|
||||
func (m *ManageLaboratory) Laboratory(id uint64) (*ManageLaboratoryDetail, error) {
|
||||
db := orm.GetDB().Table(m.TableName()+" AS l").
|
||||
Select("l.*", "t.province", "t.city").
|
||||
Select("l.*").
|
||||
Joins(fmt.Sprintf("LEFT JOIN %s AS t ON l.tenant_id = t.id", model.NewSysTenant().TableName())).
|
||||
Where("l.id = ?", id)
|
||||
|
||||
|
@ -33,7 +33,7 @@ type (
|
||||
// Research 科研机构信息
|
||||
func (m *ManageResearch) Research(id uint64) (*ManageResearchDetail, error) {
|
||||
db := orm.GetDB().Table(m.TableName()+" AS r").
|
||||
Select("r.*", "t.province", "t.city").
|
||||
Select("r.*").
|
||||
Joins(fmt.Sprintf("LEFT JOIN %s AS t ON r.tenant_id = t.id", model.NewSysTenant().TableName())).
|
||||
Where("r.id = ?", id)
|
||||
|
||||
|
Reference in New Issue
Block a user