|
@@ -61,6 +61,7 @@ type CompanyUser struct {
|
|
|
IsChartPermissionSetting int `description:"是否设置过图表权限, 0-未设置,1-已设置,2-无需设置"`
|
|
|
YbProductViewTotal int `description:"研报分产品阅读统计"`
|
|
|
IsSubscribe int `description:"是否关注了微信公众号: 0-未关注; 1-已关注"`
|
|
|
+ IsFollow int `description:"是否特别关注: 0-未关注; 1-已关注"`
|
|
|
IsSubscribeHzyj int `description:"是否关注了弘则研究微信公众号: 0-未关注; 1-已关注"`
|
|
|
IsSubscribeCygx int `description:"是否关注了查研观向微信公众号: 0-未关注; 1-已关注"`
|
|
|
FiccViewTotal int `description:"ficc报告的阅读次数" json:"-"`
|
|
@@ -138,7 +139,8 @@ func GetCompanyUserListV2(condition string, pars []interface{}, companyId, start
|
|
|
if condition != "" {
|
|
|
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 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 ?,? `
|
|
|
_, err = o.Raw(sql, companyId, pars, startSize, pageSize).QueryRows(&items)
|
|
|
return
|
|
|
}
|