|
@@ -68,6 +68,7 @@ type CompanyUser struct {
|
|
|
FiccLastViewTime time.Time `description:"ficc报告最近一次阅读时间" json:"-"`
|
|
|
RaiViewTotal int `description:"权益报告的阅读次数" json:"-"`
|
|
|
RaiLastViewTime time.Time `description:"权益报告的最近一次阅读时间" json:"-"`
|
|
|
+ NotRead bool `description:"是否七天内未阅读"`
|
|
|
}
|
|
|
|
|
|
type CompanyUserListResp struct {
|
|
@@ -140,7 +141,7 @@ func GetCompanyUserListV2(condition string, pars []interface{}, companyId, start
|
|
|
sql += condition
|
|
|
}
|
|
|
//sql += ` group by a.user_id ORDER BY a.is_register desc,a.report_last_view_time desc,a.last_updated_time DESC LIMIT ?,? `
|
|
|
- sql += ` group by a.user_id ORDER BY is_follow DESC, CASE WHEN is_follow = 1 AND report_last_view_time < NOW() - INTERVAL 7 DAY THEN 0 ELSE 1 END LIMIT ?,? `
|
|
|
+ sql += ` group by a.user_id ORDER BY CASE WHEN is_follow = 1 AND report_last_view_time < NOW() - INTERVAL 7 DAY THEN 0 ELSE 1 END,a.is_register desc,a.report_last_view_time desc,a.last_updated_time DESC LIMIT ?,? `
|
|
|
_, err = o.Raw(sql, companyId, pars, startSize, pageSize).QueryRows(&items)
|
|
|
return
|
|
|
}
|