feat:完善项目信息
This commit is contained in:
@ -17,12 +17,13 @@ type ServiceInnovateInfo struct {
|
||||
Title string `json:"title"`
|
||||
TenantName string `json:"tenant_name"`
|
||||
KindTitle string `json:"kind_title"`
|
||||
Sort int `json:"sort"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
func (m *ServiceInnovate) Innovate(page, pageSize int, count *int64, where ...*model.ModelWhere) ([]*ServiceInnovateInfo, error) {
|
||||
db := orm.GetDB().Table(m.TableName()+" AS i").
|
||||
Select("i.id", "i.title", "t.name AS tenant_name", "k.title AS kind_title", "i.created_at",
|
||||
Select("i.id", "i.title", "t.name AS tenant_name", "k.title AS kind_title", "i.sort", "i.created_at",
|
||||
"t.province", "t.city").
|
||||
Joins(fmt.Sprintf("LEFT JOIN %s AS t ON i.tenant_id = t.id", model.NewSysTenant().TableName())).
|
||||
Joins(fmt.Sprintf("LEFT JOIN %s AS k ON i.kind = k.id", model.NewServiceInnovateKind().TableName())).
|
||||
|
Reference in New Issue
Block a user