feat:完善项目信息

This commit is contained in:
henry
2022-01-13 10:14:02 +08:00
parent a15f0fff2b
commit e3909112ce
9 changed files with 40 additions and 36 deletions

View File

@ -19,7 +19,7 @@ type ActivityInstanceInfo struct {
// Activity 活动信息
func (m *ActivityInstance) Activity(page, pageSize int, count *int64, where ...*model.ModelWhere) ([]*ActivityInstanceInfo, error) {
db := orm.GetDB().Table(m.TableName()+" AS a").
Select("a.id", "a.tenant_id", "a.image", "a.title", "a.contact", "a.contact_mobile", "a.begin_at",
Select("a.id", "a.tenant_id", "a.image", "a.title", "a.contact", "a.industry", "a.contact_mobile", "a.begin_at",
"a.finish_at", "a.join_deadline", "a.amount", "a.max_number", "a.status", "a.created_at", "j.count AS join_count",
"t.province", "t.city").
Joins(fmt.Sprintf("LEFT JOIN (SELECT activity_id, COUNT(id) AS count FROM %s WHERE is_deleted = %d AND status = %d GROUP BY activity_id) AS j ON a.id = j.activity_id",