feat:完善项目信息
This commit is contained in:
@ -26,7 +26,7 @@ func (m *TechnologyAchievement) Achievements(page, pageSize int, count *int64, w
|
||||
model.NewUserVisit().TableName(), model.UserCollectKindForTechnologyAchievement, model.DeleteStatusForNot)).
|
||||
Joins(fmt.Sprintf("LEFT JOIN (SELECT object_id, COUNT(id) AS count FROM %s WHERE kind = %d AND is_deleted = %d GROUP BY object_id) AS c ON a.id = c.object_id",
|
||||
model.NewUserCollect().TableName(), model.UserCollectKindForTechnologyAchievement, model.DeleteStatusForNot)).
|
||||
Where("a.status = ?", model.TechnologyAchievementStatusForAgree).
|
||||
Where("a.status = ?", model.TechnologyStatusKindForAgree).
|
||||
Where("a.is_deleted = ?", model.DeleteStatusForNot)
|
||||
|
||||
if len(where) > 0 {
|
||||
@ -54,7 +54,7 @@ func (m *TechnologyAchievement) Achievement(where ...*model.ModelWhere) ([]*Tech
|
||||
model.NewUserVisit().TableName(), model.UserCollectKindForTechnologyAchievement, model.DeleteStatusForNot)).
|
||||
Joins(fmt.Sprintf("LEFT JOIN (SELECT object_id, COUNT(id) AS count FROM %s WHERE kind = %d AND is_deleted = %d GROUP BY object_id) AS c ON a.id = c.object_id",
|
||||
model.NewUserCollect().TableName(), model.UserCollectKindForTechnologyAchievement, model.DeleteStatusForNot)).
|
||||
Where("a.status = ?", model.TechnologyAchievementStatusForAgree).
|
||||
Where("a.status = ?", model.TechnologyStatusKindForAgree).
|
||||
Where("a.is_deleted = ?", model.DeleteStatusForNot)
|
||||
|
||||
out := make([]*TechnologyAchievementInfo, 0)
|
||||
@ -99,7 +99,7 @@ func (m *TechnologyAchievement) Distribution() ([]*DataAreaDistributionInfo, err
|
||||
Joins(fmt.Sprintf("LEFT JOIN %s AS e ON u_e.expert_id = e.id", model.NewManageExpert().TableName())).
|
||||
Group("e.province").Group("e.city").Group("e.district").
|
||||
Order("e.province "+model.OrderModeToAsc).Order("e.city "+model.OrderModeToAsc).Order("e.district "+model.OrderModeToAsc).
|
||||
Where("a.status = ?", model.TechnologyAchievementStatusForAgree).
|
||||
Where("a.status = ?", model.TechnologyStatusKindForAgree).
|
||||
Where("a.shelf_status = ?", model.ShelfStatusForUp).
|
||||
Scan(&out).Error
|
||||
|
||||
|
Reference in New Issue
Block a user