feat:优化项目信息
This commit is contained in:
@ -53,7 +53,7 @@ func (m *TechnologyAchievement) Achievements(page, pageSize int, count *int64, w
|
||||
// Achievement 成果信息
|
||||
func (m *TechnologyAchievement) Achievement(where ...*model.ModelWhere) ([]*TechnologyAchievementInfo, error) {
|
||||
db := orm.GetDB().Table(m.TableName()+" AS a").
|
||||
Select("a.id", "a.title", "a.mode", "a.image", "a.charge_info", "a.industry", "a.customer", "a.maturity",
|
||||
Select("a.id", "a.title", "a.mode", "a.image", "a.config", "a.industry", "a.customer", "a.maturity",
|
||||
"a.cooperation_mode", "a.keyword", "v.count AS visit_count", "c.count AS collect_count").
|
||||
Joins(fmt.Sprintf("LEFT JOIN (SELECT object_id, SUM(count) AS count FROM %s WHERE kind = %d AND is_deleted = %d GROUP BY object_id) AS v ON a.id = v.object_id",
|
||||
model.NewUserVisit().TableName(), model.UserCollectKindForTechnologyAchievement, model.DeleteStatusForNot)).
|
||||
|
Reference in New Issue
Block a user