feat:完善项目管理,增加网站首页接口信息
This commit is contained in:
@ -1,11 +1,28 @@
|
||||
package model
|
||||
|
||||
import "SciencesServer/app/common/model"
|
||||
import (
|
||||
"SciencesServer/app/common/model"
|
||||
"SciencesServer/serve/orm"
|
||||
)
|
||||
|
||||
type ManageExpert struct {
|
||||
*model.ManageExpert
|
||||
}
|
||||
|
||||
// Distribution 分布信息
|
||||
func (m *ManageExpert) Distribution() ([]*DataAreaDistributionInfo, error) {
|
||||
out := make([]*DataAreaDistributionInfo, 0)
|
||||
|
||||
err := orm.GetDB().Table(m.TableName()).
|
||||
Select("province", "city", "GROUP_CONCAT(industry SEPARATOR '&') AS industry").
|
||||
Group("province").Group("city").
|
||||
Order("province "+model.OrderModeToAsc).Order("city "+model.OrderModeToAsc).
|
||||
Where("examine_status = ?", model.ExamineStatusForAgree).
|
||||
Scan(&out).Error
|
||||
|
||||
return out, err
|
||||
}
|
||||
|
||||
func NewManageExpert() *ManageExpert {
|
||||
return &ManageExpert{model.NewManageExpert()}
|
||||
}
|
||||
|
Reference in New Issue
Block a user